@tap-payments/os-micro-frontend-shared 0.3.234 → 0.3.236
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_chunks/chunk-5ZLWBDSA.js +2 -0
- package/build/_chunks/{chunk-NWLLDTBY.js → chunk-H2JRT32Y.js} +1 -1
- package/build/_chunks/chunk-IIJQTMKH.js +2 -0
- package/build/_chunks/chunk-MBHOPWO5.js +1 -0
- package/build/_chunks/chunk-P6ZNNZQJ.js +1 -0
- package/build/_chunks/{chunk-JLL3T5G6.js → chunk-R2ADPEMK.js} +1 -1
- package/build/_chunks/{chunk-P32P6WI6.js → chunk-R4UDDMWN.js} +1 -1
- package/build/_chunks/{chunk-IWULB6PE.js → chunk-W3U44CAS.js} +1 -1
- package/build/_chunks/{chunk-GXDZKA56.js → chunk-ZNWFFR5B.js} +1 -1
- package/build/components/Alert/Alert.d.ts +4 -0
- package/build/components/Alert/constants.d.ts +32 -0
- package/build/components/Alert/icons.d.ts +8 -0
- package/build/components/Alert/index.d.ts +3 -0
- package/build/components/Alert/index.js +1 -0
- package/build/components/Alert/style.d.ts +11 -0
- package/build/components/Alert/type.d.ts +20 -0
- package/build/components/AppServices/index.js +1 -1
- package/build/components/AppServicesBar/index.js +1 -1
- package/build/components/AppWindowWrapper/index.js +1 -1
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/DateFilter/index.js +1 -1
- package/build/components/FileInputPreview/index.js +1 -1
- package/build/components/FilterDropdown/index.js +1 -1
- package/build/components/JSONViewer/index.js +1 -1
- package/build/components/ListColumnFilter/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/Logo/Logo.d.ts +4 -0
- package/build/components/Logo/constants.d.ts +7 -0
- package/build/components/Logo/index.d.ts +3 -0
- package/build/components/Logo/index.js +1 -0
- package/build/components/Logo/style.d.ts +4 -0
- package/build/components/Logo/type.d.ts +26 -0
- package/build/components/PaymentSourceFilter/index.js +1 -1
- package/build/components/PhoneFilter/index.js +1 -1
- package/build/components/PhoneInput/index.js +1 -1
- package/build/components/RHFPhoneInput/index.js +1 -1
- package/build/components/RangeCalender/index.js +1 -1
- package/build/components/ReferenceTypeFilter/index.js +1 -1
- package/build/components/StatusFilter/index.js +1 -1
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/TableCells/index.js +1 -1
- package/build/components/TableReports/index.js +1 -1
- package/build/components/TreeDropdown/index.js +1 -1
- package/build/components/VerificationIcon/index.js +1 -1
- package/build/components/ViewColumnRadioFilter/index.js +1 -1
- package/build/components/VirtualTables/index.js +1 -1
- package/build/components/Widget/index.js +1 -1
- package/build/components/index.d.ts +2 -4
- package/build/components/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-3VDOQJJJ.js +0 -1
- package/build/_chunks/chunk-A35EQFUN.js +0 -1
- package/build/_chunks/chunk-P2W4GQEE.js +0 -2
- package/build/_chunks/chunk-VJARTHVD.js +0 -1
- package/build/components/BrandLogo/BrandLogo.d.ts +0 -13
- package/build/components/BrandLogo/Loading.d.ts +0 -7
- package/build/components/BrandLogo/index.d.ts +0 -1
- package/build/components/BrandLogo/index.js +0 -1
- package/build/components/Error/Error.d.ts +0 -8
- package/build/components/Error/index.d.ts +0 -2
- package/build/components/Error/index.js +0 -1
- package/build/components/Error/style.d.ts +0 -4
- package/build/components/MerchantLogo/MerchantLogo.d.ts +0 -11
- package/build/components/MerchantLogo/index.d.ts +0 -1
- package/build/components/MerchantLogo/index.js +0 -1
- package/build/components/MerchantLogo/style.d.ts +0 -5
- package/build/components/OpenFileInNewTab/OpenFileInNewTab.d.ts +0 -8
- package/build/components/OpenFileInNewTab/index.d.ts +0 -1
- package/build/components/OpenFileInNewTab/index.js +0 -1
- package/build/components/OpenFileInNewTab/style.d.ts +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b as b$8,c as c$3}from'./chunk-ZNWFFR5B.js';import {a}from'./chunk-R2ADPEMK.js';import {a as a$d,f as f$2,e as e$1,b as b$b,g,d as d$4,c as c$5}from'./chunk-ASVSVGU7.js';import {a as a$1}from'./chunk-3JH2VK4V.js';import {a as a$7}from'./chunk-BPNPETQW.js';import {b as b$4}from'./chunk-BL4G7JLV.js';import {b as b$1}from'./chunk-CXEGE4O2.js';import {a as a$9}from'./chunk-NLBIEL5G.js';import {a as a$g}from'./chunk-L6COP35A.js';import {a as a$8}from'./chunk-MBHOPWO5.js';import {a as a$i}from'./chunk-YM6QK2DF.js';import {b as b$9}from'./chunk-H2JRT32Y.js';import {b as b$5}from'./chunk-OTVBJARD.js';import {a as a$f}from'./chunk-3EFRQRQL.js';import {a as a$b,b as b$7}from'./chunk-ZONDSLTR.js';import {h}from'./chunk-JECOERWM.js';import {a as a$5}from'./chunk-24GWCDZ5.js';import {a as a$h,b as b$a,d as d$3,c as c$4}from'./chunk-SVB4LDND.js';import {b as b$6}from'./chunk-DOBRREPI.js';import {a as a$c}from'./chunk-BHWA2DLO.js';import {c as c$2}from'./chunk-I3QG6QAH.js';import {a as a$2}from'./chunk-7YAANFKA.js';import {a as a$3}from'./chunk-KBD5ZHSX.js';import {a as a$e}from'./chunk-TKK3WRVP.js';import {b as b$3,c,d as d$2}from'./chunk-5V5JLLTM.js';import {a as a$6}from'./chunk-CTGKNHG3.js';import {n,r as r$1}from'./chunk-UWMNSF7E.js';import {a as a$a}from'./chunk-KNZ7WDVM.js';import {f,a as a$4,b as b$2,d as d$1,c as c$1,e}from'./chunk-UQAAPVOP.js';import {t,p,z as z$1,j,V,R,b,L,D,d,v,f as f$1,r,x as x$1}from'./chunk-YFFUFJLA.js';import {zc,ec as ec$1,Wa,wa,lc,La as La$1,x,Cb as Cb$2,Bb,Ab as Ab$1,Va,ac,Wb as Wb$1,Yb,bb,vb as vb$1,wb as wb$2,Xb,Mb,yb,zb as zb$1,xb as xb$2,_b as _b$1,Aa,Ia as Ia$1,Da,Ha as Ha$1,dc as dc$1,o,cc as cc$1,f as f$3,t as t$1,gb as gb$1}from'./chunk-MZMXF4IE.js';import {Ab,xb as xb$1,zb,Ud,Cj,pc,Bi as Bi$1,zi,Ai,Bh,Mg as Mg$1,Sh as Sh$1,Se,gk,ja as ja$1,yk as yk$1,pk,F,E,dp as dp$1,Kj,Jj,Ij,Gj,Ej,Fj,Hj,hc as hc$1,ic as ic$1,fc as fc$1,ma as ma$1,Jl as Jl$1,Cb as Cb$1,Db,Eb,C,Xj,Ah,wb as wb$1,fm,Kh,Jh as Jh$1,hb as hb$1,vb,uo,We,Ve as Ve$1,hm,Wc,Vc,Ze,Xe,Ye,Fb,dh as dh$1,ih as ih$1,jh as jh$1,gh as gh$1,fh,ah as ah$1,bh,ch as ch$1,_g as _g$1,$g as $g$1,kh,T,wi as wi$1,yi as yi$1,xi as xi$1,vi as vi$1,Ci as Ci$1,Tg as Tg$1,Pj,Qj,H,jo as jo$1,G,ub as ub$1,z as z$2,da as da$1,ca as ca$1,na,rk,Ak,sk,ik,kk,vk,xk,qk,nk,ok,Ln,ac as ac$1,bc as bc$1,Oh,tk,lh as lh$1,wh,vh,uh as uh$1,th as th$1,sh as sh$1,rh as rh$1,qh as qh$1,ph as ph$1,oh as oh$1,nh as nh$1,mh as mh$1,Vh,Th,Uh as Uh$1,Yh as Yh$1,Xh,ae,Xd,$d,Dn,Bn,si,ob as ob$1,Yd,rn,Zd,pb,Dh,Ch as Ch$1,Fh,Hh as Hh$1,Gh as Gh$1,Ih,je,sf as sf$1,rf as rf$1,qf as qf$1,pf as pf$1,of as of$1,tf as tf$1,nf as nf$1,Ba,Aa as Aa$1,kf as kf$1,jf,if as _if,ei,di as di$1,gi as gi$1,fi as fi$1,hi as hi$1,_j,Yj,Zj,tc,Di as Di$1,uc,Hi as Hi$1,ai,yd,Lk,Jk,Kk,Rb,vf,yf as yf$1,xf,wf as wf$1,uf,Lm,Im,Dm,Em,Km,wm,Mm,xm,Nm,ym,Fm,Am,Cm,Jm,Bm,um,Gm,Hm,vm,zm,tm,sm,rm,qm,pm,Yg as Yg$1,zk,Vk,$j,Lo,No,dk,ui as ui$1,A,tb as tb$1,ek,hk,fk,va,ua as ua$1,h as h$1,Sg as Sg$1,ko,Mo as Mo$1}from'./chunk-GCJPCGH3.js';import Ap,{forwardRef,useId,memo,createContext,useState,useEffect,useMemo,useCallback,useRef,useReducer,Fragment as Fragment$1,useContext}from'react';import {useTranslation}from'react-i18next';import {styled,Box,Paper,Button,TextField,alpha as alpha$1,Typography,Popper,CircularProgress,Link,useTheme as useTheme$1,TableCell,ClickAwayListener}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion,AnimatePresence,Reorder,useDragControls}from'framer-motion';import {styled as styled$1,alpha,useTheme}from'@mui/material/styles';import _b from'@mui/material/TableCell';import Sr from'@mui/material/Box';import GS from'@mui/material/SvgIcon';import Ht from'lodash/camelCase';import ic from'dayjs';import g0 from'dayjs/plugin/timezone';import C0 from'dayjs/plugin/utc';import Yg from'lodash/startCase';import Yv from'@mui/material/Popover';import Jv from'lodash/capitalize';import r1 from'@mui/material/ClickAwayListener';import QP from'@mui/material/Popper';import f1 from'@mui/material/Typography';import Mh from'@mui/material/Button';import cA from'@mui/material/Menu';import {useDropzone}from'react-dropzone';import WE from'@mui/material/CircularProgress';import sc from'@mui/material/LinearProgress';import FM from'lodash/values';import WM from'@mui/material/InputAdornment';var mi={ORDER:{label:"order",icon:vi$1,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:xi$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:yi$1,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:wi$1,color:"#32ADE6"}},di={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var ui=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),fi=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function kb({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n}){let r=zc(useId(),"agreement-icon"),i=useTheme$1(),{t:a}=useTranslation(),l=useMemo(()=>[...t?[di.SAVED_TOKEN]:[],...(o||0)>0?[di.COUNT]:[],...e&&mi[e]?[mi[e]]:[]],[t,o,e]),s=c=>n?jsx(a$b,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:a("totalPaymentCount",{amount:f$3(o)}),children:jsx(fi,{children:jsxs(ui,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:di.COUNT.color},children:["x",o]})})})},c):jsx(a$i,{value:o,index:c},c),p$1=l.map((c,d$1)=>c.label==="countBadge"?s(d$1):jsx(p,{title:a(c.label),children:jsx(a$b,{children:n?jsx(fi,{children:jsx(ui,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:a(c.label)})}):jsx(d,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),m=jsx(p,{title:"No agreement",children:jsx(a$b,{children:n?jsx(fi,{children:jsx(ui,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(d,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Ci$1,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:r,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:p$1?.length>0?p$1:m})}var Uu=kb;var Vb=Uu;styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var Yu=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),ju=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var Ku=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var Kl={"3DS":{tooltip:"3DS",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Pj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:$g$1,borderColor:"rgba(31, 136, 208, 0.10)"}},qu={FAILED:{tooltip:"Failed",icon:Tg$1,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:ah$1,borderColor:"rgba(255, 61, 0, 0.10)"}};function Nb({transactionStatus:e,eci:t,authType:o,isTextShown:n}){let r=zc(useId(),"auth-icons"),i=useMemo(()=>{let l=e?qu[e]:null,s=l?.tooltip,p=e==="AUTHENTICATED"?null:l?.icon;return [{tooltip:s,content:n?s:p,type:n?"text":"icon"},...o?[{tooltip:o,content:n?Kl[o]?.tooltip:Kl[o]?.icon,type:n?"text":"icon"}]:[],{tooltip:"",content:t?`ECI ${t}`:"",type:"text"}]},[e,n,o,t]),a=useMemo(()=>i.filter(l=>!!l.content).map((l,s)=>{let p$1=l.type==="text"?jsx(ju,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Yu,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":l.content,children:l.content})}):jsx(d,{sx:{width:"16px",height:"16px"},src:l.content,alt:l.tooltip});return jsx(p,{title:l.tooltip,children:p$1},`${l.tooltip}-${s}`)}),[i]);return jsx(Ku,{id:r,"data-testid":"AuthIcons",children:a})}var Zu=Nb;var Wb=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...e>0&&{opacity:0}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t,...e>0&&{opacity:1}}});var Hb=Zu;var Ju=styled$1(_b,{shouldForwardProp:e=>e!=="rowId"})(({theme:e})=>({fontSize:e.typography.body2.fontSize,fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,padding:e.spacing(0),verticalAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",width:"100%",border:"none",textAlign:e?.direction==="ltr"?"left":"right"}));var Gb=forwardRef(({children:e,...t},o)=>{let n=zc(useId(),"table-cell");return jsx(Ju,{id:n,component:"div","data-testid":"TableCell",...t,ref:o,children:e})}),P=memo(Gb);var gi=styled("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t})=>({display:"flex",width:"17px",height:"12px",backgroundColor:t?ec$1(e.palette)[t]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),vn=styled("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),Tt=styled(motion.div)(({theme:e})=>({borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)})),tL=styled("img")(()=>({width:"12px",height:"12px"})),Qu=styled("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:t})=>({...t&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:t?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),oL=styled("span")(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600})),ef=styled("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),tf=styled(t)(({theme:e})=>({width:24,height:24,fontSize:"8.5px",fontWeight:500,color:e.palette.background.default,border:`1px solid ${e.palette.divider}`})),z=styled("div")(({theme:e})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`})),of=styled(z)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),nf=styled(z)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),Ci=styled(P)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),Me=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ve=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),Y=styled("img")(()=>({width:"36px",height:"24px"})),xi=styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));var Pn={VOID:{icon:fk},CAPTURED:{icon:ek}};var hi=styled$1(motion.div)(({theme:e,isCapture:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),paddingInline:e.spacing(.3),paddingBlock:e.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:t?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10})),yi=styled$1("div")(({theme:e,percentage:t,isCapture:o})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} ${o?e.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:o?e.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),Ii=styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`})),bi=styled$1("img")({width:"14px",height:"14px"}),So=styled$1(ve)({width:"16px",height:"16px"}),Ut=styled$1("img")({width:"16px",height:"16px"}),rf=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function Si(e){return e<5?5:e===100?95:e}var af=styled$1(Sr)({display:"flex",alignItems:"center",gap:"12px"});function eS({value:e,format:t,flagIcon:o,hasFlag:n,tableMode:r,...i}){let a=o&&jsx(p,{title:La$1(o||""),children:jsx(a$2,{countryCode:o})}),l=useMemo(()=>x(e,t),[e]);return jsx(P,{...i,children:jsxs(af,{children:[n&&jsx(gi,{sx:{visibility:"visible"},className:"geography-box",children:a}),jsx(Box,{sx:{...Wa(r)&&{fontSize:"11px"}},children:l})]})})}var En=eS;function lf({value:e,currentTimezone:t=jo$1.UTC,timezoneOffset:o=0,defaultTimezoneOffset:n=0,hideTimezoneIcon:r=false,...i}){let a=c=>t$1(e,{currentTimezone:t,targetTimezone:c}),l=a(o),s=a(n),p$1=x(s),m=!r&&n!==o;return jsxs(Sr,{sx:{display:"flex",gap:"8px"},children:[jsx(En,{value:l,...i}),m&&jsx(p,{title:p$1,children:jsx("img",{src:H,width:14,alt:"timezone"})})]})}function iS({value:e,label:t,items:o,...n}){let r=Number.isInteger(e)&&Number(e)>1&&t.charAt(t.length-1)!=="s"?`${t}s`:t,i=`${e} ${r}`,a=jsx(Fragment,{children:o?.map(l=>{let s=l.name||l.description,p=(s?.length||0)>20?`${s?.slice(0,20)}...`:s;return jsx("div",{children:p},l.id)})});return jsx(p,{title:(o||[]).length>1?a:void 0,children:jsx(P,{...n,children:jsx("span",{children:i})})})}var aS=iS;function sS({value:e,label:t,items:o,...n}){let r=Number.isInteger(e)&&Number(e)>1&&t.charAt(t.length-1)!=="s"?`${t}s`:t,i=`${e} ${r}`;return jsx(P,{sx:{fontSize:"11px"},...n,children:i})}var pS=sS;var sf=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),wi=styled$1("span",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"25ch",flex:1,...Wa(t)&&{fontSize:"11px",color:e.palette.text.primary}})),pf=styled$1("span")({width:"11.6px",height:"11.6px",flexShrink:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start"}),cf=styled$1("img")({width:"11.6px",height:"11.6px",borderRadius:"50%"});function dS({customerInitiated:e,children:t,isTimezoneIconShown:o,hasCustomerIcon:n,customerIcon:r,customerName:i,hideCustomerInitiatedIcon:a,hideTimezoneIcon:l,phone:s,email:p$1,id:m,...c}){let{t:d}=useTranslation(),u=e===false?d("merchantInitiated"):"",f=_b$1(i),x=i?.split(" ")?.map(b=>b?.[0]?.toUpperCase()).join(""),y=useMemo(()=>Aa(),[]),S=n&&jsx(p,{title:t,children:jsx(tf,{"data-testid":"CustomerCell_customerShownIcon",sx:{background:y},src:r,alt:r,children:x})}),g=useMemo(()=>[{name:"ID",value:m},{name:"Name",value:i},{name:"Email",value:p$1},{name:"Phone",value:s}],[p$1,s,m,i]),h=useMemo(()=>g.some(({value:b})=>b)?jsx("div",{"data-testid":"CustomerCell_customerTooltip",children:g.map(({name:b,value:I},w)=>I&&jsx("div",{"data-testid":`CustomerCell_customerTooltip_${b}`,children:b==="Name"?I:`${b}: ${I}`},`${w}-${I}`))}):null,[g]);return jsx(P,{...c,"data-testid":"CustomerCell_TableCell",children:jsxs(sf,{"data-testid":"CustomerCell_StyledCustomerCell",children:[S,jsx(p,{title:h,children:jsx(wi,{"data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":f,children:t})}),!l&&jsx(pf,{"data-testid":"CustomerCell_StyledCustomerIconContainer",children:o&&jsx(cf,{src:G,"data-testid":"CustomerCell_StyledCustomerIcon"})}),!a&&jsx(p,{title:u,children:jsx(Qu,{"data-testid":"CustomerCell_StarBadgeWrapper",className:"geography-box",isShown:!!u,children:u&&jsx("img",{"data-testid":"CustomerCell_merchantInitiatedIcon",src:ub$1,alt:"merchant",style:{width:"16px",height:"16px"}})})})]})})}var uS=dS;function gS({children:e,customerName:t}){let o=_b$1(t);return jsx(wi,{tableMode:"sheet","data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":o,children:e})}var CS=gS;var vi=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:e.spacing(1)})),mf=styled$1("span")(({theme:e,tableMode:t})=>({backgroundColor:e.palette.grey[100],display:"block",borderRadius:"4px",padding:"1.5px 3px",fontSize:Wa(t)?"11px":"10px",lineHeight:"13px",textTransform:"uppercase",fontWeight:e.typography.fontWeightBold})),df=styled$1("span")(({theme:e,tableMode:t})=>({fontSize:Wa(t)?"11px":e.typography.body2.fontSize,lineHeight:"17px",fontWeight:"700"})),Zl=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"})),Pi=styled$1("div")(({theme:e,count:t})=>({justifyContent:"space-between",display:"flex",width:"100%",gap:(t||1)<=1?e.spacing(1.5):e.spacing(1)}));var yk=({type:e,selectAmount:t,selectCurrency:o,requestAmount:n,requestCurrency:r,merchantAmount:i,merchantCurrency:a})=>{let l=Ia$1(t,o),s=Ia$1(n,r),p=Ia$1(i,a);return jsxs(Zl,{sx:{textAlign:"right",justifyContent:"flex-end"},children:[jsx("span",{style:{fontWeight:"bold"},children:e?Da[e]:""}),jsxs(Zl,{children:[e!=="fx"&&jsxs(Pi,{children:[jsx("span",{children:"Customer Selected"})," ",jsxs("span",{children:[jsx(a$c,{currency:o})," ",l.integerAmount,".",l.decimalAmount]})]}),jsxs(Pi,{children:[jsx("span",{children:"Charge"})," ",jsxs("span",{children:[jsx(a$c,{currency:r})," ",s.integerAmount,".",s.decimalAmount]})]}),jsxs(Pi,{children:[jsx("span",{children:"Settlement"})," ",jsxs("span",{children:[jsx(a$c,{currency:a})," ",p.integerAmount,".",p.decimalAmount]})]})]})]})};var To=({tableMode:e,conversionType:t})=>t?jsx(mf,{tableMode:e,className:"conversion-type",children:t}):jsx(Fragment,{});var wo=({tableMode:e,amount:t,currency:o})=>jsx(df,{tableMode:e,children:t!==void 0?jsxs(Fragment,{children:[jsx("span",{children:jsx(a$c,{currency:o,fontSize:10})})," ",jsx(b$6,{amount:t,currency:o,sx:{fontSize:"inherit",fontWeight:"inherit"}})]}):jsx("span",{children:"-"})});var ff="default";function SS({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(P,{...i,children:jsxs(vi,{children:[jsx(p,{title:n||"",children:jsx(Box,{children:jsx(To,{tableMode:ff,conversionType:e})})}),o&&jsx(p,{title:jsx(a$c,{currency:o}),children:jsx(a$2,{currencyCode:o})}),jsx(p,{title:r,children:jsx(wo,{tableMode:ff,amount:t,currency:o})})]})})}var TS=SS;var gf="text";function vS({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(P,{...i,children:jsxs(vi,{children:[jsx(p,{title:n||"",children:jsx(To,{tableMode:gf,conversionType:e})}),jsx(p,{title:jsx(a$c,{currency:o}),children:jsx("span",{})}),jsx(p,{title:r,children:jsx(wo,{tableMode:gf,amount:t,currency:o})})]})})}var PS=vS;var Cf="sheet";function ES({conversionType:e,amount:t,currency:o}){let{integerAmount:n,decimalAmount:r}=Ia$1(t,o);return jsxs(b$1,{copyTrigger:"press",copyText:t?`${n}.${r}`:"-",children:[jsx(To,{tableMode:Cf,conversionType:e}),jsx(wo,{tableMode:Cf,amount:t,currency:o})]})}var MS=ES;var hf=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),yf=styled$1(motion.span)(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:e.palette.secondary.main})),Jl=styled$1(motion.div)(({theme:e})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.secondary.main}1A`,paddingInline:e.spacing(.5),borderRadius:"56px"})),Po=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}}),Ao=styled$1(motion.span)(({isTextShown:e,theme:t})=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e?"auto":"36px",...e&&{border:"none"}})),Eo=styled$1(motion.div,{shouldForwardProp:e=>e!=="order"})(({order:e=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:e+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),Mo=styled$1(motion.div,{shouldForwardProp:e=>e!=="statusesCount"})(({statusesCount:e=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${e*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),If=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var bf=e=>e?Object.keys(e).filter(t=>e[t]).reduce((t,o)=>(t[o]=e[o],t),{}):{};var Do=({statuses:e,centerIconKey:t})=>{let o=useMemo(()=>bf(e),[e]),n=useMemo(()=>Object.values(o).filter(Boolean),[o]),r=useMemo(()=>{if(!t)return 0;let i=Object.entries(o).findIndex(([a])=>a===t);return i===-1?Math.floor((n.length-1)/2):i},[o,t,n.length]);return {statusesList:n,centerIconIndex:r}};function LS({statuses:e,centerIconKey:t,...o}){let{statusesList:n}=Do({statuses:e,centerIconKey:t}),r=useTheme(),i=n.length||0;return jsx(P,{...o,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(Mo,{whileHover:"animate",animate:"start",statusesCount:i,children:n.map((a,l)=>a?jsx(Eo,{order:l,variants:Po(l,r.shadows[4],40),children:jsx(Ao,{children:a})},l):null)})})}var kS=LS;function VS({statuses:e,...t}){let{statusesList:o}=Do({statuses:e});return jsx(P,{...t,children:jsx(If,{sx:{paddingRight:"30px"},children:o.map((n,r)=>jsx(Fragment$1,{children:n},r))})})}var FS=VS;function WS({statuses:e,centerIconKey:t,xGap:o,...n}){let{statusesList:r}=Do({statuses:e,centerIconKey:t}),i=useTheme(),a=r.length||0,l=o||120;return jsx(P,{...n,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(Mo,{whileHover:"animate",animate:"start",statusesCount:a,children:r.map((s,p)=>s?jsx(Eo,{order:p,variants:Po(p,i.shadows[4],l),children:jsx(Ao,{isTextShown:true,children:s})},p):null)})})}var HS=WS;var Di=styled$1("section",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",textAlign:"center",borderRadius:"50%",gap:Wa(t)?"4px":e.spacing(1),overflow:"visible"})),Ri=styled$1("span")(({selected:e})=>({overflow:"visible",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative","&:hover":{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},...e&&{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},span:{flexGrow:1}})),Sf=styled$1("img",{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({width:"18px",height:"18px",...!e&&{pointerEvents:"none",filter:"opacity(0.3)"}})),Ve=styled$1(motion.img)(({icon:e})=>({width:"13.3px",height:"13.3px",...e==="cancel"&&{padding:"1.15px"}}));function Tf({isAnyActionLoading:e,isAnyActionHasError:t,isAnyActionSuccessful:o,areThereAnyShownActions:n}){let{t:r}=useTranslation();return t?jsx(Ve,{src:hc$1,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"fail-icon"):o?jsx(Ve,{src:ic$1,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"success-icon"):e?jsx(Ve,{src:fc$1,className:"spinner-loader"},"spinner-icon"):jsx(p,{title:r("moreActions"),children:jsx(Sf,{alt:"more",src:ma$1,isActive:n},"ellipsis-icon")})}Tf.displayName="ActionIconsVariants";var kn=memo(Tf);var Ro={GRAY:{icon:zb,color:"#CFCFCF"},ORANGE:{icon:xb$1,color:"#FFD503"},RED:{icon:Ab,color:"#FF0000"}},Li={"#CFCFCF":"gray","#FFD503":"orange","#FF0000":"red",gray:"gray",red:"red",orange:"orange"},ki={flag:E,dispute:F,refund:pk,void:yk$1,capture:ja$1,cancel:gk,clock:Se,reverse:Sh$1,destination:Mg$1,invoice:Bh,users:Ai,brand:zi,clipboard:Bi$1,viewApi:Ud,viewReceipt:pc,delete:Cj};function Bi({actions:e,isDropdownShown:t,onCloseDropdown:o,renderDropdown:n}){let[r,i]=useState(null),a=!!r,l=(e||[]).filter(f=>f.isShown!==false),s=l.some(f=>f.isLoading),p=l.some(f=>f.isError),m=l.some(f=>f.isSuccess),c=l.length>0||!!n,d=f=>{s||!c||i(f.currentTarget);},u=()=>{i(null),o?.();};return useEffect(()=>{t||i(null);},[t]),{anchorEl:r,open:a,filteredActions:l,isAnyActionLoading:s,isAnyActionHasError:p,isAnyActionSuccessful:m,areThereAnyShownActions:c,handleClick:d,handleClose:u,setAnchorEl:i}}var wf=e=>jsx(GS,{sx:{height:12.6,width:13},...e,children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"13",viewBox:"2.67 1.07 10.66 12.66",fill:"none",children:jsxs("g",{transform:"translate(-4 -4)",children:[jsx("path",{d:"M7.5918 15.166C7.5918 16.4041 8.5959 17.4072 9.83398 17.4072H15.5273L15.334 17.6973C15.101 18.0473 14.7079 18.2577 14.2871 18.2578H9.83398C8.12641 18.2578 6.74219 16.8736 6.74219 15.166V8.71289C6.74219 8.2923 6.9526 7.89944 7.30273 7.66602L7.5918 7.47266V15.166ZM10.167 5.74121H15.5C16.4651 5.74121 17.2586 6.534 17.2588 7.49902V14.833C17.2586 15.798 16.4651 16.5908 15.5 16.5908H10.167C9.20193 16.5908 8.40838 15.798 8.4082 14.833V7.49902C8.40838 6.534 9.20193 5.74121 10.167 5.74121ZM10.167 6.59082C9.6596 6.59082 9.25896 6.99168 9.25879 7.49902V14.833C9.25896 15.3404 9.6596 15.7412 10.167 15.7412H15.5C16.0074 15.7412 16.408 15.3404 16.4082 14.833V7.49902C16.408 6.99168 16.0074 6.59082 15.5 6.59082H10.167Z",fill:"#20232B",stroke:"white",strokeWidth:"0.15"}),jsx("path",{d:"M10.7598 12.84V9H11.4851V12.84H10.7598Z",fill:"black"}),jsx("path",{d:"M12.2846 12.84V9H13.5272C13.5574 9 13.6197 9.00089 13.7139 9.00267C13.8081 9.00444 13.8988 9.01067 13.9859 9.02133C14.2952 9.05867 14.5574 9.16622 14.7726 9.344C14.9877 9.52178 15.1512 9.74756 15.2632 10.0213C15.3752 10.2951 15.4312 10.5947 15.4312 10.92C15.4312 11.2453 15.3752 11.5449 15.2632 11.8187C15.1512 12.0924 14.9877 12.3182 14.7726 12.496C14.5574 12.6738 14.2952 12.7813 13.9859 12.8187C13.8988 12.8293 13.8081 12.8356 13.7139 12.8373C13.6197 12.8391 13.5574 12.84 13.5272 12.84H12.2846ZM13.0206 12.1573H13.5272C13.5752 12.1573 13.6401 12.1564 13.7219 12.1547C13.8037 12.1511 13.8774 12.1431 13.9432 12.1307C14.1103 12.0969 14.2463 12.0187 14.3512 11.896C14.4579 11.7733 14.5361 11.6258 14.5859 11.4533C14.6374 11.2809 14.6632 11.1031 14.6632 10.92C14.6632 10.728 14.6366 10.5458 14.5832 10.3733C14.5317 10.2009 14.4526 10.0551 14.3459 9.936C14.2392 9.81689 14.105 9.74133 13.9432 9.70933C13.8774 9.69511 13.8037 9.68711 13.7219 9.68533C13.6401 9.68356 13.5752 9.68267 13.5272 9.68267H13.0206V12.1573Z",fill:"black"})]})})});var Pf=".IDButton-root:not(.IDButton-hoverDisabled):hover &",Af=styled$1("div")(({theme:e})=>({paddingInlineStart:"8px",border:"1px solid transparent",display:"flex",gap:"4px",alignItems:"center",justifyContent:"flex-end",backgroundColor:e.palette.common.white,float:"right",borderRadius:"56px",height:"100%",paddingLeft:"4px",paddingRight:"4px",width:"24px",overflow:"hidden",[Pf]:{width:"max-content",overflow:"visible",borderColor:"rgba(92, 92, 92, 0.05)",boxShadow:"-7px 0px 8px 0px #F2F2F2",position:"absolute",right:0,top:0,zIndex:101}})),Ef=styled$1("div")(({theme:e})=>({color:e.palette.text.primary,fontSize:"11px",lineHeight:"120%",display:"grid",gridTemplateColumns:"0fr",opacity:0,transition:"grid-template-columns 0.1s ease, opacity 0.1s ease","& > span":{overflow:"hidden",minWidth:0,whiteSpace:"nowrap"},[Pf]:{gridTemplateColumns:"1fr",opacity:1,transition:"grid-template-columns 0.3s ease, opacity 0.3s ease 0.3s"}}));function XS({icon:e=jsx(wf,{}),id:t,sx:o,disableOnHoverEffect:n=false,onCopyId:r,className:i,...a}){let{t:l}=useTranslation();return jsx(p,{title:l("copy"),children:jsx(Sr,{className:lc("IDButton-root",n&&"IDButton-hoverDisabled",i),sx:{position:"relative",width:"24px",height:"24px",cursor:"pointer",...o},...a,children:jsxs(Af,{className:"IDButton-button",children:[t?jsx(Ef,{className:"IDButton-rowId",children:jsx("span",{children:t})}):null,t?jsx(D,{className:"IDButton-icon",icon:e,text:t,onClick:()=>r?.()}):null]})})})}var ts=memo(XS);var vV=memo(({flag:e,actions:t,flagTooltip:o,flagsCount:n,dropdownAction:r,onCloseDropdown:i,isDropdownShown:a=true,row:l,showJsonViewer:s=true,isTextShown:p$1,showIdButton:m=true,onCopyId:c,rowId:d,onJsonViewClick:u,renderDropdown:f$1,startSlot:x,...y})=>{let{t:S}=useTranslation(),{open:g,anchorEl:h,filteredActions:b,isAnyActionLoading:I,isAnyActionHasError:w,isAnyActionSuccessful:T,areThereAnyShownActions:v,handleClick:A,handleClose:M,setAnchorEl:E}=Bi({actions:t,isDropdownShown:a,onCloseDropdown:i,renderDropdown:f$1});return jsx(P,{...y,sx:{overflow:"visible",...y.sx},children:jsxs(Di,{"data-testid":"ActionCell_ActionCellContainer",children:[x,e&&jsx(Fragment,{children:p$1?jsx(p,{title:o,children:jsx(z,{"data-testid":"ActionCell_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:o})}):jsx(p,{title:o,children:jsxs(Tt,{"data-testid":"ActionCell_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(Ve,{"data-testid":"ActionCell_FlagIcon",sx:{width:"12px",height:"11px"},src:Ro[e]?.icon,alt:"flag-icon"}),(n??0)>1&&jsx(motion.div,{"data-testid":"ActionCell_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z$1,{compact:true,color:Li[Ro[e]?.color]||"orange","data-testid":"ActionCell_StyledBadge",children:[n,"x"]})})]})})}),m&&jsx(ts,{id:d||l.id,onCopyId:c}),jsxs("div",{"data-testid":"ActionCell_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[s&&jsx(Fragment,{children:jsx(vn,{onClick:u,type:"button","data-testid":"ActionCell_TransparentButton",children:jsx(p,{title:S("jsonViewer"),children:jsx(ef,{"data-testid":"ActionCell_IdButtonContainer",children:jsx(motion.img,{src:Ud,alt:"icon"},"id-icon")})})})}),jsxs(Ri,{id:"styled-popover",selected:!!r||g,"data-testid":"ActionCell_ActionsIconContainer","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:[jsx(vn,{onClick:A,"data-testid":"ActionCell_ActionsIconContainer_TransparentButton","data-is-active":v,sx:{...!v&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(kn,{isAnyActionLoading:I,isAnyActionHasError:w,isAnyActionSuccessful:T,areThereAnyShownActions:v})})}),r,f$1?f$1(h,E):jsx(Fragment,{children:v&&jsx(f,{style:{zIndex:2e3},open:g,onClose:M,anchorEl:h,menuItems:b.map(R=>({...R,onClick:H=>{R?.onClick?.(H),R.hasActionMenu||M();},onRightClick:H=>{R?.onRightClick?.(H),M();},icon:R.customIcon||jsx(Ve,{icon:R.icon,src:R.iconSrc??(R.icon&&ki[R.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${R.label.trim()}`)}))})})]})]})]})})});function nT({flag:e,flagTooltip:t,flagsCount:o,row:n,showJsonViewer:r=true,isTextShown:i,showIdButton:a=true,rowId:l,onJsonViewClick:s,tableMode:p$1,...m}){return jsx(P,{...m,sx:{overflow:"visible"},children:jsxs(Di,{"data-testid":"ActionsColumn_ActionCellContainer",tableMode:p$1,children:[e&&jsx(Fragment,{children:i?jsx(p,{title:t,children:jsx(z,{"data-testid":"ActionsColumn_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:t})}):jsx(p,{title:t,children:jsxs(Tt,{"data-testid":"ActionsColumn_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(Ve,{"data-testid":"ActionsColumn_FlagIcon",sx:{width:"12px",height:"11px"},src:Ro[e]?.icon,alt:"flag-icon"}),(o??0)>1&&jsx(motion.div,{"data-testid":"ActionsColumn_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z$1,{compact:true,color:Li[Ro[e]?.color]||"orange","data-testid":"ActionsColumn_StyledBadge",children:[o,"x"]})})]})})}),a&&jsx(b$1,{sx:{minWidth:"213px"},children:l||n.id}),jsx("div",{"data-testid":"ActionsColumn_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:r&&jsx(b$1,{onClick:s,children:"View API"})})]})})}var rT=memo(nT);function sT({actions:e,dropdownAction:t,onCloseDropdown:o,isDropdownShown:n=true,renderDropdown:r,...i}){let{open:a,anchorEl:l,filteredActions:s,isAnyActionLoading:p,isAnyActionHasError:m,isAnyActionSuccessful:c,areThereAnyShownActions:d,handleClick:u,handleClose:f$1,setAnchorEl:x}=Bi({actions:e,isDropdownShown:n,onCloseDropdown:o,renderDropdown:r});return jsx(P,{...i,sx:{overflow:"visible"},children:jsx("div",{"data-testid":"ActionIconColumn_Container",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:jsxs(Ri,{id:"styled-popover",selected:!!t||a,"data-testid":"ActionIconColumn_ActionsIconContainer","data-is-active":d,sx:{...!d&&{pointerEvents:"none"}},children:[jsx(vn,{onClick:u,"data-testid":"ActionIconColumn_ActionsIconContainer_TransparentButton","data-is-active":d,sx:{...!d&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(kn,{isAnyActionLoading:p,isAnyActionHasError:m,isAnyActionSuccessful:c,areThereAnyShownActions:d})})}),r?r(l,x):jsxs(Fragment,{children:[t,d&&jsx(f,{style:{zIndex:2e3},open:a,onClose:f$1,anchorEl:l,menuItems:s.map(y=>({...y,onClick:S=>{y?.onClick?.(S),y.hasActionMenu||f$1();},onRightClick:S=>{y?.onRightClick?.(S),f$1();},icon:y.customIcon||jsx(Ve,{icon:y.icon,src:y.iconSrc??(y.icon&&ki[y.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${y.label.trim()}`)}))})]})]})})})}var pT=memo(sT);function dT({deviceType:e,geographyVariant:t,isTextShown:o,deviceCountry:n,...r}){return jsx(P,{...r,children:jsxs(Sr,{sx:{display:"flex",gap:"8px",alignItems:"center"},children:[jsx(Kt,{geographyVariant:t,isTextShown:o,countryCode:n}),jsx(c$2,{type:e,isTextShown:o})]})})}var uT=dT;var Rf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),position:"relative",minWidth:"23px",height:"24px"})),Lf=styled("span")(({theme:e})=>({fontSize:e.typography.pxToRem(12),color:e.palette.info.dark,fontWeight:700,paddingInline:e.spacing(1),borderRadius:e.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.info.dark}1A`})),kf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),backgroundColor:e.palette.common.white,border:`1px solid ${e.palette.divider}`,paddingInline:e.spacing(1),borderRadius:"56px",height:"24px"}));styled("img")(({theme:e,order:t})=>({borderRadius:"50%",backgroundColor:e.palette.common.white,width:"16px",height:"16px",padding:"2px",zIndex:t+1,position:"absolute",left:`${t*9}px`}));var Bf=styled("img")(({pointLeft:e})=>({width:"12.5px",height:"13px",transform:`scale(${e?"-1":"1"}, 1)`}));styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.common.white,borderRadius:"50%",width:"16px",height:"16px",fontSize:"8px",fontWeight:e.typography.fontWeightBold,lineHeight:"11px",position:"absolute",left:"18px",zIndex:4,textAlign:"center",span:{flexGrow:1}}));function xT({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...a}){let l=useMemo(()=>{if(typeof e=="number")return e;let m=Number(e);return Number.isNaN(m)?void 0:m},[e]),s=l!==void 0?l>0:!!e,p$1=l!==void 0&&l>1;return !s||r?null:jsx(Sr,{sx:{width:"fit-content",overflow:"visible"},...a,children:jsx(p,{title:t,children:jsxs(kf,{children:[jsx(Bf,{src:z$2,pointLeft:i==="left"}),p$1&&jsx(Rf,{children:jsx(Lf,{children:e})})]})})})}var hT=xT;function bT(e){let{destination:t,...o}=e,n={...o};delete n.destinationsCount,delete n.destinationsTooltip,delete n.destinationsAmount,delete n.hidden,delete n.iconDirection,delete n.selectionProps,delete n.flagIcon;let r=t?.destination||[];return jsx(Sr,{sx:{display:"flex",gap:"4px",alignItems:"center"},...n,children:r.map((i,a)=>{let l=Ha$1(i?.amount||0),s=`${l.integerAmount}.${l.decimalAmount}`;return jsxs(b$1,{copyTrigger:"press",copyText:s,children:[i?.id," | ",jsx(a$c,{currency:i?.currency})," ",s]},i?.id||a)})})}var ST=bT;function vT({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:i,...a}){let l=o?.destination||[],s=Ha$1(n||0),p$1=Ha$1(l?.[0]?.amount||0);return !e||r?null:jsx(Sr,{sx:{width:"fit-content",overflow:"visible"},...a,children:jsx(p,{title:t,children:jsx(z,{sx:{textAlign:"left",justifyContent:"flex-start",height:"auto"},children:e&&typeof e=="number"&&e>1?jsxs("div",{children:["Destination ",l?.[0]?.id," - ",jsx(a$c,{currency:l?.[0]?.currency})," ",p$1.integerAmount,".",p$1.decimalAmount," +",e-1]}):jsxs("div",{children:["Destination ",l?.[0]?.id," - ",jsx(a$c,{currency:l?.[0]?.currency})," ",s.integerAmount,".",s.decimalAmount]})})})})}var PT=vT;var kF=({destination:e,amount:t})=>{let o=e?.destination||[];return o?.length>1?jsxs("div",{children:[jsx("div",{children:"Destination"}),e?.destination?.map(r=>{let i=Ha$1(r.amount||0);return jsxs("div",{children:[r?.id," - ",jsx(a$c,{currency:r?.currency})," ",i.integerAmount,".",i.decimalAmount]},r?.id)})]}):jsxs("div",{children:["Destination ",o?.[0]?.id," - ",jsx(a$c,{currency:o?.[0]?.currency})," ",t.integerAmount,".",t.decimalAmount]})};var Nf=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:"#eeeeee",borderRadius:"56px",height:"24px",minWidth:"24px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,zIndex:10,position:"absolute"})),Wf=styled("div")(({theme:e,percentage:t})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} #656565`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(1),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));function Hf(e){return e<5?5:e===100?95:e}function RT({percentage:e=0,days:t,remainingAmount:o=0,currency:n,...r}){let i=useTheme(),a=jsx(a$c,{currency:n}),{integerAmount:l,decimalAmount:s}=Ia$1(o,n),p$1=`${l}.${s}`,m=useMemo(()=>jsxs(Fragment,{children:["Remaining Authorized Balance - ",a," ",p$1]}),[o,n]);return e===0||o<0?null:jsx(P,{...r,children:jsx(p,{title:m,placement:"top",children:jsx("div",{style:{height:24},children:jsxs(Nf,{whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:22},variants:{animate:{...!!t&&{boxShadow:i.shadows[4]}}},children:[jsxs(Wf,{percentage:e,children:[e,"% ",jsx(xi,{percentage:Hf(e)})]}),!!t&&jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px",width:0},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs("span",{children:[t," days left"]})})]})})})})}var LT=RT;function BT({remainingAmount:e,currency:t}){let o=jsx(a$c,{currency:t}),{integerAmount:n,decimalAmount:r}=Ia$1(e,t),i=`${n}.${r}`;return jsxs(b$1,{copyTrigger:"press",copyText:`${n}.${r}`,children:[o," ",i]})}var VT=BT;var ss=["authenticationMode","paymentAuth","paymentAgreement"],ps=["paymentIssuer","paymentInitiated","paymentDevice"],Of=["paymentMethod","paymentType","paymentScheme","paymentCardNumber",...ps,...ss];var $f=styled$1(Sr)(()=>({marginRight:"8px",display:"flex",alignItems:"center",gap:"4px"})),Uf=styled$1(Sr)(()=>({marginLeft:"8px",width:20}));function OT(e){let{centerIcon:t,centerIconId:o}=useMemo(()=>{for(let a of Of)if(e?.[a])return {centerIcon:e?.[a],centerIconId:a};return {centerIcon:null,centerIconId:null}},[e]);if(!o)return null;let n=o!=="paymentScheme"&&e.paymentScheme,r=o!=="paymentCardNumber"&&e.paymentCardNumber,i=o!=="paymentType"&&e.paymentType;return jsx(a$1,{expandedZIndex:0,centerIcon:t,leftIcons:ps.filter(a=>a!==o&&e?.[a]).map(a=>e?.[a]),rightIcons:ss.filter(a=>a!==o&&e?.[a]).map(a=>e?.[a]),expandableCenterRight:(n||r)&&jsxs($f,{children:[n&&e.paymentScheme,r&&e.paymentCardNumber]}),expandableCenterLeft:i&&jsx(Uf,{children:e.paymentType})})}var _T=memo(OT);var Yf=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function MN({card:e,paymentMethod:t,paymentType:o,paymentScheme:n}){let{t:r}=useTranslation();if(!e.last_four)return null;let i=e?.name||`${r(Ht(dc$1(t,n)?o:n))} - ${e?.last_four}`;return jsx(p,{title:i,children:jsxs(Yf,{children:["\xB7\xB7\xB7 ",e?.last_four]})})}function VN({method:e}){let{t}=useTranslation();return e?jsx(qe,{source:Ce(e)??e,title:`Payment Method - ${t(Ht(e))}`}):null}function _N({type:e}){let{t}=useTranslation();return e?jsx(qe,{source:Ce(e)??e??"",title:`Payment Type - ${t(Ht(e))}`}):null}function jN({scheme:e}){let{t}=useTranslation();return e?jsx(qe,{source:Ce(e)??e,title:`Payment Scheme - ${t(Ht(e))}`}):null}var Kf=({mode:e})=>e?jsx(p,{title:dp$1[e],children:jsx(Sr,{component:"img",src:e==="C"?da$1:ca$1})}):null;var Fi={ORDER:{label:"order",icon:vi$1,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:xi$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:yi$1,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:wi$1,color:"#32ADE6"}},Ni={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled("img")(()=>({width:"35px",height:"16px",display:"block"}));styled("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled("img")(()=>({maxWidth:"100%",width:"100%"}));var Wi=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),Hi=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),qf=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),Xf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),cs=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),Oi=(e,t)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});function pw({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n,...r}){let i=useTheme(),{t:a}=useTranslation(),l=useMemo(()=>[...t?[Ni.SAVED_TOKEN]:[],...(o||0)>0?[Ni.COUNT]:[],...e&&Fi[e]?[Fi[e]]:[]],[t,o,e]),s=d=>n?jsx(a$b,{"data-testid":"AgreementCell_countBadge",order:d,variants:Oi(d,n?85:0),children:jsx(p,{title:a("totalPaymentCount",{amount:f$3(o)}),children:jsx(Hi,{children:jsxs(Wi,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:Ni.COUNT.color},children:["x",o]})})})},d):jsx(a$i,{value:o,index:d},d),p$1=l.map((d,u)=>d.label==="countBadge"?s(u):jsx(p,{title:a(d.label),children:jsx(a$b,{order:u,variants:Oi(u,u>1&&n?62:0),sx:{width:n?"auto":"36px"},children:n?jsx(Hi,{children:jsx(Wi,{"data-testid":"AgreementCell_agreementType",sx:{color:d.color},children:a(d.label)})}):jsx(cs,{src:d.icon,alt:"agreement"})},d.color)},d.color)),m=p$1.length,c=jsx(p,{title:"No agreement",children:jsx(a$b,{order:0,variants:Oi(0,0),sx:{width:n?"auto":"36px"},children:n?jsx(Hi,{children:jsx(Wi,{"data-testid":"AgreementCell_agreementType",sx:{color:i.palette.text.secondary},children:"No agreement"})}):jsx(cs,{src:Ci$1,alt:"no-agreement"})},"no-agreement")},"no-agreement");return jsx(P,{...r,children:jsx(Xf,{"data-testid":"AgreementCell",children:jsx(qf,{layout:true,className:"payment-sources-container","data-testid":"AgreementCell_PaymentSourcesContainer",whileHover:"animate",animate:"start",sourcesCount:m||0,variants:{animate:{width:(m||0)*38}},children:p$1?.length>0?p$1:c})})})}var cw=pw;var Jf=styled$1("img")(()=>({width:"12.67px",height:"15px"}));styled$1("span")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));function dw({hasAuth:e,tooltip:t,isTextShown:o,align:n,...r}){return jsx(P,{style:{textAlign:n||"center",overflow:"visible",display:"flex",width:"100%",justifyContent:n==="left"?"flex-start":"center"},...r,children:e?jsx(p,{title:t,children:jsx(Tt,{"data-testid":"AuthCell_BadgeWrapper",children:o?jsx(z,{"data-testid":"AuthCell_TextLabel",sx:{minWidth:"max-content"},children:t}):jsx(Jf,{src:na,alt:"icon","data-testid":"AuthCell_AuthIcon"})})}):null})}var uw=dw;var Qf={REFUNDED:ok,PAID_OUT:nk,SETTLED:qk,PENDING:pk,UNKNOWN:xk,TIMEDOUT:vk,CANCELLED:gk,FAILED:kk,DECLINED:ik,RESTRICTED:sk,IN_PROGRESS:Ak,ACCEPTED:rk},eg={REFUNDED:"refunded"};function tg({status:e,refundTooltip:t}){let{t:o}=useTranslation();return jsx(p,{title:jsxs("div",{children:[jsx("div",{children:o(Ht(e))}),t]}),children:jsx(ve,{children:jsx("img",{src:Qf[e],alt:"refund-requested"})})})}function ng({status:e,gatewayTooltip:t,unCapturedTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:a,refundTooltip:l}){let{t:s}=useTranslation();return Ln?.includes(e??"")?jsx(rt,{chargeStatus:e,gatewayTooltip:t,chargeTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:i,gatewayCode:a,iconWrapperStyles:{height:17}}):jsx(tg,{status:e,refundTooltip:l})}var rg=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.625),paddingBlock:e.spacing(.625),height:"24px",minWidth:"24px",backgroundColor:"#ede8fb",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10})),ig=styled$1("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0})),ag=styled$1(En)(({theme:e})=>({fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main}));styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));styled$1("span")(({theme:e,isCapture:t})=>({backgroundColor:t?e.palette.info.dark:"#656565",color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600}));var lg=styled$1("img")({width:"14px",height:"14px"}),sg=styled$1(Sr)(({theme:e})=>({position:"relative",zIndex:25,border:`1px solid ${e.palette.divider}`,height:24,borderRadius:"12px",padding:"3px 4px","> div":{paddingTop:0,paddingBottom:0,height:16}}));function ms({status:e,refundIcon:t,refundTooltip:o,refundTooltipLabel:n,date:r,gatewayTooltip:i,unCapturedTooltip:a,acquirerTooltip:l,errorCode:s,acquirerCode:p$1,gatewayCode:m,timezone:c}){let d=useTheme(),{t:u}=useTranslation(),f=t$1(new Date(Number(r)),{currentTimezone:ko,targetTimezone:c?.offset}),x=useMemo(()=>t||(e==="REFUNDED"?ok:qk),[e,t]);return ["REFUNDED","PAID_OUT"].includes(e??"")?jsx(p,{title:jsxs("div",{children:[jsx("div",{children:n??u(eg.REFUNDED)}),o]}),children:jsxs(rg,{whileHover:["animate","fadeIn"],animate:"start",variants:{...r&&{animate:{boxShadow:d.shadows[4]}}},sx:{...!r&&{backgroundColor:"transparent"}},children:[jsx(lg,{sx:{...!r&&{width:"16px",height:"16px"}},src:x,alt:"refunded"}),jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:r&&jsx(ig,{children:jsx(ag,{value:f})})})]})}):jsx(ng,{status:e,refundTooltip:o,gatewayTooltip:i,unCapturedTooltip:a,acquirerTooltip:l,errorCode:s,acquirerCode:p$1,gatewayCode:m})}var cg=()=>{let e=useTheme();return {REFUNDED:{color:e.palette.common.lightPurple,backgroundColor:`${e.palette.common.lightPurple}1A`},PENDING:{color:e.palette.custom[500],backgroundColor:`${e.palette.custom[500]}0d`},PAID_OUT:{color:e.palette.common.green,backgroundColor:`${e.palette.common.green}0d`},SETTLED:{color:e.palette.common.green,backgroundColor:`${e.palette.common.green}0d`},UNKNOWN:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},TIMEDOUT:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},FAILED:{color:e.palette.custom[500],background:`${e.palette.custom[500]}1A`},DECLINED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},RESTRICTED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},IN_PROGRESS:{color:e.palette.grey[700],background:`${e.palette.grey[700]}1A`},CANCELLED:{color:e.palette.error.main,background:`${e.palette.error.main}1A`},ACCEPTED:{color:e.palette.grey[700],background:`${e.palette.grey[700]}1A`}}};function Ew({status:e,date:t,refundTooltip:o,isTextShown:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:a,acquirerCode:l,gatewayCode:s,unCapturedTooltip:p$1,timezone:m,refundTooltipLabel:c,refundIcon:d,...u}){let{t:f}=useTranslation(),x=cg(),y=useCallback(g=>ic(g).format("MMM D, YYYY"),[]),S=Ln.includes(e);return jsx(P,{...u,style:{overflow:"visible"},children:jsx(Me,{children:jsx(sg,{width:n?"auto":"36px",sx:{...S&&{border:"none"}},children:n?jsx(p,{title:t?y(t):f(Ht(e)),children:jsx(z,{sx:{...x[e]?x[e]:x.PENDING},children:f(Ht(e))})}):jsx(ms,{status:e,refundTooltip:o,date:t,gatewayTooltip:r,unCapturedTooltip:p$1,acquirerTooltip:i,errorCode:a,acquirerCode:l,gatewayCode:s,timezone:m,refundTooltipLabel:c,refundIcon:d})})})})}var Mw=Ew;var dg=styled("img")(()=>({width:"16px",height:"16px"})),ug=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),fg=styled("span")(({theme:e})=>({display:"flex",paddingInline:e.spacing(1),paddingBlock:e.spacing(.5),alignItems:"center",justifyContent:"center",gap:e.spacing(.5),borderRadius:"56px",background:`${e.palette.info.dark}1a`})),gg=styled("span")(({theme:e})=>({color:e.palette.info.dark,fontSize:"14px",lineHeight:"16.8px"}));function Dw({walletId:e,country:t,showCountry:o=true,...n}){return jsx(P,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(ug,{children:[o&&t&&jsx(p,{title:La$1(t),children:jsx(a$2,{countryCode:t})}),jsxs(fg,{children:[jsx(dg,{src:ac$1,alt:"wallet-icon"}),e&&jsxs(gg,{children:["\xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var Rw=Dw;var Cg=styled("img")(()=>({width:"16px",height:"16px"})),xg=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),hg=styled("span")(({theme:e})=>({display:"flex",paddingInline:e.spacing(1),paddingBlock:e.spacing(.5),alignItems:"center",justifyContent:"center",gap:e.spacing(.5),borderRadius:"56px",background:`${e.palette.common.white}`,border:`1px solid ${e.palette.divider}`})),yg=styled("span")(({theme:e})=>({color:`${e.palette.text.primary}`,fontSize:"14px",lineHeight:"16.8px"}));styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function Lw({walletId:e,country:t,name:o,...n}){return jsx(P,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(xg,{children:[t&&jsx(p,{title:La$1(t),children:jsx(a$2,{countryCode:t})}),jsxs(hg,{children:[jsx(Cg,{src:bc$1,alt:"bank-icon"}),e&&jsxs(yg,{children:[o," \xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var kw=Lw;var fs={PAID_OUT:nk,SETTLED:tk,PENDING:Oh,INITIATED:Oh,FAILED:kk};function Nw({payoutStatus:e="PAID_OUT",...t}){let{t:o}=useTranslation(),n=useTheme();return jsx(P,{...t,children:jsx(Me,{children:jsx(ve,{className:"payout-status",style:{visibility:"visible",width:"36px",borderRadius:"23.1px",backgroundColor:n.palette.common.white,border:`1.029px solid ${n.palette.divider}`},children:e&&fs[e]&&jsx(p,{title:o(Ht(e)),children:jsx(Y,{src:fs[e],alt:"settled-icon",style:{width:"16px",height:"16px",objectFit:"contain"}})})})})})}var Ww=Nw;styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"}));styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"}));styled$1(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)}));styled$1("img")(()=>({width:"13px",height:"13px"}));styled$1(motion.span)(({theme:e})=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"}));styled$1(motion.div)(()=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0}));styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"}));var Hw=styled$1("span")(({theme:e})=>({textDecorationLine:"underline",color:e.palette.info.dark}));var gs=a$d;function zw({status:e,chargeStatus:t,isTextShown:o,...n}){let{t:r}=useTranslation();return jsx(P,{...n,children:jsxs(Me,{children:[jsx(Yi,{status:e,isTextShown:o}),t&&gs[t]&&jsx(p,{title:r(Ht(t)),children:jsx(Y,{src:gs[t],alt:"charge-icon"})})]})})}var $w=zw;var Gw={FAILED:dh$1,PENDING:kh,INITIATED:$g$1,ATTEMPTED:_g$1,EXEMPTED:ch$1,EXEMPTED_WITH_TRANSACTION:ch$1,EXEMPTED_WITHOUT_TRANSACTION:bh,REJECTED:ah$1,UNAVAILABLE:fh,UNDETERMINED:gh$1,SUCCESS:jh$1,AUTHENTICATED:ih$1,AUTHENTICATED_WITH_TRANSACTION:ih$1,AUTHENTICATED_WITHOUT_TRANSACTION:ih$1,AUTHENTICATED_AUTHORIZE_FAILED:dh$1},Cs={FAILED:lh$1,PENDING:mh$1,INITIATED:nh$1,ATTEMPTED:oh$1,EXEMPTED:ph$1,EXEMPTED_WITH_TRANSACTION:ph$1,EXEMPTED_WITHOUT_TRANSACTION:qh$1,REJECTED:rh$1,UNAVAILABLE:sh$1,UNDETERMINED:th$1,SUCCESS:uh$1,AUTHENTICATED:vh,AUTHENTICATED_WITH_TRANSACTION:vh,AUTHENTICATED_WITHOUT_TRANSACTION:wh,AUTHENTICATED_AUTHORIZE_FAILED:lh$1},Zt=a$d;function Kw({status:e,authorizedStatus:t,chargeStatus:o,chargeTooltip:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:a,...l}){let{t:s}=useTranslation(),p$1=useTheme(),m=[e&&Cs[e]?jsx(p,{title:s(Ht(e)),children:jsx("img",{src:Cs[e],alt:"authentication-icon",style:{width:"36px",height:"24px",objectFit:"scale-down"}})}):null,o&&Zt[o]?jsx(p,{title:s(Ht(o)),children:jsx(rt,{showAuthorizedStatus:true,chargeStatus:o,gatewayTooltip:r,chargeTooltip:n,acquirerTooltip:i,errorCode:a})}):null,t&&f$2[t]?jsx(p,{title:s(Ht(t)),children:jsx("img",{src:f$2[t],alt:"authorized-icon",style:{width:"36px",height:"20px",objectFit:"scale-down"}})}):null].filter(Boolean),c=m.length||0;return jsx(P,{...l,sx:{position:"relative",overflow:"visible"},children:jsx(Mo,{whileHover:"animate",animate:"start",statusesCount:c,children:m.map((d,u)=>d?jsx(Eo,{order:u,variants:Po(u,p$1.shadows[4],40),children:jsx(Ao,{children:d})},u):null)})})}var qw=Kw;var hs={issuer:Xh,scheme:Yh$1,device:Vh,app:Uh$1,wallet:Th,biometric:Vh};function Jw({type:e,...t}){let{t:o}=useTranslation();return jsx(P,{...t,children:jsx(Me,{children:jsx(ve,{className:"authentication-status",children:e&&hs[e]&&jsx(p,{title:o(Ht(e)),children:jsx(Y,{src:hs[e],alt:"authentication-type"})})})})})}var Qw=Jw;var Ig={SMS:$d,EMAIL:Xd,WHATSAPP:ae};var bg=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Sg=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),Tg=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),wg=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),vg=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),Pg=(e,t)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}});function n0({channels:e,isTextShown:t,...o}){let{t:n}=useTranslation(),r=useTheme(),i={WHATSAPP:r.palette.custom[700],EMAIL:r.palette.custom[800],SMS:r.palette.custom[900]},l=e?.sort(p=>p==="EMAIL"?-1:p==="SMS"?1:p==="WHATSAPP"?2:0)?.filter(p=>!!p)?.map((p$1,m)=>{if(!p$1)return null;let c=n(p$1?.toLowerCase());return jsx(b$7,{order:m,variants:Pg(m,t?74:0),sx:{width:t?"70px":"36px"},children:jsx(p,{title:c,placement:"top",wrapperProps:{sx:{width:"100%",height:"100%",justifyContent:"center"}},children:t?jsx(vg,{children:jsx(wg,{sx:{color:i[p$1]},children:c})}):jsx(Sg,{src:Ig[p$1],alt:p$1})})},`${p$1}-${m}`)}),s=l?.length||0;return jsx(P,{...o,children:jsx(bg,{children:l?.length>0?jsx(Tg,{layout:true,className:"payment-sources-container",whileHover:"animate",animate:"start",sourcesCount:s||0,variants:{animate:{width:(s||0)*38}},style:{zIndex:29},children:l}):null})})}var r0=n0;function Un(e){return x(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD, YYYY",lastWeek:"MMM DD, YYYY",nextWeek:"MMM DD, YYYY"})}styled(motion.div)(({theme:e,background:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:t,height:"24px",width:"fit-content",borderRadius:"80px",fontSize:"10px",color:e.palette.text.primary}));styled("img")(()=>({width:"16px",height:"16px"}));styled("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));styled("div")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.error.main}));var Ag=styled(j)(({theme:e})=>({fontSize:"11px",fontWeight:500,color:"#000",cursor:"default"}));function a0({dueDate:e,expiryDate:t,...o}){let n=useMemo(()=>({label:Un(ic(e).valueOf()),tooltip:"Due Date"}),[e]),r=useMemo(()=>({label:Un(ic(t).valueOf()),tooltip:"Expiry Date"}),[t]),i=s=>jsx(p,{title:s.tooltip,children:jsx(Ag,{children:s.label})}),a=useMemo(()=>e?i(n):t?i(r):null,[n,r,e,t]),l=useMemo(()=>t&&e?[i(r)]:[],[n,r,e,t]);return !e&&!t?null:jsx(P,{...o,sx:{position:"relative",overflow:"visible"},children:jsx(a$1,{sx:{justifyContent:"flex-start"},centerIcon:a,rightIcons:l})})}var l0=a0;var Mg=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.75),height:"34px",minWidth:"24px",borderRadius:"8px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.common.white,border:`1px solid ${e.palette.divider}`}}));styled("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"12px",fontWeight:e.typography.fontWeightRegular,color:e.palette.secondary.main,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0}));styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));styled("span")(({theme:e,isCapture:t})=>({backgroundColor:t?e.palette.info.dark:"#656565",color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600}));var ys=styled("img")({width:"24px",height:"24px"});function c0({products:e,...t}){let o=e?.map((r,i)=>jsx(ys,{sx:{...r?.toLowerCase()===Bn.tokens.code?.toLowerCase()&&{borderRadius:"8px",border:"1px solid rgba(0, 0, 0, 0.10)"}},className:"app-logo",src:Dn.find(a=>a.code?.toLowerCase()===r?.toLowerCase())?.iconUrl,alt:"product-icon"},`${i}-${r}`)),n=jsxs(Mg,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:"10px 0px 8px 0px #F2F2F2"}},children:[jsx(ys,{src:si,alt:"products-icon"}),jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:o})]});return jsx(P,{...t,style:{overflow:"visible"},children:jsx(Me,{children:jsx("div",{style:{width:"30px",position:"relative",zIndex:24},children:n})})})}var m0=c0;function qi(e){return jsx(Ci,{...e,children:jsx(p,{title:e.tooltip||e.children,children:e.children})})}var kg=styled$1(Sr)(()=>({display:"flex",alignItems:"center",gap:"8px"})),Bg=styled$1(Sr)(({theme:e})=>({fontSize:"14px",color:e.palette.text.primary,lineHeight:"16.8px"}));function W6({currency:e}){return jsxs(kg,{children:[jsx(a$2,{currencyCode:e}),jsx(Bg,{children:e})]})}ic.extend(C0);ic.extend(g0);function Ng({value:e,...t}){let o=useMemo(()=>x(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM D, YYYY",lastWeek:"MMM D, YYYY",nextWeek:"MMM D, YYYY"}),[e]);return jsx(P,{...t,children:o})}var Wg=styled$1(Sr)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:36,height:24,border:`1px solid ${e.palette.divider}`,borderRadius:"24px","&:hover":{boxShadow:e.shadows[4]}}));function r4({reference:e}){return e?jsx(p,{title:`Bank - ${e}`,children:jsx(Wg,{children:jsx(Sr,{component:"img",src:ob$1,alt:"bank",width:14})})}):jsx(Fragment,{})}var Is={acquirer:ob$1,generic:pb,payment:Zd,gateway:rn,order:Yd};var Hg=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Og=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),_g=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),zg=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),$g=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));styled("div")(()=>({height:"18px"}));var Ug=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});var P0=120,A0=50;function E0({isTextShown:e,getTooltipTitle:t,...o}){let[n,r]=useState(false),[i,a]=useState(null),l=useRef(null),s=useRef(false),p$1=useRef(false),m=useRef(null),c=useTheme(),d=useMemo(()=>Object.keys(Is).filter(I=>!!o[I]),[o]),u=()=>{m.current&&(clearTimeout(m.current),m.current=null);},f=()=>{a(l.current);},x=()=>{s.current=true,p$1.current=false,r(true),a(null),u(),m.current=setTimeout(()=>{p$1.current=true,f();},P0);};useEffect(()=>()=>u(),[]);let y=()=>{s.current||x();},S=()=>{u(),l.current=null,s.current=false,p$1.current=false,a(null),r(false);},g=I=>{if(l.current=I,p$1.current){u(),a(I);return}s.current||x();},h=()=>{l.current=null,p$1.current&&(u(),m.current=setTimeout(f,A0));},b=d.length;return jsx(P,{...o,children:jsx(Hg,{children:b>0?jsx(_g,{layout:true,className:"reference-sources-container",whileHover:"animate",onHoverStart:y,onHoverEnd:S,animate:n?"animate":"start",sourcesCount:b,variants:{animate:{width:b*38}},style:{zIndex:29},children:d.map((I,w)=>{let T=t?.(I)||`${Yg(I)} - ${o[I]}`,v=i===I;return jsx(b$7,{order:w,variants:Ug(w,c.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},onMouseEnter:()=>g(I),onMouseLeave:h,children:jsx(p,{open:v,disableHoverListener:true,disableInteractive:true,title:v?T:"",children:e?jsx($g,{children:jsx(zg,{children:Yg(I)})}):jsx(Og,{src:Is[I],alt:I,sx:{...I==="order"&&{width:"11.82px"}}})})},`${I}-${w}`)})}):null})})}var M0=E0;var bs={Y:{tooltip:"Authenticated",icon:ih$1,borderColor:"rgba(31, 136, 208, 0.10)"},N:{tooltip:"Failed Authentication",icon:Tg$1,borderColor:"rgba(240, 130, 0, 0.10)"},R:{tooltip:"Failed Authentication",icon:Tg$1,borderColor:"rgba(240, 130, 0, 0.10)"},A:{tooltip:"Attempted",icon:_g$1,borderColor:"rgba(31, 136, 208, 0.10)"},U:{tooltip:"Failed Authentication",icon:Tg$1,borderColor:"rgba(240, 130, 0, 0.10)"},noAuth:{tooltip:"Not Authenticated",icon:$g$1,borderColor:"#F2F2F2"}},Ss={"3DS":{tooltip:"3DS",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Pj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Qj,borderColor:"rgba(31, 136, 208, 0.10)"}};styled("img")(()=>({width:"12.67px",height:"15px"}));var Kg=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),qg=styled("img")({width:"16px",height:"16px"});styled("div")(({theme:e})=>({borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"10px",fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),lineHeight:0}));var Xg=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),Zg=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...e>0&&{opacity:0}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t,...e>0&&{opacity:1}}}),Jg=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}));function R0({transactionStatus:e,isTextShown:t,eci:o,authType:n,...r}){let i=useTheme$1(),a=useMemo(()=>{let p=bs[e??"noAuth"]??bs.noAuth,m=p?.tooltip,c=p?.icon;return [{tooltip:m,content:t?m:c,type:t?"text":"icon"},...n?[{tooltip:n,content:t?Ss[n]?.tooltip:Ss[n]?.icon,type:t?"text":"icon"}]:[],{tooltip:"",content:o?`ECI ${o}`:"",type:"text"}]},[e,o,t]),l=useMemo(()=>a.filter(p=>!!p.content).map((p$1,m)=>{let c=p$1.type==="text"?jsx(Jg,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(z,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":p$1.content,children:p$1.content})}):jsx(qg,{src:p$1.content,alt:p$1.tooltip});return jsx(p,{title:p$1.tooltip,children:jsx(b$7,{order:-1*m,variants:Zg(m,i.shadows[4],t?124:39),sx:{...p$1.type==="text"&&{width:t?"120px":"58px"}},children:c})},`${p$1.tooltip}-${m}`)}),[r,a,t,i]),s=l.length;return jsx(P,{...r,children:jsx(Kg,{children:s>0?jsx(Xg,{layout:true,className:"authentication-sources-container",whileHover:"animate",animate:"start",sourcesCount:s,variants:{animate:{width:38}},style:{zIndex:29},children:l}):null})})}var L0=R0;var Ts={checkout:Ch$1,checkoutSuccess:Dh};function V0({status:e,...t}){let{t:o}=useTranslation();return jsx(P,{...t,sx:{overflow:"visible"},children:jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:e&&Ts[e]&&jsx(p,{title:o(Ht(e)),children:jsx(Y,{src:Ts[e],alt:"checkout-icon"})})})})}var F0=V0;var ws={TRANSACTED:Ih,INITIATED:Gh$1,CANCELLED:Hh$1,EXPIRED:Fh};function tC({status:e,chargeStatus:t,...o}){let{t:n}=useTranslation();return jsx(P,{...o,sx:{overflow:"visible"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:[e&&ws[e]&&jsx(p,{title:n(Ht(e)),children:jsx(Y,{src:ws[e],alt:"intents-icon"})}),t&&Zt[t]&&jsx(p,{title:n(Ht(t)),children:jsx(rt,{chargeStatus:t})})]})})}var nC=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:"#eeeeee",borderRadius:"56px",height:"24px",fontSize:"10px",color:e.palette.text.primary,zIndex:24,overflow:"visible",position:"absolute",gap:"0px"})),rC=styled(motion.div)(({theme:e,percentage:t})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} #656565`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(1),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:"#656565",display:"flex",alignItems:"center",justifyContent:"space-between",gap:e.spacing(.5),minWidth:"44px"}));styled("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));function iC(e){return e<5?5:e===100?95:e}var Qi={PAID_OUT:{color:"#2ACE00",backgroundColor:"#2ACE000D"},PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},SETTLED:{color:"#2ACE00",backgroundColor:""}};function _0({percentage:e,date:t,payoutStatus:o,payoutTooltip:n,chargeTooltip:r,refundCount:i,isTextShown:a,...l}){let{t:s}=useTranslation(),p$1=useTheme();return e===0?null:jsx(P,{...l,style:{overflow:"visible",position:"relative"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px"},children:[jsx(p,{title:r,children:jsxs(nC,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{gap:"4px"}},sx:{...a&&{height:"auto",padding:"0",backgroundColor:"transparent"}},children:[jsx(rC,{percentage:e,sx:{backgroundColor:"#eeeeee",...a&&{backgroundColor:"transparent",border:"none"}},variants:{...!a&&{animate:{boxShadow:p$1.shadows[4]}}},children:a?jsxs(z,{children:[e,"%"]}):jsxs(Fragment,{children:[e," % ",jsx(xi,{percentage:iC(e)})]})}),i>1&&jsx(motion.div,{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px"},children:jsx(motion.div,{style:{alignItems:"center",justifyContent:"center",gap:"4px",position:"relative",zIndex:22,overflow:"visible"},initial:{width:0,opacity:0,paddingRight:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",paddingRight:"4px",boxShadow:p$1.shadows[4]},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z$1,{compact:true,color:"neutral",children:[i,"x"]})})})]})}),jsx(ve,{className:"payout-status",style:{visibility:o==="PENDING"?"hidden":"visible",position:"relative",left:"57px",width:a?"auto":"24px"},children:o&&e$1[o]&&jsx(p,{title:n||s(Ht(o)),children:a?jsx(z,{sx:{color:Qi[o].color,border:`1px solid ${Qi[o].color}1a`,backgroundColor:Qi[o].backgroundColor},children:s(Ht(o))}):jsx(Y,{src:e$1[o],alt:"settled-icon"})})})]})})}var z0=_0;var sC={DELETED:_if,DRAFT:jf,CREATED:kf$1,CANCELLED:Aa$1,CANCELED:Aa$1,EXPIRED:Ba,PAID:nf$1,REFUNDED:tf$1,DELIVERED:of$1,VIEWED:pf$1,SAVED:qf$1,SCHEDULED:rf$1,PENDING:sf$1,REMINDED:""};styled(motion.div)(({theme:e,background:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.75),paddingBlock:e.spacing(.5),backgroundColor:t,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:e.palette.text.primary}));var Ps=styled("img")(()=>({height:"13.125px",width:"12px"})),ea=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),pC=styled("div")(({theme:e})=>({color:e.palette.common.white,background:e.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),cC=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));function mC(e){switch(e){case "CANCELLED":case "DELETED":return {color:"#FF3D00",background:"#FFF5F2"};case "VIEWED":return {color:"#1F88D0",background:"#e1edf8"};case "REFUNDED":return {color:"#4E1FD0",background:"#ede8fb"};case "PAID":return {color:"#2ACE00",background:"#EAFAE5"};case "EXPIRED":return {color:"#FF7A00",background:"#FFF2E5"};case void 0:return {color:"#FF7A00",background:"transparent"};default:return {color:"#818181",background:"#F2F2F2"}}}function dC({chargeStatus:e,chargeTooltip:t,errorCode:o,iconStyles:n,iconWrapperStyles:r}){let{t:i}=useTranslation(),a=e?b$b[e]:null,l=e&&a$d[e]&&jsx(cC,{style:r,children:jsx(Y,{src:a$d[e],alt:"charge-icon",style:{width:"16px",height:"16px",...n}})}),s=t&&jsx(Fragment,{children:jsx("div",{children:t})});return e?jsx(p,{title:s??i(Ht(e)),children:jsxs(Sr,{sx:{display:"flex",gap:"6px",alignItems:"center"},children:[l,!!Ln?.includes(e||"")&&jsx(pC,{style:{background:a?.color},children:o})]})}):null}function uC({status:e,date:t,viewsCount:o,chargeStatus:n,errorCode:r,chargeTooltip:i,remindedCount:a=0,...l}){let{t:s}=useTranslation(),p$1=useTheme(),m=e?sC[e]:null,c=mC(e),d=`${s(e?.toLowerCase()||"")} ${Un(ic(t).valueOf())}`,u=useMemo(()=>jsx(dC,{chargeStatus:n,errorCode:r,chargeTooltip:i}),[n,r,i]),f=useMemo(()=>jsx(p,{title:s("reminded"),children:jsxs(Sr,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:"6px"},children:[jsx(Ps,{sx:{width:"14px",height:"14px"},src:je,alt:"icon"}),jsx(z$1,{style:{background:p$1.palette.error.main,fontWeight:600,color:p$1.palette.common.white},children:a})]})}),[a]),x=useMemo(()=>{if(m)return jsx(p,{title:s(d||""),children:jsx(Ps,{src:m,alt:"status icon"})});if(n&&Zt[n])return u;if(a)return f},[m,n,a]);return !e&&!n&&!a?null:jsx(P,{...l,sx:{position:"relative",overflow:"visible"},children:jsx(a$1,{sx:{justifyContent:"flex-start"},expandableCenterRight:o&&e==="VIEWED"&&m?[jsx(z$1,{style:{marginRight:"8px",color:"#fff",backgroundColor:c.color},children:o})]:void 0,centerIcon:x,leftIcons:a&&m?[f]:void 0,rightIcons:n&&Zt[n]&&m?[u]:void 0})})}function tv({tooltip:e,children:t,badge:o,...n}){return jsx(P,{style:{textAlign:"center",overflow:"visible"},...n,children:t?jsx(p,{title:e,children:jsx(Tt,{"data-testid":"BadgeCell_BadgeWrapper",children:jsxs(z,{"data-testid":"BadgeCell_TextLabel",sx:{minWidth:"max-content",gap:"0.5rem"},children:[t,(o||0)>1&&jsxs(z$1,{color:"dark",style:{fontWeight:"bold"},children:["+",o]})]})})}):null})}var ov=tv;var Ms={ACTIVE:gi$1,EXPIRED:fi$1,PENDING:gi$1,SAVED:di$1,TRANSACTED:ei,CONSUMED:ei};var nv=(d=>(d.ABANDONED="ABANDONED",d.IN_PROGRESS="IN_PROGRESS",d.VOID="VOID",d.CANCELLED="CANCELLED",d.CAPTURED="CAPTURED",d.INITIATED="INITIATED",d.FAILED="FAILED",d.DECLINED="DECLINED",d.RESTRICTED="RESTRICTED",d.TIMEDOUT="TIMEDOUT",d.UNKNOWN="UNKNOWN",d.AUTHORIZED="AUTHORIZED",d))(nv||{});function iv({status:e,chargeTooltip:t,gatewayTooltip:o,acquirerTooltip:n,errorCode:r,cardId:i,hasChargeIcon:a,hasAuthorizedIcon:l,...s}){let{t:p$1}=useTranslation();return jsx(P,{...s,sx:{position:"relative",overflow:"visible"},children:jsxs(Me,{sx:{gap:"0.5rem"},children:[e&&Ms[e]&&jsx(p,{title:p$1(Ht(e)),children:jsx(Y,{src:Ms[e],alt:"token-icon"})}),i&&jsx(p,{title:p$1(Ht(e)),children:jsx(Y,{src:hi$1,alt:"card-icon"})}),a&&jsx(p,{title:p$1(Ht("CAPTURED")),children:jsx(rt,{showAuthorizedStatus:true,chargeStatus:"CAPTURED",gatewayTooltip:o,chargeTooltip:t,acquirerTooltip:n,errorCode:r})}),l&&jsx(p,{title:p$1(Ht("AUTHORIZED")),children:jsx(Y,{src:f$2.AUTHORIZED,alt:"authorized-icon"})})]})})}var av=iv;var Rs=styled("img")(()=>({maxWidth:"13px",maxHeight:"13px"})),gC=styled("div")(({theme:e})=>({width:"24px",height:"24px",border:`1px solid ${e.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50%"})),CC=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));function sv({brandName:e,brandIcon:t,...o}){return jsx(P,{style:{textAlign:"center",overflow:"visible"},...o,children:jsxs(CC,{children:[jsx(gC,{children:t?jsx(p,{title:e,children:jsx(Rs,{src:t,alt:"brand icon",onError:r=>{r.currentTarget.src=zi;}})}):jsx(Rs,{src:zi,alt:"brand icon"})}),jsx("span",{children:e})]})})}var pv=sv;function hC({metadata:e}){let t=Object.keys(e)[0]??"",o=Object.keys(e)[1]??"",n=Object.keys(e)[2]??"",r=Object.keys(e)[3]??"",i=Object.keys(e)[4]??"",a=t||o||n||r||i?`${e[t]?`${e[t]}${e[o]||e[n]||e[r]||e[i]?",":""}`:""}${e[o]?`${e[o]}${e[n]||e[r]||e[i]?",":""}`:""}${e[n]?`${e[n]}${e[r]||e[i]?",":""}`:""}${e[r]?`${e[r]}${e[i]?",":""}`:""}${e[i]??""}`:"";return a?jsx(p,{title:a,children:jsx(Box,{component:"img",src:_j,alt:"meta",sx:{cursor:"pointer"}})}):null}var IC=styled$1("span")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,paddingInline:"8px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:"36px",cursor:"pointer"})),bC=styled$1(motion.img)(()=>({width:"16px",height:"16px"}));var fv=({onClick:e,isSettlementsAvailable:t,isDownloadError:o,isDownloadLoading:n,isDownloadSuccess:r})=>{let i=useMemo(()=>n||r||o,[n,r,o]),a=useMemo(()=>r?ic$1:o?hc$1:Yj,[r,o]);return jsx(p,{title:t?"":"Pending",children:jsx(IC,{onClick:()=>t&&!i&&e(),children:jsx(AnimatePresence,{mode:"wait",initial:false,children:n?jsx(a$e,{},"spinner"):jsx(bC,{src:t?a:Zj,alt:"Download Report"})})})})};var Cv=({receiptId:e})=>jsx(TableCell,{component:"div",children:jsx(p,{title:`Receipt - ${e}`,children:jsx(z,{sx:{padding:"3px 8px",maxWidth:"50px"},children:jsx("img",{src:pc,alt:"receipt"})})})});var xv=({receiptId:e})=>jsx(Ci,{children:jsx("span",{children:e})});var hv=({receiptId:e})=>jsx(qi,{children:jsx("span",{children:e})});var vC=styled("div",{shouldForwardProp:e=>!["licenseNumber","hasClick"].includes(e)})(({theme:e,licenseNumber:t,hasClick:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:o?"pointer":"default",...t&&{padding:"3.5px 8px"}})),PC=styled(Sr)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"}));styled("img")(()=>({width:"16px",height:"11.73px"}));var AC=styled("div",{shouldForwardProp:e=>!["licenseNumber"].includes(e)})(({theme:e,licenseNumber:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",margin:"0",width:"74px",...!t&&{color:"#B1B1B1",width:"84px"}})),EC=styled("img")(()=>({width:"10.5px",height:"10.5px"})),MC=styled("div")({marginLeft:"auto",width:"auto"});var DC={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};function RC({entity:e,country:t,verificationStatus:o,licenseNumber:n,hideStatus:r,...i}){let a=DC[o??"incomplete"];return jsx(P,{...i,sx:{cursor:i?.onClick?"pointer":"default"},children:jsx(p,{title:e,children:jsx(vC,{hasClick:!!i?.onClick,licenseNumber:n,children:jsxs(PC,{children:[jsx(p,{title:t?La$1(t):"",children:jsx(a$2,{countryCode:t})}),jsx(AC,{licenseNumber:n,children:n||"Not Available"}),!r&&jsx(MC,{children:jsx(EC,{src:a})})]})})})})}var LC=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),kC=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"}));styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));var BC=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*40,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});function FC({acceptance:e,payout:t,hideAcceptance:o,hidePayout:n,closed:r,...i}){let a=e?.toLowerCase()==="enabled",l=t?.toLowerCase()==="enabled",s=r?.toLowerCase()==="closed",[p$1,m]=useState(false),c=useTheme(),d=useMemo(()=>[{icon:a?tc:Di$1,tooltip:"Acceptance",enabled:a,shown:!o,zIndex:a&&!l?3:1},{icon:l?uc:Hi$1,tooltip:"Payout",enabled:l,shown:!n,zIndex:2},{icon:ai,tooltip:"Closed",enabled:s,shown:s,zIndex:3}].filter(x=>x.shown),[a,l,o,n,s]),u=useMemo(()=>d.map((x,y)=>{let S=x.tooltip;return jsx(b$7,{order:y,variants:BC(y,c.shadows[4],40),sx:{width:"36px",zIndex:x.zIndex+6},children:jsx(p,{onOpen:()=>{m(true);},onClose:()=>{m(false);},title:S,children:jsx(a$f,{mainIcon:x.icon,mainIconSize:16,containerSize:16,sx:{borderRadius:"40px"},onError:g=>{g.currentTarget.src=x.icon,g.currentTarget.style.borderRadius="0px";},borderColor:"transparent"})})},`${x.tooltip}-${y}`)}),[d,c]),f=d?.length||0;return jsx(P,{...i,children:jsx(LC,{children:f>0?jsx(kC,{layout:true,className:"reference-sources-container",whileHover:"animate",animate:p$1?"animate":"start",sourcesCount:f,variants:{animate:{width:f*38}},style:{zIndex:29},children:u}):null})})}var Zn={technology:Kk,institution:Jk,payment:Zd,developmentHouse:Lk,platform:yd};var NC=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),WC=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),HC=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),OC=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),_C=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*40,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});var zC=e=>{let t="";switch(e.type){case "technology":case "institution":t="Payment";break;default:t="";break}return `${t} ${gb$1(e.type)} - ${e.name}`};function Mv({isTextShown:e,segments:t,...o}){let[n,r]=useState(false),i=useTheme(),a=useMemo(()=>t?.filter(s=>!!s.name).map((s,p$1)=>{let m=s.type?.toLowerCase?.().includes("platform"),c=s.tooltip||zC(s),d=s.type,u=m?Zn.platform:Zn[d];return jsx(b$7,{order:p$1,variants:_C(p$1,i.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},children:jsx(p,{onOpen:()=>{r(true);},onClose:()=>{r(false);},title:c,children:e?jsx(OC,{children:jsx(HC,{children:Yg(s.name)})}):jsx(a$f,{mainIcon:s.icon||u,mainIconSize:16,containerSize:16,sx:{...s.icon?{borderRadius:"40px"}:{borderRadius:"0px"}},onError:f=>{Zn[d]&&(f.currentTarget.src=Zn[d],f.currentTarget.style.borderRadius="0px");},borderColor:"transparent"})})},`${s.name}-${p$1}`)}),[t,e,i]),l=a?.length||0;return jsx(P,{...o,children:jsx(NC,{children:l>0?jsx(WC,{layout:true,className:"reference-sources-container",whileHover:"animate",animate:n?"animate":"start",sourcesCount:l,variants:{animate:{width:l*38}},style:{zIndex:29},children:a}):null})})}var Dv=Mv;function UC({marketPlaceIcon:e,marketPlaceName:t,...o}){return jsx(P,{...o,children:jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:t&&jsxs(Fragment,{children:[jsx(Box,{sx:{width:"24px",height:"24px",border:"1px solid #F2F2F2",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:e??jsx("img",{src:Rb,alt:"marketplace",style:{maxWidth:"18px",maxHeight:"18px",objectFit:"cover"}})}),jsx(Typography,{noWrap:true,sx:{fontSize:"14px",fontWeight:400},children:t})]})})})}var GC={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};var YC=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1.029px solid #F2F2F2",borderRadius:"44px",padding:"4px 8px",lineHeight:"120%"})),jC=styled("div")(({theme:e})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"84px"})),KC=styled("img")(()=>({width:"10.5px",height:"10.5px"})),qC=styled("span")(({theme:e})=>({fontSize:"9.5px",fontWeight:400,color:e.palette.common.white,backgroundColor:e.palette.grey[700],borderRadius:"4px",padding:"1px 2px"})),XC=styled("div")({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}),ZC=styled("div")({display:"flex",alignItems:"center",gap:"8px"}),JC=styled("div")({fontWeight:400,fontSize:14,lineHeight:"120%",letterSpacing:0,color:"#B1B1B1",textAlign:"center",width:"100%"});function QC({id:e,status:t,count:o,name:n,...r}){let i=GC[t??"incomplete"];return jsx(P,{...r,sx:{cursor:"pointer"},children:jsx(p,{title:n,children:jsx(YC,{children:e?jsxs(XC,{children:[jsx(jC,{children:e}),jsxs(ZC,{children:[jsx(KC,{src:i}),o>1&&jsx("div",{children:jsxs(qC,{children:["+",o-1]})})]})]}):jsx(JC,{children:"Not Available"})})})})}var ex=styled("div",{shouldForwardProp:e=>!["hasClick"].includes(e)})(({theme:e,hasClick:t})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:t?"pointer":"default"})),tx=styled(Sr)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"})),ox=styled("p",{shouldForwardProp:e=>!["brandName"].includes(e)})(({theme:e,brandName:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"74px",margin:"0",...!t&&{color:"#B1B1B1",width:"84px"}})),nx=styled("img")(()=>({width:"10.5px",height:"10.5px"})),rx=styled("div")({marginLeft:"auto",width:"auto"});var ix={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};function ax({brand:e,verificationStatus:t,hideStatus:o,brandLogo:n,...r}){let i=ix[t??"incomplete"];return jsx(P,{...r,children:jsx(p,{title:e.name,children:jsx(ex,{hasClick:!!r.onClick,children:jsxs(tx,{children:[n,jsx(ox,{brandName:e.name,children:e.name||"Not Available"}),!o&&jsx(rx,{children:jsx(nx,{src:i})})]})})})})}var lx=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),sx=styled("img")(()=>({maxWidth:"36px",maxHeight:"16px"})),px=styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"}));styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));var cx=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},...o&&{boxShadow:"7px 0px 8px 0px #F2F2F2"}}}),mx=styled(Box)(()=>({display:"flex",gap:"4px",maxWidth:"440px",justifyContent:"space-between",height:"18px"}));var Wv=e=>!e.startsWith("http://")&&!e.startsWith("https://"),ia=e=>/^https?:\/\//i.test(e),dx=(e,t)=>{switch(t){case "website":return e;case "physical_store":case "call_center":return null;case "linkedin":case "instagram":case "twitter":case "social_media":return Hv(e,t);case "ios":case "android":case "mobile_app":return Ov(e,t);default:return e}},Hv=(e,t)=>{let o=e.toLowerCase();return t==="linkedin"?o.includes("linkedin.com")||o.includes("linked.com")?e:ia(e)?null:`https://linkedin.com/company/${e}`:t==="instagram"?o.includes("instagram.com")?e:ia(e)?null:`https://instagram.com/${e}`:t==="twitter"?o.includes("twitter.com")||o.includes("x.com")?e:ia(e)?null:`https://x.com/${e}`:null},Ov=(e,t)=>e.toLowerCase().includes("apps.apple.com")&&t==="ios"?e:t==="android"?ia(e)?e:`https://play.google.com/store/apps/details?id=${e}`:null,ux=e=>{!e||typeof e!="string"||window.open(Wv(e)?`https://${e}`:e,"_blank","noopener,noreferrer");};function _v({channels:e,...t}){let o=e?.filter(r=>!!r.address)?.map((r,i)=>{let a=r.address,l=r.code?.replace(/_/g,""),s=i===e?.length-1,p$1=dx(r.address??"",r.code??"");return jsx(p,{title:a,children:jsx(b$7,{order:i,variants:cx(i,0,s),sx:{width:"36px",cursor:p$1?"pointer":"default"},onClick:()=>{r?.address&&ux(p$1);},children:jsx(sx,{src:r.logo,alt:l})})},`${r}-${i}`)}),n=o?.length||0;return jsx(P,{...t,children:jsx(lx,{children:o?.length>0?jsx(px,{layout:true,className:"sales-channels-container",whileHover:"animate",animate:"start",sourcesCount:n||0,variants:{animate:{width:(n||0)*38}},style:{zIndex:29},children:o}):null})})}var zv=_v;function jv({channels:e}){let t=useRef(null),[o,n]=useState(false),[r,i]=useState(null),a=!!r;useEffect(()=>{t.current&&n(t.current.scrollHeight>20);},[e]);let l=useMemo(()=>(e||[]).filter(s=>!!s.address),[e]);return jsxs(mx,{children:[jsx(Sr,{sx:{display:"flex",flexWrap:"wrap",gap:o?"8px":"4px"},ref:t,children:l.map(s=>jsxs(b$1,{copyTrigger:"press",copyText:s.address,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px","& div":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px"}},children:[s.name?.en,": ",s.address]},s.id))}),o&&jsx(Sr,{onClick:s=>{i(s.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(Yv,{open:a,anchorEl:r,sx:{minWidth:r?.clientWidth},onClose:()=>{i(null);},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{maxWidth:"unset",minWidth:r?.clientWidth,marginTop:"22px"}}},children:jsx(Sr,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:l.map(s=>jsxs(b$1,{copyTrigger:"press",copyText:s.address,children:[s.name?.en,": ",s.address]},s.id))})})]})}var Kv=jv;var Vs={active:uf,completed:vf,closed:wf$1,expired:xf,ready:yf$1,registered:vf};var gx=styled("span")(({theme:e})=>({width:"36px",height:"24px",borderRadius:"24px",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,border:`1px solid ${e.palette.divider}`}));function Cx({status:e,...t}){let{t:o}=useTranslation();return jsx(P,{...t,children:e&&Vs[e]&&jsx(p,{title:o(Jv(Ht(e))),children:jsx(gx,{children:jsx(a$f,{mainIcon:Vs[e],mainIconSize:16,containerSize:16,borderColor:"transparent"})})})})}var xx={SAVED_CARD:"Card Agreement",ORDER:"Order",SUBSCRIPTION:"Subscription",INSTALLMENT:"Installment"};function tP({type:e,count:t,sx:o,...n}){let{t:r}=useTranslation(),i=t?.toString();return jsxs(Sr,{sx:{display:"flex",flexDirection:"row",gap:"4px"},children:[jsx(b$1,{copyTrigger:"press",copyText:e,unknownText:r("noPaymentAgreement"),sx:o,...n,children:e&&xx[e]}),i&&jsx(b$1,{copyTrigger:"press",copyText:i,sx:{minWidth:"38px"},...n,children:i})]})}var oP=tP;var yx={CYBERSOURCE:pm,MPGS:qm,NETCETERA:rm,APPLEPAY:sm,TAP3DS:tm,FSS:zm,BENEFIT:vm,QPAY:Hm,POSTPAY:Gm,BENEFITPAY:um,MEEZA:Bm,STC_PAY:Jm,NGENIUS:Cm,KNET:Am,PAYPAL:Fm,FAWRY:ym,TPG:Nm,DEEMA:xm,TPAY:Mm,"CAREEM PAY":wm,TABBY:Km,OMANNET:Em,NPG:Dm,SPG:Im,TAMARA:Lm};var bx=styled(Sr)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"24px",gap:"8px",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper})),Sx=styled("img")(()=>({width:"100%",height:"100%",objectFit:"contain"}));function Tx({provider:e,...t}){let o=yx[e];return o?jsx(bx,{children:jsx(Sx,{src:o,alt:e})}):jsx(P,{...t,children:jsx(z,{children:e})})}var wx={CHARGE:Vk,AUTHORIZE:zk,SAVE_TOKEN:Yg$1},vx={CHARGE:"Charge",AUTHORIZE:"Authorization",SAVE_TOKEN:"Save Token"},Px={CHARGE:{backgroundColor:"#1F88D01A",color:"#1F88D0",border:"none"},AUTHORIZE:{backgroundColor:"#FFFFFF",color:"#1F88D0",border:"#1F88D01A"},SAVE_TOKEN:{backgroundColor:"#1F88D00D",color:"#1F88D0",border:"#1F88D01A"}};var Ax=styled(Sr,{shouldForwardProp:e=>!["purposeType"].includes(e)})(({purposeType:e})=>{let t=Px[e];return {display:"flex",alignItems:"center",justifyContent:"start",gap:"4px",minWidth:"86px",width:"100%",height:"24px",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${t.border}`,backgroundColor:t.backgroundColor,color:t.color,fontSize:"12px",fontWeight:400}}),Ex=styled("img")(()=>({width:"16px",height:"16px",objectFit:"contain",flexShrink:0})),Mx=styled("span")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}));function Rx({purpose:e,...t}){let o=wx[e],n=vx[e];return jsxs(Ax,{purposeType:e,...t,children:[jsx(Ex,{src:o,alt:e}),jsx(Mx,{children:n})]})}var kx=8,lP=16,Lt=kx*2+lP,Bx=100,Vx=6,sP=Lt+Vx+Bx,Fx=styled$1(P)(()=>({position:"relative",overflow:"visible",width:Lt,minWidth:Lt,maxWidth:Lt,display:"inline-flex",padding:0})),Nx=styled$1(Sr)(()=>({position:"relative",width:Lt,height:24,flexShrink:0,overflow:"visible"})),Wx=styled$1(Sr,{shouldForwardProp:e=>e!=="hasLabel"})(({theme:e,hasLabel:t})=>({position:"absolute",top:0,left:0,width:Lt,minWidth:Lt,maxWidth:Lt,height:24,display:"inline-flex",alignItems:"center",gap:Vx,paddingInline:kx,borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper,boxSizing:"border-box",cursor:"pointer",overflow:"hidden",transition:e.transitions.create(["max-width","box-shadow"]),"& img":{flexShrink:0},...t&&{"&:hover":{width:"max-content",maxWidth:sP,zIndex:100,boxShadow:"0px 0px 16px 0px #00000021","& .link-cell-label":{maxWidth:Bx,opacity:1}}}})),Hx=styled$1("span")(({theme:e})=>({display:"inline-block",maxWidth:0,opacity:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,transition:e.transitions.create(["max-width","opacity"],{duration:e.transitions.duration.shorter})}));function cP({url:e,label:t}){let o=n(),n$1=()=>{try{bb(e),o.success("Copied!");}catch{o.error("Failed to copy");}};return e?jsx(Fx,{children:jsx(Nx,{children:jsxs(Wx,{hasLabel:!!t,onClick:n$1,children:[jsx(d,{src:Jl$1,alt:"link"}),t&&jsx(Hx,{className:"link-cell-label",children:t})]})})}):null}var mP=memo(cP);function g9({items:e}){let[t,o]=useState(null),n=!!t,r=useCallback(({quantity:l,currency:s,amount:p,name:m})=>`${l?`Qty ${l}`:""} ${m?`- ${m}`:""} ${s||p?"-":""} ${s||""} ${p||""}`,[]);if(!e||!e.length)return null;let[i,...a]=e;return jsxs(Sr,{sx:{display:"flex",gap:"4px",alignItems:"center"},children:[jsx(b$1,{children:jsx(j,{noWrap:true,sx:{maxWidth:e.length>1?190:220,fontSize:11},children:r(i)})}),e.length>1&&jsx(Sr,{onClick:l=>{o(l.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(Yv,{open:n,anchorEl:t,sx:{minWidth:t?.clientWidth},onClose:()=>{o(null);},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{maxWidth:"unset",minWidth:t?.clientWidth,marginTop:"22px"}}},children:jsx(Sr,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:a?.map(l=>jsx(b$1,{copyTrigger:"press",copyText:r(l),children:r(l)},l.id))})})]})}var Ox="ListHeader";var _x=styled(Box)(({theme:e})=>({backgroundColor:e.palette.background.default,paddingInline:e.spacing(4),paddingBottom:e.spacing(2),paddingTop:e.spacing(2),overflowX:"clip"})),zx=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%",marginBottom:e.spacing(2.25),marginTop:e.spacing(2)})),$x=styled(j)(({theme:e})=>({fontSize:"1.75rem",fontWeight:e.v2.typography.fontWeightMedium,lineHeight:"120%"})),Ux=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%"})),Gx=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1)})),Yx=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"8px",flexShrink:0}));function ca({children:e,component:t="header",...o}){return jsx(_x,{component:t,...o,children:e})}function ma({title:e,toolbar:t}){return jsxs(zx,{children:[jsx("span",{children:!!e&&jsx($x,{children:e})}),t]})}function da({status:e,activeFilter:t,beforeStatus:o}){let n=t?.visible??false;return jsxs(Gx,{as:"aside",children:[o,jsx(a$9,{status:e?.value,availableStatuses:e?.options,onStatusChange:e?.onChange,isActiveFilterVisible:n,buttonSx:e?.buttonSx}),jsx(a$a,{ids:t?.ids,visible:n,label:t?.label,dismissible:t?.dismissible,onDismiss:t?.onDismiss})]})}var jo=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"4px",background:e.palette.common.white,padding:"8px",border:"1px solid",borderColor:e.palette.divider,gap:8,height:32,cursor:"pointer","&:hover":{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),ua=styled(Box)(({theme:e})=>({background:e.palette.common.white,display:"flex",gap:e.spacing(1),alignItems:"center",color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,textTransform:"capitalize",position:"relative",transition:"0.5s",paddingRight:0,marginRight:0,"&:after":{content:'""',position:"absolute",left:-8,right:0,width:"100%",height:"100%",boxShadow:e.shadows[11],borderRadius:e.spacing(.5),paddingInlineStart:e.spacing(1),paddingTop:"9px",paddingBottom:"9px",paddingInlineEnd:"9px",zIndex:-1},"& > *:last-child":{marginRight:0,paddingRight:"6px"}})),Ko=styled(Box)(({theme:e})=>({background:e.palette.common.white,borderRadius:e.spacing(1),boxShadow:e.shadows[5],border:"1px solid",borderColor:e.palette.divider,zIndex:5,fontSize:"11px",width:192})),qo=styled(Box)(()=>({minWidth:160,position:"relative",marginRight:0,paddingRight:0})),Xo=styled(Box,{shouldForwardProp:e=>e!=="addColumnViewEl"})(({theme:e})=>({padding:e.spacing(1),paddingInlineEnd:2,borderBottom:"1px solid",borderColor:e.palette.divider,display:"flex",alignItems:"center",height:32,cursor:"pointer",img:{height:12},".check-icon":{height:"auto",marginInlineEnd:e.spacing(1)},"&:hover":{color:e.palette.info.dark,fontWeight:e.typography.fontWeightBold},"&.add-column":{justifyContent:"space-between",paddingInlineEnd:e.spacing(1),position:"relative",border:"none",zIndex:5,borderBottom:"1px solid",borderColor:e.palette.divider,borderTopRightRadius:e.spacing(1),borderTopLeftRadius:e.spacing(1),"&:hover":{boxShadow:e.shadows[6]}}})),Zo=styled(Box)(()=>({width:15})),or=styled(Box)(()=>({width:16})),Xx=styled(Box)(({theme:e})=>({display:"flex",flexDirection:"column",height:"calc(100% - 32px)",backgroundColor:e.palette.background.paper,position:"relative"})),Zx=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:16,paddingRight:16,paddingBottom:64})),Jx=styled(Box)(()=>({padding:"24px 0",display:"flex",justifyContent:"space-between",alignItems:"center"})),Qx=styled(Box)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:0})),eh=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[50],cursor:"pointer","&:hover":{backgroundColor:e.palette.grey[100]}})),th=styled(Box,{shouldForwardProp:e=>e!=="isHovered"&&e!=="isDate"})(({theme:e,isHovered:t,isDate:o})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:t?e.palette.action.hover:e.palette.background.paper,cursor:o?"default":"grab","&:hover":{backgroundColor:o?e.palette.background.paper:e.palette.action.hover},"&:last-child":{borderBottom:"none"}})),Ws=styled(Box)(()=>({width:20,height:20,marginRight:8,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),Hs=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0})),oh=styled(Box)(({theme:e})=>({position:"absolute",bottom:0,left:0,right:0,height:35,borderTop:"1px solid",borderColor:e.palette.divider,background:"#F6F8FACC",backdropFilter:"blur(24px)"})),nh=styled(Box)(({theme:e})=>({position:"absolute",bottom:12,right:16,padding:6,backgroundColor:e.palette.background.paper,border:"1px solid #9F9F9F29",borderRadius:"4px"})),fa=styled(Paper)(()=>({paddingTop:4,paddingBottom:4,minWidth:180,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",borderRadius:"8px"}));styled(Box)(()=>({display:"flex",alignItems:"center",padding:"8px 12px",cursor:"pointer"}));var rh=styled(Button)(({theme:e})=>({color:e.palette.error.main,textTransform:"none",fontSize:10,fontWeight:500,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,paddingLeft:8,paddingRight:8,paddingTop:4,paddingBottom:4,"&:hover":{backgroundColor:"transparent"}})),ih=styled(Button)(({theme:e})=>({fontSize:9,fontWeight:600,borderRadius:4,paddingLeft:20,paddingRight:20,paddingTop:8,paddingBottom:8,height:28,textTransform:"none",backgroundColor:e.palette.info.dark,"&:hover":{backgroundColor:e.palette.info.dark},"&.Mui-disabled":{backgroundColor:e.palette.grey[300],color:e.palette.grey[500]}}));styled(TextField)(({theme:e})=>({"& .MuiFilledInput-root":{borderRadius:"8px",backgroundColor:e.palette.background.paper,border:"1px solid",borderColor:e.palette.divider,"&:hover":{backgroundColor:e.palette.background.paper},"&.Mui-focused":{backgroundColor:e.palette.background.paper},"&::before, &::after":{display:"none"}}}));var Os={display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0,"& .MuiSvgIcon-root":{width:16,height:16},"& img":{width:14,height:14}},ah=styled(motion.div)(({theme:e})=>({position:"fixed",display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 46px)",backgroundColor:e.palette.background.paper,boxShadow:"0px 8px 32px rgba(0, 0, 0, 0.15)",borderRadius:12,overflow:"hidden",boxSizing:"border-box"})),lh=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover}})),sh={p:0,width:14,height:14,minWidth:14,minHeight:14,"& .MuiSvgIcon-root":{width:16,height:16}},ph=styled(Box)(()=>({minWidth:200,display:"flex",flexDirection:"column",maxHeight:"80vh",overflow:"hidden"})),ch=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:6,paddingRight:6,minHeight:0})),mh=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",gap:12,paddingTop:8,paddingBottom:8,paddingLeft:12,paddingRight:12,flexShrink:0,borderTop:"1px solid",borderColor:e.palette.divider})),dh={fontSize:11,fontWeight:400,textTransform:"none",color:"text.primary",minWidth:80,height:38,borderRadius:"8px",border:"1px solid",borderColor:"divider"},uh=e=>({fontSize:11,fontWeight:500,textTransform:"none",backgroundColor:"info.dark",minWidth:80,height:38,borderRadius:"8px",boxShadow:"none","&:hover":{backgroundColor:e.palette.info.dark}});function zs(e,t){let[o,n]=useState(null),[r,i]=useState(null),a=useCallback(()=>{n(null),i(null);},[]),l=useCallback((p,m)=>{n(p.currentTarget),i(m);},[]),s=useCallback(()=>{r&&a();},[r,a]);return useEffect(()=>{e||(a(),t?.());},[e,t,a]),{subMenuAnchorEl:o,openSubMenuName:r,handleSubMenuClose:a,handleSubMenuOpen:l,handleMenuScroll:s}}function PP(e){let t=e;for(;t&&t!==document.body;){let n=window.getComputedStyle(t).overflowY;if((n==="auto"||n==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement;}return document.documentElement}function $s(e){let t=useRef(false),o=useRef(null),n=useRef({x:0,y:0}),r=useRef(1),i=useRef(null),a=useRef(0),l=useRef(false),s=useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null);},[]),p=useCallback((f,x)=>{l.current=true,window.dispatchEvent(new PointerEvent("pointermove",{bubbles:true,cancelable:true,pointerId:r.current,clientX:f,clientY:x+a.current,pointerType:"mouse",isPrimary:true})),l.current=false;},[]),m=useCallback(()=>{if(o.current!==null)return;let f=()=>{let x=i.current;if(!t.current||!x)return;let y=x.getBoundingClientRect(),{x:S,y:g}=n.current,h=g-y.top,b=y.bottom-g;if(h>0&&h<60){let I=(60-h)/60*15;x.scrollTop-=I,a.current-=I,p(S,g);}else if(b>0&&b<60){let I=(60-b)/60*15;x.scrollTop+=I,a.current+=I,p(S,g);}o.current=requestAnimationFrame(f);};o.current=requestAnimationFrame(f);},[p]),c=useCallback(f=>{l.current||(n.current={x:f.clientX,y:f.clientY},r.current=f.pointerId,t.current&&a.current!==0&&(f.stopImmediatePropagation(),p(f.clientX,f.clientY)));},[p]),d=useCallback(()=>{i.current=PP(e.current),a.current=0,t.current=true,window.addEventListener("pointermove",c,{capture:true}),m();},[e,c,m]),u=useCallback(()=>{t.current=false,a.current=0,s(),window.removeEventListener("pointermove",c,{capture:true});},[c,s]);return useEffect(()=>()=>{t.current=false,s(),window.removeEventListener("pointermove",c,{capture:true});},[c,s]),{onDragStart:d,onDragEnd:u}}function Gs({columns:e,setTableViews:t}){let o=useCallback(i=>{let a=i.map(l=>e.find(s=>s.name===l)).filter(l=>!!l);t?.(a);},[e,t]),n=useCallback(i=>{let a=e.map(l=>{if(l.name!==i)return l;let s=l.menuItems&&l.menuItems.length>0,p=!l.selected;if(!s)return {...l,selected:p};let m=l.menuItems?.map(c=>({...c,selected:p}));return {...l,selected:p,menuItems:m}});t?.(a);},[e,t]),r=useCallback((i,a)=>{let l=e.map(s=>{if(s.name!==i)return s;let p=s.menuItems?.map(c=>c.name===a?{...c,selected:!c.selected}:c),m=p?.some(c=>c.selected)??false;return {...s,menuItems:p,selected:m}});t?.(l);},[e,t]);return {reorderColumns:o,toggleColumnSelection:n,toggleSubmenuItem:r}}function js({column:e,index:t,openSubMenuName:o,toggleColumnSelection:n,handleSubMenuOpen:r,handleSubMenuClose:i}){let a=e.menuItems&&e.menuItems.length>0,l=o===e.name,s=t===0,p=useMemo(()=>!!(e.selected&&e.menuItems?.some(u=>u.selected)&&!e.menuItems?.every(u=>u.selected)),[e.selected,e.menuItems]),m=useCallback(()=>{n(e.name);},[n,e.name]),c=useCallback(u=>{a&&r(u,e.name);},[a,r,e.name]),d=useCallback(()=>{a||i();},[a,i]);return {isIndeterminate:p,hasSubmenuItems:a,isSubmenuOpen:l,isFirstItem:s,handleColumnClick:m,handleMouseEnter:c,handleMouseLeave:d}}var O=(e="")=>e.toLowerCase()==="date",Fe=(e="")=>e.toLowerCase()==="index",ga=(e,t="en")=>{let o=[];return e.forEach(n=>{n.columns.forEach(r=>{let i=r.name.find(l=>l.lang===t)?.text||r.name[0]?.text||r.code,a=r.fields?.length?r.fields.map(l=>({name:l.code,label:l.name?.find(s=>s.lang===t||s.lang==="")?.text||l.code,selected:l.default??false})):void 0;o.push({name:r.code,label:i,selected:O(r.code)?true:r.default??false,menuItems:a?.length?a:void 0});});}),o},EP=(e,t)=>{if(!t?.length)return [];let o=e==="sheet"?"sheet":"advanced",n=t.find(r=>r.code.toLowerCase()===o);return n?ga([n]):[]},Ks=(e,t,o="en")=>{let n=e.map((i,a)=>{let l=i.menuItems?.map(p=>({code:p.name,name:[{text:typeof p.label=="string"?p.label:p.name,lang:o||""}],default:p.selected??false})),s=typeof i.label=="string"?i.label:i.name;return {code:i.name,name:[{text:s,lang:o}],order:a+1,default:i.selected??false,...l?.length?{fields:l}:{}}});return {code:t==="sheet"?"Sheet":"Advanced",columns:n}},MP=e=>{let t=new Map;return e.forEach(o=>{o.layout.forEach(n=>{let r=t.get(n.code);if(r){let i=new Set(r.columns.map(a=>a.code));n.columns.forEach(a=>{i.has(a.code)||r.columns.push(a);});}else t.set(n.code,{...n,columns:[...n.columns]});});}),Array.from(t.values())};var DP=(e,t,o=false)=>({label:e,id:`custom_${Date.now()}`,columns:t.map(n=>n.name),submenu:t,isCustom:true,default:o}),RP=(e,t)=>e.map(o=>({...o,default:o.id===t})),Ca=e=>e.role??(e.default?"default":void 0),oo=e=>!!e.role||!!e.default,Ne=e=>!oo(e),gh=e=>Ne(e),rr=e=>e.filter(gh).length,qs=e=>e.filter(Ne).length,xa=(e,t="sheet",o="en")=>{let n=[],r=[],i;e.forEach(l=>{let s=t==="sheet"?"sheet":"advanced",p=l.layout.find(w=>w.code.toLowerCase()===s),m=p?ga([p],o):[],c=l.id,d=vb$1,u=wb$2,f=m.some(w=>O(w.name))?m:[u,...m],x=f.findIndex(w=>O(w.name)),S=(x>0?[f[x],...f.filter(w=>!O(w.name))]:f).filter(w=>!Fe(w.name)),g=[d,...S],h=Ca(l),b=oo(l),I={id:c,label:l.name,role:h,isCustom:!b,selected:l.selected,default:!!l.default,columns:g.map(w=>w.name),submenu:g};b?(l.default&&!i&&(i=g),r.push(I)):n.push(I);});let a=r.find(l=>l.default)??r[0];return {customViews:n,defaultTemplates:r,defaultTemplateColumns:i,defaultTemplate:a}},Xs=(e,t="sheet",o="en")=>{let{customViews:n,defaultTemplates:r,defaultTemplate:i}=xa(e,t,o),a=[...r,...n];return {customViews:n,defaultTemplates:r,defaultTemplate:i,allTemplates:a}},ha=(e,t)=>{let o=[];Ne(e)?o=e.submenu??[]:o=e.submenu?.length?e.submenu:t;let n=vb$1;if(!o.some(c=>O(c.name)))return [n,wb$2,...o];let i=o.findIndex(c=>O(c.name)),a=i>=0?o[i]:wb$2,l=o.filter(c=>!O(c.name)&&!Fe(c.name)),s=[a,...l],p=s.some(c=>Fe(c.name)),m=s.findIndex(c=>Fe(c.name));if(p&&m>0){let c=s[m],d=s.filter(u=>!Fe(u.name));return [c,...d]}return p&&m===0?s:[n,...s]},LP=(e,t)=>ha(e,t).length>0,Qo=e=>e.filter(t=>!Fe(t.name));var Pe=e=>e.toLowerCase(),Ch=e=>new Map(e.filter(t=>!O(t.name)).map(t=>[Pe(t.name),t])),xh=(e,t)=>e.some(o=>Pe(o)===Pe(t)),Zs=(e,t)=>({...e,selected:t.selected??false,menuItems:e.menuItems?.map(o=>{let n=t.menuItems?.find(r=>Pe(r.name)===Pe(o.name));return {...o,selected:n?.selected??false}})}),ir=e=>{if(!e.menuItems?.length)return {checked:e.selected??false,indeterminate:false};let t=e.menuItems.filter(o=>o.selected).length;return {checked:t>0,indeterminate:t>0&&t<e.menuItems.length}},Qs=(e,t)=>e.map(o=>{if(o.name!==t)return o;let n=!o.selected,r=o.menuItems?.map(i=>({...i,selected:n}));return {...o,selected:n,menuItems:r}}),ar=(e,t,o)=>e.map(n=>{if(n.name!==t)return n;let r=n.menuItems?.map(a=>a.name===o?{...a,selected:!a.selected}:a),i=r?.some(a=>a.selected)??false;return {...n,menuItems:r,selected:i}}),ep=(e,t)=>e.map(o=>{if(O(o.name))return o;let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),tp=e=>{let t=e.filter(o=>!O(o.name));return t.length===0?false:t.every(o=>o.menuItems?.length?o.menuItems.every(n=>n.selected):o.selected)},op=(e,t)=>e.filter(r=>!O(r.name)).some(r=>r.menuItems?.length?r.menuItems.some(i=>i.selected):r.selected)&&!t,np=(e,t)=>e.trim().length>0&&e.length<=t,pe=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),rp=(e,t)=>e.map(o=>{if(o.name!==t)return o;if(O(o.name))return {...o,selected:true};let n=!o.selected,r=o.menuItems?.map(i=>({...i,selected:n}));return {...o,selected:n,menuItems:r}}),ip=(e,t)=>e.map(o=>{if(O(o.name))return {...o,selected:true};let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),ap=e=>e.length===0?false:e.every(t=>t.menuItems?.length?t.menuItems.every(o=>o.selected):t.selected),lp=(e,t)=>e.length===0?false:e.some(n=>n.menuItems?.length?n.menuItems.some(r=>r.selected):n.selected)&&!t,Js=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),lr=(e,t)=>{if(e.length!==t.length)return false;let o=Js(e),n=Js(t);for(let r=0;r<o.length;r++){let i=o[r],a=n[r];if(i.name!==a.name||i.selected!==a.selected)return false;if(i.menuItems&&a.menuItems){if(i.menuItems.length!==a.menuItems.length)return false;for(let l=0;l<i.menuItems.length;l++)if(i.menuItems[l].name!==a.menuItems[l].name||i.menuItems[l].selected!==a.menuItems[l].selected)return false}else if(i.menuItems||a.menuItems)return false}return true},kP=e=>e.filter(t=>!O(t.name)).map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),sp=(e,t)=>{let o=e.filter(i=>!O(i.name)).map(i=>i.name),n=Ch(t),r=[];for(let i of o){let a=e.find(s=>Pe(s.name)===Pe(i)),l=n.get(Pe(i));l?r.push(a?Zs(l,a):{...l,selected:false,menuItems:l.menuItems?.map(s=>({...s,selected:false}))}):a&&r.push(a);}for(let[,i]of n)if(!xh(o,i.name)){let a=e.find(l=>Pe(l.name)===Pe(i.name));r.push(a?Zs(i,a):{...i,selected:false,menuItems:i.menuItems?.map(l=>({...l,selected:false}))});}return r},pp=e=>e.filter(t=>!O(t.name)).map(t=>({...t,selected:false,menuItems:t.menuItems?.map(o=>({...o,selected:false}))})),cp=(e,t)=>{let o=Ch(e),n=t.filter(i=>!O(i.name)).map(i=>i.name),r=[];for(let i of n){let a=t.find(s=>Pe(s.name)===Pe(i)),l=o.get(Pe(i));l&&a?r.push(Zs(l,a)):l&&r.push({...l,selected:false,menuItems:l.menuItems?.map(s=>({...s,selected:false}))});}for(let[,i]of o)xh(n,i.name)||r.push({...i,selected:false,menuItems:i.menuItems?.map(a=>({...a,selected:false}))});return r};function hh(e,t,o="en"){if(!e?.layout?.length)return [];let n=Wa(t)?"sheet":"advanced",r=e.layout.find(l=>l.code?.toLowerCase()===n);if(!r?.columns?.length)return [];let i=r.columns.map(l=>{let s=l.name?.find(m=>m.lang===o)?.text||l.name?.[0]?.text||l.code,p=l.fields?.length?l.fields.map(m=>({name:m.code,label:m.name?.find(c=>c.lang===o||c.lang==="")?.text||m.code,selected:m.default??false})):void 0;return {name:l.code,label:s,selected:O(l.code)?true:l.default??false,...p&&p.length>0&&{menuItems:p}}});return i.some(l=>O(l.name))?i:[{name:wb$2.name,label:wb$2.label,selected:true},...i]}var ya=e=>{let t=e?.order;if(t==null)return 999;let o=Number(t);return Number.isFinite(o)?o:999};function Ia(e){return {...e,layout:e.layout?.map(t=>({...t,columns:[...t.columns??[]]}))??[]}}function BP(e,t){let o=e.layout?.map(r=>({...r,columns:[...r.columns??[]].sort((i,a)=>ya(i)-ya(a))})),n=hh(e,t);return {id:e.id,label:e.name,layout:o,submenu:n,columns:n.map(r=>r.name),role:Ca(e),isCustom:Ne(e),default:e.default}}var ba=(e,t)=>{if(!e)return [];let o=e;if(e.layout&&Array.isArray(e.layout)&&e.layout.length>0){let n=Va(t)?"Advanced":"Sheet",r=e.layout.find(i=>{let a=i.code?.trim();return a===n||a?.toLowerCase()===n.toLowerCase()})||e.layout.find(i=>{let a=i.code?.trim()?.toLowerCase();return Va(t)?a==="default"||a==="advanced":a==="sheet"||a==="sheets"});if(r&&r.columns&&r.columns.length>0)return r.columns.map(a=>{let s=!!a.fields?.length&&a.fields.some(m=>m.default??false),p=(a.default??false)||s;return {code:a.code,name:a.name&&a.name.length>0?a.name:[{text:a.code,lang:"en"}],selected:p,sort_order:ya(a),fields:a.fields?.map(m=>({code:m.code.toLowerCase(),type:"single",parameters:[{parameter:m.code.toLowerCase(),code:m.code.toLowerCase(),selected:m.default??false}]}))||[{code:a.code.toLowerCase(),type:"single",parameters:[{parameter:a.code.toLowerCase(),code:a.code.toLowerCase(),selected:a.default??false}]}]}}).sort((a,l)=>(a.sort_order??999)-(l.sort_order??999))}return o.submenu&&Array.isArray(o.submenu)&&o.submenu.length>0?o.submenu.map((r,i)=>{let a=r.name.toLowerCase(),l;r.menuItems&&r.menuItems.length>0?l=r.menuItems.filter(c=>c.selected):l=[{name:a,label:r.label||r.name,selected:true}];let s=l.length>0?l.map(c=>({parameter:c.name.toLowerCase(),code:c.name.toLowerCase()})):[{parameter:a,code:a}],p=l.length>1?"combined":"single";return {code:r.name,name:[{text:r.label||r.name,lang:"en"}],selected:r.selected,sort_order:i+1,fields:[{code:a,type:p,parameters:s}]}}):[]},VP=(e,t)=>{if(!e||!Array.isArray(e)||e.length===0)return [];let o=e?.find(n=>n.default)||e[0];return o?ba(o,t):[]};function mp(e,t,o){let n=e.findIndex(t);if(n===-1)return e;let r=[...e];return r[n]=o,r}function dp(e,t){let o=t?.name??e?.name??"",n=t?.layout,r=Array.isArray(n)?n[0]:n??null,a=[...e?.layout??[]];if(r){let l=r.code?.toLowerCase(),s=a.findIndex(p=>p.code?.toLowerCase()===l);s>=0?a[s]=r:a.push(r);}return {name:o,layout:a}}var up=e=>{let t=e;return t?!!(t.closest('[role="checkbox"]')||t.closest('input[type="checkbox"]')||t.closest('[class*="CheckboxWrapper"]')):false};var yh=e=>[...yb[e]??yb.default],FP=e=>zb$1[e]??zb$1.default,NP=(e,t)=>({code:e,name:[{text:xb$2[e],lang:"en"}],selected:true,sort_order:t}),WP=(e,t)=>e?.layout?.some(o=>yh(t).includes(o.code?.toLowerCase()??""))??false,fp=(e,t,o)=>{let n=zb$1[t],r=o?.layout?.find(a=>a.code?.toLowerCase()===n.toLowerCase()),i=r?{...r,columns:r.columns?.map(a=>({...a,name:a.name?.map(l=>({...l})),fields:a.fields?.map(l=>({...l,name:l.name?.map(s=>({...s}))}))}))??[]}:{code:n,columns:[]};return [e,i]};var Sa=({tableMode:e,templates:t,lang:o="en",mainDefaultTemplate:n})=>useMemo(()=>{let{customViews:r,defaultTemplates:i,defaultTemplate:a,allTemplates:l}=Xs(t,e,o),p=(n?xa([n],e,o).defaultTemplate:void 0)??a,m=p?.submenu?structuredClone(p.submenu):[],c=rr(t);return {customViews:r,defaultTemplates:i,defaultTemplate:a,allTemplates:l,defaultColumns:m,customTemplateCount:c}},[t,e,o,n]);var Ta=({mode:e,onViewChange:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:i,defaultTemplate:a,allTemplates:l,customTemplateCount:s})=>{let[p,m]=useState(null),[c,d]=useState(false),[u,f]=useState(null),[x,y]=useState(false),[S,g]=useState(null),[h,b]=useState(null),[I,w]=useState(),[T,v]=useState(l.find(L=>L.selected)?.id??a?.id),A=useRef(l.find(L=>L.selected)?.id??a?.id),M=useCallback(L=>{let W=L.submenu?.filter(ee=>ee.selected)||[];return {...L,submenu:W,columns:W.map(ee=>ee.name)}},[]),E=useCallback(L=>{A.current=L?.id,t?.(L?M(L):void 0);},[t,M]),R=useMemo(()=>T?l.find(L=>L.id===T):a,[l,T,a]),H=useMemo(()=>pe(R?.submenu||i),[R,i]),_=useMemo(()=>({id:T||a?.id||"default",label:R?.label||a?.label||"Default"}),[R,T,a?.id,a?.label]);useEffect(()=>{let L=l.find(Se=>Se.selected)?.id,W=a?.id,ee=T?l.some(Se=>Se.id===T):false;if(!(T&&!ee&&L!==T)){if(L&&L!==T){v(L);return}if(!T){v(L??W);return}ee||v(L??W);}},[l,a?.id,T]),useEffect(()=>{!T||!R||R.id===T&&A.current!==T&&(A.current=T,t?.(M(R)));},[T,R,t,M]);let Q=useCallback(L=>{m(W=>W?null:L.currentTarget);},[]),he=useCallback(()=>{m(null);},[]),Le=useCallback((L,W)=>{v(W?.id),E(W),he();},[he,E]),be=useCallback((L=false,W,ee,Se)=>{s!=null&&s>=3||(f(null),y(L),g(W??null),b(ee?.length?ee:null),w(Se),d(true),m(null));},[s]),$=useCallback(L=>{let W=l.find(ee=>ee.id===L.id)??L;f(W),y(true),g(null),b(W.submenu?.length?pe(W.submenu):null),d(true);},[l]),et=useCallback(()=>{d(false),f(null),y(false),g(null),b(null),w(void 0);},[]);useEffect(()=>{if(!c||!u?.id)return;let L=l.find(W=>W.id===u.id);L&&(f(L),b(L.submenu?.length?pe(L.submenu):null));},[c,u?.id,l]);let ml=useCallback(async L=>{if(u){let W=u.id;await n?.(W,L),v(W);let ee=l.find(Se=>Se.id===W)??u;E(ee),he();}else {let W=await o?.({...L,sourceTemplateId:I});if(W?.id){v(W.id);let ee=l.find(Se=>Se.id===W.id);E(ee??{id:W.id,label:W.name,isCustom:true,columns:L.selectedColumns.map(Se=>Se.name),submenu:L.selectedColumns});}}},[u,n,o,he,l,E,I]),dl=useCallback(async L=>{let W=l.find(ee=>ee.id===L);await r?.(W?.id??L),T===(W?.id??L)&&v(a?.id);},[l,r,T,a]);return {anchorEl:p,isCreateDialogOpen:c,editingView:u,selectedViewInfo:_,shouldUseCurrentState:x,selectedView:R,currentViewColumns:H,initialColumnsForCreate:S,availableColumnsForCreate:h,handleViewButtonClick:Q,handleCloseViewDropdown:he,handleSelectedViewInfo:Le,handleOpenCreateDialog:be,handleOpenEditDialog:$,handleCloseCreateDialog:et,handleSaveView:ml,handleDeleteView:dl}};var en=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),i=useCallback((p,m)=>{r.current&&(clearTimeout(r.current),r.current=null),t(p),n(m);},[]),a=useCallback(()=>{r.current=setTimeout(()=>{t(null),n(null);},0);},[]),l=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]),s=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),t(null),n(null);},[]);return {hoveredColumn:e,anchorEl:o,openSubmenu:i,closeSubmenu:a,cancelClose:l,forceClose:s}};var Sh=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),i=useCallback((s,p)=>{t(s),n(p);},[]),a=useCallback(()=>{t(null),n(null);},[]),l=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]);return {hoveredNestedColumn:e,nestedSubmenuAnchorEl:o,openNestedSubmenu:i,closeNestedSubmenu:a,cancelNestedClose:l}};var yp=({open:e,availableColumns:t,defaultColumns:o,editingView:n,tableViews:r=[]})=>{let[i,a]=useState(()=>n?.label||""),[l,s]=useState([]),p=useRef(false),m=useRef([]),c=useRef(n?.label?.trim()||""),{hoveredColumn:d,anchorEl:u,openSubmenu:f,closeSubmenu:x,cancelClose:y}=en(),S=vb$1,g=wb$2;useEffect(()=>{if(!e){p.current=false;return}if(!p.current&&e)if(n){let _=n.submenu&&n.submenu.length>0?n.submenu:o,Q=t.length>0?t:_,Le=sp(_,Q).filter(et=>!Fe(et.name)&&!O(et.name)),be=[S,g,...Le];s(be),m.current=pe(be);let $=n.label?.trim()||"";c.current=$,a($);}else {let _=t.length>0?t:r,he=(r&&r.length>0?cp(_,r):pp(_)).filter(be=>!Fe(be.name)&&!O(be.name)),Le=[S,g,...he];s(Le),m.current=pe(Le),c.current="",a("");}else if(e&&n){let _=n.label?.trim()||"";a(_);}p.current=e;},[e,n?.id,n?.label,n?.submenu,t,o,r,S,g]);let h=useMemo(()=>l.map(H=>H.name),[l]),b=useMemo(()=>tp(l),[l]),I=useMemo(()=>op(l,b),[l,b]),w=useMemo(()=>np(i,20),[i]),T=useMemo(()=>{let H=i.trim()!==c.current,_=m.current.length>0&&!lr(l,m.current);return H||_},[i,l]);return {templateName:i,setTemplateName:a,selectedColumns:l,columnNames:h,allSelected:b,someSelected:I,isNameValid:w,hasChanges:T,hoveredColumn:d,anchorEl:u,openSubmenu:f,closeSubmenu:x,cancelClose:y,handleReorder:H=>{let _=H.filter(Q=>!O(Q)).flatMap(Q=>l.find(he=>he.name===Q)??[]);s([S,g,..._]);},handleColumnToggle:H=>{s(_=>Qs(_,H));},handleSubItemToggle:(H,_)=>{s(Q=>ar(Q,H,_));},handleSelectAll:()=>{s(H=>ep(H,!b));},handleResetToDefault:()=>{m.current.length>0&&s(pe(m.current));}}};function bp({templates:e,setTemplates:t,createTemplate:o,updateTemplate:n,deleteTemplate:r,tableMode:i,isTemplatesLoading:a,lang:l="en",mainDefaultTemplate:s}){let p=useMemo(()=>s??e.find(g=>g.default),[e,s]),m=e.find(g=>g.selected)?.id??p?.id,c=useCallback(g=>{t(h=>h.find(I=>I.selected)?.id===g?h:h.map(I=>({...I,selected:g?I.id===g:false})));},[t]),d=useCallback(async({name:g,layout:h,sourceTemplateId:b})=>{if(rr(e)>=3)return;let I=e.find(A=>A.id===b)??e.find(A=>A.id===m)??p,w=fp(h,i,I),T=await o({name:g,layout:w}),v=Ia(T);return t(A=>[...A.filter(E=>E.id!==v.id).map(E=>({...E,selected:false})),{...v,selected:true}]),{id:T.id,name:T.name??""}},[o,t,i,p,e,m]),u=useCallback(async g=>{await r(g),t(h=>h.filter(b=>b.id!==g)),c(m===g?p?.id:m);},[r,t,p,c]),f=useCallback(async(g,h)=>{let b=e.find(A=>A.id===g),{name:I,layout:w}=dp(b,h),T=await n(g,{name:I,layout:w}),v=Ia(T);t(A=>mp(A,M=>M.id===g,v)),c(v.id);},[e,n,t,c]),x=useMemo(()=>({templates:e,onCreateCustomView:d,onEditCustomView:f,onDeleteCustomView:u,isLoading:a,mainDefaultTemplate:s}),[e,d,f,u,a,s]),y=useCallback(g=>{if(!p){c(void 0);return}if(!g?.id){c(p.id);return}if(oo(g)){c(g.id);return}let h=e.find(b=>b.id===g.id);if(h){c(h.id);return}Ne(g)&&c(g.id);},[e,p,c]),S=useMemo(()=>{let g=e.find(b=>m?b.id===m:false)??p;if(!g)return [];let h=ba(g,i);return h.length>0?h:[]},[i,e,m,p]);return {customViews:x,onViewChange:y,columnsView:S,selectedViewId:m}}function jP({column:e,index:t,openSubMenuName:o,subMenuAnchorEl:n,toggleColumnSelection:r,toggleSubmenuItem:i,handleSubMenuOpen:a,handleSubMenuClose:l}){let{t:s}=useTranslation(),p=useTheme(),{isIndeterminate:m,hasSubmenuItems:c,isSubmenuOpen:d,isFirstItem:u,handleColumnClick:f,handleMouseEnter:x,handleMouseLeave:y}=js({column:e,index:t,openSubMenuName:o,toggleColumnSelection:r,handleSubMenuOpen:a,handleSubMenuClose:l}),S=g=>g?s(g)??Yg(g):"";return jsxs(Sr,{sx:{borderTop:`1px solid ${p.palette.divider}`,...u&&{borderTop:"none",height:33}},children:[jsxs(V,{isIndeterminate:m,isSelected:e.selected,onMouseEnter:x,onMouseLeave:y,onClick:f,children:[jsx(Sr,{sx:{flex:1},children:S(e.label)}),c&&jsx("img",{src:vb,className:"arrow-icon",alt:"arrow"})]}),c&&jsx(R,{open:d,anchorEl:n,placement:"right-start",onMouseEnter:()=>{},onMouseLeave:l,children:e.menuItems?.map(g=>jsx(V,{isSelected:e.selected&&g.selected,onClick:()=>i(e.name,g.name),children:S(g.label)},g.name))})]},e.name)}var Ph=jP;function ZP({open:e,onSelect:t,setTableViews:o,tableViews:n,anchorEl:r,onClose:i}){let{t:a}=useTranslation(),l=useMemo(()=>n||[],[n]),s=useMemo(()=>l.map(S=>S.name),[l]),{reorderColumns:p,toggleColumnSelection:m,toggleSubmenuItem:c}=Gs({columns:l,setTableViews:o}),{subMenuAnchorEl:d,openSubMenuName:u,handleSubMenuClose:f,handleSubMenuOpen:x,handleMenuScroll:y}=zs(e,i);return jsxs(qo,{"data-testid":"TableView_CustomViews",children:[jsxs(jo,{"data-testid":"TableView_CustomViews_Button",onClick:t,children:[jsx("div",{children:a("columns")}),jsx("img",{src:Cb$1,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsxs(R,{open:e,anchorEl:r,"data-testid":"TableView_CustomViews_Popper",sx:{padding:0,marginTop:"8px",borderRadius:1},children:[e&&jsx(a$3,{onClick:i}),jsx(Ko,{component:"article","data-testid":"TableView_CustomViews_List",children:jsx(Reorder.Group,{as:"div",axis:"y",onReorder:p,values:s,onScroll:y,children:l.map((S,g)=>jsx(Ph,{column:S,index:g,openSubMenuName:u,subMenuAnchorEl:d,toggleColumnSelection:m,toggleSubmenuItem:c,handleSubMenuOpen:x,handleSubMenuClose:f},S.name))})})]})]})}var Tp=memo(ZP);function t1({open:e,selectedViewInfo:t,setSelectedViewInfo:o,onSelect:n,onTableViewOptionClick:r,anchorEl:i}){let{t:a}=useTranslation();return jsxs(qo,{"data-testid":"TableView_DefaultViews",children:[jsxs(jo,{onClick:l=>{n(l);},children:[jsx("div",{children:t.label}),jsx("img",{src:Cb$1,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsx(QP,{open:e,anchorEl:i,placement:"bottom-start",children:jsxs(Ko,{children:[Cb$2.map(l=>jsxs(Xo,{onClick:()=>{o(l),r?.(l);},children:[l.id===t.id?jsx("img",{className:"check-icon",src:Db,alt:"arrow"}):jsx(Zo,{}),jsx("span",{children:l.label}),jsx(or,{})]},l.id)),jsxs(Xo,{sx:{border:"none"},onClick:l=>{l.stopPropagation(),o(Bb),r?.(Bb);},children:[t.id===Bb.id?jsx("img",{className:"check-icon",src:Db,alt:"arrow"}):jsx(Zo,{}),jsx("span",{children:a("createCustomView")}),jsx(or,{})]})]})})]})}var wp=Ap.memo(t1);function i1({onViewChange:e,setIsViewVisible:t,setTableViews:o,tableViews:n,resetTableViews:r,onTableViewOptionClick:i}){let[a,l]=useState(null),[s,p$1]=useState(null),[m,c]=useState(null),[d$1,u]=useState(Ab$1),{t:f}=useTranslation(),x=h=>{e?.(),l(h.currentTarget),t(true);},y=()=>{p$1(null),c(null);},S=()=>{l(null),t(false),u(Ab$1);},g=h=>{u(h),h.id!==Bb.id&&r?.(h),y();};return a?jsx(r1,{onClickAway:y,children:jsxs(ua,{"data-testid":"TableView",children:[d$1.id===Bb.id&&jsx(Tp,{tableViews:n,setTableViews:o,anchorEl:m,open:!!m,onSelect:h=>{c(m?null:h.currentTarget),p$1(null);},onClose:()=>{c(null);}}),jsx(wp,{open:!!s,anchorEl:s,setSelectedViewInfo:h=>{g(h);},selectedViewInfo:d$1,onSelect:h=>{p$1(s?null:h.currentTarget),c(null);},onTableViewOptionClick:i}),jsx(jo,{sx:{width:32,justifyContent:"center"},onClick:S,children:jsx("img",{src:Eb,alt:"close"})})]})}):jsx(p,{title:f("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"TableView_no_anchorViewEl",onClick:x,"aria-label":f("tableView")})})}var vp=memo(i1);var Eh=({columns:e,allCurrentSelected:t,someCurrentSelected:o,onSelectAll:n,onReset:r,onColumnToggle:i,onNestedItemToggle:a,isModified:l=false})=>{let{hoveredNestedColumn:s,nestedSubmenuAnchorEl:p,openNestedSubmenu:m,closeNestedSubmenu:c,cancelNestedClose:d}=Sh();return jsxs(Fragment,{children:[jsxs(lh,{children:[jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:jsx(f$1,{checked:t,indeterminate:o,onChange:u=>{u.stopPropagation(),n();},onClick:u=>{u.stopPropagation();},sx:sh})}),jsx(Typography,{component:"button",disabled:!l,onClick:u=>{u.stopPropagation(),l&&r();},sx:{fontSize:11,fontWeight:500,color:"#1F88D0",background:"none",border:"none",cursor:l?"pointer":"default",padding:0,opacity:l?1:.5,pointerEvents:l?"auto":"none","&:hover":l?{textDecoration:"underline"}:void 0},children:"Reset"})]}),jsx(v,{}),jsx(ch,{onScroll:c,children:jsx(Box,{component:"ul",sx:{listStyle:"none",padding:0,margin:0},children:e.map((u,f)=>{let x=u.menuItems&&u.menuItems.length>0,{checked:y,indeterminate:S}=ir(u),g=O(u.name);return jsxs(Box,{component:"li",sx:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%"},children:[jsxs(Box,{sx:{position:"relative"},onMouseEnter:h=>x&&m(u.name,h.currentTarget),onMouseLeave:()=>x&&c(),children:[jsxs(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[jsx(V,{isSelected:x?y:u.selected,isIndeterminate:x?S:false,isDisabled:g,onClick:()=>{g||i(u.name);},sx:{flex:1,display:"flex",alignItems:"center"},children:jsx("span",{children:u.label||u.name})}),x&&jsx(Box,{sx:{display:"flex",alignItems:"center",pr:1,pointerEvents:"none"},children:jsx("img",{src:wb$1,alt:"arrow",style:{height:12}})})]}),x&&jsx(Popper,{open:s===u.name,anchorEl:p,placement:"right-start",sx:{zIndex:1e4},children:jsxs(Box,{onMouseEnter:d,onMouseLeave:c,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(fa,{children:u.menuItems?.map((h,b)=>jsxs(Ap.Fragment,{children:[jsx(V,{isSelected:h.selected,isDisabled:g,onClick:()=>{g||a(u.name,h.name);},children:h.label||h.name}),b<(u.menuItems?.length??0)-1&&jsx(v,{})]},h.name))})]})})]}),f<e.length-1&&jsx(v,{})]},u.name)})})})]})};function g1({open:e,selectedViewInfo:t,setSelectedViewInfo:o,anchorEl:n,onClose:r,onCreateCustomView:i,customViews:a=[],onEditCustomView:l,defaultColumns:s=[],defaultTemplate:p$1,defaultTemplates:m=[],customTemplateCount:c,isLoading:d}){let{t:u}=useTranslation(),{hoveredColumn:f,anchorEl:x,openSubmenu:y,closeSubmenu:S,cancelClose:g,forceClose:h}=en(),[b,I]=Ap.useState(null),[w,T]=Ap.useState(null),v$1=useMemo(()=>[...m.length?m:p$1?[p$1]:[],...a],[m,p$1,a]),A=useCallback(k=>k.submenu?.length?k.submenu:s,[s]),M=useCallback(k=>k?ha(k,A(k)):s,[s,A]),E=useCallback(k=>M(k).length>0,[M]),R$1=useMemo(()=>f?v$1.find(k=>k.id===f):void 0,[f,v$1]),H=useMemo(()=>M(R$1),[R$1,M]),_=useMemo(()=>f?w?.length?w:H:[],[f,H,w]),Q=useMemo(()=>ap(_),[_]),he=useMemo(()=>lp(_,Q),[_,Q]),Le=w!=null&&!lr(w,H),be=(c??qs(a))>=3,$=d||be,et=$||!Le;function ml(k){h(),T(null);let ie;if(oo(k)){let Ae=k.submenu?.length?k.submenu:s.length?s:p$1?.submenu??[];ie={...k,submenu:pe(Ae),columns:Ae.map($e=>$e.name)};}else Ne(k)&&(ie=k);o(k,ie);}function dl(k,ie){let Ae=v$1.find($e=>$e.id===k);T(pe(M(Ae))),y(k,ie);}function L(){T(null),S(),h();}function W(k){if(k.stopPropagation(),et)return;let ie=pe(H),Ae=w?.length?pe(w):ie;i?.(true,Ae,ie,R$1?.id),T(null),h();}function ee(k){w&&T(rp(w,k));}function Se(k,ie){w&&T(ar(w,k,ie));}function vb(){w&&T(ip(w,!Q));}function Pb(){T(pe(H));}return jsxs(qo,{"data-testid":"ViewsDropdown",children:[jsx(QP,{open:e,anchorEl:n,placement:"bottom-start",children:jsxs(Ko,{onScroll:h,children:[jsx(f1,{sx:{paddingX:1.25,py:1.1,fontWeight:500,fontSize:11,color:"#8D8D94"},children:"View"}),jsx(v,{}),v$1.map(k=>{let ie=Ne(k),Ae=!ie&&E(k);return jsxs(Xo,{onMouseEnter:$e=>{ie?I(k.id):Ae&&dl(k.id,$e.currentTarget);},onMouseLeave:()=>{ie?I(null):Ae&&S();},onClick:()=>ml(k),sx:{position:"relative",cursor:"pointer",pr:1.5},children:[k.id===t.id?jsx("img",{style:{width:15,height:15},src:Xj,alt:"check"}):jsx(Zo,{}),jsx("span",{style:{flex:1,fontSize:11},children:k.label}),ie&&b===k.id&&jsx("img",{src:Ah,alt:"edit",style:{width:12,height:12,cursor:"pointer"},onClick:$e=>{$e.stopPropagation(),r?.(),l?.(k);}}),Ae&&jsx("img",{src:wb$1,alt:"arrow",style:{height:12}})]},k.id)}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"left",disableHoverListener:!be,children:jsxs(Xo,{sx:{border:"none",opacity:$?.5:1,cursor:$?"not-allowed":"pointer"},onClick:k=>{if(k.stopPropagation(),$)return;let ie=pe(M(p$1)),Ae=ie.map($e=>({...$e,selected:false,menuItems:$e.menuItems?.map(Ab=>({...Ab,selected:false}))}));i?.(true,Ae,ie,p$1?.id),h();},children:[jsx(Zo,{}),jsxs(Sr,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsx("img",{src:fm,alt:"",style:{opacity:$?.5:1,width:10,height:10}}),jsx("span",{style:{color:$?"#999":"#1F88D0",fontSize:11,fontWeight:500},children:u("New Custom View")})]}),jsx(or,{})]})})]})}),f&&x&&_.length>0&&jsx(R,{open:!!x,anchorEl:x,placement:"auto-end",onMouseEnter:g,onMouseLeave:L,children:jsxs(ph,{children:[jsx(Eh,{columns:Qo(_),allCurrentSelected:Q,someCurrentSelected:he,onSelectAll:vb,onReset:Pb,onColumnToggle:ee,onNestedItemToggle:Se,anchorEl:x,isModified:Le}),jsxs(mh,{children:[jsx(Mh,{variant:"text",onClick:L,sx:dh,children:"Cancel"}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"top",disableHoverListener:!be,children:jsx(Mh,{variant:"contained",onClick:W,disabled:et,sx:uh,children:"Create view"})})]})]})})]})}var Ep=Ap.memo(g1);var Lh=({selectedColumns:e,columnNames:t,allSelected:o,someSelected:n,hoveredColumn:r,anchorEl:i,onReorder:a,onColumnToggle:l,onSubItemToggle:s,onSelectAll:p,onResetToDefault:m,onSubmenuEnter:c,onSubmenuLeave:d,onCancelClose:u})=>{let f=useRef(null),{onDragStart:x,onDragEnd:y}=$s(f),S=useCallback(g=>{if(up(g.target)){g.preventDefault();return}x();},[x]);return jsxs(Qx,{children:[jsxs(eh,{children:[jsx(Ws,{children:jsx("img",{src:C,alt:"drag",style:{width:16,height:16,opacity:.5}})}),jsx(Hs,{onClick:g=>{g.stopPropagation(),p();},children:jsx(f$1,{checked:o,indeterminate:n,size:"small",sx:Os,onChange:g=>{g.stopPropagation(),p();},onClick:g=>{g.stopPropagation();}})}),jsx(Typography,{onClick:g=>{g.stopPropagation(),p();},sx:{flex:1,fontSize:13,fontWeight:500,color:"text.primary",ml:.75,cursor:"pointer"},children:"Select All"}),jsx(Link,{component:"button",type:"button",onClick:g=>{g.stopPropagation(),m();},underline:"none",sx:{fontSize:13,fontWeight:500,cursor:"pointer",color:"common.blue"},children:"Reset to default"})]}),jsx(Box,{sx:{flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto",position:"relative"},children:jsx(Reorder.Group,{ref:f,axis:"y",onReorder:a,values:t,style:{listStyle:"none",padding:0,margin:0},children:e.map(g=>{let h=O(g.name),b=g.menuItems&&g.menuItems.length>0,{checked:I,indeterminate:w}=ir(g);return jsxs(Reorder.Item,{value:g.name,drag:h?false:"y",dragListener:!h,dragConstraints:f,dragElastic:{top:0,bottom:0,left:0,right:0},transition:{duration:0},whileDrag:{zIndex:9999,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",scale:1},style:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%",willChange:"transform"},onDragStart:S,onDragEnd:y,children:[jsxs(th,{isHovered:r===g.name,isDate:h,onMouseEnter:T=>b&&c(g.name,T.currentTarget),onMouseLeave:()=>b&&d(),onClick:T=>{(T.target.closest('[role="checkbox"]')||T.target.closest('input[type="checkbox"]'))&&T.stopPropagation();},sx:{width:"100%",position:"relative"},children:[jsx(Ws,{children:jsx("img",{src:Fb,alt:"drag",draggable:false,style:{width:16,height:16,cursor:h?"default":"grab",pointerEvents:"none"}})}),jsx(Hs,{onMouseDown:T=>{T.stopPropagation();},onPointerDown:T=>{T.stopPropagation();},children:jsx(f$1,{checked:I,indeterminate:w,onChange:T=>{T.stopPropagation(),l(g.name);},onClick:T=>{T.stopPropagation();},disabled:h,size:"small",sx:Os})}),jsx(Typography,{sx:{flex:1,fontSize:13,fontWeight:400,color:"text.primary",ml:1},children:g.label||g.name}),b&&jsx(Box,{sx:{display:"flex",alignItems:"center",ml:1,flexShrink:0},children:jsx("img",{src:vb,alt:"arrow",style:{width:12,height:12}})})]}),b&&jsx(Popper,{open:r===g.name,anchorEl:i,placement:"right-start",sx:{zIndex:1e4},modifiers:[{name:"offset",options:{offset:[0,0]}}],children:jsxs(Box,{onMouseEnter:u,onMouseLeave:d,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(fa,{children:g.menuItems?.map((T,v$1)=>jsxs(Ap.Fragment,{children:[jsx(V,{isSelected:T.selected,isDisabled:h,onClick:()=>{h||s(g.name,T.name);},sx:{fontSize:13},children:T.label||T.name}),v$1<(g.menuItems?.length??0)-1&&jsx(v,{})]},T.name))})]})})]},g.name)})})})]})};function T1({open:e,onClose:t,onCreate:o,availableColumns:n=[],defaultColumns:r=[],editingView:i,onDelete:a,tableViews:l=[],mode:s="sheet",stackOrder:p=1}){let{t:m}=useTranslation(),c$1=useDragControls(),[d,u]=useState(false),[f,x]=useState(false);useEffect(()=>{e||(u(false),x(false));},[e]),useEffect(()=>{if(!e)return;let $=et=>{et.key==="Escape"&&t();};return window.addEventListener("keydown",$),()=>window.removeEventListener("keydown",$)},[e,t]);let{templateName:y,setTemplateName:S,selectedColumns:g,allSelected:h,someSelected:b,isNameValid:I,hasChanges:w,hoveredColumn:T,anchorEl:v,openSubmenu:A,closeSubmenu:M,cancelClose:E,handleReorder:R,handleColumnToggle:H,handleSubItemToggle:_,handleSelectAll:Q,handleResetToDefault:he}=yp({open:e,availableColumns:n,defaultColumns:r,editingView:i,tableViews:l}),Le=async()=>{if(!(!I||!w||f||d)){x(true);try{let $=Ks(g,s);await o?.({name:y,selectedColumns:g,layout:$}),t();}catch{console.warn("Failed to create view");}finally{x(false);}}},be=async()=>{if(!i||d||f)return;let $=i.id;u(true);try{await a?.($),t();}catch{console.warn("Failed to delete view");}finally{u(false);}};return e?jsxs(ah,{role:"dialog","aria-modal":"true","data-testid":"CreateViewDialog",drag:true,dragListener:false,dragControls:c$1,dragMomentum:false,initial:false,style:{width:450,minWidth:0,maxWidth:"min(100vw - 16px, 450px)",height:600,left:`max(8px, calc(50% - ${450/2}px))`,top:`max(8px, calc(50% - ${600/2}px))`},animate:{zIndex:2+p},transition:{duration:.1},children:[jsx(c,{id:"draggable-dialog-title",onPointerDown:$=>c$1.start($),style:{cursor:"move",flexShrink:0},children:jsx(d$2,{isHovered:true,title:i?"Edit Custom View":m("createCustomView")||"Create Custom View",leftActions:jsx(a$6,{onClick:t,onPointerDown:$=>$.stopPropagation()})})}),jsxs(Xx,{children:[jsxs(Zx,{onScroll:()=>{M();},children:[jsxs(Jx,{children:[jsxs(Box,{children:[jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#9F9F9F",lineHeight:"0.7"},children:"Custom"}),jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#20232B",lineHeight:1.2},children:"View"})]}),i&&jsx(rh,{onClick:be,disabled:d||f,children:d?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:"Deleting..."})]}):"Delete View"})]}),jsx(Box,{sx:{mb:3},children:jsx(b$5,{name:"custom-template-name",label:"Template Name",value:y,onChange:$=>S($),inputProps:{maxLength:20,autoComplete:"off",readOnly:true,"data-form-type":"other",onFocus:$=>$.currentTarget.removeAttribute("readonly")},required:true})}),jsx(Lh,{selectedColumns:Qo(g),columnNames:Qo(g).map($=>$.name),allSelected:h,someSelected:b,hoveredColumn:T,anchorEl:v,onReorder:R,onColumnToggle:H,onSubItemToggle:_,onSelectAll:Q,onResetToDefault:he,onSubmenuEnter:A,onSubmenuLeave:M,onCancelClose:E})]}),jsx(oh,{}),jsx(nh,{children:jsx(ih,{variant:"contained",onClick:Le,disabled:!I||!w||f||d,title:I?void 0:`Name is required. Current: "${y}"`,children:f?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:i?"Saving...":"Creating..."})]}):i?"Update View":"Create View"})})]})]}):null}var Mp=T1;function A1({onViewChange:e,templates:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,tableMode:i="default",lang:a="en",isLoading:l,mainDefaultTemplate:s}){let{t:p$1}=useTranslation(),{defaultColumns:m,defaultTemplate:c,defaultTemplates:d$1,customViews:u,allTemplates:f,customTemplateCount:x}=Sa({tableMode:i,templates:t,lang:a,mainDefaultTemplate:s}),{anchorEl:y,isCreateDialogOpen:S,editingView:g,selectedViewInfo:h,shouldUseCurrentState:b$1,currentViewColumns:I,initialColumnsForCreate:w,availableColumnsForCreate:T,handleViewButtonClick:v,handleCloseViewDropdown:A,handleSelectedViewInfo:M,handleOpenCreateDialog:E,handleOpenEditDialog:R,handleCloseCreateDialog:H,handleSaveView:_,handleDeleteView:Q}=Ta({mode:i,onViewChange:e,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:m,defaultTemplate:c,allTemplates:f,customTemplateCount:x});return jsxs(Fragment,{children:[jsx(r1,{onClickAway:A,children:jsxs(ua,{sx:{width:"32px"},"data-testid":"ViewsMenu",children:[jsx(p,{title:p$1("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"ViewsMenu_button",onClick:v,"aria-label":p$1("tableView")})}),jsx(Ep,{open:!!y,anchorEl:y,onClose:A,setSelectedViewInfo:M,selectedViewInfo:h,onCreateCustomView:E,customViews:u,onEditCustomView:R,defaultColumns:m,defaultTemplate:c,defaultTemplates:d$1,customTemplateCount:x,isLoading:l})]})}),jsx(Mp,{open:S,onClose:H,availableColumns:T?.length?T:m,defaultColumns:m,onCreate:_,editingView:g,onDelete:Q,tableViews:b$1?w??I:void 0,mode:i})]})}var Dp=memo(A1);function Rp(e=[]){let[t,o]=useState(false),n=useMemo(()=>e.map(({code:r})=>r),[e]);return {isColumnPickerVisible:t,setIsColumnPickerVisible:o,timezoneCountryCodes:n}}function L1({tableMode:e,onToggle:t}){let o=Va(e),n=Wa(e);return jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:n?Kh:Jh$1,alt:`${e}-mode`,sx:{width:14,height:14}}),onClick:t,"aria-label":`${e}-mode`,sx:r=>o?{}:{borderColor:r.v2.palette.brand[500],boxShadow:"0px 0px 4px 0px rgba(31, 136, 208, 0.50)"}})}var Hh=memo(L1);function mr({children:e,component:t="aside",...o}){return jsx(Yx,{component:t,"data-testid":"ListHeaderToolbar",...o,children:e})}function Ma({display:e,timezone:t,calendar:o,views:n,search:r,slots:i,reportsVisible:a,lang:l}){let{isColumnPickerVisible:s,setIsColumnPickerVisible:p,timezoneCountryCodes:m}=Rp(t?.segmentCountries),c=e?.variant==="acceptance",d=n?.tableMode??"default",u=useMemo(()=>n?.onSheetToggle?jsx(Hh,{tableMode:d,onToggle:n.onSheetToggle}):null,[d,n?.onSheetToggle]);return jsxs(mr,{children:[i?.leading&&!s&&i.leading,!s&&jsxs(Fragment,{children:[r?.onChange&&jsx(a$7,{onSearchChange:r.onChange,placeholder:r.placeholder}),i?.filter,u&&!c&&u,o&&t&&jsx(a$8,{defaultDate:o.date,onDateChange:f=>{let[x,y]=f;x&&y&&o.onDateChange([x,y]);},mode:o.mode,onCalendarModeSwitch:o.onModeChange,maxDateRange:o.maxRange??31,groupBy:o.groupBy,onCalendarGroupChange:o.onGroupByChange,browserTimezone:t.browserTimezone,defaultCountryTimezone:t.defaultCountryTimezone,timezone:t.timezone,onChangeTimezone:t.onChangeTimezone,timezoneCountriesCodes:m}),a&&i?.reports,u&&c&&u]}),n?.onViewChange&&(n.templates?jsx(Dp,{onViewChange:n.onViewChange,tableMode:d,lang:l,...n.templates}):jsx(vp,{onViewChange:n.onViewChange,setIsViewVisible:p,tableViews:n.columns,setTableViews:n.setColumns,resetTableViews:n.onPresetReset,onTableViewOptionClick:n.onPresetOptionClick})),i?.trailing&&!s&&i.trailing]})}function H1({title:e,display:t,lang:o,reportsVisible:n,timezone:r,calendar:i,status:a,activeFilter:l,views:s,search:p,slots:m,children:c}){let d=zc(useId(),"list-header"),u=useMemo(()=>jsx(Ma,{display:t,timezone:r,calendar:i,views:s,search:p,slots:m,reportsVisible:n,lang:o}),[t,r,i,s,p,m,n,o]);return jsxs(ca,{id:d,"data-testid":Ox,children:[t?.maximized&&jsx(ma,{title:e,toolbar:u}),jsxs(Ux,{as:"section",children:[jsx(da,{status:a,activeFilter:l,beforeStatus:m?.beforeStatus}),!t?.maximized&&u]}),c]})}var zh=memo(H1);var Uh=styled$1(Sr,{shouldForwardProp:e=>e!=="maximized"})(({theme:e,maximized:t})=>({display:"flex",alignItems:"center",gap:e.spacing(1),overflow:"hidden",height:t?"4.75rem":"4.1875rem",paddingBottom:t?"0rem":"1.2rem",paddingInline:e.spacing(4),paddingTop:t?"1.35rem":e.spacing(.5)})),_1=wa(),Gh=styled$1(j,{shouldForwardProp:e=>e!=="title"&&e!=="isDropdown"})(({title:e,isDropdown:t,theme:o})=>{let{base:n}=o.v2.palette;return {position:"relative",fontWeight:o.typography.fontWeightMedium,padding:o.spacing(1),color:n.black,fontSize:"11px",lineHeight:"15px",borderRadius:o.shape.borderRadius,transition:o.transitions.create(["backgroundColor","boxShadow"],{easing:o.transitions.easing.sharp,duration:o.transitions.duration.complex}),whiteSpace:"nowrap",textTransform:"capitalize","&:hover, &.active":{...!t&&{backgroundColor:n.white,boxShadow:o.shadows[2]},cursor:"pointer",position:"relative",color:"transparent","&:after":{...e&&{content:`"${e}"`},color:n.black,fontWeight:o.v2.typography.fontWeightBold,overflow:"hidden",position:"absolute",top:0,bottom:0,right:0,left:0,display:"flex",alignItems:"center",justifyContent:t?"flex-start":"center",letterSpacing:_1==="safari"?"-1px":"",padding:8,borderRadius:o.shape.borderRadius}}}});function G1({isDropdown:e=false,name:t,code:o,activeCode:n,navigateToMenuItem:r,onClickServiceItem:i}){let[a,l]=useState(null),{t:s}=useTranslation(),p=!!a,m=()=>{l(null);};return jsxs(Fragment,{children:[jsx(Gh,{isDropdown:e,className:n.toLowerCase()===o.toLowerCase()?"active":"",onClick:c=>{c.preventDefault(),c.stopPropagation(),r(o);},title:t,onContextMenu:c=>{c.preventDefault(),c.stopPropagation(),m(),l(c.currentTarget);},children:t}),jsx(f,{open:p,anchorEl:a,onClose:m,menuItems:[{label:s("openNewWindow"),name:"new",icon:jsx("img",{src:hb$1,alt:"new-window-icon"}),onClick:c=>{c.stopPropagation(),i?.(o),m();}}]})]})}var Yh=memo(G1);var tA=e$1=>jsx(e,{src:e$1.className.includes("MuiSelect-iconOpen")?Wc:Vc,alt:"dropdown"});function oA({isMaximized:e,serviceCode:t,dimensions:o,services:n,onChangeServiceCode:r,onClickServiceItem:i}){let a=zc(useId(),"app-services"),[l,s]=useState(0),[p,m]=useState(false),[c,d]=useState(""),u=useRef(null),[f,x]=Ap.useState(false),{i18n:y}=useTranslation(),S=w=>{d(w.target.value);},g=()=>{x(w=>!w);},h=useMemo(()=>ac(n.filter(w=>w.code.toLowerCase()===decodeURIComponent(t).toLowerCase())?.[0]?.name,y.language),[n,y.language,t]);useEffect(()=>{d(h);},[h]),useEffect(()=>{s(u.current?.offsetWidth+51+8+3);},[]),useEffect(()=>{m(Number(o?.width)<l+10);},[o?.width,l]);let b=w=>{r?.(w),x(false);},I=w=>jsx(c$1,{children:w});return jsxs(Uh,{id:a,"data-testid":"AppServices",maximized:e,children:[!!n?.length&&!p&&jsx(Box,{ref:u,display:"flex",gap:"8px",flexDirection:"row",sx:{userSelect:"none"},children:n.map((w,T)=>jsx(Yh,{activeCode:t,onClickServiceItem:i,navigateToMenuItem:b,name:ac(w.name,y.language)||"",code:w.code},`service-item-${w.code}-${T}`))}),!!n?.length&&p&&jsx(a$4,{open:f,onClick:g,displayEmpty:true,inputProps:{"aria-label":"Without label"},MenuProps:{anchorOrigin:{vertical:40,horizontal:83},PaperProps:{style:{borderRadius:"0.25rem",width:"10.43rem",padding:0}},MenuListProps:{disablePadding:true}},value:c,IconComponent:tA,onChange:S,renderValue:I,sx:{"& .MuiOutlinedInput-root.MuiList-root-MuiMenu-list":{paddingTop:"0px !important",paddingBottom:"0px !important"}},children:n.map((w,T)=>ac(w.name,y.language)?.toLowerCase()===c?.toLowerCase()?null:jsx(b$2,{value:ac(w.name,y.language),onClick:v=>{v.preventDefault(),v.stopPropagation(),b(w.code);},children:jsx(d$1,{children:ac(w.name,y.language)})},`option-${w.code}-${T}`))})]})}var jh=memo(oA);var Fp=jh;function sA({appCode:e,services:t,isMaximized:o,dimensions:n,serviceCode:r,ui:{onStartDrag:i},onChangeServiceCode:a,onClickServiceItem:l,sx:s}){let p=zc(useId(),"app-services-bar"),[m,c]=useState(false),d=useCallback(f=>{i?.(f),c(true);},[i,c]),u=()=>{c(false);};return !e||!t?.length?null:jsx(b$3,{id:p,"data-testid":"AppServicesBar",onPointerDown:d,onPointerUp:u,isDragging:m,sx:s,children:jsx(Fp,{onClickServiceItem:l,dimensions:{width:n.width},serviceCode:r,services:t,isMaximized:o,onChangeServiceCode:a})})}var qh=memo(sA);var pA=qh;var Zh=styled$1(Sr,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({borderRadius:"4px",border:`1px solid ${e.palette.divider}`,minHeight:32,minWidth:30,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:e.palette.common.white,":hover":{opacity:.7},...t&&{boxShadow:`0px 0px 4px 0px ${e.palette.info.dark}80`,border:`1px solid ${e.palette.info.dark}`,backgroundColor:`${e.palette.info.dark}0D`,gap:"6px",padding:"0 8px"}})),Jh=styled$1(Sr)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",minWidth:14,height:14,borderRadius:"50%",background:e.palette.background.gradient.shadedBlue,color:e.palette.common.white,fontSize:"8px",fontWeight:700,lineHeight:"14px",flexShrink:0})),Qh=styled$1(Sr)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"2px","& img":{width:14,height:14}})),ey=styled$1(cA)(({theme:e})=>({marginTop:e.spacing(1),marginBottom:e.spacing(1),minWidth:193,"& .MuiPaper-root":{borderRadius:e.spacing(.5),"&>.MuiList-root":{padding:0}}})),ty=styled$1(j)(({theme:e})=>{let{grey:t}=e.v2.palette;return {fontWeight:e.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:t[500],paddingInlineStart:e.v2.spacing(16),paddingTop:e.v2.spacing(8),paddingBottom:e.v2.spacing(8),paddingInlineEnd:e.v2.spacing(8),borderBottom:`1px solid ${t[100]}`,display:"block"}}),Np=styled$1(Sr)(({theme:e})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"flex-end",backgroundColor:e.palette.common.white,borderTop:`1px solid ${e.palette.divider}`})),Wp=styled$1(Mh)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:70,borderRadius:"4px",border:`1px solid ${e.palette.info.dark}`,backgroundColor:e.palette.info.dark,fontWeight:700,fontSize:"11px",color:e.palette.common.white,"&:hover":{backgroundColor:e.palette.info.dark},"&.Mui-disabled":{color:"#fff !important",opacity:.5}})),Hp=styled$1(Mh)(({theme:e})=>({textTransform:"capitalize",minWidth:"auto",width:70,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,fontWeight:500,fontSize:"11px",color:e.palette.text.primary,"&:hover":{background:"transparent"}}));var Op=createContext(null);function uA(){let e=useContext(Op);if(!e)throw new Error("useFilterDropdown must be used inside a FilterDropdown");return e}function ny({onConfirm:e,onCancel:t,isOkayButDisabled:o,children:n,isDisabled:r,icon:i,title:a,menuStyle:l,hideTitle:s=false,hideFooter:p=false,activeFiltersCount:m,onClearFilters:c,renderButton:d,onOpenChange:u,menuProps:f,...x}){let y=zc(useId(),"filter-dropdown"),[S,g]=useState(null),h=!!S,{t:b}=useTranslation(),I=()=>{g(null),u?.(false);},w=E=>{if(!r){if(!h){g(E.currentTarget),u?.(true);return}I();}},T=()=>{h&&(t?.(),I());},v=()=>{e?.(),I();},A=typeof m=="number"&&m>0,M=E=>{E.stopPropagation(),c?.();};return jsx(Op.Provider,{value:{onConfirm:v,onCancel:T,onClose:I},children:jsx(r1,{onClickAway:T,children:jsxs(Sr,{id:y,"data-testid":"FilterDropdown",...x,children:[jsx(Zh,{className:"filter-button",isActive:h||A,onClick:w,sx:{...r&&{pointerEvents:"none",opacity:.5,...x.sx}},children:d??jsxs(Fragment,{children:[jsx(Sr,{component:"img",src:i??$j,alt:"filter"}),A&&jsxs(Fragment,{children:[jsx(Jh,{children:m}),jsx(Qh,{onClick:M,"aria-label":"clear filters",children:jsx(Sr,{component:"img",src:Eb,alt:"clear"})})]})]})}),jsxs(ey,{anchorEl:S,open:h,onClose:T,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{marginTop:"8px",marginBottom:"8px",width:193,...l},...f,children:[!s&&jsx(ty,{component:"span",children:a??b("filterBy")}),n,!p&&jsxs(Np,{children:[jsx(Hp,{onClick:T,children:b("cancel")}),jsx(Wp,{disabled:o,onClick:v,children:b("okay")})]})]}),h&&jsx(a$3,{onClick:I})]})})})}var ry=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),iy=styled$1(Sr)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),ay=styled$1(Sr)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),ly=styled$1(Sr)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"178px"}));function Up({brand:e,merchantsIds:t,onChangeMerchant:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,anchorEl:i}){let[a,l]=useState(""),s=!!i,p=useCallback(S=>t.includes(S),[t]),m=(S,g)=>{if(S.stopPropagation(),p(g)){o?.(t.filter(b=>b!==g));return}let h=[...new Set([...t,g])];o?.(h);},c=S=>t.length===1&&t[0]===S&&n,d=S=>{l(S);},u=()=>{l("");},f=useMemo(()=>e.merchants??[],[e.merchants]),x=useMemo(()=>{if(!a?.trim())return f;let S=a.trim().toLowerCase();return f?.filter(g=>(g?.display_name??"").toLowerCase().includes(S)||(g?.legacy_id??"").toLowerCase().includes(S))},[a,f]),y=useMemo(()=>r?x:f,[x,f,r]);return jsxs(R,{open:s,anchorEl:i,placement:"right-start",children:[r&&f.length>1&&jsx(Sr,{sx:{p:"8px"},children:jsx(b$4,{fullWidth:true,placeholder:"Merchants",name:"merchants",value:a,onChange:S=>d(S.target.value),onClear:u})}),y?.map(S=>jsx(ry,{isDisabled:c(S.legacy_id),isSelected:p(S.legacy_id),onClick:g=>{c(S.legacy_id)||m(g,S.legacy_id);},sx:{maxHeight:36,minHeight:36},children:jsxs(iy,{children:[jsx(ly,{component:"span",children:S.display_name}),jsx(ay,{component:"span",children:S.legacy_id})]})},S?.legacy_id))]})}var La=Up;var py=styled$1(Sr)(()=>({display:"flex",gap:"4px",alignItems:"center",flex:1,marginInlineEnd:"8px"}));function jp({brand:e,merchantsIds:t,isDisabled:o,atLeastOneMerchantSelected:n=false,showSearchInput:r=false,renderBrandLogo:i,onChangeMerchant:a}){let[l,s]=useState(null),p=!!l,m=y=>{s(y.currentTarget);},c=()=>{s(null);},d=useMemo(()=>e.merchants?.filter(y=>t.includes(y.legacy_id)),[t,e.merchants]),u=useMemo(()=>d?.length===e.merchants?.length,[d?.length,e.merchants?.length]),f=useMemo(()=>!u&&d.length>0,[u,d]),x=y=>{if(y.stopPropagation(),u){a?.(t.filter(S=>!e.merchants.some(({legacy_id:g})=>S===g)));return}if(f){let S=[...new Set([...t,...d.map(({legacy_id:g})=>g)])];a?.(S);return}a?.([...t,...e.merchants.map(({legacy_id:S})=>S)]);};return jsxs(V,{isSelected:u,isIndeterminate:f,onMouseEnter:m,onMouseLeave:c,onClick:y=>{o||x(y);},isDisabled:o,sx:{maxHeight:35,minHeight:35,...p&&{boxShadow:"0px 0px 16px 0px #00000021"}},children:[jsxs(py,{children:[i?.(e.logo),jsx(j,{sx:{fontSize:"11px"},children:ac(e.name)})]}),e.merchants?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(La,{anchorEl:l,brand:e,merchantsIds:t,onChangeMerchant:a,atLeastOneMerchantSelected:n,showSearchInput:r})]})}var my=jp;function Kp({brands:e,isLoading:t,onFilterChange:o,merchantsIds:n=[],atLeastOneMerchantSelected:r=false,showSearchInput:i=false,hideCheckbox:a=false,renderBrandLogo:l}){let[s,p]=useState(null),[m,c]=useState(""),d=!!s,{t:u}=useTranslation(),f=A=>{p(A.currentTarget);},x=()=>{p(null);},y=useMemo(()=>e.length?e.every(A=>A.merchants?.every(({legacy_id:M})=>n.includes(M))):false,[n,e,a]),S=useMemo(()=>!y&&n.length>0,[n,y]),g=useMemo(()=>e.filter(A=>A.merchants?.some(M=>n?.includes(M.legacy_id))).length,[e,n]),h=()=>{if(y&&!r){o?.([]);return}let A=e.flatMap(M=>M.merchants?.map(({legacy_id:E})=>E));o?.(A);},b=t||!e?.length,I=A=>{c(A);},w=()=>{c("");},T=useMemo(()=>{if(!m.trim())return e;let A=m.trim().toLowerCase();return e.filter(M=>ac(M.name)?.toLowerCase()?.includes(A)||M.merchants?.some(E=>E.legacy_id?.toLowerCase().includes(A)))},[m,e]),v=useMemo(()=>i?T:e,[e,T,i]);return jsxs(V,{isDisabled:b,isSelected:y,startAdornment:a?null:void 0,isIndeterminate:S,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...d&&{boxShadow:"0px 0px 16px 0px #00000021"},...b&&{pointerEvents:"none",opacity:.5,cursor:"default"}},onMouseEnter:f,onMouseLeave:x,onClick:h,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:u("merchant")}),e.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),e?.length===1?jsx(La,{anchorEl:s,brand:e[0],merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i}):jsxs(R,{open:d,anchorEl:s,placement:"right-start",children:[i&&e.length>1&&jsx(Sr,{sx:{p:"8px"},children:jsx(b$4,{id:"merchants-search-input",fullWidth:true,placeholder:"Brands",name:"brands",value:m,onChange:A=>I(A.target.value),onClear:w})}),v?.map(A=>jsx(my,{isDisabled:g===1&&r,brand:A,merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i,renderBrandLogo:l},A.id))]})]})}var fy=styled$1(Sr)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"164px"}));function kA({retailersIds:e=[],isLoading:t,retailers:o=[],onFilterChange:n,atLeastOneRetailerSelected:r=false,showSearchInput:i=false,hideCheckbox:a=false}){let[l,s]=useState(null),p=!!l,{t:m,i18n:c}=useTranslation(),[d,u]=useState(""),f=E=>{s(E.currentTarget);},x=()=>{s(null);},y=useCallback(E=>e?.includes(E),[e]),S=useMemo(()=>o.length?o.every(E=>y(E.id)):false,[o,y,a]),g=useMemo(()=>!S&&e.length>0,[e,S]),h=()=>{if(S&&!r){n?.([]);return}n?.(o.map(E=>E.id));},b=E=>e.length===1&&e[0]===E&&r,I=(E,R)=>{if(E.stopPropagation(),b(R))return;if(y(R)){n?.(e.filter(_=>_!==R));return}let H=[...new Set([...e,R])];n?.(H);},w=t||!o?.length,T=E=>{u(E);},v=()=>{u("");},A=useMemo(()=>d?.trim()?o?.filter(E=>(E?.brand?.name?.[c.language]??E?.brand?.name?.en??"").toLowerCase().includes(d.trim().toLowerCase())):o,[d,o,c.language]),M=useMemo(()=>i?A:o,[A,o,i]);return jsxs(V,{isDisabled:w,isSelected:S,startAdornment:a?null:void 0,isIndeterminate:g,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...p&&{boxShadow:"0px 0px 16px 0px #00000021"},...w&&{opacity:.5,pointerEvents:"none",cursor:"default"}},onMouseEnter:f,onMouseLeave:x,onClick:h,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:m("retailers")}),o?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsxs(R,{open:p,anchorEl:l,placement:"right-start",sx:{height:300,width:200,overflow:"auto"},children:[i&&jsx(Sr,{sx:{p:"8px"},children:jsx(b$4,{id:"retailers-search-field",fullWidth:true,placeholder:"Retailers",name:"retailers",value:d,onChange:E=>T(E.target.value),onClear:v})}),M?.map((E,R)=>jsx(V,{isSelected:y(E.id),isDisabled:t||b(E.id),onClick:H=>{I(H,E.id);},sx:{maxHeight:35,minHeight:35},children:jsx(fy,{children:E?.brand?.name?.[c.language]??E?.brand?.name?.en})},`key-${E?.id}-${R}`))]})]})}var xy=memo(kA);function WA({countriesIds:e=[],isLoading:t,countries:o=[],onFilterChange:n,atLeastOneCountrySelected:r=false,hideCheckbox:i=false}){let[a,l]=useState(null),s=!!a,{t:p}=useTranslation(),m=h=>{s||l(h.currentTarget);},c=()=>{s&&l(null);},d=useCallback(h=>e?.includes(h),[e]),u=useMemo(()=>o.length?o.every(h=>d(h)):false,[o,d]),f=useMemo(()=>!u&&e.length>0,[e,u]),x=()=>{if(!r){if(u){n?.([]);return}n?.(o);}},y=h=>e.length===1&&e[0]===h&&r,S=(h,b)=>{if(h.stopPropagation(),y(b))return;if(d(b)){n?.(e.filter(w=>w!==b));return}let I=[...new Set([...e,b])];n?.(I);},g=t||o?.length<=0||r;return jsxs(V,{isDisabled:g,isSelected:u,startAdornment:i?null:void 0,isIndeterminate:f,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...s&&{boxShadow:"0px 0px 16px 0px #00000021"},...!o?.length&&{opacity:.5,pointerEvents:"none"}},onMouseEnter:m,onMouseLeave:c,onClick:x,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:p("walletCountry")}),o?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:a,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((h,b)=>jsxs(V,{isSelected:d(h),isDisabled:t||y(h),onClick:I=>{S(I,h);},sx:{maxHeight:35,minHeight:35},children:[jsx(a$2,{countryCode:h}),jsx(j,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:La$1(h)})]},`key-${h}-${b}`))})]})}var Iy=memo(WA);function $A({currenciesIds:e=[],isLoading:t,currencies:o=[],onFilterChange:n,atLeastOneCurrencySelected:r=false,hideCheckbox:i=false}){let[a,l]=useState(null),s=!!a,{t:p}=useTranslation(),m=h=>{s||l(h.currentTarget);},c=()=>{s&&l(null);},d=useCallback(h=>e?.includes(h),[e]),u=useMemo(()=>o.length?o.every(h=>d(h)):false,[o,d]),f=useMemo(()=>!u&&e.length>0,[e,u]),x=()=>{if(!r){if(u){n?.([]);return}n?.(o);}},y=h=>e.length===1&&e[0]===h&&r,S=(h,b)=>{if(h.stopPropagation(),y(b))return;if(d(b)){n?.(e.filter(w=>w!==b));return}let I=[...new Set([...e,b])];n?.(I);},g=t||o?.length<=0||r;return jsxs(V,{isDisabled:g,isSelected:u,startAdornment:i?null:void 0,isIndeterminate:f,sx:{maxHeight:35,minHeight:35,padding:"12px 8px 12px 16px",...s&&{boxShadow:"0px 0px 16px 0px #00000021"},...!o?.length&&{opacity:.5,pointerEvents:"none"}},onMouseEnter:m,onMouseLeave:c,onClick:x,children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:p("currency")}),o?.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:s,anchorEl:a,placement:"right-start",sx:{width:200,overflow:"auto"},children:o?.map((h,b)=>uo[h]?.country?jsxs(V,{isSelected:d(h),isDisabled:t||y(h),onClick:w=>{S(w,h);},sx:{maxHeight:35,minHeight:35},children:[jsx(a$2,{countryCode:uo[h].country})," ",jsx(j,{sx:{fontSize:"11px !important",fontWeight:"500 !important"},children:h})]},`key-${h}-${b}`):null)})]})}var Ty=memo($A);var UA=(r=>(r.BRAND="BRAND",r.COUNTRY="COUNTRY",r.ENTITY="ENTITY",r.MERCHANT="MERCHANT",r))(UA||{});var GA="/",hr=5,wy=(...e)=>e.join(GA),qp=e=>[e.label,e.id],vy=(e,t)=>{if(e.levelKey==="MERCHANT")return e.id.toLowerCase().includes(t)?e:null;let o=(e.children??[]).map(i=>vy(i,t)).filter(i=>i!==null);if(!o.length)return null;let{searchProps:n,...r}=e;return {...r,children:o,...o.length>=hr&&{searchProps:n}}},Py=(e,t,o)=>{let n=e.map(r=>{let i=r.entities??[],l=Array.from(new Set(i.map(s=>s.country).filter(Boolean))).map(s=>{let m=i.filter(c=>c.country===s).map(c=>{let u=(c.merchants??[]).map(f=>({id:f.legacy_id,label:f.display_name,levelKey:"MERCHANT",status:t.includes(f.legacy_id)?"CHECKED":"UNCHECKED",hintText:f.legacy_id}));return {id:wy(r.id,s,c.id),label:ac(c.legal_name,o)??c.id,levelKey:"ENTITY",children:u,header:"Merchants",...u.length>=hr&&{searchProps:{getValues:qp}}}});return {id:wy(r.id,s),label:La$1(s)??s,levelKey:"COUNTRY",children:m,header:"Entities",iconComponent:jsx(a$2,{countryCode:s,width:14}),...m.length>=hr&&{searchProps:{getValues:qp}}}});return {id:r.id,label:ac(r.name,o)??r.id,levelKey:"BRAND",children:l,header:"Countries",icon:{fileId:r.logo},...l.length>=hr&&{searchProps:{getValues:qp}}}});return {levelKey:"BRAND",children:n,header:"Brands",...n.length>=hr&&{searchProps:{filterItem:(r,i)=>(typeof r.label=="string"?r.label.toLowerCase():"").includes(i)?r:vy(r,i)}}}};var ZA=e=>{let{brands:t,isLoading:o,initialValue:n,onFilterChange:r,BrandLogoComponent:i,hideCheckbox:a}=e,[l,s]=useState(null),[p,m]=useState("UNCHECKED"),c=useRef(null),d=!!l,{t:u,i18n:f}=useTranslation(),x=useMemo(()=>Py(t,n,f.language),[t,n,f.language]),y=x.children??[],S=o||!y.length,g=useCallback(w=>{let T=w.filter(A=>A.status==="CHECKED"),v=w.filter(A=>A.status==="INDETERMINATE");return T.length===y.length?"CHECKED":v.length>0||T.length>0?"INDETERMINATE":"UNCHECKED"},[y]),h=useCallback(({selectedTree:w})=>{m(g(w));},[g]),b=useCallback(w=>{m(g(w));let T=b$8.filterNodesByLevelKey(w,"MERCHANT").map(({id:v})=>v);r?.(T);},[r,g]),I=useCallback(()=>{c.current?.toggleAll(p!=="CHECKED");},[p]);return jsxs(V,{startAdornment:a?null:void 0,isSelected:p==="CHECKED",isIndeterminate:p==="INDETERMINATE",isDisabled:S,onMouseEnter:w=>s(w.currentTarget),onMouseLeave:()=>s(null),onClick:I,sx:{maxHeight:36,minHeight:36,padding:"12px 8px 12px 16px",...d&&{boxShadow:"0px 0px 16px 0px #00000021"},...S&&{pointerEvents:"none",opacity:.5,cursor:"default"}},children:[jsx(j,{sx:{fontSize:"11px",flex:1},children:u("merchant")}),t.length>0&&jsx("img",{src:vb,alt:"arrow",style:{height:12}}),!o&&jsx(c$3,{ref:c,placement:"right-start",anchorEl:l,exposeOnlySelectedTree:true,treeDefinition:x,onChange:b,onMounted:h,IconComponent:i})]})},Ey=ZA;var QA=Ey;function My({onPhoneChange:e,onCountryChange:t,selectedPhone:o,selectedCountry:n,countriesOptions:r,isCountriesLoading:i}){let a=zc(useId(),"phone-filter");return jsx(b$9,{id:a,"data-testid":"ColumnFilterInputs_PhoneInput",phoneValue:o,onPhoneChange:l=>{e(l);},countryValue:n,onCountryChange:l=>{t(l?.countryId);},countries:r||[],isCountriesLoading:i||false,error:false,disabled:i,placeholder:"User Mobile",sx:{"&.MuiInputBase-root":{paddingLeft:"0px !important"}}})}var Ry=styled$1(Sr,{shouldForwardProp:e=>e!=="disabled"})(({theme:e,disabled:t})=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"8px",padding:"8px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:t?e.palette.grey[400]:e.palette.common.white,...t&&{cursor:"default",pointerEvents:"none"}})),Ly=styled$1(j)(({theme:e})=>({color:e.v2.palette.grey[500],fontSize:"10px",fontWeight:500,marginBottom:"8px",margin:0}));var nE=(e,t)=>e.name===t.name&&e.size===t.size,ky=(e,t)=>t?.length?t.some(o=>Xb(o)?nE(o.file,e):o.name===e.name):false;function cE({options:e,error:t,files:o,label:n,disabled:r,hideUpload:i=false,preventDuplicates:a,onChangeFiles:l,onRemoveFile:s,renderBrandLogo:p,renderOpenFileInNewTab:m}){let c=zc(useId(),"file-input-preview"),{t:d}=useTranslation(),[u,f]=useState(null),{getRootProps:x,getInputProps:y,open:S,isDragReject:g,fileRejections:h$1}=useDropzone({...e,disabled:r||e?.disabled}),b=Wb$1(e?.maxSize||0,0).toUpperCase(),I=useMemo(()=>{let v=h$1.length&&h$1[0].errors.some(M=>M.code==="file-invalid-type"),A=h$1.length&&h$1[0].errors.some(M=>M.code==="file-too-large");return g||v?d("invalidFileType"):A?`File is larger than ${b}`:u||t},[g,t,h$1,u,d,b]);return jsxs(Ry,{id:c,"data-testid":"FileInputPreview",disabled:r,children:[jsx(Ly,{children:n}),jsx(h,{files:o,onRemoveFile:s,disabled:r,getFilePreview:v=>v.type.includes("image")?URL.createObjectURL(v):v.name.includes(".pdf")?We:v.name,renderBrandLogo:p,renderOpenFileInNewTab:m}),!i&&jsx(a$5,{getRootProps:x,getInputProps:y,open:S,onChangeFiles:l,processFiles:v=>{if(f(null),!a)return v.map(E=>({file:E,id:E.name}));let{duplicates:A,uniqueFiles:M}=v.reduce((E,R)=>(ky(R,o)?E.duplicates.push(R.name):E.uniqueFiles.push({file:R,id:R.name}),E),{duplicates:[],uniqueFiles:[]});if(A.length>0){let E=A.length===1?"file":"files";f(`Duplicate ${E} detected: ${A.join(", ")}`);}return M},disabled:r,errorMessage:I,maxFileSize:b,preventDuplicates:a})]})}var mE=memo(cE);var Vy=styled$1(R)(()=>({marginTop:"-1px","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),Fy=styled$1(V)(({theme:e})=>({height:40,flex:"unset",paddingTop:0,paddingBottom:0,borderBottom:`1px solid ${e.palette.divider}`,paddingLeft:"16px",maxHeight:"35px",".label":{flexGrow:1}}));function Fa({menuLabel:e,options:t,selectedValue:o,onValueChange:n}){let r=zc(useId(),"view-column-radio-filter"),[i,a]=useState(null),[l,s]=useState(o),p=useRef(null);return useEffect(()=>{s(o);},[o]),jsxs(Fy,{id:r,ref:p,onMouseEnter:f=>{a(f.currentTarget);},onMouseLeave:()=>{a(null);},onClick:f=>{f.stopPropagation(),a(f.currentTarget);},startAdornment:null,children:[jsx("span",{className:"label",children:e}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(Vy,{open:!!i,anchorEl:i,placement:"right-start",children:jsx(a$g,{options:t,value:l||"",onOptionChange:f=>{s(f),n(f);},defaultValue:t[0].value})})]})}var Wy=(e,t)=>{let o=e||{},n={};return t?.forEach(({value:r})=>{let i=o?.[r];n[r]=i===void 0?"all":i;}),n};function Oy({anchorEl:e,options:t,apiKey:o="statuses",initialStatuses:n,onCloseDropdown:r,onClear:i,onConfirm:a}){let l=!!e,s=zc(useId(),"status-filter"),{t:p}=useTranslation(),[m,c]=useState(()=>Wy(n,t)),d=useRef(null),[u,f]=useState(null),[x,y]=useState(null),S=(v,A)=>{f(v.currentTarget),y(A);},g=useCallback(()=>{f(null),y(null);},[]),h=useCallback(v=>{r(v),g();},[g,r]),b=()=>{let v=Object.keys(m).reduce((M,E)=>{let R=m[E];return R!=="all"&&(M[E]=R),M},{});Object.values(m).every(M=>M==="all")?i([o]):a({[o]:v});},I=r$1(b,r),w=v=>{b(),r(v);},T=v=>{x&&c(A=>({...A,[x]:v}));};return jsx(ClickAwayListener,{onClickAway:v=>{v.stopPropagation(),r(v);},children:jsxs(Sr,{id:s,"data-testid":"StatusFilter",ref:d,tabIndex:-1,onKeyDown:I,children:[jsxs(R,{open:l,anchorEl:e,children:[jsx(a$h,{component:"span",children:p("filterBy")}),t.map(({value:v,label:A})=>jsxs(V,{onClick:M=>{f(M.currentTarget);},onMouseOver:M=>{S(M,v);},sx:{minHeight:"35px",padding:"8px 16px",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}},startAdornment:null,children:[jsx(Sr,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:A}),jsx(Sr,{component:"img",src:vb,width:16,height:12,sx:{marginLeft:"auto"}})]},v)),jsxs(b$a,{children:[jsx(d$3,{onClick:h,children:p("cancel")}),jsx(c$4,{onClick:w,children:p("okay")})]})]}),jsx(Popper,{open:!!u,anchorEl:u,placement:"right-start",onMouseLeave:g,children:jsx(Sr,{sx:{backgroundColor:"#fff",borderEndEndRadius:"8px",border:"1px solid #F2F2F2"},children:jsx(a$g,{options:[{value:"all",label:"All"},{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}],value:m[x||""],onOptionChange:T})})})]})})}var _y=styled(motion.div,{shouldForwardProp:e=>!["notificationState","open","loading","ready","failed"].includes(e)})(({theme:e,notificationState:t,open:o,loading:n,ready:r,failed:i})=>({position:"relative",border:`1px solid ${e.palette.divider}`,padding:"0 8px",height:32,borderRadius:"4px",display:"flex",alignItems:"center",overflow:"hidden",fontSize:"11px",fontWeight:500,color:e.palette.text.primary,transition:"width 2s ease-in-out",cursor:"pointer",...(t?.success||t?.failed)&&!n&&!r&&!i&&{"&:after":{content:'""',width:7,height:7,backgroundColor:t?.failed?e.palette.common.red:e.palette.success.dark,borderRadius:"50%",position:"absolute",top:5,border:`1px solid ${e.palette.common.white}`,right:6}},...o&&{border:`1px solid ${e.palette.info.dark}`,boxShadow:e.shadows[7]}})),zy=styled(Box)(()=>({position:"relative"})),$y=styled(Box)(({theme:e})=>({background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:"4px",marginTop:"8px"})),Uy=styled(Box)(({theme:e})=>({background:e.palette.background.transparent[2],backdropFilter:"blur(2px)",color:e.palette.text.primary,fontSize:"11px",fontWeight:500,height:31,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden",borderBottomLeftRadius:"4px",borderBottomRightRadius:"4px"})),Gy=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",padding:"5.5px 8px",minHeight:48,height:"auto",borderBottom:`1px solid ${e.palette.divider}`,cursor:"pointer","&:hover":{boxShadow:e.shadows[3]}})),Yy=styled("img")(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),jy=styled(Box)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),Ky=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1})),qy=styled(Box)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:500,wordBreak:"break-all",paddingInlineEnd:"8px"})),Xy=styled(Box)(({theme:e})=>({fontSize:"9px",color:e.palette.text.textSecondary,fontWeight:600})),Zy=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",height:32,padding:"4px 8px",borderBottom:`1px solid ${e.palette.divider}`,cursor:"pointer","&:hover":{boxShadow:e.shadows[3]}})),Jy=styled(Box)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:400,textTransform:"uppercase"})),Qp=styled(Box)(({theme:e})=>({borderTop:`2px solid ${e.palette.divider}`})),Ha=styled(Box)(({theme:e})=>({position:"absolute",bottom:0,right:0,left:0,".MuiLinearProgress-root":{backgroundColor:e.palette.divider,height:2},".MuiLinearProgress-bar":{background:e.palette.background.gradient.shadedBlue},"&.done .MuiLinearProgress-bar":{background:e.palette.success.dark},"&.failed .MuiLinearProgress-bar":{background:e.palette.common.red}})),Nt=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",gap:"8px",".MuiCircularProgress-root":{width:"14px !important",height:"14px !important",display:"flex"},".MuiCircularProgress-circle":{strokeWidth:"1.017px",stroke:alpha$1(e.palette.common.black,.62)}})),Oa=styled(Box)(()=>({position:"relative"})),_a=styled(Box)(({theme:e})=>({position:"absolute",color:e.palette.common.black,fontSize:"7.875px",fontWeight:700,width:14,height:14,display:"flex",alignItems:"center",justifyContent:"center"})),za=styled("img")(()=>({width:14,height:14})),Qy=styled(Box)(()=>({display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",padding:"8px"}));var tI=e=>{let t=new Date,o=ic(e).isSame(t,"year"),n={sameDay:"DD MMM, YYYY",nextDay:"DD MMM, YYYY",lastDay:"DD MMM, YYYY",sameElse:"DD MMM, YYYY",lastWeek:"DD MMM, YYYY",nextWeek:"DD MMM, YYYY"};return o&&(n={sameDay:"DD MMM",nextDay:"DD MMM",lastDay:"DD MMM",sameElse:"DD MMM",lastWeek:"DD MMM",nextWeek:"DD MMM"}),ic(e).calendar(null,n)},oI=(e,t)=>{let o=new Date().toISOString().split("T")[0],n=t??`file_${o}`,i=/\.(xlx|xlsx|csv|txt|doc|docx|pdf|jpg|png|gif|zip|rar)$/i.exec(e),a=i?i[0]:".csv";return `${n}${a}`};var ec={loading:false,success:false,error:null},PE=(e=ec,t)=>{switch(t.type){case "RESET":return ec;case "LOADING":return {...e,loading:true};case "SUCCESS":return {...e,success:true};case "ERROR":return {...e,error:t.error};default:return e}},$a=({onDownload:e})=>{let t=n(),[{loading:o,error:n$1,success:r},i]=useReducer(PE,ec),a=useCallback(()=>i({type:"LOADING"}),[]),l=useCallback(()=>i({type:"SUCCESS"}),[]),s=useCallback(c=>i({type:"ERROR",error:c}),[]),p=useCallback(()=>i({type:"RESET"}),[]);useEffect(()=>{(r||n$1)&&setTimeout(()=>{p();},3e3);},[r,n$1,p]);let m=useCallback(()=>{e&&(a(),e().then(c=>{l(),Mb(c.url,oI(c.result_file,c.id));}).catch(c=>{s(c),t.error(c?.response?.data?.error?.message||c?.message||"Failed to download report");}));},[e,a,l,s]);return {loading:o,error:n$1,success:r,handleDownloadReport:m}};function EE({onDownload:e}){let{loading:t,error:o,success:n,handleDownloadReport:r}=$a({onDownload:e});return t?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(Nt,{children:jsxs(Oa,{children:[jsx(_a,{children:"1"}),jsx(CircularProgress,{})]})})}):n?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(Nt,{children:jsx(za,{src:Ze,alt:"done"})})}):o?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(Nt,{children:jsx(za,{src:Ij,alt:"failed"})})}):jsx(za,{onClick:r,src:Xe,alt:"reports"})}var oc=EE;function rc(){return jsxs(Qy,{children:[jsx(r,{width:"16px",height:"16px",variant:"rectangular"}),jsx(r,{width:"100%",variant:"text"}),jsx(r,{width:"12px",height:"12px",variant:"circular"})]})}function kE({reports:e,isLoading:t=false,onDownloadReport:o}){let n=useCallback(i=>o?o(i):Promise.reject(new Error("No download report function provided")),[o]),r=e.map(i=>{let a=ic(i.created_at).isBefore(ic().subtract(1,"day")),l=Yb(i.result_file);return jsxs(Gy,{children:[jsx(Yy,{src:l,alt:"download"}),jsxs(Ky,{children:[jsxs(jy,{children:[jsx(qy,{children:i.result_file}),jsx(Xy,{children:a?tI(new Date(i.created_at)):ic(new Date(i.created_at)).fromNow()})]}),jsx(oc,{onDownload:()=>n(i.id)})]})]},i.id)});return t?jsxs(Qp,{children:[jsx(rc,{}),jsx(rc,{})]}):jsx(Qp,{children:r})}var nI=memo(kE);function OE(e){let{progress:t,reportsQueryResult:o,isStatusReady:n,isStatusFailed:r,isLoading:i,notificationState:a,onOpenDropdown:l,onRequestReportFile:s,onOpenReportsApp:p$1,hideOpenReportsApp:m=false,onDownloadReport:c,customContent:d}=e,[u,f]=useState(null),{t:x}=useTranslation(),y=!!u,{data:S,isLoading:g}=o,h=useCallback(v=>{i||n||(l?.(),f(v.currentTarget));},[i,n,l]),b=useCallback(()=>{f(null);},[]),I=useCallback(()=>{i||(b(),s?.());},[i,b,s]),w=v=>{v.stopPropagation(),p$1?.(),b();},T=()=>i?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Nt,{children:[jsxs(Oa,{children:[jsx(_a,{children:"1"}),jsx(WE,{})]}),jsx("span",{children:x("preparing")}),jsx(Ha,{children:jsx(sc,{variant:"determinate",value:t})})]})}):n?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Nt,{children:[jsx("img",{src:Ze,alt:"done"}),jsx("span",{children:x("ready")}),jsx(Ha,{className:"done",children:jsx(sc,{variant:"determinate",value:100})})]})}):r?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Nt,{children:[jsx("img",{src:Ij,alt:"failed"}),jsx("span",{children:x("failed")}),jsx(Ha,{className:"failed",children:jsx(sc,{variant:"determinate",value:100})})]})}):jsx("img",{src:Ye,alt:"reports"});return jsxs(zy,{"data-testid":"TableReports_ReportsWrapper",children:[jsx(AnimatePresence,{children:jsx(p,{title:x("reports"),children:jsx(_y,{"data-testid":"TableReports_ExportButton",onClick:h,notificationState:a,open:y,loading:i,ready:n,failed:r,sx:{...(i||n||r)&&{borderBottom:"none"}},initial:{width:"auto"},transition:{duration:.25},children:T()})})}),y&&jsx(a$3,{onClick:b}),jsx(QP,{open:y,anchorEl:u,placement:"bottom-end",children:jsxs($y,{sx:{width:208},children:[d?.({closeDropdown:b})??jsxs(Zy,{onClick:I,children:[jsx("img",{src:Ve$1,alt:"download"}),jsx(Jy,{children:"csv"})]}),jsx(nI,{reports:S?.reports??[],isLoading:g,onDownloadReport:c}),!m&&jsx(Uy,{onClick:w,children:x("openReportsApp")})]})})]})}var rI=memo(OE);var iI=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",width:54,height:18,backgroundColor:"#1F88D0",borderRadius:"2px",fontSize:"8px",fontWeight:600,color:e.palette.common.white}));function KE({onDownload:e}){let t=zc(useId(),"download-button"),{loading:o,error:n,success:r,handleDownloadReport:i}=$a({onDownload:e}),{t:a}=useTranslation(),l=!o&&!n&&!r;return jsx(iI,{id:t,"data-testid":"DownloadButton",onClick:i,children:jsxs(AnimatePresence,{mode:"wait",initial:false,children:[o&&jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},style:{display:"flex",alignItems:"center"},children:jsx(WE,{size:"10px",sx:{color:"rgba(255, 255, 255, 0.62)"}})},"loading"),!!n&&jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(d,{src:hm,sx:{width:"auto",height:"auto"},alt:"error"})},"error"),l&&jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:a("download")},"text")]})})}var aI=memo(KE);var XE=aI;var ZE=rI;var ue=styled$1(V)(({theme:e})=>({height:40,flex:"unset",paddingTop:0,paddingBottom:0,borderBottom:`1px solid ${e.palette.divider}`,".label":{flexGrow:1}})),sI=styled$1(Sr)(({theme:e})=>({width:36,height:24,border:`1px solid ${e.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"12px"}));function Ga({type:e}){return jsx(sI,{children:jsx(Sr,{component:"img",src:h$1(e),sx:{width:18,height:12,objectFit:"contain"},onError:t=>{t.currentTarget.src=h$1("card");}})})}function cc({icon:e,name:t,options:o=[],filters:n,setFilters:r}){let[i,a]=useState(null),l=n?.payment_methods??[],s=x=>{a(x.currentTarget);},p=()=>{a(null);},m=useCallback(x=>l.includes(x)??false,[l.length]),c=useMemo(()=>o?.every(x=>m(x.type)),[l.length]),d=useMemo(()=>!c&&o?.some(x=>m(x.type)),[l.length]),u=x=>{if(x.stopPropagation(),c){let y=o?.reduce((h,b)=>h.filter(I=>I!==b.type),l)??[],{payment_methods:S,...g}=n;r(y?.length>0?{...n,payment_methods:y}:g);}else r({...n,payment_methods:[...l,...o?.map(y=>y.type)??[]]});},f=(x,y)=>{x.stopPropagation(),m(y)?r({...n,payment_methods:l?.filter(S=>S!==y)??[]}):r({...n,payment_methods:[...l??[],y]});};return jsxs(ue,{isSelected:c,isIndeterminate:d,onMouseEnter:s,onMouseLeave:p,onClick:u,children:[jsx("img",{src:e,alt:t}),jsx("span",{className:"label",children:t}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!i,anchorEl:i,placement:"right-end",children:o?.map(x=>jsx(ue,{isSelected:m(x.type),onClick:y=>f(y,x.type),children:jsx(Ga,{type:x.type})},x.type))})]})}function ja({paymentMethodsSource:e,filters:t,setFilters:o}){let[n,r]=useState(null),i=t?.payment_methods??[],a=!e?.options?.length,l=u=>{r(u.currentTarget);},s=()=>{r(null);},p=useMemo(()=>(e?.options??[])?.reduce((u,f)=>(u.push(...(f.options??[])?.map(x=>x.type)??[]),u),[])??[],[]),m=useMemo(()=>p?.length===i.length&&i.length>0,[i.length,p?.length]),c=useMemo(()=>!m&&i.length>0,[i.length,m]);return jsxs(ue,{isSelected:m,isIndeterminate:c,onMouseEnter:l,onMouseLeave:s,onClick:()=>{if(!a){if(m){let{payment_methods:u,...f}=t;o(f);return}o({...t,payment_methods:p});}},sx:{...a&&{opacity:.5,pointerEvents:"none"}},children:[jsx("span",{className:"label",children:e?.name}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!n,anchorEl:n,placement:"right-start",children:e?.options?.map(u=>jsx(cc,{...u,filters:t,setFilters:o},u.type))})]})}function Ka({paymentSchemesSource:e,filters:t,setFilters:o}){let[n,r]=useState(null),i=t?.payment_scheme??[],a=!e?.options?.length,l=f=>{r(f.currentTarget);},s=()=>{r(null);},p=useMemo(()=>i?.length===e?.options?.length&&i.length>0,[i?.length,e?.options?.length]),m=useMemo(()=>!p&&i.length>0,[i.length,p]),c=useCallback(f=>i.includes(f)??false,[i]),d=()=>{if(!a){if(p){let{payment_scheme:f,...x}=t;o(x);return}o({...t,payment_scheme:e?.options?.map(f=>f.type)??[]});}},u=(f,x)=>{f.stopPropagation(),c(x)?o({...t,payment_scheme:i.filter(y=>y!==x)??[]}):o({...t,payment_scheme:[...t?.payment_scheme??[],x]});};return jsxs(ue,{isSelected:p,isIndeterminate:m,onMouseEnter:l,onMouseLeave:s,onClick:d,sx:{...a&&{opacity:.5,pointerEvents:"none"}},children:[jsx("span",{className:"label",children:e?.name}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!n,anchorEl:n,placement:"right-start",children:e?.options?.map(f=>jsx(ue,{isSelected:c(f.type),onClick:x=>u(x,f.type),children:jsx(Ga,{type:f.type})},f.type))})]})}function Xa({filters:e,setFilters:t}){let[o,n]=useState(null),{t:r}=useTranslation(),i=useMemo(()=>e?.payment_initiated??[],[e?.payment_initiated]),a=d=>{n(d.currentTarget);},l=()=>{n(null);},s=useCallback(d=>i.includes(d),[i]),p=i?.length===Lo.length,m=()=>{t?.({...e,payment_initiated:p?[]:Lo.map(({key:d})=>d)});},c=d=>{t?.({...e,payment_initiated:s(d)?i?.filter(u=>u!==d):[...i,d]});};return jsxs(ue,{onMouseEnter:a,onMouseLeave:l,isSelected:p,isIndeterminate:i.length===1,onClick:m,children:[jsx("span",{className:"label",children:r("paymentInitiated")}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!o,anchorEl:o,placement:"right-start",children:Lo.map(({label:d,key:u})=>jsx(V,{isSelected:s(u),onClick:f=>{f.stopPropagation(),c(u);},children:d},u))})]})}function dc({filters:e,setFilters:t}){let[o,n]=useState(null),r=useMemo(()=>e?.payment_locations??[],[e?.payment_locations]),i=c=>{n(c.currentTarget);},a=()=>{n(null);},l=useCallback(c=>r.includes(c),[r]),s=r?.length===Mo$1.length,p=()=>{t?.({...e,payment_locations:s?[]:Mo$1.map(({key:c})=>c)});},m=c=>{t?.({...e,payment_locations:l(c)?r?.filter(d=>d!==c):[...r,c]});};return jsxs(ue,{onMouseEnter:i,onMouseLeave:a,isSelected:s,isIndeterminate:r.length>0&&r.length<Mo$1.length,onClick:p,children:[jsx("span",{className:"label",children:"Payment Locations"}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!o,anchorEl:o,placement:"right-start",children:Mo$1.map(({label:c,key:d})=>jsxs(V,{isSelected:l(d),onClick:u=>{u.stopPropagation(),m(d);},children:[jsx(Sr,{sx:u=>({border:`1px solid ${u.palette.divider}`,borderRadius:"20px",width:36,height:24,display:"flex",alignItems:"center",justifyContent:"center"}),children:jsx(gi,{sx:{visibility:"visible",width:15,height:9.176},variant:c})}),c]},d))})]})}function Ja({filters:e,setFilters:t}){let[o,n]=useState(null),{t:r}=useTranslation(),i=useMemo(()=>e?.authentication_type??[],[e?.authentication_type]),a=d=>{n(d.currentTarget);},l=()=>{n(null);},s=useCallback(d=>i.includes(d),[i]),p=i?.length===No.length,m=()=>{t?.({...e,authentication_type:p?[]:No.map(({key:d})=>d)});},c=d=>{t?.({...e,authentication_type:s(d)?i?.filter(u=>u!==d):[...i,d]});};return jsxs(ue,{onMouseEnter:a,onMouseLeave:l,isSelected:p,isIndeterminate:i.length>0&&i.length<No.length,onClick:m,children:[jsx("span",{className:"label",children:r("authenticationType")}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:!!o,anchorEl:o,placement:"right-start",children:No.map(({label:d,key:u})=>jsx(V,{isSelected:s(u),onClick:f=>{f.stopPropagation(),c(u);},children:d},u))})]})}function fI({filters:e,setFilters:t,anchorEl:o,showPaymentSchemes:n=true,showPaymentMethods:r=true,showPaymentInitiated:i=true,showPaymentLocations:a=false,showAuthenticationType:l=false,paymentMethodsSource:s,paymentSchemesSource:p,onCloseDropdown:m,onConfirm:c}){let{t:d}=useTranslation(),u=zc(useId(),"payment-source-filter"),f=!!o,x=()=>c?.(),y=r$1(x,m),S=g=>{x(),m(g);};return jsxs(R,{id:u,"data-testid":"PaymentSourceFilter",open:f,anchorEl:o,sx:{marginTop:"8px",marginBottom:"8px"},onKeyDown:y,panelProps:{tabIndex:-1,autoFocus:true},children:[jsx(a$h,{component:"span",children:d("filterBy")}),r&&jsx(ja,{filters:e,setFilters:t,paymentMethodsSource:s}),n&&jsx(Ka,{filters:e,setFilters:t,paymentSchemesSource:p}),i&&jsx(Xa,{filters:e,setFilters:t}),l&&jsx(Ja,{filters:e,setFilters:t}),a&&jsx(dc,{filters:e,setFilters:t}),jsxs(b$a,{children:[jsx(d$3,{onClick:m,children:d("cancel")}),jsx(c$4,{onClick:S,children:d("okay")})]})]})}var fc=[{label:dp$1.C,value:"C"},{label:dp$1.F,value:"F"}],PM=({filters:e,setFilters:t})=>{let[o,n]=useState(null),r=!!o,i=e?.auth_mode??[],a=f=>{r||n(f.currentTarget);},l=()=>{r&&n(null);},s=useMemo(()=>fc.map(f=>f.value),[]),p=useMemo(()=>fc.length===i.length&&i.length>0,[i.length,s?.length]),m=useMemo(()=>!p&&i.length>0,[i.length,p]),c=()=>{if(p){let{auth_mode:f,...x}=e;t(x);return}t({...e,auth_mode:s});},d=useCallback(f=>i.includes(f)??false,[i.length]),u=(f,x)=>{f.stopPropagation(),d(x)?t({...e,auth_mode:i?.filter(y=>y!==x)??[]}):t({...e,auth_mode:[...i??[],x]});};return jsxs(ue,{isSelected:p,isIndeterminate:m,onMouseEnter:a,onMouseLeave:l,onClick:c,children:[jsx("span",{className:"label",children:"Authentication Mode"}),jsx("img",{src:vb,alt:"arrow",style:{height:12}}),jsx(R,{open:r,anchorEl:o,placement:"right-start",children:fc.map(f=>jsxs(V,{isSelected:d(f.value),onClick:x=>u(x,f.value),children:[jsx(Kf,{mode:f.value}),f.label]},f.value))})]})};var AM=styled$1(j)(()=>({fontSize:"11px"})),CI=styled$1(Sr)(()=>({display:"flex",alignItems:"center",gap:"4px",width:"100%",paddingInline:"16px"})),xI=styled$1(Sr)(({theme:e})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"flex-end",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${e.palette.divider}`})),hI=styled$1(b)(()=>({minWidth:"auto",width:70})),yI=styled$1(b)(()=>({minWidth:"auto",width:70})),II=styled$1(Sr)(()=>({display:"flex",flexDirection:"column",gap:"8px",marginBottom:"8px"})),gc=styled$1(AM)(()=>({fontSize:"11px",fontWeight:500,color:"#8D8D94",padding:"8px 16px"})),bI=styled$1(Sr)(({theme:e})=>({borderBlock:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",alignItems:"center",gap:"2px",width:"100%"})),SI=styled$1(Sr)(({theme:e})=>({...a(e),width:"auto",marginTop:"8px","&:focus":{outline:"none"}})),TI=styled$1(gc)(()=>({color:"#1F88D0",padding:"4px 24px",cursor:"pointer"})),wI=styled$1(b,{shouldForwardProp:e=>e!=="open"})(({open:e,theme:t})=>{let{brand:o}=t.v2.palette;return {fontSize:"11px",fontWeight:t.v2.typography.fontWeightMedium,padding:t.v2.spacing(8),width:"100%",height:32,justifyContent:"space-between",gap:t.v2.spacing(4),...e&&{borderColor:o[500],boxShadow:"0px 0px 4px 0px rgba(31, 136, 208, 0.50)"}}});function PI({dateRange:e,onDateRangeChange:t,calendarMode:o$1,onCalendarModeChange:n,timezone:r,browserTimezone:i,defaultCountryTimezone:a,onTimezoneChange:l,timezoneCountriesCodes:s=[],onConfirm:p,onCloseDropdown:m}){let c=zc(useId(),"date-filter"),{t:d$1}=useTranslation(),u=useRef(null),f=()=>p(e),x=r$1(f,m),y=b=>{t(b),requestAnimationFrame(()=>u.current?.focus());},S=b=>{f(),m(b);},g=useCallback(b=>n(b),[n]),h=b=>{if(!b)return "";let[I,w]=b,T=ic(I).format("MMM D"),v=ic(w).format("MMM D");return T===v?T:`${T} - ${v}`};return jsxs(SI,{ref:u,tabIndex:-1,onKeyDown:x,id:c,"data-testid":"DateFilter",children:[jsxs(II,{children:[jsx(bI,{children:jsx(gc,{component:"span",children:d$1("filterBy")})}),jsx(CI,{children:jsx(a$8,{defaultDate:e||o(0),onDateChange:y,maxDateRange:365,mode:o$1,onCalendarModeSwitch:g,browserTimezone:i,defaultCountryTimezone:a,timezone:r,onChangeTimezone:l,timezoneCountriesCodes:s,mainSx:{width:"100%"},popperProps:{placement:"right-start"},renderCalendarButton:(b,I)=>jsxs(wI,{variant:"secondary",size:"md",fullWidth:true,open:b,onClick:I,children:[jsx("span",{children:h(e)||"Date"}),jsx(d,{src:dk,alt:"selected",sx:{width:16,height:16}})]})},h(e))}),e&&jsx(TI,{component:"span",onClick:()=>t(void 0),children:"Clear"})]}),jsxs(xI,{children:[jsx(yI,{variant:"secondary",size:"md",onClick:m,children:d$1("cancel")}),jsx(hI,{variant:"primary",size:"md",onClick:S,children:d$1("okay")})]})]})}var EI=styled$1(R)(()=>({marginBottom:"8px"})),MI=styled$1(L)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,".icon":{width:14}})),DI=styled$1(Sr)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}})),RI=styled$1(Mh)(({theme:e})=>({color:e.palette.info.dark,fontSize:"11px",textTransform:"capitalize",padding:"4px 9px",minWidth:"auto","&:hover":{background:"transparent"}})),LI=styled$1(Sr)(({theme:e})=>({padding:"0 16px 8px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`}));function BI({selectedRadioValue:e,onRadioButtonChange:t,radioOptions:o,label:n,onConfirm:r,onClear:i,inputValues:a,onInputValuesChange:l,anchorEl:s,onCloseDropdown:p,inputFilters:m=[]}){let c=zc(useId(),"reference-type-filter"),{t:d}=useTranslation(),u=()=>r(),f=r$1(u,p),x=I=>{u(),p(I);},y=I=>{i(),p(I);},S=I=>a?.[I]!==void 0&&a?.[I].length>0,g=I=>{S(I)&&l({...a,[I]:""});},h=useMemo(()=>FM(a).some(I=>!!I),[a]),b=()=>{l(m.reduce((I,{apiKey:w})=>({...I,[w]:""}),{}));};return jsxs(EI,{id:c,"data-testid":"ReferenceTypeFilter",open:!!s,anchorEl:s,onKeyDown:f,children:[jsx(a$h,{component:"span",children:d("filterBy")}),jsx(Fa,{menuLabel:n,options:o,selectedValue:e,onValueChange:t}),m.length>0&&jsx(DI,{"data-testid":"ColumnFilterInputs_inputs",component:"main",children:m.map(({apiKey:I,placeholder:w})=>jsx(MI,{className:"input","data-testid":"ColumnFilterInputs_InputStyled",name:I,placeholder:w,onChange:T=>{l({...a,[I]:T.target.value});},defaultValue:a?.[I]??"",value:a?.[I],inputProps:{autoComplete:"off","data-testid":"ColumnFilterInputs_input"},endAdornment:jsx(WM,{position:"end",children:jsx(Box,{component:"img","data-testid":"ColumnFilterInputs_icon","data-icon":S(I)?"close":"search",src:S(I)?ui$1:A,alt:"search",className:"icon",sx:{cursor:S(I)?"pointer":"default"},onClick:()=>{g(I);}})})},I))}),jsx(x$1,{in:h,component:"section","data-testid":"ColumnFilterInputs_Collapse",children:jsx(LI,{"data-testid":"ColumnFilterInputs_ClearWrapper",children:jsx(RI,{type:"button",onClick:b,"data-testid":"ColumnFilterInputs_ClearButton",children:d("clear")})})}),jsxs(b$a,{children:[jsx(d$3,{onClick:y,children:d("cancel")}),jsx(c$4,{onClick:x,children:d("okay")})]})]})}var VI=styled$1(Sr)(()=>({maxHeight:"210px",maxWidth:"177px",overflowY:"auto",padding:0})),FI=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},maxHeight:35,minHeight:35})),NI=styled$1(Sr)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),WI=styled$1(Sr)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),HI=styled$1(Sr)(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"120px"})),OI=styled$1(R)(()=>({marginBottom:"8px"}));function $I({anchorEl:e,onCloseDropdown:t,list:o,apiKey:n,placeholder:r,onConfirm:i,onClear:a,onClickItem:l,inputValue:s,onInputValueChange:p,selectedListItems:m}){let c=zc(useId(),"list-column-filter"),{t:d}=useTranslation(),u=()=>i(),f=r$1(u,t),x=T=>{u(),t(T);},y=T=>{a?.(),t(T);},S=!!s.trim().length,g=()=>{S&&p("");},h=T=>{p(T);},b=useMemo(()=>S?o?.filter(T=>T.name.toLowerCase().includes(s.trim().toLowerCase())):o,[s,S,o]),I=S&&!b.length||!o.length,w=useMemo(()=>new Set(m),[m]);return jsxs(OI,{id:c,"data-testid":"ListColumnFilter",open:!!e,anchorEl:e,onKeyDown:f,children:[jsx(a$h,{component:"span",children:d("filterBy")}),!!o?.length&&jsx(Box,{sx:{padding:"8px 16px"},children:jsx(b$4,{fullWidth:true,value:s,name:n,placeholder:r,onChange:T=>h(T.target.value),onClear:g})}),jsx(VI,{children:I?jsx(Box,{sx:{p:1,textAlign:"center",fontSize:"11px"},children:"No data available"}):b?.map((T,v)=>jsx(FI,{isSelected:w.has(T?.id),onClick:()=>{l(T?.id);},children:jsxs(NI,{children:[jsx(HI,{children:T.name}),jsx(WI,{component:"span",children:T.id})]})},`${T.id}-${v}`))}),jsxs(b$a,{children:[jsx(d$3,{onClick:y,children:d("cancel")}),jsx(c$4,{onClick:x,children:d("okay")})]})]})}var UI="os-shared-VerificationIcon",ol={root:`${UI}-root`,img:`${UI}-img`},GI=(l=>(l.Verified="verified",l.Reviewed="reviewed",l.Completed="completed",l.Incomplete="incomplete",l.Rejected="rejected",l.Closed="closed",l.Archived="archived",l))(GI||{});var nl={verified:Hj,reviewed:Fj,completed:Ej,incomplete:Gj,rejected:Ij,closed:Jj,archived:Kj},rl={verified:"#2ACE0029",reviewed:"#11D0FA29",completed:"#11D0FA29",incomplete:"#D9D9D929",rejected:"#FF3D0029",closed:"#D9D9D929",archived:"#D9D9D929"};var $M=2.3,YI=styled$1("span",{shouldForwardProp:e=>!["$variant","$bgColor","$size"].includes(e)})(({$variant:e="default",$bgColor:t,$size:o=10.5})=>{let n=Math.round(o*$M);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...e==="circle"&&{width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundColor:t||"#D9D9D929"}}});var jI=forwardRef(({className:e,sx:t,icon:o,label:n,variant:r="default",size:i=10.5,width:a,height:l,...s},p$1)=>{let m=nl[o]||nl.incomplete,c=rl[o]||rl.incomplete,d=n===null?"":n||Yg(o),u=a??i,f=l??i,x=jsx(YI,{ref:p$1,className:lc(ol.root,e),sx:t,"data-testid":"VerificationIcon",$variant:r,$bgColor:c,$size:i,...s,children:jsx("img",{className:ol.img,loading:"lazy",src:m,alt:d||o,width:u,height:f})});return n===null?x:jsx(p,{title:d,wrapperProps:{display:"inline-flex"},children:x})});jI.displayName="VerificationIcon";var jM=memo(jI);function QM({voidPercentage:e,capturePercentage:t,captureCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:a,isTextShown:l,remainingAmount:s,isSheetViewShown:p$1,selectionProps:m={}}){let c=Number(t)+Number(e)===100||s<=0,d=zc(useId(),"capture-auto-icon"),u=useTheme(),{t:f}=useTranslation(),x=Ha$1(s||0),y=useCallback(I=>`Auto ${I} - ${a} ${x.integerAmount}.${x.decimalAmount}`,[a,x.decimalAmount,x.integerAmount]),S=useCallback(I=>{let w=I==="Capture"?r:i,{integerAmount:T,decimalAmount:v}=Ia$1(w,a);return `Partial ${I} - ${a} ${T}.${v}`},[r,i,a]),g=t>0?jsx(p,{title:S("Capture"),children:jsxs(hi,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:u.shadows[4]}},children:[jsx(bi,{src:tb$1,alt:"captured"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(yi,{isCapture:true,percentage:t,children:[t,"% ",jsx(Ii,{isCapture:true,percentage:Si(t)})]}),o>1&&jsxs(z$1,{compact:true,color:"dark",children:[o,"x"]})]})]})}):n==="CAPTURED"&&!c?jsx(p,{title:y("Capture"),children:jsx(So,{children:jsx(Ut,{src:Pn.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:y("Capture"),children:jsx(So,{children:jsx(Ut,{src:Pn.CAPTURED?.icon,alt:"auto"})})}),h=t===100?jsx(p,{title:f("captured"),children:jsx(rf,{children:jsx(Ut,{src:hk,alt:"captured"})})}):g,b=useMemo(()=>p$1&&h?jsx(b$1,{copyTrigger:"press",copyText:f("captured"),children:f("captured")}):l&&h?jsx(of,{children:f("captured")}):h,[l,h,p$1,f]);return b&&jsx("div",{id:d,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:b})}var qI=QM;function iD({voidPercentage:e,capturePercentage:t,voidCount:o,autoType:n,captureAmount:r,voidAmount:i,currency:a,isTextShown:l,isSheetViewShown:s,selectionProps:p$1={},remainingAmount:m}){let c=Number(t)+Number(e)===100||m<=0,d=zc(useId(),"void-auto-icon"),u=useTheme(),{t:f}=useTranslation(),x=Ha$1(m||0),y=useCallback(I=>`Auto ${I} - ${a} ${x.integerAmount}.${x.decimalAmount}`,[a,x.decimalAmount,x.integerAmount]),S=useCallback(I=>{let w=I==="Capture"?r:i,{integerAmount:T,decimalAmount:v}=Ia$1(w,a);return `Partial ${I} - ${a} ${T}.${v}`},[r,i,a]),g=e>0||i?jsx(p,{title:S("Void"),children:jsxs(hi,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:u.palette.common.white,border:`0.75px solid ${u.palette.grey[600]}1A`},variants:{animate:{boxShadow:u.shadows[4]}},children:[jsx(bi,{src:yk$1,alt:"void"}),jsxs(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px"},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:[jsxs(yi,{percentage:e,children:[e,"% ",jsx(Ii,{percentage:Si(e)})]}),o>0&&jsxs(z$1,{compact:true,color:"neutral",children:[o,"x"]})]})]})}):n==="VOID"&&!c?jsx(p,{title:y("Void"),children:jsx(So,{children:jsx(Ut,{src:Pn.VOID?.icon,alt:"auto"})})}):null,h=e===100?jsx(p,{title:f("void"),children:jsx(So,{children:jsx(Ut,{src:yk$1,alt:"void"})})}):g,b=useMemo(()=>s&&h?jsx(b$1,{copyTrigger:"press",copyText:f("void"),children:f("void")}):l&&h?jsx(nf,{children:f("void")}):h,[l,h,s,f]);return b?jsx("div",{id:d,"data-testid":"VoidAutoIcon",style:{...!s&&{zIndex:11}},children:b}):null}var ZI=iD;var aD=qI;var cD=({authorizedStatus:e,isTextShown:t,iconStyles:o,tableMode:n,chipIndex:r=0,selectionProps:i={}})=>{let{t:a}=useTranslation(),l=useTheme(),s=a(Ht(e));return Wa(n)?jsx(b$1,{copyTrigger:"press",copyText:s,children:s}):jsx(p,{title:s,children:t?jsx(z,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:l.palette.info.dark},children:s}):jsx(d,{src:f$2[e],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:o})})};var JI=styled$1(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)})),QI=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),hc=styled$1("img")(()=>({width:"10px",height:"10px"})),yc=styled$1(motion.span)(({theme:e})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Ic=styled$1(motion.div,{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!e&&{padding:"0 !important"}})),eb=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),tb=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),ob={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},nb={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},rb={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},ib={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},bc={fadeIn:{duration:.3},animate:{duration:.1}},ab={fadeIn:{opacity:1}},lb=styled$1(z)(()=>({width:"88px",height:"100%"})),Sc=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.25),height:"100%"}));function rt({chargeStatus:e,gatewayTooltip:t,acquirerTooltip:o,chargeTooltip:n,errorCode:r,isTextShown:i,gatewayCode:a,acquirerCode:l,unCapturedStyles:s,iconStyles:p$1,iconWrapperStyles:m,gatewayIconWrapperStyles:c,gatewayContainerStyles:d,gateWayIconStyles:u,showBadge:f=true,isSheetViewShown:x=false,selectionProps:y={},chipIndex:S=0}){let g$1=e?b$b[e]:null,h=e?g[e]:null,b=useTheme(),{t:I}=useTranslation(),w=zc(useId(),"charge-status-icon"),T=n&&jsx(Fragment,{children:jsx("div",{children:n})}),v=o&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o})]}),A=t&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:t})]}),M=e&&a$d[e]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:g$1?"50%":"",...m},children:jsx(Y,{src:a$d[e],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:g$1?"50%":"",width:"16px",height:"16px",...p$1}})});return x?jsxs(Sc,{children:[jsxs(b$1,{copyTrigger:"press",copyText:I(Ht(e)),children:[I(Ht(e))," ",r]}),g$1&&jsxs(Fragment,{children:[a&&jsxs(b$1,{copyTrigger:"press",copyText:"Gateway",children:["Gateway ",a]}),l&&jsxs(b$1,{copyTrigger:"press",copyText:"Acquirer",children:["Acquirer ",l]})]})]}):i?jsxs(Sc,{children:[jsx(p,{title:T,children:jsxs(lb,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Ht(e),sx:{background:g$1?.background||h?.background||"transparent",color:g$1?.color||h?.color||b.palette.info.dark,borderColor:`${g$1?.color||h?.color||b.palette.info.dark}1A`},children:[I(Ht(e))," ",r]})}),g$1&&jsxs(Fragment,{children:[a&&jsx(p,{title:A,children:jsxs(z,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Ht(e),sx:{background:g$1?.background||h?.background||"transparent",color:g$1?.color||h?.color||b.palette.info.dark},children:["Gateway ",a]})}),l&&jsx(p,{title:v,children:jsxs(z,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Ht(e),sx:{background:g$1?.background||h?.background||"transparent",color:g$1?.color||h?.color||b.palette.info.dark},children:["Acquirer ",l]})})]})]}):jsx(ve,{id:w,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...m},children:Ln?.includes(e||"")&&(T||v||A)?jsxs(tb,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...f&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...s},children:[jsx(eb,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:g$1?.background}},children:jsx(p,{title:T??I(Ht(e)),children:jsxs(Fragment,{children:[M,jsx(QI,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:ib,style:{...r&&{padding:"0 !important"}},children:jsx(JI,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:g$1?.color},transition:ob,variants:ab,initial:{opacity:0},children:r})})]})})}),jsx(Ic,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:bc,variants:nb,style:d,isVisible:!!A,children:A&&jsx(p,{title:A,children:jsx(yc,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:g$1?.background,...c},children:jsx(hc,{src:g$1?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:u})})})}),jsx(Ic,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:bc,variants:rb,style:d,isVisible:!!v,children:v&&jsx(p,{title:v,children:jsx(yc,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:g$1?.background,...c},children:jsx(hc,{src:g$1?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:u})})})})]}):jsx(p,{title:T??I(Ht(e)),children:jsx(ve,{children:M})})})}var xD=()=>{let{t:e}=useTranslation(),t=zc(useId(),"customer-initiated-icon");return jsx(p,{title:e("merchantInitiated"),children:jsx("img",{id:t,"data-testid":"merchantInitiatedIcon",src:ub$1,alt:"merchant",style:{width:"16px",height:"16px"}})})};var hD={G:"Global",R:"Regional",L:"Local"},Kt=({geographyVariant:e,countryCode:t,isTextShown:o})=>{let n=e?hD[e]:void 0,r=n||t?`${n||""} ${n&&t?"-":""} ${t?`Country - ${t}`:""}`:void 0;return o||!t?null:jsx(p,{title:r,children:jsx(a$2,{countryCode:t})})};var bD=({geographyVariant:e,isTextShown:t,deviceCountry:o,deviceType:n,tableMode:r})=>{let i=zc(useId(),"device-icon-chip");return jsxs(Sr,{id:i,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...Wa(r)&&{height:"18px"}},children:[jsx(Kt,{geographyVariant:e,isTextShown:t,countryCode:o}),jsx(c$2,{type:n,isTextShown:t,tableMode:r})]})};var wD=({isDisputeOpen:e,iconStyles:t})=>{let o=zc(useId(),"dispute-icon");return jsx(Y,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:e?va:ua$1,alt:"dispute-icon",style:t})};var db=styled$1(Sr,{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",gap:e.spacing(.5),...Wa(t)&&{height:"18px"},alignItems:"center"})),ub=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function wc({countryCode:e,isTextShown:t,cardNumber:o,bankName:n,tableMode:r}){let i=zc(useId(),"issuer-icon"),a=o?.slice(0,4),l=o?.slice(-4);return jsxs(db,{id:i,"data-testid":"IssuerIcon",tableMode:r,children:[e&&jsx(Kt,{countryCode:e,isTextShown:t}),jsx(p,{title:`${n?`Issuer - ${n}`:""}`,children:jsx(ub,{children:`${a||""} ${l||""}`})})]})}var MD=wc;var kD=({payoutStatus:e="PENDING",isTextShown:t,payoutTooltip:o,iconStyles:n,isSheetViewShown:r,chipIndex:i=0,selectionProps:a={}})=>{let{t:l}=useTranslation(),s=zc(useId(),"payout-icon"),p$1=l(Ht(e)),m=o||p$1;return r?jsx(b$1,{copyTrigger:"press",copyText:p$1,children:p$1}):jsx(p,{title:m,children:t?jsx(ea,{id:s,"data-testid":"StatusCell_PayoutStatusLabel",children:p$1}):jsx(Y,{id:s,src:e$1[e],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:n})})};var WD=({isTextShown:e,refundStatus:t="PENDING",refundTooltip:o="",refundCount:n,iconStyles:r,isSheetViewShown:i,chipIndex:a=0,selectionProps:l={}})=>{let{t:s}=useTranslation(),p$1=useTheme(),m=zc(useId(),"refund-icon"),c=(n||0)>1,d=s(Ht(t));if(i)return jsxs(b$1,{copyTrigger:"press",copyText:d,children:[d," ",c?`${n}x`:null]});let u=jsxs(yf,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[n,"x"]});return e?jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:jsx(ea,{id:m,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d$4[t].color,backgroundColor:d$4[t].backgroundColor,width:"90px"},children:jsxs(Jl,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[d," ",c?u:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:c?jsxs(Jl,{id:m,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[jsx(hf,{src:qk,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),u]}):jsx(Y,{id:m,src:c$5[t],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:r})})},fb=WD;var HD=fb;var OD={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},Ce=e=>OD[e?.toLowerCase()||""]||e;styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var gb=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var Cb=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),xb=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var hb=styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function qe({source:e,isTextShown:t,title:o,width:n,height:r,imgSx:i}){let{t:a}=useTranslation(),l=h$1(e);return jsx(p,{title:o,children:t?jsx(xb,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(Cb,{"data-testid":"SourceCell_TextLabel","data-source":e,children:a(Ht(e))})}):jsx(gb,{src:l,alt:e,width:n,height:r,onError:s=>{s.currentTarget.src=h$1("card");},sx:i})})}function KD({payment:e,card:t,isTextShown:o,firstIcon:n}){let r=zc(useId(),"source-icons"),{t:i}=useTranslation(),a=useCallback(()=>{let p=[],m=cc$1(e),c=e?.method,d=e?.scheme;return Ce(c)?.toLowerCase()===Ce(d)?.toLowerCase()?p.push(Ce(c),Ce(m)):p.push(Ce(c),Ce(m),Ce(d)),p},[e]),l=useMemo(()=>jsx(qe,{source:n,isTextShown:o,title:i(Ht(n))},n),[n,o,i]),s=useMemo(()=>a()?.filter(p=>!!p&&p!==n)?.map((p,m,c)=>{let d=e?.wallet===i("sv_wallet")?i("storedValueWallet"):i("passThruWallet"),u=m===c.length-1&&t?.last_four?`${i(Ht(p))} - ${t?.last_four}`:i(Ht(p));return jsx(qe,{source:p,isTextShown:o,title:m===0&&p==="Wallet"?d:u},`${p}-${m}`)}),[a,e,t,o,i,n]);return jsxs(Box,{id:r,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[n&&l,s,t?.last_four&&jsxs(hb,{children:["\xB7\xB7\xB7 ",t?.last_four]})]})}var wr={PROCESSED:Sg$1,FAILED:""};var Sb=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),Tb=styled("img")(()=>({width:"16px",height:"16px"})),wb=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function Yi({status:e,isTextShown:t,isSheetViewShown:o}){let n=useTheme$1(),{t:r}=useTranslation(),i=zc(useId(),"destination-icon"),a=r(Ht(e));return o&&wr[e]?jsx(b$1,{copyTrigger:"press",copyText:a,children:a}):t&&wr[e]?jsx(Sb,{id:i,"data-testid":"ChargeStatusIcon_isTextShown","data-status":Ht(e),sx:{background:"#1F88D00D",color:e==="PROCESSED"?n.palette.info.dark:n.palette.common.black},children:a}):jsx(wb,{id:i,"data-testid":"DestinationIcon",className:"destination-status",children:e&&wr[e]&&jsx(p,{title:r(Ht(e)),children:jsx(Tb,{src:wr[e],alt:"destination-icon"})})})}
|
|
2
|
+
export{MD as $,hv as $a,Ia as $b,PM as $c,Zl as A,Ww as Aa,rr as Ab,Wp as Ac,Pi as B,Hw as Ba,qs as Bb,Hp as Bc,yk as C,$w as Ca,xa as Cb,uA as Cc,To as D,Gw as Da,Xs as Db,ny as Dc,wo as E,qw as Ea,ha as Eb,Kp as Ec,TS as F,Qw as Fa,LP as Fb,xy as Fc,PS as G,r0 as Ga,Qo as Gb,Iy as Gc,MS as H,l0 as Ha,ir as Hb,Ty as Hc,kS as I,m0 as Ia,Qs as Ib,UA as Ic,FS as J,qi as Ja,ar as Jb,GA as Jc,HS as K,W6 as Ka,ep as Kb,hr as Kc,kn as L,Ng as La,tp as Lb,wy as Lc,ts as M,r4 as Ma,op as Mb,Py as Mc,vV as N,M0 as Na,np as Nb,QA as Nc,rT as O,L0 as Oa,pe as Ob,My as Oc,pT as P,F0 as Pa,rp as Pb,mE as Pc,Vb as Q,tC as Qa,ip as Qb,Fa as Qc,Wb as R,z0 as Ra,ap as Rb,Oy as Rc,Hb as S,uC as Sa,lp as Sb,$a as Sc,ZI as T,ov as Ta,Js as Tb,oc as Tc,aD as U,nv as Ua,lr as Ub,XE as Uc,cD as V,av as Va,kP as Vb,ZE as Vc,rt as W,pv as Wa,sp as Wb,ja as Wc,xD as X,hC as Xa,pp as Xb,Ka as Xc,Kt as Y,fv as Ya,cp as Yb,Xa as Yc,bD as Z,Cv as Za,hh as Zb,Ja as Zc,wD as _,xv as _a,ya as _b,fI as _c,P as a,kD as aa,RC as ab,BP as ac,PI as ad,gi as b,HD as ba,FC as bb,ba as bc,BI as bd,vn as c,Ce as ca,Dv as cb,VP as cc,$I as cd,Tt as d,qe as da,UC as db,mp as dc,ol as dd,tL as e,KD as ea,QC as eb,dp as ec,GI as ed,Qu as f,Yi as fa,ax as fb,up as fc,nl as fd,oL as g,uT as ga,zv as gb,yh as gc,rl as gd,ef as h,hT as ha,Kv as hb,FP as hc,jM as hd,tf as i,ST as ia,Cx as ib,NP as ic,z as j,PT as ja,oP as jb,WP as jc,of as k,kF as ka,Tx as kb,fp as kc,nf as l,LT as la,Rx as lb,Sa as lc,Ci as m,VT as ma,mP as mb,Ta as mc,Me as n,_T as na,g9 as nb,en as nc,ve as o,MN as oa,O as ob,bp as oc,Y as p,VN as pa,Fe as pb,Tp as pc,xi as q,_N as qa,ga as qb,wp as qc,En as r,jN as ra,EP as rb,vp as rc,lf as s,Kf as sa,Ks as sb,Ep as sc,aS as t,cw as ta,MP as tb,Mp as tc,pS as u,uw as ua,DP as ub,Dp as uc,uS as v,tg as va,RP as vb,mr as vc,CS as w,ng as wa,Ca as wb,zh as wc,vi as x,Mw as xa,oo as xb,Fp as xc,mf as y,Rw as ya,Ne as yb,pA as yc,df as z,kw as za,gh as zb,Np as zc};
|