PageSourceSearch

https://app.rechound.com/_next/static/chunks/3719-c8b59722ae93c206.js

js rechound.com collected 2026-10-02 00:33:41 UTC 25,870 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3719],{77028:function(e,n,t){t.d(n,{l:function(){return Z},Z:function(){return y}});var i=t(24246),s=t(27378),l=t(47893),r=t(9863),o=t(3862),a=t(96970),c=t(2185),d=t(37386),x=t(93193),h=t(94457),u=t(5642),p=e=>e.tenant.recHoundTenantDetails.disconnected&&null!==e.tenant.xeroTenantDetails.id?(0,i.jsx)(u.Z,{icon:(0,i.jsx)(x.Z,{color:"error"}),popoverText:"This company is no longer connected to Xero."}):"expired"===e.tenant.recHoundTenantDetails.subscriptionType?(0,i.jsx)(u.Z,{icon:(0,i.jsx)(x.Z,{color:"error"}),popoverText:"Subscription expired for this company"}):"paid"===e.tenant.recHoundTenantDetails.subscriptionType?(0,i.jsx)(o.Z,{display:"flex",justifyContent:"center",p:1,children:(0,i.jsx)(h.Z,{color:"success"})}):(0,i.jsx)(a.Z,{children:e.tenant.recHoundTenantDetails.subscriptionType}),j=t(27833),g=t(10316),m=t(62624),v=t(59010),f=t(73868);let Z=()=>{j.Z.post("/api/xero/removeTenantCache").then(()=>{j.Z.get("/api/xero/consentUrl").then(e=>{window.location=e.data.consentUrl})})};var y=e=>{var n,t;let x=e.tenant,[h,y]=s.useState(null),w=()=>{let e=confirm("Are you sure you want to disconnect ".concat(x.recHoundTenantDetails.name,"?"));if(""===x.xeroTenantDetails.id||!x.xeroTenantDetails.id){alert("This company needs to be disconnected in Xero");return}e&&j.Z.post("/api/xero/deleteTenant",{tenantId:x.xeroTenantDetails.tenantId,connectionId:x.xeroTenantDetails.id}).then(()=>{j.Z.post("/api/xero/removeTenantCache").then(()=>{alert("Company disconnected"),location.reload()})})},T=(0,f.useSession)(),C=(null===(n=e.tenant.recHoundTenantDetails.ownerUserId)||void 0===n?void 0:n.toString())===(null===(t=T.data)||void 0===t?void 0:t.userId.toString()),b=(0,i.jsx)(l.Z,{onClick:e=>{e.stopPropagation(),y(e.currentTarget)},children:(0,i.jsx)(m.Z,{})});return!0===x.recHoundTenantDetails.disconnected&&null!==x.xeroTenantDetails.id&&(b=(0,i.jsx)(r.Z,{sx:{cursor:"pointer",ml:1},onClick:e=>{e.preventDefault(),e.stopPropagation(),Z()},children:(0,i.jsx)(g.Z,{})})),(0,i.jsxs)(o.Z,{sx:{width:"100%",my:1,gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center"},display:"grid",justifyContent:"space-between",flexDirection:"row",children:[(0,i.jsx)(o.Z,{}),(0,i.jsx)(a.Z,{variant:"h6",textAlign:"center",children:x.recHoundTenantDetails.name}),(0,i.jsxs)(o.Z,{sx:{display:"flex",alignItems:"center"},children:[C?(0,i.jsx)(u.Z,{icon:(0,i.jsx)(v.Z,{}),popoverText:"You're the owner of this company in RecHound"}):null,(0,i.jsx)(p,{tenant:x}),b]}),(0,i.jsx)(c.Z,{anchorEl:h,open:!!h,onClose:()=>{y(null)},children:!1===x.recHoundTenantDetails.disconnected?(0,i.jsx)(d.Z,{onClick:()=>{w()},children:"Disconnect"}):(0,i.jsx)(d.Z,{onClick:()=>{Z()},children:"Connect to Xero"})})]})}},5642:function(e,n,t){var i=t(24246),s=t(47893),l=t(3445),r=t(96970),o=t(27378);n.Z=e=>{let[n,t]=o.useState(null),a=()=>{t(null)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.Z,{onMouseEnter:e=>{t(e.currentTarget)},onMouseLeave:a,onClick:n=>{e.onClick&&e.onClick(n)},sx:!1===e.padding?{p:0}:{},children:e.icon}),(0,i.jsx)(l.ZP,{id:"mouse-over-popover",sx:{pointerEvents:"none"},open:!!n,anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},onClose:a,disableRestoreFocus:!0,children:e.popoverText?(0,i.jsx)(r.Z,{sx:{p:1},children:e.popoverText}):(0,i.jsx)(i.Fragment,{children:e.children})})]})}},13719:function(e,n,t){t.d(n,{Z:function(){return V}});var i=t(24246),s=t(3862),l=t(19619),r=t(75392),o=t(96970),a=t(95903),c=t(78178),d=t(89521),x=t(47893),h=t(3445),u=t(41034),p=t(46474),j=t(27378),g=t(86677),m=t(73868),v=t(60289),f=e=>(0,i.jsxs)(s.Z,{sx:{width:"100%"},children:[(0,i.jsx)(r.Z,{sx:{float:"right"},onClick:()=>(0,m.signOut)({redirect:!1}),children:"Logout"}),(0,i.jsxs)(s.Z,{display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",style:{height:"90vh"},children:[(0,i.jsx)(o.Z,{variant:"h3",children:"Welcome to RecHound \uD83D\uDC15"}),(0,i.jsx)(o.Z,{variant:"h3",children:"To get started please add your first company"}),(0,i.jsx)(s.Z,{mt:8,children:(0,i.jsx)(r.Z,{onClick:e.onAddCompany,sx:{py:2,px:6},style:{fontSize:"20px",fontWeight:900},variant:"contained",children:"Add company"})})]})]}),Z=t(96711),y=t(10043),w=t(81783);let T=()=>(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 128 128",children:(0,i.jsx)("g",{transform:"matrix(0.5,0,0,0.5,31.760135569595597,12.760752631578946)",children:(0,i.jsx)("svg",{viewBox:"0 0 59 95","data-background-color":"#ffffff",preserveAspectRatio:"xMidYMid meet",height:"206",width:"128",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",children:(0,i.jsxs)("g",{id:"tight-bounds",transform:"matrix(1,0,0,1,0.22112502177905924,-0.24049999999999727)",children:[(0,i.jsxs)("svg",{viewBox:"0 0 58.55774995644188 95.481",height:"95.481",width:"58.55774995644188",children:[(0,i.jsx)("g",{children:(0,i.jsxs)("svg",{viewBox:"0 0 58.55774995644188 95.481",height:"95.481",width:"58.55774995644188",children:[(0,i.jsx)("g",{children:(0,i.jsx)("svg",{viewBox:"0 0 58.55774995644188 95.481",height:"95.481",width:"58.55774995644188",children:(0,i.jsx)("g",{children:(0,i.jsx)("svg",{viewBox:"0 0 58.55774995644188 95.481",height:"95.481",width:"58.55774995644188",children:(0,i.jsx)("g",{children:(0,i.jsx)("svg",{viewBox:"0 0 58.55774995644188 95.481",height:"95.481",width:"58.55774995644188",children:(0,i.jsx)("g",{children:(0,i.jsx)("svg",{viewBox:"0 0 58.55774995644188 95.481",height:"95.481",width:"58.55774995644188",children:(0,i.jsx)("g",{children:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",version:"1.1",x:"0",y:"0",viewBox:"20.64666332979291 23.648332764863433 48.297781114651514 78.75166723513652",style:{"enableBackgroun
1d:new":"0 0 100 125"},xmlSpace:"preserve",height:"95.481",width:"58.55774995644188",className:"icon-icon-0","data-fill-palette-color":"accent",id:"icon-0",children:(0,i.jsx)("path",{d:"M65.6 29.9c0.9 0.6 1.8 1.2 2.7 1.7 0.2 0.1 0.4 0.1 0.6 0.2 0-0.2 0.1-0.5 0-0.6-1.3-2.2-2.6-4.4-4.5-6.1-1-0.9-1.1-0.8-2.5 0.1-0.4 0.3-1 0.4-1.5 0.3-1.4-0.4-2.9-0.9-4.3-1.5-1.3-0.5-2.5-0.6-3.8 0.6-1.2 1.1-2.5 1-3.7 0.8-1.7-0.2-3.4-0.6-5.2-0.8-0.7-0.1-1.4-0.5-2 0.6-0.6 0.9-0.1 1.5 0.2 2.2 0.4 0.8 0.9 1.5 1.7 1.9 1.6 0.7 3.1 1.3 4.7 2 1.8 0.8 3.9 1 5.6 2.1 1.8 1.1 2.6 3 3.1 5.2 0.3 1.4-0.9 7-4 9.7-0.4 0.3-0.8 0.6-1 0.8-0.7 0.4-1.5 0.9-2.2 1.5-0.7 0.5-1.4 1-2.1 1.5-2.4 1.6-4.7 3.3-7.1 4.8-5.6 3.5-9.7 8.3-12.4 14.2-1.1 2.4-1.9 5-1.7 7.6 0 0.5 0.1 1 0.2 1.5-0.2 1.5-0.3 2.9-0.3 4.5 0 3.8-0.8 7.3-2.1 10.6-0.7 1.7-1.2 2.8-1.7 3.5-0.8 1.2-2.1 2.9-1.5 3.4 0.8 0.3 3.4-2.5 5.4-6 1-1.8 1.9-3.7 2.8-5.5 0.4 1.1 0.8 2.2 1.2 3.3 0.5 1.3 0.7 3.5-0.1 4.7-1 1.5 0.3 2.6 2.2 2.6 0 0 3.6-0.2 6.3-0.2 2.7 0 4.4 0.8 6.5 1.1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0 0.7 0.1 1 0.1 0.2 0 0.5 0 0.7 0 0 0 0.1 0 0.1 0 0 0 0 0 0 0 0.3 0 0.6 0 0.9-0.1 0.7-0.1 0.7-0.7 0.4-1.4-0.5-1.2-1-2.2-2-2.5 0 0 0 0 0 0 0 0 0 0 0 0-1-0.6-2.1 1.1-3.5 0.7s-3.1-0.7-5.8-2c-0.7-0.3-0.8-0.8-0.2-1.4 1.1-1.3 3.5-3.6 4.9-4.5 1.5-1 2.9-2.2 4.3-3.3 3.5-2.6 4.1-6.3 3.8-8.7-0.5-3.2-5.2-4.4-5.2-4.4 0.8-0.2 1.6-0.4 2.4-0.6 2.2-0.2 4.2-0.8 6-1.4 0.2-0.1 0.4-0.1 0.6-0.2 0.1-0.1 0.2-0.1 0.2-0.2 3.1-1.3 5.1-2.8 5.1-2.8 0.4 4.3 0.1 4.9 0.2 9.2 0.1 3.3 0.2 4.4 0.4 7.7 0.1 2.2 0.5 4.8 0.8 6.9 0.4 2.4 0.5 4.4 1.2 6.7 0.2 0.7 1 1.8 1.6 2.1 0.6 0.3 1.3 0.3 2 0.3 0.2 0 0.5 0 0.7 0 0 0 0.1 0 0.1 0 0 0 0 0 0 0 0.3 0 0.6 0 0.9-0.1 0.7-0.1 0.7-0.7 0.4-1.4-0.6-1.4-1.1-2.6-2.8-2.6-1.2-0.3-1.6-1.3-1.8-2.5-0.4-2.1-0.7-4.2-0.9-6.4-0.1-2.5-0.1-2.7 0-5.2 0.1-2.3 0.4-4.6 0.7-6.9 0.3-2.6 0.5-5.2 0.9-7.8 0.3-2.4 0.9-1.7 1.3-4.1 0.1-0.5 0.2-1 0.4-1.4 0.1-0.2 0.2-0.4 0.3-0.6 0-0.1 0.1-0.1 0.1-0.2 0.7-1.1 1.4-3.4 1.8-4.8 0-0.2 0.1-0.3 0.1-0.5 0 0 0 0 0 0l0 0c0.9-3.4 1.2-6.4 1.4-8.4 0.3-2.9-0.5-7.4-1.2-10-0.8-2.9-1.9-5.6-2.8-8.4-0.1-0.2 0-0.6 0-0.9C65.1 29.9 65.4 29.8 65.6 29.9z",fill:"#39cccc","data-fill-palette-color":"accent"})})})})})})})})})})}),(0,i.jsx)("g",{})]})}),(0,i.jsx)("defs",{})]}),(0,i.jsx)("rect",{width:"58.55774995644188",height:"95.481",fill:"none",stroke:"none",visibility:"hidden"})]})})})}),C=(0,y.F4)("\n  0% {\n    opacity: .15;\n  }\n  50% {\n    opacity: 1;\n  }\n  100% {\n    opacity: .15;\n  }\n");var b=()=>(0,i.jsx)(w.Z,{sx:{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:(0,i.jsx)(w.Z,{sx:{width:"50vw",height:"50vh",animation:"".concat(C," 3s infinite")},children:(0,i.jsx)(T,{})})}),D=t(77028),I=t(80739),k=t(24114),S=t(41336),z=t(12653),H=t(27833),R=t(2066),A=t(3931),P=t(5642),B=e=>{var n;let[t,l]=(0,j.useState)(void 0),[a,c]=(0,j.useState)(void 0),[d,h]=(0,j.useState)(""),u=null===(n=(0,m.useSession)().data)||void 0===n?void 0:n.userId.toString(),p=()=>(0,i.jsx)(r.Z,{onClick:()=>{H.Z.post("/api/user/customer-portal",{}).then(e=>{window.location.assign(e.data.url)})},children:"Upgrade plan"});(0,j.useEffect)(()=>{void 0!==e.tenants.find(e=>{var n;return(null===(n=e.recHoundTenantDetails.ownerUserId)||void 0===n?void 0:n.toString())===u})&&H.Z.post("/api/user/tenantsRemaining").then(e=>{l(e.data.tenantsPaid),c(e.data.subscriptionStatus)})},[e.tenants]);let g=e.tenants.filter(e=>!1===e.recHoundTenantDetails.disconnected).length;e.tenants.filter(e=>"expired"===e.recHoundTenantDetails.subscriptionType2);let v=e.tenants.filter(e=>"expired"!==e.recHoundTenantDetails.subscriptionType2);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(s.Z,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",width:"100%",mb:2},children:[(0,i.jsx)(s.Z,{}),(0,i.jsx)(o.Z,{variant:"h4",textAlign:"center",children:"Select a company"}),(0,i.jsxs)(s.Z,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"start",flexDirection:"row"},children:[(0,i.jsx)(P.Z,{popoverText:"Refresh companies",icon:(0,i.jsx)(R.Z,{}),onClick:()=>{H.Z.post("/api/xero/removeTenantCache").then(()=>{location.reload()})}}),(0,i.jsx)(x.Z,{onClick:e.onClose,children:(0,i.jsx)(A.Z,{})})]})]}),e.tenants.length>5?(0,i.jsx)(s.Z,{sx:{margin:"auto"},children:(0,i.jsx)(I.Z,{label:"Search",inputRef:e=>e&&e.focus(),variant:"outlined",size:"small",onChange:e=>{h(e.target.value)}})}):null,(0,i.jsx)(k.Z,{sx:{maxHeight:"75vh",overflowY:"scroll"},children:v.filter(e=>e.recHoundTenantDetails.name.toLowerCase().indexOf(d.toLowerCase())>-1).map(n=>(0,i.jsx)(S.Z,{alignItems:"center",onClick:()=>{e.setTenant(n),e.onClose()},children:(0,i.jsx)(D.Z,{tenant:n})},n.xeroTenantDetails.tenantId))}),void 0===t?null:(0,i.jsx)(s.Z,{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",children:"trialing"===a?(0,i.jsxs)(s.Z,{display:"flex",children:[(0,i.jsx)(z.Z,{label:"Free trial",color:"primary"}),(0,i.jsx)(p,{})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o.Z,{textAlign:"center",children:g>t?"You have reached your limit of companies":"".concat(g," of ").concat(t," companies connected")}),(0,i.jsx)(p,{})]})}),(0,i.jsx)(s.Z,{display:"flex",justifyContent:"center",alignItems:"center",m:2,children:(0,i.jsx)(r.Z,{variant:"contained",onClick:()=>{(0,D.l)()},children:"Add company"})})]})},E=t(79894),O=t.n(E),L=t(28854),X=t(5975),F=t(86791),N=t(87754),U=t(69712),M=t(7763),W=t(9199),Y=e=>{var n,t;let[l,r]=j.useState(null),a=(0,m.useSession)(),c=(0,g.useRouter)(),{mode:d,toggleColorMode:u}=(0,j.useContext)(W.k);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(x.Z,{onClick:e=>{r(e.currentTarget)},children:(0,i.jsx)(N.Z,{})}),(0,i.jsx)(h.ZP,{open:!!l,anchorEl:l,onClose:()=>{r(null)},anchorOrigin:{vertical:"bottom",horizontal:"center"},children:(0,i.jsxs)(k.Z,{children:[(0,i.jsx)(L.ZP,{children:"Logged in as"}),(0,i.jsx)(L.ZP,{children:(null===(t=a.data)||void 0===t?void 0:null===(n=t.user)||void 0===n?void 0:n.email)||""}),(0,i.jsx)(X.Z,{}),(0,i.jsx)(L.ZP,{sx:{py:.5},children:(0,i.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",gap:1},children:[(0,i.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",gap:.75},children:["dark"===d?(0,i.jsx)(U.Z,{sx:{fontSize:"1rem",color:"primary.main"}}):(0,i.jsx)(M.Z,{sx:{fontSize:"1rem",color:"warning.main"}}),(0,i.jsx)(o.Z,{variant:"body2",children:"Dark mode"})]}),(0,i.jsx)(F.Z,{size:"small",checked:"dark"===d,onChange:u,color:"primary"})]})}),(0,i.jsx)(X.Z,{}),(0,i.jsx)(S.Z,{onClick:()=>{c.push("/settings")},children:"Settings"}),(0,i.jsx)(S.Z,{onClick:()=>{(0,m.signOut)({redirect:!1})},children:"Logout"})]})})]})},_=t(56133),J=()=>(0,i.jsx)(s.Z,{sx:{display:"flex",alignItems:"center",position:"relative"},children:(0,i.jsx)(_.Z,{})}),q=t(45579),G=t(11728),K=t(38579),Q=t.n(K),V=e=>
1{let[n,t]=(0,j.useState)(!1),[y,w]=j.useState(null),[T,C]=(0,j.useState)(void 0),I=(0,g.useRouter)(),k=(0,m.useSession)({required:!0,onUnauthenticated(){I.push("/")}});if("loading"===k.status)return(0,i.jsx)(b,{});if(void 0===T){if(e.overrideTenantId&&k.data.tenants.length>0){let n=k.data.tenants.find(n=>n.xeroTenantDetails.tenantId===e.overrideTenantId);void 0!==n&&(C(n),localStorage.setItem("tenant",n.xeroTenantDetails.tenantId))}else if(null!==localStorage.getItem("tenant")&&k.data.tenants.length>0){let e=k.data.tenants.find(e=>e.xeroTenantDetails.tenantId===localStorage.getItem("tenant"));void 0!==e?C(e):C(k.data.tenants[0])}else{if(!(k.data.tenants.length>0))return(0,i.jsx)(f,{onAddCompany:D.l});console.log("Setting tenant",k.data.tenants[0]),C(k.data.tenants[0]),localStorage.setItem("tenant",k.data.tenants[0].xeroTenantDetails.tenantId)}}let S=null;return S=(null==T?void 0:T.recHoundTenantDetails.disconnected)===!0&&null!==T.xeroTenantDetails.id&&!1===e.hideCompanySelector?(0,i.jsxs)(s.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:[(0,i.jsx)(l.Z,{severity:"error",children:"This company has been disconnected. Please reconnect to Xero using this app."}),(0,i.jsx)(r.Z,{variant:"contained",sx:{maxWidth:300,mt:2},onClick:()=>{(0,D.l)()},children:"Reconnect"})]}):(null==T?void 0:T.recHoundTenantDetails.subscriptionType)==="expired"?(0,i.jsx)(s.Z,{sx:{display:"flex",flexDirection:"column",alignItems:"center"},children:(0,i.jsxs)(l.Z,{severity:"error",children:[(0,i.jsx)(o.Z,{variant:"h6",sx:{mt:-.5,pt:0,mb:1},children:"Access Denied: Plan Restriction"}),"This company is currently disabled because it is not included in your plan.",(0,i.jsx)("br",{}),"To enable access, please visit your billing page to update your subscription",(0,i.jsx)("br",{}),(0,i.jsx)("br",{}),"If you believe this is a mistake, please contact us at [email protected]."]})}):e.children,(0,i.jsxs)(v.Z.Provider,{value:T,children:[(0,i.jsx)(a.ZP,{anchor:"top",open:n,onClose:e=>{t(!1)},children:(0,i.jsx)(s.Z,{mt:4,display:"flex",flexDirection:"column",justifyContent:"center",alignContent:"center",children:(0,i.jsx)(B,{onClose:()=>{t(!1)},setTenant:e=>{e.xeroTenantDetails.tenantId!==localStorage.getItem("tenant")&&I.push("/home"),C(e),localStorage.setItem("tenant",e.xeroTenantDetails.tenantId)},tenants:k.data.tenants})})}),(0,i.jsx)(c.Z,{position:"static",elevation:0,color:"primary",children:(0,i.jsx)(d.Z,{children:(0,i.jsxs)(s.Z,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",width:"100%"},children:[(0,i.jsx)(O(),{href:"/",children:(0,i.jsx)(Q(),{style:{height:"40px",alignSelf:"center"},src:"/appbar.png",alt:"Rechound",width:223,height:40})}),(0,i.jsx)(s.Z,{display:"flex",alignItems:"center",sx:{justifySelf:"center"},children:!e.hideCompanySelector&&(0,i.jsxs)(o.Z,{variant:"h6",component:"div",sx:{marginLeft:2,fontWeight:700},children:[(0,i.jsx)(O(),{href:"/home",style:{textDecoration:"none",color:"inherit"},children:(null==T?void 0:T.recHoundTenantDetails.name)||"No company selected"}),(0,i.jsx)(x.Z,{color:"inherit",onClick:()=>{t(!0)},children:(0,i.jsx)(p.Z,{})})]})}),(0,i.jsxs)(s.Z,{display:"flex",flexDirection:"row",alignItems:"center",sx:{justifySelf:"end"},children:[(0,i.jsx)(P.Z,{icon:(0,i.jsx)(J,{}),popoverText:"Dashboard",onClick:()=>{I.push("/dashboard")}}),(0,i.jsx)(P.Z,{icon:(0,i.jsx)(G.Z,{}),popoverText:"Reconciliations",onClick:()=>{I.push("/home")}}),(0,i.jsx)(P.Z,{icon:(0,i.jsx)(q.Z,{}),popoverText:"Sync company",onClick:e=>{w(e.currentTarget)}}),(0,i.jsx)(h.ZP,{open:!!y,anchorEl:y,onClose:()=>w(null),anchorOrigin:{vertical:"bottom",horizontal:"center"},children:void 0!==T?(0,i.jsxs)(s.Z,{m:2,sx:{width:400},children:[(0,i.jsx)(o.Z,{textAlign:"center",mb:2,children:"Sync progress"}),(0,i.jsx)(Z.Z,{onSyncDone:()=>{},tenantId:T.xeroTenantDetails.tenantId})]}):null}),void 0!==T?(0,i.jsx)(Y,{tenantId:T.xeroTenantDetails.tenantId}):null]})]})})}),(0,i.jsx)(u.Z,{maxWidth:"xl",children:(0,i.jsx)(s.Z,{sx:{borderBottomLeftRadius:"10px",borderBottomRightRadius:"10px",minHeight:"80vh",bgcolor:"background.paper"},p:2,children:S})})]},null==T?void 0:T.xeroTenantDetails.tenantId)}},96711:function(e,n,t){var i=t(24246),s=t(3862),l=t(43989),r=t(96970),o=t(27833),a=t(27378),c=t(42725);n.Z=e=>{let[n,t]=(0,a.useState)(0),[d,x]=(0,a.useState)(0),[h,u]=(0,a.useState)(!1),[p,j]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{o.Z.post("/api/sync",{tenantId:e.tenantId}).then(e=>{}).catch(e=>{403===e.response.status&&j(!1)})},[e.tenantId]),(0,a.useEffect)(()=>{let n;let i=()=>o.Z.post("/api/sync/get",{tenantId:e.tenantId}).then(i=>{let s=i.data.syncs,l=Object.values(s).reduce((e,n)=>!1===n.inProgress?e+1:e,0);0===s.journals.lastJournalNumber?t(1):t(l),x(Object.keys(s).length),l===Object.keys(s).length&&0!==s.journals.lastJournalNumber&&(u(!0),clearInterval(n),e.onSyncDone())});return n=setInterval(()=>{i()},5e3),()=>{clearInterval(n)}}),!1===p)?(0,i.jsx)(c.Z,{}):0===d?(0,i.jsxs)(s.Z,{children:[(0,i.jsx)(l.Z,{variant:"determinate",value:0}),(0,i.jsx)(r.Z,{textAlign:"center",children:"Sync starting"})]}):(0,i.jsxs)(s.Z,{children:[(0,i.jsx)(l.Z,{variant:"determinate",value:h?100:n/d*100}),h?(0,i.jsx)(r.Z,{textAlign:"center",children:"Sync complete - Refresh the page to view changes"}):(0,i.jsxs)(r.Z,{textAlign:"center",children:["Step ",n," of ",d]})]})}},10316:function(e,n,t){var i=t(24246);t(27378),n.Z=()=>(0,i.jsxs)("svg",{height:"43",viewBox:"0 0 190 43",width:"190",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",id:"xeroLogin",children:[(0,i.jsxs)("defs",{children:[(0,i.jsxs)("linearGradient",{id:"c",x1:"50%",x2:"50%",y1:"122.437977%",y2:"7.040451%",children:[(0,i.jsx)("stop",{offset:"0",stopColor:"#0b789b"}),(0,i.jsx)("stop",{offset:"1",stopColor:"#0d84ab"})]}),(0,i.jsx)("path",{id:"d",d:"m61.7060001 20.656c0-3.568 2-5.536 4.592-5.536 1.904 0 3.12.848 3.76 2.48l-1.152.656c-.368-1.296-1.328-1.984-2.608-1.984-1.984 0-3.152 1.664-3.152 4.384s1.168 4.384 3.152 4.384c1.28 0 2.24-.704 2.608-1.984l1.152.64c-.64 1.648-1.856 2.496-3.76 2.496-2.592 0-4.592-1.968-4.592-5.536zm17.04 1.344c0 2.688-1.456 4.192-3.584 4.192s-3.584-1.504-3.584-4.192 1.456-4.192 3.584-4.192 3.584 1.504 3.584 4.192zm-1.328 0c0-2.064-.784-3.168-2.256-3.168s-2.256 1.104-2.256 3.168.784 3.168 2.256 3.168 2.256-1.104 2.256-3.168zm4.544-4 .16 1.552c.448-1.104 1.424-1.744 2.688-1.744 1.456 0 2.464.96 2.464 2.576v5.616h-1.312v-5.344c0-1.024-.496-1.696-1.568-1.696-1.136 0-2.096.656-2.096 2.4v4.64h-1.312v-8zm9.024 0 .16 1.552c.448-1.104 1.424-1.744 2.688-1.744 1.456 0 2.464.96 2.464 2.576v5.616h-1.312v-5.344c0-1.024-.496-1.696-1.568-1.696-1.136 0-2.096.656-2.096 2.4v4.64h-1.312v-8zm11.0399999 7.152c.96 0 1.648-.448 1.888-1.456l1.136.32c-.368 1.552-1.6 2.176-3.024 2.176-2.1919999 0-3.5679999-1.456-3.5679999-4.16 0-2.608 1.408-4.224 3.5679999-4.224 2 0 3.104 1.456 3.104 3.36 0 .464-.08.864-.16 1.072h-5.2479999c.064 1.792.8639999 2.912 2.3039999 2.912zm-2.2719999-3.872h4.0639999c.016-.144.016-.304.016-.416 0-1.12-.64-2.048-1.84-2.048-1.28 0-2.0639999.912-2.2399999 2.464zm7.1039999.72c0-2.624 1.408-4.192 3.568-4.192 1.632 0 2.768.992 2.928 2.448l-1.2.224c-.08-.88-.688-1.632-1.728-1.632-1.488 0-2.24 1.28-2.24 3.152s.752 3.152 2.24 3.152c1.04 0 1.648-.736 1.728-1.664l1.2.224c-.224 1.552-1.296 2.48-2.928 2.48-2.16 0-3.568-1.552-3.568-4.192zm12.544 2.672.24 1.04c-.464.288-1.088.48-1.648.48-1.488 0-2.384-.72-2.384-2.208v-4.976h-1.152v-1.008h1.152v-1.696l1.312-.208v1.904h2.4v1.008h-2.4v4.848c0 .88.48 1.232 1.168 1.232.528 0 .864-.128 1.312-.416zm10.128 0 .24 1.04c-.464.288-1.088.48-1.648.48-1.488 0-2.384-.72-2.384-2.208v-4.976h-1.152v-1.008h1.152v-1.696l1.312-.208v1.904h2.4v1.008h-2.4v4.848c0 .88.48 1.232 1.168 1.232.528 0 .864-.128 1.312-.416zm8.768-2.672c0 2.688-1.456 4.192-3.584 4.192s-3.584-1.504-3.584-4.192 1.456-4.192 3.584-4.192 3.584 1.504 3.584 4.192zm-1.328 0c0-2.064-.784-3.168-2.256-3.168s-2.256 1.104-2.256 3.168.784 3.168 2.256 3.168 2.256-1.104 2.256-3.168zm13.84 4-2.88-4.384h-.032l-2.896 4.384h-1.472l3.664-5.488-3.424-5.2h1.536l2.64 4.128h.032l2.656-4.128h1.488l-3.44 5.168 3.68 5.52zm6.192-.848c.96 0 1.648-.448 1.888-1.456l1.136.32c-.368 1.552-1.6 2.176-3.024 2.176-2.192 0-3.568-1.456-3.568-4.16 0-2.608 1.408-4.224 3.568-4.224 2 0 3.104 1.456 3.104 3.36 0 .464-.08.864-.16 1.072h-5.248c.064 1.792.864 2.912 2.304 2.912zm-2.272-3.872h4.064c.016-.144.016-.304.016-.416 0-1.12-.64-2.048-1.84-2.048-1.28 0-2.064.912-2.24 2.464zm11.824
1-3.424-.08 1.376c-.144-.032-.416-.048-.64-.048-1.264 0-2.192 1.024-2.192 2.768v4.048h-1.312v-8h1.04l.176 2.048c.32-1.424 1.52-2.464 3.008-2.192zm8.208 4.144c0 2.688-1.456 4.192-3.584 4.192s-3.584-1.504-3.584-4.192 1.456-4.192 3.584-4.192 3.584 1.504 3.584 4.192zm-1.328 0c0-2.064-.784-3.168-2.256-3.168s-2.256 1.104-2.256 3.168.784 3.168 2.256 3.168 2.256-1.104 2.256-3.168z"})]}),(0,i.jsxs)("g",{fill:"none",children:[(0,i.jsx)("rect",{fill:"url(#c)",height:"43",rx:"4",width:"190"}),(0,i.jsx)("use",{fill:"#000",xlinkHref:"#d"}),(0,i.jsx)("use",{fill:"#fff",xlinkHref:"#d"}),(0,i.jsxs)("g",{transform:"translate(9 5)",children:[(0,i.jsx)("path",{id:"123",d:"m16.4995319 0c-9.11353873 0-16.4995319 7.38765603-16.4995319 16.5 0 9.1115118 7.38599317 16.5 16.4995319 16.5 9.110834 0 16.5004681-7.3884882 16.5004681-16.5 0-9.11234397-7.3896341-16.5-16.5004681-16.5",fill:"#fff"}),(0,i.jsx)("path",{id:"567",d:"m16.8210417 13.1529405c-.5917606-.3667099-1.2823572-.5604607-1.9972182-.5604607-.7887004 0-1.5396445.2313595-2.1716716.669108-.9878365.6847018-1.5775054 1.8030753-1.5775054 2.9919777 0 .2984232.037861.5947061.1124324.8804911.3796556 1.4476786 1.6564696 2.5426103 3.1772881 2.7245384.1470512.0171227.2943115.0258878.4375975.0258878.3046657 0 .601069-.0378125.9057347-.1150682.396076-.0928496.7734306-.2491956 1.1219188-.4645536.329244-.2079178.6324455-.4880972.9513352-.8788603l.0209177-.0210976c.1061571-.1291332.1555228-.2951617.1353372-.4553807-.0180937-.1434021-.0884817-.2672355-.1980902-.3484661-.1039608-.0780711-.2277933-.1210816-.3485928-.1210816-.1177665 0-.2907555.0415836-.4472196.2403285l-.0122369.0158996c-.0516666.0671656-.1051112.1365735-.1666091.2054717-.2107455.230748-.452972.4208297-.719463.5648434-.3815381.1982353-.7937206.3002577-1.2242061.3033153-1.3523268-.0144727-2.180457-.8917023-2.5040532-1.7064547-.0508299-.1466635-.0871221-.2805871-.1104453-.4047262-.0004183-.0126381-.0013596-.0257859-.0021963-.0387298l5.2357952-.0009173c.3636535-.0075421.6683192-.1369811.8577286-.3643657.1714203-.2058794.2358467-.4751533.181147-.7590019-.2228777-1.0285815-.7961262-1.8525067-1.6577247-2.3826971zm-4.5758429 2.4481301c.2985996-1.1411018 1.350758-1.9376104 2.5596942-1.9376104 1.2152115 0 2.2624542.7944702 2.5623089 1.9376104zm13.6366416-.3005635c-.5269159 0-.9556233.4167528-.9556233.9289033 0 .5123543.4287074.9291071.9556233.9291071.52587 0 .9537408-.4167528.9537408-.9291071 0-.5121505-.4278708-.9289033-.9537408-.9289033zm-3.4273588-2.1263671c0-.2910849-.2441091-.5278462-.5434408-.5278462l-.1530127-.0021403c-.4644766 0-.9036429.1387138-1.2735718.4017705-.0708063-.2130138-.2779957-.362735-.511646-.362735-.3011097 0-.5384206.2300346-.5403032.5238713l.001778 6.0813915c.0019872.28976.2439.5254001.5394665.5254001.2973446 0 .5393619-.2357421.5393619-.5256039v-3.7400741c0-1.2117327.1070984-1.7182775 1.1844626-1.8481242.0893184-.0103959.1852259-.0110074.2095949-.0110074.3171118-.0112113.5473106-.2276904.5473106-.5149023zm-14.20832125 3.0552704 2.79407655-2.7315709c.1021828-.0977418.1585559-.2291173.1585559-.3698695 0-.2905753-.2436907-.5270308-.5431271-.5270308-.1449594 0-.2816563.0559543-.3847803.1573652l-2.7942858 2.7178117-2.80537212-2.7229077c-.10228736-.0981494-.2378338-.1522692-.3818519-.1522692-.29797208 0-.54030318.2364555-.54030318.5270308 0 .141058.05783733.2748796.16284399.3766981l2.79606375 2.7226019-2.79188022 2.7259653c-.10772595.1001879-.16702752.2347229-.16702752.3786346 0 .2904734.2423311.526929.54030318.526929.14182174 0 .27736819-.0538141.38206108-.1520654l2.80244365-2.7287172 2.79031139 2.7159771c.1069938.1071185.2459917.1661304.391474.1661304.2994364 0 .5431271-.2369651.5431271-.5282539 0-.1391214-.0562685-.2709046-.1583467-.3713982zm17.63568005-3.646715c-2.0639456 0-3.7431109 1.6359257-3.7431109 3.646715 0 2.0102796 1.6791653 3.6457977 3.7431109 3.6457977 2.0628997 0 3.7412283-1.6355181 3.7412283-3.6457977 0-2.0107893-1.6783286-3.646715-3.7412283-3.646715zm0 6.2017596c-1.4469792 0-2.6241206-1.1461978-2.6241206-2.5550446 0-1.4104776 1.1771414-2.5580004 2.6241206-2.5580004 1.4454104 0 2.6212967 1.1475228 2.6212967 2.5580004 0 1.4088468-1.1758863 2.5550446-2.6212967 2.5550446z",fill:"#13b5ea"})]})]})]})},42725:function(e,n,t){var i=t(24246),s=t(3862),l=t(96970),r=t(9863),o=t(10316),a=t(77028);n.Z=()=>(0,i.jsxs)(s.Z,{justifyContent:"center",display:"flex",flexDirection:"column",alignItems:"center",children:[(0,i.jsx)(l.Z,{textAlign:"center",mb:1,children:"Your RecHound account has not been connected to this Xero company yet. To manually sync, please use the button below to connect."}),(0,i.jsx)(r.Z,{sx:{cursor:"pointer"},onClick:()=>(0,a.l)(),children:(0,i.jsx)(o.Z,{})})]})},60289:function(e,n,t){let i=t(27378).createContext(void 0);n.Z=i}}]);

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.