PageSourceSearch

https://www.simplywise.com/static/js/2577.5d594a3f.chunk.js

js simplywise.com collected 2026-09-28 08:44:06 UTC 49,677 bytes, 2 lines download raw bytes

1(self.webpackChunksimplywise_web=self.webpackChunksimplywise_web||[]).push([[2577,1134],{44192:function(e,t,n){"use strict";n(72791);t.Z=n.p+"static/media/receipt.2e5e1c372b259160e1a776f2370cf634.svg"},16106:function(e,t,n){"use strict";var i=n(1413),r=n(88447),o=n(64554),l=n(19761),s=n(80184);t.Z=function(e){var t=e.children,n=e.visible,c=e.setVisible,a=e.onClose,d=e.style;return(0,s.jsx)(r.Z,{open:n,onClose:function(){a&&a(),c(!1)},"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:(0,s.jsx)(o.Z,{style:(0,i.Z)({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"80%",maxWidth:l.Rx.MOBILE_LG-50,backgroundColor:"white",borderRadius:20},d),children:t})})}},29710:function(e,t,n){"use strict";n.d(t,{l:function(){return l}});var i=n(68239),r=n(70248),o=n(37803),l=function(){var e,t,n,l=(0,i.a)().user,s=(null===l||void 0===l?void 0:l.experience)&&[r.a3.RECONCILIATION,r.a3.RECONCILIATION_WTC].includes(null===l||void 0===l?void 0:l.experience),c=(null===l||void 0===l||null===(e=l.subscription_data)||void 0===e||null===(t=e.product)||void 0===t?void 0:t.tier)===o.Xl.FREE||(null===l||void 0===l||null===(n=l.subscription_data)||void 0===n?void 0:n.tier)===o.Xl.FREE,a=new Date;a.setDate(a.getDate()-7);var d=s&&c&&new Date(l.created_at)<a,u=new Date;u.setMinutes(u.getMinutes()-5);var h=s&&c&&new Date(l.created_at)>u;return{isFreemium:c,isReconciliationUser:s,freeTrialHasExpired:d,daysUntilFreeTrialExpires:Math.abs(Math.ceil((a.getTime()-(null!==l&&void 0!==l&&l.created_at?new Date(null===l||void 0===l?void 0:l.created_at).getTime():(new Date).getTime()))/864e5)),isWTCUser:(null===l||void 0===l?void 0:l.experience)===r.a3.RECONCILIATION_WTC,userWasCreatedWithinFiveMinutesAgo:h}}},60277:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Ie}});var i,r=n(74165),o=n(15861),l=n(1413),s=n(89062),c=n(93324),a=n(37802),d=n(72791),u=n(12599),h=n(13239),f=n(94294),p=n(72426),g=n.n(p),x=n(80140),v=n(68239),m=n(70248),y=n(34129),j=n(9618),Z=n(83613),w=n(16106),b=n(25061),C=n(29710),D=n(91754),S=n(30168),k=n(57689),T=n(57808),_=n(87368),z=n.n(_),I=n(74912),A=n(96739),M=n(21818),R=n(19748),L=n(48271),F=n(87334),V=n(9741),E=n(19761),O=n(80184),P=I.ZP.div(i||(i=(0,S.Z)(["\n    display: flex;\n    flex-direction: row;\n    background-color: ",";\n    box-shadow: ",";\n    cursor: pointer;\n    width: 100%;\n    position: absolute;\n    bottom: 0px;\n    padding: 15px;\n    bottom: 0px;\n    right: 0px;\n    justify-content: space-between;\n    border-radius: 8px;\n    z-index: 1000;\n\n    @media "," {\n        width: 50%;\n        bottom: 15px;\n        right: 15px;\n    }\n\n    &:hover {\n        background-color: ",";\n    }\n"])),j.Z.colors.white,j.Z.defaultShadow,E.ZP.TABLET,j.Z.colors.screen),H=function(e){var t=e.context,n=e.version,i=(0,d.useState)(!0),l=(0,c.Z)(i,2),s=l[0],a=l[1],u=(0,M.pg)().link;console.log("link",u);var h=function(){var e=(0,o.Z)((0,r.Z)().mark((function e(){return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u){e.next=2;break}return e.abrupt("return");case 2:return(0,b.mcV)(),(0,b.CbU)({source:t||"popup",platform:"appstore"}),e.next=6,(0,b.UPO)();case 6:0,z().track("Lead",{content_category:t,content_name:n}),window.location.href=u;case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return u&&s?(0,O.jsx)(O.Fragment,{children:(0,O.jsx)(P,{onClick:h,children:(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},children:[(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,O.jsx)("img",{src:F,alt:"",width:50,height:50,style:{borderRadius:8,marginRight:15}}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,O.jsx)(D.uD,{children:"Download the mobile app!"}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,O.jsx)(D.uD,{style:{marginRight:5},children:"4.8/5"}),(0,O.jsx)("img",{src:V.Z,alt:"",height:24})]})]})]}),(0,O.jsx)("div",{onClick:function(e){e.stopPropagation(),(0,b.SMH)(),a(!1)},children:(0,O.jsx)(A.Z,{fill:j.Z.colors.blue60,style:{display:"flex",alignSelf:"flex-start"}})})]})})}):null},Y=function(){var e,t=(0,k.TH)().state,n=null!==(e=null===t||void 0===t?void 0:t.customData)&&void 0!==e?e:{},i=(0,L.P)(),r=i.ipAddress,o=i.userAgent;return(0,O.jsx)(M.ZP,{trackingData:{visitor_id:localStorage.getItem("visitor_id"),origin_web_url:n.origin_web_url,web_url:n.web_url,source:n.source,referrer_mobile:localStorage.getItem("referrer_mobile"),general_attribution_id:localStorage.getItem("general_attribution_id"),facebook_browser_id:T.ZP.loadAll()._fbp,facebook_click_id:T.ZP.loadAll()._fbc,google_click_id:(0,R.SZ)(),ip_address:r,user_agent:o,tiktok_browser_id:T.ZP.loadAll()._ttp,tiktok_click_id:(0,R.Fe)(),customData:n},children:(0,O.jsx)(H,{})})},W=n(4019),B=n(39967),N=n(99995),U=n(21545),K=n(14274),$=n(52255),J=n(26568),X=n(30119),q=n(37355),G=(0,n(76189).Z)((0,O.jsx)("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Q=n(72456),ee=n(29823),te=n(38815),ne=function(e){e.selectedYear,e.setSelectedYear;var t,n,i=e.onPressSettings,r=e.items,o=e.toggleFilter,l=e.reconciledOnly,c=e.setIsReconciledOnly,a=e.filteredAccount,d=e.setFilteredAccount,u=e.toggleExport,h=e.selectedMonthYear,p=e.setSelectedMonthYear,g=(0,k.s0)(),x=(null!==r&&void 0!==r?r:[]).reduce((function(e,t){var n;if(null!==(n=t.accounts)&&void 0!==n&&n.length){var i=t.accounts.map((function(e){return{account_id:e.account_id,name:e.name,mask:e.mask,type:e.type,institution:t.institution}}));e.push.apply(e,(0,s.Z)(i))}return e}),[]);return(0,O.jsxs)("div",{style:{width:"100%",height:70,display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",position:"relative"},children:[(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",padding:"0px 30% 0px 0px",position:"absolute",top:0,left:0,bottom:0},children:[(0,O.jsx)(te._,{name:"Home",noCarrot:!0,onClick:function(){return g("app")}}),(0,O.jsx)(te._,{name:"Reconciliation",isSelected:!0})]}),(a||void 0!==l||h)&&(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center",position:"absolute",top:0,left:"20%",bottom:0},children:[a&&(0,O.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",padding:10,border:"1px solid ".concat(j.Z.colors.grayText),borderRadius:8,marginRight:10,backgroundColor:j.Z.colors.offWhite,position:"relative"},children:[(0,O.jsx)(D.uT,{style:{color:j.Z.colors.grayText,fontSize:14},children:null!==x&&void 0!==x&&x.find((function(e){return e.account_id===a}))?"".concat(null===x||void 0===x||null===(t=x.find((function(e){return e.account_id===a})))||void 0===t?void 0:t.institution,": (*").concat(null===x||void 0===x||null===(n=x.find((function(e){return e.account_id===a})))||void 0===n?void 0:n.mask,")"):"All Accounts"}),(0,O.jsx)(ee.Z,{style:{color:j.Z.colors.grayText,marginLeft:10,cursor:"pointer",height:20,width:20},onClick:function(){null===d||void 0===d||d(null)}})]}),void 0!==l&&(0,O.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",padding:10,border:"1px solid ".concat(j.Z.colors.grayText),borderRadius:8,marginRight:10,backgroundColor:j.Z.colors.offWhite},children:[(0,O.jsx)(D.uT,{style:{color:j.Z.colors.grayText,fontSize:14},children:void 0!==l?l?"Reconciled":"Unreconciled":"All Transactions"}),(0,O.jsx)(ee.Z,{style:{color:j.Z.colors.grayText,marginLeft:10,cursor:"pointer",height:20,width:20},onClick:function(){null===c||void 0===c||c(void 0)}})]}),h&&(0,O.jsxs)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",padding:10,border:"1px solid ".concat(j.Z.colors.grayText),borderRadius:8,marginRight:10,backgroundColor:j.Z.colors.offWhite},children:[(0,O.jsx)(D.uT,{style:{color:j.Z.colors.grayText,fontSize:14},children:null!==h&&void 0!==h?h:"All"}),(0,O.jsx)(ee.Z,{style:{color:j.Z.colors.grayText,marginLeft:10,cursor:"pointer",height:20,width:20},onClick:function(){null===p||void 0===p||p(void 0)}})]})]}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"flex-end",paddingRight:0},children:[(0,O.jsxs)(f.Z,{variant:"contained",color:"secondary",style:{height:40,padding:"15px",cursor:"pointer",backgroundColor:j.Z.colors.white,borderRadius:10,boxShadow:"none",display:"flex",justifyContent:"center",alignItems:"center",marginRight:10,flexDirection:"row",textTransform:"none",gap:5},onClick:function(){return i()},children:[(0,O.jsxs)(D.uD,{style:{fontSize:14,textTransform:"none"},children:["Accounts (",(null===r||void 0===r?void 0:r.length)||0,")"]}),(0,O.jsx)(q.Z,{style:{width:20,height:20,color:j.Z.colors.primary}})]}),(0,O.jsxs)(f.Z,{variant:"contained",color:"secondary",style:{height:40,padding:"15px",cursor:"pointer",backgroundColor:j.Z.colors.white,borderRadius:10,boxShadow:"none",display:"flex",justifyContent:"center",alignItems:"center",marginRight:10,flexDirection:"row",textTransform:"none",gap:10},onClick:function(){return null===o||void 0===o?void 0:o()},children:[(0,O.jsx)(G,{style:{width:20,height:20}}),(0,O.jsx)(D.uD,{style:{fontSize:14,textTransform:"none"},children:"Filter"})]}),(0,O.jsxs)(f.Z,{variant:"contained",color:"secondary",style:{height:40,padding:"15px",cursor:"pointer",backgroundColor:j.Z.colors.secondary,borderRadius:10,boxShadow:"none",display:"flex",justifyContent:"center",alignItems:"center",marginRight:10,flexDirection:"row",textTransform:"none",gap:10},onClick:function(){return null===u||void 0===u?void 0:u()},children:[(0,O.jsx)(Q.Z,{style:{width:20,height:20,color:j.Z.colors.white}}),(0,O.jsx)(D.uD,{style:{color:j.Z.colors.white,fontSize:14,textTransform:"none"},children:"Export"})]})]})]})},ie=n(95764),re=n(42419),oe=n(40880),le=n(34792),se=n(57229),ce=function(e){var t=e.date,n=(e.merchant,e.amount),i=e.onCreateReceipt,r=e.onClick,o=function(e){var t=new Date,n=new Date(e),i=(t.getTime()-n.getTime())/864e5;return Math.floor(i/30)}(t);return(0,O.jsx)(O.Fragment,{children:(0,O.jsx)("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",position:"relative",curs
1or:"pointer",height:40},onClick:r||i,children:(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%",alignItems:"center"},children:[(0,O.jsxs)("div",{style:{flexDirection:"row",display:"flex",alignItems:"center"},children:[(0,O.jsx)(D.uD,{style:{fontSize:12,fontWeight:500,marginRight:10},children:g()(t).format("DD/MM/YYYY")}),(0,O.jsxs)(D.uT,{style:{fontSize:11},children:["(",o>0?"".concat(o," ").concat(o>1?"months ago":"month ago"):"This month",")"]})]}),(0,O.jsx)(D.uD,{style:{fontWeight:"700",fontSize:12},children:(0,se.dN)(parseFloat(n.toString()))})]})})})};function ae(e){return e.replace(/&/g,"and").replace(/ /g,"").replace(/-/g,"").replace(/"/g,"").replace(/'/g,"").replace(/\*/g,"").replace(/\./g,"").replace(/\//g,"").replace(/@/g,"").toLowerCase().trim()}var de,ue=n(21164),he=n(44192),fe=function(e){var t=e.date,n=e.merchant,i=e.amount,r=(e.payment,e.onClick),o=(0,d.useState)(!1),l=(0,c.Z)(o,2),s=l[0],a=l[1];return(0,O.jsx)("div",{onMouseOver:function(){return a(!0)},onMouseOut:function(){return a(!1)},style:{width:"100%",backgroundColor:s?j.Z.colors.offWhite:j.Z.colors.white,padding:10,borderRadius:10,display:"flex",flexDirection:"column",justifyContent:"center",marginBottom:10,border:"1px solid #E4E4E4",paddingTop:20,paddingBottom:15,paddingLeft:20},children:(0,O.jsxs)("div",{style:{width:"100%",display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingRight:10,position:"relative",cursor:"pointer"},onClick:r,children:[(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",flex:1,maxWidth:"calc(100% - 100px)"},children:[(0,O.jsx)("img",{src:he.Z,alt:"Receipt Icon",style:{width:29,height:35,marginRight:20}}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,O.jsx)(D.uT,{style:{fontSize:14,fontWeight:500,color:j.Z.colors.grayText},children:g()(t).format("DD/MM/YYYY")}),(0,O.jsx)(D.uD,{style:{fontSize:12},children:n.length>30?n.slice(0,30)+"...":n})]})]}),(0,O.jsx)(D.uD,{style:{fontSize:12,marginRight:10},children:(0,se.dN)(parseFloat(i.toString()))}),(0,O.jsx)(ue.Z,{style:{color:j.Z.colors.secondary,width:28,height:28,transform:"rotate(-45deg)"}})]})})},pe=function(e){var t=e.hoveringTransaction;return(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",border:"1px solid ".concat(j.Z.colors.divider),borderRadius:15,padding:20,alignItems:"center",justifyContent:"center"},children:[(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",alignItems:"center",padding:10},children:[(0,O.jsx)(D.uT,{style:{textAlign:"center",fontSize:12,fontWeight:"medium",display:"flex"},children:"Date"}),(0,O.jsx)(D.uD,{style:{fontSize:12,fontWeight:"600"},children:g()(t.date).format("MMM DD, YYYY")})]}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",alignItems:"center",padding:10},children:[(0,O.jsx)(D.uT,{style:{textAlign:"center",fontSize:12,fontWeight:"medium",display:"flex"},children:"Transaction"}),(0,O.jsx)(D.uT,{style:{fontSize:12,fontWeight:"600"},children:t.merchant_name})]}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",alignItems:"center",padding:10},children:[(0,O.jsx)(D.uT,{style:{textAlign:"center",fontSize:12,fontWeight:"medium",display:"flex"},children:"Card"}),(0,O.jsx)(D.uT,{style:{fontSize:12,fontWeight:"600"},children:t.account})]}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"space-between",alignItems:"center",padding:10},children:[(0,O.jsx)(D.uD,{style:{textAlign:"center",fontSize:12,display:"flex"},children:"Total"}),(0,O.jsx)(D.uT,{style:{fontSize:12,fontWeight:"600"},children:(t.amount<0?"-":"")+(0,se.dN)(Math.abs(t.amount))})]})]})},ge=I.ZP.div(de||(de=(0,S.Z)(["\n    font-size: 14px;\n    font-weight: 700;\n    margin-bottom: 10px;\n"]))),xe=function(e){var t,n=e.imagePropsRef,i=e.merchantHistory,l=e.onCreateReceipt,s=e.refreshTransactions,a=n.current,u=a.isInCorner,p=a.scrollToDocument,g=(0,v.a)().token,x=(0,oe.MW)().selectedDocument,m=(0,d.useState)(),Z=(0,c.Z)(m,2),w=Z[0],C=Z[1],S=(0,d.useState)([]),k=(0,c.Z)(S,2),T=k[0],_=k[1],z="plaid"===(null===x||void 0===x?void 0:x.type)?x:null,I=(0,d.useState)(!1),A=(0,c.Z)(I,2),M=A[0],R=A[1];if((0,d.useEffect)((function(){var e,t;if(z&&z.receipt_id)null!==z&&void 0!==z&&null!==(e=z.receipt_data)&&void 0!==e&&e.image_ids&&0!==(null===(t=z.re
1ceipt_data)||void 0===t?void 0:t.image_ids.length)?(C(void 0),fetch("".concat(le.CT,"/api/v2/receipts/").concat(z.receipt_id,"/images/").concat(z.receipt_data.image_ids[0]),{method:"GET",headers:{Authorization:"Token ".concat(g)}}).then(function(){var e=(0,o.Z)((0,r.Z)().mark((function e(t){var n;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=URL,e.next=3,t.blob();case 3:e.t1=e.sent,n=e.t0.createObjectURL.call(e.t0,e.t1),C(n);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())):C("no-image");else{if(C(void 0),_(void 0),!z)return;y.Z.getMatchingReceipts(g,z.amount,z.date,z.merchant_name).then((function(e){_(e.metadata)}))}}),[x]),!z)return null;var L=i[ae(z.merchant_name||"invalid")]||[],F=null;return F=z.receipt_id?w?(0,O.jsxs)("div",{style:{width:"100%",overflow:"hidden",borderRadius:15},children:["no-image"===w?(0,O.jsxs)("div",{style:{width:"100%",height:200,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",backgroundColor:"#F3F4F6",borderRadius:15,marginBottom:20,padding:20},children:[(0,O.jsx)(ie.Z,{style:{width:50,height:50,objectFit:"contain",color:"rgba(0, 0, 0, 0.2)"}}),(0,O.jsx)(ge,{style:{color:"rgba(0, 0, 0, 0.65)",textAlign:"center",fontSize:14,fontWeight:700,width:"100%"},children:"No Images"})]}):(0,O.jsx)("img",{src:w,style:{width:"100%",objectFit:"contain",marginBottom:20},alt:"receipt"}),(0,O.jsx)(ge,{style:{marginTop:10},children:"Transaction Details"}),(0,O.jsx)(pe,{hoveringTransaction:z})]}):(0,O.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,O.jsx)(h.Z,{style:{color:j.Z.colors.secondary},thickness:3,size:30})}):(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%"},children:[(0,O.jsx)(ge,{children:"Transaction Details"}),(0,O.jsx)(pe,{hoveringTransaction:z}),void 0===T?(0,O.jsx)("div",{style:{marginLeft:20},children:(0,O.jsx)(h.Z,{style:{color:j.Z.colors.secondary},thickness:3,size:20})}):null]}),(0,O.jsxs)("div",{style:{backgroundColor:j.Z.colors.white,borderRadius:8,height:"100%",overflow:"scroll",padding:20},children:[(0,O.jsx)("div",{children:F}),!u&&L.length>0?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{style:{marginTop:20}}),(0,O.jsx)(ge,{children:"Transactions History"}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",width:"100%",border:"1px solid ".concat(j.Z.colors.divider),borderRadius:15,padding:"20px 30px",alignItems:"center",justifyContent:"center"},children:[null===(t=L.slice(0,M?L.length:5))||void 0===t?void 0:t.sort((function(e,t){return new Date(t.date).getTime()-new Date(e.date).getTime()})).map((function(e){return(0,O.jsx)(ce,{date:e.date||"",amount:e.amount||0,merchant:e.merchant_name||"",onClick:function(){p(e.transaction_id)}})})),M||L.length>5?(0,O.jsx)("div",{style:{marginTop:10,cursor:"pointer",display:"flex",justifyContent:"center",width:"100%"},onClick:function(){R(!M)},children:(0,O.jsx)(D.uD,{style:{fontWeight:"700",textTransform:"none",textAlign:"right",color:j.Z.colors.secondary,fontSize:12},children:M?"Show Less":"Show More"})}):null]})]}):null,z.receipt_id?null:(0,O.jsxs)("div",{style:{width:"100%"},children:[T&&T.length>0&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:(0,O.jsx)(ge,{style:{marginTop:20,marginBottom:20},children:"Link to Existing Receipts?"})}),(0,O.jsx)("div",{children:T.map((function(e){return(0,O.jsx)(fe,{date:e.date||"",amount:e.amount||0,merchant:e.merchant||"",payment:e.payment,onClick:function(){y.Z.editReceipt(e.receipt_id,{additional_fields:{transaction_id:z.id}}).then((function(){(0,b.Bdl)(),s()}))}})}))})]}),(0,O.jsxs)(f.Z,{style:{height:50,fontWeight:"700",fontSize:20,textTransform:"none",borderRadius:100,borderWidth:2,zIndex:2,margin:20,marginTop:10,width:"95%",alignSelf:"center",color:j.Z.colors.white,flexDirection:"row",boxShadow:"none"},variant:"contained",color:"secondary",onClick:function(){l([z.id])},children:["Create New Receipt",(0,O.jsx)(re.Z,{style:{width:30,height:30,objectFit:"contain",color:j.Z.colors.white,marginLeft:10}})]})]})]})},ve=n(58406),me=n(23786),ye=function(e){var t=e.filterOpen,n=e.setFilterOpen,i=e.accounts,r=e.filteredAccount,o=e.setFilteredAccount,l=e.reconciledOnly,s=e.setReconciledOnly,c=e.monthYearList,a=e.selectedMonthYear,d=e.setSelectedMonthYear;return(0,O.jsx)(w.Z,{visible:t,setVisible:function(){},onClose:function(){return n(!1)},children:(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",padding:"20px 40px"},children:[(0,O.jsx)(D.uD,{style:{fontSize:20,marginBottom:10,textAlign:"center"},children:"Filters"}),(0,O.jsxs)("div",{style:{marginTop:20,marginBottom:20},children:[(0,O.jsx)(D.uD,{children:"Bank Account"}),(0,O.jsxs)(ve.Z,{defaultValue:"All Accounts",label:"",placeholder:"",onChange:function(e){var t="All Accounts"===e.target.value?null:e.target.value;o(t)},variant:"outlined",value:r||"All Accounts",style:{height:50,marginTop:20,width:"100%",backgroundColor:j.Z.colors.white,borderWidth:0},children:[(0,O.jsx)(me.Z,{value:"All Accounts",children:"All Accounts"}),i.map((function(e){return(0,O.jsxs)(me.Z,{value:e.account_id,children:[e.institution,": ",e.name," - (*",e.mask,")"]},e.account_id)}))]})]}),(0,O.jsxs)("div",{style:{marginTop:20,marginBottom:20},children:[(0,O.jsx)(D.uD,{children:"Type"}),(0,O.jsx)(ve.Z,{defaultValue:"All Transactions",label:"",placeholder:"",onChange:function(e){var t="All Transactions"===e.target.value?void 0:"Reconciled"===e.target.value;s(t)},value:l?"Reconciled":!1===l?"Unreconciled":"All Transactions",style:{height:50,marginTop:20,width:"100%",backgroundColor:j.Z.colors.white},children:[void 0,!0,!1].map((function(e,t){return(0,O.jsx)(me.Z,{value:void 0===e?"All Transactions":e?"Reconciled":"Unreconciled",children:void 0===e?"All Transactions":e?"Reconciled":"Unreconciled"},t)}))})]}),(0,O.jsxs)("div",{style:{marginTop:20,marginBottom:50},children:[(0,O.jsx)(D.uD,{children:"Date"}),(0,O.jsxs)(ve.Z,{defaultValue:"All",label:"",placeholder:"",onChange:function(e){var t="All"===e.target.value?void 0:e.target.value;null===d||void 0===d||d(t)},value:null!==a&&void 0!==a?a:"All",style:{height:50,marginTop:20,width:"100%",backgroundColor:j.Z.colors.white},children:[(0,O.jsx)(me.Z,{value:"All",children:"All"}),c.map((function(e,t){return(0,O.jsx)(me.Z,{value:null!==e&&void 0!==e?e:"All",children:e},t)}))]})]}),(0,O.jsx)(f.Z,{style:{height:60,fontSize:18,fontWeight:"700",textTransform:"none",color:j.Z.colors.secondary,borderRadius:100,zIndex:2,width:"100%",alignSelf:"center",marginBottom:15},variant:"outlined",color:"secondary",onClick:function(){o(null),s(void 0),null===d||void 0===d||d(void 0)},children:(0,O.jsx)(D.uD,{style:{color:j.Z.colors.secondary},children:"Clear Filters"})}),(0,O.jsx)(f.Z,{style:{height:60,fontSize:18,fontWeight:"700",textTransform:"none",color:j.Z.colors.white,borderRadius:100,zIndex:2,width:"100%",alignSelf:"center",marginBottom:20,boxSh
1adow:"none"},variant:"contained",color:"secondary",onClick:function(){n(!1)},children:(0,O.jsx)(D.uD,{style:{color:j.Z.colors.white},children:"Apply"})})]})})},je=n(71652),Ze=n(17189),we=n(24750),be=n(97892),Ce=n.n(be),De=function(e){var t=e.exportOpen,n=e.setExportOpen,i=e.accounts,l=(0,v.a)().token,s=(0,d.useState)(void 0),a=(0,c.Z)(s,2),u=a[0],h=a[1],p=(0,d.useState)(g()().subtract(1,"year").toDate()),x=(0,c.Z)(p,2),m=x[0],Z=x[1],b=(0,d.useState)(g()().toDate()),C=(0,c.Z)(b,2),S=C[0],k=C[1],T=(0,d.useState)(!1),_=(0,c.Z)(T,2),z=_[0],I=_[1];return(0,O.jsx)(w.Z,{visible:t,setVisible:function(){},onClose:function(){return n(!1)},children:(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",padding:"20px 40px"},children:[(0,O.jsx)(D.uD,{style:{fontSize:20,marginBottom:10,textAlign:"center"},children:"Export"}),(0,O.jsxs)("div",{style:{marginTop:20,marginBottom:20},children:[(0,O.jsx)(D.uD,{children:"Bank Account"}),(0,O.jsxs)(ve.Z,{defaultValue:"All Accounts",label:"",placeholder:"",onChange:function(e){var t="All Accounts"===e.target.value?void 0:e.target.value;h(t)},variant:"outlined",value:u||"All Accounts",style:{height:50,marginTop:20,width:"100%",backgroundColor:j.Z.colors.white,borderWidth:0},children:[(0,O.jsx)(me.Z,{value:"All Accounts",children:"All Accounts"}),i.map((function(e){return(0,O.jsxs)(me.Z,{value:e.account_id,children:[e.institution,": ",e.name," - (*",e.mask,")"]},e.account_id)}))]})]}),(0,O.jsxs)(je._,{dateAdapter:we.y,children:[(0,O.jsxs)("div",{style:{marginTop:20,marginBottom:20},children:[(0,O.jsx)(D.uD,{style:{marginBottom:20},children:"Start Date"}),(0,O.jsx)(Ze.M,{slotProps:{textField:{fullWidth:!0}},value:Ce()(m),onChange:function(e){Z(Ce()(e).toDate())}})]}),(0,O.jsxs)("div",{style:{marginTop:20,marginBottom:50},children:[(0,O.jsx)(D.uD,{style:{marginBottom:20},children:"End Date"}),(0,O.jsx)(Ze.M,{slotProps:{textField:{fullWidth:!0}},value:Ce()(S),onChange:function(e){k(Ce()(e).toDate())}})]})]}),(0,O.jsx)(f.Z,{style:{height:60,fontSize:18,fontWeight:"700",textTransform:"none",color:j.Z.colors.white,borderRadius:100,zIndex:2,width:"100%",alignSelf:"center",marginBottom:20,boxShadow:"none"},variant:"contained",color:"secondary",disabled:z,onClick:(0,o.Z)((0,r.Z)().mark((function e(){var t;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return I(!0),e.next=3,y.Z.exportPlaidTransactions(l,g()(m).format("YYYY-MM-DD"),g()(S).format("YYYY-MM-DD"),u);case 3:(t=e.sent).data&&window.open(t.data,"_blank"),n(!1),I(!1);case 7:case"end":return e.stop()}}),e)}))),children:(0,O.jsx)(D.uD,{style:{color:j.Z.colors.white},children:"Export"})})]})})},Se=n(72830),ke=n(5397),Te=function(e){var t=e.items,n=e.open,i=e.setSettingsOpen,r=e.refreshItems,o=(0,v.a)().token,l=(0,Z.Z)().width,s=(0,X.n)(),c=s.getInstitutionLogos,a=s.institutionLogos;return(0,d.useEffect)((function(){c()}),[]),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:l},children:[(0,O.jsx)("strong",{style:{marginBottom:40,fontSize:20,alignSelf:"center"},children:"Connected Accounts"}),null===t||void 0===t?void 0:t.map((function(e,t){var n,i=null===a||void 0===a||null===(n=a.find((function(t){return t.institution_id===e.institution_id||t.name===e.institution})))||void 0===n?void 0:n.logo;return(0,O.jsxs)("div",{style:{width:"100%",backgroundColor:j.Z.colors.white,padding:"10px 40px",fontSize:16,display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",gap:20},children:[i?(0,O.jsx)("img",{alt:"Institution Logo",src:"data:image/png;base64,".concat(i),style:{width:30,height:30}}):(0,O.jsx)(Se.Z,{color:"secondary",fontSize:"large"}),(0,O.jsx)("div",{children:e.institution})]}),(0,O.jsx)(ke.Z,{color:"error",onClick:function(t){y.Z.removePlaidItem(o,e.item_id).then((function(){r()}))}})]},t)})),(0,O.jsx)(f.Z,{variant:"contained",color:"secondary",style:{color:"white",boxShadow:"none",borderRadius:25,height:50,marginBottom:10,marginTop:40,fontSize:18,fontWeight:"700",textTransform:"none",width:"80%",alignSelf:"center"},onClick:function(){i(!1),n()},children:"Connect Account"})]})},_e=function(e){var t=e.items,n=e.open,i=e.setSettingsOpen,r=e.refreshItems,o=e.settingsOpen;return(0,O.jsx)(w.Z,{visible:o,setVisible:function(){},onClose:function(){return i(!1)},style:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",padding:"40px 0px"},children:(0,O.jsx)(Te,{items:t,open:n,setSettingsOpen:i,refreshItems:r})})}
1,ze=[{name:"",key:"selection",inputType:"selection",width:$.Zv,isDefault:!0},{name:"Reconciled",key:"reconciled",inputType:"boolean",width:120,fields:["is_reconciled"],isDefault:!0,muiIcon:a.Z},{name:"Account",key:"account",inputType:"string",width:100,fields:["account"],isDefault:!0,muiIcon:a.Z},{name:"Date",key:"date",inputType:"string",width:130,fields:["date"],isDefault:!0,muiIcon:a.Z},{name:"Merchant",key:"merchant_name",inputType:"string",width:400,fields:["merchant_name"],isDefault:!0,muiIcon:a.Z},{name:"Amount",key:"amount",inputType:"dollar",width:110,fields:["amount"],isDefault:!0,muiIcon:a.Z}],Ie=function(){var e,t,n,i=(0,Z.Z)().width,a=(0,C.l)(),p=a.isWTCUser,S=a.freeTrialHasExpired,k=a.userWasCreatedWithinFiveMinutesAgo,T=(0,W.i)().isInitialized,_=(0,U.j)().folders,z=(0,v.a)().token,I=(0,N.D)().setSnackbar,A=(0,J.J)(),M=A.setFullScreenLoader,R=A.closeFullScreenModal,L=(0,d.useState)(null),F=(0,c.Z)(L,2),V=F[0],E=F[1],P=(0,d.useState)(!1),H=(0,c.Z)(P,2),$=H[0],q=H[1],G=(0,d.useState)({open:!1,transaction:void 0}),Q=(0,c.Z)(G,2),ee=Q[0],te=Q[1],ie=(0,d.useState)((new Date).getFullYear().toString()),re=(0,c.Z)(ie,2),oe=re[0],le=re[1],se=(0,d.useState)([]),ce=(0,c.Z)(se,2),de=ce[0],ue=ce[1],he=(0,d.useState)(!1),fe=(0,c.Z)(he,2),pe=fe[0],ge=fe[1],ve=(0,d.useState)(!1),me=(0,c.Z)(ve,2),je=me[0],Ze=me[1],we=(0,d.useState)(null),be=(0,
1c.Z)(we,2),Ce=be[0],Se=be[1],ke=(0,d.useState)(void 0),Te=(0,c.Z)(ke,2),Ie=Te[0],Ae=Te[1],Me=(0,d.useState)(void 0),Re=(0,c.Z)(Me,2),Le=Re[0],Fe=Re[1],Ve=(0,d.useState)([]),Ee=(0,c.Z)(Ve,2),Oe=Ee[0],Pe=Ee[1],He=(0,X.n)(),Ye=He.refreshItems,We=He.refreshTransactions,Be=He.items,Ne=He.transactions,Ue=He.merchantHistory,Ke=He.loadingTransactions,$e=(0,u.usePlaidLink)({token:V,onSuccess:function(e,t){y.Z.createPlaidItem(z,e).then((function(){(0,b.WKB)(),We(oe),Ye()}))}}).open;(0,d.useEffect)((function(){V||y.Z.plaidCreateLinkToken(z).then((function(e){E(e.data)})).catch((function(){}))}),[V]),(0,d.useEffect)((function(){Ye(),We(oe)}),[oe]),(0,d.useEffect)((function(){T&&(0,b.oJj)()}),[T]);var Je=(null!==Be&&void 0!==Be?Be:[]).reduce((function(e,t){var n;if(null!==(n=t.accounts)&&void 0!==n&&n.length){var i=t.accounts.map((function(e){return{account_id:e.account_id,name:e.name,mask:e.mask,type:e.type,institution:t.institution}}));e.push.apply(e,(0,s.Z)(i))}return e}),[]),Xe=(null!==Ne&&void 0!==Ne?Ne:[]).filter((function(e){return!0===Ie&&e.receipt_id||!1===Ie&&!e.receipt_id||void 0===Ie})).filter((function(e){return!Ce||e.account_id===Ce})).filter((function(e){return!Le||g()(e.date).format("MMMM YYYY")===Le})).map((function(e){var t;return(0,l.Z)((0,l.Z)({},e),{},{type:"plaid",documentKey:e.transaction_id,id:e.transaction_id,is_reconciled:!(!e.receipt_id&&!de.includes(e.transaction_id)),account:"*"+(e.account_owner||(null===(t=Je.filter((function(t){return t.account_id===e.account_id}))[0])||void 0===t?void 0:t.mask))})}));(0,d.useEffect)((function(){if(!Oe.length){var e=Xe.reduce((function(e,t){var n=g()(t.date).format("MMMM YYYY");return e.includes(n)||e.push(n),e}),[]);Pe(e)}}),[Xe]);var qe=function(e){var t=e.selectedDocumentIds,n=e.transactions,i=e.folderIds,l=e.onSuccess;M({message:"Creating receipt..."}),Promise.all(n.map(function(){var e=(0,o.Z)((0,r.Z)().mark((function e(t,n){var o;return(0,r.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(!t.receipt_id){e.next=7;break}return e.next=5,y.Z.editReceipt(t.receipt_id,{tag_ids:_.filter((function(e){return i.includes(e.tag_id)})).map((function(e){return e.tag_id}))});case 5:e.next=11;break;case 7:return e.next=9,B.Z.upload(void 0,!1,!1,{merchant:null===t||void 0===t?void 0:t.merchant_name,total:null===t||void 0===t?void 0:t.amount,date:null===t||void 0===t?void 0:t.date},m.Np.TEXTRACT_EMAIL);case 9:"success"===(o=e.sent).status&&y.Z.commitReceiptV2(o.data,{categories:_.filter((function(e){return i.includes(e.tag_id)}))});case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}())).then((function(){null===l||void 0===l||l(),t.length>1?(0,b.Aor)():(0,b.X6u)(),ue((function(e){return e.concat(t)})),I({message:"Receipt".concat(t.length>1?"s":""," created"),status:"success"})})).catch((function(){I({message:"There was an error creating the receipt",status:"error"})})).finally((function(){R(),We(oe)}))};return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(x.Z,{showDrawer:!0}),p?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)("div",{style:{height:20}}),(0,O.jsxs)("div",{children:[(0,O.jsx)(D.uD,{style:{fontSize:24,textAlign:"center"},children:"Reconcile expenses"}),(0,O.jsx)("div",{children:0===(null!==Be&&void 0!==Be?Be:[]).length?(0,O.jsx)(D.uT,{style:{textAlign:"center",color:j.Z.colors.blue80},children:"Your receipts are still being ingested. Please check back in a few minutes!"}):k?(0,O.jsx)(D.uT,{style:{textAlign:"center",color:j.Z.colors.blue80},children:"Please allow a few minutes for your emails to fully sync"}):null})]}),S?null:(0,O.jsx)(Y,{})]}):null,(0,O.jsx)(O.Fragment,{children:!Ne||Ke?(0,O.jsx)("div",{style:{width:i,height:400,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,O.jsx)(h.Z,{color:"secondary",size:40})}):0!==(null===Be||void 0===Be?void 0:Be.length)||p?(0,O.jsx)("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%"},children:(0,O.jsx)(K.Z,{data:Xe,isLoadingInitialData:!1,source:"reconciliation",readOnly:!0,disableColumnCustomization:!0,defaultColumns:ze,headerPaddingLeft:0,defaultSortColumnData:{key:"date",isAscending:!1},renderToolbarProps:function(e){return{mainActionButton:{text:"Create Receipt",onPress:function(){e.current.setShowCategorizeModal({visible:!0,action:function(){var t;"plaid"===(null===(t=e.current.selectedDocument)||void 0===t?void 0:t.type)&&qe({transactions:e.current.selectedDocuments,selectedDocumentIds:e.current.selectedDocumentIds,folderIds:e.current.modalSelectedFolderIds,onSuccess:function(){e.current.setSelectedDocumentIds([])}})}})}}}},spreadsheetKey:"plaid",overrideDisplayValue:function(e){var t,n=e.columnKey,i=e.data;if("merchant_name"===n){var r="merchant_name"in i&&i.merchant_name;if(!r)return;return r+" (".concat((null===(t=Ue[ae(r)])||void 0===t?void 0:t.length)||0,")")}},renderImageView:function(e){return(0,O.jsx)(xe,{imagePropsRef:e,merchantHistory:Ue,onCreateReceipt:function(t){e.current.setShowCategorizeModal({visible:!0,action:function(){var n;"plaid"===(null===(n=e.current.selectedDocument)||void 0===n?void 0:n.type)&&qe({transactions:[e.current.selectedDocument],selectedDocumentIds:t,folderIds:e.current.modalSelectedFolderIds})}})},refreshTransactions:function(){return We(oe)}})},renderHeader:function(){return(0,O.jsx)(ne,{selectedYear:oe,setSelectedYear:le,onPressSettings:function(){return q(!0)},items:Be,toggleFilter:function(){return ge(!pe)},toggleExport:function(){return Ze(!je)},reconciledOnly:Ie,setIsReconciledOnly:Ae,filteredAccount:Ce,setFilteredAccount:Se,selectedMonthYear:Le,setSelectedMonthYear:Fe})}})}):(0,O.jsx)(O.Fragment,{children:(0,O.jsxs)("div",{style:{width:"100%",height:200,justifyContent:"center",alignItems:"center",display:"flex",flexDirection:"column"},children:[(0,O.jsx)("div",{children:"No bank accounts connected, start by connecting your bank account"}),(0,O.jsx)(f.Z,{variant:"contained",color:"secondary",style:{color:"white",boxShadow:"none",borderRadius:10,height:50,marginTop:20},onClick:function(){return $e()},children:"Connect Account"})]})})}),(0,O.jsx)(_e,{items:Be,open:$e,setSettingsOpen:q,refreshItems:Ye,settingsOpen:$}),(0,O.jsx)(ye,{filterOpen:pe,setFilterOpen:ge,accounts:Je,filteredAccount:Ce,setFilteredAccount:Se,reconciledOnly:Ie,setReconciledOnly:Ae,monthYearList:Oe,selectedMonthYear:Le,setSelectedMonthYear:Fe}),(0,O.jsx)(De,{exportOpen:je,setExportOpen:Ze,accounts:Je}),(0,O.jsx)(w.Z,{visible:ee.open,setVisible:function(){},onClose:function(){te({open:!1,transaction:void 0})},children:(0,O.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",padding:20},children:[(0,O.jsx)("strong",{style:{textAlign:"center"},children:"Create a receipt for this transaction"}),(0,O.jsxs)("div",{style:{display:"flex",flexDirection:"column",fontSize:14,marginTop:10,marginBottom:10},children:[(0,O.jsxs)("div",{children:[(0,O.jsx)("strong",{children:"Merchant: "}),null===(e=ee.transaction)||void 0===e?void 0:e.merchant_name]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("strong",{children:"Amount: "}),null===(t=ee.transaction)||void 0===t?void 0:t.amount.toFixed(2)]}),(0,O.jsxs)("div",{children:[(0,O.jsx)("strong",{children:"Date: "}),null===(n=ee.transaction)||void 0===n?void 0:n.date]})]}),(0,O.jsx)(f.Z,{variant:"contained",color:"secondary",style:{color:"white",boxShadow:"none",borderRadius:10,height:50},onClick:function(){return q(!1)},children:"Create"})]})})]})}},38815:function(e,t,n){"use strict";n.d(t,{_:function(){return y},Z:function(){return j}});var i=n(98268),r=n(57689),o=n(21545),l=n(91432),s=n(9618),c=n(67655),a=n(1413),d=n(55200),u=n(40117),h=n(68239),f=n(86222),p=n(1173),g=n(91754),x=n(80184),v=16,m=function(e){var t,n,l,s,c,m=e.folderId,y=e.style,j=(0,r.s0)(),Z=(0,o.j)().folders,w=(0,f._P)().getFolderShareInfo,b=(0,h.a)().user,C=Z.find((function(e){return(null===e||void 0===e?void 0:e.tag_id)===m})),D=C?w(C):[],S=null===C||void 0===C?void 0:C.user,k=(null===S||void 0===S?void 0:S.id)===(null===b||void 0===b?void 0:b.id),T=(0,p.ks)((0,p.V$)(null===S||void 0===S?void 0:S.id.toString()),150);return(0,x.jsxs)("div",{onClick:function(){j("/share/folder-members",{state:{folderId:m}})},style:(0,a.Z)({display:"flex",flexDirection:"row",borderRadius:20,width:"fit-content",padding:2,cursor:"pointer",borderColor:k?null!==D&&void 0!==D&&D.length?"#00A3FF":"#ADDAA2":(0,p.V$)(null===C||void 0===C||null===(t=C.user)||void 0===t?void 0:t.id.toString()),borderWidth:2,backgroundColor:k?null!==D&&void 0!==D&&D.length?"#BFF7FF":"#CAFFCD":T},y),children:[null!==D&&void 0!==D&&D.length?(0,x.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[k?(0,x.jsx)(d.Z,{style:{width:v,height:v,color:"#000",margin:5,marginLeft:10}}):(0,x.jsx)("div",{style:{backgroundColor:(0,p.V$)(null===C||void 0===C||null===(n=C.user)||void 0===n?void 0:n.id.toString()),display:"flex",justifyContent:"center",alignItems:"center",width:20,height:20,borderRadius:10,marginRight:5,marginLeft:5},children:(0,x.jsx)(g.uT,{style:{color:"#FFF",fontSize:14,fontWeight:"bold"},children:null===C||void 0===C||null===(l=C.user)||void 0===l||null===(s=l.first_name)||void 0===s?void 0:s.charAt(0).toLocaleUpperCase()})}),(0,x.jsx)("div",{style:{margin:2}}),(0,x.jsx)(g.uT,{style:{fontWeight:"bold"},children:k?(0,x.jsxs)(x.Fragment,{children:["Shared (",null===D||void 0===D?void 0:D.length,")"]}):(0,x.jsxs)(x.Fragment,{children:["Owned by ",null===C||void 0===C||null===(c=C.user)||void 0===c?void 0:c.first_name]})})]}):(0,x.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[(0,x.jsx)(u.Z,{style:{width:v,height:v,color:"#000",margin:5,marginLeft:10}}),(0,x.jsx)("div",{style:{margin:2}}),(0,x.jsx)(g.uT,{style:{fontWeight:"bold",fontSize:14},children:"Private"})]}),(0,x.jsx)(i.Z,{style:{width:v,height:v,color:"#000",margin:5}})]})},y=function(e){var t=e.name,n=e.noCarrot,r=e.isSelected,o=e.onClick;return(0,x.jsxs)("div",{onClick:o,style:{cursor:o?"pointer":"default",display:"flex",alignItems:"center",flexDirection:"row"},children:[n?null:(0,x.jsx)(i.Z,{style:{width:20,height:20,color:s.Z.colors.blue20,margin:5}}),(0,x.jsx)(g.uT,{style:{fontSize:19,color:r?s.Z.colors.blue100:s.Z.colors.blue60,fontWeight:"700",whiteSpace:"nowrap"},children:t})]})},j=function(){var e=(0,r.s0)(),t=(0,r.TH)().state,n=(0,l.E)().spaces,i=(0,o.j)().folders,s=(null===t||void 0===t?void 0:t.tagId)||"",a=(null===t||void 0===t?void 0:t.tagIds)||[],d=a?i.filter((function(e){return a.includes(e.tag_id)})):[i.find((function(e){return e.tag_id===s}))],u=(null===t||void 0===t?void 0:t.folderName)||c.Uq,h=s===c.Uq,f=n.find((function(e){var t;return e.id===(null===(t=d[0])||void 0===t?void 0:t.space_id)}));return(0,x.jsx)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"0px 30% 0px 0px"},children:(0,x.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,x.jsx)(y,{name:"Home",noCarrot:!0,onClick:function(){return e("/app")}}),h?(0,x.jsx)(y,{name:null!==u&&void 0!==u?u:"All Documents",isSelected:!0}):(0,x.jsxs)(x.Fragment,{children:[f?(0,x.jsx)(y,{name:f.name,onClick:function(){return e("/app")}}):null,d.map((function(e){return e?(0,x.jsx)(y,{name:e.name,isSelected:!0}):null}))]}),!h&&(0,x.jsx)(m,{folderId:s,style:{marginLeft:20}})]})})}},39967:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});
1var i=n(74165),r=n(37762),o=n(15861),l=n(15671),s=n(43144),c=n(34792),a=n(15670),d=n(75199),u=n(70248),h=function(){function e(){(0,l.Z)(this,e)}return(0,s.Z)(e,null,[{key:"upload",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t,o,l,s,c){var d,h,f,p,g,x;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=new FormData,!t){e.next=14;break}if("application/pdf"!==t.type){e.next=13;break}return e.next=5,Promise.all([n.e(9514),n.e(5941)]).then(n.bind(n,45941));case 5:return h=e.sent,e.next=8,h.convertPdfToImages(t);case 8:f=e.sent,p=(0,r.Z)(f.slice(0,25));try{for(p.s();!(g=p.n()).done;)x=g.value,d.append("file",x)}catch(i){p.e(i)}finally{p.f()}e.next=14;break;case 13:d.append("file",t);case 14:return o&&d.append("manual",o.toString()),d.append("platform",c||u.Np.DESKTOP),d.append("document_type","RECEIPT"),s&&d.append("initial_data",JSON.stringify(s)),l&&d.append("auto_commit",l.toString()),e.abrupt("return",a.ZP.post("/receipts/upload",d,{headers:{"Content-Type":"multipart/form-data"}}).then((function(e){return e.data})).catch((function(e){return e})));case 20:case"end":return e.stop()}}),e)})));return function(t,n,i,r,o){return e.apply(this,arguments)}}()},{key:"getProcessingReceiptV2",value:function(e){return a.ZP.post("/receipts/processing/load",{receipt_id:e}).then((function(e){return e.data}))}},{key:"editProcessingDocTypeV2",value:function(){var e=(0,o.Z)((0,i.Z)().mark((function e(t,n){var r;return(0,i.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=d.yD[n],e.abrupt("return",a.ZP.post("/receipts/processing/edit-doc-type",{receipt_id:t,type:r}).then((function(e){return e.data})));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"tagProcessingReceiptV2",value:function(e,t){return a.ZP.post("/receipts/processing/tag",{receipt_id:e,tag_ids:t}).then((function(e){return e.data}))}},{key:"processingStatusV2",value:function(e){return a.ZP.post("/receipts/processing/status",{receipt_id:e}).then((function(e){return e.data}))}},{key:"getProcessingReceiptImageUrl",value:function(e,t){return"".concat(c.CT,"/api/v2/receipts/processing/").concat(e,"/images/").concat(t)}}]),e}()},77907:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var r=i(n(45649)),o=n(80184),l=(0,r.default)((0,o.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox");t.Z=l},95764:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var r=i(n(45649)),o=n(80184),l=(0,r.default)((0,o.jsx)("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"}),"Image");t.Z=l},21164:function(e,t,n){"use strict";var i=n(64836);t.Z=void 0;var r=i(n(45649)),o=n(80184),l=(0,r.default)((0,o.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"}),"Link");t.Z=l},68087:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add")},57913:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"m14 4 2.29 2.29-2.88 2.88 1.42 1.42 2.88-2.88L20 10V4zm-4 0H4v6l2.29-2.29 4.71 4.7V20h2v-8.41l-5.29-5.3z"}),"CallSplit")},83096:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h4.05l1.83-2h4.24l1.83 2H20v12zM12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0 8c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"}),"CameraAltOutlined")},99631:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"ChevronLeft")},35939:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"}),"DescriptionOutlined")},28285:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7l-2 3v1h8v-1l-2-3h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 12H3V4h18v10z"}),"DesktopMacOutlined")},63658:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"}),"DoneAll")},72456:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"}),"Download")},37355:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore")},79470:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M2.81 2.81 1.39 4.22l2.27 2.27C2.61 8.07 2 9.96 2 12c0 5.52 4.48 10 10 10 2.04 0 3.93-.61 5.51-1.66l2.27 2.27 1.41-1.41L2.81 2.81zM12 20c-4.41 0-8-3.59-8-8 
10-1.48.41-2.86 1.12-4.06l10.94 10.94C14.86 19.59 13.48 20 12 20zM7.94 5.12 6.49 3.66C8.07 2.61 9.96 2 12 2c5.52 0 10 4.48 10 10 0 2.04-.61 3.93-1.66 5.51l-1.46-1.46C19.59 14.86 20 13.48 20 12c0-4.41-3.59-8-8-8-1.48 0-2.86.41-4.06 1.12z"}),"HideSource")},83040:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5.5 7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5zM19 19H5L19 5v14zm-2-2v-1.5h-5V17h5z"}),"Iso")},68125:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)([(0,r.jsx)("path",{d:"M18 6.41 16.59 5 12 9.58 7.41 5 6 6.41l6 6z"},"0"),(0,r.jsx)("path",{d:"m18 13-1.41-1.41L12 16.17l-4.59-4.58L6 13l6 6z"},"1")],"KeyboardDoubleArrowDown")},89841:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)([(0,r.jsx)("path",{d:"M6 17.59 7.41 19 12 14.42 16.59 19 18 17.59l-6-6z"},"0"),(0,r.jsx)("path",{d:"m6 11 1.41 1.41L12 7.83l4.59 4.58L18 11l-6-6z"},"1")],"KeyboardDoubleArrowUp")},40117:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"}),"Lock")},7235:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert")},41473:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"m1.79 12 5.58 5.59L5.96 19 .37 13.41 1.79 12zm.45-7.78L12.9 14.89l-1.28 1.28L7.44 12l-1.41 1.41L11.62 19l2.69-2.69 4.89 4.89 1.41-1.41L3.65 2.81 2.24 4.22zm14.9 9.27L23.62 7 22.2 5.59l-6.48 6.48 1.42 1.42zM17.96 7l-1.41-1.41-3.65 3.66 1.41 1.41L17.96 7z"}),"RemoveDone")},41824:function(e,t,n){"use strict";var i=n(76189),r=n(80184);t.Z=(0,i.Z)((0,r.jsx)("path",{d:"M12 5V2L8 6l4 4V7c3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93 0-4.42-3.58-8-8-8zm-6 8c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91z"}),"RestartAlt")},87276:function(e){e.exports=function(){function e(o,l){if(!(this instanceof e))return new e(o,l);l=Object.assign({},n,l);var s=Math.pow(10,l.precision);this.intValue=o=t(o,l),this.value=o/s,l.increment=l.increment||1/s,l.groups=l.useVedic?r:i,this.s=l,this.p=s}function t(t,n){var i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=n.decimal,o=n.errorOnInvalid,l=n.fromCents,s=Math.pow(10,n.precision),c=t instanceof e;if(c&&l)return t.intValue;if("number"===typeof t||c)r=c?t.value:t;else if("string"===typeof t)o=new RegExp("[^-\\d"+r+"]","g"),r=new RegExp("\\"+r,"g"),r=(r=t.replace(/\((.*)\)/,"-$1").replace(o,"").replace(r,"."))||0;else{if(o)throw Error("Invalid Input");r=0}return l||(r=(r*s).toFixed(4)),i?Math.round(r):r}var n={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:function(e,t){var n=t.pattern,i=t.negativePattern,r=t.symbol,o=t.separator,l=t.decimal;t=t.groups;var s=(""+e).replace(/^-/,"").split("."),c=s[0];return s=s[1],(0<=e.value?n:i).replace("!",r).replace("#",c.replace(t,"$1"+o)+(s?l+s:""))},fromCents:!1},i=/(\d)(?=(\d{3})+\b)/g,r=/(\d)(?=(\d\d)+\d\b)/g;return e.prototype={add:function(n){var i=this.s,r=this.p;return e((this.intValue+t(n,i))/(i.fromCents?1:r),i)},subtract:function(n){var i=this.s,r=this.p;return e((this.intValue-t(n,i))/(i.fromCents?1:r),i)},multiply:function(t){var n=this.s;return e(this.intValue*t/(n.fromCents?1:Math.pow(10,n.precision)),n)},divide:function(n){var i=this.s;return e(this.intValue/t(n,i,!1),i)},distribute:function(t){var n=this.intValue,i=this.p,r=this.s,o=[],l=Math[0<=n?"floor":"ceil"](n/t),s=Math.abs(n-l*t);for(i=r.fromCents?1:i;0!==t;t--){var c=e(l/i,r);0<s--&&(c=c[0<=n?"add":"subtract"](1/i)),o.push(c)}return o},dollars:function(){return~~this.value},cents:function(){return~~(this.intValue%this.p)},format:function(e){var t=this.s;return"function"===typeof e?e(this,t):t.format(this,Object.assign({},t,e))},toString:function(){var e=this.s,t=e.increment;return(Math.round(this.intValue/this.p/t)*t).toFixed(e.precision)},toJSON:function(){return this.value}},e}()},63621:function(e){e.exports=function(e,t){var n=0,i={};e.addEventListener("message",(function(t){var n=t.data;if("RPC"===n.type)if(n.id){var r=i[n.id];r&&(delete i[n.id],n.error?r[1](Object.assign(Error(n.error.message),n.error)):r[0](n.result))}else{var o=document.createEvent("Event");o.initEvent(n.method,!1,!1),o.data=n.params,e.dispatchEvent(o)}})),t.forEach((function(t){e[t]=function(){var r=arguments;return new Promise((function(o,l){var s=++n;
1i[s]=[o,l],e.postMessage({type:"RPC",id:s,method:t,params:[].slice.call(r)})}))}}))}}}]);
2//# sourceMappingURL=2577.5d594a3f.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.