{"version":3,"sources":["App.js","serviceWorker.js","index.js"],"names":["recaptchaRef","React","createRef","App","props","_this","Object","classCallCheck","this","possibleConstructorReturn","getPrototypeOf","call","handleChange","e","newState","target","name","value","setState","state","inError","firstName","lastName","businessName","phone","email","password","verVal","centreID","responseMessage","responseSuccess","loading","bind","assertThisInitialized","handleSubmit","onChange","event","_this2","preventDefault","classList","add","checkValidity","postData","JSON","stringify","trialDetails","fetch","method","headers","Content-Type","body","then","response","text","xmlString","DOMParser","parseFromString","data","responseSuccessStr","documentElement","getElementsByTagName","innerHTML","responseMessageStr","token","username","console","log","window","location","fixiAppUrl","catch","react_default","a","createElement","onSubmit","noValidate","className","htmlFor","type","placeholder","required","class","minLength","id","href","taget","es","ref","sitekey","disabled","App_ErrorPanel","isSuccess","message","Component","ErrorPanel","style","marginTop","Boolean","hostname","match","ReactDOM","render","App_App","document","getElementById","navigator","serviceWorker","ready","registration","unregister"],"mappings":"uPAIMA,EAAeC,IAAMC,YAONC,cAEnB,SAAAA,EAAYC,GAAO,IAAAC,EAAA,OAAAC,OAAAC,EAAA,EAAAD,CAAAE,KAAAL,IACjBE,EAAAC,OAAAG,EAAA,EAAAH,CAAAE,KAAAF,OAAAI,EAAA,EAAAJ,CAAAH,GAAAQ,KAAAH,KAAMJ,KA6BRQ,aAAe,SAACC,GACd,IAAIC,EAAW,GACbA,EAASD,EAAEE,OAAOC,MAAQH,EAAEE,OAAOE,MAErCZ,EAAKa,SAASJ,IA9BdT,EAAKc,MAAQ,CACXC,SAAS,EACTC,UAAW,GACXC,SAAU,GACVC,aAAc,GACdC,MAAO,GACPC,MAAO,GACPC,SAAU,GACVC,OAAQ,KACRC,SAAU,EACVC,gBAAiB,KACjBC,gBAAiB,KACjBC,SAAS,GAMX1B,EAAKO,aAAeP,EAAKO,aAAaoB,KAAlB1B,OAAA2B,EAAA,EAAA3B,QAAA2B,EAAA,EAAA3B,CAAAD,KACpBA,EAAK6B,aAAe7B,EAAK6B,aAAaF,KAAlB1B,OA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AAU,yCACfL,EAAAC,EAAAC,cAACa,EAAA,EAAD,CAAWC,IAAKvF,EAAcwF,QAAQ,2CAA2CrD,SAAU3B,KAAK2B,SAAUyC,UAAU,UAIjHpE,KAAKW,MAAMY,QAAUwC,EAAAC,EAAAC,cAAA,UAAQG,UAAU,kBAAkBE,KAAK,SAASW,UAAQ,GAAElB,EAAAC,EAAAC,cAAA,KAAGG,UAAU,0BAAzE,mBAAgIL,EAAAC,EAAAC,cAAA,UAAQG,UAAU,kBAAkBE,KAAK,SAASW,UAAWjF,KAAKW,MAAMQ,QAAxE,eAEtJ4C,EAAAC,EAAAC,cAACiB,EAAD,CAAYC,UAAWnF,KAAKW,MAAMW,gBAAiB8D,QAASpF,KAAKW,MAAMU,2BA7KhDgE,aAsL3BC,mLAEF,OAAItF,KAAKJ,MAAMuF,WAAqC,MAAxBnF,KAAKJ,MAAMuF,UAC9B,KAGPpB,EAAAC,EAAAC,cAAA,OAAKG,UAAU,qBAAqBmB,MAAO,CAACC,UAAW,SAASzB,EAAAC,EAAAC,cAAA,wBAAhE,IAAyFjE,KAAKJ,MAAMwF,gBANjFC,aCrLLI,QACW,cAA7B9B,OAAOC,SAAS8B,UAEe,UAA7B/B,OAAOC,SAAS8B,UAEhB/B,OAAOC,SAAS8B,SAASC,MACvB,2DCXNC,IAASC,OAAO9B,EAAAC,EAAAC,cAAC6B,EAAD,MAASC,SAASC,eAAe,YD0H3C,kBAAmBC,WACrBA,UAAUC,cAAcC,MAAMxD,KAAK,SAAAyD,GACjCA,EAAaC","file":"static/js/main.74f14256.chunk.js","sourcesContent":["\r\nimport React, { Component } from 'react';\r\nimport './App.css';\r\nimport ReCAPTCHA from \"react-google-recaptcha\";\r\nconst recaptchaRef = React.createRef();\r\n\r\n\r\nconst dev = false;\r\nlet url= (dev? 'http://apistage.fixionline.com/centreservice.svc/saveCentre':'https://api.fixionline.com/centreservice.svc/saveCentre');\r\nlet fixiAppUrl = (dev? 'http://dev.fixionline.com:88':'https://app.fixionline.com');\r\n\r\nexport default class App extends Component {\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n \r\n this.state = {\r\n inError: false,\r\n firstName: '',\r\n lastName: '',\r\n businessName: '',\r\n phone: '',\r\n email: '',\r\n password: '',\r\n verVal: null,\r\n centreID: 0,\r\n responseMessage: null,\r\n responseSuccess: null,\r\n loading: false\r\n };\r\n \r\n \r\n \r\n\r\n this.handleChange = this.handleChange.bind(this);\r\n this.handleSubmit = this.handleSubmit.bind(this);\r\n\r\n this.onChange = this.onChange.bind(this);\r\n \r\n \r\n }\r\n\r\n handleChange = (e) => {\r\n let newState = {}\r\n newState[e.target.name] = e.target.value \r\n // e.target.form.classList.remove('was-validated');\r\n this.setState(newState)\r\n // console.log(newState)\r\n }\r\n\r\n handleSubmit(event) {\r\n\r\n event.preventDefault();\r\n event.target.classList.add('was-validated');\r\n\r\n if (!event.target.checkValidity()) {\r\n this.setState({ inError: false, loading: false });\r\n return;\r\n }\r\n else {\r\n this.setState({ inError: false ,loading: true});\r\n\r\n \r\n \r\n \r\n var postData = JSON.stringify({\r\n \"trialDetails\": {\r\n firstName: this.state.firstName,\r\n lastName: this.state.lastName,\r\n businessName: this.state.businessName,\r\n phone: this.state.phone,\r\n email: this.state.email,\r\n password: this.state.password\r\n }\r\n });\r\n\r\n //submit data to API\r\n fetch(url, {\r\n method: 'POST', \r\n headers: {'Content-Type': 'application/json'},\r\n body: postData \r\n })\r\n .then(response => response.text())\r\n .then(xmlString => (new DOMParser()).parseFromString(xmlString, \"application/xml\"))\r\n .then(data => {\r\n var responseSuccessStr =(data.documentElement.getElementsByTagName(\"Success\")[0].innerHTML == 'true');\r\n var centreID = data.documentElement.getElementsByTagName(\"centreID\")[0].innerHTML;\r\n var responseMessageStr = data.documentElement.getElementsByTagName(\"Message\")[0].innerHTML;\r\n var token = data.documentElement.getElementsByTagName(\"token\")[0].innerHTML;\r\n var username =data.documentElement.getElementsByTagName(\"username\")[0].innerHTML; \r\n \r\n this.setState({ responseSuccess: responseSuccessStr, responseMessage: responseMessageStr}); \r\n \r\n console.log(responseSuccessStr)\r\n if (responseSuccessStr){\r\n window.location=fixiAppUrl+'/public/initTrial.aspx?c='+centreID+'&u='+username+'&token='+token \r\n }\r\n else{ \r\n this.setState({ loading: false}); \r\n }\r\n })\r\n .catch( data => {\r\n this.setState({ responseSuccess: false, responseMessage: 'Something went wrong', loading: false });\r\n }) \r\n }\r\n \r\n\r\n\r\n }\r\n\r\n\r\n onChange(value) {\r\n this.setState({verVal : value});\r\n // console.log(this.props.verVal);\r\n }\r\n\r\n \r\n\r\n\r\n render() {\r\n \r\n return (\r\n
\r\n\r\n\r\n );\r\n }\r\n}\r\n\r\nclass ErrorPanel extends Component {\r\n render() {\r\n if (this.props.isSuccess || this.props.isSuccess == null){\r\n return null\r\n }\r\n return (\r\n