1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e7711cec-bd06-4d2a-aa3e-480cef8246be",e._sentryDebugIdIdentifier="sentry-dbid-e7711cec-bd06-4d2a-aa3e-480cef8246be")}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1986],{11986:(e,t,a)=>{a.d(t,{A:()=>T});var n=a(37876),r=a(14232),s=a(31413),i=a(75501),o=a(7101),c=a(43494),l=a(24680),u=a(84939),d=a(61199),m=a(584),p=a(56557),b=a.n(p),A=a(56586),y=a(75143),g=a(2769),f=a(15341),h=a(20708),D=a(4685);let v=e=>g.A4.includes(e)?"Pending":e;var w=a(89099),M=a(3775),S=a(72569),Y=a(31057),C=a(12630),j=a(50640);let x=(0,M.F)(),R=function({activities:e,...t}){let{push:a,query:s}=(0,w.useRouter)(),i=s?.accountID?.toString(),o=(0,r.useMemo)(()=>[x.accessor("createdAt",{enableSorting:!0,header:()=>"Date",cell:e=>(0,n.jsx)(Y.A,{wrap:"nowrap",children:b().unix(parseInt(e.getValue(),10)).format("MMM DD")})}),x.accessor("toFrom",{header:()=>"To/From",cell:e=>e.getValue()}),x.accessor("amount",{header:"Amount",cell:e=>e.getValue()}),x.accessor("paymentType",{header:()=>"Payment Method",cell:e=>{switch(e.getValue()){case j.dm.Wire:return"Wire";case j.dm.ACH:return"ACH";case j.dm.Crypto:return"Crypto";case j.dm.Card:return"Card";case j.dm.SEPA:return"SEPA";case j.dm.SWIFT:return"SWIFT";default:return"â"}}}),x.accessor("account",{header:()=>"Account"}),x.accessor("status",{header:()=>"Status",cell:e=>{let t=e.getValue();return t?(0,n.jsx)(C.Ay,{status:t}):"â"}})],[]),c=(0,r.useMemo)(()=>e.sort((e,t)=>parseInt(t.createdAt,10)-parseInt(e.createdAt,10)),[e]),l=(0,r.useCallback)(e=>{let t=`${S.bw.activity}/${e.id}`;i&&(t+=`?accountID=${i}`),a(t)},[i,a]);return(0,n.jsx)(M.A,{columns:o,data:c,onRowClick:l,...t})},T=({transactionsOnly:e})=>{let{data:t=[]}=(0,s.Cu6)(),{display:a}=(0,h.A)(),[p,w]=(0,r.useState)(new Map),[M,S]=(0,r.useState)(1),[Y,C]=(0,r.useState)(!1),j=(0,r.useRef)(void 0),x=(0,r.useCallback)(e=>{w(e),S(1)},[]),T=(0,r.useMemo)(()=>{let t={};if(p.has(A.R.Action)?t.activityTypes=p.get(A.R.Action)?.map(e=>e.id):t.activityTypes=e?g.k5:[],p.has(A.R.Account)&&(t.accountIDs=p.get(A.R.Account)?.map(e=>e.id)),p.has(A.R.Status)&&(t.statuses=p.get(A.R.Status)?.map(e=>e.id),t.statuses?.includes(y.Uh.Pending)&&(t.statuses=[...t.statuses,...g.A4])),p.has(A.R.Date)){let e=p.get(A.R.Date);if(e&&e.length>0){let{startDate:a,endDate:n}=e[0];a&&n&&(t.fromDate=a.format("YYYY-MM-DD"),t.toDate=n.format("YYYY-MM-DD"))}}return t},[p,e]),{activities:k=[],pageInfo:I,metadata:L,isLoading:$}=(0,D.A)({filters:T,pageNumber:M}),U=(0,r.useMemo)(()=>(L&&(j.current=L),[{name:A.R.Action,label:"Action",items:(j.current?.activityTypes||[]).filter(t=>!e||g.k5.includes(t)).map(e=>({id:e,name:g.dj[e]||""})).filter(Boolean)},{name:A.R.Status,label:"Status",items:(e=>{let t=new Set;for(let a of e)t.add(a);return Array.from(t)})((j.current?.statuses||[]).map(v)).map(e=>({id:e,name:e}))},{name:A.R.Account,label:"Account",items:t.map(e=>({id:e.id,name:e.name})).concat({id:"organization",name:"Organization"})},{name:A.R.Date,label:"Date"}]),[t,L,e]),V=(0,r.useCallback)(async()=>{let n=((e,t)=>{let a={};for(let[n,r]of e.entries())switch(n){case A.R.Action:a.activityTypes=r.map(e=>e.id).join(",");break;case A.R.Status:{let e=r.map(e=>e.id);e.includes(y.Uh.Pending)&&(e=[...e,...g.A4]),a.statuses=e.join(",");break}case A.R.Account:a.accountIDs=r.map(e=>"Organization"===e.name?"organization":t.find(t=>t.name===e.name)?.id||"").filter(Boolean).join(",");break;case A.R.Date:{let e=r[0];a.fromDate=b()(e.startDate).format("YYYY-MM-DD"),a.toDate=b()(e.endDate).format("YYYY-MM-DD")}}return a})(p,t);!n.activityTypes&&e&&(n.activityTypes=g.k5.join(","));try{C(!0),await (0,f.A)(n,e)}catch(e){a({title:"Failed to download CSV",message:"Something went wrong, please try again."})}finally{C(!1)}},[p,t,a,e]),{operations:z,isLoading:E}=(0,i.A)(k,{transactionsOnly:e}),_=$||E,O="No results",P=I&&I.totalCount>I.pageSize?{currentPage:M,pageCount:Math.ceil(I.totalCount/I.pageSize),onPageChange:S}:void 0;return(0,n.jsxs)(o.A,{title:"Transactions",action:(0,n.jsxs)(m.A,{loading:Y,onClick:V,disabled:0===z.length||Y,icon:(0,n.jsx)(d.A,{size:"20px"}),children:["Export",p.size>0?" filtered":""]}),children:[(0,n.jsx)(u.A,{tabSet:u.o.Activity}),(0,n.jsx)(l.A,{filters:U,onChange:x}),e?(0,n.jsx)(R,{loading:_,activities:z||[],emptyState:{title:O,subtitle:"Update your filters to
1see transactions."},pagination:P}):(0,n.jsx)(c.A,{loading:_,activities:z||[],emptyState:{title:O,subtitle:"Update your filters to see activities."},pagination:P})]})}},15341:(e,t,a)=>{a.d(t,{A:()=>l});var n=a(80817),r=a(46728),s=a(54481),i=a(97478),o=a(56557),c=a.n(o);let l=async(e,t)=>{let a={...(0,s.A)(),...(0,i.A)(),"Content-Type":"text/csv",Accept:"text/csv"},o=await n.Ay.get(`${r.C}/reporting/activity`,{responseType:"blob",params:e,headers:a});return((e,t)=>{let a=URL.createObjectURL(e);((e,t)=>{let a=document.createElement("a");a.download=t,a.href=e,document.body.appendChild(a),a.click(),a.remove()})(a,t),URL.revokeObjectURL(a)})(o.data,(()=>{let a=e?.fromDate&&e.toDate&&e.fromDate!==e.toDate?`${c()(e.fromDate).format("MMM D, YYYY")} to ${c()(e.toDate).format("MMM D, YYYY")}`:c()().format("MMM D, YYYY");return`Dakota ${t?"Transactions":"Activity"} - ${a}.csv`})()),o}},61199:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(37876);let r=(0,a(79855).A)((0,n.jsx)("path",{d:"M5.5 16.7834C5.08333 16.7834 4.72933 16.6374 4.438 16.3454C4.146 16.0541 4 15.7001 4 15.2834V13.7834H5.5V15.2834L14.5 15.2834V13.7834H16V15.2834C16 15.7001 15.854 16.0541 15.562 16.3454C15.2707 16.6374 14.9167 16.7834 14.5 16.7834H5.5ZM10 13.7834L6 9.78345L7.062 8.72145L9.25 10.9084V3.78345H10.75V10.9084L12.938 8.72145L14 9.78345L10 13.7834Z"}),"Download","0 0 20 20")},84939:(e,t,a)=>{a.d(t,{A:()=>A,o:()=>b});var n=a(37876),r=a(89099),s=a(14232),i=a(72569),o=a(14060),c=a(98734),l=a(31057),u=a(70350),d=a(68041),m=a(4479),p=a(80670),b=function(e){return e[e.AccountOverview=0]="AccountOverview",e[e.Accounts=1]="Accounts",e[e.Activity=2]="Activity",e[e.Documents=3]="Documents",e[e.Team=4]="Team",e}({});let A=({tabSet:e,accountID:t,...a})=>{let b=(0,r.useRouter)().asPath,{flags:A}=(0,p.h)(),y=(0,m.A)(),g=(0,s.useMemo)(()=>{let e=[{label:"Overview",url:`${i.bw.accounts}/${t}`},{label:"Yield",url:`${i.bw.accounts}/${t}/yield`},{label:"Security",url:`${i.bw.accounts}/${t}/security`},{label:"Settings",url:`${i.bw.accounts}/${t}/settings`}];return A.STAKING||A.STABLECOIN_YIELD||(e=e.filter(e=>"Yield"!==e.label)),y||(e=e.filter(e=>"Settings"!==e.label)),e},[t,A,y]),f=(0,s.useMemo)(()=>({0:[{label:"Dakota Accounts",url:i.bw.accounts},{label:"Connected Accounts",url:i.bw.connectedAccounts}],1:g,2:[{label:"Transactions",url:i.bw.activityTransactions},{label:"All Activity",url:i.bw.activityAll}],3:[{label:"Statements",url:i.bw.documentsStatements},{label:"Account Letters",url:i.bw.documentsAccountLetters}],4:[{label:"Users",url:i.bw.teamUsers},{label:"User Groups",url:i.bw.teamUserGroups}]}),[g]);return(0,n.jsxs)(o.A,{direction:"vertical",marginTop:"-12px",children:[(0,n.jsx)(o.A,{marginBottom:"-2px",...a,children:f[e].map(({label:e,url:t})=>(0,n.jsx)(c.A,{href:t,noDecoration:!0,children:(0,n.jsx)(o.A,{minWidth:"80px",align:"center",justify:"center",height:"48px",paddingX:"lg",borderBottomWidth:"2px",borderColor:(0,i.bj)(t,b)?"primary100":"transparent",color:{base:(0,i.bj)(t,b)?"primary100":"primary50",hover:"primary100"},children:(0,n.jsx)(l.A,{variant:(0,i.bj)(t,b)?"labelMedium":"bodySmall",textTransform:"uppercase",wrap:"nowrap",children:e})})},t))}),(0,n.jsx)(u.A,{}),(0,n.jsx)(d.A,{size:"lg"})]})}}}]);
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.