1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9294],{29294:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var r=s(57437),i=s(2265),o=s(40718),n=s.n(o),a=s(51658),c=s(19239),h=s.n(c),l=s(5832),d=s(40157),p=s(70588),m=s(77204),u=s(61994),b=s(90933),_=(0,s(15338).vU)({buttonLabel:{id:"preFormItem.buttonLabel",defaultMessage:"Learn More"}}),k=s(34795),x=s.n(k),C=s(58199),F=s(4566),g=s(69108);class f extends i.PureComponent{render(){let{title:e,description:t,buttonUrl:s,disableWithMessage:i}=this.props,{isChecked:o}=this.state;return(0,r.jsxs)("li",{className:x().wrapper,onClick:this.onChangeCheckbox,"data-active":o||void 0,"data-selectable":!i||void 0,children:[(0,r.jsxs)(d.P,{className:x().container,noContentWrapper:!0,children:[(0,r.jsxs)("div",{className:x().block,children:[(0,r.jsx)(l.H3,{className:x().title,children:e}),(0,r.jsx)("p",{className:x().description,children:t})]}),this.renderOption(!i)]}),this.renderButton(s)]})}constructor(...e){super(...e),this.state={isChecked:this.props.isChecked},this.onChangeCheckbox=e=>{e.target!==this.inputRef.current&&e.target!==this.labelRef.current&&this.setState(e=>({isChecked:!e.isChecked}),()=>this.props.handleCheckbox(this.state.isChecked))},this.onChangeDirectCheckbox=()=>{this.setState(e=>({isChecked:!e.isChecked}),()=>this.props.handleCheckbox(this.state.isChecked))},this.inputRef=(0,i.createRef)(),this.labelRef=(0,i.createRef)(),this.renderButton=(0,C.F4)(()=>(0,r.jsx)(i.Fragment,{children:(0,r.jsx)(g.D,{children:(0,r.jsx)("a",{className:x().link,target:"_blank",href:(0,F.rz)("url",this.props.buttonUrl),children:(0,r.jsx)(b.Z,{..._.buttonLabel})})})})),this.renderOption=(0,C.gC)(()=>this.renderCheckbox(),()=>this.renderMessage()),this.renderCheckbox=()=>{let{title:e,id:t}=this.props,{isChecked:s}=this.state;return(0,r.jsxs)("div",{className:x().block,children:[(0,r.jsx)("input",{className:x().input,type:"checkbox",id:t,ref:this.inputRef,checked:s,onChange:this.onChangeDirectCheckbox}),(0,r.jsx)("label",{className:x().label,"aria-label":e,htmlFor:t,ref:this.labelRef})]})},this.renderMessage=()=>(0,r.jsxs)("div",{className:(0,u.Z)(x().block,x().message),children:[" ",this.props.disableWithMessage," "]})}}f.propTypes={title:n().string.isRequired,description:n().string.isRequired,buttonUrl:n().oneOfType([n().string,n().object]),handleCheckbox:n().func.isRequired,isChecked:n().bool.isRequired,disableWithMessage:n().string,id:n().string.isRequired};var S=s(61313),R=s(47965),j=s(85318);let N="preForm",v="form",q=/!\\,/;class I extends i.PureComponent{componentDidMount(){this.props.onFormRendered(),j.bO.updateStatus(j.qb.INITIALISED)}componentWillUnmount(){j.bO.updateStatus(j.qb.ABANDONED)}render(){let{contentType:e,entryId:t,formState:s}=this.state;return this.props.submitted?null:(0,r.jsxs)("div",{className:h().wrapper,...(0,C.yI)("PreForm",e,t),"data-form-state":s,children:[this.renderPreForm(s===N),this.renderForm(s===v)]})}constructor(...e){super(...e),this.state={checkbox0:!1,checkbox1:!1,checkbox2:!1,formState:N},this.setPreForm=()=>{this.setState({formState:N}),this.props.onPreFormStepChange()},this.setForm=e=>{e.preventDefault(),this.setState({formState:v}),this.props.onPreFormStepChange()},this.getActivistCodeArray=()=>{let{checkbox0:e,checkbox1:t,checkbox2:s}=this.state,r=[];return e&&(r=r.concat(this.handleSplitCodes(0))),t&&(r=r.concat(this.handleSplitCodes(1))),s&&(r=r.concat(this.handleSplitCodes(2))),r.map(e=>e&&e.trim(" "))},this.handleSplitCodes=e=>this.props.checkboxList[e].activistCode&&this.props.checkboxList[e].activistCode.split(q).map(e=>e.replace(/\\,/,",")),this.handleFormSubmitted=()=>{j.bO.updateStatus(j.qb.SUBMITTED),this.props.onSubmit()},this.handleCheckbox=e=>t=>{this.setState({[e]:t})},this.renderPreForm=(0,C.V7)(()=>{let{title:e,description:t,checkboxList:s,buttonLabel:i}=this.props,{checkbox0:o,checkbox1:n,checkbox2:c}=this.state;return(0,r.jsxs)("form",{className:h().form,onSubmit:this.setForm,children:[(0,r.jsxs)(d.P,{className:h().container,backgroundColor:a.O9.darkGrey,hideCorner:(0,R.tq)(),hideShadow:(0,R.tq)(),children:[(0,r.jsx)(l.H2,{className:h().title,children:e}),t&&(0,r.jsx)("p",{className:h().description,children:t}),(0,r.jsx)(l.aV,{className:h().list,children:s.map((e,t)=>
1(0,r.jsx)(f,{title:e.title,description:e.description,buttonUrl:e.url,handleCheckbox:this.handleCheckbox("checkbox".concat(t)),disableWithMessage:e.disableWithMessage,isChecked:this.state["checkbox".concat(t)],id:"checkbox".concat(t),role:"button",tabIndex:"0"},t))}),(0,r.jsx)("div",{className:h().line}),(0,r.jsx)(p.zx,{className:h().button,disabled:!o&&!n&&!c,children:i})]}),(0,r.jsx)(m.K,{className:h().lineDecoration})]})}),this.renderForm=(0,C.V7)(()=>(0,r.jsx)(S.P,{content:this.props.form,componentProps:{headerHeight:0,onFormRendered:this.props.onFormRendered,onSubmit:this.handleFormSubmitted,stepBack:this.setPreForm,activistCodeArray:this.getActivistCodeArray()}}))}}I.propTypes={contentType:n().string.isRequired,entryId:n().string.isRequired,title:n().string.isRequired,description:n().string,checkboxList:n().array.isRequired,buttonLabel:n().string.isRequired,form:n().object.isRequired,formMargin:n().number,onFormRendered:n().func,onSubmit:n().func,submitted:n().bool,onPreFormStepChange:n().func.isRequired};var y=I},19239:function(e){e.exports={wrapper:"preForm_wrapper__nHY8V",form:"preForm_form__78thq",container:"preForm_container__ztu4L",title:"preForm_title__IvBUv",description:"preForm_description__hN0Fu",list:"preForm_list__6yki2",line:"preForm_line__8oESc",button:"preForm_button__epT_2",lineDecoration:"preForm_lineDecoration__RksEl"}},34795:function(e){e.exports={wrapper:"preFormItem_wrapper__8_7Dy",container:"preFormItem_container__JyQka",title:"preFormItem_title__XupTz",description:"preFormItem_description__2_Mph",link:"preFormItem_link__WMuDW",label:"preFormItem_label___Kyco",input:"preFormItem_input__cviRZ",block:"preFormItem_block__lRZqh",message:"preFormItem_message__V2YBb"}}}]);
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.