1"use strict";(self.webpackChunkcapo_ui=self.webpackChunkcapo_ui||[]).push([[2597],{23013(a,t,n){n.d(t,{$:()=>e});function e(a,t){var n,e;return null!==(e=parseFloat((null!==a&&void 0!==a?a:"").replace(/[^\d.]/g,"")),n=isNaN(e)?void 0:e)&&void 0!==n?n:t}},23245(a,t,n){n.d(t,{c:()=>o});var e=n(25618);async function o(a){const t=a.waitForFetch,n=a.updateForm,o=a.clickButton,i=a.data,c=a.waitForRoute,l=a.checkInput,r=a.findByLabel;await c(e.BV.LoanApplication.Documents),await t("graphql/LoanApplication?GetDocuments");const s=Date.now()+3e4;for(;Date.now()<s;){const t=await a.getForm();if("fullNameMatch"in t){var u,w;await n({fullNameMatch:i.firstName?"".concat(i.firstName," ").concat(i.lastName):null!==(u=null===(w=await r("Full Name"))||void 0===w?void 0:w.textContent)&&void 0!==u?u:""});break}"IsMilitary_False"in t?(await n({IsMilitary_False:l}),await a.clickButton("Agree & Continue")):"Select your phone number"in t?await a.clickButton("No thanks"):await a.clickButton("Agree & Continue")}await o("Complete My Loan")}},45663(a,t,n){n.d(t,{v:()=>o});var e=n(25618);async function o(a){var t;let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=a.waitForFetch,i=a.expect,c=a.location,l=a.waitForRoute,r=a.findByLabel;await l(e.BV.Loan.Complete);const s=await o("graphql/Loan?GetCompleteLoan");await s.responseJson();const u=c().pathname,w=null===(t=u.match(/\d+/))||void 0===t?void 0:t[0];i(u).toBe("/Loan/".concat(w,"/Complete")),n&&i(r(/Instant funding to Revolve Finance/)).toBeTruthy()}},82597(a,t,n){n.d(t,{refinanceTest:()=>p});var e=n(91809),o=n(93998),i=n.n(o),c=n(88913),l=n(23245),r=n(23013),s=n(45663),u=n(25618);async function w(a,t){var n,e;const o=a.navigate,i=a.waitForRoute,w=a.clickButton,d=a.waitForFetch,v=a.findByRole,p=a.findInputs,f=a.expect,m=a.findByLabel,h=a.waitFor;o(u.BV.User.AccountSummary),await i(u.BV.User.AccountSummary),await w(/Refinance Now/i),await i(u.BV.Loan.Refinance),await d("graphql/Loan?GetRefinanceRequest");const y=await d("graphql/Loan?CalculateRefinanceValues");if("AL"===t){const a=await v("alert");return void f(null===a||void 0===a?void 0:a.textContent).toContain("If you are eligible to refinance your loan, please visit your nearest")}const B=await y.responseJson();f(B.data.calculateRefinanceValues.newBalance).toBeGreaterThan(0);const L=await h(()=>m(/new loan balance/i));f((0,r.$)(null!==(n=null===L||void 0===L||null===(e=L.textContent)||void 0===e?void 0:e.replace(/[^\d+.]+/,""))&&void 0!==n?n:"")).toBe(B.data.calculateRefinanceValues.newBalance);const F=await p(a=>{var t;return!(null===(t=a.parentElement)||void 0===t||!t.classList.contains("js-checked"))});for(const l of F)(0,c.qM)(l)&&(0,c.YE)(l);await w("btnConfirmRefinance"),await w("btnOk"),await d(void 0),await(0,l.c)(a);(await i(u.BV.Loan.Complete,u.BV.Loan.Repayment)).pathname===u.BV.Loan.Repayment?await async function(a){var t;const n=a.waitForFetch,e=a.expect,o=a.location,i=a.waitForRoute;await i(u.BV.Loan.Repayment);const c=await n("graphql/Loan?GetRepayment");await c.responseJson();const l=o().pathname,r=null===(t=l.match(/\d+/))||void 0===t?void 0:t[0];e(l).toBe("/Loan/".concat(r,"/Repayment"))}(a):await(0,s.v)(a)}const d=new(i()),v=new e.Yl;async function p(a,t,n,e,o){var i,c,l,r,s;a.status("Locating a ".concat(t," visitor")),a.debug=o;const u=await v.findVisitors({state:t,productType:n,loanType:e,canRefinance:!0},a.abortSignal);if(0===(null===(i=u.data)||void 0===i||null===(c=i.findVisitors)||void 0===c?void 0:c.length))throw new Error("Unable to locate visitor with the given Criteria");const p=d.pickone(null!==(l=null===(r=u.data)||void 0===r?void 0:r.findVisitors)&&void 0!==l?l:[]);await(null===(s=a.client)||void 0===s?void 0:s.loadVisitor(p)),await w(a,t)}}}]); 2//# sourceMappingURL=2597.1e81b363.chunk.js.map
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.