1"use strict";(self.webpackChunkdio_ui=self.webpackChunkdio_ui||[]).push([[2985,5823],{2322(e,t,i){i.d(t,{A:()=>T});var n=i(5544),s=i(89379),o=i(9950),r=i(93038),a=i(25979),l=i(16497),c=i(96557),d=i(85815),p=i(58567),h=i(8145),u=i(51264),x=i(46639),m=i(60899),g=i(48738),A=i.n(g),v=i(18216),y=i(70693),j=i(11942),b=i.n(j),C=i(26213),f=i(44414);const S=(0,u.A)((e=>({content:{marginBottom:16,color:e.palette.text.primary,fontSize:14,lineHeight:"20px"},loadingWrapper:{height:"100%",opacity:0,position:"absolute",width:"100%"},nextButton:{fontSize:14,textTransform:"none"},nextWrapper:{alignSelf:"flex-start",marginTop:38},paperRoot:{backgroundColor:e.palette.background.paper,padding:"50px 60px"},paperRootMobile:{padding:"30px 25px 50px"},spinner:{color:"inherit",height:"16px !important",marginLeft:8,width:"16px !important"},title:{color:e.palette.text.primary,fontSize:14,fontWeight:600,marginBottom:6},wrapper:{display:"flex",flexDirection:"column",position:"relative"}})),{withTheme:!0})((e=>{let t=e.children,i=e.classes,n=e.content,s=e.loading,r=e.mobile,a=e.nextDisabled,l=e.onNext,c=e.styles,d=void 0===c?{}:c,p=e.title;return(0,f.jsxs)("div",{className:i.wrapper,children:[(0,f.jsx)("div",{className:i.loadingWrapper,style:{zIndex:s?1:-1}}),(0,f.jsx)(y.A,{classes:{root:A()(i.paperRoot,{[i.paperRootMobile]:r})},children:(0,f.jsxs)(m.Ay,{container:!0,direction:"column",children:[(0,f.jsx)(m.Ay,{className:i.title,children:p}),(0,f.jsx)(m.Ay,{className:i.content,item:!0,children:(n||"").split("\n").map(((e,t)=>(0,f.jsxs)(o.Fragment,{children:[e,(0,f.jsx)("br",{})]},t)))}),(0,f.jsx)(m.Ay,{item:!0,className:d.childrenWrapper,children:t}),(0,f.jsx)(m.Ay,{className:i.nextWrapper,item:!0,children:(0,f.jsxs)(v.A,{className:i.nextButton,color:"primary",disabled:a||s,onClick:l,variant:"contained",children:[(0,C.t)("soNextQuestion","Next Question"),s&&(0,f.jsx)(x.A,{className:i.spinner})]})})]})})]})}));S.propTypes={content:b().string,loading:b().bool,mobile:b().bool,nextDisabled:b().bool,onNext:b().func,styles:b().object,title:b().string};const w=S;class I extends o.Component{constructor(){super(...arguments),this.state={isLoading:!0,isCheckingAnswer:!1,directive:null,answer:{}},this.componentDidMount=async()=>{this.handleDirective(await this.props.getNextAction())},this.submitAnswer=e=>async()=>{const t=this.props.answerQuestion,i=this.state.directive.question;this.setState({isCheckingAnswer:!0}),this.handleDirective(await t({questionId:i,answer:e}))},this.handleRadioButtonChange=e=>{this.setState({answer:{optionId:e.target.value}})},this.renderFormattedQuestionContent=e=>(e||"").split("\n").map(((e,t)=>(0,f.jsxs)(o.Fragment,{children:[e,(0,f.jsx)("br",{})]},t))),this.handleCheckboxChange=e=>t=>{const i=this.state,n=i.answer,o=i.directive.options,r=(0,s.A)((0,s.A)({},n),{},{[e]:t.target.checked});"other"===o[e].type&&delete r.content,this.setState({answer:r})},this.handleTextboxChange=e=>{this.setState({answer:{content:e.target.value}})},this.handleRadioOtherTextboxChange=e=>{const t=this.state.answer.optionId;this.setState({answer:{optionId:t,content:e.target.value}})},this.handleCheckboxOtherTextboxChange=e=>{this.setState({answer:(0,s.A)((0,s.A)({},this.state.answer),{},{content:e.target.value})})},this.handleGridRadioButtonChange=e=>t=>{const i=this.state.answer;this.setState({answer:(0,s.A)((0,s.A)({},i),{},{[e]:{optionId:t.target.value}})})}}initializeAnswer(e,t){const i=t[e];switch(i.type){case"TABLE":return i.subQuestions.reduce(((e,i)=>(e[i]=this.initializeAnswer(i,t),e)),{});case"CHECKBOX":return i.options.reduce(((e,t)=>(e[t]=!1,e)),{});case"TEXTBOX":return{content:""};default:return{}}}handleDirective(e){"redirect"!==e.type?"enquire"===e.type&&this.setState({isCheckingAnswer:!1,isLoading:!1,directive:e,answer:this.initializeAnswer(e.question,e.questions)}):window.location.href=e.link}renderRadioButtonQuestion(){const e=this.props.classes,t=this.state,i=t.answer,s=t.directive,o=s.options,r=s.questions,c=s.question;return(0,f.jsx)(w,{content:r[c].content,loading:this.state.isCheckingAnswer,mobile:this.props.isMobile,nextDisabled:!i.optionId||Object.entries(o).some((e=>{let t=(0,n.A)(e,2),s=t[0];return"other"===t[1].type&&!i.content&&i.optionId===s})),onNext:this.submitAnswer(i),title:s.questionTitle,children:(0,f.jsx)(a.A,{component:"fieldset",children:(0,f.jsx)(p.A,{name:c,"aria-label":s.questionTitle,onChange:this.handleRadioButtonChange,value:i.optionId,column:"true",children:r[c].options.map((t=>"other"===o[t].type?(0,f.jsx)(l.A,{classes:{label:e.buttonLabel},value:t,control:(0,f.jsx)(d.A,{classes:{root:e.buttonRoot}}),label:(0,f.jsxs)("div",{className:e.otherOptionContainer,children:[(0,f.jsx)("div",{children:"Other"}),(0,f.jsx)(h.A,{disabled:i.optionId!==t,fullWidth:!0,placeholder:(0,C.t)("soTypeYourResponse","Type your response..."),value:i.content||"",onChange:this.handleRadioOtherTextboxChange,margin:"normal",className:e.otherTextField,InputProps:{classes:{root:e.otherTextRoot},disableUnderline:!0}})]})},t):(0,f.jsx)(l.A,{classes:{label:e.buttonLabel},value:t,control:(0,f.jsx)(d.A,{classes:{root:e.buttonRoot}}),label:o[t].content},t)))})})})}getSelectedOptions(){const e=this.state,t=e.answer,i=e.directive.options,o=Object.entries(this.state.answer).filter((e=>{let t=(0,n.A)(e,2);t[0];return t[1]})).reduce(((e,s)=>{let o=(0,n.A)(s,2),r=o[0];o[1];return i[r]&&(e[r]=i[r],"other"===e[r].type&&(e[r].content=t.content,e[r].value=t.content)),e}),{});return{options:(0,s.A)({},o)}}renderCheckboxQuestion(){const e=this.props.classes,t=this.state,i=t.answer,s=t.directive,o=s.options,d=s.questions,p=s.question,u=!Object.values(i).some((e=>e))||Object.entries(o).some((e=>{let t=(0,n.A)(e,2),s=t[0];return"other"===t[1].type&&!i.content&&i[s]}));return(0,f.jsx)(w,{content:d[p].content,loading:this.state.isCheckingAnswer,mobile:this.props.isMobile,nextDisabled:u,onNext:this.submitAnswer(this.getSelectedOptions()),title:s.questionTitle,children:(0,f.jsx)(a.A,{component:"fieldset",children:(0,f.jsx)(c.A,{children:d[p].options.map((t=>"other"===o[t].type?(0,f.jsx)(l.A,{classes:{label:e.buttonLabel},value:t,control:(0,f.jsx)(r.A,{classes:{root:e.buttonRoot},checked:i[t],onChange:this.handleCheckboxChange(t),value:t}),label:(0,f.jsxs)("div",{className:e.otherOptionContainer,children:[(0,f.jsx)("div",{children:"Other"}),(0,f.jsx)(h.A,{disabled:!i[t],fullWidth:!0,placeholder:(0,C.t)("soTypeYourResponse","Type your response..."),value:i.content||"",onChange:this.handleCheckboxOtherTextboxChange,margin:"normal",className:e.otherTextField,InputProps:{classes:{root:e.otherTextRoot},disableUnderline:!0}})]})},t):(0,f.jsx)(l.A,{classes:{label:e.buttonLabel},control:(0,f.jsx)(r.A,{classes:{root:e.buttonRoot},checked:i[t],onChange:this.handleCheckboxChange(t),value:t}),label:o[t].content},t)))})})})}renderTextboxQuestion(){const e=this.props.classes,t=this.state,i=t.answer,n=t.directive,s=n.questions,o=n.question;return(0,f.jsx)(w,{content:s[o].content,loading:this.state.isCheckingAnswer,mobile:this.props.isMobile,nextDisabled:!i.content,onNext:this.submitAnswer(i),title:n.questionTitle,children:(0,f.jsx)(h.A,{multiline:!0,value:i.content,onChange:this.handleTextboxChange,margin:"normal",className:e.textField,InputProps:{classes:{root:e.textRoot},disableUnderline:!0}})})}renderGridQuestion(){const e=this.props.classes,t=this.state,i=t.answer,n=t.directive,s=n.options,r=n.questions,l=n.question;return(0,f.jsxs)(w,{loading:this.state.isCheckingAnswer,mobile:this.props.isMobile,nextDisabled:!Object.values(i).map((e=>e.optionId)).every((e=>"string"===typeof e)),onNext:this.submitAnswer(i),title:n.questionTitle,content:r[l].content,styles:{childrenWrapper:e.gridQuestionWrapperChildrenWrapper},children:[this.props.isMobile&&r[l].subQuestions.map((t=>(0,f.jsxs)("div",{className:e.gridSectionMobile,children:[(0,f.jsx)("div",{className:e.primaryText,children:r[t].content}),r[l].options.map((n=>(0,f.jsxs)(m.Ay,{container:!0,wrap:"nowrap",alignItems:"center",children:[(0,f.jsx)(m.Ay,{item:!0,children:(0,f.jsx)(d.A,{checked:(i[t]||{}).optionId===n,classes:{root:A()({[e.gridRadioButtonRootMobile]:this.props.isMobile})},inputProps:{"aria-label":s[n].content},name:"options-".concat(t),onChange:this.handleGridRadioButtonChange(t,n),value:n})}),(0,f.jsx)(m.Ay,{item:!0,className:e.primaryText,children:s[n].content})]},n)))]},t))),!this.props.isMobile&&(0,f.jsxs)(o.Fragment,{children:[(0,f.jsxs)(m.Ay,{container:!0,direction:"row",justifyContent:"flex-start",wrap:"nowrap",children:[(0,f.jsx)(m.Ay,{item:!0,className:e.subQuestionLabel}),r[l].options.map((t=>(0,f.jsx)(m.Ay,{item:!0,container:!0,className:e.optionLabel,justifyContent:"center",alignItems:"flex-start",children:(0,f.jsx)(m.Ay,{className:e.optionLabelInner,item:!0,children:s[t].content})},t))),(0,f.jsx)(m.Ay,{item:!0,className:e.optionLabel,style:{width:"100%",minWidth:0}})]}),r[l].subQuestions.map((t=>(0,f.jsxs)(m.Ay,{container:!0,direction:"row",alignItems:"stretch",justifyContent:"flex-start",wrap:"nowrap",children:[(0,f.jsx)(m.Ay,{item:!0,className:e.subQuestionLabel,children:r[t].content}),(0,f.jsx)(m.Ay,{item:!0,style:{flexGrow:1},children:(0,f.jsx)(a.A,{component:"fieldset",style:{height:"100%",width:"100%"},children:(0,f.jsxs)(m.Ay,{container:!0,direction:"row",wrap:"nowrap",style:{height:"100%"},children:[r[t].options.map((n=>(0,f.jsx)(m.Ay,{item:!0,className:e.optionLabel,children:(0,f.jsx)(d.A,{name:"options-".concat(t),checked:(i[t]||{}).optionId===n,onChange:this.handleGridRadioButtonChange(t,n),value:n,inputProps:{"aria-label":s[n].content}})},n))),(0,f.jsx)(m.Ay,{item:!0,className:e.optionLabel,style:{width:"100%",minWidth:0}})]})})})]},t)))]})]})}renderQuestion(){const e=this.state.directive;switch(e.questions[e.question].type){case"RADIO":return this.renderRadioButtonQuestion();case"CHECKBOX":return this.renderCheckboxQuestion();case"TEXTBOX":return this.renderTextboxQuestion();case"TABLE":return this.renderGridQuestion();default:return}}render(){const e=this.props.classes;return this.state.isLoading?(0,f.jsx)(x.A,{className:e.spinner}):this.renderQuestion()}}I.defaultProps={getNextAction:()=>{},answerQuestion:()=>{}};const T=(0,u.A)((e=>({spinner:{position:"relative",left:"calc(50% - 40px)",margin:"4em 0"},screenerOtterContainer:{display:"flex",flexDirection:"column"},paperRoot:{backgroundColor:e.palette.background.paper,padding:"50px 60px"},paperRootMobile:{padding:"30px 25px 50px"},buttonRoot:{padding:4,margin:"0px 8px"},buttonLabel:{color:e.palette.text.secondary,lineHeight:"20px",width:"100%"},questionTitle:{color:e.palette.text.primary,fontSize:14,fontWeight:600,marginBottom:6},questionWrapper:{marginBottom:16,color:e.palette.text.primary,fontSize:14,lineHeight:"20px"},textField:{width:"100%"},otherTextField:{margin:10,width:"100%"},textRoot:{borderRadius:4,color:e.palette.text.primary,fontSize:14,padding:"12px 16px",backgroundColor:"rgba(48, 48, 48, 0.075)"},otherTextRoot:{borderRadius:4,color:e.palette.text.primary,fontSize:14,padding:"2px 12px",backgroundColor:"rgba(48, 48, 48, 0.075)"},nextQuestionWrapper:{alignSelf:"flex-start",marginTop:38},nextQuestionButton:{fontSize:14,textTransform:"none"},subQuestionLabel:{borderBottom:"1px solid rgba(48, 48, 48, 0.075)",color:e.palette.text.primary,fontSize:14,minWidth:150,padding:"4px 0",width:150},optionLabel:{borderBottom:"1px solid rgba(48, 48, 48, 0.075)",color:e.palette.text.primary,fontSize:14,minWidth:140,padding:"4px 0",textAlign:"center",width:140},optionLabelInner:{overflow:"hidden",textOverflow:"ellipsis"},otherOptionContainer:{display:"flex",height:32,alignItems:"center"},gridRadioButtonRootMobile:{padding:6},primaryText:{color:e.palette.text.primary},gridSectionMobile:{borderBottom:"1px solid rgba(48, 48, 48, 0.075)",marginBottom:16},gridQuestionWrapperChildrenWrapper:{overflowX:"auto",width:"inherit"}})),{withTheme:!0})(I)},2541(e,t,i){i.d(t,{A:()=>d});var n=i(8145),s=i(51264),o=i(9950),r=i(48738),a=i.n(r),l=i(44414);const c=(0,s.A)((e=>({root:{borderRadius:4,color:e.palette.text.primary,fontSize:14,marginTop:-2,paddingLeft:8,transition:"background-color 150ms",backgroundColor:"rgba(48, 48, 48, 0.075)"},input:{"&::placeholder":{color:e.palette.text.primary,opacity:1}},readOnly:{pointerEvents:"none"}
1,readOnlyBackground:{backgroundColor:e.palette.background.paper},formHelperTextRoot:{}})),{withTheme:!0})(class extends o.Component{constructor(){super(...arguments),this.state={isFocused:!1,valueBeforeBlur:this.props.value},this.handleFocus=()=>this.setState({isFocused:!0}),this.handleBlur=e=>{this.setState({isFocused:!1}),this.props.onBlur&&this.props.onBlur(e)}}render(){const e=this.props,t=e.id,i=e.classes,s=e.name,o=e.onChange,r=void 0===o?()=>{}:o,c=e.onSubmit,d=void 0===c?()=>{}:c,p=e.placeholder,h=void 0===p?"":p,u=e.multiline,x=void 0!==u&&u,m=e.fullWidth,g=void 0===m||m,A=e.disabled,v=void 0!==A&&A,y=e.isReadOnly,j=void 0!==y&&y,b=e.maxCharacterLength,C=void 0===b?null:b,f=e.onKeyPress,S=void 0===f?()=>{}:f,w=e.minRows;return(0,l.jsx)(n.A,{id:t,name:s,fullWidth:g,InputProps:{classes:{root:a()(i.root,{[i.readOnlyBackground]:j}),input:i.input},disableUnderline:!0,inputProps:{maxLength:C,tabIndex:j?-1:void 0}},multiline:x,onFocus:this.handleFocus,onBlur:e=>{this.handleBlur(e),this.props.value!==this.state.valueBeforeBlur&&d(),this.setState({valueBeforeBlur:this.props.value})},onChange:r,onKeyPress:S,placeholder:h,value:this.props.value,disabled:v,className:a()({[i.readOnly]:j}),helperText:this.props.helperText,minRows:w,FormHelperTextProps:{classes:{root:i.formHelperTextRoot}}})}}),d=c},3364(e,t,i){i.d(t,{A:()=>d});i(9950);var n=i(51264),s=i(18216),o=i(99532),r=i(11942),a=i.n(r),l=i(44414);const c=(0,n.A)((e=>({label:{color:e.palette.text.primary,fontSize:12,fontStyle:"italic",textTransform:"none",whiteSpace:"nowrap"},icon:{backgroundColor:e.palette.primary.main,borderRadius:"50%",boxShadow:"0px 1px 5px 0px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 3px 1px -2px rgba(0,0,0,0.12)",display:"inherit",marginRight:8,"& svg":{color:"white !important"}}})),{withTheme:!0})((e=>{let t=e.classes,i=e.label,n=e.onClick;return(0,l.jsxs)(s.A,{color:"primary",classes:{root:t.label},onClick:n,children:[(0,l.jsx)("div",{className:t.icon,children:(0,l.jsx)(o.A,{})})," ",i]})}));c.propTypes={label:a().string,onClick:a().func};const d=c},26093(e,t,i){i.d(t,{A:()=>x});var n=i(18216),s=i(51264),o=i(48738),r=i.n(o),a=i(4983),l=i(11942),c=i.n(l),d=(i(9950),i(50922)),p=i.n(d),h=i(44414);const u=(0,s.A)((e=>({responseTypeButton:{borderRadius:20,fontSize:12,marginRight:16,padding:"1px 4px",textTransform:"none",width:130},selectedResponseTypeButton:{backgroundColor:e.palette.secondary.main,color:"white",fontWeight:600,"&:hover":{backgroundColor:"".concat(p()(e.palette.secondary.main).darken(.2).string())},"& svg":{position:"absolute",left:2,height:20}},readOnly:{pointerEvents:"none",opacity:.3}})),{withTheme:!0})((e=>{let t=e.children,i=e.classes,s=e.onClick,o=void 0===s?()=>{}:s,l=e.selected,c=e.isReadOnly;return(0,h.jsxs)(n.A,{classes:{root:r()(i.responseTypeButton,{[i.selectedResponseTypeButton]:l},{[i.readOnly]:c})},disableFocusRipple:c,onClick:()=>!c&&o(),variant:"outlined",children:[l&&(0,h.jsx)(a.A,{})," ",t]})}));u.propTypes={onClick:c().func,selected:c().bool,isReadOnly:c().bool};const x=u},36358(e,t,i){i.d(t,{A:()=>h});var n=i(57073),s=i(8145),o=i(51264),r=i(9950),a=i(7999),l=i(48738),c=i.n(l),d=i(44414);class p extends r.Component{constructor(){super(...arguments),this.textareaRef=null,this.state={isEditing:!1,valueBeforeBlur:this.props.value},this.handleEditButtonClick=()=>this.setState({isEditing:!0},(()=>this.textareaRef&&this.textareaRef.focus())),this.autoExpandTextfieldVertically=e=>setTimeout((()=>{e.style.cssText="height:auto;padding:0;",e.style.cssText="height:".concat(e.scrollHeight,"px")}),0),this.setTextAreaRef=e=>{this.textareaRef=e,e&&(this.autoExpandTextfieldVertically(e),e.addEventListener("keydown",(()=>{this.autoExpandTextfieldVertically(e)})))}}render(){const e=this.props,t=e.classes,i=e.overrides,o=e.inlinePencil,l=e.isReadOnly,p=e.multiline,h=this.state.isEditing||this.props.value&&!o,u=o&&!this.state.isEditing&&this.props.value,x=!this.props.value&&!this.state.isEditing;return(0,d.jsxs)(r.Fragment,{children:[!o&&(0,d.jsxs)(r.Fragment,{children:[(0,d.jsxs)("span",{className:"".concat(t.textAreaTitle," ").concat(i.label),children:[this.props.label,!this.state.isEditing&&this.props.value&&!l&&(0,d.jsx)(n.A,{className:t.editObjectiveButton,onClick:this.handleEditButtonClick,children:(0,d.jsx)(a.A,{className:t.editObjectiveButtonIcon})})]}),(0,d.jsx)("br",{})]}),h&&(0,d.jsx)(s.A,{disabled:!this.state.isEditing,fullWidth:!0,InputProps:{classes:{disabled:t.textAreaContentDisabled,input:c()(t.textAreaContent,{[t.textAreaContentViewing]:!this.state.isEditing,[t.textAreaContentEditing]:this.state.isEditing},i.input)},disableUnderline:!this.state.isEditing,multiline:p},inputRef:this.setTextAreaRef,onBlur:()=>{this.setState({isEditing:!1}),this.state.valueBeforeBlur!==this.props.value&&this.props.onSubmit(),this.setState({valueBeforeBlur:this.props.value})},onChange:this.props.onChange,value:this.props.value||""}),u&&(0,d.jsxs)("div",{className:"".concat(t.textAreaTitle," ").concat(i.label),children:[this.props.value||this.props.placeholder,!l&&(0,d.jsx)(n.A,{className:t.editObjectiveButton,onClick:this.handleEditButtonClick,children:(0,d.jsx)(a.A,{className:t.editObjectiveButtonIcon})})]}),x&&(0,d.jsxs)("span",{className:"".concat(t.textAreaContent," ").concat(t.textAreaContentViewing),children:[(0,d.jsx)("em",{children:this.props.placeholder}),!l&&(0,d.jsx)(n.A,{className:t.editObjectiveButton,onClick:this.handleEditButtonClick,children:(0,d.jsx)(a.A,{className:t.editObjectiveButtonIcon})})]})]})}}p.defaultProps={overrides:{},multiline:!0};const h=(0,o.A)((e=>({textAreaTitle:{color:e.palette.text.primary,fontSize:14}
1,editObjectiveButtonIcon:{height:16,width:16},editObjectiveButton:{color:e.palette.primary.main,height:24,width:24,borderRadius:"50% !important",marginLeft:4,padding:4,"&:hover":{color:e.palette.primary.main,backgroundColor:"rgba(108, 22, 199, 0.1)"}},textAreaContentDisabled:{cursor:"text"},textAreaContent:{borderRadius:"4px !important",fontSize:13,lineHeight:"20px",overflow:"hidden",transition:"height 0.1s"},textAreaContentViewing:{color:e.palette.text.secondary},textAreaContentEditing:{backgroundColor:"rgba(48, 48, 48, 0.075)",color:e.palette.text.primary,padding:16,width:"calc(100% - 32px)"}})),{withTheme:!0})(p)},37311(e,t,i){i.d(t,{A:()=>g});i(9950);var n=i(51264),s=i(58535),o=i(43754),r=i(37885),a=i(16243),l=i(44414);const c=JSON.parse(a.A.translatedStrings),d=c.completeScreener,p=c.verifyInfo,h=c.videoResponse,u=c.selectDates,x=c.survey,m=[d,p,...a.A.hasVideoSurvey?[x]:[h],...a.A.showCandidateAvailability?[u]:[]],g=(0,n.A)((e=>({stepIcon:{color:"".concat(e.palette.tertiary.main," !important")},stepIconText:{fontSize:0},stepper:{padding:"0 0 24px 0"},stepLabel:{fontSize:12}})))((e=>{let t=e.classes,i=e.activeStep;return(0,l.jsx)("div",{children:(0,l.jsx)(s.A,{activeStep:i,alternativeLabel:!0,className:t.stepper,children:m.map((e=>(0,l.jsx)(o.A,{children:(0,l.jsx)(r.A,{classes:{label:t.stepLabel},StepIconProps:{classes:{active:t.stepIcon,completed:t.stepIcon,text:t.stepIconText}},children:e})},e)))})})}))},37653(e,t,i){i.d(t,{A:()=>Z});var n=i(5544),s=i(89379),o=i(9950),r=i(18216),a=i(46639),l=i(60899),c=i(70693),d=i(78317),p=i(81616),h=i(16497),u=i(93038),x=i(51264),m=i(24617),g=i(71261),A=i(69755),v=i(42706),y=i(25263),j=i.n(y),b=i(44094),C=i.n(b),f=i(87946),S=i.n(f),w=i(26213),I=i(76463),T=i(16243),R=i(66517),k=i(37311),N=i(9556),B=i(55281),P=i(81532),E=i(44414);function L(e){const t=e.classes,i=e.translatedStrings,n=void 0===i?{}:i,s=n.failedVideoTitle||(0,w.t)("fvpFailedVideoTitle","(Camera and Microphone are Blocked / Not Detected)"),o=n.failedVideoSubTitle||(0,w.t)("fvpFailedVideoSubTitle",'(Update your <a href="https://discussio.zendesk.com/hc/en-gb/articles/4625261178257-Allowing-Discuss-io-to-access-audio-video-in-your-browser">browser permissions</a>, then refresh this page. If problems persist, restart your computer.)');return(0,E.jsxs)("div",{className:t.root,children:[(0,E.jsx)("div",{className:t.iconContainer,children:(0,E.jsx)(B.A,{className:t.icon})}),(0,E.jsx)("div",{className:t.title,children:s}),(0,E.jsx)("div",{className:t.subTitle,dangerouslySetInnerHTML:{__html:o}})]})}L.defaultProps={translatedStrings:{}};const O=(0,x.A)((e=>({root:{display:"flex",flexDirection:"column",alignItems:"center",width:300,height:200,padding:"16px 24px",backgroundColor:(0,P.X4)(e.palette.error.main,.1)},iconContainer:{padding:0},icon:{backgroundColor:e.palette.error.main,color:e.palette.text.header.hover,borderRadius:"50%",padding:4,fontSize:32},title:{fontSize:14,fontWeight:600,padding:"2px 8px 8px 8px",textAlign:"center"},subTitle:{textAlign:"center",fontSize:14}})),{withTheme:!0})(L);var W=i(67556),H=i.n(W),D=i(99063),M=i(86835),z=i(8720),F=i(69802);const q=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),V=e=>{let t=e.classes,i=e.label,n=e.icon,s=e.onClick,l=e.status;return(0,E.jsxs)(r.A,{className:t.emailButton,color:"primary",disabled:Boolean(l),onClick:s,style:{marginRight:8},variant:"contained",children:["sending"===l?(0,E.jsx)(a.A,{color:"inherit",size:20,style:{margin:"0 2px"}}):"sent"===l?(0,E.jsx)(D.A,{style:{color:"green"}}):"fail"===l?(0,E.jsx)(M.A,{style:{color:"#D50000"}}):(0,E.jsx)(o.Fragment,{children:n}),i]})},Q="0:00 / 5:00",U=JSON.parse(T.A.translatedStrings),G=U.consentLabel&&U.consentLabel.split("%s");const X=e=>{let t=e.disabled;return(0,E.jsx)(l.Ay,{container:!0,wrap:"nowrap",sx:{justifyContent:"flex-end",mt:9},children:(0,E.jsx)(l.Ay,{item:!0,children:(0,E.jsx)(r.A,{disabled:t,startIcon:(0,E.jsx)(z.A,{}),component:"a",href:"https://discussio.zendesk.com/hc/en-gb/categories/4753109080849-Respondent-FAQ",target:"_blank",sx:{borderRadius:"4px !important",color:"action.active","&:hover":{color:"primary.main"},"&:focus":{color:"action.active"}}
1,children:U.needHelp})})})};class _ extends o.Component{constructor(){super(...arguments),this.OT=null,this.session=null,this.publisher=null,this.donePolling=!1,this.techCheckDonePromise=null,this.consentPromise=null,this.recruitImage=null,this.timerMilliseconds=0,this.timerLastStart=null,this.timerHandle=null,this.questionsContainer=o.createRef(),this.currentTime=0,this.audioOnlyPlaceHolderHandle=null,this.state={videoQuestions:"",isRecording:!1,isPaused:!1,timer:Q,isSubmitting:!1,atTimeLimit:!1,questionsContainerHeight:"auto",hasConsented:!0,needsConsent:!1,isConsenting:!1,showConsentError:!1,previewUrl:null,isLoadingPreview:!1,isLoading:!0,isStartLoading:!1,noVideoOrAudioDevice:!1,emailStatus:null,textStatus:null},this.handleVideoQuestionsResponsiveResize=()=>{"xs"===this.props.breakpoint||"sm"===this.props.breakpoint?this.setState({questionsContainerHeight:window.innerHeight-this.questionsContainer.current.offsetTop}):"auto"!==this.state.questionsContainerHeight&&this.setState({questionsContainerHeight:"auto"})},this.updateAgencyInfo=async()=>{if(this.props.previewMode)return void this.resolveAgencyInfoPromise();const e=(C().determine()||{name:()=>{}}).name()||"",t=document.createElement("meta");t.name="referrer",t.content="no-referrer";const i=document.getElementsByTagName("head")[0];i.appendChild(t);let n=null;try{n=await I.A.getRequest("https://ipinfo.io/geo")}catch(s){console.log(s)}finally{i.removeChild(t)}await I.A.postRequest("/ajax/recruit/".concat(T.A.recruitId,"/saveAgencyInfo"),{agree:!0,timezone:e,geoIp:n,viewport:{height:Math.max(document.documentElement.clientHeight,window.innerHeight||0),width:Math.max(document.documentElement.clientWidth,window.innerWidth||0)}}),this.resolveAgencyInfoPromise()},this.handleConsentChecked=async()=>{if(this.props.previewMode)return this.resolveConsentPromise(),void this.resolveAgencyInfoPromise();this.setState({isConsenting:!0});try{await I.A.postRequest("/ajax/recruit/".concat(T.A.recruitId,"/submitConsent"),{}),this.resolveConsentPromise(),this.setState({hasConsented:!0,isConsenting:!1}),this.updateAgencyInfo()}catch(e){console.error(e),this.setState({isConsenting:!1,showConsentError:!0})}},this.componentDidMount=async()=>{if(!this.props.previewMode){const e=new Promise(((e,t)=>{const i=Date.now()+5e3,n=setInterval((()=>{window.OT?(clearInterval(n),e(window.OT)):Date.now()>i&&(clearInterval(n),console.error("Failed to load OpenTok library after 5 seconds"),this.setState({noVideoOrAudioDevice:!0}),t())}),100)}));this.OT=await e,this.OT.checkSystemRequirements()||(window.location.href="/recruiting/unsupportedBrowser?recruitId=".concat(T.A.recruitId)),this.session=this.OT.initSession(T.A.opentokApiKey,T.A.opentokRecordingSessionId);const t={insertMode:"append",width:"100%",height:"100%",style:{buttonDisplayMode:"off",nameDisplayMode:"off"},disableAudioProcessing:!0,facingMode:"user",mirror:!1,publishVideo:!0,publishAudio:!0,resolution:"640x480"};if(!T.A.videoEnabled){const e=document.getElementById("audioOnlyPlaceholder");let i=null;if(e&&e.captureStream&&e.getContext){e.width=640,e.height=480;const t=e.getContext("2d");!function(e){e.fillStyle="#000000",e.fillRect(0,0,640,480),e.fillStyle="#ffffff",e.strokeStyle="#ffffff",e.translate(280,226),e.scale(2,2);const t=new Path2D("M23 19C23 20.66 21.66 22 20 22C18.34 22 17 20.66 17 19V13C17 11.34 18.34 10 20 10C21.66 10 23 11.34 23 13V19ZM20 24C22.76 24 25 21.76 25 19H27C27 22.53 24.39 25.43 21 25.92V29H19V25.92C15.61 25.43 13 22.53 13 19H15C15 21.76 17.24 24 20 24Z");e.fill(t),e.beginPath(),e.arc(20,20,20,0,2*Math.PI),e.stroke()}(t),e.toBlob((e=>{this.recruitImage=e}),"image/png");const n=e.captureStream();this.audioOnlyPlaceHolderHandle=setInterval((function(){const e=t.getImageData(0,0,1,1);t.putImageData(e,0,0)}),500),i=n.getVideoTracks()[0]}t.publishVideo=!!i,t.videoSource=i}this.publisher=this.OT.initPublisher("preview",t,(e=>{e&&(1500===e.code&&this.setState({noVideoOrAudioDevice:!0}),console.error(e))})),this.session.connect(T.A.opentokRecordingSessionToken,(e=>{e?console.error(e):this.session.publish(this.publisher,(e=>{e&&console.error(e),this.setState({isLoading:!1})}
1))})),q||this.runTechCheck()}const e=await this.props.question();this.consentPromise=T.A.recruitHasConsented?Promise.resolve():new Promise((e=>{this.resolveConsentPromise=e})),T.A.recruitHasTechcheck?this.agencyInfoPromise=Promise.resolve():(this.agencyInfoPromise=new Promise((e=>{this.resolveAgencyInfoPromise=e})),T.A.recruitHasConsented&&this.updateAgencyInfo()),this.setState({hasConsented:T.A.recruitHasConsented,needsConsent:!T.A.recruitHasConsented}),this.handleVideoQuestionsResponsiveResize(),window.addEventListener("resize",this.handleVideoQuestionsResponsiveResize),this.setState({videoQuestions:e})},this.runTechCheck=()=>{this.techCheckDonePromise=new Promise((e=>{let t=null;const i={received:{audio:0,video:0},lost:{audio:0,video:0}},n=new(j())(this.OT,{apiKey:T.A.opentokApiKey,sessionId:T.A.opentokSessionId,token:T.A.opentokToken},{timeout:15e3,audioOnly:!T.A.videoEnabled});n.testConnectivity().then((e=>(t=e,n.testQuality((e=>{let t=e.audio,n=e.video;i.received.audio+=S()(t,"packetsReceived",0),i.lost.audio+=S()(t,"packetsLost",0),i.received.video+=S()(n,"packetsLost",0),i.lost.video+=S()(n,"packetsLost",0)}))))).then((e=>new Promise((n=>this.OT.getDevices(((o,r)=>this.OT.checkScreenSharingCapability((async o=>{await this.consentPromise,await this.agencyInfoPromise,await I.A.postRequest("/ajax/recruit/".concat(T.A.recruitId,"/saveTechcheck"),{connectivity:t,quality:{audio:(0,s.A)((0,s.A)({},e.audio),{},{bitrate:(S()(e,"audio.bitrate",0)/1e3).toFixed(2)}),video:(0,s.A)((0,s.A)({},e.video),{},{bitrate:(S()(e,"video.bitrate",0)/1e3).toFixed(2),frameRate:S()(e,"video.frameRate",0).toFixed(4),mos:S()(e,"video.mos",0).toFixed(2)})},sessionId:T.A.opentokSessionId,isBrowserCompatible:this.OT.checkSystemRequirements(),devices:(r||[]).map((e=>({type:"audioInput"===e.kind?"audio":"video",name:e.label}))),screenshareEnabled:o.supported||o.extensionRegistered||o.extensionInstalled,packets:i,testDuration:15e3,viewport:{height:Math.max(document.documentElement.clientHeight,window.innerHeight||0),width:Math.max(document.documentElement.clientWidth,window.innerWidth||0)}}),n()})))))))).catch(console.error).finally((()=>e()))}))},this.resetTimer=()=>{this.timerMilliseconds=0,this.currentTime=0,this.setState({timer:Q})},this.startTimer=()=>{this.timerLastStart=Date.now(),this.timerHandle=setInterval((async()=>{const e=this.timerMilliseconds+Date.now()-this.timerLastStart,t=function(e){const t=Math.floor(e/6e4),i=(e%6e4/1e3).toFixed(0);return t+":"+(i<10?"0":"")+i}(e)+" / 5:00";this.currentTime=e,e>=3e5?(await this.handlePauseRecording(),this.setState({atTimeLimit:!0,timer:"5:00 / 5:00"})):this.setState({timer:t})}),1e3)},this.stopTimer=()=>{this.timerMilliseconds+=Date.now()-this.timerLastStart,clearInterval(this.timerHandle)},this.getRecruitImage=()=>{const e=document.createElement("canvas"),t=document.getElementsByClassName("OT_video-element")[0],i=e.getContext("2d");return e.width=t.videoWidth,e.height=t.videoHeight,i.drawImage(t,0,0),new Promise((t=>{e.toBlob(t,"image/png")}))},this.handleStartRecording=async()=>{this.setState({isStartLoading:!0});try{await I.A.postRequest("/ajax/recruit/".concat(T.A.recruitId,"/startRecording"),{sid:T.A.opentokRecordingSessionId}),this.setState({isRecording:!0,isStartLoading:!1}),this.startTimer()}catch(e){console.error(e)}T.A.videoEnabled&&this.getRecruitImage().then((e=>this.recruitImage=e))},this.handlePauseRecording=async()=>{this.setState({isLoadingPreview:!0}),this.stopTimer();try{await I.A.postRequest("/ajax/recruit/".concat(T.A.recruitId,"/stopRecording")),this.donePolling=!1;const e=setInterval((async()=>{if(this.donePolling)return;const t=await I.A.getRequest("/ajax/recruit/".concat(T.A.recruitId,"/getRecording")),i=t.status,n=t.previewUrl;"success"!==i||this.donePolling||(this.donePolling=!0,clearInterval(e),this.setState({previewUrl:n,isPaused:!0,isLoadingPreview:!1}))}),2e3)}catch(e){console.error(e)}},this.handleRestartRecording=async()=>{this.setState({isPaused:!1,isRecording:!1,atTimeLimit:!1,previewUrl:null}),this.stopTimer(),this.resetTimer()},this.handleSubmitRecording=async()=>{this.setState({isSubmitting:!0}),this.stopTimer(),q&&this.runTechCheck();try{const e=await Promise.all([I.A.postRequest("/ajax/recruit/".concat(T.A.recruitId,"/submitRecording"),{surveyId:T.A.videoSurveyId}),I.A.postBlob("/ajax/recruit/".concat(T.A.recruitId,"/uploadRecruitImage"),this.recruitImage),this.techC
1heckDonePromise]),t=(0,n.A)(e,2)[0];window.location.href=t}catch(e){console.error(e),window.location.href="/recruiting/error"}},this.onSendEmail=async()=>{this.setState({emailStatus:"sending"});try{await I.A.postRequest("/recruiting/emailMobileLink?recruitId=".concat(T.A.recruitId)),this.setState({emailStatus:"sent"})}catch(e){console.error(e),this.setState({emailStatus:"fail"})}finally{await new Promise((e=>window.setTimeout(e,3e3))),this.setState({emailStatus:null})}},this.onSendText=async()=>{this.setState({textStatus:"sending"});try{await I.A.postRequest("/recruiting/textMobileLink?recruitId=".concat(T.A.recruitId)),this.setState({textStatus:"sent"})}catch(e){console.error(e),this.setState({textStatus:"fail"})}finally{await new Promise((e=>window.setTimeout(e,3e3))),this.setState({textStatus:null})}}}componentWillUnmount(){this.audioOnlyPlaceHolderHandle&&clearInterval(this.audioOnlyPlaceHolderHandle),window.removeEventListener("resize",this.handleVideoQuestionsResponsiveResize),this.session&&this.session.disconnect()}render(){const e=this.props,t=e.breakpoint,i=e.classes,n=e.previewMode,s=this.state,x=s.isStartLoading,y=s.isLoading,j=s.isLoadingPreview,b=s.previewUrl,C=s.videoQuestions,f=s.isRecording,S=s.isPaused,I=s.isSubmitting,R=s.hasConsented,B=s.needsConsent,P=s.isConsenting,L=s.showConsentError,W=s.noVideoOrAudioDevice,D="sm"===t||"xs"===t;return(0,E.jsx)(o.Fragment,{children:(0,E.jsxs)(c.A,{className:i.paper,style:{height:D?"auto":void 0},children:[(0,E.jsx)(l.Ay,{item:!0,xs:12,children:(0,E.jsx)(k.A,{activeStep:2})}),(0,E.jsxs)(l.Ay,{alignItems:"flex-start",classes:{container:i.noFlexWrap},container:!0,direction:D?"column":"row",justifyContent:"space-between",children:[(0,E.jsx)(l.Ay,{item:!0,className:i.paperLeftColumn,children:(0,E.jsxs)("ol",{className:i.orderedList,children:[T.A.mobileScreenshareCode&&(0,E.jsxs)("li",{children:[(0,E.jsx)("h1",{children:U.downloadTheApp}),(0,E.jsxs)("div",{className:i.mobileLinkWrapper,children:[(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{children:U.scanThisQR}),(0,E.jsxs)("p",{style:{display:"inline-block",marginRight:8},children:[U.orSendYourself,(0,E.jsx)("br",{}),(0,E.jsx)(V,{classes:i,label:U.email,icon:(0,E.jsx)(A.A,{}),onClick:this.onSendEmail,status:this.state.emailStatus}),T.A.techCheckSMSVerification&&(0,E.jsx)(V,{classes:i,label:U.text,icon:(0,E.jsx)(v.A,{}),onClick:this.onSendText,status:this.state.textStatus})]})]}),(0,E.jsx)("div",{className:i.qrcodeWrapper,children:(0,E.jsx)(H(),{renderAs:"svg",value:"".concat(T.A.dioDomain,"/mobileScreenshare/").concat(T.A.mobileScreenshareCode)})})]})]}),(0,E.jsxs)("li",{children:[(0,E.jsx)("h1",{children:U.paperHeader}),(0,E.jsx)("p",{children:U.paperSubHeader}),!D&&(0,E.jsx)("div",{className:i.videoQuestions,children:(0,E.jsx)("ul",{className:i.questionList,children:C.split("\n").map(((e,t)=>e&&(0,E.jsx)("li",{children:e.trim()},t)))})})]})]})}),(0,E.jsxs)(l.Ay,{item:!0,container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:i.videoContainer,children:[!T.A.videoEnabled&&!b&&!W&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{style:{display:"none",width:320,height:240},id:"preview"}),(0,E.jsx)("canvas",{style:{display:"none"},id:"audioOnlyPlaceholder"}),(0,E.jsxs)(d.A,{className:i.videoPlayer,sx:{backgroundColor:"black",color:"action.light.disabled",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600},children:[(0,E.jsx)(d.A,{sx:{borderRadius:"50% !important",border:"2px solid",borderColor:"action.light.disabled",padding:.5,display:"flex",alignContent:"center",justifyContent:"center",marginRight:1},children:(0,E.jsx)(F.A,{})}),(0,E.jsxs)(p.A,{children:[(0,E.jsx)(d.A,{children:U.audioOnly}),(0,E.jsx)(d.A,{children:U.audioRecorded})]})]})]}),b&&(0,E.jsx)("video",{className:i.videoPlayer,style:{background:"black"},src:b,playsInline:!0,controls:!0}),T.A.videoEnabled&&!W&&(0,E.jsx)("div",{style:b?{display:"none"}:{},className:i.videoPlayer,id:"preview"}),W&&(0,E.jsx)(O,{translatedStrings:U}),P&&(0,E.jsx)(a.A,{className:"".concat(i.spinner," ").concat(i.isConsentingSpinner)}),B&&(0,E.jsxs)(o.Fragment,{children:[(0,E.jsx)(h.A,{control:(0,E.jsx)(u.A,{name:"agree",checked:R,onChange:this.handleConsentChecked}),label:(0,E.jsxs)("span",{children:[G[0],(0,E.jsx)("a",{href:T.A.privacy,target:"_blank",rel:"noopener noreferrer",children:G[1]}),G[2],(0,E.jsx)("a",{href:T.A.termsVisitor,target:"_blank",rel:"noopener noreferrer",children:G[3]})]}),classes:{label:i.checkboxLabel,root:i.formControl},disabled:P||R}),(0,E.jsx)(N.A,{content:(0,w.t)("prConsentError","Unable to save consent. Please try again."),open:L,onClose:()=>this.setState({showConsentError:!1})})]}),(0,E.jsx)(l.Ay,{className:i.verticalSpacing,container:!0,alignItems:"center",justifyContent:"center",wrap:"nowrap",children:(0,E.jsx)(l.Ay,{item:!0,children:(0,E.jsx)("p",{className:i.videoTimer,children:this.state.timer})})}),S?(0,E.jsxs)(l.Ay,{container:!0,alignItems:"center",justifyContent:S?"space-between":"flex-end",wrap:"nowrap",children:[S&&(0,E.jsx)(l.Ay,{item:!0,children:(0,E.jsxs)(r.A,{className:i.startOverButton,color:"primary",variant:"outlined",onClick:this.handleRestartRecording,disabled:I,children:[(0,E.jsx)(g.A,{className:i.icon})," ",U.startOver]})}),(0,E.jsx)(l.Ay,{item:!0,children:(0,E.jsxs)(r.A,{className:i.submitButton,variant:"contained",color:"secondary",onClick:this.handleSubmitRecording,disabled:I,children:[I?(0,E.jsx)(a.A,{className:"".concat(i.spinner," ").concat(i.isSubmittingSpinner)}):(0,E.jsx)(o.Fragment,{})," ",U.submit]})})]}):f?(0,E.jsxs)(r.A,{className:i.startButton,variant:"contained",color:"secondary",onClick:this.handlePauseRecording,disabled:j,children:[j?(0,E.jsx)(a.A,{className:"".concat(i.spinner," ").concat(i.isSubmittingSpinner)}):(0,E.jsx)(m.A,{className:i.icon})," ",j?U.loadingPreview:U.stopRecording]}):(0,E.jsxs)(r.A,{className:i.startButton,disabled:!R||f||y||x||W,variant:"contained",color:"primary",onClick:this.handleStartRecording,children:[x&&(0,E.jsx)(a.A,{className:"".concat(i.spinner," ").concat(i.isSubmittingSpinner)}),U.start]}),!D&&(0,E.jsx)(X,{disabled:n})]}),(0,E.jsx)(l.Ay,{ref:this.questionsContainer,item:!0,sx:{overflowY:"auto",width:D?"100%":void 0},children:D&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("div",{className:i.videoQuestions,style:{marginTop:24},children:(0,E.jsx)("ol",{className:i.questionList,children:C.split("\n").map(((e,t)=>e&&(0,E.jsx)("li",{children:e},t)))})}),(0,E.jsx)(X,{disabled:n})]})})]})]})})}}const Z=(0,R.A)((0,x.A)((e=>({paper:{padding:32,maxWidth:1020,marginTop:72,borderRadius:"4px !important"},paperLeftColumn:{marginRight:20,paddingBottom:"0 !important","& h1":{color:e.palette.text.primary,fontSize:24,fontWeight:"normal",lineHeight:"28px",margin:"0 0 8px"},"& p":{color:e.palette.text.primary,fontSize:16,marginTop:0,marginBottom:22,"@media (max-width: 960px)":{marginBottom:14}}},videoQuestions:{fontSize:16,whiteSpace:"pre-wrap",lineHeight:"20px"},questionList:{paddingLeft:16,"& li":{color:e.palette.text.primary,marginBottom:16}},textButton:{textTransform:"none",borderRadius:"4px !important",fontSize:14,fontWeight:600,"& .text":{color:e.palette.link.active},"&:disabled .text":{opacity:.5}},button:{textTransform:"none",fontSize:14,fontWeight:600,borderRadius:"4px !important"},buttonNoWeight:{textTransform:"none",fontSize:14,borderRadius:"4px !important"},videoTimer:{margin:0,textAlign:"center",fontSize:14},startOverButton:{fontSize:14,textTransform:"none",fontWeight:600,width:160,borderRadius:"4px !important",height:42},verticalSpacing:{marginTop:8,marginBottom:16},startButton:{fontSize:14,textTransform:"none",borderRadius:"4px !important",fontWeight:600,width:210,height:42,"@media (max-width: 275px)":{width:"100%"}},submitButton:{marginLeft:8,fontSize:14,textTransform:"none",borderRadius:"4px !important",fontWeight:600,width:160,height:42,"@media (max-width: 435px)":{width:"100%"}},icon:{marginTop:-2,marginRight:6},videoPlayer:{borderRadius:"4px !important",width:480,height:360,"@media (max-width: 518px)":{height:255,width:300}},videoContainer:{margin:"10px auto 0",paddingTop:"0 !important",width:"fit-content"},"@media (max-width: 960px)":{videoContainer:{margin:0,width:"100%"},paper:{flexGrow:1,marginTop:-24,height:"calc(100vh + 57px)",width:"100vw"}},spinner:{height:"20px !important",width:"20px !important"},isSubmittingSpinner:{color:e.palette.text.disabled,marginRight:8},isConsentingSpinner:{top:42,left:35,marginRight:"auto",marginTop:-20},avatar:{width:"100%",height:"100%"},avatarWrapper:{borderRadius:"4px !important",width:400,height:300,background:"linear-gradient(to bottom,rgba(48,48,48,.12) 0,rgba(48,48,48,.54) 100%)","@media (max-width: 518px)":{height:"auto",width:"100%"}},noFlexWrap:{flexWrap:"nowrap"},checkboxLabel:{fontSize:12,lineHeight:"16px",marginLeft:8},formControl:{margin:"8px 0",maxWidth:400},helpIcon:{marginRight:4,fill:e.palette.action.active},orderedList:{"& li::marker":{fontSize:24}},emailButton:{borderRadius:"4px !important",fontWeight:600,height:31,padding:6,textTransform:"none","& svg":{height:19}},mobileLinkWrapper:{display:"flex",maxWidth:490,"& > div:first-child":{marginRight:12}},qrcodeWrapper:{"& svg":{border:"3px solid ".concat(e.palette.primary.main),padding:4}}})),{withTheme:!0})(_))},45823(e,t,i){i.d(t,{A:()=>K});var n=i(16243),s=i(98284),o=i(89379),r=i(9950),a=i(48738),l=i.n(a),c=i(51264),d=i(88060),p=i(41413),h=i(18216),u=i(60899),x=i(57073),m=i(70610),g=i(23266),A=i(70006),v=i(84142),y=i(17808),j=i(78317),b=i(41075),C=i(99532),f=i(80392),S=i(55858),w=i(63416),I=i(54545),T=i(84892),R=i(56663),k=i(27805),N=i(78188),B=i(48205),P=i(23471);var E=i(553),L=i(840),O=i(47765),W=i(80045),H=i(44414);const D=["children","classes","areTabsResponsive"],M="#757778",z=(0,c.A)((e=>({root:{height:40,minHeight:"inherit"},indicator:{display:"none"},flexContainer:{height:"100%"},tabsContainer:{backgroundColor:M,display:"flex",justifyContent:"center"},scrollButtonRoot:{borderRadius:"50% !important"}})),{withTheme:!0})((e=>{let t=e.children,i=e.classes,n=e.areTabsResponsive,s=(0,W.A)(e,D);return(0,H.jsx)("div",{className:i.tabsContainer,children:(0,H.jsx)(y.A,(0,o.A)((0,o.A)({classes:{flexContainer:i.flexContainer,indicator:i.indicator,root:i.root},variant:"scrollable",scrollButtons:!!n&&"auto",ScrollButtonComponent:e=>(0,H.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{classes:(0,o.A)((0,o.A)({},e.classes),{},{root:i.scrollButtonRoot}),onClick:t=>{t.stopPropagation(),e.onClick&&e.onClick(t)}}))},s),{},{children:t}))})})),F=["classes"],q=(0,c.A)((e=>({root:{textDecoration:"none !important",color:e.palette.background.paper,fontSize:14,letterSpacing:1.25,lineHeight:"16px",minHeight:"inherit",opacity:1,transition:"opacity 95ms cubic-bezier(0.4, 0, 1, 1)",width:287,"&:hover":{color:e.palette.background.paper,opacity:.7},"&:focus":{color:e.palette.background.paper,opacity:.7}},selected:{backgroundColor:"#ECECEC",color:e.palette.text.primary,"&:hover":{color:"".concat(e.palette.text.primary," !important")},"&:focus":{color:"".concat(e.palette.text.primary," !important")}},lighterSubTab:{backgroundColor:e.palette.background.paper}})),{withTheme:!0})((e=>{let t=e.classes,i=(0,W.A)(e,F);return(0,H.jsx)(v.A,(0,o.A)({classes:{root:t.root,selected:l()(t.selected,{[t.lighterSubTab]:i.lightersubtab})},component:"a"},i))}));var V=i(9556),Q=i(42265),U=i(9332),G=i(8016),X=i(92433),_=i(15651),Z=i(26213);class Y extends r.Component{constructor(){var e;super(...arguments),e=this,this.state={accountAnchorEl:null,adminAnchorEl:null,errorSnackbarOpen:!1,clickedTab:null,createProjectServicesProjectDialogOpen:!1},this.onClick=e=>{this.setClickedTab(null)()},this.openMenu=e=>t=>this.setState({[e]:t.currentTarget}),this.closeMenu=e=>()=>this.setState({[e]:null}),this.setClickedTab=e=>t=>{t&&t.stopPropagation();const i=e===this.state.clickedTab?null:e;this.setState({clickedTab:i})},this.stopPropagation=e=>e.stopPropagation(),this.shouldDisplaySubtabs=function(){for(var t=arguments.length,i=new Array(t),s=0;s<t;s++)i[s]=arguments[s];return!e.props.hideTabs&&!n.A.discussNowMode&&(!(!i.includes(e.props.selectedTab)||null!==e.state.clickedTab)||i.includes(e.state.clickedTab))},this.addProjectClickHandler=()=>{var e;const t=null===(e=n.A.organizations)||void 0===e?void 0:e.find((e=>e.orgId===parseInt(n.A.organizationId))),i=null===t||void 0===t?void 0:t.subscriptionLevel,s=null===t||void 0===t?void 0:t.subscriptionExpired,o="platform_access"===n.A.subscriptionType,r="researcher"===(null===t||void 0===t?void 0:t.roleType)&&(0,U.Ul)(i),a=_.oL,l="/quote",c="/project/create";n.A.isAdmin?window.location=c:window.location=s||o?l:a&&r?c:l}}componentDidMount(){window.addEventListener("click",this.onClick)}componentWillUnmount(){window.removeEventListener("click",this.onClick)}render(){var e,t,i,s;const a=this.props,c=a.avatarUrl,P=(a.breakpoint,a.classes),W=a.firstName,D=a.projectId,M=a.projectName,F=a.selectedSubTab,Y=a.hideProjectName,J=a.hideTabs,K=a.logoOnly,$=a.projects,ee=a.underlineSettings,te=a.marginBottom,ie=void 0===te?18:te,ne=a.hideNewProject,se=a.isByo,oe=a.sx,re=void 0===oe?{}:oe;let ae=this.props.selectedTab;n.A.discussNowMode&&F&&(ae=F),n.A.isEnhancedRecruiter&&F&&(ae=F);const le=!n.A.isAdmin,ce=n.A.isAdmin||!n.A.isSupportAgent,de=this.props.width,pe="lg"!==de&&"xl"!==de,he=this.shouldDisplaySubtabs("respondents"),ue=this.shouldDisplaySubtabs("interview_prep"),xe=this.shouldDisplaySubtabs("insights"),me=he||ue||xe,ge=!K&&!Y&&""!==M,Ae=ge&&(null===(e=n.A.projectClosedData)||void 0===e?void 0:e.isClosed)&&n.A.isAdmin,ve=null!==(t=null===(i=n.A.projectClosedData)||void 0===i||null===(s=i.closeDate)||void 0===s?void 0:s.formattedDate)&&void 0!==t?t:null,ye=!n.A.subscriptionLevel&&ve,je=n.A.incentivesPackage&&n.A.enablePanelRecruits;let be="auto";return(J||K)&&(be=57),(n.A.isByo&&n.A.isAgency||n.A.isProjectViewer)&&(be="auto"),(0,H.jsxs)(d.A,{elevation:0,id:"dio-ui-app-bar",position:"sticky",style:{height:be},sx:(0,o.A)({backgroundColor:"unset",top:-1,width:"100%",color:"white"}
1,re),children:[(0,H.jsxs)("div",{className:l()(P.appBarInner,{[P.shadow]:!me,[P.boxShadowTransition]:me}),children:[Ae&&(0,H.jsx)(j.A,{sx:{color:"white",background:"red",width:"100%",fontWeight:600,textAlign:"center",padding:"4px 0px"},children:"Expired Project and/or Subsciption. Customer cannot access."}),(0,H.jsxs)(u.Ay,{container:!0,direction:"column",className:l()(P.appBarContainerContainer,{[P.inheritHeight]:K}),children:[(0,H.jsxs)(u.Ay,{alignItems:"center",className:"".concat(P.appBarContainer," ").concat(P.plainFlexContainer),container:!0,item:!0,justifyContent:"space-between",children:[(0,H.jsxs)(u.Ay,{className:"".concat(P.leftContainer," ").concat(P.plainFlexItem),container:!0,item:!0,alignItems:"center",xs:6,wrap:"nowrap",children:[K?(0,H.jsxs)("div",{className:P.logoPadding,children:[(0,H.jsx)("img",{alt:"Discuss.io Online Qualitative Research",src:n.A.theme?n.A.theme.logos.light.large:"/assets/img/new-dio-logo-white.svg",className:"".concat(P.dioIcon," ").concat(P.notclickable," ").concat(P.dioIconWithLogo)}),(0,H.jsx)("img",{alt:"Discuss.io Online Qualitative Research",id:"responsive-logoimg",src:n.A.theme?n.A.theme.logos.light.small:"/assets/img/new-dio-icon-white.svg",className:"".concat(P.dioIcon," ").concat(P.notclickable," ").concat(P.dioIconWithoutLogo)})]}):(0,U.C7)(U.N4.discussBranding)?(0,H.jsx)(x.A,{className:"".concat(P.clickable," ").concat(P.circular," ").concat(P.logoPadding),href:(0,U.C7)(U.N4.dashboardNavigation)?"/":null,color:"inherit",component:"a",disabled:!(0,U.C7)(U.N4.dashboardNavigation),children:(0,H.jsx)("img",{alt:"Discuss.io Online Qualitative Research",src:n.A.theme?n.A.theme.logos.light.small:"/assets/img/new-dio-icon-white.svg",className:"".concat(P.dioIcon)})}):(0,H.jsxs)("div",{className:P.logoPadding,children:[(0,H.jsx)("img",{alt:"Quant <-> Qual",src:n.A.theme.logos.light.large,className:"".concat(P.dioIcon," ").concat(P.dioIconWithLogo)}),(0,H.jsx)("img",{alt:"Quant <-> Qual",src:n.A.theme.logos.light.small,className:"".concat(P.dioIcon," ").concat(P.dioIconWithoutLogo)})]}),ge&&(0,H.jsxs)(r.Fragment,{children:[(0,H.jsx)(f.A,{className:"".concat(P.appBarLogo," ").concat(P.appBarChevron)}),(0,H.jsx)("div",{className:P.projectName,children:M}),ye&&(0,H.jsxs)(j.A,{className:P.projectName,ml:1,children:["(access ends ",ve,")"]})]}),$&&(0,H.jsxs)("div",{className:P.projectsMenu,children:[(0,H.jsx)("span",{className:P.projectsMenuLabel,children:(0,Z.t)("navVerifyParticipants","Verify Participants:")}),(0,H.jsx)(A.A,{id:"projects-dropdown",value:this.state.selectedProjectId||D,onChange:e=>{const t=e.target.value;this.setState({selectedProjectId:t}),document.dispatchEvent(new CustomEvent("updateVerificationProject",{detail:{projectId:t}})),window.history.pushState({},"Verify Participants","/project/"+t+"/verifyParticipants")},classes:{root:l()(P.projectsSelectRoot,P.clickable)},disableUnderline:!0,children:$.map((e=>(0,H.jsx)(g.A,{value:e.id,children:e.name},e.id)))})]})]}),!K&&(0,H.jsxs)(u.Ay,{className:P.plainFlexItem,container:!0,item:!0,alignItems:"center",xs:6,justifyContent:"flex-end",wrap:"nowrap",children:[!ne&&!n.A.isProjectViewer&&(0,U.C7)(U.N4.createProject)&&(0,H.jsxs)(r.Fragment,{children:[(0,H.jsx)(u.Ay,{item:!0,className:"".concat(P.newProjectContainer," ").concat(P.hideWhenXs),children:(0,H.jsxs)(h.A,{className:P.clickable,variant:"text",component:"a",color:"inherit",onClick:()=>this.addProjectClickHandler(),children:[(0,H.jsx)(C.A,{})," ",(0,Z.t)("navNewProject","New Project")]})}),(0,H.jsx)(E.A,{className:P.hideWhenXs})]}),n.A.creditsEnabled&&"credits"===(0,U.AM)(n.A.subscriptionLevel)&&!n.A.isProjectViewer&&(0,H.jsxs)(u.Ay,{className:P.creditsRemaining,item:!0,children:[(0,H.jsx)(Q.A,{}),(0,H.jsx)(E.A,{className:P.hideWhenXs})]}),!le&&(0,H.jsxs)(r.Fragment,{children:[(0,H.jsx)(u.Ay,{item:!0,className:"".concat(P.adminMenuIconContainer," ").concat(P.hideWhenXs),children:(0,H.jsx)(L.A,{})}),(0,H.jsx)(E.A,{className:P.hideWhenXs})]}),!ce&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u.Ay,{item:!0,className:"".concat(P.adminMenuIconContainer," ").concat(P.hideWhenXs),children:(0,H.jsx)(x.A,{className:P.meetingTrackerLink,color:"inherit",href:"/manage/meetingTracker/track3",children:(0,H.jsx)(X.A,{style:{fill:"white",fontSize:24}})})}),(0,H.jsx)(E.A,{className:P.hideWhenXs})]}),n.A.localizationEnabled&&(0,H.jsxs)(r.Fragment,{children:[(0,H.jsx)(u.Ay,{item:!0,className:"".concat(P.adminMenuIconContainer," ").concat(P.hideWhenXs),children:(0,H.jsx)(O.A,{})}),(0,H.jsx)(E.A,{className:P.hideWhenXs})]}),(0,H.jsxs)(u.Ay,{item:!0,className:P.avatarButtonContainer,children:[(0,H.jsxs)(h.A,{className:"".concat(P.avatarButton),variant:"text",onClick:this.openMenu("accountAnchorEl"),children:[(0,H.jsx)(p.A,{className:P.avatar,src:c,alt:"user image or avatar"}),(0,H.jsx)("div",{className:"".concat(P.avatarName," ").concat(P.hideWhenXs),children:W}),(0,H.jsx)(R.A,{className:P.hideWhenXs})]}),(0,H.jsxs)(m.A,{id:"account-menu",classes:{paper:P.paper},anchorEl:this.state.accountAnchorEl,disableAutoFocusItem:!0,open:Boolean(this.state.accountAnchorEl),onClose:this.closeMenu("accountAnchorEl"),anch
1orOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},children:[(0,H.jsxs)(g.A,{className:P.menuText,href:"/account",component:"a",children:[(0,H.jsx)(w.A,{}),(0,Z.t)("navMyAccount","My Account")]}),(0,U.C7)(U.N4.supportArticles)&&(0,H.jsxs)(g.A,{className:"".concat(P.menuText," ").concat(P.trainingMenuText),target:"_blank",href:"https://discussio.zendesk.com/hc/en-gb",component:"a",children:[(0,H.jsxs)("div",{children:[(0,H.jsx)(N.A,{}),(0,Z.t)("navSupportArticles","Support Articles")]}),(0,H.jsxs)("span",{children:[(0,Z.t)("navOpensInNewTab","Opens in New Tab")," ",(0,H.jsx)(T.A,{})]})]}),(0,U.C7)(U.N4.supportArticles)&&(0,H.jsxs)(g.A,{className:"".concat(P.menuText," ").concat(P.trainingMenuText),target:"_blank",href:"https://discussio.zendesk.com/hc/en-gb/categories/4624239618705-Self-Guided-Platform-Training",component:"a",children:[(0,H.jsxs)("div",{children:[(0,H.jsx)(I.A,{}),(0,Z.t)("navTraining","Training")]}),(0,H.jsxs)("span",{children:[(0,Z.t)("navOpensInNewTab","Opens in New Tab")," ",(0,H.jsx)(T.A,{})]})]}),(0,H.jsx)(g.A,{className:P.menuText,href:(0,G.SL)(),component:"a",children:(0,Z.t)("navLogout","Logout")})]})]}),(0,H.jsx)(u.Ay,{item:!0,className:P.hideWhenXs,children:(0,H.jsx)(k.A,{})})]})]}),!K&&!J&&(0,H.jsxs)(u.Ay,{container:!0,item:!0,justifyContent:"space-between",wrap:"nowrap",children:[(0,H.jsx)("div",{}),(0,H.jsx)("div",{style:{overflow:"hidden"},children:(0,H.jsx)(y.A,{classes:{indicator:P.tabIndicator},centered:!pe,ScrollButtonComponent:e=>(0,H.jsx)(b.A,(0,o.A)((0,o.A)({},e),{},{classes:(0,o.A)((0,o.A)({},e.classes),{},{root:P.scrollButtonRoot}),onClick:t=>{t.stopPropagation(),e.onClick&&e.onClick(t)}})),scrollButtons:!!pe&&"auto",value:ae,variant:pe?"scrollable":"standard",children:n.A.discussNowMode?[(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/view"),label:(0,Z.t)("navOverview","OVERVIEW"),onClick:this.stopPropagation,value:"overview"},"overview"),je&&(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/screener"),label:(0,Z.t)("navScreener","SCREENER"),onClick:this.stopPropagation,value:"screener"},"screener"),(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/manageRespondents"),label:(0,Z.t)("navManageRespondents","MANAGE RESPONDENTS"),onClick:this.stopPropagation,value:"candidates"},"candidates"),(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/summary"),label:(0,Z.t)("navSummary","SUMMARY"),onClick:this.stopPropagation,value:"summary"},"summary"),(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/highlightReels"),label:(0,Z.t)("navHighlightReels","HIGHLIGHT REELS"),onClick:this.stopPropagation,value:"highlightReels"},"highlightReels")].filter(Boolean):n.A.isEnhancedRecruiter?[(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/view"),label:(0,Z.t)("navOverview","OVERVIEW"),onClick:this.stopPropagation,value:"overview"},"overview"),(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/").concat(se?"respondentHub":"candidates"),label:se?(0,Z.t)("navRespondentHub","RESPONDENT HUB"):(0,Z.t)("navCandidates","CANDIDATES"),onClick:this.stopPropagation,value:"candidates"},"candidates"),se&&(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/disposition"),label:(0,Z.t)("navCompletedInterviews","COMPLETED INTERVIEWS"),onClick:this.stopPropagation,value:"disposition"},"disposition")].filter(Boolean):[(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/view"),label:(0,Z.t)("navOverview","OVERVIEW"),onClick:this.stopPropagation,value:"overview"},"overview"),(0,H.jsx)(v.A,{classes:{root:P.tab,selected:P.tabSelected},component:"a",href:"/project/".concat(D,"/calendar"),label:(0,Z.t)("navCalendar","CALENDAR"),onClick:this.stopPropagation,value:"calendar"},"calendar"),(0,U.C7)(U.N4.respondentsTab)&&(0,H.jsx)(v.A,{classes:{root:l()(P.tab,{[P.tabSelectedWithSubtabs]:he,[P.mainTabsSubTabSelected]:he&&("screener"===F||"candidates"===F||"dis
1position"===F)}),selected:P.tabSelected},label:(0,H.jsxs)("span",{className:P.tabLabelWithCaret,children:[(0,Z.t)("navRespondents","RESPONDENTS"),(0,H.jsx)(R.A,{className:P.tabCaret})]}),onClick:this.setClickedTab("respondents"),value:"respondents"},"respondents"),(0,H.jsx)(v.A,{classes:{root:l()(P.tab,{[P.tabSelectedWithSubtabs]:ue,[P.mainTabsSubTabSelected]:ue&&("discussion_guide"===F||"takeaways"===F||"polls"===F)}),selected:P.tabSelected},label:(0,H.jsxs)("span",{className:P.tabLabelWithCaret,children:[(0,Z.t)("navInterviewPrep","INTERVIEW PREP"),(0,H.jsx)(R.A,{className:P.tabCaret})]}),onClick:this.setClickedTab("interview_prep"),value:"interview_prep"},"interview_prep"),(0,H.jsx)(v.A,{classes:{root:l()(P.tab,{[P.tabSelectedWithSubtabs]:xe,[P.mainTabsSubTabSelected]:xe&&("tagInsights"===F||"recordings"===F||"highlightReels"===F||"pollResults"===F||"summary"===F)}),selected:P.tabSelected},label:(0,H.jsxs)("span",{className:P.tabLabelWithCaret,children:[(0,Z.t)("navInsights","INSIGHTS"),(0,H.jsx)(R.A,{className:P.tabCaret})]}),onClick:this.setClickedTab("insights"),value:"insights"},"insights")].filter(Boolean)})}),(0,H.jsx)("div",{className:l()(P.settingsButtonWrapper,{[P.settingsButtonUnderlinedWrapper]:ee}),children:(0,H.jsxs)(h.A,{classes:{root:P.settingsButtonRoot},component:"a",href:"/project/".concat(D,"/settings"),onClick:this.stopPropagation,children:[(0,H.jsx)(S.A,{})," ",(0,Z.t)("navSettings","settings")]})})]})]})]}),!K&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(B.A,{direction:"down",in:he&&!n.A.isEnhancedRecruiter||n.A.isByo&&n.A.isAgency&&!n.A.isEnhancedRecruiter,style:{height:n.A.isByo&&n.A.isAgency&&!n.A.isEnhancedRecruiter?void 0:0},children:(0,H.jsx)("div",{className:P.resetBackgroundContainer,children:(0,H.jsxs)(z,{areTabsResponsive:pe,value:"respondents"===ae&&F,children:[n.A.videoSurvey&&(0,H.jsx)(q,{href:"/project/".concat(D,"/videoSurvey"),label:(0,Z.t)("navPreWork","PRE-WORK"),onClick:this.stopPropagation,value:"pre_work"}),!(n.A.isByo&&n.A.isAgency)&&(0,H.jsx)(q,{href:"/project/".concat(D,"/screener"),label:(0,Z.t)("navScreener","SCREENER"),onClick:this.stopPropagation,value:"screener"}),(n.A.asyncLive||n.A.oprOnly||n.A.asyncOnly||_.mU)&&(0,H.jsx)(q,{href:"/project/".concat(D,"/selfCaptures"),label:(0,Z.t)("navSelfPacedActivities","SELF-PACED ACTIVITIES"),onClick:this.stopPropagation,value:"self_captures"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/").concat(se?"respondentHub":"candidates"),label:se?(0,Z.t)("navRespondentHub","RESPONDENT HUB"):(0,Z.t)("navCandidates","CANDIDATES"),onClick:this.stopPropagation,value:"candidates"}),se&&(0,H.jsx)(q,{href:"/project/".concat(D,"/disposition"),label:(0,Z.t)("navCompletedInterviews","COMPLETED INTERVIEWS"),onClick:this.stopPropagation,value:"disposition"}),(0,H.jsx)(q,{value:"none",style:{display:"none"}})]})})}),(0,H.jsx)(B.A,{direction:"down",in:ue,style:{height:0},children:(0,H.jsx)("div",{className:P.resetWhiteBackgroundContainer,children:(0,H.jsxs)(z,{areTabsResponsive:pe,value:"interview_prep"===ae&&F,children:[(0,H.jsx)(q,{href:"/project/".concat(D,"/discussionGuide"),label:(0,Z.t)("navDiscussionGuide","Discussion Guide"),onClick:this.stopPropagation,value:"discussion_guide"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/polls"),label:(0,Z.t)("navPolls","Polls"),onClick:this.stopPropagation,value:"polls"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/takeaways"),label:(0,Z.t)("navTakeaways","TAKEAWAYS"),onClick:this.stopPropagation,value:"takeaways"}),(0,H.jsx)(q,{value:"none",style:{display:"none"}})]})})}),(0,H.jsx)(B.A,{direction:"down",in:xe&&!n.A.isProjectViewer,style:{height:J?0:void 0},children:(0,H.jsx)("div",{className:P.resetBackgroundContainer,children:(0,H.jsxs)(z,{areTabsResponsive:pe,value:"insights"===ae&&F,children:[_.tj&&n.A.summarizationEnabled&&(0,H.jsx)(q,{href:"/project/".concat(D,"/summary"),label:(0,Z.t)("navSummary","SUMMARY"),onClick:this.stopPropagation,value:"summary"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/recordings"),label:(0,Z.t)("navRecordings","RECORDINGS"),onClick:this.stopPropagation,value:"recordings",lightersubtab:"true"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/highlightReels"),label:(0,Z.t)("navHighlightReels","HIGHLIGHT REELS"),onClick:this.stopPropagation,value:"highlightReels"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/tagInsights"),label:(0,Z.t)("navTags","TAGS"),onClick:this.stopPropagation,value:"tagInsights"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/pollResults"),label:(0,Z.t)("navPollResults","Poll Results"),onClick:this.stopPropagation,value:"pollResults"}),!_.tj&&n.A.summarizationEnabled&&(0,H.jsx)(q,{href:"/project/".concat(D,"/summary"),label:(0,Z.t)("navSummary","SUMMARY"),onClick:this.stopPropagation,value:"summary"}),(0,H.jsx)(q,{value:"none",style:{display:"none"}})]})})}),n.A.isProjectViewer&&!window.location.pathname.includes("/account")&&(0,H.jsx)(B.A,{direction:"down",in:!0,style:{height:void 0}
1,children:(0,H.jsx)("div",{className:P.resetBackgroundContainer,children:(0,H.jsxs)(z,{areTabsResponsive:pe,value:F,children:[(0,H.jsx)(q,{href:"/project/".concat(D,"/recordings"),label:(0,Z.t)("navRecordings","RECORDINGS"),onClick:this.stopPropagation,value:"recordings",lightersubtab:"true"}),(n.A.asyncLive||n.A.oprOnly||n.A.asyncOnly)&&(0,H.jsx)(q,{href:"/project/".concat(D,"/selfCaptures"),label:(0,Z.t)("navSelfPacedActivities","SELF-PACED ACTIVITIES"),onClick:this.stopPropagation,value:"self_captures"}),(0,H.jsx)(q,{href:"/project/".concat(D,"/highlightReels"),label:(0,Z.t)("navHighlightReels","HIGHLIGHT REELS"),onClick:this.stopPropagation,value:"highlightReels"}),(0,H.jsx)(q,{value:"none",style:{display:"none"}})]})})})]}),(0,H.jsx)("div",{className:l()({[P.emptySpaceIn]:me,[P.emptySpaceOut]:!me}),style:{height:me?ie:0}}),(0,H.jsx)(V.A,{open:this.state.errorSnackbarOpen,content:(0,Z.t)("navCouldNotCreateProject","Could not create project. Please try again..."),onClose:()=>this.setState({errorSnackbarOpen:!1})})]})}}Y.defaultProps={avatarUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAIAAABLixI0AAAAA3NCSVQICAjb4U/gAAAACXBIWXMAAAsSAAALEgHS3X78AAAEEXRFWHRYTUw6Y29tLmFkb2JlLnhtcAA8P3hwYWNrZXQgYmVnaW49IiAgICIgaWQ9Ilc1TTBNcENlaGlIenJlU3pOVGN6a2M5ZCI/Pgo8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJBZG9iZSBYTVAgQ29yZSA0LjEtYzAzNCA0Ni4yNzI5NzYsIFNhdCBKYW4gMjcgMjAwNyAyMjozNzozNyAgICAgICAgIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6eGFwPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIj4KICAgICAgICAgPHhhcDpDcmVhdG9yVG9vbD5BZG9iZSBGaXJld29ya3MgQ1MzPC94YXA6Q3JlYXRvclRvb2w+CiAgICAgICAgIDx4YXA6Q3JlYXRlRGF0ZT4yMDE3LTAyLTEyVDIzOjM2OjAzWjwveGFwOkNyZWF0ZURhdGU+CiAgICAgICAgIDx4YXA6TW9kaWZ5RGF0ZT4yMDE3LTAyLTEzVDIzOjM1OjA1WjwveGFwOk1vZGlmeURhdGU+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgogICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3BuZzwvZGM6Zm9ybWF0PgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICDbDq4sAAAAFnRFWHRDcmVhdGlvbiBUaW1lADAyLzEzLzE3IejU9QAAABh0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzT7MfTgAAAbNJREFUOI2tlN3SojAMhptS5acWHfQEvP+b8UI8khkEBkGaZA/6reNCcdkdc8T058n7JqFwuVzEl0J+C/Rllvq8TUTMLISA3/E/LIdI0zSKIiHEMAxt2yKilItW/CxmBoA8z7XWr8Usy67Xa9/3QRB4b/mTAEBRFFprfAulVFEUcRwT0VoWIu73ewd6XycipVSe50EQuAr8nQUAWmtvciLabDbGGO+uhyWlXMoshGBm141VLGZeqshLuHc4PCwi6vt+qfcA8Hw+19YrCIIoipakOY/eTH5dbr68LIdbq0sI0TTNB49t23q3/H2s6/p+v8+lAUBVVXVdr/XooizLuREiKstyyf6iEUS01r5fk1KO40hE/8ZyEiYsIYS19sPo+WcVEQFgMv3MrJQCgNejNok/3hyXUymltT4cDtvtdsIKw/B8PldVNQzDOI4A8N4E9aIAwG63M8bEcayU8v5JzJwkSZIkiNh1XdM0XdcxsyMqd0JrfTqdwjB0czh5bebapZTGmDRN+76/3W6PxwMAfhQej8cwDBFxqRZzgUSEiHEcZ1nmrvx4HMdRSrmGMpdprXXfvwDQjxtpLhDKxAAAAABJRU5ErkJggg==",firstName:"",hideProjectName:!1,hideTabs:!1,projectName:"",selectedTab:!1,logoOnly:!1,theme:null,isByo:n.A.isByo};const J=(0,P.Ay)()((0,c.A)((e=>({paper:{borderRadius:"4px !important","& .MuiMenu-list":{paddingTop:0,paddingBottom:0}},circular:{borderRadius:"50% !important"},logoPadding:{padding:"8px 8px 8px 0"},clickable:{"&:not(:hover)":{opacity:.8},"&:hover":{opacity:1}},notclickable:{opacity:.8},dioIcon:{width:"auto",height:42},dioIconWithLogo:{"@media(max-width: 650px)":{display:"none"}},dioIconWithoutLogo:{"@media(min-width: 651px)":{display:"none"}},appBarLogo:{color:"white",fontSize:30,opacity:.8},appBarChevron:{marginLeft:-12},projectsMenu:{display:"flex",alignItems:"center",flexWrap:"wrap"},projectsMenuLabel:{marginRight:8},projectsSelectRoot:{color:"white","& svg":{color:"white"},lineHeight:"22px"},appBarContainerContainer:{paddingLeft:12,paddingRight:12,"@media (max-width: 600px)":{paddingLeft:0,paddingRight:0}},inheritHeight:{height:"inherit"},appBarContainer:{flexGrow:1}
1,leftContainer:{overflow:"hidden",whiteSpace:"nowrap",flexGrow:1},plainFlexContainer:{flexWrap:"nowrap"},plainFlexItem:{maxWidth:"unset",flexBasis:"unset",width:"unset"},projectName:{fontSize:16,opacity:.8},newProjectContainer:{marginRight:10,"& a":{color:"white",fontSize:14,whiteSpace:"nowrap","& svg":{marginRight:4}},"&:hover":{"& a":{opacity:1,"& svg":{opacity:1}}}},adminMenuIconContainer:{alignItems:"center",display:"flex",fontSize:16,height:48,padding:"0 6px"},meetingTrackerLink:{color:"white","&:not(:hover)":{"& svg":{opacity:.8}},"&:hover":{"& svg":{opacity:1}}},avatar:{height:25,opacity:"1 !important",width:25,borderRadius:"50% !important"},avatarButtonContainer:{marginLeft:10},avatarButton:{color:"white","&:not(:hover)":{"& svg":{opacity:.8}},"&:hover":{"& svg":{opacity:1}},"@media (max-width: 600px)":{paddingRight:0}},avatarName:{fontSize:14,marginLeft:8,marginRight:24,textTransform:"capitalize",whiteSpace:"nowrap","&:not(:hover)":{opacity:.8},"&:hover":{opacity:1}},tab:{textDecoration:"none !important",fontSize:15,fontWeight:500,letterSpacing:"0.0625em",transition:"background-color 225ms cubic-bezier(0.4, 0, 1, 1), color 225ms cubic-bezier(0.4, 0, 1, 1), opacity 95ms cubic-bezier(0.4, 0, 1, 1)",width:"auto",padding:"12px 50px","&:hover":{color:"inherit",opacity:1},"&:focus":{color:"inherit",opacity:1}},tabSelected:{fontWeight:600,"&:hover":{color:"inherit"},"&:focus":{color:"inherit"}},tabSelectedWithSubtabs:{backgroundColor:M,color:"white",opacity:1,transition:"background-color 195ms cubic-bezier(0.4, 0, 1, 1), color 195ms cubic-bezier(0.4, 0, 1, 1)"},mainTabsSubTabSelected:{backgroundColor:"inherit"},tabIndicator:{height:5},tabLabelWithCaret:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap"},tabCaret:{flexShrink:0,marginTop:-4},hideWhenXs:{"@media (max-width: 600px)":{display:"none"}},menuText:{fontSize:14,fontWeight:400,paddingLeft:8,"&:hover":{backgroundColor:e.palette.primary.main,color:"white","& span":{color:"white"}},"& svg":{marginRight:6}},trainingMenuText:{display:"flex",alignItems:"flex-start",justifyContent:"center",flexDirection:"column","& span":{marginLeft:30,fontSize:12,lineHeight:"14px",fontWeight:400,color:e.palette.text.disabled,display:"inline-flex",alignItems:"center"},"& div":{display:"inline-flex",alignItems:"center"},"& span svg":{height:14}},resetBackgroundContainer:{backgroundColor:"#ECECEC",zIndex:0},resetWhiteBackgroundContainer:{backgroundColor:"#FAFAFA",zIndex:0},shadow:{boxShadow:"0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12)"},appBarInner:{backgroundColor:e.palette.header,height:"inherit",zIndex:1},boxShadowTransition:{transition:"box-shadow 225ms cubic-bezier(0.4, 0, 1, 1)"},creditsRemaining:{alignItems:"center",display:"flex"},creditBalance:{color:e.palette.secondary.main,fontSize:16,fontWeight:600,lineHeight:"19px",margin:"0 16px",whiteSpace:"nowrap"},settingsButtonWrapper:{display:"flex"},settingsButtonUnderlinedWrapper:{borderBottom:"5px solid ".concat(e.palette.secondary.main),"& a":{marginBottom:-5}},settingsButtonRoot:{borderRadius:"4px !important",color:"rgba(255, 255, 255, 0.8)",fontSize:14,textTransform:"none","& svg":{fontSize:18,marginRight:4}},scrollButtonRoot:{borderRadius:"50% !important"},emptySpaceIn:{transition:"height 225ms cubic-bezier(0.4, 0, 1, 1)"},emptySpaceOut:{transition:"height 195ms cubic-bezier(0.0, 0, 0.2, 1)"}})),{withTheme:!0})(Y)),K=n.A.isStandard?s.A:J},46902(e,t,i){i.d(t,{A:()=>S});var n=i(9950),s=i(76463),o=i(16243),r=i(60899),a=i(57073),l=i(70693),c=i(51264),d=i(37311),p=i(45092),h=i(3199),u=i(97543),x=i(81532),m=i(73952),g=i(88060),A=i(48738),v=i.n(A),y=i(44414);const j=JSON.parse(o.A.translatedStrings),b=(0,c.A)((e=>({paper:{flexGrow:1,margin:"-8px auto 68px"},paperHeader:{backgroundColor:(0,x.X4)(m.A[100],.24),borderBottom:"1px solid ".concat(e.palette.divider),fontSize:24,lineHeight:"32px",padding:"26px 24px 16px 24px"},paperBodyContainer:{padding:24},paperBodyText:{fontSize:19,lineHeight:"28px"},timeButton:{marginTop:20,width:224},noneButton:{marginTop:104},timeHeader:{fontSize:16,lineHeight:"24px",textAlign:"left",width:"100%","@media (min-width: 420px)":{textAlign:"center"}},dayContainer:{marginTop:52,textAlign:"center",width:"100%"},bottomBar:{backgroundColor:"#eaedef",borderTop:"1px solid rgba(48, 48, 48, 0.12)",bottom:0,height:68,paddingRight:16,top:"auto","& > div":{height:"100%"},"& button":{width:103}}
1,previewModeButton:{cursor:"default",pointerEvents:"none"}})))((e=>{let t=e.classes,i=e.noneOfTheseClicked,s=e.onFinishClicked,o=e.onNoneClicked,a=e.onTimeClicked,c=e.selectedSessionIds,p=e.upcomingSessions,h=e.previewMode;const x=h?-1:void 0;return(0,y.jsxs)(n.Fragment,{children:[(0,y.jsx)(l.A,{className:t.paper,children:(0,y.jsxs)(r.Ay,{container:!0,direction:"column",children:[(0,y.jsx)(r.Ay,{item:!0,className:t.paperHeader,children:j.studyQualification}),(0,y.jsxs)(r.Ay,{item:!0,alignItems:"center",className:t.paperBodyContainer,container:!0,direction:"column",children:[(0,y.jsx)(r.Ay,{item:!0,children:(0,y.jsx)(d.A,{activeStep:3})}),(0,y.jsx)(r.Ay,{item:!0,className:t.paperBodyText,children:"Please select all the dates & times for when you are available for this study."}),(!p||0===p.length)&&(0,y.jsx)(r.Ay,{item:!0,children:(0,y.jsx)(u.A,{className:v()(t.timeButton,t.noneButton,{[t.previewModeButton]:h}),text:j.noneOfThese,variant:i?"contained":"outlined",color:"secondary",onClick:o,tabIndex:x})}),p&&p.map((e=>"noneOfThese"===e?(0,y.jsx)(r.Ay,{item:!0,children:(0,y.jsx)(u.A,{className:v()(t.timeButton,t.noneButton,{[t.previewModeButton]:h}),tabIndex:x,text:j.noneOfThese,variant:i?"contained":"outlined",color:"secondary",onClick:o})},"noneOfThese"):(0,y.jsxs)("div",{className:t.dayContainer,children:[(0,y.jsxs)("div",{className:t.timeHeader,children:[e[0].dayOfWeek,", ",e[0].date]}),e.map((e=>(0,y.jsx)(u.A,{className:v()(t.timeButton,{[t.previewModeButton]:h}),tabIndex:x,text:e.time,variant:c.includes(e.id)?"contained":"outlined",color:"primary",onClick:a(e.id)},e.id)))]},e[0].date)))]})]})}),(0,y.jsx)(g.A,{elevation:0,className:t.bottomBar,position:"fixed",children:(0,y.jsx)(r.Ay,{container:!0,justifyContent:"flex-end",alignItems:"center",children:(0,y.jsx)(r.Ay,{item:!0,children:(0,y.jsx)(u.A,{color:"primary",disabled:0===c.length&&!i,onClick:s,text:"Finish",variant:"contained"})})})})]})})),C=JSON.parse(o.A.translatedStrings);class f extends n.Component{constructor(){super(...arguments),this.state={isLoading:!0,upcomingSessions:[],selectedSessionIds:[],pagination:0,noneOfTheseClicked:!1,isResponsive:document.body.clientWidth<1024,redirectUrl:"/recruiting/thankyou"},this.handleScreenResize=()=>{!this.state.isResponsive&&document.body.clientWidth<1024?this.setState({isResponsive:!0}):this.state.isResponsive&&document.body.clientWidth>=1024&&this.setState({isResponsive:!1})},this.componentDidMount=async()=>{if(window.addEventListener("resize",this.handleScreenResize),this.props.previewMode)return void this.setState({upcomingSessions:[[{id:1,dayOfWeek:"Wednesday",date:"Decemember 4, 2019",time:"7:00-8:00pm PST"},{id:2,dayOfWeek:"Wednesday",date:"Decemember 4, 2019",time:"8:00-9:00pm PST"}],[{id:3,dayOfWeek:"Thursday",date:"Decemember 5, 2019",time:"3:00-4:00pm PST"},{id:4,dayOfWeek:"Thursday",date:"Decemember 5, 2019",time:"4:00-5:00pm PST"}],"noneOfThese"],isLoading:!1});const e=await s.A.postRequest("/ajax/recruit/".concat(o.A.recruitId,"/upcomingSessions"),{surveyId:o.A.videoSurveyId}),t=e.upcomingSessions,i=e.selectedSessionIds,n=e.redirectUrl;t.length>0?(t.push("noneOfThese"),this.setState({upcomingSessions:t,selectedSessionIds:i,isLoading:!1,redirectUrl:n})):window.location.href=n},this.handleTimeClicked=e=>()=>{const t=this.state,i=t.selectedSessionIds,n=t.noneOfTheseClicked;i.includes(e)?this.setState({selectedSessionIds:i.filter((t=>t!==e))}):this.setState({selectedSessionIds:[...this.state.selectedSessionIds,e]}),n&&this.setState({noneOfTheseClicked:!1})},this.handleNoneOfTheseClick=()=>{this.setState({selectedSessionIds:[],noneOfTheseClicked:!this.state.noneOfTheseClicked})},this.handleFinishClick=async()=>{try{await s.A.postRequest("/ajax/recruit/".concat(o.A.recruitId,"/setAvailabilities"),{discussionIds:this.state.selectedSessionIds}),window.location.href=this.state.redirectUrl}catch(e){console.error(e),window.location.href="/recruiting/error"}},this.handleNextClick=()=>{this.setState({pagination:this.state.pagination+1})},this.handlePreviousClick=()=>{this.setState({pagination:this.state.pagination-1})}}componentWillUnmount(){window.removeEventListener("resize",this.handleScreenResize)}render(){const e=this.props.classes,t=this.state,i=t.upcomingSessions,s=t.selectedSessionIds,o=t.pagination,c=t.noneOfTheseClicked,x=t.isLoading;if(t.isResponsive&&!x)return(0,y.jsx)(b,{noneOfTheseClicked:c,onFinishClicked:this.handleFinishClick,onNoneClicked:this.handleNoneOfTheseClick,onTimeClicked:this.handleTimeClicked,selectedSessionIds:s,upcomingSessions:i,previewMode:this.props.previewMode});const m=this.props.previewMode?-1:void 0;return!x&&(0,y.jsxs)(l.A,{className:v()(e.paper,{[e.paperMargin]:!this.props.previewMode}),children:[(0,y.jsx)("div",{className:e.paperHeader,children:C.studyQualification}),(0,y.jsx)("div",{className:e.paperBody,children:(0,y.jsxs)(r.Ay,{container:!0,alignItems:"center",justifyContent:"center",children:[(0,y.jsx)(r.Ay,{item:!0,xs:12,className:e.steppersWrapper,children:(0,y.jsx)(d.A,{activeStep:3})}),(0,y.jsx)(r.Ay,{item:!0,xs:12,className:e.paperBodyText,children:C.selectDatesBodyInfoText}),(0,y.jsxs)(r.Ay,{container:!0,alignItems:"flex-start",children:[(0,y.jsx)(r.Ay,{item:!0,xs:1,children:o>0&&(0,y.jsx)(a.A,{className:e.arrowIconButton,onClick:this.handlePreviousClick,children:(0,y.jsx)(p.A,{})})}),(0,y.jsx)(r.Ay,{item:!0,xs:10,children:(0,y.jsx)(r.Ay,{container:!0,alignItems:"flex-start",justifyContent:"center",children:i.slice(4*o,4*o+4).map(((t,i)=>(0,y.jsx)(n.Fragment,{children:"noneOfThese"===t?(0,y.jsx)(r.Ay,{item:!0,xs:3,children:(0,y.jsx)(u.A,{className:v()(e.timeButton,e.noneOfTheseButton,{[e.previewModeButtons]:this.props.previewMode}),text:C.noneOfThese,variant:c?"contained":"outlined",color:"secondary",onClick:this.handleNoneOfTheseClick,tabIndex:m})}):(0,y.jsxs)(r.Ay,{item:!0,xs:3,children:[(0,y.jsxs)("div",{className:e.timeHeader,children:[t[0].dayOfWeek,(0,y.jsx)("br",{}),t[0].date]}),t.map((t=>(0,y.jsx)(u.A,{className:v()(e.timeButton,{[e.previewModeButtons]:this.props.previewMode}),text:t.time,variant:s.includes(t.id)?"contained":"outlined",color:"primary",onClick:this.handleTimeClicked(t.id),tabIndex:m},t.id)))]})},i)))})}),(0,y.jsx)(r.Ay,{item:!0,xs:1,children:o<Math.floor((i.length-1)/4)&&(0,y.jsx)(a.A,{className:e.arrowIconButton,onClick:this.handleNextClick,children:(0,y.jsx)(h.A,{})})})]})]})}),(0,y.jsx)("div",{className:e.paperFooter,children:(0,y.jsx)(r.Ay,{container:!0,justifyContent:"flex-end",children:(0,y.jsx)(r.Ay,{item:!0,children:(0,y.jsx)(u.A,{text:C.finish,variant:"contained",color:"primary",disabled:0===s.length&&!c,onClick:this.handleFinishClick})})})})]})}}const S=(0,c.A)((e=>({paper:{borderRadius:"4px !important",height:"100%",maxWidth:1e3},paperMargin:{margin:"72px auto 0"},paperHeader:{padding:"26px 24px 16px 24px",fontSize:24,lineHeight:"32px",backgroundColor:(0,x.X4)(m.A[100],.24),borderBottom:"1px solid ".concat(e.palette.divider)},paperBody:{padding:"24px 24px 51px 24px"},paperFooter:{padding:16,backgroundColor:(0,x.X4)(m.A[100],.24),borderTop:"1px solid ".concat(e.palette.divider),"& button":{width:103}},paperBodyText:{marginBottom:24,textAlign:"center",fontSize:19,lineHeight:"28px"},timeHeader:{fontSize:16,lineHeight:"24px",textAlign:"center",marginBottom:16},timeButton:{width:190,marginBottom:16},noneOfTheseButton:{marginTop:64},steppersWrapper:{marginBottom:16},arrowIconButton:{borderRadius:"50% !important"},previewModeButtons:{pointerEvents:"none",cursor:"default"}})))(f)},51996(e,t,i){i.d(t,{A:()=>r});var n=i(9950),s=i(9556),o=i(44414);class r extends n.Component{constructor(){super(...arguments),this.state={showSnackbar:!1},this.handleCopy=async e=>{await window.navigator.clipboard.writeText(e),this.setState({showSnackbar:!0}),this.props.onAfterCopy&&this.props.onAfterCopy()},this.handleClose=()=>{this.setState({showSnackbar:!1})}}render(){const e=this.state.showSnackbar,t=this.props,i=t.children,r=t.clipboardContent,a=t.snackbarContent,l=void 0===a?null:a;return(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)("span",{onClick:()=>this.handleCopy(r),children:i}),l&&(0,o.jsx)(s.A,{content:l,open:e,onClose:this.handleClose})]})}}},53786(e,t,i){i.d(t,{A:()=>a});var n=i(89379),s=i(9950),o=i(76529),r=i(44414);const a=e=>t=>{const i=(s,a)=>{const l=e[s];if(l){const e=o.h[l];return(0,r.jsx)(e.Consumer,{children:e=>{const t=(0,n.A)((0,n.A)({},a),{},{[l]:e});return i(s+1,t)}})}return(0,r.jsx)(t,(0,n.A)({},a))};return class extends s.Component{render(){return i(0,this.props)}}}},54408(e,t,i){i.d(t,{A:()=>x});var n=i(9950),s=i(51264),o=i(48738),r=i.n(o),a=i(58531),l=i(18216),c=i(81532),d=i(51996),p=i(26213),h=i(44414);class u extends n.Component{constructor(){super(...arguments),this.anchorRef=n.createRef(),this.state={clicked:!1,hovering:!1,width:"auto"},this.handleClicked=()=>{this.setState({clicked:!0}),setTimeout((()=>{this.setState({clicked:!1})}),3e3)}}componentDidMount(){const e=this.props.width;this.setState({width:e||this.anchorRef.current.offsetWidth})}render(){const e=this.props,t=e.anchorElId,i=void 0===t?null:t,n=e.classes,s=e.label,o=e.url,c=e.hideIcon,u=e.customIcon,x=e.linkLabel,m=void 0===x?"Link":x,g=e.disabled,A=void 0!==g&&g,v=u||(0,h.jsx)(a.A,{className:n.linkIcon});return(0,h.jsx)(d.A,{anchorElId:i,document:window.document,clipboardContent:o,children:(0,h.jsx)("div",{ref:this.anchorRef,style:{width:this.state.width},children:(0,h.jsxs)(l.A,{disabled:A,className:r()(n.link,{[n.idle]:!this.state.hovering&&!this.state.clicked},{[n.hovering]:this.state.hovering&&!this.state.clicked},{[n.clicked]:this.state.clicked}),classes:{root:n.root},onClick:this.handleClicked,onMouseEnter:()=>this.setState({hovering:!0}),onMouseLeave:()=>this.setState({hovering:!1}),component:"a",children:[!c&&v,this.state.clicked?(0,p.t)("copyLinkCopied","%s Copied!").replace("%s",m):this.state.hovering?(0,p.t)("copyLinkCopy","Copy %s").replace("%s",m):s]})})})}}const x=(0,s.A)((e=>({linkIcon:{color:"inherit",marginRight:4},idle:{color:e.palette.primary.main},hovering:{color:"white !important",cursor:"pointer",fontStyle:"italic"},clicked:{backgroundColor:e.palette.action.active,color:"white",cursor:"default",fontStyle:"italic",pointerEvents:"none"},link:{fontSize:"inherit",width:"100%",textTransform:"none",whiteSpace:"nowrap","&:hover":{backgroundColor:(0,c.X4)(e.palette.primary.main,.38)}},root:{borderRadius:"4px !important",fontSize:16}}
1)),{withTheme:!0})(u)},57561(e,t,i){i.d(t,{G:()=>a});var n=i(83274),s=i(16243),o=i(26213),r=i(44414);const a=e=>{let t=e.children;return s.A.asyncOnly||s.A.oprOnly?(0,r.jsx)(n.A,{title:(0,o.t)("scContactUsEnableLiveInterviews","Contact us to enable Live Interviews"),children:(0,r.jsx)("span",{children:t})}):(0,r.jsx)(r.Fragment,{children:t})}},60786(e,t,i){i.d(t,{A:()=>r});var n=i(89379),s=i(9950),o=i(44414);const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{breakpoint:590};return class extends s.Component{constructor(){super(...arguments),this.state={isBelowBreakpoint:window.document.body.clientWidth<t.breakpoint},this.handleWindowResize=()=>{const e=window.document.body.clientWidth<t.breakpoint;this.state.isBelowBreakpoint!==e&&this.setState({isBelowBreakpoint:e})}}componentDidMount(){window.addEventListener("resize",this.handleWindowResize)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize)}render(){return(0,o.jsx)(e,(0,n.A)({isBelowBreakpoint:this.state.isBelowBreakpoint},this.props))}}}},66517(e,t,i){i.d(t,{A:()=>a});var n=i(89379),s=i(9950),o=i(44414);const r=(e,t)=>{let i=null;return i=e<t.xs?"xs":e<t.sm?"sm":e<t.md?"md":e<t.lg?"lg":"xl",i},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{xs:600,sm:960,md:1280,lg:1920};return class extends s.Component{constructor(){super(...arguments),this.state={breakpoint:r(window.innerWidth,t)},this.handleWindowResize=e=>{const i=r(e.target.innerWidth,t);this.state.breakpoint!==i&&this.setState({breakpoint:i})}}componentDidMount(){window.addEventListener("resize",this.handleWindowResize)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize)}render(){return(0,o.jsx)(e,(0,n.A)({breakpoint:this.state.breakpoint},this.props))}}}},72985(e,t,i){i.r(t),i.d(t,{default:()=>ui});var n=i(16243),s=i(45823),o=i(5544),r=i(89379),a=i(9950),l=i(11942),c=i.n(l),d=i(48738),p=i.n(d),h=i(88060),u=i(51264),x=i(18216),m=i(57073),g=i(96583),A=i(48205),v=i(83239),y=i(60899),j=i(82053),b=i(25979),C=i(40033),f=i(28170),S=i(79739),w=i(6493),I=i(74616),T=i(45546),R=i(46986),k=i(8145),N=i(99532),B=i(96319),P=i(8808),E=i(18726),L=i(57988),O=i(70006),W=i(23266),H=i(46639),D=i(81532),M=i(63750),z=i(72674),F=i(76463),q=i(70693),V=i(80504),Q=i(42852),U=i(80561),G=i.n(U),X=i(53786),_=i(80045),Z=i(44414);const Y=["children","classes","styles"],J=(0,u.A)((e=>({selectRoot:{fontSize:14,maxWidth:326},selectMenu:{borderRadius:"4px !important",paddingLeft:6,transition:"background-color 150ms","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.05)"}},selectMenuListRoot:{padding:0}})),{withTheme:!0})((e=>{let t=e.children,i=e.classes,n=e.styles,s=void 0===n?{}:n,o=(0,_.A)(e,Y);return(0,Z.jsx)(O.A,(0,r.A)((0,r.A)({classes:(0,r.A)((0,r.A)({},s),{},{root:"".concat(i.selectRoot," ").concat(s.root||""),select:"".concat(i.selectMenu," ").concat(s.selectMenu||"")}),disableUnderline:!0,MenuProps:{MenuListProps:{classes:{root:i.selectMenuListRoot}}}},o),{},{children:t}))})),K=J,$=["children","classes"],ee=(0,u.A)((e=>({menuListItemRoot:{fontSize:14,padding:"6px 12px",maxWidth:326,"&:hover":{color:e.palette.primary.main}}})),{withTheme:!0})((e=>{let t=e.children,i=e.classes,n=(0,_.A)(e,$);return(0,Z.jsx)(W.A,(0,r.A)((0,r.A)({classes:{root:i.menuListItemRoot}},n),{},{children:t}))}));var te=i(22394),ie=i(2541),ne=i(26213);const se=(0,X.A)(["screenerEditorContext"])((0,u.A)((e=>({root:{backgroundColor:e.palette.background.paper,borderRadius:4},contentWrapper:{alignItems:"center",flexGrow:1,padding:"3px 0","& svg":{color:e.palette.text.secondary,height:20},height:36},dragIndicator:{color:e.palette.text.secondary,fontSize:30},textFieldWrapper:{flexGrow:1,marginLeft:8,marginRight:16,display:"flex",alignItems:"center"},menuListItemRoot:{fontSize:14,padding:"6px 12px",maxWidth:326,"&:hover":{color:e.palette.primary.main}},menuListSkipItemRoot:{maxHeight:40,height:"100%",display:"flex",flexDirection:"column",alignItems:"flex-start"},selectWrapper:{marginTop:-4},selectRoot:{fontSize:14,maxWidth:326},selectInput:{borderRadius:"4px !important",paddingLeft:6,transition:"background-color 150ms","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.05)"}},selectMenuListRoot:{padding:0},deleteButton:{marginLeft:24,marginTop:-3,padding:4,"& svg":{color:e.palette.text.disabled}},dragIndicatorWrapper:{"& svg":{transition:"color 200ms"}},dragLine:{borderTopLeftRadius:4,borderBottomLeftRadius:4,backgroundColor:e.palette.tert
1iary.main,transition:"opacity 200ms",width:4},skipQuestionContent:{textOverflow:"ellipsis",overflow:"hidden",color:e.palette.text.disabled,maxWidth:326},notShown:{display:"none"},otherLabel:{color:e.palette.text.primary,fontSize:14,marginLeft:10},textboxWrapper:{alignItems:"center",backgroundColor:"rgba(48, 48, 48, 0.08)",borderRadius:4,display:"flex",height:28,marginLeft:12,width:"100%","& > div":{color:"rgba(48, 48, 48, 0.38)",fontSize:12,fontStyle:"italic",marginLeft:12}},readOnly:{pointerEvents:"none"},draggingIndicator:{color:e.palette.tertiary.main}})),{withTheme:!0})((e=>{let t=e.classes,i=e.dragHandleProps,n=void 0===i?{}:i,s=e.questionKey,l=e.optionKey,c=e.content,d=e.type,h=void 0===d?"RADIO":d,u=e.screenerEditorContext,x=e.dragging,g=e.onPointerUp,A=void 0===g?()=>{}:g,v=e.onPointerDown,j=void 0===v?()=>{}:v,b=e.questionNumberOffset,C=void 0===b?0:b;const f=u.handleUpdateOptionText,S=u.handleUpdateOptionType,w=u.handleDeleteOption,I=u.handleSave,T=u.screener,R=u.isReadOnlyMode,k=Object.values(T.sections).find((e=>e.questions.includes(s))),N=k.questions.findIndex((e=>e===s)),B=k.questions.map(((e,t)=>C+t)).slice(N+1),P=k.questions.slice(N+1).map(((e,t)=>({questionKey:e,index:B[t]}))),E=(0,a.useState)(!1),O=(0,o.A)(E,2),H=O[0],D=O[1],M=(T.questions[s].logic||{})[l],z=M?"skip"===M.type?M.skipToQuestionKey:M.type:"none",F="other"===T.options[l].type,q=R();return(0,Z.jsxs)(y.Ay,{className:t.root,container:!0,wrap:"nowrap",style:{marginBottom:8},children:[(0,Z.jsx)(y.Ay,{item:!0,className:t.dragLine,style:{opacity:x?1:0}}),(0,Z.jsx)(y.Ay,(0,r.A)((0,r.A)({item:!0,onPointerDown:j,onPointerUp:A,className:p()({[t.dragIndicatorWrapper]:x})},n),{},{children:!q&&(0,Z.jsx)(V.A,{className:p()(t.dragIndicator,{[t.draggingIndicator]:x})})})),(0,Z.jsxs)(y.Ay,{className:t.contentWrapper,container:!0,item:!0,wrap:"nowrap",children:[(0,Z.jsx)(y.Ay,{item:!0,children:"RADIO"===h?(0,Z.jsx)(Q.A,{}):(0,Z.jsx)(te.A,{})}),(0,Z.jsx)(y.Ay,{className:t.textFieldWrapper,item:!0,children:F?(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsx)("span",{className:t.otherLabel,children:(0,ne.t)("scrOther","Other")}),(0,Z.jsx)("div",{className:t.textboxWrapper,children:(0,Z.jsx)("div",{children:(0,ne.t)("scrTypeYourResponse","Type your response")})})]}):(0,Z.jsx)(ie.A,{placeholder:(0,ne.t)("scrTypeResponse","Type response..."),onChange:e=>f(l,e.target.value),onSubmit:I,value:c,isReadOnly:q})}),(0,Z.jsx)(y.Ay,{className:t.selectWrapper,item:!0,children:(0,Z.jsxs)(K,{onChange:e=>{const t=e.target.value;t.startsWith("question-")?S(s,l,"skip",t):S(s,l,t,null)},open:!q&&H,onOpen:()=>D(!0),onClose:()=>D(!1),value:z,className:p()({[t.readOnly]:q}),children:[(0,Z.jsx)(ee,{value:"none",children:(0,ne.t)("scrMaySelect","May Select")}),(0,Z.jsx)(ee,{value:"terminate",children:(0,ne.t)("scrTerminateIfSelected","Terminate if selected")}),"CHECKBOX"===h&&(0,Z.jsx)(ee,{value:"required",children:(0,ne.t)("scrRequiredTerminate","Required (terminate if NOT selected)")}),P.map((e=>{let i=e.questionKey,n=e.index;const s=T.questions[i];return(0,Z.jsxs)(W.A,{classes:{root:"".concat(t.menuListItemRoot," ").concat(t.menuListSkipItemRoot)},value:i,children:[(0,Z.jsx)("div",{children:(0,ne.t)("scrIfSelectedShowQuestion","If selected, show Question %s").replace("%s",String(n+1))}),(0,Z.jsx)("div",{className:p()(t.skipQuestionContent,{[t.notShown]:!H}),children:s.content})]},i)}))]})}),(0,Z.jsx)(y.Ay,{item:!0,children:!q&&(0,Z.jsx)(m.A,{classes:{root:t.deleteButton},onClick:()=>w(l),children:(0,Z.jsx)(L.A,{})})})]})]})})));var oe=i(26093),re=i(3364);class ae extends a.Component{render(){const e=this.props,t=e.classes,i=e.screenerEditorContext,n=e.questionKey,s=e.sourceQuestionIndices,o=e.handleNavigateToQuestion,l=e.questionNumberOffset,c=e.relativeIndex,d=i.screener,h=i.handleSave,u=i.handleTableRowReorder,g=i.handleUpdateOptionType,A=i.handleUpdateOptionText,v=i.handleAddTableColumn,j=i.handleDeleteTableColumn,b=i.handleAddTableRow,C=i.handleDeleteTableRow,f=i.handleDeleteQuestion,S=i.handleUpdateQuestionText,w=i.handleUpdateQuestionType,I=i.handleCreateOption,T=i.setDraggingElId,R=i.draggingElId,k=i.isDropDisabled,N=i.onOptionDragEnd,B=i.isReadOnlyMode,P=s&&G()(s),E=d.questions[n],O=d.questions[n].options.map((e=>d.options[e])),W=O.find((e=>"other"===e.type)),H=B();return(0,Z.jsxs)("div",{id:"question-index-".concat(l+c),style:{width:"100%"},children:[(0,Z.jsxs)("div",{className:t.header,children:[this.props.label," ",P&&(0,Z.jsxs)("div",{className:t.
1skipLabel,children:[(0,Z.jsx)("span",{children:(0,ne.t)("scrShownBasedOn"," \u2014 Shown based on response to ")}),P.map(((e,i)=>(0,Z.jsxs)("span",{className:t.questionLink,onClick:()=>o(e+l),children:[(0,ne.t)("scrQuestionLabel","Question %s").replace("%s",String(e+l+1)),i===P.length-1?"":", "]},"".concat(e,"-").concat(i))))]})]}),(0,Z.jsx)(q.A,{classes:{root:t.paperRoot},children:(0,Z.jsxs)(y.Ay,{container:!0,children:[(0,Z.jsxs)(y.Ay,(0,r.A)((0,r.A)({className:p()(t.dragIndicatorWrapper,{[t.draggingDragIndicatorWrapper]:this.props.dragging,[t.disabledDragIndicatorWrapper]:this.props.dragging&&k}),container:!0,onPointerDown:this.props.onPointerDown,onPointerUp:this.props.onPointerUp,item:!0},this.props.dragHandleProps),{},{children:[(0,Z.jsx)(y.Ay,{item:!0}),(0,Z.jsx)(y.Ay,{item:!0,children:!H&&(0,Z.jsx)(V.A,{className:t.dragIndicator})})]})),(0,Z.jsxs)(y.Ay,{className:t.contentWrapper,container:!0,direction:"column",item:!0,children:[(0,Z.jsx)(y.Ay,{className:t.questionWrapper,item:!0,children:(0,Z.jsx)(ie.A,{placeholder:(0,ne.t)("scrTypeYourQuestion","Type your question..."),onChange:e=>S(n,e.target.value),onSubmit:h,value:E.content,fullWidth:!0,multiline:!0,isReadOnly:H})}),(0,Z.jsxs)(y.Ay,{item:!0,container:!0,wrap:"nowrap",children:[(0,Z.jsx)(y.Ay,{item:!0,className:t.responseTypeText,children:(0,ne.t)("scrResponseType","Response Type:")}),(0,Z.jsxs)(y.Ay,{item:!0,container:!0,className:t.responseTypeContainer,children:[(0,Z.jsx)(y.Ay,{item:!0,children:(0,Z.jsx)(oe.A,{onClick:()=>w(n,"RADIO"),selected:"RADIO"===E.type,isReadOnly:H,children:(0,ne.t)("scrSingleSelect","Single Select")})}),(0,Z.jsx)(y.Ay,{item:!0,children:(0,Z.jsx)(oe.A,{onClick:()=>w(n,"CHECKBOX"),selected:"CHECKBOX"===E.type,isReadOnly:H,children:(0,ne.t)("scrMultiSelect","Multi-Select")})}),(0,Z.jsx)(y.Ay,{item:!0,children:(0,Z.jsx)(oe.A,{onClick:()=>w(n,"TABLE"),selected:"TABLE"===E.type,isReadOnly:H,children:(0,ne.t)("scrGrid","Grid")})}),(0,Z.jsx)(y.Ay,{item:!0,children:(0,Z.jsx)(oe.A,{onClick:()=>w(n,"TEXTBOX"),selected:"TEXTBOX"===E.type,isReadOnly:H,children:(0,ne.t)("scrTextResponseType","Text")})})]})]}),(0,Z.jsxs)(y.Ay,{item:!0,className:t.questionBody,children:["TEXTBOX"===E.type&&(0,Z.jsx)("div",{className:t.textboxWrapper,children:(0,Z.jsx)("div",{children:(0,ne.t)("scrTypeYourResponse","Type your response")})}),"TABLE"===E.type&&(0,Z.jsx)(M.JY,{onDragEnd:e=>u(n,e),children:(0,Z.jsxs)(y.Ay,{container:!0,direction:"column",children:[(0,Z.jsxs)(y.Ay,{className:t.tableRow,item:!0,container:!0,children:[(0,Z.jsx)(y.Ay,{item:!0,className:"".concat(t.tableSubQuestionCell," ").concat(t.tableCell)}),E.options.map(((e,i)=>(0,Z.jsx)(y.Ay,{alignItems:"flex-start",className:"".concat(t.tableOptionCell," ").concat(t.tableCell),container:!0,justifyContent:"center",item:!0,children:(0,Z.jsx)(y.Ay,{item:!0,children:(0,Z.jsx)(ie.A,{fullWidth:!1,onChange:t=>A(e,t.target.value),onSubmit:h,multiline:!0,placeholder:(0,ne.t)("scrTableColumn","Column %s").replace("%s",String(i<26?String.fromCharCode(i+65):i+1)),value:d.options[e].content,isReadOnly:H})})},e))),(0,Z.jsx)(y.Ay,{item:!0,className:t.tableCell,children:!H&&(0,Z.jsx)(re.A,{label:(0,ne.t)("scrAddColumn","Add Column"),onClick:()=>v(n)})})]}),(0,Z.jsx)(M.gL,{droppableId:n,type:"response-".concat(n),children:e=>(0,Z.jsxs)("div",(0,r.A)((0,r.A)({ref:e.innerRef},e.droppableProps),{},{children:[E.subQuestions.map(((e,i)=>(0,Z.jsx)(M.sx,{draggableId:e,index:i,isDragDisabled:H,children:s=>(0,Z.jsxs)("div",(0,r.A)((0,r.A)({className:p()(t.tableRow,{[t.tableRowDragging]:R===e})},s.draggableProps),{},{ref:s.innerRef,children:[(0,Z.jsxs)("div",(0,r.A)((0,r.A)({className:"".concat(t.tableSubQuestionCell," ").concat(t.tableCellBottomBorder," ").concat(t.tableCell),onPointerDown:()=>T(e),onPointerUp:()=>T(null)},s.dragHandleProps),{},{children:[(0,Z.jsxs)("div",{className:p()(t.dragIndicatorWrapper,{[t.draggingDragIndicatorWrapper]:R===e}),children:[(0,Z.jsx)("div",{}),!H&&(0,Z.jsx)(V.A,{className:t.tableRowDragIndicator})]}),(0,Z.jsx)(ie.A,{placeholder:(0,ne.t)("scrTableTypeRow","Type Row %s...").replace("%s",String(i+1)),onChange:t=>S(e,t.target.value),onSubmit:h,multiline:!0,value:d.questions[e].content,fullWidth:!1,isReadOnly:H})]})),d.questions[e].options.map((i=>{const n=d.questions[e].logic&&d.questions[e].logic[i]?d.questions[e].logic[i].type:"none";return(0,Z.jsxs)(y.Ay,{alignItems:"center",justifyContent:"center",className:"".concat(t.tableOptionCell," ").concat(t.tableCellBottomBorder," ").concat(t.tableCell),container:!0,direction:"column",item:!0,children:[(0,Z.jsx)(Q.A,{}),(0,Z.jsxs)(K,{onChange:t=>g(e,i,t.target.value,null),styles:{select:p()({[t.tableCellLogicHighlighted]:"terminate"===n})},value:n,className:p()({[t.readOnly]:H}),children:[(0,Z.jsx)(ee,{value:"none",children:(0,ne.t)("scrMaySelect","May Select")}),(0,Z.jsx)(ee,{value:"terminate",children:(0,ne.t)("scrTerminate","Terminate")})]})]},i)})),(0,Z.jsx)("div",{className:"".concat(t.tableCellBottomBorder," ").concat(t.tableCell),style:{textAlign:"right"},children:!H&&(0,Z.jsx)(m.A,{classes:{root:t.tableColDeleteButtonRoot},onClick:()=>C(n,e),children:(0,Z.jsx)(L.A,{})})})]}))},e))),e.placeholder]}))}),(0,Z.jsxs)(y.Ay,{className:t.tableRow,item:!0,container:!0,children:[(0,Z.jsx)(y.Ay,{item:!0,className:"".concat(t.tableSubQuestionCell," ").concat(t.tableCell)}),E.options.map((e=>(0,Z.jsx)(y.Ay,{alignItems:"center",className:"".concat(t.tableOptionCell," ").concat(t.tableCell),container:!0,justifyContent:"center",item:!0,children:(0,Z.jsx)(y.Ay,{item:!0,children:!H&&(0,Z.jsx)(m.A,{classes:{root:t.tableColDeleteButtonRoot},onClick:()=>j(n,e),children:(0,Z.jsx)(L.A,{})})})},e))),(0,Z.jsx)(y.Ay,{className:t.tableCell,item:!0})]})]})}),("RADIO"===E.type||"CHECKBOX"===E.type)&&(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsx)(M.JY,{onDragEnd:e=>N(e),children:(0,Z.jsx)(M.gL,{droppableId:n,type:"response-".concat(n),children:e=>(0,Z.jsxs)("div",(0,r.A)((0,r.A)({ref:e.innerRef},e.droppableProps),{},{children:[O.map(((e,t)=>"other"===e.type?null:(0,Z.jsx)(M.sx,{draggableId:"option-".concat(e.id),index:t,children:t=>{const i="option-".concat(e.id);return(0,Z.jsx)("div",(0,r.A)((0,r.A)({},t.draggableProps),{}
1,{ref:t.innerRef,children:(0,Z.jsx)(se,{content:e.content,dragging:i===R,dragHandleProps:t.dragHandleProps,questionKey:n,optionKey:i,onPointerDown:()=>T(i),onPointerUp:()=>T(null),type:E.type,questionNumberOffset:l},e.id)}))}},e.id))),e.placeholder]}))})}),W&&(0,Z.jsx)(se,{content:W.content,questionKey:n,optionKey:"option-".concat(W.id),type:E.type,questionNumberOffset:l},W.id)]})]}),!H&&(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsxs)(y.Ay,{className:p()(t.addResponseWrapper,{[t.textboxAddResponseWrapper]:"TEXTBOX"===E.type}),item:!0,children:[(0,Z.jsx)(re.A,{label:"TABLE"===E.type?(0,ne.t)("scrAddRow","Add Row"):(0,ne.t)("scrAddResponse","Add Response"),onClick:"TABLE"===E.type?()=>b(n):()=>I(n,null)}),("RADIO"===E.type||"CHECKBOX"===E.type)&&!W&&(0,Z.jsx)(x.A,{color:"primary",classes:{root:t.addOtherButtonLabel},onClick:()=>I(n,"other"),children:(0,ne.t)("scrAddOther",'Add "Other"')})]}),(0,Z.jsx)(y.Ay,{className:t.removeQuestionWrapper,item:!0,children:(0,Z.jsxs)(x.A,{classes:{root:t.removeButtonRoot},onClick:()=>{f(n)},children:[(0,Z.jsx)(L.A,{})," ",(0,ne.t)("scrRemoveQuestion","Remove Question")]})})]})]})]})})]})}}ae.defaultProps={dragHandleProps:{},label:"",onPointerDown:()=>{},onPointerUp:()=>{},scrollIntoView:!1};const le=(0,X.A)(["screenerEditorContext"])((0,u.A)((e=>({header:{color:e.palette.text.primary,fontSize:12,fontWeight:600,lineHeight:"28px"},paperRoot:{backgroundColor:e.palette.background.paper,padding:"0 32px 0 0",overflowX:"hidden"},dragIndicator:{color:e.palette.text.secondary,fontSize:30,marginTop:10},contentWrapper:{marginLeft:20,paddingTop:12,paddingBottom:12,overflow:"hidden",width:"calc(100% - 54px)"},questionWrapper:{marginBottom:16},questionInput:{fontSize:14},responseTypeText:{color:e.palette.text.primary,display:"inline",fontSize:12,marginRight:16,whiteSpace:"nowrap",paddingTop:6},responseTypeContainer:{"& > div":{marginBottom:16}},addResponseButtonIcon:{backgroundColor:"#6C16C7",borderRadius:"50%",boxShadow:"0px 1px 5px 0px rgba(0,0,0,0.2), 0px 2px 2px 0px rgba(0,0,0,0.14), 0px 3px 1px -2px rgba(0,0,0,0.12)",color:"white",display:"inherit",marginRight:8},addResponseButtonLabel:{color:e.palette.text.primary,fontSize:12,fontStyle:"italic",textTransform:"none"},addOtherButtonLabel:{fontSize:12,fontStyle:"italic",textTransform:"none"},addResponseWrapper:{marginTop:16},removeQuestionWrapper:{alignSelf:"flex-end"},removeButtonRoot:{color:e.palette.text.disabled,fontSize:12,fontStyle:"italic",padding:"3px 6px",textTransform:"none","& svg":{height:17,marginTop:-2}},dragIndicatorWrapper:{flexShrink:0,width:34,"& > div:first-child":{backgroundColor:e.palette.tertiary.main,borderBottomLeftRadius:4,borderTopLeftRadius:4,opacity:0,width:4}},draggingDragIndicatorWrapper:{"& svg":{color:"".concat(e.palette.tertiary.main," !important")},"& > div:first-child":{opacity:1}},disabledDragIndicatorWrapper:{"& > div:first-child":{backgroundColor:e.palette.error.main},"& svg":{color:e.palette.error.main}},hideButton:{opacity:0,pointerEvents:"none"},textboxWrapper:{alignItems:"center",backgroundColor:"rgba(48, 48, 48, 0.08)",borderRadius:4,display:"flex",height:44,"& > div":{color:"rgba(48, 48, 48, 0.38)",fontSize:12,fontStyle:"italic",marginLeft:12}},textboxAddResponseWrapper:{opacity:0,pointerEvents:"none !important"},skipLabel:{color:e.palette.secondary.main,fontStyle:"italic",display:"inline-block"},questionLink:{cursor:"pointer","&:hover":{color:e.palette.secondary.light}},questionBody:{overflowX:"auto",whiteSpace:"nowrap",width:"100%"},tableRow:{alignItems:"stretch",backgroundColor:e.palette.background.paper,borderLeft:"4px solid transparent",borderRadius:4,display:"flex",flexWrap:"nowrap","& > div:not(:first-child):not(:last-child)":{borderRight:"1px solid rgba(48, 48, 48, 0.075)"},"& > div:last-child":{flexGrow:1,minWidth:125},"& svg":{color:e.palette.text.secondary}},tableCell:{boxSizing:"border-box",padding:4},tableOptionCell:{color:e.palette.text.primary,textAlign:"center",minWidth:130,width:130},tableSubQuestionCell:{alignItems:"center",display:"flex",minWidth:215,whiteSpace:"nowrap",width:215},tableCellBottomBorder:{borderBottom:"1px solid rgba(48, 48, 48, 0.075)"},tableColDeleteButtonRoot:{padding:4,"& svg":{color:e.palette.text.disabled,height:20,width:20}},tableRowDragIndicator:{fontSize:30},tableRowDragging:{borderLeft:"4px solid ".concat(e.palette.tert
1iary.main)},tableCellLogicHighlighted:{color:e.palette.secondary.main,fontWeight:600},readOnly:{pointerEvents:"none"}})),{withTheme:!0})(ae));var ce=i(36358),de=i(2322);class pe extends a.Component{render(){const e=this.props.classes;return(0,Z.jsx)("div",{className:e.doneContainer,children:(0,Z.jsxs)(q.A,{classes:{root:e.paperRoot},children:[(0,Z.jsx)("h2",{className:e.header,children:(0,ne.t)("scrDoneThankYou","Thank You!")}),(0,Z.jsx)("h5",{className:e.message,children:(0,ne.t)("scrDoneNotQualified","Unfortunately, you have not qualified for any surveys at this time. We hope you will try again later.")})]})})}}const he=(0,u.A)((e=>({doneContainer:{display:"flex",width:535,minHeight:184},paperRoot:{backgroundColor:e.palette.background.paper,padding:"32px 24px"},header:{fontSize:24,fontWeight:"normal",color:e.palette.text.primary,marginTop:0,marginBottom:24},message:{fontSize:16,fontWeight:"normal",color:e.palette.text.primary,lineHeight:"24px",margin:0}})),{withTheme:!0})(pe);class ue extends a.Component{render(){const e=this.props.classes;return(0,Z.jsx)("div",{className:e.doneContainer,children:(0,Z.jsxs)(q.A,{classes:{root:e.paperRoot},children:[(0,Z.jsx)("h2",{className:e.header,children:(0,ne.t)("scrThankYouVideoSubmitted","Thank You! Your video response has been submitted")}),(0,Z.jsx)("h5",{className:e.message,children:(0,ne.t)("scrThankYouConfirmed","If you are already confirmed for participation in a study, you will receive a confirmation email with further instructions.")}),(0,Z.jsx)("h5",{className:e.message,children:(0,ne.t)("scrThankYouWaiting","If you are waiting to see if you qualify for a study, you will be contacted only if you are selected on both qualification screener and technical submissions.")})]})})}}const xe=(0,u.A)((e=>({doneContainer:{display:"flex",width:535,minHeight:184},paperRoot:{backgroundColor:"#FAFAFA",padding:"32px 24px"},header:{fontSize:24,fontWeight:"normal",color:e.palette.text.primary,margin:0},message:{fontSize:16,fontWeight:"normal",color:e.palette.text.primary,lineHeight:"24px",marginTop:16,marginBottom:0}})),{withTheme:!0})(ue);var me=i(74840),ge=i(37653),Ae=i(46902),ve=i(9556),ye=i(54408),je=i(60786),be=i(7999),Ce=i(97240);const fe=(0,u.A)((e=>({form:{backgroundColor:"white",position:"fixed",zIndex:1,width:460,transition:"transform 0.2s ease-out",height:"auto",transform:"scaleY(1)",transformOrigin:"top",borderRadius:3,borderTop:"2px solid ".concat(e.palette.primary.main),borderBottom:"2px solid ".concat(e.palette.primary.main),borderLeft:"2px solid ".concat(e.palette.primary.main),borderRight:"2px solid ".concat(e.palette.primary.main),display:"flex",flexDirection:"column",alignItems:"center",overflow:"hidden"},collapsed:{transform:"scaleY(0)"},titleBar:{backgroundColor:e.palette.primary.main,color:"white",fontSize:12,width:"100%",textAlign:"center",padding:"8px 0",height:14}})))((e=>{let t=e.classes,i=e.children,n=e.title,s=e.open,o=e.top,r=e.right;return(0,Z.jsxs)("div",{className:p()(t.form,{[t.collapsed]:!s}),style:{top:o,right:r},children:[(0,Z.jsx)("div",{className:t.titleBar,children:n}),i]})}));var Se=i(24184);const we=(0,u.A)((e=>({button:{backgroundColor:"white",fontSize:14,position:"fixed",zIndex:2,borderBottom:"2px solid ".concat(e.palette.primary.main),borderLeft:"2px solid ".concat(e.palette.primary.main),borderRight:"2px solid ".concat(e.palette.primary.main),color:e.palette.primary.main,borderRadius:3,width:188,height:45,display:"flex",alignItems:"center",justifyContent:"center",fontWeight:600},buttonSelected:{backgroundColor:e.palette.primary.main,color:"white"}})))((e=>{let t=e.classes,i=e.children,n=e.isDefault,s=e.onClick,o=e.open,r=e.top,a=e.right;return(0,Z.jsx)(Se.A,{className:p()(t.button,{[t.buttonSelected]:o||n}),onClick:s,style:{top:r,right:a},children:i})})),Ie="default",Te="success",Re="error",ke="screener-changes-project-id-".concat(n.A.projectId);class Ne extends a.Component{constructor(){super(...arguments),this.textInput=a.createRef(),this.state={feedbackPhase:Ie,requestedChanges:localStorage.getItem(ke)||"",sending:!1},this.componentDidUpdate=()=>{this.props.open&&this.textInput.current.focus()},this.handleSendChangeRequest=async()=>{const e=this.props.onClick,t=this.props.screenerEditorContext.setErrorMessage,i=this.state.requestedChanges;let s=Ie;this.setState({sending:!0});try{await F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/screener/requestChanges"),{requestedChanges:i}),s=Te,localStorage.removeItem(ke)}catch(o){t((0,ne.t)("scrUnableRequestChanges","Unable to request changes. Please try again.")),s=Re}finally{e(),this.setState({requestedChanges:s===Te?"":i,sending:!1,feedbackPhase:s},(()=>setTimeout((()=>this.setState({feedbackPhase:Ie})),3e3)))}},this.render=()=>{const e=this.props,t=e.classes,i=e.top,n=e.right,s=e.open,o=e.onClick,r=this.state,l=r.feedbackPhase,c=r.requestedChanges,d=r.sending,h=l===Te?(0,ne.t)("scrRequestChangesSuccess","Changes Sent!"):l===Re?(0,ne.t)("scrRequestChangesError","Request Failed!"):(0,ne.t)("scrRequestChangesDefault","Request Changes");return(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsxs)(we,{onClick:o,open:s,top:i,right:n,
1children:[l===Ie&&(0,Z.jsx)("span",{className:p()(t.iconWrapper,{[t.iconWrapperOpen]:s}),children:(0,Z.jsx)(be.A,{className:p()(t.icon,{[t.iconOpen]:s})})}),(0,Z.jsx)("span",{children:h})]}),(0,Z.jsxs)(fe,{title:(0,ne.t)("scrRequestChangesTitle","Request Changes from your Project Manager"),open:s,top:i+43,right:3,children:[(0,Z.jsx)(k.A,{className:t.text,inputRef:this.textInput,id:"request-changes-text-field",placeholder:(0,ne.t)("scrRequestChangesPlaceholder","Note all of your screener edits...\n\nWhen you are done, submit all of your requested changes by clicking Send Request."),multiline:!0,fullWidth:!0,minRows:"16",maxRows:"16",onChange:e=>this.setState({requestedChanges:e.target.value}),onBlur:e=>localStorage.setItem(ke,e.target.value),margin:"normal",variant:"outlined",value:c,InputProps:{classes:{root:t.fontSize}}}),(0,Z.jsxs)("div",{className:t.formActions,children:[(0,Z.jsxs)(x.A,{className:t.sendButton,variant:"contained",color:"primary",onClick:this.handleSendChangeRequest,disabled:""===c||d,children:[(0,Z.jsx)(Ce.A,{className:t.mailIcon})," ",d?(0,ne.t)("scrSending","Sending..."):(0,ne.t)("scrSendRequest","Send Request")]}),(0,Z.jsx)(x.A,{className:t.closeButton,onClick:o,children:(0,ne.t)("fusClose","Close")})]})]})]})}}}const Be=(0,X.A)(["screenerEditorContext"])((0,u.A)((e=>({iconWrapper:{borderRadius:"50%",backgroundColor:e.palette.primary.main,width:20,height:20,marginRight:7,display:"flex",alignItems:"center",justifyContent:"center"},iconWrapperOpen:{backgroundColor:"white"},icon:{color:"white",width:16,height:16},iconOpen:{color:e.palette.primary.main},mailIcon:{marginRight:4,marginTop:-2},text:{backgroundColor:"rgba(48, 48, 48, 0.075)",color:e.palette.text.secondary,width:"95%",margin:"12px 0"},formActions:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12,width:"95%"},sendButton:{fontSize:14,textTransform:"none",fontWeight:600},closeButton:{fontSize:14,width:100,textTransform:"none",fontWeight:600},fontSize:{fontSize:14}})),{withTheme:!0})(Ne)),Pe="default",Ee="success",Le="error";class Oe extends a.Component{constructor(){super(...arguments),this.state={feedbackPhase:Pe,sending:!1},this.handleSendNotification=async()=>{const e=this.props.onClick,t=this.props.screenerEditorContext,i=t.screenerId,s=t.setErrorMessage,o=t.setContextState;let r=Pe;this.setState({sending:!0});try{o(await F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/screener/").concat(i,"/sendForReview"))),r=Ee}catch(a){s((0,ne.t)("scrUnableSendReview","Unable to send review request. Please try again.")),r=Le}finally{e(),this.setState({sending:!1,feedbackPhase:r},(()=>setTimeout((()=>this.setState({feedbackPhase:Pe})),3e3)))}},this.render=()=>{const e=this.props,t=e.classes,i=e.top,n=e.right,s=e.open,o=e.onClick,r=e.selected,l=this.state,c=l.feedbackPhase,d=l.sending,h=c===Ee?(0,ne.t)("scrSendEditsSuccess","Notification Sent!"):c===Le?(0,ne.t)("scrSendEditsError","Notification Failed!"):(0,ne.t)("scrSendEditsDefault","Send Edits for Review");return(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsxs)(we,{isDefault:r,onClick:o,open:s,top:i,right:n,children:[c===Pe&&(0,Z.jsx)(Ce.A,{className:p()(t.icon,{[t.iconOpen]:s,[t.iconWithOtherTabOpen]:!r})}),(0,Z.jsx)("span",{children:h})]}),(0,Z.jsxs)(fe,{open:s,top:i+43,right:3,children:[(0,Z.jsx)(j.A,{className:t.text,children:(0,ne.t)("scrSendEditsBlurb","If you have made changes directly on the screener, please notify the project owner, editors and Discuss.io project manager that an updated version is available.")}),(0,Z.jsxs)("div",{className:t.formActions,children:[(0,Z.jsxs)(x.A,{className:t.sendButton,variant:"contained",color:"primary",onClick:this.handleSendNotification,disabled:d,children:[(0,Z.jsx)(Ce.A,{className:t.mailIcon})," ",d?(0,ne.t)("scrSending","Sending..."):(0,ne.t)("scrSendNotification","Send Notification")]}),(0,Z.jsx)(x.A,{className:t.closeButton,onClick:o,children:(0,ne.t)("fusClose","Close")})]})]})]})}}}const We=(0,X.A)(["screenerEditorContext"])((0,u.A)((e=>({icon:{color:"white",width:20,height:20,marginRight:7},iconOpen:{color:"white"},iconWithOtherTabOpen:{color:e.palette.primary.main},mailIcon:{marginRight:4,marginTop:-2},formActions:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",marginBottom:12},sendButton:{marginBottom:12,fontSize:14,textTransform:"none",fontWeight:600},closeButton:{fontSize:14,width:100,textTransform:"none",fontWeight:600},fontSize:{fontSize:14},text:{padding:"24px 42px"}})),{withTheme:!0})(Oe)),He="REQUEST_CHANGES",De="SEND_EDITS";class Me extends a.Component{constructor(){super(...arguments),this.state={openTab:null}}render(){const e=this.state.openTab,t=this.props,i=t.hideSendEdits,n=t.top,s=t.right,o=e===He,r=e===De;return(0,Z.jsxs)(a.Fragment,{children:[!i&&(0,Z.jsx)(We,{selected:!(e&&e!==De),open:r,top:n,right:s+185,onClick:()=>this.setState({openTab:r?null:De})}
1),(0,Z.jsx)(Be,{open:o,top:n,right:s,onClick:()=>this.setState({openTab:o?null:He})})]})}}const ze=Me;var Fe=i(57561);const qe=(0,u.A)((e=>({root:{color:e.palette.text.primary,display:"flex",alignItems:"center",flexDirection:"column",padding:10},button:{color:e.palette.text.secondary,textTransform:"none","& svg":{color:e.palette.text.disabled}}})))((e=>{let t=e.classes,i=e.onReset;return(0,Z.jsxs)("div",{className:t.root,children:[(0,Z.jsx)("p",{children:(0,ne.t)("scrScreenerUnableLoad","The screener is unable to load. Please contact support or you may delete the screener and start again.")}),(0,Z.jsxs)(x.A,{onClick:i,classes:{root:t.button},children:[(0,Z.jsx)(L.A,{}),(0,ne.t)("scrDeleteScreener","Delete Screener")]})]})})),Ve=(0,u.A)((e=>({buttonWrapper:{margin:"8px 8px 0",width:64},buttonRoot:{padding:"2px 3px",textTransform:"none",whiteSpace:"nowrap"},buttonHidden:{opacity:0,pointerEvents:"none",cursor:"default"},wrapper:{marginTop:32}})),{withTheme:!0})((e=>{let t=e.classes,i=e.children,n=e.onNext,s=e.onPrevious,o=e.overrides,r=void 0===o?{}:o;return(0,Z.jsxs)(y.Ay,{container:!0,justifyContent:"center",alignItems:"flex-start",wrap:"nowrap",children:[(0,Z.jsx)(y.Ay,{item:!0,className:t.buttonWrapper,children:(0,Z.jsx)(x.A,{classes:{root:p()(t.buttonRoot,{[t.buttonHidden]:!s})},onClick:s,tabIndex:s?void 0:-1,children:(0,ne.t)("scrPrevious","< Previous")})}),(0,Z.jsx)(y.Ay,{item:!0,className:"".concat(t.wrapper," ").concat(r.wrapper),children:i}),(0,Z.jsx)(y.Ay,{item:!0,className:t.buttonWrapper,children:(0,Z.jsx)(x.A,{classes:{root:p()(t.buttonRoot,{[t.buttonHidden]:!n})},onClick:n,tabIndex:n?void 0:-1,children:(0,ne.t)("scrNext","Next >")})})]})}));Ve.propTypes={onNext:c().func,onPrevious:c().func,overrides:c().object};const Qe=(0,u.A)((e=>({root:{pointerEvents:"auto",transition:"opacity 200ms, background-color 200ms","&:hover":{backgroundColor:e.palette.primary.main}},hidden:{pointerEvents:"none"},container:{alignItems:"center",display:"flex",justifyContent:"center",marginTop:21,width:"100%","& > div:first-child":{marginRight:22},"& > div:last-child":{marginLeft:22}},line:{backgroundColor:e.palette.primary.main,flexGrow:1,height:4,transition:"opacity 200ms"}})),{withTheme:!0})(class extends a.Component{constructor(){super(...arguments),this.state={hovering:!1}}render(){const e=this.props,t=e.classes,i=e.onClick,n=void 0===i?()=>{}:i,s=e.hidden,o=this.state.hovering?.2:0;return(0,Z.jsxs)("div",{className:t.container,children:[(0,Z.jsx)("div",{className:t.line,style:{opacity:o}}),(0,Z.jsx)("div",{children:(0,Z.jsxs)(x.A,{classes:{root:p()(t.root,{[t.hidden]:s})},color:"primary",onClick:n,variant:"contained",style:{opacity:s?0:1},tabIndex:s?-1:void 0,onMouseEnter:()=>this.setState({hovering:!0}),onMouseLeave:()=>this.setState({hovering:!1}),children:[(0,Z.jsx)(N.A,{}),(0,ne.t)("scrAddQuestion","Add Question")]})}),(0,Z.jsx)("div",{className:t.line,style:{opacity:o}})]})}}),Ue=a.forwardRef(((e,t)=>(0,Z.jsx)(A.A,(0,r.A)((0,r.A)({direction:"up"},e),{},{ref:t}))));class Ge extends a.Component{constructor(){super(...arguments),this.state={copyClicked:!1,isLoading:!0,showPreview:!1,previewScreen:"screener_otter",selectedTemplate:"",showApplyTemplateDialog:!1,selectedTemplateName:"",showApproveDialog:!1},this.componentDidMount=async()=>{const e=this.props.screenerEditorContext,t=e.setScreener,i=e.setTemplates;(0,z.Ay)();const s=await Promise.all([F.A.getRequest("/ajax/project/".concat(n.A.projectId,"/screener/view")),F.A.getRequest("/ajax/project/".concat(n.A.projectId,"/videoQuestion")),F.A.getRequest("/ajax/project/".concat(n.A.projectId,"/screener/listTemplates"))]),r=(0,o.A)(s,3),a=r[0],l=r[1],c=r[2];t(a,null),i(c),this.setState({isLoading:!1,videoQuestion:l},(()=>{"#video-test-question"===window.location.hash&&window.scrollTo({behavior:"smooth",left:0,top:document.body.scrollHeight})}))},this.handleIntroductionEdit=e=>t=>{(0,this.props.screenerEditorContext.handleUpdateQuestionText)(e,t.target.value)},this.handleEditVideoQuestion=e=>{this.setState({videoQuestion:e.target.value})},this.handleSaveVideoQuestion=async()=>{const e=this.state.videoQuestion;await F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/saveVideoQuestion"),{question:e,project_id:n.A.projectId})},this.handleNavigateToQuestion=e=>{document.getElementById("question-index-".concat(e)).scrollIntoView({block:"center",behavior:"smooth"})},this.handleSelectTemplate=e=>{const t=this.props.screenerEditorContext.templates;if(e.target.value===this.state.selectedTemplate)return;if(""===e.target.value)return void this.setState({selectedTemplate:""});const i=e.target.value.split("-"),n=(0,o.A)(i,2),s=n[0],r=n[1];this.setState({showApplyTemplateDialog:!0,selectedTemplate:e.target.value,selectedTemplateName:t[s].find((e=>e.id=r)).name})},this.handleApplyTemplate=async()=>{const e=this.props.screenerEditorContext.handleClone,t=this.state.selectedTemplate.split("-"),i=(0,o.A)(t,2),n=i[0],s=i[1];await e(n,s),this.setState({showApplyTemplateDialog:!1})},this.handleReset=async()=>{const e=this.props.screenerEditorContext.handleDelete;await e(),window.location.reload()},this.handleRecruitmentCriteriaEdit=e=>{(0,this.props.screenerEditorContext.setRecruitmentCriteria)(e.target.value)}}renderScreenerSection(e,t,i,n){const s=this.props.classes,o=this.props.screenerEditorContext,a=o.handleCreateQuestion,l=o.onDragEnd,c=o.onDragUpdate,d=o.setDraggingElId,p=o.draggingElId,h=o.getSourceQuestionsMap,u=o.isReadOnlyMode,x=0===Object.keys(e.questions).length,m=h(e),g=u();return(0,Z.jsxs)("div",{children:[(0,Z.jsx)("div",{className:s.title,children:t}),(0,Z.jsx)("div",{className:s.description,children:i}),(0,Z.jsx)(M.JY,{onDragEnd:t=>l("section-".concat(e.id),t),onDragUpdate:t=>c("section-".concat(e.id),m,t),children:(0,Z.jsx)(M.gL,{droppableId:"section-".concat(e.id,"-questions"),direction:"vertical",type:"questions",children:t=>(0,Z.jsxs)("div",(0,r.A)((0,r.A)({ref:t.innerRef},t.droppableProps),{},{children:[e.questions.map(((t,i)=>(0,Z.jsx)("div",{children:(0,Z.jsx)(M.sx,{draggableId:t,index:i,isDragDisabled:g,children:o=>(0,Z.jsxs)("div",(0,r.A)((0,r.A)({className:s.questionContainer,ref:o.innerRef},o.draggableProps),{},{children:[(0,Z.jsx)(le,{dragging:this.props.screenerEditorContext.draggingElId===t,dragHandleProps:o.dragHandleProps,label:(0,ne.t)("scrQuestionLabel","Question %s").replace("%s",String(n+i+1)),onPointerDown:()=>d(t,i),onPointerUp:()=>d(null),questionKey:t,sourceQuestionIndices:m[t],handleNavigateToQuestion:this.handleNavigateToQuestion,questionNumberOffset:n,relativeIndex:i}),(0,Z.jsx)(Qe,{hidden:Boolean(p&&p.startsWith("question")||g),onClick:()=>a("section-".concat(e.id),t)}
1)]}))})},t))),t.placeholder]}))})}),x&&!g&&(0,Z.jsx)("div",{className:s.questionContainer,children:(0,Z.jsx)(Qe,{onClick:()=>a("section-".concat(e.id),null)})})]})}renderScreenerEditor(){try{const e=this.state,t=e.previewScreen,i=e.selectedTemplate,s=e.selectedTemplateName,o=e.showApplyTemplateDialog,l=e.showApproveDialog,c=e.showPreview,d=this.props.classes,u=this.props.screenerEditorContext,A=u.screenerId,N=u.handleSave,L=u.handleApprove,H=u.screener,D=u.templates,M=u.isSaving,z=u.reviewStatus,q=u.screenerLink,V=u.isReadOnlyMode,Q=u.recruitmentCriteria,U=u.handleEditRecruitmentCriteria,G=u.handleUpdateQuota,X=u.handleSaveQuota,_=u.quota,Y=u.currentCompletes,J=Object.values(H.sections).find((e=>"Introduction"===e.content)),K=Object.values(H.sections).find((e=>"Demographics"===e.content)),$=Object.values(H.sections).find((e=>"Screener"===e.content)),ee=("sent_for_review"===z||"changes_requested"===z)&&(n.A.isAdmin||n.A.isProjectOwner||n.A.isProjectSupportAgent),te="approved"===z,se=V();return(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsxs)("div",{className:p()(d.previewBar,{[d.approvedBackground]:te}),children:[(0,Z.jsxs)("div",{className:d.previewBarLeftColumn,children:[!se&&(0,Z.jsxs)("div",{className:d.templateDropdownContainer,children:[(0,Z.jsx)("span",{className:p()(d.templateDropdownLabel,{[d.textPrimary]:te}),children:(0,ne.t)("scrApplyTemplateLabel","Apply Template:")}),(0,Z.jsx)(b.A,{className:d.templateFormControl,children:(0,Z.jsxs)(O.A,{className:p()(d.templateSelectInput,{[d.textPrimary]:te}),classes:{icon:p()(d.templateSelectCaret,{[d.textPrimary]:te})},id:"screener-templates",inputProps:{name:"ScreenerTemplates",id:"screener-templates"},displayEmpty:!0,MenuProps:{classes:{paper:d.templateSelectMenu}},value:i,onChange:this.handleSelectTemplate,children:[(0,Z.jsx)(W.A,{value:"",className:d.templateSelectMenuItem,children:(0,Z.jsx)("em",{children:(0,ne.t)("scrNoneSelected","None Selected")})}),D.global.map((e=>(0,Z.jsx)(W.A,{value:"global-".concat(e.id),className:d.templateSelectMenuItem,children:e.name},"global-".concat(e.id)))),D.project.map((e=>(0,Z.jsx)(W.A,{value:"project-".concat(e.id),className:d.templateSelectMenuItem,children:e.name},"project-".concat(e.id))))]})})]}),(0,Z.jsx)("div",{className:p()(d.savingLabel,{[d.invisible]:!M},{[d.textPrimary]:te}),children:(0,ne.t)("scrSaving","Saving...")})]}),(0,Z.jsxs)("div",{className:d.flexRow,children:[(0,Z.jsxs)("div",{className:d.copyScreenerButton,children:[(0,Z.jsx)("div",{id:"clipboard-copy-el",style:{position:"absolute",opacity:0}}),(0,Z.jsx)(ye.A,{anchorElId:"clipboard-copy-el",label:(0,ne.t)("scrLiveScreenerLink","
1Live Screener Link"),url:q,classes:"approved"===z?void 0:{idle:d.liveScreenerLinkIdleWaitingForApproval,clicked:d.liveScreenerLinkClickedWaitingForApproval,link:d.liveScreenerLinkWaitingForApproval}})]}),(0,Z.jsxs)(x.A,{className:p()(d.previewScreenerButton,{[d.buttonPrimary]:te}),onClick:()=>this.setState({showPreview:!0,previewScreen:"screener_otter"}),children:[(0,ne.t)("scrPreviewScreener","Preview Screener")," \xa0",(0,Z.jsx)(P.A,{})]}),ee&&(0,Z.jsx)(x.A,{className:d.approveScreenerButton,onClick:()=>this.setState({showApproveDialog:!0}),color:"primary",variant:"contained",children:(0,ne.t)("scrApproveScreener","Approve Screener")})]})]}),n.A.isAdmin&&(0,Z.jsxs)("div",{className:d.capRecruitsContainer,children:[Y,"\xa0/\xa0",(0,Z.jsx)(k.A,{value:_,type:"number",onChange:e=>G(e.target.value),onBlur:X,className:d.capRecruits,InputProps:{classes:{root:d.capRecruitsTextField},inputProps:{style:{textAlign:"center"}}}})," ",(0,ne.t)("scrCompletesSuffix","completes")]}),(0,Z.jsxs)(I.A,{className:d.expansionPanel,classes:{root:d.noBoxShadow},defaultExpanded:!0,children:[(0,Z.jsx)(R.A,{expandIcon:(0,Z.jsx)(E.A,{}),className:d.headerText,children:(0,Z.jsx)("div",{children:(0,ne.t)("scrRecruitmentCriteriaHeader","Recruitment Criteria")})}),(0,Z.jsx)(T.A,{children:(0,Z.jsx)(ie.A,{classes:{input:d.recruitmentCriteriaInput},placeholder:(0,ne.t)("scrRecruitmentCriteriaPlaceholder","Add the recruitment criteria here"),onChange:this.handleRecruitmentCriteriaEdit,onSubmit:U,value:Q||"",fullWidth:!0,multiline:!0,isReadOnly:!n.A.isAdmin})})]}),(0,Z.jsxs)(I.A,{className:d.expansionPanel,classes:{root:d.noBoxShadow},defaultExpanded:!0,children:[(0,Z.jsx)(R.A,{expandIcon:(0,Z.jsx)(E.A,{}),className:d.headerText,children:(0,ne.t)("scrBuildScreener","Build Screener")}),(0,Z.jsx)(T.A,{children:(0,Z.jsxs)("div",{className:d.screenerEditorPadding,children:[(0,Z.jsx)(ce.A,{label:se?(0,ne.t)("scrScreenerIntroReadOnly","Screener Introduction"):(0,ne.t)("scrScreenerIntroEdit","Edit Screener Introduction"),placeholder:(0,ne.t)("scrNoneAdded","None Added"),onChange:this.handleIntroductionEdit(J.questions[0]),onSubmit:N,overrides:{input:d.textAreaInput,label:d.headerText},value:H.questions[J.questions[0]].content,isReadOnly:se}),this.renderScreenerSection(K,(0,ne.t)("scrDemographicsTitle","Demographics Questions"),(0,ne.t)("scrDemographicsDesc","Qualify respondents based on the demographics parameters you need."),0),this.renderScreenerSection($,(0,ne.t)("scrScreenerQuestionsTitle","Screener Questions"),(0,ne.t)("scrScreenerQuestionsDesc","Qualify respondents based on what you are trying to learn from your respondents."),K.questions.length),(0,Z.jsxs)("div",{className:d.videoQuestionContainer,children:[(0,Z.jsx)("div",{id:"video-test-question",style:{fontSize:19},children:se?(0,ne.t)("scrVideoTestReadOnly","Video Test Question"):(0,ne.t)("scrVideoTestEdit","Edit Video Test Question")}),(0,Z.jsx)("div",{className:d.videoQuestionText,children:(0,ne.t)("scrVideoTestBody","After completing the screener, your participants will be asked to briefly record themselves on the device they\u2019ll use to join the study. This both gives you the opportunity to see and hear from respondents before you select them, and allows us to ensure their device meets our minimum tech requirements to participate.")}),(0,Z.jsx)("div",{className:d.videoQuestionText,children:(0,ne.t)("scrVideoTestCustomize","Customize the question your candidate will be asked.")}),(0,Z.jsx)(ce.A,{inlinePencil:!0,placeholder:(0,ne.t)("scrNoneAdded","None Added"),onChange:this.handleEditVideoQuestion,onSubmit:this.handleSaveVideoQuestion,overrides:{input:d.textAreaInput,label:d.headerText},value:this.state.videoQuestion,isReadOnly:se})]}),(0,Z.jsx)("div",{className:d.copyAutotechcheckWrapper,children:(0,Z.jsxs)(Fe.G,{children:[(0,Z.jsx)("div",{id:"clipboard-copy-autotechcheck-el",style:{position:"absolute",opacity:0}}),(0,Z.jsx)(ye.A,{anchorElId:"clipboard-copy-autotechcheck-el",label:(0,ne.t)("scrLinkAutotechcheck","Link to auto techcheck"),url:n.A.autotechcheckLink,disabled:n.A.asyncOnly||n.A.oprOnly})]})})]})})]}),(0,Z.jsxs)(g.A,{open:o,onClose:()=>this.setState({showApplyTemplateDialog:!1,selectedTemplate:"",selectedTemplateName:""}),children:[(0,Z.jsx)(C.A,{children:(0,ne.t)("scrApplyTemplateTitle","Apply '%s'?").replace("%s",s)}),(0,Z.jsx)(f.A,{children:(0,Z.jsx)(w.A,{children:(0,ne.t)("scrApplyTemplateBody","Selecting this template will over
1write your current screener. All existing progress will be lost.")})}),(0,Z.jsxs)(S.A,{children:[(0,Z.jsx)(x.A,{onClick:()=>this.setState({showApplyTemplateDialog:!1,selectedTemplate:"",selectedTemplateName:""}),color:"primary",variant:"contained",children:(0,ne.t)("cancel","Cancel")}),(0,Z.jsx)(x.A,{color:"primary",variant:"outlined",onClick:this.handleApplyTemplate,children:(0,ne.t)("scrUseTemplate","Use Template")})]})]}),(0,Z.jsxs)(g.A,{open:l,onClose:()=>this.setState({showApproveDialog:!1}),children:[(0,Z.jsx)(C.A,{children:(0,ne.t)("scrApproveCostsTitle","Costs will be incurred once Start Recruiting is clicked.")}),(0,Z.jsx)(f.A,{children:(0,Z.jsx)(w.A,{children:(0,ne.t)("scrApproveCostsBody","Additional changes to screening criteria may result in delays and additional costs.")})}),(0,Z.jsxs)(S.A,{children:[(0,Z.jsx)(x.A,{onClick:()=>this.setState({showApproveDialog:!1}),color:"primary",children:(0,ne.t)("cancel","Cancel")}),(0,Z.jsx)(x.A,{color:"primary",variant:"contained",onClick:()=>{this.setState({showApproveDialog:!1}),L()},children:(0,ne.t)("scrStartRecruiting","Start Recruiting")})]})]}),(0,Z.jsxs)(g.A,{classes:{paperFullScreen:d.previewDialog},fullScreen:!0,open:c,onClose:()=>this.setState({showPreview:!1}),TransitionComponent:Ue,children:[(0,Z.jsx)(h.A,{color:"secondary",className:d.appBar,position:"sticky",children:(0,Z.jsx)(v.A,{className:d.toolbar,children:(0,Z.jsx)(y.Ay,{container:!0,justifyContent:"space-between",alignItems:"center",children:(0,Z.jsxs)(y.Ay,{xs:8,item:!0,style:{display:"inherit"},children:[(0,Z.jsx)(m.A,{id:"screener-editor-preview-close",className:d.closeButton,onClick:()=>this.setState({showPreview:!1}),"aria-label":(0,ne.t)("fusClose","Close"),children:(0,Z.jsx)(B.A,{})}),(0,Z.jsx)(j.A,{variant:"h6",className:d.formTitle,children:(0,ne.t)("scrScreenerPreviewTitle","Screener Preview (%s)").replace("%s",n.A.projectName)})]})})})}),"screener_otter"===t&&(0,Z.jsx)(Ve,{onNext:()=>this.setState({previewScreen:"complete"}),overrides:{wrapper:d.previewContainerScreenerOtterOverride},children:(0,Z.jsx)(de.A,{answerQuestion:async e=>{const t=await F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/screenerAnswer"),(0,r.A)((0,r.A)({},e),{},{screenerId:A}));return"redirect"===t.type?(this.setState({previewScreen:t.link}),{type:"die"}):t},getNextAction:async()=>{const e=await F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/screenerAction"),{screenerId:A});return"redirect"===e.type?(this.setState({previewScreen:e.link}),{type:"die"}):e},isMobile:this.props.isBelowBreakpoint})}),"terminate"===t&&(0,Z.jsx)(Ve,{onPrevious:()=>this.setState({previewScreen:"screener_otter"}),children:(0,Z.jsx)(he,{})}),"complete"===t&&(0,Z.jsx)(Ve,{onNext:()=>this.setState({previewScreen:"video_response"}),onPrevious:()=>this.setState({previewScreen:"screener_otter"}),children:(0,Z.jsx)(me.A,{previewMode:!0})}),"video_response"===t&&(0,Z.jsx)(Ve,{onNext:()=>this.setState({previewScreen:n.A.showCandidateAvailability?"select_dates":"thank_you"}),onPrevious:()=>this.setState({previewScreen:"complete"}),children:(0,Z.jsx)(ge.A,{previewMode:!0,question:()=>this.state.videoQuestion})}),"select_dates"===t&&(0,Z.jsx)(Ve,{onNext:()=>this.setState({previewScreen:"thank_you"}),onPrevious:()=>this.setState({previewScreen:"video_response"}),children:(0,Z.jsx)(Ae.A,{previewMode:!0,question:()=>this.state.videoQuestion})}),"thank_you"===t&&(0,Z.jsx)(Ve,{onPrevious:()=>this.setState({previewScreen:n.A.showCandidateAvailability?"select_dates":"video_response"}),children:(0,Z.jsx)(xe,{})})]})]})}catch(e){return(0,Z.jsx)(qe,{onReset:this.handleReset})}}render(){const e=this.props.classes,t=this.state.isLoading,i=this.props.screenerEditorContext,s=i.screenerId,o=i.errorMessage,r=i.setErrorMessage,l=i.reviewStatus,c=i.sentForReviewBy,d=i.sentForReviewAt,p=i.approvedBy,h=i.approvedAt;return(0,Z.jsxs)(a.Fragment,{children:[(0,Z.jsx)("div",{className:e.reviewBar,children:!t&&s&&(0,Z.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[("sent_for_review"===l||"changes_requested"===l)&&p&&c&&(0,Z.jsxs)("div",{className:e.approvedLabel,children:[(0,Z.jsx)("div",{style:{fontWeight:600},children:(0,ne.t)("scrReviewNewSent","New! Sent for approval by %s on %s").replace("%s",c).replace("%s",d)}),(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{role:"img","aria-label":"Woohoo!",children:"\ud83c\udf89"})," ",(0,ne.t)("scrReviewApprovedBy","Approved by %s on %s").replace("%s",p).replace("%s",h)]})]}),"approved"===l&&p&&(0,Z.jsxs)("div",{className:e.approvedLabel,children:[(0,Z.jsx)("span",{role:"img","aria-label":"Woohoo!",children:"\ud83c\udf89"})," ",(0,ne.t)("scrReviewApprovedBy","Approved by %s on %s").replace("%s",p).replace("%s",h)]}),("sent_for_review"===l||"changes_requested"===l)&&!p&&c&&(0,Z.jsx)("span",{className:e.reviewLabel,children:(0,ne.t)("scrReviewSentPending","Sent for approval by %s on %s").replace("%s",c).replace("%s",d)})]})}),(0,Z.jsx)("div",{className:e.screenerEditorContainer,style:{backgroundColor:t?"inherit":"rgba(48, 48, 48, 0.075)"},children:t?(0,Z.jsx)(H.A,{className:e.spinner}):this.renderScreenerEditor()}),(0,Z.jsx)(ve.A,{content:o||"",open:!!o,onClose:()=>r(null)}),(n.A.isAdmin||n.A.isProjectOwner||n.A.isProjectSupportAgent||n.A.isProjectEditor)&&(0,Z.jsx)(ze,{hideSendEdits:"approved"===l&&!n.A.isAdmin,top:143,right:48})]})}}const Xe=(0,je.A)((0,X.A)(["screenerEditorContext"])((0,u.A)((e=>({footer:{"&>div":{width:"calc(100% - 20px)"}},spinner:{position:"relative",left:"calc(50% - 40px)",margin:"4em 0"},screenerEditorContainer:{display:"flex",flexDirection:"column",maxWidth:950,margin:"0 auto 84px auto",borderRadius:24,"@media (max-width: 950px)":{borderRadius:0,marginBottom:0}},screenerEditorPadding:{overflow:"auto",paddingBottom:42},previewBar:{display:"flex",justifyContent:"space-between",backgroundColor:e.palette.header,color:"white",borderTopLeftRadius:24,borderTopRightRadius:24,padding:"24px 36px","@media (max-width: 950px)":{borderTopLeftRadius:0,borderTopRightRadius:0},"@media (max-width: 867px)":{flexWrap:"wrap"}},savingLabel:{fontStyle:"italic",color:"white",fontSize:14,marginLeft:16},invisible:{opacity:0}
1,headerText:{fontSize:19,color:e.palette.text.primary},textAreaInput:{color:e.palette.text.primary,fontSize:14,lineHeight:"24px"},title:{color:e.palette.text.primary,fontSize:19,marginTop:24},description:{color:e.palette.text.primary,fontSize:14,marginTop:8,marginBottom:25},questionContainer:{display:"flex",flexDirection:"column",alignItems:"center"},videoQuestionContainer:{display:"flex",flexDirection:"column",marginTop:38},videoQuestionText:{fontSize:14,margin:"8px 0"},sendScreenerContainer:{display:"flex",justifyContent:"center",alignItems:"center",marginTop:70},sendScreenerButton:{width:150,height:36,textTransform:"none"},copyScreenerButton:{fontSize:14,marginRight:16},previewScreenerButton:{color:"white",textTransform:"none",height:36,whiteSpace:"nowrap","@media (max-width: 590px)":{marginRight:16}},formTitle:{flex:1,fontSize:21,fontWeight:600,margin:"auto 0",color:"inherit"},toolbar:{marginTop:8},closeButton:{borderRadius:"50% !important",padding:8,marginRight:4,color:"inherit"},appBar:{minHeight:72},previewDialog:{backgroundColor:e.palette.background.default},previewContainerScreenerOtterOverride:{width:"calc(100% - 144px)",maxWidth:950},templateFormControl:{width:225},templateSelectMenu:{borderRadius:"4px !important"},templateSelectMenuItem:{fontSize:14},templateSelectInput:{color:"white",fontSize:14,"&::before":{borderBottomColor:"white !important"},"&::after":{borderBottomColor:"white !important"}},templateSelectCaret:{color:"white"},templateDropdownLabel:{fontSize:19,color:"white",marginRight:10,whiteSpace:"nowrap"},templateDropdownContainer:{display:"flex",alignItems:"center",flexWrap:"wrap"},flexRow:{display:"flex",alignItems:"center",flexGrow:1,justifyContent:"flex-end","@media (max-width: 867px)":{justifyContent:"flex-start",flexWrap:"wrap"}},reviewBar:{display:"flex",alignItems:"center",width:"calc(100% - 100px)",maxWidth:950,minHeight:32,margin:"12px auto","@media (max-width: 1062px)":{minHeight:0,margin:"44px auto 12px auto"}},reviewButton:{width:180,textTransform:"none",marginLeft:26},notSentForReviewButtonHover:{"&:hover":{backgroundColor:(0,D.X4)(e.palette.primary.main,.38)}},reviewLabel:{color:e.palette.text.primary,fontSize:14,"@media (max-width: 1062px)":{marginTop:12}},noPointerEvents:{pointerEvents:"none"},approveScreenerButton:{textTransform:"none",marginLeft:16,"&:hover":{backgroundColor:(0,D.X4)(e.palette.primary.main,.38)},height:36,whiteSpace:"nowrap","@media (max-width: 590px)":{marginTop:16,marginLeft:0}},approvedLabel:{fontSize:14,color:"white",backgroundImage:"linear-gradient(to right, ".concat(e.palette.primary.main,", ").concat(e.palette.secondary.main,")"),padding:"6px 12px 8px 12px",borderRadius:"4px","@media (max-width: 1062px)":{marginTop:12}},approvedBackground:{backgroundColor:"transparent"},buttonPrimary:{color:e.palette.primary.main},textPrimary:{color:e.palette.text.primary,"&::before":{borderBottomColor:"".concat(e.palette.text.primary," !important")},"&::after":{borderBottomColor:"".concat(e.palette.text.primary," !important")}},expansionPanel:{backgroundColor:"transparent",marginTop:0,marginBottom:0,padding:"0 24px","@media (max-width: 950px)":{padding:0}},noBoxShadow:{boxShadow:"none"},recruitmentCriteria:{justifyContent:"space-between"},recruitmentCriteriaInput:{minHeight:128},capRecruitsContainer:{flexGrow:1,display:"flex",height:45,alignItems:"center",justifyContent:"center",paddingLeft:10},capRecruits:{width:45,margin:"-5px 5px"},capRecruitsTextField:{color:e.palette.primary.main,textAlign:"center",width:45},copyAutotechcheckWrapper:{display:"flex",justifyContent:"center"},previewBarLeftColumn:{display:"flex",alignItems:"center","@media (max-width: 867px)":{marginBottom:16}},liveScreenerLinkIdleWaitingForApproval:{color:"#FFFFFF"},liveScreenerLinkClickedWaitingForApproval:{backgroundColor:e.palette.primary.main},liveScreenerLinkWaitingForApproval:{"&:hover":{backgroundColor:e.palette.primary.main}}})),{withTheme:!0})(Ge)),{breakpoint:810});var _e=i(78317),Ze=i(36080),Ye=i(29120),Je=i(58535),Ke=i(43754),$e=i(91445),et=i(66677),tt=i(11250),it=i(25277),nt=i(74745),st=i(16497),ot=i(2046),rt=i(58567),at=i(85815),lt=i(82606),ct=i(50922),dt=i.n(ct);const pt={backgroundColor:"header",borderRadius:"16px 16px 0 0","& .MuiStepLabel-labelContainer":{color:"action.light.disabled"},"& .MuiStepLabel-label.Mui-active":{color:"text.header.hover",fontWeight:600},"& .MuiStepIcon-root":{height:"40px",width:"40px",border:e=>"1px solid ".concat(e.palette.action.light.enabled),borderRadius:"64px","&.Mu
1i-active":{fill:e=>e.palette.secondary.main,border:"1px solid transparent"}},"& .MuiStepConnector-root":{top:"20px"},"& .MuiStepConnector-line":{border:"none",height:"1px",backgroundImage:"repeating-linear-gradient(90deg, #FFF3, #FFF3 11px, transparent 11px, transparent 22px)"},"& .MuiStepLabel-label":{marginTop:"8px"}},ht={"& .MuiFormControl-root":{width:"100%"},"& .MuiFormGroup-root":{gap:"16px",flexDirection:"row",justifyContent:"space-between"},"& .MuiFormControlLabel-root":{flex:1,maxWidth:"267px",margin:0,padding:"0 32px",height:"77px",justifyContent:"center",textAlign:"center",textWrap:"balance",backgroundColor:"lightDivider",borderRadius:"4px",position:"relative","&:hover":{backgroundColor:"divider"},"&:has(.Mui-checked)":{backgroundColor:"secondary.main","& .MuiFormControlLabel-label":{color:"text.header.hover"}}},"& .MuiRadio-root":{position:"absolute",top:"8px",right:"14px",padding:0,"&.Mui-checked":{color:"text.header.hover"}},"& .MuiFormControlLabel-label":{fontWeight:600}},ut={padding:"8px 17px 8px 24px",backgroundColor:"primary.main",color:"text.header.hover",fill:"text.header.hover","&:hover":{backgroundColor:e=>dt()(e.palette.primary.main).lighten(.4).toString()},"&:disabled":{backgroundColor:"primary.main",color:"text.header.hover",fill:"text.header.hover",opacity:"30%"}},xt={display:"flex",gap:"4px",alignItems:"center"},mt={color:"text.primary",fontSize:"14px",lineHeight:"21px",position:"inherit",transform:"none"},gt={color:"text.secondary",fontSize:"12px",lineHeight:"18px",paddingBottom:"8px"},At={color:"text.secondary",fontSize:"12px",lineHeight:"18px",margin:0},vt={boxSizing:"border-box",borderRadius:"4px",backgroundColor:"lightDivider",marginBottom:"8px","&:hover":{backgroundColor:"divider"},"& .MuiInputBase-root":{width:"100%"},"& .MuiOutlinedInput-input":{border:"none",padding:"12px 16px"},"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-input::placeholder":{fontStyle:"italic"}},yt={borderBottom:"1px solid divider",margin:"32px 0"},jt={width:"38px",height:"38px",borderRadius:"2px",backgroundColor:"secondary.main","&:hover":{backgroundColor:"secondary.light"},"&:disabled":{backgroundColor:"#F1F1F1","& svg":{fill:"#A5A5A5"}},"& svg":{fill:"#FFF"}},bt={"&.Mui-checked":{color:"secondary.main"}},Ct={color:"text.primary",fontSize:"14px",lineHeight:"20px",padding:"6px 15px",textTransform:"none","&.MuiToggleButtonGroup-grouped:not(:last-of-type)":{border:e=>"1px solid ".concat(e.palette.action.inactive),borderRadius:"4px"},"&.MuiToggleButtonGroup-grouped:not(:first-of-type)":{border:e=>"1px solid ".concat(e.palette.action.inactive),borderRadius:"4px"},"&.Mui-selected":{backgroundColor:"secondary.main",color:"#FFF",border:"1px solid transparent !important",fontWeight:600,"&:hover":{backgroundColor:e=>dt()(e.palette.secondary.main).lighten(.12).toString()}}},ft={fontSize:"14px",lineHeight:"20px",gap:"2px",color:"primary.main",fill:"primary.main","& svg":{height:"20px",width:"20px"}},St={color:"text.primary",fontSize:"16px",fontWeight:600},wt={color:"text.secondary",fontSize:"14px",fontStyle:"italic",fontWeight:400,mt:"2px"},It={color:"primary.main",fontSize:"14px",lineHeight:"20px",fontWeight:600,"&:hover":{backgroundColor:"inherit"}},Tt={borderRadius:"16px",background:"rgba(94, 197, 196, 0.20)",marginTop:"32px",padding:"24px",display:"flex",gap:"32px",alignItems:"center"},Rt={display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px 50px"},kt={fontSize:"14px",lineHeight:"22px",fontWeight:600,color:"text.primary"},Nt={fontSize:"14px",lineHeight:"20px",color:"text.primary"};var Bt;const Pt=["title","titleId"];function Et(){return Et=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)({}).hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},Et.apply(null,arguments)}function Lt(e,t){let i=e.title,n=e.titleId,s=function(e,t){if(null==e)return{};var i,n,s=function(e,t){if(null==e)return{};var i={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;i[n]=e[n]}return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)i=o[n],-1===t.indexOf(i)&&{}.propertyIsEnumerable.call(e,i)&&(s[i]=e[i])}return s}(e,Pt);return a.createElement("svg",Et({width:73,height:76,viewBox:"0 0 73 76",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,"aria-labelledby":n},s),i?a.createElement("title",{id:n},i):null,Bt||(Bt=a.createElement("g",{id:"Frame 3410",opacity:.2},a.createElement("path",{id:"Vector",d:"M1.75586 9.37842H26.183V33.7894H1.75586V9.37842Z",fill:"#FAFAFA"}),a.createElement("path",{id:"Vector_2",d:"M46.8164 9.37842H71.245V33.7879H46.8164V9.37842Z",fill:"#FAFAFA"}),a.createElement("path",{id:"Vector_3",d:"M1.75586 4.91553H26.183V9.37843H1.75586V4.91553Z",fill:"#5EC5C4"}),a.createElement("path",{id:"Vector_4",d:"M46.8164 4.91553H71.245V9.37843H46.8164V4.91553Z",fill:"#5EC5C4"}),a.createElement("path",{id:"Vector_5",d:"M55.1802 1.25952V9.37842L36.2381 10.0866L17.2969 9.37842V1.25952H55.1802Z",fill:"#CF5589"}),a.createElement("path",{id:"Vector_6",d:"M17.2969 9.37842H55.1802V42.9221H17.2969V9.37842Z",fill:"#FAFAFA"}),a.createElement("path",{id:"Vector_7",d:"M45.9845 27.4688V29.5824C45.9845 30.7778 45.0144 31.7479 43.819 31.7479H29.1771C27.9818 31.7479 27.0117 30.7778 27.0117 29.5824V27.4688C27.0117 26.2718 27.9818 25.3018 29.1771 25.3018H43.819C45.0144 25.3018 45.9845 26.2718 45.9845 27.4688Z",fill:"#6C16C7"}),a.createElement("path",{id:"Vector_8",d:"M52.0435 45.4981L50.686 40.2685C
150.5273 39.6568 50.17 39.1152 49.6701 38.7287C49.1703 38.3421 48.5563 38.1324 47.9244 38.1325H47.8794C47.2352 38.1311 46.6096 38.3491 46.1057 38.7505C45.6288 39.1284 45.2854 39.6489 45.1257 40.236C45.1243 40.2406 45.1223 40.2444 45.121 40.2489C45.1179 40.2604 45.1158 40.2721 45.1129 40.2837C45.1045 40.3169 45.0969 40.3502 45.0897 40.3838C45.0847 40.4072 45.0796 40.4306 45.0752 40.4542C45.0686 40.4891 45.063 40.5243 45.0579 40.5597C45.0545 40.5824 45.0507 40.6052 45.0479 40.628C45.0431 40.6669 45.0395 40.7062 45.0363 40.7457C45.0347 40.7655 45.0324 40.7849 45.0312 40.8048C45.0275 40.8634 45.0255 40.9222 45.0253 40.9816V40.984V39.9001C45.0253 39.369 44.8776 38.8738 44.6249 38.4482C44.508 38.2499 44.3675 38.0664 44.2065 37.9017C44.2007 37.8959 44.1957 37.8893 44.1898 37.8834C43.9253 37.6183 43.611 37.4081 43.265 37.2648C42.919 37.1215 42.5481 37.048 42.1736 37.0485H41.7236C40.148 37.0485 38.872 38.3244 38.8719 39.8999V38.233C38.8719 37.3046 38.4263 36.4823 37.7397 35.9612C37.261 35.5981 36.6661 35.38 36.019 35.38H35.5702C34.0463 35.38 32.8062 36.5758 32.7262 38.0797C32.7234 38.1308 32.7185 38.1812 32.7185 38.2329V39.4423V39.4416C32.7185 39.3702 32.7149 39.2994 32.7097 39.2292V25.3023C32.7097 23.7289 31.434 22.4532 29.8606 22.4532C28.287 22.4532 27.0113 23.7289 27.0113 25.3025V45.8415C27.0113 45.2264 26.8147 44.6584 26.4836 44.1929C25.9673 43.4672 25.1214 42.9924 24.1622 42.9924C22.7145 42.9924 21.4961 44.0767 21.3306 45.5145L19.884 58.0405C19.6703 59.8914 20.1461 61.7561 21.2205 63.2782C21.3858 63.5113 21.5642 63.7348 21.7547 63.9476C21.9769 64.1978 22.2154 64.4329 22.4688 64.6514L26.3796 68.0184L27.0113 68.5622V74.174H48.8471V68.5622L51.9231 57.6067C53.0335 53.6522 53.075 49.4739 52.0435 45.4981Z",fill:"#B28B67"}),a.createElement("path",{id:"Vector_9",d:"M51.923 57.6062L48.8466 68.5624V74.174H44.1284C44.4616 74.0208 44.7439 73.7752 44.9418 73.4664C45.1397 73.1576 45.2448 72.7985 45.2448 72.4317V68.5624L48.3213 57.6062C49.4319 53.6523 49.473 49.4741 48.4416 45.4982L47.0831 40.2681C46.9285 39.6705 46.5834 39.1395 46.1002 38.7555C46.1016 38.754 46.1046 38.7525 46.106 38.7511C46.5916 38.3638 47.2078 38.132 47.8797 38.132H47.9237C49.2236 38.132 50.3591 39.0093 50.6863 40.2681L52.0434 45.4982C53.0747 49.4741 53.0336 53.6523 51.923 57.6062ZM27.0111 45.8684V53.2024C27.0111 54.0623 25.9374 54.4626 25.3813 53.8067C24.7391 53.0492 24.1518 51.9367 24.1518 50.4005V46.0685C24.152 45.5267 23.9845 44.9982 23.6723 44.5554C23.3601 44.1126 22.9185 43.7773 22.4082 43.5954C22.9279 43.1887 23.573 42.9758 24.2327 42.9933C25.7913 43.031 27.0111 44.3093 27.0111 45.8684Z",fill:"#915B3C"}),a.createElement("path",{id:"Vector_10",d:"M23.0176 13.6908H31.7059V18.7162H23.0176V13.6908Z",fill:"#5EC5C4"}),a.createElement("path",{id:"Vector_11",d:"M71.2459 3.81547H56.2805V1.2595C56.2805 0.967677 56.1645 0.687806 55.9582 0.481456C55.7519 0.275106 55.472 0.15918 55.1802 0.15918L17.2967 0.15918C17.0049 0.15918 16.725 0.275106 16.5187 0.481456C16.3123 0.687806 16.1964 0.967677 16.1964 1.2595V3.81547H1.75491C1.15487 3.81547 0.654297 4.31722 0.654297 4.91594L0.65459 33.7886C0.65459 34.0805 0.770517 34.3603 0.976867 34.5667C1.18322 34.773 1.46309 34.889 1.75491 34.889H16.1965V42.9225C16.1965 43.2143 16.3125 43.4942 16.5188 43.7005C16.7252 43.9069 17.005 44.0228 17.2969 44.0228H20.6549C20.4339 44.4487 20.2927 44.9115 20.2381 45.3882L18.7914 57.9146C18.751 58.2662 18.7319 58.62 18.7343 58.9739C18.7343 61.7982 20.1708 64.1245 22.2484 65.9133L25.9116 69.067V74.1741C25.9116 74.4659 26.0276 74.7458 26.2339 74.9521C26.4403 75.1585 26.7201 75.2744 27.012 75.2744H30.3974C31.0052 75.2744 31.4977 74.7817 31.4977 74.1741C31.4977 73.5664 31.0052 73.0737 30.3974 73.0737H28.1123V68.5623C28.1123 68.404 28.0781 68.2475 28.0121 68.1036C27.9461 67.9597 27.8499 67.8317 27.73 67.7284L24.1165 64.6174C22.3511 63.0976 20.9804 61.4345 20.935 58.9566C20.9331 58.6943 20.9476 58.4285 20.9777 58.1667L22.4244 45.6403C22.5257 44.7581 23.2732 44.0928 24.1629 44.0928C24.7463 44.0928 25.2338 44.413 25.4741 44.6872C25.8691 45.1382 25.9118 45.6445 25.9118 45.8412V55.1174C25.9118 55.7251 26.4043 56.2177 27.0121 56.2177C27.6199 56.2177 28.1124 55.7251 28.1124 55.1174V25.3024C28.1124 24.3381 28.897 23.5536 29.8612 23.5536C30.8226 23.5536 31.6048 24.3335 31.6097 25.2937C31.6097 25.2965 31.6092 25.2992 31.6092 25.3019C31.6092 25.3077 31.61 25.3132 31.6101 25.319V39.2292C31.6101 40.9099 33.8221 40.9057 33.8196 39.2429C33.8193 39.0039 33.8182 38.3007 33.8237 38.1182C34.02 35.8798 37.7722 35.9331 37.7722 38.2329V39.8998C37.7722 41.3189 39.9729 41.3189 39.9729 39.8998C39.973 38.9342 40.7585 38.1485 41.7243 38.1485C42.818 38.1485 43.9258 38.6226 43.9258 39.9V40.984C43.9258 42.3887 46.1013 42.4124 46.1263 41.0034C46.1302 40.7739 46.1423 40.7227 46.1823 40.5536C46.6236 38.8315 49.1743 38.8233 49.6216 40.545L50.9793 45.7743C51.9608 49.562 51.9213 53.542 50.8647 57.3094L47.7885 68.2649C47.7613 68.3617 47.7475 68.4617 47.7476 68.5623V73.0737H35.6653C35.0575 73.0737 34.565 73.5664 34.565 74.1741C34.565 74.7817 35.0575 75.2744 35.6653 75.2744H48.8479C49.1397 75.2744 49.4196 75.1585 49.6259 74.9521C49.8323 74.7458 49.9482 74.4659 49.9482 74.1741V68.7138L52.9833 57.9041C54.1451 53.7619 54.1886 49.3859 53.1094 45.2214L52.7982 44.0226H55.1806C55.4724 44.0226 55.7523 43.9067 55.9586 43.7004C56.165 43.494 56.2809 43.2141 56.2809 42.9223V10.4787H70.146V32.6883H60.3536C59.7457 32.6883 59.2532 33.181 59.2532 33.7886C59.2532 34.3963 59.7457 34.889 60.3536 34.889H71.2463C71.5381 34.889 71.818 34.773 72.0243 34.5667C72.2307 34.3603 72.3466 34.0805 72.3466 33.7886V4.91579C72.3465 4.62394 72.2304 4.34409 72.024 4.13776C71.8176 3.93143 71.5377 3.81551 71.2459 3.81547ZM2.85523 6.01626H16.1965V8.27808H2.85523V6.01626ZM18.3978 2.36026H54.0794V8.27808H18.3978V2.36026ZM2.85523 32.6883V10.4787H16.1965V32.6883H2.85523ZM52.2265 41.8221L51.7513 39.9917C51.0564 37.3182 47.7496 36.1599 45.5281 37.8072C44.3243 35.8858 41.5008 35.3577 39.6065 36.5642C38.6249 34.4532 35.8522 33.6711 33.8105 34.6979V26.4021H43.8199C44.4073 26.4021 44.8851 26.8807 44.8851 27.4688V29.5825C44.8851 30.1698 44.4073 30.6476 43.8199 30.6476H37.7973C37.1895 30.6476 36.697 31.1402 36.697 31.7479C36.697 32.3556 37.1895 32.8482 37.7973 32.8482H43.8199C45.6206 32.8482 47.0858 31.3832 47.0858 29.5825V27.4688C47.0858 25.6672 45.6207 24.2015 43.8199 24.2015H33.6532C33.1752 22.5579 31.6566 21.3528 29.8609 21.3528C27.6832 21.3528 25.9115 23.1246 25.9115 25.3022V41.822H18.397V10.4787H54.0798V41.8221H52.2265ZM56.2805 8.27808V6.01626H70.1455V8.27808H56.2805Z",fill:"black"}),a.createElement("path",{id:"Vector_12",d:"M42.6184 4.27234H29.8592C29.2514 4.27234 28.7589 4.76499 28.7589 5.37266C28.7589 5.98033 29.2514 6.47298 29.8592 6.47298H42.6184C43.2262 6.47298 43.7187 5.98033 43.7187 5.37266C43.7187 4.76499 43.2262 4.27234 42.6184 4.27234ZM31.7064 12.5905H23.0183C22.7265 12.5905 22.4466 12.7064 22.2403 12.9127C22.0339 13.1191 21.918 13.399 21.918 13.6908V18.7162C21.918 19.008 22.0339 19.2879 22.2403 19.4942C22.4466 19.7006 22.7265 19.8165 23.0183 19.8165H31.7064C31.9983 19.8165 32.2781 19.7006 32.4845 19.4942C32.6908 19.2879 32.8068 19.008 32.8068 18.7162V13.6908C32.8068 13.399 32.6908 13.1191 32.4845 12.9127C32.2781 12.7064 31.9983 12.5905 31.7064 12.5905ZM30.6061 17.6158H24.1186V14.7911H30.6061V17.6158ZM59.5862 18.4578H66.1225C66.7304 18.4578 67.2229 17.9
1652 67.2229 17.3575C67.2229 16.7498 66.7304 16.2572 66.1225 16.2572H59.5862C59.2944 16.2572 59.0145 16.3731 58.8082 16.5794C58.6018 16.7858 58.4859 17.0657 58.4859 17.3575C58.4859 17.6493 58.6018 17.9292 58.8082 18.1355C59.0145 18.3419 59.2944 18.4578 59.5862 18.4578ZM66.1225 23.1912C66.7304 23.1912 67.2229 22.6986 67.2229 22.0909C67.2229 21.4833 66.7304 20.9906 66.1225 20.9906H59.5862C58.9784 20.9906 58.4859 21.4833 58.4859 22.0909C58.4859 22.6986 58.9784 23.1912 59.5862 23.1912H66.1225ZM6.19602 18.4578H12.7322C13.34 18.4578 13.8325 17.9652 13.8325 17.3575C13.8325 16.7498 13.34 16.2572 12.7322 16.2572H6.19602C5.9042 16.2572 5.62433 16.3731 5.41798 16.5794C5.21163 16.7858 5.0957 17.0657 5.0957 17.3575C5.0957 17.6493 5.21163 17.9292 5.41798 18.1355C5.62433 18.3419 5.9042 18.4578 6.19602 18.4578ZM12.7322 20.9906H6.19602C5.58821 20.9906 5.0957 21.4833 5.0957 22.0909C5.0957 22.6986 5.58821 23.1912 6.19602 23.1912H12.7322C13.34 23.1912 13.8325 22.6986 13.8325 22.0909C13.8325 21.4833 13.34 20.9906 12.7322 20.9906ZM48.8474 15.1032H37.1746C36.5668 15.1032 36.0743 15.5958 36.0743 16.2035C36.0743 16.8111 36.5668 17.3038 37.1746 17.3038H48.8474C49.4552 17.3038 49.9477 16.8111 49.9477 16.2035C49.9477 15.5958 49.4552 15.1032 48.8474 15.1032Z",fill:"black"}))))}const Ot=a.forwardRef(Lt),Wt=(i.p,e=>{let t=e.audienceType,i=e.setAudienceType,n=e.activities,s=e.selectedActivity,l=e.setSelectedActivity,c=e.handleSurveyHasAILedTasks,d=e.activityHasAILedTasks;const p=(0,a.useState)(""),h=(0,o.A)(p,2),u=h[0],x=h[1],m=[(0,ne.t)("rpsAudienceGeneralPublic","General Public"),(0,ne.t)("rpsAudienceBusiness","Business Professionals"),(0,ne.t)("rpsAudienceSenior","Senior Business & Healthcare Professionals")],g=[{header:(0,ne.t)("rpsAudienceDesc0Header","Everyday Consumers, Diverse Population"),shortCost:(0,ne.t)("rpsAudienceDesc0Short","0.25 credit"),longCost:(0,ne.t)("rpsAudienceDesc0Long","0.5 credit"),aiLedTaskCost:(0,ne.t)("rpsAudienceDesc0Ai","0.5 credit")},{header:(0,ne.t)("rpsAudienceDesc1Header","Up to B2B Manager"),shortCost:(0,ne.t)("rpsAudienceDesc1S
1hort","1 credit"),longCost:(0,ne.t)("rpsAudienceDesc1Long","2 credits"),aiLedTaskCost:(0,ne.t)("rpsAudienceDesc1Ai","1 credit")},{header:(0,ne.t)("rpsAudienceDesc2Header","B2B Director to VP & HCP Non-Specialists"),shortCost:(0,ne.t)("rpsAudienceDesc2Short","2 credits"),longCost:(0,ne.t)("rpsAudienceDesc2Long","3 credits"),aiLedTaskCost:(0,ne.t)("rpsAudienceDesc2Ai","2 credits")}];return(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"24px",fontWeight:600,paddingBottom:"8px"},children:(0,ne.t)("rpsWelcomeTitle","Welcome to your panel recruitment screener")}),(0,Z.jsx)(_e.A,{sx:{fontSize:"16px",lineHeight:"22px",color:"text.primary",paddingBottom:"16px"},children:(0,ne.t)("rpsWelcomeBody","This form will help you quickly and easily recruit respondents from a panel. Please note: this form may only be submitted one time for one activity in this project. Once submitted, you will not be able to make changes to the activities.")}),(0,Z.jsxs)(_e.A,{sx:{paddingBottom:"32px"},children:[(0,Z.jsx)(_e.A,{sx:{fontSize:"14px",color:"text.primary",paddingBottom:"8px"},children:(0,ne.t)("rpsActivityRecruitFor","Activity to recruit for:")}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(tt.A,{options:null!==n&&void 0!==n?n:[],getOptionLabel:e=>e.name,value:s,onChange:(e,t,i)=>{l(t),"selectOption"===i&&x(""),null!==t&&void 0!==t&&t.id&&c(t.id)},disableClearable:!0,inputValue:u,onInputChange:(e,t,i)=>"reset"!==i&&x(t),sx:{"& .MuiFormControl-root":{padding:0}},isOptionEqualToValue:(e,t)=>e.id===t.id,renderInput:e=>(0,Z.jsx)(k.A,(0,r.A)((0,r.A)({},e),{},{sx:{padding:"8px 16px","& .MuiInputBase-root":{gap:"8px"}},variant:"outlined",inputProps:(0,r.A)((0,r.A)({},e.inputProps),{},{value:u,onBlur:()=>{var t;x(""),null===(t=e.inputProps)||void 0===t||t.onBlur()}}),InputProps:(0,r.A)((0,r.A)({},null===e||void 0===e?void 0:e.InputProps),{},{value:u,startAdornment:s&&(0,Z.jsx)(ot.A,{position:"start",children:(0,Z.jsx)(it.A,{label:null===s||void 0===s?void 0:s.name,onDelete:null,sx:{margin:"0 !important",backgroundColor:"secondary.main",color:"text.header.hover",borderRadius:"4px","& .MuiChip-label":{padding:"7px 16px"}}})})})}))}),d?(0,Z.jsx)(_e.A,{sx:(0,r.A)((0,r.A)({},wt),{},{mt:"8px"}),children:(0,ne.t)("rpsAiLedTasksNote","*this activity uses AI-Led Conversation tasks")}):null]})]}),(0,Z.jsxs)(_e.A,{sx:ht,children:[(0,Z.jsx)(_e.A,{sx:{fontSize:"24px",fontWeight:600,color:"text.primary",paddingBottom:"16px"},id:"audience-field-header",children:(0,ne.t)("rpsChooseAudience","Choose the audience you want to talk to:")}),(0,Z.jsx)(rt.A,{name:"audience",value:t,onChange:i,"aria-labelledby":"audience-field-header",children:m.map(((e,t)=>(0,Z.jsx)(st.A,{labelPlacement:"start",label:e,value:t,control:(0,Z.jsx)(at.A,{checkedIcon:(0,Z.jsx)(lt.A,{}),icon:(0,Z.jsx)(te.A,{})})},e)))})]}),(0,Z.jsx)(_e.A,{sx:{fontSize:"14px",lineHeight:"24px",color:"text.primary","& ul":{margin:"0 0 0 4px",padding:0,listStylePosition:"inside"}},children:null===t?(0,Z.jsxs)(_e.A,{sx:{marginTop:"24px",padding:"32px 0",textAlign:"center",color:"text.secondary",lineHeight:"20px",display:"flex",flexDirection:"column",alignItems:"center",gap:"13px"},children:[(0,Z.jsx)(Ot,{}),(0,Z.jsx)(_e.A,{children:(0,Z.jsxs)("i",{children:[(0,ne.t)("rpsSelectAudienceHintPrefix","Select a target audience to"),(0,Z.jsx)("br",{}),(0,ne.t)("rpsSelectAudienceHintSuffix","view subscription details")]})})]}):(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"16px",fontWeight:600,paddingTop:"24px",paddingBottom:"16px"},children:g[t].header}),(0,Z.jsx)(_e.A,{children:(0,ne.t)("rpsSubscriptionCreditIntro","Your subscription includes recruitment credits. Here's the credit cost breakdown for self-paced recruits:")}),(0,Z.jsx)(_e.A,{sx:{marginTop:"8px",marginBottom:"24px"},children:d?(0,Z.jsx)("ul",{children:(0,Z.jsx)("li",{children:(0,ne.t)("rpsPerRespondent","%s per respondent").replace("%s",g[t].aiLedTaskCost)})}):(0,Z.jsxs)("ul",{children:[(0,Z.jsx)("li",{children:(0,ne.t)("rpsCreditFewerThan30","%s for fewer than 30 minutes of async tasks").replace("%s",g[t].shortCost)}),(0,Z.jsx)("li",{children:(0,ne.t)("rpsCredit30Plus","%s for 30+ minutes of self
1-paced tasks").replace("%s",g[t].longCost)})]})})]})}),null!==t&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(nt.A,{sx:{color:"divider",borderStyle:"solid",margin:0}}),(0,Z.jsxs)(_e.A,{sx:{margin:"16px 0",color:"text.primary",fontSize:"12px",lineHeight:"20px"},children:[(0,Z.jsx)("b",{children:(0,ne.t)("rpsDisclaimerLead","Disclaimer")}),": ",(0,ne.t)("rpsDisclaimerBody","If your remaining recruitment credit balance is insufficient to cover this study, any additional costs will be billed at the standard rate.")," ",(0,Z.jsx)("span",{id:"diy-recruit-other-conditions-disclaimer",style:{color:"primary.main"},children:(0,ne.t)("rpsOtherConditions","Other conditions apply.")})," ",(0,ne.t)("rpsContactCare","To add recruitment credits to your subscription, please contact Customer Care at")," ",(0,Z.jsx)(Ze.A,{href:"mailto:[email protected]",sx:{color:"secondary.main"},children:"[email protected]"})]})]})]})});var Ht=i(65429),Dt=i(19647),Mt=i(98523),zt=i(73175);const Ft=["children"],qt=["key"],Vt=e=>{let t=e.children,i=(0,_.A)(e,Ft);return(0,Z.jsx)(_e.A,(0,r.A)((0,r.A)({sx:{backgroundColor:"white",borderRadius:"16px",border:e=>"1px solid ".concat(e.palette.action.inactive)}},i),{},{children:t}))},Qt=e=>{let t=e.id,i=e.ariaDescribedby,n=e.options,s=e.value,o=e.onChange,a=e.placeholder,l=e.maxSelections,c=e.fullWidth;return(0,Z.jsx)(tt.A,{id:t,"aria-describedby":i,multiple:!0,options:n,PaperComponent:Vt,renderInput:e=>(0,Z.jsx)(k.A,(0,r.A)({sx:{maxWidth:c?"unset":"450px",padding:"8px 16px","& .MuiInputBase-root":{gap:"8px"},"& .MuiInputBase-input::placeholder":{fontStyle:"italic"}},variant:"outlined",placeholder:a},e)),renderTags:(e,t)=>e.map(((e,i)=>{const n=t({index:i}),s=n.key,o=(0,_.A)(n,qt);return(0,Z.jsx)(it.A,(0,r.A)((0,r.A)({label:e.value},o),{},{sx:{margin:"0 !important",backgroundColor:"secondary.main",color:"text.header.hover",borderRadius:"4px","& .MuiChip-label":{padding:"7px 16px"}},onDelete:null}),s)})),renderOption:(e,t,i)=>(0,Z.jsxs)(_e.A,(0,r.A)((0,r.A)({},e),{},{sx:{color:e=>e.palette.text.primary,fontSize:"14px",fontWeight:600,lineHeight:"20px",padding:"8px 16px",display:"flex",gap:"8px"},children:[i.selected?(0,Z.jsx)(lt.A,{}):(0,Z.jsx)(te.A,{})," ",t.value]})),getOptionDisabled:e=>(null===s||void 0===s?void 0:s.length)>=l&&!s.find((t=>t.code===e.code)),getOptionLabel:e=>e.value,disableClearable:!0,disableCloseOnSelect:!0,value:s,onChange:(e,t,i)=>{e.key&&"Backspace"===e.key&&"removeOption"===i||o(t)},isOptionEqualToValue:(e,t)=>e.code===t.code,sx:{display:"inline","& .MuiFormControl-root":{padding:0}}})},Ut=e=>{let t=e.value,i=e.onChange;return(0,Z.jsxs)(_e.A,{sx:{boxSizing:"border-box",height:"72px",width:"256px",padding:"16px",border:e=>"1px solid ".concat(e.palette.action.inactive),borderRadius:"4px",display:"flex",alignItems:"center",justifyContent:"space-between",color:"text.primary"},children:[(0,ne.t)("rpsMinutesSuffix","%s minutes").replace("%s",String(t)),(0,Z.jsxs)(_e.A,{sx:{display:"flex",gap:"6px"},children:[(0,Z.jsx)(m.A,{sx:jt,onClick:()=>i((e=>Math.max(5,e-5))),disabled:t<=5,children:(0,Z.jsx)(Mt.A,{})}),(0,Z.jsx)(m.A,{sx:jt,onClick:()=>i((e=>e+5)),children:(0,Z.jsx)(N.A,{})})]})]})},Gt=e=>{let t=e.activityIntroduction,i=e.handleActivityIntroductionChange,s=e.activityDuration,l=e.setActivityDuration,c=e.targetCountry,d=e.setTargetCountry,p=e.projectTopics,h=e.setProjectTopics,u=e.industries,m=e.setIndustries,g=e.jobFunctions,A=e.setJobFunctions,v=e.audienceType,y=e.selectedActivity,j=e.activityDisplayName,C=e.setActivityDisplayName;const f=(0,a.useState)([]),S=(0,o.A)(f,2),w=S[0],I=S[1],T=(0,a.useState)([]),R=(0,o.A)(T,2),N=R[0],B=R[1],P=(0,a.useState)([]),E=(0,o.A)(P,2),L=E[0],O=E[1],W=(0,a.useState)([]),H=(0,o.A)(W,2),D=H[0],M=H[1],z=[{value:0,label:(0,ne.t)("rpsAudienceLabelConsumers","General Consumers"),apiString:"b2c"},{value:1,label:(0,ne.t)("rpsAudienceLabelB2b","Up to B2B Managers"),apiString:"b2b"},{value:2,label:(0,ne.t)("rpsAudienceLabelHealthcare","B2B Director to VP & HCP Non-Specialists"),apiString:"b2b-healthcare"}];(0,a.useEffect)((()=>
1{F.A.getRequest("/ajax/screener/basicDetails?audienceType=".concat(z[v].apiString)).then((e=>{I((null===e||void 0===e?void 0:e.countries)||[]),B((null===e||void 0===e?void 0:e.topics)||[]),O((null===e||void 0===e?void 0:e.industries)||[]),M((null===e||void 0===e?void 0:e.jobFunctions)||[])})).catch((e=>{console.error("Failed to fetch Basic Details lists:",e)}))}),[v]);const q="/project/".concat(n.A.projectId,"/selfCaptures?surveyId=").concat(null===y||void 0===y?void 0:y.id,"&surveyTab=requirements");return(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:{paddingBottom:"24px"},children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"24px",fontWeight:600},children:(0,ne.t)("rpsBasicDetailsTitle","Basic Details")}),null!==y&&void 0!==y&&y.quota?(0,Z.jsxs)(_e.A,{sx:{color:"text.primary",fontSize:"12px",fontWeight:600},children:[(0,ne.t)("rpsRecruiting","Recruiting")," ",y.quota," ",z[v].label,y.endDate?(0,ne.t)("rpsByDate"," by %s").replace("%s",y.endDate.date):"","."," ",(0,ne.t)("rpsGoToActivitySettings","Go to")," ",(0,Z.jsx)(Ze.A,{href:q,children:(0,ne.t)("rpsActivitySettingsLink","activity settings")})," ",(0,ne.t)("rpsToEdit","to edit.")]}):(0,Z.jsxs)(Ht.A,{severity:"error",sx:{padding:"16px",marginTop:"8px"},icon:(0,Z.jsx)(zt.A,{}),children:[(0,Z.jsx)(_e.A,{sx:{fontSize:"14px",fontWeight:600,lineHeight:"20px",color:"error.main"},children:(0,ne.t)("rpsQuotaRequiredTitle","Activity Quota Required")}),(0,Z.jsx)(_e.A,{sx:{fontSize:"14px",lineHeight:"20px",color:"text.primary",paddingBottom:"8px"},children:(0,ne.t)("rpsQuotaRequiredBody","Please return to the activity settings to specify how many respondents you intend to recruit!")}),(0,Z.jsx)(x.A,{component:Ze.A,sx:(0,r.A)((0,r.A)({},ut),{},{padding:"6px 24px"}),href:q,children:(0,ne.t)("rpsUpdateActivityQuota","Update Activity Quota")})]})]}),(0,Z.jsxs)(_e.A,{sx:{paddingBottom:"32px"},children:[(0,Z.jsx)(_e.A,{id:"activity-display-name-label",sx:{fontSize:"14px",lineHeight:"21px",color:"text.primary"},children:(0,ne.t)("rpsActivityDisplayNameLabel","Activity Display Name (visible to respondents)")}),(0,Z.jsx)(_e.A,{id:"activity-display-name-helper",sx:{fontSize:"12px",lineHeight:"18px",color:"text.secondary",paddingBottom:"8px"},children:(0,ne.t)("rpsActivityDisplayNameHelper","This name will be shown to candidates in the panel as they\u2019re being recruited.")}),(0,Z.jsx)(k.A,{variant:"outlined",sx:vt,fullWidth:!0,value:j,onChange:e=>C(e.target.value),"aria-labelledby":"activity-display-name-label","aria-describedby":"activity-display-name-helper"})]}),(0,Z.jsxs)(_e.A,{sx:{paddingBottom:"32px"},children:[(0,Z.jsxs)(b.A,{sx:{width:"100%"},children:[(0,Z.jsx)(Dt.A,{sx:mt,htmlFor:"activity-introduction-field",children:(0,ne.t)("rpsActivityIntroductionLabel","Activity Introduction")}),(0,Z.jsx)(_e.A,{sx:gt,id:"activity-introduction-description",children:(0,ne.t)("rpsActivityIntroductionHelper","Enter a description for your respondents that will set context and/or provide instructions about what will be required of them for this study.")}),(0,Z.jsx)(k.A,{id:"activity-introduction-field",variant:"outlined",sx:(0,r.A)((0,r.A)({},vt),{},{borderRadius:0,"& .MuiOutlinedInput-root":{padding:"16px"}}),multiline:!0,fullWidth:!0,placeholder:(0,ne.t)("rpsDescriptionPlaceholder","Description *"),rows:3,inputProps:{maxLength:800,"aria-describedby":"activity-introduction-description"},value:t,onChange:i})]}),(0,Z.jsx)(_e.A,{sx:{textAlign:"right",fontSize:"12px",lineHeight:"18px",color:"text.primary"},children:(0,ne.t)("rpsCharCount","%s / 800 characters").replace("%s",String(t.length))})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:mt,children:(0,ne.t)("rpsActivityDurationLabel","Activity Duration")}),(0,Z.jsx)(_e.A,{sx:gt,children:(0,ne.t)("rpsActivityDurationHelper","Expected amount of time it will take a respondent to complete the activity. You can increase or decrease in 5 minute increments.")}),(0,Z.jsx)(Ut,{value:s,onChange:l})]}),(0,Z.jsx)(nt.A,{sx:yt}),(0,Z.jsx)(_e.A,{children:(0,Z.jsxs)(b.A,{sx:{width:"100%"},children:[(0,Z.jsx)(Dt.A,{sx:mt,htmlFor:"country-field",children:(0,ne.t)("rpsCountryLabel","Country")}),(0,Z.jsx)(_e.A,{sx:gt,id:"country-helper-text",children:(0,ne.t)("rpsCountryHelper","All Countries is selected by default, but type in your specific country names to replace the option.")}),(0,Z.jsx)(Qt,{id:"country-field",ariaDescribedby:"country-helper-text",options:w,maxSelections:50,value:c,onChange:d})]})}),0===v&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(nt.A,{sx:yt}),(0,Z.jsx)(_e.A,{children:(0,Z.jsxs)(b.A,{children:[(0,Z.jsx)(Dt.A,{sx:mt,htmlFor:"project-topics-field",children:(0,ne.t)("rpsProjectTopicsLabel","Project Topics")}),(0,Z.jsx)(_e.A,{sx:(0,r.A)((0,r.A)({},gt),{},{textWrap:"balance"}
1),id:"project-topics-helper-text",children:(0,ne.t)("rpsProjectTopicsHelper","Select up to 2 topics to tag to this screener. Topic tags improve repsonse rates, as potential participants from the general population will be matched based on their interest in this topic.")}),(0,Z.jsx)(Qt,{id:"project-topics-field",ariaDescribedby:"project-topics-helper-text",options:N,maxSelections:2,value:p,onChange:h,placeholder:(0,ne.t)("rpsTopicsPlaceholder","Select the topics of this research")})]})})]}),0!==v&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(nt.A,{sx:yt}),(0,Z.jsx)(_e.A,{sx:{paddingBottom:"24px"},children:(0,Z.jsxs)(b.A,{sx:{width:"100%"},children:[(0,Z.jsx)(Dt.A,{sx:mt,htmlFor:"industries-field",children:(0,ne.t)("rpsIndustriesLabel","Industries")}),(0,Z.jsx)(_e.A,{sx:gt,id:"industries-helper-text",children:(0,ne.t)("rpsIndustriesHelper","Select up to 5 industries. All industries is selected unless you type in and select a specific industry.")}),(0,Z.jsx)(Qt,{id:"industries-field",ariaDescribedby:"industries-helper-text",options:L,maxSelections:5,value:u,onChange:m,placeholder:(0,ne.t)("rpsIndustriesPlaceholder","Select the industry your audience works in"),fullWidth:!0})]})}),(0,Z.jsx)(_e.A,{children:(0,Z.jsxs)(b.A,{sx:{width:"100%"},children:[(0,Z.jsx)(Dt.A,{sx:mt,htmlFor:"job-function-field",children:(0,ne.t)("rpsJobFunctionLabel","Job Function")}),(0,Z.jsx)(_e.A,{sx:gt,id:"job-function-helper-text",children:(0,ne.t)("rpsJobFunctionHelper","Select up to 3 job functions. All job functions is selected unless you type in and select a specific job function.")}),(0,Z.jsx)(Qt,{id:"job-function-field",ariaDescribedby:"job-function-helper-text",options:D,maxSelections:3,value:g,onChange:A,placeholder:(0,ne.t)("rpsJobFunctionPlaceholder","Select the job functions of your audience"),fullWidth:!0})]})})]})]})};var Xt=i(24516),_t=i(29277);const Zt=["b2c","b2b","b2b-healthcare"],Yt=e=>{let t=e.pastParticipation,i=e.setPastParticipation,n=e.pastParticipationMonths,s=e.setPastParticipationMonths,l=e.gender,c=e.setGender,d=e.seniority,p=e.setSeniority,h=e.companySize,u=e.setCompanySize,x=e.jobTitle,m=e.setJobTitle,g=e.skills,A=e.setSkills,v=e.householdIncome,y=e.setHouseholdIncome,j=e.education,C=e.setEducation,f=e.ethnicity,S=e.setEthnicity,w=e.ageRange,I=e.setAgeRange,T=e.audienceType,R=e.industries;const k=2===T&&R.map((e=>e.value)).includes("Hospital & Health Care"),N=(0,a.useState)([]),B=(0,o.A)(N,2),P=B[0],E=B[1],L=(0,a.useState)([]),H=(0,o.A)(L,2),D=H[0],M=H[1],z=(0,a.useState)([]),q=(0,o.A)(z,2),V=q[0],Q=q[1],U=(0,a.useState)([]),G=(0,o.A)(U,2),X=G[0],_=G[1],Y=(0,a.useState)([]),J=(0,o.A)(Y,2),K=J[0],$=J[1],ee=(0,a.useState)([]),te=(0,o.A)(ee,2),ie=te[0],se=te[1],oe=(0,a.useState)([]),re=(0,o.A)(oe,2),ae=re[0],le=re[1],ce=(0,a.useState)([]),de=(0,o.A)(ce,2),pe=de[0],he=de[1];return(0,a.useEffect)((()=>{F.A.getRequest("/ajax/screener/criteria?audienceType=".concat(Zt[T])).then((e=>{E((null===e||void 0===e?void 0:e.householdIncome)||[]),M((null===e||void 0===e?void 0:e.education)||[]),Q((null===e||void 0===e?void 0:e.ethnicity)||[]),_((null===e||void 0===e?void 0:e.ageRange)||[]),$((null===e||void 0===e?void 0:e.seniority)||[]),se((null===e||void 0===e?void 0:e.companySize)||[]),le((null===e||void 0===e?void 0:e.jobTitles)||[]),he((null===e||void 0===e?void 0:e.skills)||[])})).catch((e=>{console.error("Failed to fetch Criteria lists:",e)}))}),[T]),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"24px",fontWeight:600},children:(0,ne.t)("rpsScreeningCriteriaTitle","Screening Criteria")}),(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"16px",lineHeight:"24px",paddingBottom:"24px"},children:(0,ne.t)("rpsScreeningCriteriaSubtitle","Allow participants to apply only if they meet the following criteria")}),(0,Z.jsxs)(_e.A,{sx:{display:"flex",gap:"40px"},children:[(0,Z.jsx)(_e.A,{sx:{flex:1},children:(0,Z.jsxs)(b.A,{children:[(0,Z.jsxs)(_e.A,{sx:xt,children:[(0,Z.jsx)(_t.A,{sx:(0,r.A)((0,r.A)({},mt),{},{"&:active":{color:"text.primary"},"&.Mui-focused":{color:"text.primary"}}),children:(0,ne.t)("rpsPastParticipation","Past Participation")}),(0,Z.jsx)(Xt.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsxs)(rt.A,{name:"past-participation",value:t,onChange:(e,t)=>
1i(t),children:[(0,Z.jsx)(st.A,{value:0,control:(0,Z.jsx)(at.A,{sx:bt}),label:(0,ne.t)("rpsNoPreference","No Preference")}),(0,Z.jsx)(st.A,{value:1,control:(0,Z.jsx)(at.A,{sx:bt}),label:(0,ne.t)("rpsNeverParticipatedDiscuss","Has never participated in a project with Discuss")}),(0,Z.jsx)(st.A,{value:2,control:(0,Z.jsx)(at.A,{sx:bt}),label:(0,Z.jsxs)(Z.Fragment,{children:[(0,ne.t)("rpsNotParticipatedLast","Has not participated in a project with Discuss in the last")," ",(0,Z.jsx)(O.A,{variant:"outlined",sx:{height:"26px","& .MuiOutlinedInput-notchedOutline":{margin:"0 4px"}},value:n,onChange:e=>s(e.target.value),children:[1,2,3,6,9,12].map((e=>(0,Z.jsx)(W.A,{value:e,children:e.toString().padStart(2,"0")},e)))})," ",(0,ne.t)("rpsMonths","months")]})})]})]})}),(0,Z.jsx)(_e.A,{sx:{flex:1},children:(0,Z.jsxs)(b.A,{children:[(0,Z.jsxs)(_e.A,{sx:xt,children:[(0,Z.jsx)(_t.A,{sx:(0,r.A)((0,r.A)({},mt),{},{"&:active":{color:"text.primary"},"&.Mui-focused":{color:"text.primary"}}),children:(0,ne.t)("rpsGender","Gender")}),(0,Z.jsx)(Xt.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsxs)(rt.A,{name:"gender",value:l,onChange:(e,t)=>
1c(t),children:[(0,Z.jsx)(st.A,{value:"N/A",control:(0,Z.jsx)(at.A,{sx:bt}),label:(0,ne.t)("rpsNoPreference","No Preference")}),(0,Z.jsx)(st.A,{value:"male",control:(0,Z.jsx)(at.A,{sx:bt}),label:(0,ne.t)("rpsAllMale","All Male")}),(0,Z.jsx)(st.A,{value:"female",control:(0,Z.jsx)(at.A,{sx:bt}),label:(0,ne.t)("rpsAllFemale","All Female")}),(0,Z.jsx)(st.A,{value:"other",control:(0,Z.jsx)(at.A,{sx:bt}),label:(0,ne.t)("rpsAllOther","All Other")})]})]})})]}),(0,Z.jsx)(nt.A,{sx:yt}),(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"24px",fontWeight:600,paddingBottom:"24px"},children:(0,ne.t)("rpsChooseAllApply","Choose all that apply for each Criteria")}),(0,Z.jsxs)(_e.A,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",columnGap:"40px",rowGap:"24px",paddingBottom:"12px"},children:[0!==T&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:(0,r.A)((0,r.A)({},mt),{},{paddingBottom:"8px"}),children:(0,ne.t)("rpsSeniority","Seniority")}),(0,Z.jsx)(Qt,{value:d,onChange:p,options:K,placeholder:(0,ne.t)("rpsPhSeniority","Select seniority(s)")})]}),0!==T&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:(0,r.A)((0,r.A)({},mt),{},{paddingBottom:"8px"}),children:(0,ne.t)("rpsCompanySize","Company Size")}),(0,Z.jsx)(Qt,{value:h,onChange:u,options:ie,placeholder:(0,ne.t)("rpsPhCompanySize","Select company size(s)")})]}),k&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:(0,r.A)((0,r.A)({},xt),{},{paddingBottom:"8px"}),children:[(0,Z.jsx)(_e.A,{sx:mt,children:(0,ne.t)("rpsHealthcareRoles","Healthcare Roles")}),(0,Z.jsx)(_e.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsx)(Qt,{value:x,onChange:m,options:ae,placeholder:(0,ne.t)("rpsPhTitles","Select title(s)"),maxSelections:10})]}),0!==T&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:(0,r.A)((0,r.A)({},xt),{},{paddingBottom:"8px"}),children:[(0,Z.jsx)(_e.A,{sx:mt,children:(0,ne.t)("rpsSkills","Skills")}),(0,Z.jsx)(_e.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsx)(Qt,{value:g,onChange:A,options:pe,placeholder:(0,ne.t)("rpsPhSkills","Select skills")})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:(0,r.A)((0,r.A)({},xt),{},{paddingBottom:"8px"}),children:[(0,Z.jsx)(_e.A,{sx:mt,children:(0,ne.t)("rpsHouseholdIncome","Household Income")}),(0,Z.jsx)(_e.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsx)(Qt,{value:v,onChange:y,options:P,placeholder:(0,ne.t)("rpsPhIncome","Select income(s)")})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:(0,r.A)((0,r.A)({},xt),{},{paddingBottom:"8px"}),children:[(0,Z.jsx)(_e.A,{sx:mt,children:(0,ne.t)("rpsEducation","Education")}),(0,Z.jsx)(_e.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsx)(Qt,{value:j,onChange:C,options:D,placeholder:(0,ne.t)("rpsPhEducation","Select education level(s)")})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:(0,r.A)((0,r.A)({},xt),{},{paddingBottom:"8px"}),children:[(0,Z.jsx)(_e.A,{sx:mt,children:(0,ne.t)("rpsEthnicity","Ethnicity")}),(0,Z.jsx)(_e.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsx)(Qt,{value:f,onChange:S,options:V,placeholder:(0,ne.t)("rpsPhEthnicity","Select ethnicity(s)")})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:(0,r.A)((0,r.A)({},xt),{},{paddingBottom:"8px"}),children:[(0,Z.jsx)(_e.A,{sx:mt,children:(0,ne.t)("rpsAgeRange","Age Range")}),(0,Z.jsx)(_e.A,{sx:At,children:(0,Z.jsx)("i",{children:(0,ne.t)("rpsOptional","Optional")})})]}),(0,Z.jsx)(Qt,{value:w,onChange:I,options:X,placeholder:(0,ne.t)("rpsPhAge","Select age range(s)")})]})]})]})};var Jt=i(39919),Kt=i(40038),$t=i(87962);const ei=e=>{let t=e.screenerQuestion,i=e.questionIndex,n=(e.questionCount,e.handleQuestionChange),s=e.handleResponseTypeChange,o=e.handleResponsesValueChange,l=e.handleResponsesLogicChange,c=e.handleAddResponse,d=e.handleResponsesDragEnd,p=e.handleRemoveResponse,h=e.handleRemoveQuestion,u=e.handleAddOther;const g=(0,a.useId)(),A=t.question,v=t.responseType,y=t.responses,j=t.allOptionsTerminateError,b=[{value:"radio",label:(0,ne.t)("rpsSelectOne","Select One")},{value:"checkbox",label:(0,ne.t)("rpsSelectAllApply","Select all that Apply")}];return(0,Z.jsxs)(_e.A,{sx:{border:e=>j?"2px solid red":"1px solid ".concat(e.palette.action.inactive),borderRadius:"32px",padding:"24px",flexGrow:1},children:[(0,Z.jsx)(k.A,{variant:"outlined",fullWidth:!0,sx:vt,placeholder:(0,ne.t)("scrTypeYourQuestion","Type your question..."),value:A,onChange:e=>n(e,i)}),(0,Z.jsxs)(_e.A,{sx:{padding:"16px 0"},children:[(0,ne.t)("rpsResponseType","Response Type:"),(0,Z.jsx)(Kt.A,{value:v,exclusive:!0,onChange:(e,t)=>
1s(t,i),sx:{paddingLeft:"8px",gap:"8px"},children:b.map((e=>(0,Z.jsx)(Jt.A,{value:e.value,sx:Ct,disableRipple:!0,children:e.label},e.value)))}),(0,Z.jsx)(M.JY,{onDragEnd:e=>d(e,i),children:(0,Z.jsx)(M.gL,{droppableId:g,children:e=>(0,Z.jsxs)(_e.A,(0,r.A)((0,r.A)({ref:e.innerRef},e.droppableProps),{},{sx:{display:"flex",flexDirection:"column",gap:"8px",padding:"8px 0"},children:[y.map(((e,t)=>(0,Z.jsx)(M.sx,{draggableId:"".concat(g,"-option-").concat(t),index:t,children:n=>(0,Z.jsxs)(_e.A,(0,r.A)((0,r.A)({},n.draggableProps),{},{ref:n.innerRef,sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,Z.jsx)(_e.A,(0,r.A)((0,r.A)({},n.dragHandleProps),{},{sx:{height:"24px",width:"24px",paddingRight:"5px"},children:(0,Z.jsx)(V.A,{sx:{fill:e=>e.palette.action.inactive}})})),"radio"===v?(0,Z.jsx)($t.A,{sx:{paddingRight:"8px",fill:e=>e.palette.action.active}}):(0,Z.jsx)(te.A,{sx:{paddingRight:"8px",fill:e=>e.palette.action.active}}),(0,Z.jsx)(_e.A,{sx:e.isOther?{paddingRight:"8px"}:{display:"none"},children:(0,ne.t)("scrOther","Other")}),(0,Z.jsx)(k.A,{variant:"outlined",sx:(0,r.A)((0,r.A)({},vt),{},{flexGrow:"1",marginBottom:0,marginRight:"6px"}),placeholder:(0,ne.t)("rpsTypeResponse","Type Response..."),value:e.value,onChange:e=>o(e,i,t),disabled:e.isOther},"".concat(g,"-option-").concat(t,"-text-field")),(0,Z.jsx)(_e.A,{sx:{paddingRight:"16px"},children:(0,Z.jsxs)(O.A,{variant:"outlined",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiSelect-select":{padding:"12px 16px",color:j?"error.main":"inherit",fontWeight:j?600:"inherit"}},value:e.logic.type,onChange:e=>l(e,i,t),children:[(0,Z.jsx)(W.A,{value:ri.MAY_SELECT,children:(0,ne.t)("rpsMaySelect","May Select")}),(0,Z.jsx)(W.A,{value:ri.TERMINATE,children:(0,ne.t)("rpsTerminateIfSelected","Terminate if Selected")})]})}),(0,Z.jsx)(m.A,{onClick:()=>p(i,t),children:(0,Z.jsx)(L.A,{sx:{fill:e=>e.palette.action.inactive}})})]}))},"".concat(g,"-option-").concat(t)))),e.placeholder]}))})}),j&&(0,Z.jsx)(_e.A,{sx:{color:"error.main",fontSize:"14px",fontWeight:800,textAlign:"right",padding:"8px 0"},children:(0,ne.t)("rpsMustHaveMaySelect",'At least one option must be "May Select"')}),(0,Z.jsxs)(_e.A,{sx:{display:"flex",gap:"8px"},children:[(0,Z.jsxs)(x.A,{sx:ft,onClick:()=>c(i),children:[(0,Z.jsx)(N.A,{}),(0,ne.t)("rpsAddResponse","Add Response")]}),!y.find((e=>e.isOther))&&(0,Z.jsxs)(x.A,{sx:ft,onClick:()=>u(i),children:[(0,Z.jsx)(N.A,{}),(0,ne.t)("rpsAddOther","Add \u201cOther\u201d")]})]})]}),(0,Z.jsx)(_e.A,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,Z.jsxs)(x.A,{sx:{fontSize:"12px",fontStyle:"italic",fontWeight:400,gap:"4px",color:e=>e.palette.action.inactive,fill:e=>e.palette.action.inactive},onClick:()=>h(i),children:[(0,Z.jsx)(L.A,{sx:{height:"16px",width:"16px"}}),(0,ne.t)("rpsRemoveQuestion","Remove Question")]})})]})},ti=e=>{let t=e.screenerQuestions,i=e.handleQuestionChange,n=e.handleResponseTypeChange,s=e.handleResponsesValueChange,o=e.handleResponsesLogicChange,l=e.handleAddResponse,c=e.handleResponsesDragEnd,d=e.handleAddQuestion,p=e.handleRemoveResponse,h=e.handleRemoveQuestion,u=e.handleAddOther,m=e.handleQuestionDragEnd;const g=(0,a.useId)();return(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"24px",fontWeight:600},children:(0,ne.t)("rpsScreenerQuestionsTitle","Screener Questions")}),(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"16px",lineHeight:"24px",paddingBottom:"24px"},children:(0,ne.t)("rpsScreenerQuestionsSubtitle","Qualify respondents based on the demographics parameters you need.")}),(0,Z.jsx)(M.JY,{onDragEnd:m,children:(0,Z.jsx)(M.gL,{droppableId:g,children:e=>(0,Z.jsx)(_e.A,(0,r.A)((0,r.A)({ref:e.innerRef},e.droppableProps),{},{children:t.map(((e,a)=>(0,Z.jsx)(M.sx,{draggableId:"".concat(g,"-question-").concat(a),index:a,children:m=>(0,Z.jsxs)(_e.A,(0,r.A)((0,r.A)({},m.draggableProps),{},{ref:m.innerRef,children:[(0,Z.jsxs)(_e.A,{sx:{display:"flex",gap:"8px"},children:[(0,Z.jsxs)(_e.A,(0,r.A)((0,r.A)({sx:{display:"flex",gap:"16px",width:"64px",height:"24px",alignItems:"center",paddingTop:"24px"}},m.dragHandleProps),{},{children:[(0,Z.jsx)(V.A,{sx:{fill:e=>e.palette.action.inactive}}),(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontWeight:600},children:a+1})]})),(0,Z.jsx)(ei,{screenerQuestion:e,questionIndex:a,questionCount:t.length,handleQuestionChange:i,handleResponseTypeChange:n,handleResponsesValueChange:s,handleResponsesLogicChange:o,handleAddResponse:l,handleResponsesDragEnd:c,handleRemoveResponse:p,handleRemoveQuestion:h,handleAddOther:u})]}),(0,Z.jsx)(_e.A,{sx:{display:"flex",justifyContent:"space-around",paddingTop:"16px",paddingBottom:a===t.length-1?"8px":"24px"},children:(0,Z.jsxs)(x.A,{onClick:()=>d(a),sx:(0,r.A)((0,r.A)({},ut),{},{padding:"6px 16px 6px 9px"}),children:[(0,Z.jsx)(N.A,{}),(0,ne.t)("scrAddQuestion","Add Question")]})})]}))},"screener-question-".concat(a,"-container"))))}))})}),0===t.length&&(0,Z.jsx)(_e.A,{sx:{display:"flex",justifyContent:"space-around",padding:"16px 0 8px 0"},children:(0,Z.jsxs)(x.A,{onClick:()=>d(0),sx:(0,r.A)((0,r.A)({},ut),{},{padding:"6px 16px 6px 9px"}),children:[(0,Z.jsx)(N.A,{}),(0,ne.t)("scrAddQuestion","Add Question")]})})]})},ii=[{short:.25,long:.5,aiLedTaskCost:.5},{short:1,long:2,aiLedTaskCost:1},{short:2,long:3,aiLedTaskCost:2}],ni=e=>Intl.NumberFormat(navigator.language,{notation:"compact"}).format(e.toPrecision(2)),si=(e,t,i,n,s)=>{var o,r;const a=null===(o=t[i])||void 0===o?void 0:o[n<30?"short":"long"],l=null===(r=t[i])||void 0===r?void 0:r.aiLedTaskCost;return e*(s?l:a)},oi=e=>{var t;let i=e.audienceType,s=e.activityIntroduction,l=e.activityDuration,c=e.targetCountry,d=e.projectTopics,p=e.industries,h=e.jobFunctions,u=e.pastParticipation,x=e.pastParticipationMonths,m=e.gender,g=e.seniority,A=e.companySize,v=e.jobTitle,y=e.skills,j=e.householdIncome,b=e.education,C=e.ethnicity,f=e.ageRange,S=e.screenerQuestions,w=e.setActiveStep,I=e.selectedActivity,T=e.activityDisplayName,R=e.activityHasAILedTasks,k=e.isPublished;const N=(0,a.useState)(null),B=(0,o.A)(N,2),P=B[0],E=B[1],L=[(0,ne.t)("rpsAudienceGeneralPublic","General Public"),(0,ne.t)("rpsAudienceBusiness","Business Professionals"),(0,ne.t)("rpsAudienceSenior","Senior Business & Healthcare Professionals")],O={"N/A":(0,ne.t)("rpsNoPreference","No Preference"),male:(0,ne.t)("rpsAllMale","All Male"),female:(0,ne.t)("rpsAllFemale","All Female"),other:(0,ne.t)("rpsAllOther","All Other")};(0,a.useEffect)((()=>{W()}),[]);const W=()=>
1{F.A.getRequest("/ajax/project/".concat(n.A.projectId,"/screener/participantReach")).then((e=>{E(e)})).catch((e=>{console.error("Failed to get participant reach:",e)}))},H=(0,Z.jsx)("i",{children:(0,ne.t)("rpsNoneSpecified","None Specified")});return(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"24px",fontWeight:600},children:(0,ne.t)("rpsFinalReviewTitle","Final Review")}),(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"16px",lineHeight:"24px",paddingBottom:"32px"},children:(0,ne.t)("rpsFinalReviewSubtitle","Review your selections. When you\u2019re ready to begin recruiting respondent, click \u201cFinish\u201d at the bottom of the page.")}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"12px"},children:[(0,Z.jsxs)(_e.A,{sx:St,children:[(0,ne.t)("rpsRecruitingFor","Recruiting For:")," ",null===I||void 0===I?void 0:I.name,R?(0,Z.jsx)(_e.A,{sx:wt,children:(0,ne.t)("rpsAiLedTasksNote","*this activity uses AI-Led Conversation tasks")}):null]}),!k&&(0,Z.jsx)(Ze.A,{component:"button",underline:"none",sx:It,onClick:()=>w(0),children:(0,ne.t)("rpsEdit","Edit")})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsActivityDisplayNameSummary","Activity Display Name")}),(0,Z.jsx)(_e.A,{sx:Nt,children:T})]})]}),(0,Z.jsx)(nt.A,{sx:yt}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"12px"},children:[(0,Z.jsx)(_e.A,{sx:St,children:(0,ne.t)("rpsBasicStudyDetails","Basic Study Details")}),!k&&(0,Z.jsx)(Ze.A,{component:"button",underline:"none",sx:It,onClick:()=>w(1),children:(0,ne.t)("rpsEdit","Edit")})]}),(0,Z.jsx)(_e.A,{sx:{paddingBottom:"24px"},children:(0,Z.jsxs)(_e.A,{sx:Rt,children:[(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsAudience","Audience")}),(0,Z.jsx)(_e.A,{sx:Nt,children:L[i]})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsNumberOfParticipants","Number of Participants")}),(0,Z.jsx)(_e.A,{sx:Nt,children:null===I||void 0===I?void 0:I.quota})]})]})}),(0,Z.jsxs)(_e.A,{sx:{paddingBottom:"12px"},children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsActivityIntroduction","Activity Introduction")}),(0,Z.jsx)(_e.A,{sx:Nt,children:s})]}),(0,Z.jsxs)(_e.A,{sx:Rt,children:[(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsActivityDurationLabel","Activity Duration")}),(0,Z.jsx)(_e.A,{sx:Nt,children:(0,ne.t)("rpsMinutesSuffix","%s minutes").replace("%s",String(l))})]}),(null===I||void 0===I?void 0:I.endDate)&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsDeadline","Deadline")}),(0,Z.jsx)(_e.A,{sx:Nt,children:I.endDate.date})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsCountryLabel","Country")}),(0,Z.jsx)(_e.A,{sx:Nt,children:0===c.length?(0,ne.t)("rpsAllCountries","All Countries"):c.map((e=>e.value)).join(", ")})]}),0===i&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsProjectTopics","Project Topics")}),(0,Z.jsx)(_e.A,{sx:Nt,children:d.length>0?d.map((e=>e.value)).join(", "):H})]}),[1,2].includes(i)&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsIndustries","Industries")}),(0,Z.jsx)(_e.A,{sx:Nt,children:p.length>0?p.map((e=>e.value)).join(", "):H})]}),[1,2].includes(i)&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsJobFunction","Job Function")}),(0,Z.jsx)(_e.A,{sx:Nt,children:h.length>0?h.map((e=>e.value)).join(", "):H})]})]})]}),(0,Z.jsx)(nt.A,{sx:yt}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"12px"},children:[(0,Z.jsx)(_e.A,{sx:St,children:(0,ne.t)("rpsScreeningCriteriaSection","Screening Criteria")}),!k&&(0,Z.jsx)(Ze.A,{component:"button",underline:"none",sx:It,onClick:()=>w(2),children:(0,ne.t)("rpsEdit","Edit")})]}),(0,Z.jsxs)(_e.A,{sx:Rt,children:[(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsPastParticipationSummary","Past Participation")}),(0,Z.jsx)(_e.A,{sx:Nt,children:null===u?H:null===u?null:0===u?(0,ne.t)("rpsNoPreference","No Preference"):1===u?(0,ne.t)("rpsNeverParticipatedDiscuss","Has never participated in a project with Discuss"):(0,ne.t)("rpsPastParticipationMonths","Has not participated in a project with Discuss in the last %s months").replace("%s",String(null!==x&&void 0!==x?x:0))})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsGender","Gender")}),(0,Z.jsx)(_e.A,{sx:Nt,children:null===m?H:null!==(t=O[m])&&void 0!==t?t:m})]}),[1,2].includes(i)&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsSeniority","Seniority")}),(0,Z.jsx)(_e.A,{sx:Nt,children:g.length>0?g.map((e=>e.value)).join(", "):H})]}),[1,2].includes(i)&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsCompanySize","Company Size")}),(0,Z.jsx)(_e.A,{sx:Nt,children:A.length>0?A.map((e=>e.value)).join(", "):H})]}),2===i&&p.map((e=>e.value)).includes("Hospital & Health Care")&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsJobTitle","Job Title")}),(0,Z.jsx)(_e.A,{sx:Nt,children:v.length>0?v.map((e=>e.value)).join(", "):H})]}),[1,2].includes(i)&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsSkills","Skills")}),(0,Z.jsx)(_e.A,{sx:Nt,children:y.length>0?y.map((e=>e.value)).join(", "):H})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsHouseholdIncome","Household Income")}),(0,Z.jsx)(_e.A,{sx:Nt,children:j.length>0?j.map((e=>e.value)).join(", "):H})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsEducation","Education")}),(0,Z.jsx)(_e.A,{sx:Nt,children:b.length>0?b.map((e=>e.value)).join(", "):H})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsEthnicity","Ethnicity")}),(0,Z.jsx)(_e.A,{sx:Nt,children:C.length>0?C.map((e=>e.value)).join(", "):H})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:kt,children:(0,ne.t)("rpsAgeRange","Age Range")}),(0,Z.jsx)(_e.A,{sx:Nt,children:f.length>0?f.map((e=>e.value)).join(", "):H})]})]})]}),(0,Z.jsx)(nt.A,{sx:yt}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsxs)(_e.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingBottom:"12px"},children:[(0,Z.jsx)(_e.A,{sx:St,children:(0,ne.t)("rpsScreeningQuestions","Screening Questions")}),!k&&(0,Z.jsx)(Ze.A,{component:"button",underline:"none",sx:It,onClick:()=>w(3),children:(0,ne.t)("rpsEdit","Edit")})]}),(0,Z.jsx)(_e.A,{children:(0,Z.jsx)("ol",{style:{listStylePosition:"inside",paddingLeft:0,margin:0},children:S.map(((e,t)=>(0,Z.jsx)("li",{style:{fontSize:"14px",lineHeight:"22px"},children:e.question},"screener-question-review-".concat(t))))})})]}),(0,Z.jsxs)(_e.A,{sx:Tt,children:[(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:(0,r.A)((0,r.A)({},St),{},{lineHeight:"24px"}),children:(0,ne.t)("rpsEstimates","Estimates")}),(0,Z.jsx)(_e.A,{sx:{fontSize:"12px",lineHeight:"18px"},children:(0,ne.t)("rpsEstimatesBlurb","Participant Reach represents the number of active panelists eligible to be invited to your study. A higher reach increases the likelihood of quicker study completion, as more potential participants are available to join. If your reach is low, consider adjusting your criteria on the previous screens to expand the pool of qualified participants.")})]}),P&&(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"21px",fontWeight:"600",textWrap:"nowrap",textAlign:"center"},children:"".concat(ni(null===P||void 0===P?void 0:P.exactAudienceMatch)," - ").concat(ni(null===P||void 0===P?void 0:P.eligibleAudience))}),(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"14px",lineHeight:"20px",textWrap:"nowrap"},children:(0,ne.t)("rpsParticipantReach","Participant Reach")})]}),(0,Z.jsxs)(_e.A,{children:[(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"21px",fontWeight:"600",textAlign:"center"},children:si(null===I||void 0===I?void 0:I.quota,ii,i,l,R)}),(0,Z.jsx)(_e.A,{sx:{color:"text.primary",fontSize:"14px",lineHeight:"20px"},children:(0,ne.t)("rpsCredits","Credits")})]})]})]})},ri={MAY_SELECT:"may_select",TERMINATE:"terminate"}
1,ai=["rpsStepAudience","rpsStepBasicDetails","rpsStepCriteria","rpsStepQuestions","rpsStepFinalReview"],li=["Audience","Basic Details","Criteria","Questions","Final Review"],ci=["Director","Vice President","Partner","Chief Officer"],di={value:"",logic:{type:ri.MAY_SELECT},isOther:!1},pi=()=>({question:"",responseType:"radio",responses:[(0,r.A)({},di),(0,r.A)({},di)],allOptionsTerminateError:!1}),hi=()=>{const e=(0,a.useState)(null),t=(0,o.A)(e,2),i=t[0],s=t[1],l=(0,a.useState)(null),c=(0,o.A)(l,2),d=c[0],p=c[1],h=(0,a.useState)(!1),u=(0,o.A)(h,2),m=u[0],g=u[1],A=(0,a.useState)(),v=(0,o.A)(A,2),y=v[0],j=v[1],b=(0,a.useState)(),C=(0,o.A)(b,2),f=C[0],S=C[1];const w=(0,a.useState)(!1),I=(0,o.A)(w,2),T=I[0],R=I[1],k=(0,a.useState)(!1),N=(0,o.A)(k,2),B=N[0],P=N[1],E=(0,a.useState)(!0),L=(0,o.A)(E,2),O=L[0],W=L[1],H=(0,a.useState)(0),D=(0,o.A)(H,2),M=D[0],z=D[1],q=(0,a.useState)(null),V=(0,o.A)(q,2),Q=V[0],U=V[1],G=(0,a.useState)(""),X=(0,o.A)(G,2),_=X[0],Y=X[1],J=(0,a.useState)(""),K=(0,o.A)(J,2),$=K[0],ee=K[1],te=e=>{ee(e.target.value)},ie=(0,a.useState)(5),se=(0,o.A)(ie,2),oe=se[0],re=se[1],ae=(0,a.useState)([]),le=(0,o.A)(ae,2),ce=le[0],de=le[1],pe=(0,a.useState)([]),he=(0,o.A)(pe,2),ue=he[0],xe=he[1],me=(0,a.useState)([]),ge=(0,o.A)(me,2),Ae=ge[0],ve=ge[1],ye=(0,a.useState)([]),je=(0,o.A)(ye,2),be=je[0],Ce=je[1],fe=(0,a.useState)(null),Se=(0,o.A)(fe,2),we=Se[0],Ie=Se[1],Te=(0,a.useState)(1),Re=(0,o.A)(Te,2),ke=Re[0],Ne=Re[1],Be=(0,a.useState)(null),Pe=(0,o.A)(Be,2),Ee=Pe[0],Le=Pe[1],Oe=(0,a.useState)([]),We=(0,o.A)(Oe,2),He=We[0],De=We[1],Me=(0,a.useState)([]),ze=(0,o.A)(Me,2),Fe=ze[0],qe=ze[1],Ve=(0,a.useState)([]),Qe=(0,o.A)(Ve,2),Ue=Qe[0],Ge=Qe[1],Xe=(0,a.useState)([]),tt=(0,o.A)(Xe,2),it=tt[0],nt=tt[1],st=(0,a.useState)([]),ot=(0,o.A)(st,2),rt=ot[0],at=ot[1],lt=(0,a.useState)([]),ct=(0,o.A)(lt,2),dt=ct[0],ht=ct[1],xt=(0,a.useState)([]),mt=(0,o.A)(xt,2),gt=mt[0],At=mt[1],vt=(0,a.useState)([]),yt=(0,o.A)(vt,2),jt=yt[0],bt=yt[1],Ct=(0,a.useState)([pi(),pi()]),ft=(0,o.A)(Ct,2),St=ft[0],wt=ft[1],It=(e,t)=>
1{const i=e.target.value;wt((e=>e.map(((e,n)=>n===t?(0,r.A)((0,r.A)({},e),{},{question:i}):e))))},Tt=(e,t)=>{wt((i=>i.map(((i,n)=>n===t?(0,r.A)((0,r.A)({},i),{},{responseType:e}):i))))},Rt=(e,t,i)=>{const n=e.target.value;wt((e=>e.map(((e,s)=>s===t?(0,r.A)((0,r.A)({},e),{},{responses:e.responses.map(((e,t)=>t===i?(0,r.A)((0,r.A)({},e),{},{value:n}):e))}):e))))},kt=(e,t,i)=>{const n=e.target.value;let s={type:ri.MAY_SELECT};"terminate"===n&&(s={type:ri.TERMINATE}),wt((e=>e.map(((e,n)=>n===t?(0,r.A)((0,r.A)({},e),{},{responses:e.responses.map(((e,t)=>t===i?(0,r.A)((0,r.A)({},e),{},{logic:s}):e))}):e))))};(0,a.useEffect)((()=>{wt((e=>e.map((e=>(0,r.A)((0,r.A)({},e),{},{allOptionsTerminateError:e.responses.every((e=>e.logic.type===ri.TERMINATE))})))))}),[...St.map((e=>e.responses))]);const Nt=e=>{wt((t=>t.map(((i,n)=>{if(n===e){const e=Array.from(i.responses);return e.find((e=>e.isOther))?(0,r.A)((0,r.A)({},i),{},{responses:[...e.slice(0,(null===e||void 0===e?void 0:e.length)-1),(0,r.A)({},di),e[(null===e||void 0===e?void 0:e.length)-1]]}):(0,r.A)((0,r.A)({},i),{},{responses:[...t[n].responses,(0,r.A)({},di)]})}return i}))))},Bt=(e,t)=>
1{wt((i=>i.map(((i,n)=>{if(n===e){const e=Array.from(i.responses);return e.splice(t,1),(0,r.A)((0,r.A)({},i),{},{responses:e})}return i}))))},Pt=e=>{wt((t=>t.map(((i,n)=>n===e?(0,r.A)((0,r.A)({},i),{},{responses:[...t[n].responses,(0,r.A)((0,r.A)({},di),{},{isOther:!0,logic:{type:ri.MAY_SELECT}})]}):i))))},Et=e=>{wt((t=>[...t.slice(0,e+1),pi(),...t.slice(e+1)]))},Lt=e=>{wt((t=>{const i=Array.from(t);return i.splice(e,1),i}))},Ot=(e,t)=>{const i=e.destination,n=e.source;e.destination&&wt((e=>e.map(((e,s)=>{if(s===t){const t=Array.from(e.responses),s=t.splice(n.index,1),a=(0,o.A)(s,1)[0];return t.splice(i.index,0,a),(0,r.A)((0,r.A)({},e),{},{responses:t})}return e}))))},Ht=e=>{const t=e.destination,i=e.source;e.destination&&wt((e=>{const n=Array.from(e),s=n.splice(i.index,1),r=(0,o.A)(s,1)[0];return n.splice(t.index,0,r),n}))},Dt=()=>{if((null===St||void 0===St?void 0:St.length)<2)return!1;if(St.some((e=>e.allOptionsTerminateError)))return!1;for(const t of St){var e;if(""===t.question)return!1;if((null===(e=t.responses)||void 0===e?void 0:e.length)<2)return!1;for(const e of t.responses)if(""===e.value&&!e.isOther)return!1}return!0},Mt=["b2c","b2b","b2b-healthcare"],zt=(e,t)=>{"0"===t?(ve([]),Ce([]),De([]),qe([]),Ge([]),nt([])):"1"===t?(xe([]),ve((e=>null===e||void 0===e?void 0:e.filter((e=>"Hospital & Health Care"!==e.value)))),De((e=>null===e||void 0===e?void 0:e.filter((e=>!ci.includes(e.value))))),Ge([])):"2"===t&&xe([]),U(Number(t))},Ft=()=>{const e={audienceType:(e=>{var t;return null!==(t=Mt[e])&&void 0!==t?t:null})(Number(Q)),activityDuration:oe,selectedActivity:d,activityDisplayName:_,activityIntroduction:$,ageRange:jt,targetCountry:ce,industries:Ae,jobFunctions:be,projectTopics:ue,pastParticipation:we,pastParticipationMonths:ke,gender:Ee,seniority:He,companySize:Fe,jobTitle:Ue,skills:it,householdIncome:rt,education:dt,ethnicity:gt,screenerQuestions:St},t=JSON.stringify(e);F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/screener/editRioProject"),{body:t}).catch((e=>{console.error("Failed to edit RIO project:",e)}))},qt=()=>{if(!n.A.projectId)return void console.error("Failed to edit RIO screener: Project ID is required");if(!Dt())return void console.error("Failed to edit RIO screener: Invalid screener questions");const e=JSON.stringify(St);F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/screener/editRioScreener"),{body:e}).catch((e=>{console.error("Failed to edit RIO screener:",e)}))},Vt=async e=>{if(n.A.projectId&&e)try{const t=(await F.A.getRequest("/ajax/project/".concat(n.A.projectId,"/videoSurvey/").concat(e,"/hasAILedTasks"))).hasAILedTasks;R(t)}catch(t){console.error("Failed to fetch activity AI tasks",t),R(!1)}},Qt=e=>{var t,i,n,s,o,r,a,l,c,d,h,u,x,m,g,A,v,y;U((e=>{const t=Mt.indexOf(e);return t>=0?t:null})(e.audienceType)),re(null!==(t=e.activityDuration)&&void 0!==t?t:5),p(e.selectedActivity),Y(null!==(i=e.activityDisplayName)&&void 0!==i?i:""),ee(null!==(n=e.activityIntroduction)&&void 0!==n?n:""),bt(null!==(s=e.ageRange)&&void 0!==s?s:[]),de(null!==(o=e.targetCountry)&&void 0!==o?o:[]),ve(null!==(r=e.industries)&&void 0!==r?r:[]),Ce(null!==(a=e.jobFunctions)&&void 0!==a?a:[]),xe(null!==(l=e.projectTopics)&&void 0!==l?l:[]),Ie(e.pastParticipation),Ne(null!==(c=e.pastParticipationMonths)&&void 0!==c?c:1),Le(null!==(d=e.gender)&&void 0!==d?d:[]),De(null!==(h=e.seniority)&&void 0!==h?h:[]),qe(null!==(u=e.companySize)&&void 0!==u?u:[]),Ge(null!==(x=e.jobTitle)&&void 0!==x?x:[]),nt(null!==(m=e.skills)&&void 0!==m?m:[]),at(null!==(g=e.householdIncome)&&void 0!==g?g:[]),ht(null!==(A=e.education)&&void 0!==A?A:[]),At(null!==(v=e.ethnicity)&&void 0!==v?v:[]),wt(null!==(y=e.screenerQuestions)&&void 0!==y?y:[])},Ut=(e,t,i)=>{g(e),j(t),S(i),W(!1)},Xt=null===Q||null===d,_t=""===_||""===$||""===ce||0===Q&&0===(null===ue||void 0===ue?void 0:ue.length)||(1===Q||2===Q)&&0===(null===Ae||void 0===Ae?void 0:Ae.length)||null===(null===d||void 0===d?void 0:d.quota),Zt=0!==Q&&(0===(null===He||void 0===He?void 0:He.length)||0===(null===Fe||void 0===Fe?void 0:Fe.length)),Jt=!Dt(),Kt=0===M&&Xt||1===M&&_t||2===M&&Zt||3===M&&Jt;return(0,a.useEffect)((()=>
1{F.A.getRequest("/ajax/project/".concat(n.A.projectId,"/screener/viewRioScreener")).then((e=>{var t;Object.keys(null!==(t=null===e||void 0===e?void 0:e.screener_project)&&void 0!==t?t:{}).length>0&&Qt(e.screener_project),Ut(!!Number(null===e||void 0===e?void 0:e.published),null===e||void 0===e?void 0:e.updated_by,null===e||void 0===e?void 0:e.updated_at)})).catch((e=>{console.error("Failed to fetch screener project:",e)})),F.A.getRequest("/ajax/project/".concat(n.A.projectId,"/videoSurvey/list")).then((e=>{s((null===e||void 0===e?void 0:e.surveys)||[])})).catch((e=>{console.error("Failed to fetch project info",e)}))}),[]),(0,a.useEffect)((()=>{Y(null===d||void 0===d?void 0:d.name)}),[d]),(0,a.useEffect)((()=>{m&&z(4)}),[m]),!O&&(0,Z.jsxs)(_e.A,{sx:{margin:"0 auto 32px auto",maxWidth:"896px",borderRadius:"16px"},children:[(0,Z.jsx)(_e.A,{sx:pt,children:m?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(_e.A,{sx:{backgroundColor:"secondary.main",color:"white",textAlign:"center",fontSize:"20px",fontWeight:600,padding:"8px",borderRadius:"16px 16px 0 0"},children:(0,ne.t)("rpsSubmissionInProgress","Submission in Progress")}),(0,Z.jsxs)(_e.A,{sx:{display:"flex",flexDirection:"column",gap:"6px",padding:"16px 32px"},children:[(0,Z.jsxs)(_e.A,{sx:{color:"white",fontSize:"14px",fontHeight:"22px",textAlign:"center"},children:[(0,ne.t)("rpsSubmittedBy","Submitted by")," ",(0,Z.jsx)("b",{children:y})," ",(0,ne.t)("rpsOn","on")," ",(0,Z.jsx)("b",{children:f?function(e){if(!e)return"";const t=e.replace(" ","T");return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}(f):(0,ne.t)("rpsUnknown","Unknown")})]}),(0,Z.jsxs)(_e.A,{sx:{color:"white",fontSize:"14px",fontHeight:"22px",textAlign:"center"},children:[(0,ne.t)("rpsRespondentsPopulateHub","Respondents will start populating in your")," ",(0,Z.jsx)(Ze.A,{href:"/project/".concat(n.A.projectId,"/respondentHub"),sx:{color:"white",fontWeight:600,textDecoration:"underline"},children:(0,ne.t)("rpsRespondentHub","Respondent Hub")})]})]})]}):(0,Z.jsx)(Je.A,{alternativeLabel:!0,activeStep:M,sx:{padding:"24px 40px"},children:ai.map(((e,t)=>(0,Z.jsx)(Ke.A,{completed:!1,sx:M>t?{"& .MuiStepIcon-root":{fill:"rgba(255, 255, 255, 0.3)",border:"1px solid transparent !important"}}:{},onClick:t<M?()=>z(t):null,children:(0,Z.jsx)($e.A,{children:(0,ne.t)(e,li[t])})},e)))})}),(0,Z.jsxs)(_e.A,{sx:{margin:"0 auto",padding:"32px",borderRadius:"0 0 16px 16px",backgroundColor:"background.paper"},children:[(()=>{switch(M){case 0:return(0,Z.jsx)(Wt,{audienceType:Q,setAudienceType:zt,activities:i,selectedActivity:d,setSelectedActivity:p,handleSurveyHasAILedTasks:Vt,activityHasAILedTasks:T});case 1:return(0,Z.jsx)(Gt,{activityIntroduction:$,handleActivityIntroductionChange:te,activityDuration:oe,setActivityDuration:re,targetCountry:ce,setTargetCountry:de,projectTopics:ue,setProjectTopics:xe,industries:Ae,setIndustries:ve,jobFunctions:be,setJobFunctions:Ce,audienceType:Q,selectedActivity:d,activityDisplayName:_,setActivityDisplayName:Y});case 2:return(0,Z.jsx)(Yt,{pastParticipation:we,setPastParticipation:Ie,pastParticipationMonths:ke,setPastParticipationMonths:Ne,gender:Ee,setGender:Le,seniority:He,setSeniority:De,companySize:Fe,setCompanySize:qe,jobTitle:Ue,setJobTitle:Ge,skills:it,setSkills:nt,householdIncome:rt,setHouseholdIncome:at,education:dt,setEducation:ht,ethnicity:gt,setEthnicity:At,ageRange:jt,setAgeRange:bt,audienceType:Q,industries:Ae});case 3:return(0,Z.jsx)(ti,{screenerQuestions:St,handleQuestionChange:It,handleResponseTypeChange:Tt,handleResponsesValueChange:Rt,handleResponsesLogicChange:kt,handleAddResponse:Nt,handleResponsesDragEnd:Ot,handleAddQuestion:Et,handleRemoveResponse:Bt,handleRemoveQuestion:Lt,handleAddOther:Pt,handleQuestionDragEnd:Ht});case 4:return(0,Z.jsx)(oi,{audienceType:Q,activityIntroduction:$,activityDuration:oe,targetCountry:ce,projectTopics:ue,industries:Ae,jobFunctions:be,pastParticipation:we,pastParticipationMonths:ke,gender:Ee,seniority:He,companySize:Fe,jobTitle:Ue,skills:it,householdIncome:rt,education:dt,ethnicity:gt,ageRange:jt,screenerQuestions:St,setActiveStep:z,selectedActivity:d,activityDisplayName:_,activityHasAILedTasks:T,isPublished:m});default:return null}})(),!m&&(0,Z.jsxs)(_e.A,{sx:{marginTop:"24px",display:"flex",justifyContent:"flex-end",gap:"8px"},children:[0!==M&&(0,Z.jsx)(x.A,{variant:"outlined",onClick:()=>{z((e=>Math.max(0,e-1)))}
1,sx:{padding:"6px 24px",border:"2px solid primary.main",color:"primary.main"},children:(0,ne.t)("rpsBack","Back")}),4===M?(0,Z.jsx)(x.A,{sx:(0,r.A)((0,r.A)({},ut),{},{padding:"6px 24px",width:"160px"}),onClick:()=>P(!0),children:(0,ne.t)("rpsFinish","Finish")}):(0,Z.jsx)(x.A,{onClick:()=>{1!==M&&2!==M||Ft(),3===M&&qt(),z((e=>Math.min(5,e+1)))},disabled:Kt,sx:ut,endIcon:(0,Z.jsx)(et.A,{}),children:(0,ne.t)("rpsNext","Next")})]})]}),(0,Z.jsx)(Ye.A,{open:B,onClose:()=>P(!1),children:(0,Z.jsxs)(_e.A,{sx:{width:"446px",backgroundColor:"background.paper",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",borderRadius:"8px",padding:"24px"},children:[(0,Z.jsx)(_e.A,{sx:{fontSize:"21px",color:"text.primary",paddingBottom:"8px"},children:(0,ne.t)("rpsReadyToRecruit","Ready to Recruit?")}),(0,Z.jsxs)(_e.A,{sx:{fontSize:"14px",color:"text.primary",lineHeight:"20px",paddingBottom:"24px"},children:[(0,ne.t)("rpsConfirmRecruitingIntro","Please confirm that you're ready to start recruiting."),(0,Z.jsxs)("ul",{style:{listStylePosition:"outside",margin:0,paddingLeft:"16px"},children:[(0,Z.jsx)("li",{children:(0,ne.t)("rpsConfirmLi1","Once confirmed, recruitment will start")}),(0,Z.jsx)("li",{children:(0,ne.t)("rpsConfirmLi2","This action cannot be undone")}),(0,Z.jsxs)("li",{children:[(0,ne.t)("rpsConfirmLi3Prefix","Clicking confirm means you agree to our recruitment")," ",(0,Z.jsx)(Ze.A,{href:"https://www.discuss.io/terms/",target:"_blank",rel:"noopener noreferrer",children:(0,ne.t)("rpsTermsAndConditions","terms and conditions")})]})]})]}),(0,Z.jsx)(_e.A,{sx:{fontSize:"14px",lineHeight:"20px",color:"text.primary",paddingBottom:"24px"},children:(0,ne.t)("rpsRespondentsWithinHour","You're likely to see respondents within an hour, but timing may vary depending on your criteria.")}),(0,Z.jsxs)(_e.A,{sx:{display:"flex",justifyContent:"flex-end",gap:"24px"},children:[(0,Z.jsx)(x.A,{sx:{padding:"8px 16px",color:"primary.main"},onClick:()=>P(!1),children:(0,ne.t)("cancel","Cancel")}),(0,Z.jsx)(x.A,{sx:(0,r.A)((0,r.A)({},ut),{},{padding:"8px 16px"}),onClick:()=>{F.A.postRequest("/ajax/project/".concat(n.A.projectId,"/screener/publishScreener")).then((()=>{P(!1),window.location.reload()})).catch((e=>{console.error("Failed to publish project:",e)}))},children:(0,ne.t)("scrStartRecruiting","Start Recruiting")})]})]})})]})},ui=()=>{const e=n.A.incentivesPackage&&n.A.enablePanelRecruits;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(s.A,{projectId:Number(n.A.projectId),firstName:n.A.userName,projectName:n.A.projectName,avatarUrl:n.A.avatarUrl,marginBottom:36,selectedTab:"respondents",selectedSubTab:"screener"}),e?(0,Z.jsx)(hi,{}):(0,Z.jsx)(Xe,{})]})}},74840(e,t,i){i.d(t,{A:()=>M});var n=i(5544),s=i(9950),o=i(51264),r=i(70693),a=i(60899),l=i(8145),c=i(16497),d=i(93038),p=i(23266),h=i(70006),u=i(25979),x=i(19647),m=i(46639),g=i(79106),A=i.n(g),v=i(73952),y=i(81532),j=i(37311),b=i(82570),C=i(69755),f=i(18727),S=i(4983),w=i(97543),I=i(58077),T=i(44094),R=i.n(T),k=i(76463),N=i(16243),B=i(24184),P=i(48738),E=i.n(P),L=i(26213),O=i(44414);const W=JSON.parse(N.A.translatedStrings),H=W.consentLabel&&W.consentLabel.split("%s");class D extends s.Component{constructor(){super(...arguments),this.state={countryList:[],renderPhoneNumberInput:!0,phoneVerificationState:"not-verified",code:"",phoneInputErrorMessage:"",isSendingCode:!1}
1,this.geoIp=null,this.timezone=null,this.codeInput=s.createRef(),this.componentDidMount=async()=>{if(this.props.previewMode)return;this.timezone=(R().determine()||{name:()=>{}}).name()||"";const e=document.createElement("meta");e.name="referrer",e.content="no-referrer";const t=document.getElementsByTagName("head")[0];t.appendChild(e),k.A.getRequest("https://ipinfo.io/geo").then((e=>this.geoIp=e)).finally((()=>t.removeChild(e))),this.setState({countryList:await k.A.getRequest("/ajax/I18n/countryList")})},this.sendVerificationCode=e=>async()=>{this.setState({isSendingCode:!0});const t=await k.A.postRequest("/ajax/recruit/".concat(N.A.recruitId,"/sendVerificationCode"),{phone:e}),i=t.status,n=t.message;"success"===i?this.setState({renderPhoneNumberInput:!1,isSendingCode:!1}):this.setState({phoneInputErrorMessage:n,isSendingCode:!1})},this.handleCodeChange=e=>async t=>{if(6===t.length){this.setState({phoneVerificationState:"verifying"});"success"===(await k.A.postRequest("/ajax/recruit/verifyPhone",{phone:e,code:t})).status?this.setState({phoneVerificationState:"verified",code:t}):(this.codeInput.current.textInput[0].focus(),this.codeInput.current.state.input=["","","","","",""],this.setState({phoneVerificationState:"error"}))}},this.clearPhoneInputErrorMessage=()=>{this.setState({phoneInputErrorMessage:""})},this.resendCode=()=>this.setState({phoneVerificationState:"not-verified",renderPhoneNumberInput:!0})}render(){const e=this.props.classes,t=this.state,i=t.countryList,o=t.renderPhoneNumberInput,g=t.phoneVerificationState,v=t.phoneInputErrorMessage,y=t.isSendingCode,T=t.code,R=this.props.previewMode?-1:void 0;return(0,O.jsx)(I.l1,{initialValues:{firstName:"",email:"",agree:!1,phoneCountryCode:"us-+1",phone:""},onSubmit:async e=>{let t=e.firstName,i=e.email,n=e.agree,s=e.phoneCountryCode,o=e.phone;if(this.props.previewMode)return;const r={first_name:t,email:i,agree:n,project_id:N.A.projectId,geoIp:this.geoIp,timezone:this.timezone,viewport:{height:Math.max(document.documentElement.clientHeight,window.innerHeight||0),width:Math.max(document.documentElement.clientWidth,window.innerWidth||0)}};N.A.techCheckSMSVerification&&(r.phone="".concat(s.split("-")[1]).concat(o),r.code=T);try{const e=await k.A.postRequest("/ajax/recruit/".concat(N.A.recruitId,"/saveInfo"),r);if("success"===e.status){const t=()=>window.location.href=e.redirectLink,i=e.vendorLink;if(i){const e=new Image;e.addEventListener("load",(()=>{t()}),!1),e.addEventListener("error",(()=>{console.log("loading video response after error contacting vendor"),t()}),!1),e.src=i}else console.log("loading video response without contacting vendor"),t()}else window.location.href="/recruiting/done"}catch(a){console.error(a),window.location.href="/recruiting/done"}},render:t=>{let I=t.handleSubmit,T=t.handleChange,k=t.values;return(0,O.jsx)("form",{onSubmit:I,children:(0,O.jsxs)(r.A,{className:E()(e.paper,{[e.previewWrapper]:this.props.previewMode}),children:[(0,O.jsx)("div",{className:e.paperHeader,children:W.studyQualification}),(0,O.jsx)("div",{className:e.paperBody,children:(0,O.jsxs)(a.Ay,{container:!0,alignItems:"center",children:[(0,O.jsx)(a.Ay,{item:!0,xs:12,children:(0,O.jsx)(j.A,{activeStep:1})}),(0,O.jsx)(a.Ay,{item:!0,xs:12,className:e.hasMarginBottom,children:W.registrationInfoText}),(0,O.jsx)(a.Ay,{item:!0,xs:12,className:e.hasMarginBottom,children:(0,O.jsxs)(a.Ay,{container:!0,spacing:3,alignItems:"flex-start",children:[(0,O.jsx)(a.Ay,{item:!0,className:e.textFieldIconWrapper,children:(0,O.jsx)(b.A,{})}),(0,O.jsx)(a.Ay,{item:!0,xs:!0,children:(0,O.jsx)(l.A,{label:W.firstName,name:"firstName",fullWidth:!0,onChange:T,value:k.firstName,InputProps:{inputProps:{tabIndex:R},classes:{input:e.input}},InputLabelProps:{classes:{root:e.inputLabel}}})})]})}),(0,O.jsx)(a.Ay,{item:!0,xs:12,className:e.hasMarginBottom,children:(0,O.jsxs)(a.Ay,{container:!0,spacing:3,alignItems:"flex-start",children:[(0,O.jsx)(a.Ay,{item:!0,className:"".concat(e.textFieldIconWrapper),children:(0,O.jsx)(C.A,{})}),(0,O.jsx)(a.Ay,{item:!0,xs:!0,children:(0,O.jsx)(l.A,{label:W.email,type:"email",name:"email",fullWidth:!0,onChange:T,value:k.email,InputProps:{inputProps:{tabIndex:R},classes:{input:e.input}},InputLabelProps:{classes:{root:e.inputLabel}},FormHelperTextProps:{classes:{root:e.helperText}}})})]})}),N.A.techCheckSMSVerification&&(0,O.jsxs)(O.Fragment,{children:[o&&(0,O.jsxs)(s.Fragment,{children:[(0,O.jsx)(a.Ay,{item:!0,xs:12,children:(0,O.jsxs)(a.Ay,{container:!0,spacing:3,alignItems:"flex-start",children:[(0,O.jsx)(a.Ay,{item:!0,className:"".concat(e.textFieldIconWrapper),children:(0,O.jsx)(f.A,{})}),(0,O.jsx)(a.Ay,{item:!0,children:(0,O.jsxs)(u.A,{error:Boolean(v),children:[(0,O.jsx)(x.A,{className:e.inputLabel,children:(0,L.t)("prPhone","Phone")}),(0,O.jsx)(h.A,{inputProps:{tabIndex:R},value:k.phoneCountryCode,onChange:e=>{T(e),this.clearPhoneInputErrorMessage()},classes:{root:e.select,icon:e.selectIcon},name:"phoneCountryCode",renderValue:t=>{const i=t.split("-"),s=(0,n.A)(i,2),o=s[0],r=s[1];return(0,O.jsxs)("div",{children:[(0,O.jsx)("img",{alt:"",src:"".concat(N.A.cdnHost,"/img/flags/svg/").concat(o.toUpperCase(),".svg")}),(0,O.jsx)("span",{className:e.textNextToFlag,children:r})]})},children:i.map((t=>{let i=t.country,n=t.dial,s=t.flag;return(0,O.jsx)(p.A,{value:"".concat(s,"-").concat(n),className:e.menuItem,children:(0,O.jsxs)("div",{className:e.fullWidth,children:[(0,O.jsx)("img",{alt:"",src:"".concat(N.A.cdnHost,"/img/flags/svg/").concat(s.toUpperCase(),".svg")}),(0,O.jsx)("span",{className:e.textNextToFlag,children:i}),(0,O.jsx)("span",{className:e.floatRight,children:n})]})},s)}))})]})}),(0,O.jsx)(a.Ay,{item:!0,xs:!0,className:e.phoneTextFieldWrapper,children:(0,O.jsx)(l.A,{type:"tel",name:"phone",error:Boolean(v),fullWidth:!0,onKeyPress:e=>{"Enter"===e.key&&this.sendVerificationCode("".concat(k.phoneCountryCode.split("-")[1]).concat(k.phone))()},onChange:e=>{T(e),this.clearPhoneInputErrorMessage()},value:k.phone,InputProps:{inputProps:{tabIndex:R},classes:{input:e.input},pattern:"[0-9]*"}})})]})}),v?(0,O.jsx)(a.Ay,{item:!0,className:"".concat(e.phoneHelperText," ").concat(e.errorText),children:v}):(0,O.jsx)(a.Ay,{item:!0,className:e.phoneHelperText,children:W.emailHelperText}),(0,O.jsx)(a.Ay,{item:!0,className:e.phoneCodeButtonWrapper,children:(0,O.jsx)(w.A,{text:W.sendConfirmationCode,variant:"contained",color:"primary",onClick:this.sendVerificationCode("".concat(k.phoneCountryCode.split("-")[1]).concat(k.phone)),disabled:y||this.props.previewMode,icon:y?(0,O.jsx)(m.A,{className:e.spinner}):(0,O.jsx)(s.Fragment,{}),tabIndex:R})})]}),!o&&(0,O.jsxs)(s.Fragment,{children:[(0,O.jsx)(a.Ay,{item:!0,xs:12,children:(0,O.jsxs)(a.Ay,{container:!0,justifyContent:"flex-start",children:[(0,O.jsx)(a.Ay,{item:!0,className:"".concat(e.textFieldIconWrapper),children:(0,O.jsx)(f.A,{})}),(0,O.jsxs)(a.Ay,{item:!0,className:e.codeInputWrapper,children:[(0,O.jsx)(A(),{type:"number",pattern:"\\d*",ref:this.codeInput,fields:6,onChange:this.handleCodeChange("".concat(k.phoneCountryCode.split("-")[1]).concat(k.phone)),className:"".concat(e.codeInput," ").concat("error"===g?e.codeInputError:""),disabled:"verified"===g}),"error"===g&&(0,O.jsxs)("div",{className:"".concat(e.codeInputErrorText," ").concat(e.errorText),children:[(0,L.t)("prCodeWrong","Code is wrong. Need a new code? Click")," ",(0,O.jsx)(B.A,{disableRipple:!0,disableTouchRipple:!0,className:e.link,onClick:this.resendCode,children:(0,L.t)("prHere","here")})]})]})]})}),(0,O.jsx)(a.Ay,{item:!0,xs:12,children:(0,O.jsx)(a.Ay,{container:!0,justifyContent:"center",children:(0,O.jsxs)(a.Ay,{item:!0,children:["verified"===g&&(0,O.jsx)(S.A,{className:e.checkCircleIcon}),"verifying"===g&&(0,O.jsx)(m.A,{className:e.checkCircleIcon})]})})})]})]}),(0,O.jsx)(a.Ay,{item:!0,xs:12,className:e.hasMarginTop,children:(0,O.jsx)(c.A,{control:(0,O.jsx)(d.A,{tabIndex:R,name:"agree",onCh
1ange:T,value:k.checkbox,sx:{borderRadius:"50% !important","& .MuiTouchRipple-root":{borderRadius:"50% !important","& .MuiTouchRipple-child":{borderRadius:"50% !important"}}}}),label:(0,O.jsxs)("span",{children:[H[0],(0,O.jsx)("a",{href:N.A.privacy,target:"_blank",rel:"noopener noreferrer",tabIndex:R,children:H[1]}),H[2],(0,O.jsx)("a",{href:N.A.termsVisitor,target:"_blank",rel:"noopener noreferrer",tabIndex:R,children:H[3]})]}),classes:{label:e.checkboxLabel}})})]})}),(0,O.jsx)("div",{className:e.paperFooter,children:(0,O.jsx)(a.Ay,{container:!0,justifyContent:"flex-end",children:(0,O.jsx)(a.Ay,{item:!0,children:(0,O.jsx)(w.A,{text:N.A.hasVideoSurvey?W.registrationSubmitButtonSurvey:W.registrationSubmitButton,type:"submit",variant:"contained",color:"primary",disabled:Boolean(!k.firstName||!k.email||!k.agree||"verified"!==g&&N.A.techCheckSMSVerification)})})})})]})})}})}}const M=(0,o.A)((e=>({paper:{maxWidth:448,borderRadius:"4px !important","& input[type=number]::-webkit-inner-spin-button, & input[type=number]::-webkit-outer-spin-button":{webkitAppearance:"none",mozAppearance:"none",appearance:"none",margin:0}},paperHeader:{padding:"26px 24px 16px 24px",fontSize:24,lineHeight:"32px",backgroundColor:(0,y.X4)(v.A[100],.24),borderBottom:"1px solid ".concat(e.palette.divider)},paperBody:{padding:24},paperFooter:{padding:16,backgroundColor:(0,y.X4)(v.A[100],.24),borderTop:"1px solid ".concat(e.palette.divider)},input:{fontSize:14},inputLabel:{fontSize:14},textFieldIconWrapper:{marginTop:20},helperText:{fontSize:12,lineHeight:"16px"},checkboxLabel:{fontSize:12,lineHeight:"16px",maxWidth:246,marginLeft:8},hasMarginBottom:{marginBottom:24},hasMarginTop:{marginTop:48},menuItem:{fontSize:14},select:{fontSize:14},phoneTextFieldWrapper:{marginTop:16,paddingLeft:"0 !important"},selectIcon:{top:1},codeInput:{marginTop:8,"@media (max-width: 420px)":{width:180},"& input":{borderRadius:"6px !important",border:"1px solid lightgrey",boxShadow:"rgba(0, 0, 0, 0.1) 0px 0px 10px 0px",margin:4,width:44,height:42,fontSize:24,textAlign:"center",boxSizing:"border-box",color:e.palette.text.primary,backgroundColor:"white"}},codeInputError:{"& input":{border:"1px solid ".concat(e.palette.error.main)}},errorText:{color:"".concat(e.palette.error.main," !important")},checkCircleIcon:{color:e.palette.tertiary.main,fontSize:32,marginTop:24},link:{cursor:"pointer",color:e.palette.link.active,"&:hover":{color:e.palette.link.hover}},phoneHelperText:{width:352,position:"relative",color:e.palette.text.secondary,marginLeft:48,marginTop:4,marginBottom:19,fontSize:12,lineHeight:"16px"},codeInputErrorText:{margin:"4px 0 0 4px"},textNextToFlag:{marginLeft:8},floatRight:{float:"right"},fullWidth:{width:"100%"},codeInputWrapper:{marginLeft:19},spinner:{position:"relative",color:"white",left:-4,height:"20px !important",width:"20px !important"},phoneCodeButtonWrapper:{marginLeft:48},previewWrapper:{cursor:"default !important",pointerEvents:"none !important"}})),{withTheme:!0})(D)},97543(e,t,i){i.d(t,{A:()=>c});var n=i(89379),s=i(80045),o=i(18216),r=i(51264),a=(i(9950),i(44414));const l=["className","classes","icon","text"],c=(0,r.A)((()=>({button:{borderRadius:"4px !important",fontSize:14,fontWeight:700},contained:{padding:"8px 12px 8px 8px","& .buttonText":{marginLeft:4,marginTop:4}},outlined:{padding:"6px 12px 6px 8px","& .buttonText":{marginLeft:6,marginTop:4}},text:{padding:"6px 12px 6px 8px"},buttonText:{marginLeft:6,marginTop:4}})))((e=>{let t=e.className,i=e.classes,r=e.icon,c=e.text,d=(0,s.A)(e,l);const p=d.variant;return(0,a.jsxs)(o.A,(0,n.A)((0,n.A)({className:"".concat(i.button," ").concat(i[p]," ").concat(t)},d),{},{children:[r,(0,a.jsx)("span",{className:i.buttonText,children:c})]}))}))}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.