1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5326],{6357:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/applications/[id]",function(){return t(9949)}])},9949:function(e,a,t){"use strict";t.r(a),t.d(a,{__N_SSP:function(){return j},default:function(){return _id_}});var s=t(5893),n=t(5379),i=t.n(n),l=t(9008),o=t.n(l),d=t(7294),r=t(7527),c=t(8114),m=t(9958),verification=e=>{let{applicationId:a,onVerified:t}=e,[n,l]=(0,d.useState)("email"),[o,r]=(0,d.useState)(""),[c,p]=(0,d.useState)(Array(6).fill("")),u=(0,d.useRef)([]),[x,f]=(0,d.useState)(!1),[j,h]=(0,d.useState)(null),[v,b]=(0,d.useState)(0),[g,y]=(0,d.useState)(null);(0,d.useEffect)(()=>{if(v<=0)return;let e=setInterval(()=>b(e=>e-1),1e3);return()=>clearInterval(e)},[v]);let handleEmailSubmit=async()=>{let e=o.trim();if(!e){h("Please enter your email address.");return}h(null),f(!0);try{await (0,m.t1)(a,e),l("otp"),b(60)}catch(e){var t;(null==e?void 0:null===(t=e.response)||void 0===t?void 0:t.status)===429?(h("Please wait a moment before requesting a new code."),l("otp")):h("Something went wrong. Please try again.")}finally{f(!1)}},handleOtpChange=async(e,a)=>{if(h(null),!/^[0-9]?$/.test(a))return;let t=[...c];if(t[e]=a,p(t),a&&e<5){var s;null===(s=u.current[e+1])||void 0===s||s.focus()}let n=t.join("");6!==n.length||t.includes("")||await submitOtp(n)},handleOtpKeyDown=(e,a)=>{if("Backspace"===e.key&&!c[a]&&a>0){var t;null===(t=u.current[a-1])||void 0===t||t.focus()}},submitOtp=async e=>{f(!0),h(null);try{await (0,m.Mu)(a,e),t()}catch(t){var s,n,i;let e=null==t?void 0:null===(s=t.response)||void 0===s?void 0:s.status,a=null==t?void 0:null===(i=t.response)||void 0===i?void 0:null===(n=i.data)||void 0===n?void 0:n.error;if(429===e)h("Too many failed attempts. Please request a new code."),y(0);else if(401===e){let e=null==a?void 0:a.match(/(\d+) attempt/);e&&y(parseInt(e[1],10)),h(a||"Incorrect code. Please try again.")}else h("Something went wrong. Please try again.");p(Array(6).fill("")),setTimeout(()=>{var e;return null===(e=u.current[0])||void 0===e?void 0:e.focus()},50)}finally{f(!1)}},handleResend=async()=>{if(!(v>0)&&!x){h(null),p(Array(6).fill("")),y(null),f(!0);try{await (0,m.t1)(a,o.trim()),b(60)}catch(a){var e;(null==a?void 0:null===(e=a.response)||void 0===e?void 0:e.status)===429?h("Please wait before requesting another code."):h("Failed to resend code. Please try again.")}finally{f(!1)}}};return a?"email"===n?(0,s.jsxs)("div",{className:"jsx-27a9f55bd72e171 container vertical-padding",children:[(0,s.jsxs)("div",{className:"jsx-27a9f55bd72e171 session center column",children:[(0,s.jsx)("div",{className:"jsx-27a9f55bd72e171 title",children:"Welcome to Smart Mortgage Customer Centre"}),(0,s.jsx)("div",{className:"jsx-27a9f55bd72e171 description",children:"Please enter the email address associated with your application."}),(0,s.jsx)("input",{type:"email",value:o,onChange:e=>{r(e.target.value),h(null)},onKeyDown:e=>"Enter"===e.key&&handleEmailSubmit(),placeholder:"[email protected]",disabled:x,autoComplete:"email",className:"jsx-27a9f55bd72e171"}),j&&(0,s.jsx)("div",{className:"jsx-27a9f55bd72e171 error",children:j}),(0,s.jsx)("div",{onClick:x?void 0:handleEmailSubmit,className:"jsx-27a9f55bd72e171 "+"action-button pointer ".concat(x?"loading":""),children:x?"Please waitâ¦":"Next"})]}),(0,s.jsx)(i(),{id:"27a9f55bd72e171",children:".container.jsx-27a9f55bd72e171{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.title.jsx-27a9f55bd72e171{font-weight:bold;font-size:2em;max-width:600px;margin-bottom:1em}.error.jsx-27a9f55bd72e171{color:red;margin:.5em 0}.loading.jsx-27a9f55bd72e171{opacity:.6;cursor:not-allowed}input.jsx-27a9f55bd72e171{height:2.5em;font-size:1.2em;background:var(--primary);text-align:center;border:none;color:var(--dark);width:400px;max-width:90vw;margin:1em auto}.action-button.jsx-27a9f55bd72e171{margin:1em auto}"})]}):(0,s.jsxs)("div",{className:"jsx-9e19a6537024f941 container vertical-padding",children:[(0,s.jsxs)("div",{className:"jsx-9e19a6537024f941 session center column",children:[(0,s.jsx)("div",{className:"jsx-9e19a6537024f941 title",children:"Verification Code"}),(0,s.jsx)("div",{className:"jsx-9e19a6537024f941 description",children:"A 6-digit code has been sent to the mobile number registered with your application. The code expires in 10 minutes."}),(0,s.jsx)("div",{className:"jsx-9e19a6537024f941 otp-row",children:Array.from({length:6}).map((e,a)=>(0,s.jsx)("input",{type:"text",inputMode:"numeric",maxLength:1,value:c[a],onChange:e=>handleOtpChange(a,e.target.value),onKeyDown:e=>handleOtpKeyDown(e,a),ref:e=>u.current[a]=e,disabled:x||0===g,autoComplete:0===a?"one-time-code":"off",className:"jsx-9e19a6537024f941 verify-digit"},a))}),x&&(0,s.jsx)("div",{style:{color:"var(--secondary)"},className:"jsx-9e19a6537024f941 description",children:"Verifyingâ¦"}),j&&(0,s.jsx)("div",{className:"jsx-9e19a6537024f941 error",children:j}),null!==g&&g>0&&(0,s.jsxs)("div",{className:"jsx-9e19a6537024f941 description attempts",children:[g," attempt",1!==g?"s":""," remaining"]}),(0,s.jsx)("div",{onClick:handleResend,className:"jsx-9e19a6537024f941 "+"resend-code ".concat(0===v&&0!==g?"pointer":"cursor-not-allowed"),children:v>0?"Resend code in ".concat(v,"s"):"Resend Code"}),(0,s.jsx)("div",{onClick:()=>{l("email"),p(Array(6).fill("")),h(null),y(null)},className:"jsx-9e19a6537024f941 back-link pointer",children:"â Use a different email"})]}),(0,s.jsx)(i(),{id:"9e19a6537024f941",children:".container.jsx-9e19a6537024f941{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.title.jsx-9e19a6537024f941{font-weight:bold;font-size:2em;max-width:600px;margin-bottom:1em}.description.jsx-9e19a6537024f941{margin:.5em 0;max-width:480px;text-align:center}.error.jsx-9e19a6537024f941{color:red;margin:.75em 0}.attempts.jsx-9e19a6537024f941{color:#e67e22;font-weight:500}.otp-row.jsx-9e19a6537024f941{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;gap:.5em;margin:1.5em auto}.verify-digit.jsx-9e19a6537024f941{width:2.5em;height:3em;font-size:1.5em;background:var(--primary);text-align:center;border:2px solid transparent;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-transition:border-color.2s;-moz-transition:border-color.2s;-o-transition:border-color.2s;transition:border-color.2s}.verify-digit.jsx-9e19a6537024f941:focus{outline:none;border-color:var(--secondary)}.verify-digit.jsx-9e19a6537024f941:disabled{opacity:.5}.resend-code.jsx-9e19a6537024f941{color:var(--secondary);margin-top:1em}.back-link.jsx-9e19a6537024f941{color:#888;font-size:.9em;margin-top:.75em}"})]}):(0,s.jsxs)("div",{className:"jsx-d642ecf00ef1cdca container vertical-padding",children:[(0,s.jsxs)("div",{className:"jsx-d642ecf00ef1cdca session center column",children:[(0,s.jsx)("div",{className:"jsx-d642ecf00ef1cdca title",children:"Welcome to Smart Mortgage Customer Centre"}),(0,s.jsx)("div",{className:"jsx-d642ecf00ef1cdca description",children:"This application is not available at the moment."}),(0,s.jsx)("div",{className:"jsx-d642ecf00ef1cdca description",children:"Please contact your Smart Mortgage manager."})]}),(0,s.jsx)(i(),{id:"d642ecf00ef1cdca",children:".container.jsx-d642ecf00ef1cdca{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.title.jsx-d642ecf00ef1cdca{font-weight:bold;font-size:2em;max-width:600px;margin-bottom:1em}"})]})},Application_consent=e=>{let{onConfirm:a}=e,[t,n]=(0,d.useState)(!1),[i,l]=(0,d.useState)(!1),[o,r]=(0,d.useState)(!1);return(0,s.jsx)("div",{className:"vertical-padding",children:(0,s.jsxs)("div",{className:"session",children:[" ",(0,s.jsxs)("div",{className:"max-w-3xl mx-auto p-4 space-y-4",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold mb-2",children:"PRIVACY DISCLOSURE STATEMENT AND CONSENT"}),(0,s.jsx)("p",{children:"SMC Management Holdings Pty Ltd (SMH) A.C.N. 611 971 049 (Australian Credit Licence 488022) is committed to complying with the Privacy Act 1988 and the Australian Privacy Principles."}),(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:"How and why we collect your personal information:"})," ","We collect personal information from you when you apply for or use our products and services."]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:"Providing Your Personal Information to Other Organisations:"})," ","We may exchange information with:"]}),(0,s.jsxs)("ul",{className:"list-disc list-inside",children:[(0,s.jsx)("li",{children:"Organisations which provide finance or other products to you"}),(0,s.jsx)("li",{children:"Finance consultants, accountants, auditors, legal advisers, insurers, etc."}),(0,s.jsx)("li",{children:"Mortgage aggregator (Connective) and related entities"}),(0,s.jsx)("li",{children:"Tribunals, courts, industry bodies"}),(0,s.jsx)("li",{children:"Your referees such as employer"}),(0,s.jsx)("li",{children:"Organisations providing identity verification"})]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:"Your rights:"})," You may access or correct your information by contacting us. A copy of our privacy policy is available upon request."]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:"If your personal information is not provided:"})," We may not be able to supply the service you require."]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:"Consent to provide personal information to a credit reporting body:"})," ","Your consent is implied unless you notify us otherwise."]}),(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:e=>n(e.target.checked)}),"I/we do not wish SMH and its credit Representatives to obtain a credit report on my/our behalf"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:"Consent to receive marketing information:"})," Your consent is implied unless you notify us otherwise."]}),(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:i,onChange:e=>l(e.target.checked)}),"I/we do not wish to receive marketing information"]}),(0,s.jsxs)("p",{children:[(0,s.jsx)("strong",{children:"Consent to receive documents electronically:"})," Your consent is implied unless you notify us otherwise."]}),(0,s.jsxs)("label",{className:"flex items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:o,onChange:e=>r(e.target.checked)}),"I/we do not wish to receive documents electronically"]}),(0,s.jsx)("br",{}),(0,s.jsx)("div",{onClick:()=>{a({creditReportDeclined:t,marketingDeclined:i,electronicDocsDeclined:o})},className:"action-button pointer",children:"Confirm"})]})]})})};let p=[{name:"residency",label:"Residency",type:"options",options:["Citizen","Permanent Resident","Temporary Resident"]},{name:"fullName",label:"Full Name",type:"text"},{name:"gender",label:"Gender",type:"options",options:["Male","Female","Other"]},{name:"dateOfBirth",label:"Date of Birth",type:"date"},{name:"maritalStatus",label:"Marital Status",type:"options",options:["Single","Married","Defacto","Divorced"]},{name:"dependents",label:"Number of Dependents & Age",type:"text"},{name:"phone",label:"Phone",type:"text"},{name:"email",label:"Email",type:"text"}],u=[{name:"address",label:"Address",type:"text"},{name:"currentMoveInDate",label:"Date Moved In",type:"date"},{name:"housingStatus",label:"Housing Status",type:"options",options:["Rent","Boarding","Own outright","Mortgage"]}],x=[{name:"address",label:"Address",type:"text"},{name:"movedIn",label:"Date Moved In",type:"date"},{name:"housingStatus",label:"Housing Status",type:"options",options:["Rent","Boarding","Own outright","Mortgage"]}],f=[{name:"employmentStatus",label:"Employment Status",type:"options",options:["Unemployed","Full Time","Part Time","Casual","Retired","Self Employed"]},{name:"companyName",label:"Company Name",type:"text"},{name:"jobTitle",label:"Job Title",type:"text"},{name:"dateStarted",label:"Date Started",type:"date"},{name:"annualIncome",label:"Estimated Annual Income",type:"text"}],renderFields=(e,a,t)=>(0,s.jsxs)("div",{className:"jsx-6551cd1ce7d244b7 column",children:[e.map(e=>{var n;return(0,s.jsxs)("label",{className:"jsx-6551cd1ce7d244b7 grid-cols grid-cols-2",children:[(0,s.jsx)("span",{className:"jsx-6551cd1ce7d244b7 font-medium label",children:e.label}),"options"===e.type?(0,s.jsxs)("select",{value:a[e.name]||"",onChange:a=>t(e.name,a.target.value),className:"jsx-6551cd1ce7d244b7 border px-2 py-1",children:[(0,s.jsx)("option",{value:"",className:"jsx-6551cd1ce7d244b7",children:"Select..."}),null===(n=e.options)||void 0===n?void 0:n.map(e=>(0,s.jsx)("option",{value:e,className:"jsx-6551cd1ce7d244b7",children:e},e))]}):(0,s.jsx)("input",{type:e.type,value:a[e.name]||"",onChange:a=>t(e.name,a.target.value),className:"jsx-6551cd1ce7d244b7 border px-2 py-1"})]},e.name)}),(0,s.jsx)(i(),{id:"6551cd1ce7d244b7",children:"input.jsx-6551cd1ce7d244b7,select.jsx-6551cd1ce7d244b7{width:100%;padding:.5em;border:1px solid#ccc}.label.jsx-6551cd1ce7d244b7{text-align:right}"})]});function ApplicationInfo(e){let{applicationInfo:a,setApplicationInfo:t,onSave:n,saveStatus:l}=e,updateApplicant=(e,s,n)=>{let i=[...a];i[e][s]=n,t(i)},updateNestedField=(e,s,n,i,l)=>{let o=[...a],d=o[e][s][n];d[i]=l,t(o)},addApplicant=()=>{t([...a,{residency:"",fullName:"",gender:"",dateOfBirth:"",maritalStatus:"",dependents:"",phone:"",email:"",currentAddress:"",currentMoveInDate:"",housingStatus:"",previousAddresses:[{address:"",movedIn:"",housingStatus:""},{address:"",movedIn:"",housingStatus:""}],employmentHistory:[{employmentStatus:"",companyName:"",jobTitle:"",dateStarted:"",companyPhone:"",companyAddress:"",annualIncome:""},{employmentStatus:"",companyName:"",jobTitle:"",dateStarted:"",companyPhone:"",companyAddress:""},{employmentStatus:"",companyName:"",jobTitle:"",dateStarted:"",companyPhone:"",companyAddress:""}]}])},removeApplicant=e=>{let s=[...a];s.splice(e,1),t(s)};return(0,d.useEffect)(()=>{0===a.length&&addApplicant()},[]),(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 space-y-6",children:[(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 row space-between align-center save-container",children:[(0,s.jsx)("div",{className:"jsx-c629f77a9e710d6 ",children:"Incase you lost your input, you can save your data at anytime."}),(0,s.jsx)("div",{onClick:n,className:"jsx-c629f77a9e710d6 action-button save-button",children:l})]}),(0,s.jsx)("h1",{className:"jsx-c629f77a9e710d6",children:"Personal Information"}),(0,s.jsx)("div",{className:"jsx-c629f77a9e710d6 description",children:"Please tell us something about the applicants."}),a.map((e,t)=>(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 border p-4 rounded shadow relative",children:[(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 row align-center space-between",children:[" ",(0,s.jsxs)("h2",{className:"jsx-c629f77a9e710d6 text-lg font-bold mb-4",children:["Applicant ",t+1]}),a.length>1&&(0,s.jsx)("div",{onClick:()=>removeApplicant(t),className:"jsx-c629f77a9e710d6 button pointer",children:"Remove"})]}),(0,s.jsx)("h3",{className:"jsx-c629f77a9e710d6 text-lg font-semibold mb-2",children:"Personal Info"}),renderFields(p,e,(e,a)=>updateApplicant(t,e,a)),(0,s.jsx)("div",{className:"jsx-c629f77a9e710d6 ",children:" Current Address "}),renderFields(u,e,(e,a)=>updateApplicant(t,e,a)),(()=>{let a=new Date(e.currentMoveInDate),n=(new Date().getTime()-a.getTime())/315576e5;return!isNaN(a.getTime())&&n<3?(0,s.jsx)("div",{className:"jsx-c629f77a9e710d6 mt-6",children:(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 column",children:[" ",e.previousAddresses.map((a,n)=>{if(1===n){var i;let a=new Date(e.currentMoveInDate),t=new Date(null===(i=e.previousAddresses[0])||void 0===i?void 0:i.movedIn),s=(a.getTime()-t.getTime())/315576e5;if(isNaN(t.getTime())||s>=3)return null}return(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 column",children:["Previous Address ",n+1," ",x.map(e=>{var i;return(0,s.jsxs)("label",{className:"jsx-c629f77a9e710d6 grid-cols grid-cols-2",children:[(0,s.jsx)("span",{className:"jsx-c629f77a9e710d6 font-medium label",children:e.label}),"options"===e.type?(0,s.jsxs)("select",{value:a[e.name]||"",onChange:a=>updateNestedField(t,"previousAdd
1resses",n,e.name,a.target.value),className:"jsx-c629f77a9e710d6 border px-2 py-1",children:[(0,s.jsx)("option",{value:"",className:"jsx-c629f77a9e710d6",children:"Select..."}),null===(i=e.options)||void 0===i?void 0:i.map(e=>(0,s.jsx)("option",{value:e,className:"jsx-c629f77a9e710d6",children:e},e))]}):(0,s.jsx)("input",{type:e.type,value:a[e.name]||"",onChange:a=>updateNestedField(t,"previousAddresses",n,e.name,a.target.value),className:"jsx-c629f77a9e710d6 border px-2 py-1"})]},e.name)})]},n)})]})}):null})(),(()=>{var a;let n=new Date(null===(a=e.employmentHistory[0])||void 0===a?void 0:a.dateStarted),i=(new Date().getTime()-n.getTime())/315576e5;return(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 mt-6",children:[(0,s.jsx)("h3",{className:"jsx-c629f77a9e710d6 font-semibold mb-2",children:"Employment History"}),(0,s.jsxs)("div",{className:"jsx-c629f77a9e710d6 column",children:[(0,s.jsx)("span",{className:"jsx-c629f77a9e710d6 col-span-full font-medium",children:"Current Employment"}),f.map(a=>{var n,i,l;return(0,s.jsxs)("label",{className:"jsx-c629f77a9e710d6 grid-cols grid-cols-2",children:[(0,s.jsx)("span",{className:"jsx-c629f77a9e710d6 font-medium label",children:a.label}),"options"===a.type?(0,s.jsxs)("select",{value:(null===(n=e.employmentHistory[0])||void 0===n?void 0:n[a.name])||"",onChange:e=>updateNestedField(t,"employmentHistory",0,a.name,e.target.value),className:"jsx-c629f77a9e710d6 border px-2 py-1",children:[(0,s.jsx)("option",{value:"",className:"jsx-c629f77a9e710d6",children:"Select..."}),null===(i=a.options)||void 0===i?void 0:i.map(e=>(0,s.jsx)("option",{value:e,className:"jsx-c629f77a9e710d6",children:e},e))]}):(0,s.jsx)("input",{type:a.type,value:(null===(l=e.employmentHistory[0])||void 0===l?void 0:l[a.name])||"",onChange:e=>updateNestedField(t,"employmentHistory",0,a.name,e.target.value),className:"jsx-c629f77a9e710d6 border px-2 py-1"})]},a.name)})]}),!isNaN(n.getTime())&&i<3&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"jsx-c629f77a9e710d6 block font-medium mb-1",children:"Previous Employment (Required)"}),[1,2].map(a=>{if(2===a){var n,i;let a=new Date(null===(n=e.employmentHistory[0])||void 0===n?void 0:n.dateStarted),t=new Date(null===(i=e.employmentHistory[1])||void 0===i?void 0:i.dateStarted),s=(a.getTime()-t.getTime())/315576e5;if(isNaN(t.getTime())||s>=3)return null}return(0,s.jsx)("div",{className:"jsx-c629f77a9e710d6 column",children:f.map(n=>{var i,l,o;return(0,s.jsxs)("label",{className:"jsx-c629f77a9e710d6 grid-cols grid-cols-2",children:[(0,s.jsx)("span",{className:"jsx-c629f77a9e710d6 font-medium label",children:n.label}),"options"===n.type?(0,s.jsxs)("select",{value:(null===(i=e.employmentHistory[a])||void 0===i?void 0:i[n.name])||"",onChange:e=>updateNestedField(t,"employmentHistory",a,n.name,e.target.value),className:"jsx-c629f77a9e710d6 border px-2 py-1",children:[(0,s.jsx)("option",{value:"",className:"jsx-c629f77a9e710d6",children:"Select..."}),null===(l=n.options)||void 0===l?void 0:l.map(e=>(0,s.jsx)("option",{value:e,className:"jsx-c629f77a9e710d6",children:e},e))]}):(0,s.jsx)("input",{type:n.type,value:(null===(o=e.employmentHistory[a])||void 0===o?void 0:o[n.name])||"",onChange:e=>updateNestedField(t,"employmentHistory",a,n.name,e.target.value),className:"jsx-c629f77a9e710d6 border px-2 py-1"})]},n.name)})},a)})]})]})})()]},t)),(0,s.jsx)("button",{onClick:addApplicant,className:"jsx-c629f77a9e710d6 action-button",children:"+ Add Another Applicant"}),(0,s.jsx)(i(),{id:"c629f77a9e710d6",children:"input.jsx-c629f77a9e710d6,select.jsx-c629f77a9e710d6{width:100%;padding:.5em;border:1px solid#ccc}.label.jsx-c629f77a9e710d6{text-align:right}.save-container.jsx-c629f77a9e710d6{background:var(--light-grey);padding:1em 2em;margin-bottom:2em;position:-webkit-sticky;position:sticky;top:80px}"})]})}function EmailToManager(e){let{token:a}=e,[t,n]=(0,d.useState)(!1),[i,l]=(0,d.useState)(!1),[o,r]=(0,d.useState)(null),handleSendEmailClick=async()=>{l(!0),r(null);try{await (0,m.cD)(a),n(!0)}catch(e){r("Failed to notify your manager. Please try again.")}finally{l(!1)}};return t?(0,s.jsxs)("div",{className:"column",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold mb-6",children:"Notification sent"}),(0,s.jsx)("div",{className:"description",children:"Your manager will review your update and get in touch shortly."}
1),(0,s.jsx)("div",{className:"description",children:"Thank you for choosing Smart Mortgage."})]}):(0,s.jsxs)("div",{className:"column",children:[(0,s.jsx)("h1",{className:"text-2xl font-bold mb-6",children:"Notify your broker!"}),(0,s.jsx)("div",{className:"description",children:"Thank you for your input."}),(0,s.jsx)("div",{className:"description",children:"Let your manager know you've updated your application details."}),o&&(0,s.jsx)("div",{style:{color:"red",margin:"0.5em 0"},children:o}),(0,s.jsx)("div",{className:"action-button ".concat(i?"cursor-not-allowed":"pointer"),onClick:i?void 0:handleSendEmailClick,style:{opacity:i?.6:1},children:i?"Sendingâ¦":"Let my manager know now!"})]})}var j=!0,_id_=e=>{var a,t,n,l,p;let{gateData:u,id:x}=e,f=(0,r.N)(c.Z),[j,h]=(0,d.useState)(null),[v,b]=(0,d.useState)(null),[g,y]=(0,d.useState)(!1),[N,w]=(0,d.useState)(null),[k,S]=(0,d.useState)([]),[A,C]=(0,d.useState)("Save"),[T,I]=(0,d.useState)(0),P=(null==u?void 0:null===(a=u.customerAccess)||void 0===a?void 0:a.openAccess)&&(null==u?void 0:null===(t=u.customerAccess)||void 0===t?void 0:t.lastVerifiedAt)!=null&&Date.now()-u.customerAccess.lastVerifiedAt<2592e5;(0,d.useEffect)(()=>{if(!P)return;let e=(0,m.kp)(x);e&&(b(e),loadFullAppData(e))},[]);let loadFullAppData=async e=>{y(!0);try{let a=await (0,m.Vt)(x,e),t=null==a?void 0:a.data;h(t);let s=null==t?void 0:t.factFind,n=null==s?void 0:s.clientSection;n?(n.consent&&w(n.consent),n.applicants&&S([...n.applicants])):s&&(s.consent&&w(s.consent),s.applicantInfo&&S([...s.applicantInfo]))}catch(e){var a;(null==e?void 0:null===(a=e.response)||void 0===a?void 0:a.status)===401&&b(null)}finally{y(!1)}};(0,d.useEffect)(()=>{C("Save")},[k]);let saveData=async()=>{v&&j&&(await (0,m.Ei)({id:x,clientSection:{consent:N,applicants:k}},v),C("Saved"))};if(!(null==u?void 0:null===(n=u.customerAccess)||void 0===n?void 0:n.openAccess))return(0,s.jsxs)("div",{className:"jsx-d642ecf00ef1cdca container vertical-padding",children:[(0,s.jsxs)("div",{className:"jsx-d642ecf00ef1cdca session center column",children:[(0,s.jsx)("div",{className:"jsx-d642ecf00ef1cdca title",children:"Welcome to Smart Mortgage Customer Centre"}),(0,s.jsx)("div",{className:"jsx-d642ecf00ef1cdca description",children:"This application is not available at the moment."}),(0,s.jsx)("div",{className:"jsx-d642ecf00ef1cdca description",children:"Please contact your Smart Mortgage manager."})]}),(0,s.jsx)(i(),{id:"d642ecf00ef1cdca",children:".container.jsx-d642ecf00ef1cdca{-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center}.title.jsx-d642ecf00ef1cdca{font-weight:bold;font-size:2em;max-width:600px;margin-bottom:1em}"})]});if(!P||!v)return(0,s.jsx)(verification,{applicationId:x,onVerified:()=>{let e=(0,m.kp)(x);e&&(b(e),loadFullAppData(e))}});if(g||!j)return(0,s.jsx)("div",{className:"container vertical-padding",children:(0,s.jsx)("div",{className:"session center column",children:(0,s.jsx)("div",{className:"description",children:"Loading your applicationâ¦"})})});if(!(null==j?void 0:null===(p=j.factFind)||void 0===p?void 0:null===(l=p.clientSection)||void 0===l?void 0:l.consent)&&!N)return(0,s.jsx)(Application_consent,{onConfirm:async e=>{w({...e}),await (0,m.Ei)({id:x,clientSection:{consent:e}},v)}});let D=[(0,s.jsx)(ApplicationInfo,{applicationInfo:k,setApplicationInfo:S,onSave:saveData,saveStatus:A},"ApplicantInfo"),(0,s.jsx)(EmailToManager,{token:v},"EmailToManager")],E=T===D.length-1;return(0,s.jsxs)("div",{className:"jsx-32fe38649b9edda9 container",children:[(0,s.jsxs)(o(),{children:[(0,s.jsx)("title",{className:"jsx-32fe38649b9edda9",children:"Application | ".concat(f.formatMessage({id:"company-name"}))}),(0,s.jsx)("link",{rel:"icon",href:"/favicon.ico",className:"jsx-32fe38649b9edda9"})]}),(0,s.jsxs)("div",{className:"jsx-32fe38649b9edda9 vertical-padding",children:[(0,s.jsx)("div",{className:"jsx-32fe38649b9edda9 progress-bar",children:["Personal Info","Complete"].map((e,a)=>(0,s.jsxs)("div",{className:"jsx-32fe38649b9edda9 "+"progress-step ".concat(a===T?"active":a<T?"done":""),children:[(0,s.jsx)("div",{className:"jsx-32fe38649b9edda9 step-dot",children:a<T?"â":a+1}),(0,s.jsx)("div",{className:"jsx-32fe38649b9edda9 step-label",children:e})]},a))}),(0,s.jsxs)("div",{className:"jsx-32fe38649b9edda9 session",children:[D[T],!E&&(0,s.jsx)("div",{className:"jsx-32fe38649b9edda9 horizontal-divider"}),(0,s.jsxs)("div",{className:"jsx-32fe38649b9edda9 row space-between align-center nav
1-row",children:[0!==T?(0,s.jsx)("div",{onClick:()=>I(T-1),className:"jsx-32fe38649b9edda9 button pointer",children:"Back"}):(0,s.jsx)("div",{className:"jsx-32fe38649b9edda9"}),!E&&(0,s.jsx)("div",{onClick:()=>{saveData(),I(T+1)},className:"jsx-32fe38649b9edda9 button pointer",children:"Next"})]})]})]}),(0,s.jsx)(i(),{id:"32fe38649b9edda9",children:".progress-bar.jsx-32fe38649b9edda9{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:2em;padding:1.5em 0}.progress-step.jsx-32fe38649b9edda9{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-moz-box-orient:vertical;-moz-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;gap:.4em;opacity:.4}.progress-step.active.jsx-32fe38649b9edda9{opacity:1}.progress-step.done.jsx-32fe38649b9edda9{opacity:.7}.step-dot.jsx-32fe38649b9edda9{width:2em;height:2em;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;background:var(--secondary,#888);color:white;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;font-size:.85em;font-weight:bold}.progress-step.active.jsx-32fe38649b9edda9 .step-dot.jsx-32fe38649b9edda9{background:var(--dark,#333)}.step-label.jsx-32fe38649b9edda9{font-size:.8em}.nav-row.jsx-32fe38649b9edda9{margin-top:1.5em}"})]})}},9008:function(e,a,t){e.exports=t(9201)}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=6357)}),_N_E=e.O()}]);
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.