@tap-payments/os-micro-frontend-shared 0.3.237-test.2 → 0.3.238

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.
Files changed (150) hide show
  1. package/build/_chunks/{chunk-7DMSRKG7.js → chunk-2XNQLMFM.js} +1 -1
  2. package/build/_chunks/{chunk-I7KBFAH7.js → chunk-43XF5CRO.js} +1 -1
  3. package/build/_chunks/{chunk-SYEHTDS6.js → chunk-5HOZNLSR.js} +1 -1
  4. package/build/_chunks/{chunk-6JLKJPL3.js → chunk-5Y3OU2UP.js} +1 -1
  5. package/build/_chunks/{chunk-V4YG7AP4.js → chunk-6A5SWPB6.js} +1 -1
  6. package/build/_chunks/chunk-6JPLHOZI.js +1 -0
  7. package/build/_chunks/{chunk-S4ZHXBPB.js → chunk-6QZVOWJ6.js} +1 -1
  8. package/build/_chunks/{chunk-7VEC4DRF.js → chunk-7XRUWRO6.js} +1 -1
  9. package/build/_chunks/{chunk-UCEEVW7S.js → chunk-BQ2KBU6T.js} +1 -1
  10. package/build/_chunks/{chunk-YNOCNDOA.js → chunk-BTKZVYP2.js} +1 -1
  11. package/build/_chunks/{chunk-CWNHOUN5.js → chunk-BYLK5XJE.js} +1 -1
  12. package/build/_chunks/{chunk-7THWDMHL.js → chunk-CF7XBOFD.js} +1 -1
  13. package/build/_chunks/chunk-DSDWO75H.js +1 -0
  14. package/build/_chunks/{chunk-6USHHZAA.js → chunk-EILAHGVW.js} +1 -1
  15. package/build/_chunks/{chunk-ECBP7JZ6.js → chunk-EQLCA7C5.js} +1 -1
  16. package/build/_chunks/{chunk-I6RRJ7ME.js → chunk-FBFQA3FH.js} +1 -1
  17. package/build/_chunks/{chunk-6FTMXMBZ.js → chunk-FGRPEMXW.js} +1 -1
  18. package/build/_chunks/{chunk-BQWD3KO4.js → chunk-FSYQDLRZ.js} +1 -1
  19. package/build/_chunks/{chunk-QLF4C46U.js → chunk-G6LS5UQQ.js} +1 -1
  20. package/build/_chunks/{chunk-BUPWQI3W.js → chunk-GK34VOCD.js} +1 -1
  21. package/build/_chunks/{chunk-5H7MD7LO.js → chunk-GOXECOLH.js} +1 -1
  22. package/build/_chunks/{chunk-B5TZKBR5.js → chunk-GPDV5GOU.js} +1 -1
  23. package/build/_chunks/{chunk-G3QKYZM2.js → chunk-GT3H3NIX.js} +1 -1
  24. package/build/_chunks/{chunk-NPCTL2R7.js → chunk-HUNQN3PG.js} +1 -1
  25. package/build/_chunks/chunk-IK6TO3FM.js +2 -0
  26. package/build/_chunks/{chunk-BA5OFEBT.js → chunk-INPKNRJG.js} +1 -1
  27. package/build/_chunks/{chunk-R6Y42OPH.js → chunk-ITT4ZZK7.js} +1 -1
  28. package/build/_chunks/{chunk-NZLNQKU2.js → chunk-JQ4RAYWG.js} +1 -1
  29. package/build/_chunks/{chunk-OBK62FOF.js → chunk-KFDZXGYC.js} +1 -1
  30. package/build/_chunks/{chunk-FWPVRT34.js → chunk-KKQCH4E6.js} +1 -1
  31. package/build/_chunks/{chunk-QHK62NO3.js → chunk-LAXNYZ2B.js} +1 -1
  32. package/build/_chunks/{chunk-3T7G4PAY.js → chunk-LIM4ZN7L.js} +1 -1
  33. package/build/_chunks/{chunk-LOFKIY7J.js → chunk-LIX5BAAS.js} +1 -1
  34. package/build/_chunks/{chunk-EJ2GRPAY.js → chunk-M44UZ3VI.js} +1 -1
  35. package/build/_chunks/{chunk-HWDODLOQ.js → chunk-M6P6RMTN.js} +1 -1
  36. package/build/_chunks/{chunk-7R6GKSYQ.js → chunk-N3J7SFM3.js} +1 -1
  37. package/build/_chunks/{chunk-QLXQSDL7.js → chunk-NAMY656Y.js} +1 -1
  38. package/build/_chunks/{chunk-SR3UFTU3.js → chunk-OQ3FO5YB.js} +1 -1
  39. package/build/_chunks/chunk-OYSUD47M.js +1 -0
  40. package/build/_chunks/{chunk-JG5OM35T.js → chunk-PTLHPNSH.js} +1 -1
  41. package/build/_chunks/{chunk-6E2SGPTJ.js → chunk-RUEG6MLM.js} +1 -1
  42. package/build/_chunks/{chunk-GLTYG62E.js → chunk-S6KU6TLU.js} +1 -1
  43. package/build/_chunks/{chunk-6RTZSBSD.js → chunk-SMEJI5LC.js} +1 -1
  44. package/build/_chunks/{chunk-7PLZT2KW.js → chunk-SSCOCVXS.js} +1 -1
  45. package/build/_chunks/{chunk-GP7PBSOF.js → chunk-T75OG2WZ.js} +1 -1
  46. package/build/_chunks/chunk-TJ6HQMDL.js +1 -0
  47. package/build/_chunks/chunk-V5LH2RXO.js +2 -0
  48. package/build/_chunks/{chunk-6ASQZ2RI.js → chunk-VJ7TCN2H.js} +1 -1
  49. package/build/_chunks/{chunk-JCFOE4DQ.js → chunk-W5VV3DNY.js} +1 -1
  50. package/build/_chunks/{chunk-QDW7GZN6.js → chunk-WRHR6LTZ.js} +1 -1
  51. package/build/_chunks/{chunk-BMSJV3FH.js → chunk-XMCBD5O6.js} +1 -1
  52. package/build/_chunks/{chunk-VV5IC3DP.js → chunk-YL3VBHEM.js} +1 -1
  53. package/build/_chunks/{chunk-U2PXB4YH.js → chunk-ZU3QYC6H.js} +1 -1
  54. package/build/components/ActionsDropdownMenu/index.js +1 -1
  55. package/build/components/ActiveFilterChip/index.js +1 -1
  56. package/build/components/Alert/index.js +1 -1
  57. package/build/components/AppServices/index.js +1 -1
  58. package/build/components/AppServicesBar/index.js +1 -1
  59. package/build/components/AppWindowWrapper/index.js +1 -1
  60. package/build/components/AvatarStack/index.js +1 -1
  61. package/build/components/Calender/index.js +1 -1
  62. package/build/components/ColorPicker/index.js +1 -1
  63. package/build/components/ColumnViews/index.js +1 -1
  64. package/build/components/ConfirmDialog/index.js +1 -1
  65. package/build/components/CountryFilter/index.js +1 -1
  66. package/build/components/CurrenciesMenu/index.js +1 -1
  67. package/build/components/CurrencyAmount/index.js +1 -1
  68. package/build/components/CurrencyAmountInput/index.js +1 -1
  69. package/build/components/CustomBackdrop/CustomBackdrop.d.ts +5 -0
  70. package/build/components/CustomBackdrop/index.d.ts +2 -0
  71. package/build/components/CustomBackdrop/index.js +1 -0
  72. package/build/components/CustomBackdrop/style.d.ts +4 -0
  73. package/build/components/DateFilter/index.js +1 -1
  74. package/build/components/DeviceIcon/index.js +1 -1
  75. package/build/components/DropdownMenu/index.js +1 -1
  76. package/build/components/ErrorToast/index.js +1 -1
  77. package/build/components/FileDropbox/index.js +1 -1
  78. package/build/components/FilePreview/index.js +1 -1
  79. package/build/components/FileUploader/index.js +1 -1
  80. package/build/components/FilterDropdown/index.js +1 -1
  81. package/build/components/Filters/index.js +1 -1
  82. package/build/components/FormSelect/index.js +1 -1
  83. package/build/components/GroupedSelect/index.js +1 -1
  84. package/build/components/HeatMap/index.js +1 -1
  85. package/build/components/IconWithBadge/index.js +1 -1
  86. package/build/components/InputBase/index.js +1 -1
  87. package/build/components/Inputs/index.js +1 -1
  88. package/build/components/JSONViewer/index.js +1 -1
  89. package/build/components/ListColumnFilter/index.js +1 -1
  90. package/build/components/ListHeader/index.js +1 -1
  91. package/build/components/Logo/index.js +1 -1
  92. package/build/components/MultiSelect/index.js +1 -1
  93. package/build/components/NestedDropdown/index.js +1 -1
  94. package/build/components/NestedMultiSelect/index.js +1 -1
  95. package/build/components/PaymentSourceFilter/index.js +1 -1
  96. package/build/components/PhoneFilter/index.js +1 -1
  97. package/build/components/PhoneInput/index.js +1 -1
  98. package/build/components/ProgressRing/index.js +1 -1
  99. package/build/components/RadioGroup/index.js +1 -1
  100. package/build/components/RangeCalender/index.js +1 -1
  101. package/build/components/RatingCount/index.js +1 -1
  102. package/build/components/ReferenceTypeFilter/index.js +1 -1
  103. package/build/components/SearchButton/index.js +1 -1
  104. package/build/components/SearchInput/index.js +1 -1
  105. package/build/components/Sidebar/index.js +1 -1
  106. package/build/components/StatusBar/index.js +1 -1
  107. package/build/components/StatusButton/index.js +1 -1
  108. package/build/components/StatusFilter/index.js +1 -1
  109. package/build/components/StatusIcons/index.js +1 -1
  110. package/build/components/StatusLabel/index.js +1 -1
  111. package/build/components/TableCells/index.js +1 -1
  112. package/build/components/TableReports/index.js +1 -1
  113. package/build/components/TextInput/index.js +1 -1
  114. package/build/components/TextInput/type.d.ts +1 -1
  115. package/build/components/Timepicker/index.js +1 -1
  116. package/build/components/Toolbar/index.js +1 -1
  117. package/build/components/TreeDropdown/index.js +1 -1
  118. package/build/components/VerificationIcon/index.js +1 -1
  119. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  120. package/build/components/VirtualTables/index.js +1 -1
  121. package/build/components/Widget/index.js +1 -1
  122. package/build/components/index.d.ts +1 -4
  123. package/build/components/index.js +1 -1
  124. package/build/components/primitives/Backdrop/style.d.ts +0 -1
  125. package/build/components/primitives/Backdrop/type.d.ts +1 -15
  126. package/build/components/primitives/index.js +1 -1
  127. package/build/index.js +1 -1
  128. package/package.json +2 -2
  129. package/build/_chunks/chunk-AVTZV3J7.js +0 -1
  130. package/build/_chunks/chunk-EGR5Q5OK.js +0 -1
  131. package/build/_chunks/chunk-GUXJEFPL.js +0 -2
  132. package/build/_chunks/chunk-J7R6JFXM.js +0 -1
  133. package/build/_chunks/chunk-JGQ3OM4B.js +0 -1
  134. package/build/_chunks/chunk-LFBTKZ3V.js +0 -1
  135. package/build/_chunks/chunk-R272ON3P.js +0 -1
  136. package/build/_chunks/chunk-WVCNMQRG.js +0 -1
  137. package/build/_chunks/chunk-XIJANCZT.js +0 -2
  138. package/build/components/RHFGroupedSelect/RHFGroupedSelect.d.ts +0 -5
  139. package/build/components/RHFGroupedSelect/index.d.ts +0 -2
  140. package/build/components/RHFGroupedSelect/index.js +0 -1
  141. package/build/components/RHFGroupedSelect/type.d.ts +0 -5
  142. package/build/components/RHFInput/RHFInput.d.ts +0 -8
  143. package/build/components/RHFInput/index.d.ts +0 -3
  144. package/build/components/RHFInput/index.js +0 -1
  145. package/build/components/RHFPhoneInput/RHFPhoneInput.d.ts +0 -11
  146. package/build/components/RHFPhoneInput/index.d.ts +0 -3
  147. package/build/components/RHFPhoneInput/index.js +0 -1
  148. package/build/components/RHFSwitch/RHFSwitch.d.ts +0 -11
  149. package/build/components/RHFSwitch/index.d.ts +0 -3
  150. package/build/components/RHFSwitch/index.js +0 -1
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-TJ6HQMDL.js';import {b as b$8,c as c$3}from'./chunk-BYLK5XJE.js';import {a as a$8}from'./chunk-WRHR6LTZ.js';import {a as a$c,f as f$2,e as e$1,b as b$b,g,d as d$4,c as c$5}from'./chunk-EQLCA7C5.js';import {a as a$f}from'./chunk-XMCBD5O6.js';import {a as a$7}from'./chunk-OYSUD47M.js';import {a as a$h}from'./chunk-G6LS5UQQ.js';import {a as a$1}from'./chunk-TDFNWFK7.js';import {a as a$6}from'./chunk-43XF5CRO.js';import {b as b$4}from'./chunk-GOXECOLH.js';import {b as b$1}from'./chunk-D23EYDCG.js';import {b as b$9}from'./chunk-6JPLHOZI.js';import {b as b$5}from'./chunk-FSYQDLRZ.js';import {a as a$e}from'./chunk-GK34VOCD.js';import {a as a$a,b as b$7}from'./chunk-ZONDSLTR.js';import {a as a$g,b as b$a,d as d$3,c as c$4}from'./chunk-T75OG2WZ.js';import {a as a$b}from'./chunk-52SSIU72.js';import {c as c$2}from'./chunk-BTKZVYP2.js';import {a as a$2}from'./chunk-MFZ3F3JQ.js';import {b as b$6}from'./chunk-OQ3FO5YB.js';import {a as a$9}from'./chunk-EILAHGVW.js';import {f,a as a$4,b as b$2,d as d$1,c as c$1,e}from'./chunk-CF7XBOFD.js';import {a as a$d}from'./chunk-GRKRA3TP.js';import {b as b$3,c,d as d$2}from'./chunk-INPKNRJG.js';import {a as a$5}from'./chunk-CTGKNHG3.js';import {t,p,z as z$1,j,V,R,b,L,D,d,v as v$1,f as f$1,r,x as x$1}from'./chunk-V5LH2RXO.js';import {n,r as r$1}from'./chunk-QWWU4QAA.js';import {a as a$3}from'./chunk-DSDWO75H.js';import {Bc,gc,Wa,wa,nc as nc$1,La as La$1,x,Cb as Cb$1,Bb,Ab as Ab$2,Va,cc as cc$1,_b,bb,vb as vb$2,wb as wb$1,Mb as Mb$1,yb,zb as zb$1,xb as xb$1,ac as ac$1,Aa,Ia as Ia$1,Da,Ha as Ha$1,fc as fc$1,o,ec as ec$1,f as f$3,t as t$1,gb}from'./chunk-L7L22FDR.js';import {Ab as Ab$1,xb,zb,Ud,Cj,pc,Bi as Bi$1,zi,Ai,Bh,Mg,Sh as Sh$1,Se,gk,ja as ja$1,yk,pk,F,E,dp as dp$1,Kj,Jj,Ij,Gj,Ej,Fj,Hj,hc as hc$1,ic,fc,ma as ma$1,Jl,Cb,Db,Eb as Eb$1,C,Xj,Ah,wb,fm,Kh as Kh$1,Jh as Jh$1,hb,vb as vb$1,uo,Ve as Ve$1,hm,Wc,Vc,Ze,Xe,Ye,Fb,dh as dh$1,ih as ih$1,jh as jh$1,gh,fh,ah as ah$1,bh,ch as ch$1,_g,$g as $g$1,kh as kh$1,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$2,bc,Oh as Oh$1,tk,lh as lh$1,wh,vh,uh as uh$1,th as th$1,sh,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 as Th$1,Uh,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 as Ih$1,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 as jf$1,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 as uc$1,Hi as Hi$1,ai,yd,Lk,Jk,Kk,Rb as Rb$1,vf as vf$1,yf,xf as xf$1,wf,uf as uf$1,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,ek,hk,fk,va,ua as ua$1,h,Sg,ko,Mo as Mo$1}from'./chunk-GCJPCGH3.js';import Pp,{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 Rb from'@mui/material/TableCell';import Sr from'@mui/material/Box';import VS from'@mui/material/SvgIcon';import Ht from'lodash/camelCase';import nc from'dayjs';import i0 from'dayjs/plugin/timezone';import a0 from'dayjs/plugin/utc';import Og from'lodash/startCase';import Nv from'@mui/material/Popover';import zv from'lodash/capitalize';import K1 from'@mui/material/ClickAwayListener';import $1 from'@mui/material/Popper';import rP from'@mui/material/Typography';import Th from'@mui/material/Button';import eA from'@mui/material/Menu';import xE from'@mui/material/CircularProgress';import ac from'@mui/material/LinearProgress';import gM from'lodash/values';import xM 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 Tb({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n}){let r=Bc(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$a,{"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$h,{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$a,{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$a,{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 Wu=Tb;var vb=Wu;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 Ou=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),_u=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 zu=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var jl={"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)"}},$u={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 Ab({transactionStatus:e,eci:t,authType:o,isTextShown:n}){let r=Bc(useId(),"auth-icons"),i=useMemo(()=>{let l=e?$u[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?jl[o]?.tooltip:jl[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(_u,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Ou,{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(zu,{id:r,"data-testid":"AuthIcons",children:a})}var Gu=Ab;var Eb=(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 Mb=Gu;var Yu=styled$1(Rb,{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 Vb=forwardRef(({children:e,...t},o)=>{let n=Bc(useId(),"table-cell");return jsx(Yu,{id:n,component:"div","data-testid":"TableCell",...t,ref:o,children:e})}),v=memo(Vb);var gi=styled("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t})=>({display:"flex",width:"17px",height:"12px",backgroundColor:t?gc(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)})),BR=styled("img")(()=>({width:"12px",height:"12px"})),ju=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"})),VR=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})),Ku=styled("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),qu=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}`})),Xu=styled(z)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),Zu=styled(z)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),Ci=styled(v)(()=>({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"}),Ju=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function Si(e){return e<5?5:e===100?95:e}var Qu=styled$1(Sr)({display:"flex",alignItems:"center",gap:"12px"});function Ub({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(v,{...i,children:jsxs(Qu,{children:[n&&jsx(gi,{sx:{visibility:"visible"},className:"geography-box",children:a}),jsx(Box,{sx:{...Wa(r)&&{fontSize:"11px"}},children:l})]})})}var En=Ub;function ef({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 qb({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(v,{...n,children:jsx("span",{children:i})})})}var Xb=qb;function Jb({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(v,{sx:{fontSize:"11px"},...n,children:i})}var Qb=Jb;var tf=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}})),of=styled$1("span")({width:"11.6px",height:"11.6px",flexShrink:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start"}),nf=styled$1("img")({width:"11.6px",height:"11.6px",borderRadius:"50%"});function oS({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=ac$1(i),x=i?.split(" ")?.map(b=>b?.[0]?.toUpperCase()).join(""),y=useMemo(()=>Aa(),[]),S=n&&jsx(p,{title:t,children:jsx(qu,{"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(v,{...c,"data-testid":"CustomerCell_TableCell",children:jsxs(tf,{"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(of,{"data-testid":"CustomerCell_StyledCustomerIconContainer",children:o&&jsx(nf,{src:G,"data-testid":"CustomerCell_StyledCustomerIcon"})}),!a&&jsx(p,{title:u,children:jsx(ju,{"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 nS=oS;function iS({children:e,customerName:t}){let o=ac$1(t);return jsx(wi,{tableMode:"sheet","data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":o,children:e})}var aS=iS;var vi=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:e.spacing(1)})),rf=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})),af=styled$1("span")(({theme:e,tableMode:t})=>({fontSize:Wa(t)?"11px":e.typography.body2.fontSize,lineHeight:"17px",fontWeight:"700"})),Xl=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 JL=({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(Xl,{sx:{textAlign:"right",justifyContent:"flex-end"},children:[jsx("span",{style:{fontWeight:"bold"},children:e?Da[e]:""}),jsxs(Xl,{children:[e!=="fx"&&jsxs(Pi,{children:[jsx("span",{children:"Customer Selected"})," ",jsxs("span",{children:[jsx(a$b,{currency:o})," ",l.integerAmount,".",l.decimalAmount]})]}),jsxs(Pi,{children:[jsx("span",{children:"Charge"})," ",jsxs("span",{children:[jsx(a$b,{currency:r})," ",s.integerAmount,".",s.decimalAmount]})]}),jsxs(Pi,{children:[jsx("span",{children:"Settlement"})," ",jsxs("span",{children:[jsx(a$b,{currency:a})," ",p.integerAmount,".",p.decimalAmount]})]})]})]})};var To=({tableMode:e,conversionType:t})=>t?jsx(rf,{tableMode:e,className:"conversion-type",children:t}):jsx(Fragment,{});var wo=({tableMode:e,amount:t,currency:o})=>jsx(af,{tableMode:e,children:t!==void 0?jsxs(Fragment,{children:[jsx("span",{children:jsx(a$b,{currency:o,fontSize:10})})," ",jsx(b$6,{amount:t,currency:o,sx:{fontSize:"inherit",fontWeight:"inherit"}})]}):jsx("span",{children:"-"})});var sf="default";function dS({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(v,{...i,children:jsxs(vi,{children:[jsx(p,{title:n||"",children:jsx(Box,{children:jsx(To,{tableMode:sf,conversionType:e})})}),o&&jsx(p,{title:jsx(a$b,{currency:o}),children:jsx(a$2,{currencyCode:o})}),jsx(p,{title:r,children:jsx(wo,{tableMode:sf,amount:t,currency:o})})]})})}var uS=dS;var pf="text";function gS({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...i}){return jsx(v,{...i,children:jsxs(vi,{children:[jsx(p,{title:n||"",children:jsx(To,{tableMode:pf,conversionType:e})}),jsx(p,{title:jsx(a$b,{currency:o}),children:jsx("span",{})}),jsx(p,{title:r,children:jsx(wo,{tableMode:pf,amount:t,currency:o})})]})})}var CS=gS;var cf="sheet";function hS({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 yS=hS;var df=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),uf=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})),Zl=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"})),ff=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var gf=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(()=>gf(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 SS({statuses:e,centerIconKey:t,...o}){let{statusesList:n}=Do({statuses:e,centerIconKey:t}),r=useTheme(),i=n.length||0;return jsx(v,{...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 TS=SS;function vS({statuses:e,...t}){let{statusesList:o}=Do({statuses:e});return jsx(v,{...t,children:jsx(ff,{sx:{paddingRight:"30px"},children:o.map((n,r)=>jsx(Fragment$1,{children:n},r))})})}var PS=vS;function ES({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(v,{...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 MS=ES;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}})),Cf=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 xf({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,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"success-icon"):e?jsx(Ve,{src:fc,className:"spinner-loader"},"spinner-icon"):jsx(p,{title:r("moreActions"),children:jsx(Cf,{alt:"more",src:ma$1,isActive:n},"ellipsis-icon")})}xf.displayName="ActionIconsVariants";var kn=memo(xf);var Ro={GRAY:{icon:zb,color:"#CFCFCF"},ORANGE:{icon:xb,color:"#FFD503"},RED:{icon:Ab$1,color:"#FF0000"}},Li={"#CFCFCF":"gray","#FFD503":"orange","#FF0000":"red",gray:"gray",red:"red",orange:"orange"},ki={flag:E,dispute:F,refund:pk,void:yk,capture:ja$1,cancel:gk,clock:Se,reverse:Sh$1,destination:Mg,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 hf=e=>jsx(VS,{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 If=".IDButton-root:not(.IDButton-hoverDisabled):hover &",bf=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",[If]:{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}})),Sf=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"},[If]:{gridTemplateColumns:"1fr",opacity:1,transition:"grid-template-columns 0.3s ease, opacity 0.3s ease 0.3s"}}));function OS({icon:e=jsx(hf,{}),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:nc$1("IDButton-root",n&&"IDButton-hoverDisabled",i),sx:{position:"relative",width:"24px",height:"24px",cursor:"pointer",...o},...a,children:jsxs(bf,{className:"IDButton-button",children:[t?jsx(Sf,{className:"IDButton-rowId",children:jsx("span",{children:t})}):null,t?jsx(D,{className:"IDButton-icon",icon:e,text:t,onClick:()=>r?.()}):null]})})})}var es=memo(OS);var rV=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:P,handleClick:A,handleClose:D,setAnchorEl:E}=Bi({actions:t,isDropdownShown:a,onCloseDropdown:i,renderDropdown:f$1});return jsx(v,{...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(es,{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(Ku,{"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":P,sx:{...!P&&{pointerEvents:"none"}},children:[jsx(vn,{onClick:A,"data-testid":"ActionCell_ActionsIconContainer_TransparentButton","data-is-active":P,sx:{...!P&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(kn,{isAnyActionLoading:I,isAnyActionHasError:w,isAnyActionSuccessful:T,areThereAnyShownActions:P})})}),r,f$1?f$1(h,E):jsx(Fragment,{children:P&&jsx(f,{style:{zIndex:2e3},open:g,onClose:D,anchorEl:h,menuItems:b.map(V=>({...V,onClick:H=>{V?.onClick?.(H),V.hasActionMenu||D();},onRightClick:H=>{V?.onRightClick?.(H),D();},icon:V.customIcon||jsx(Ve,{icon:V.icon,src:V.iconSrc??(V.icon&&ki[V.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${V.label.trim()}`)}))})})]})]})]})})});function jS({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(v,{...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 KS=memo(jS);function JS({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(v,{...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 QS=memo(JS);function oT({deviceType:e,geographyVariant:t,isTextShown:o,deviceCountry:n,...r}){return jsx(v,{...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 nT=oT;var vf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),position:"relative",minWidth:"23px",height:"24px"})),Pf=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`})),Af=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 Ef=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 lT({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(Af,{children:[jsx(Ef,{src:z$2,pointLeft:i==="left"}),p$1&&jsx(vf,{children:jsx(Pf,{children:e})})]})})})}var sT=lT;function mT(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$b,{currency:i?.currency})," ",s]},i?.id||a)})})}var dT=mT;function gT({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$b,{currency:l?.[0]?.currency})," ",p$1.integerAmount,".",p$1.decimalAmount," +",e-1]}):jsxs("div",{children:["Destination ",l?.[0]?.id," - ",jsx(a$b,{currency:l?.[0]?.currency})," ",s.integerAmount,".",s.decimalAmount]})})})})}var CT=gT;var dN=({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$b,{currency:r?.currency})," ",i.integerAmount,".",i.decimalAmount]},r?.id)})]}):jsxs("div",{children:["Destination ",o?.[0]?.id," - ",jsx(a$b,{currency:o?.[0]?.currency})," ",t.integerAmount,".",t.decimalAmount]})};var Rf=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"})),Lf=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 kf(e){return e<5?5:e===100?95:e}function bT({percentage:e=0,days:t,remainingAmount:o=0,currency:n,...r}){let i=useTheme(),a=jsx(a$b,{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(v,{...r,children:jsx(p,{title:m,placement:"top",children:jsx("div",{style:{height:24},children:jsxs(Rf,{whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:22},variants:{animate:{...!!t&&{boxShadow:i.shadows[4]}}},children:[jsxs(Lf,{percentage:e,children:[e,"% ",jsx(xi,{percentage:kf(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 ST=bT;function wT({remainingAmount:e,currency:t}){let o=jsx(a$b,{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=wT;var ls=["authenticationMode","paymentAuth","paymentAgreement"],ss=["paymentIssuer","paymentInitiated","paymentDevice"],Bf=["paymentMethod","paymentType","paymentScheme","paymentCardNumber",...ss,...ls];var Ff=styled$1(Sr)(()=>({marginRight:"8px",display:"flex",alignItems:"center",gap:"4px"})),Wf=styled$1(Sr)(()=>({marginLeft:"8px",width:20}));function DT(e){let{centerIcon:t,centerIconId:o}=useMemo(()=>{for(let a of Bf)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:ss.filter(a=>a!==o&&e?.[a]).map(a=>e?.[a]),rightIcons:ls.filter(a=>a!==o&&e?.[a]).map(a=>e?.[a]),expandableCenterRight:(n||r)&&jsxs(Ff,{children:[n&&e.paymentScheme,r&&e.paymentCardNumber]}),expandableCenterLeft:i&&jsx(Wf,{children:e.paymentType})})}var RT=memo(DT);var Of=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function sF({card:e,paymentMethod:t,paymentType:o,paymentScheme:n}){let{t:r}=useTranslation();if(!e.last_four)return null;let i=e?.name||`${r(Ht(fc$1(t,n)?o:n))} - ${e?.last_four}`;return jsx(p,{title:i,children:jsxs(Of,{children:["\xB7\xB7\xB7 ",e?.last_four]})})}function fF({method:e}){let{t}=useTranslation();return e?jsx(qe,{source:Ce(e)??e,title:`Payment Method - ${t(Ht(e))}`}):null}function IF({type:e}){let{t}=useTranslation();return e?jsx(qe,{source:Ce(e)??e??"",title:`Payment Type - ${t(Ht(e))}`}):null}function PF({scheme:e}){let{t}=useTranslation();return e?jsx(qe,{source:Ce(e)??e,title:`Payment Scheme - ${t(Ht(e))}`}):null}var zf=({mode:e})=>e?jsx(p,{title:dp$1[e],children:jsx(Sr,{component:"img",src:e==="C"?da$1:ca$1})}):null;var Ni={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"}},Fi={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"})),$f=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"})),Uf=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ps=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 QT({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n,...r}){let i=useTheme(),{t:a}=useTranslation(),l=useMemo(()=>[...t?[Fi.SAVED_TOKEN]:[],...(o||0)>0?[Fi.COUNT]:[],...e&&Ni[e]?[Ni[e]]:[]],[t,o,e]),s=d=>n?jsx(a$a,{"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:Fi.COUNT.color},children:["x",o]})})})},d):jsx(a$h,{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$a,{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(ps,{src:d.icon,alt:"agreement"})},d.color)},d.color)),m=p$1.length,c=jsx(p,{title:"No agreement",children:jsx(a$a,{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(ps,{src:Ci$1,alt:"no-agreement"})},"no-agreement")},"no-agreement");return jsx(v,{...r,children:jsx(Uf,{"data-testid":"AgreementCell",children:jsx($f,{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 ew=QT;var Yf=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 ow({hasAuth:e,tooltip:t,isTextShown:o,align:n,...r}){return jsx(v,{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(Yf,{src:na,alt:"icon","data-testid":"AuthCell_AuthIcon"})})}):null})}var nw=ow;var jf={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},Kf={REFUNDED:"refunded"};function qf({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:jf[e],alt:"refund-requested"})})})}function Zf({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(qf,{status:e,refundTooltip:l})}var Jf=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})),Qf=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})),eg=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 tg=styled$1("img")({width:"14px",height:"14px"}),og=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 cs({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(Kf.REFUNDED)}),o]}),children:jsxs(Jf,{whileHover:["animate","fadeIn"],animate:"start",variants:{...r&&{animate:{boxShadow:d.shadows[4]}}},sx:{...!r&&{backgroundColor:"transparent"}},children:[jsx(tg,{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(Qf,{children:jsx(eg,{value:f})})})]})}):jsx(Zf,{status:e,refundTooltip:o,gatewayTooltip:i,unCapturedTooltip:a,acquirerTooltip:l,errorCode:s,acquirerCode:p$1,gatewayCode:m})}var rg=()=>{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 hw({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=rg(),y=useCallback(g=>nc(g).format("MMM D, YYYY"),[]),S=Ln.includes(e);return jsx(v,{...u,style:{overflow:"visible"},children:jsx(Me,{children:jsx(og,{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(cs,{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 yw=hw;var ag=styled("img")(()=>({width:"16px",height:"16px"})),lg=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),sg=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`})),pg=styled("span")(({theme:e})=>({color:e.palette.info.dark,fontSize:"14px",lineHeight:"16.8px"}));function Iw({walletId:e,country:t,showCountry:o=true,...n}){return jsx(v,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(lg,{children:[o&&t&&jsx(p,{title:La$1(t),children:jsx(a$2,{countryCode:t})}),jsxs(sg,{children:[jsx(ag,{src:ac$2,alt:"wallet-icon"}),e&&jsxs(pg,{children:["\xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var bw=Iw;var cg=styled("img")(()=>({width:"16px",height:"16px"})),mg=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),dg=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}`})),ug=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 Sw({walletId:e,country:t,name:o,...n}){return jsx(v,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(mg,{children:[t&&jsx(p,{title:La$1(t),children:jsx(a$2,{countryCode:t})}),jsxs(dg,{children:[jsx(cg,{src:bc,alt:"bank-icon"}),e&&jsxs(ug,{children:[o," \xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var Tw=Sw;var us={PAID_OUT:nk,SETTLED:tk,PENDING:Oh$1,INITIATED:Oh$1,FAILED:kk};function Aw({payoutStatus:e="PAID_OUT",...t}){let{t:o}=useTranslation(),n=useTheme();return jsx(v,{...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&&us[e]&&jsx(p,{title:o(Ht(e)),children:jsx(Y,{src:us[e],alt:"settled-icon",style:{width:"16px",height:"16px",objectFit:"contain"}})})})})})}var Ew=Aw;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 Mw=styled$1("span")(({theme:e})=>({textDecorationLine:"underline",color:e.palette.info.dark}));var fs=a$c;function Lw({status:e,chargeStatus:t,isTextShown:o,...n}){let{t:r}=useTranslation();return jsx(v,{...n,children:jsxs(Me,{children:[jsx(Yi,{status:e,isTextShown:o}),t&&fs[t]&&jsx(p,{title:r(Ht(t)),children:jsx(Y,{src:fs[t],alt:"charge-icon"})})]})})}var kw=Lw;var Vw={FAILED:dh$1,PENDING:kh$1,INITIATED:$g$1,ATTEMPTED:_g,EXEMPTED:ch$1,EXEMPTED_WITH_TRANSACTION:ch$1,EXEMPTED_WITHOUT_TRANSACTION:bh,REJECTED:ah$1,UNAVAILABLE:fh,UNDETERMINED:gh,SUCCESS:jh$1,AUTHENTICATED:ih$1,AUTHENTICATED_WITH_TRANSACTION:ih$1,AUTHENTICATED_WITHOUT_TRANSACTION:ih$1,AUTHENTICATED_AUTHORIZE_FAILED:dh$1},gs={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,UNDETERMINED:th$1,SUCCESS:uh$1,AUTHENTICATED:vh,AUTHENTICATED_WITH_TRANSACTION:vh,AUTHENTICATED_WITHOUT_TRANSACTION:wh,AUTHENTICATED_AUTHORIZE_FAILED:lh$1},Zt=a$c;function Ww({status:e,authorizedStatus:t,chargeStatus:o,chargeTooltip:n,gatewayTooltip:r,acquirerTooltip:i,errorCode:a,...l}){let{t:s}=useTranslation(),p$1=useTheme(),m=[e&&gs[e]?jsx(p,{title:s(Ht(e)),children:jsx("img",{src:gs[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(v,{...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 Hw=Ww;var xs={issuer:Xh,scheme:Yh$1,device:Vh,app:Uh,wallet:Th$1,biometric:Vh};function zw({type:e,...t}){let{t:o}=useTranslation();return jsx(v,{...t,children:jsx(Me,{children:jsx(ve,{className:"authentication-status",children:e&&xs[e]&&jsx(p,{title:o(Ht(e)),children:jsx(Y,{src:xs[e],alt:"authentication-type"})})})})})}var $w=zw;var fg={SMS:$d,EMAIL:Xd,WHATSAPP:ae};var gg=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Cg=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),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"})),hg=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),yg=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),Ig=(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 jw({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:Ig(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(yg,{children:jsx(hg,{sx:{color:i[p$1]},children:c})}):jsx(Cg,{src:fg[p$1],alt:p$1})})},`${p$1}-${m}`)}),s=l?.length||0;return jsx(v,{...o,children:jsx(gg,{children:l?.length>0?jsx(xg,{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 Kw=jw;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 bg=styled(j)(({theme:e})=>({fontSize:"11px",fontWeight:500,color:"#000",cursor:"default"}));function Xw({dueDate:e,expiryDate:t,...o}){let n=useMemo(()=>({label:Un(nc(e).valueOf()),tooltip:"Due Date"}),[e]),r=useMemo(()=>({label:Un(nc(t).valueOf()),tooltip:"Expiry Date"}),[t]),i=s=>jsx(p,{title:s.tooltip,children:jsx(bg,{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(v,{...o,sx:{position:"relative",overflow:"visible"},children:jsx(a$1,{sx:{justifyContent:"flex-start"},centerIcon:a,rightIcons:l})})}var Zw=Xw;var Tg=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 hs=styled("img")({width:"24px",height:"24px"});function e0({products:e,...t}){let o=e?.map((r,i)=>jsx(hs,{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(Tg,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:"10px 0px 8px 0px #F2F2F2"}},children:[jsx(hs,{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(v,{...t,style:{overflow:"visible"},children:jsx(Me,{children:jsx("div",{style:{width:"30px",position:"relative",zIndex:24},children:n})})})}var t0=e0;function qi(e){return jsx(Ci,{...e,children:jsx(p,{title:e.tooltip||e.children,children:e.children})})}var Ag=styled$1(Sr)(()=>({display:"flex",alignItems:"center",gap:"8px"})),Eg=styled$1(Sr)(({theme:e})=>({fontSize:"14px",color:e.palette.text.primary,lineHeight:"16.8px"}));function xH({currency:e}){return jsxs(Ag,{children:[jsx(a$2,{currencyCode:e}),jsx(Eg,{children:e})]})}nc.extend(a0);nc.extend(i0);function Rg({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(v,{...t,children:o})}var Lg=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 FH({reference:e}){return e?jsx(p,{title:`Bank - ${e}`,children:jsx(Lg,{children:jsx(Sr,{component:"img",src:ob$1,alt:"bank",width:14})})}):jsx(Fragment,{})}var ys={acquirer:ob$1,generic:pb,payment:Zd,gateway:rn,order:Yd};var kg=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Bg=styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),Vg=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"})),Ng=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),Fg=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));styled("div")(()=>({height:"18px"}));var Wg=(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 C0=120,x0=50;function h0({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(ys).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();},C0);};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,x0));},b=d.length;return jsx(v,{...o,children:jsx(kg,{children:b>0?jsx(Vg,{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)||`${Og(I)} - ${o[I]}`,P=i===I;return jsx(b$7,{order:w,variants:Wg(w,c.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},onMouseEnter:()=>g(I),onMouseLeave:h,children:jsx(p,{open:P,disableHoverListener:true,disableInteractive:true,title:P?T:"",children:e?jsx(Fg,{children:jsx(Ng,{children:Og(I)})}):jsx(Bg,{src:ys[I],alt:I,sx:{...I==="order"&&{width:"11.82px"}}})})},`${I}-${w}`)})}):null})})}var y0=h0;var Is={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,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"}},bs={"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 zg=styled(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),$g=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 Ug=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"})),Gg=(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}}}),Yg=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}));function b0({transactionStatus:e,isTextShown:t,eci:o,authType:n,...r}){let i=useTheme$1(),a=useMemo(()=>{let p=Is[e??"noAuth"]??Is.noAuth,m=p?.tooltip,c=p?.icon;return [{tooltip:m,content:t?m:c,type:t?"text":"icon"},...n?[{tooltip:n,content:t?bs[n]?.tooltip:bs[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(Yg,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(z,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":p$1.content,children:p$1.content})}):jsx($g,{src:p$1.content,alt:p$1.tooltip});return jsx(p,{title:p$1.tooltip,children:jsx(b$7,{order:-1*m,variants:Gg(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(v,{...r,children:jsx(zg,{children:s>0?jsx(Ug,{layout:true,className:"authentication-sources-container",whileHover:"animate",animate:"start",sourcesCount:s,variants:{animate:{width:38}},style:{zIndex:29},children:l}):null})})}var S0=b0;var Ss={checkout:Ch$1,checkoutSuccess:Dh};function v0({status:e,...t}){let{t:o}=useTranslation();return jsx(v,{...t,sx:{overflow:"visible"},children:jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:e&&Ss[e]&&jsx(p,{title:o(Ht(e)),children:jsx(Y,{src:Ss[e],alt:"checkout-icon"})})})})}var P0=v0;var Ts={TRANSACTED:Ih$1,INITIATED:Gh$1,CANCELLED:Hh$1,EXPIRED:Fh};function qg({status:e,chargeStatus:t,...o}){let{t:n}=useTranslation();return jsx(v,{...o,sx:{overflow:"visible"},children:jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",overflow:"visible"},children:[e&&Ts[e]&&jsx(p,{title:n(Ht(e)),children:jsx(Y,{src:Ts[e],alt:"intents-icon"})}),t&&Zt[t]&&jsx(p,{title:n(Ht(t)),children:jsx(rt,{chargeStatus:t})})]})})}var Zg=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"})),Jg=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 Qg(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 R0({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(v,{...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(Zg,{whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{gap:"4px"}},sx:{...a&&{height:"auto",padding:"0",backgroundColor:"transparent"}},children:[jsx(Jg,{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:Qg(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 L0=R0;var oC={DELETED:_if,DRAFT:jf$1,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 vs=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"})),nC=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"})),rC=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));function iC(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 aC({chargeStatus:e,chargeTooltip:t,errorCode:o,iconStyles:n,iconWrapperStyles:r}){let{t:i}=useTranslation(),a=e?b$b[e]:null,l=e&&a$c[e]&&jsx(rC,{style:r,children:jsx(Y,{src:a$c[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(nC,{style:{background:a?.color},children:o})]})}):null}function lC({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?oC[e]:null,c=iC(e),d=`${s(e?.toLowerCase()||"")} ${Un(nc(t).valueOf())}`,u=useMemo(()=>jsx(aC,{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(vs,{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(vs,{src:m,alt:"status icon"})});if(n&&Zt[n])return u;if(a)return f},[m,n,a]);return !e&&!n&&!a?null:jsx(v,{...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 G0({tooltip:e,children:t,badge:o,...n}){return jsx(v,{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 Y0=G0;var Es={ACTIVE:gi$1,EXPIRED:fi$1,PENDING:gi$1,SAVED:di$1,TRANSACTED:ei,CONSUMED:ei};var j0=(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))(j0||{});function q0({status:e,chargeTooltip:t,gatewayTooltip:o,acquirerTooltip:n,errorCode:r,cardId:i,hasChargeIcon:a,hasAuthorizedIcon:l,...s}){let{t:p$1}=useTranslation();return jsx(v,{...s,sx:{position:"relative",overflow:"visible"},children:jsxs(Me,{sx:{gap:"0.5rem"},children:[e&&Es[e]&&jsx(p,{title:p$1(Ht(e)),children:jsx(Y,{src:Es[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 X0=q0;var Ds=styled("img")(()=>({maxWidth:"13px",maxHeight:"13px"})),pC=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 J0({brandName:e,brandIcon:t,...o}){return jsx(v,{style:{textAlign:"center",overflow:"visible"},...o,children:jsxs(cC,{children:[jsx(pC,{children:t?jsx(p,{title:e,children:jsx(Ds,{src:t,alt:"brand icon",onError:r=>{r.currentTarget.src=zi;}})}):jsx(Ds,{src:zi,alt:"brand icon"})}),jsx("span",{children:e})]})})}var Q0=J0;function dC({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 fC=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"})),gC=styled$1(motion.img)(()=>({width:"16px",height:"16px"}));var rv=({onClick:e,isSettlementsAvailable:t,isDownloadError:o,isDownloadLoading:n,isDownloadSuccess:r})=>{let i=useMemo(()=>n||r||o,[n,r,o]),a=useMemo(()=>r?ic:o?hc$1:Yj,[r,o]);return jsx(p,{title:t?"":"Pending",children:jsx(fC,{onClick:()=>t&&!i&&e(),children:jsx(AnimatePresence,{mode:"wait",initial:false,children:n?jsx(a$d,{},"spinner"):jsx(gC,{src:t?a:Zj,alt:"Download Report"})})})})};var av=({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 lv=({receiptId:e})=>jsx(Ci,{children:jsx("span",{children:e})});var sv=({receiptId:e})=>jsx(qi,{children:jsx("span",{children:e})});var yC=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"}})),IC=styled(Sr)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"}));styled("img")(()=>({width:"16px",height:"11.73px"}));var bC=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"}})),SC=styled("img")(()=>({width:"10.5px",height:"10.5px"})),TC=styled("div")({marginLeft:"auto",width:"auto"});var wC={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};function vC({entity:e,country:t,verificationStatus:o,licenseNumber:n,hideStatus:r,...i}){let a=wC[o??"incomplete"];return jsx(v,{...i,sx:{cursor:i?.onClick?"pointer":"default"},children:jsx(p,{title:e,children:jsx(yC,{hasClick:!!i?.onClick,licenseNumber:n,children:jsxs(IC,{children:[jsx(p,{title:t?La$1(t):"",children:jsx(a$2,{countryCode:t})}),jsx(bC,{licenseNumber:n,children:n||"Not Available"}),!r&&jsx(TC,{children:jsx(SC,{src:a})})]})})})})}var PC=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),AC=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 EC=(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 DC({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$1: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:EC(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$e,{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(v,{...i,children:jsx(PC,{children:f>0?jsx(AC,{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 RC=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),LC=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"})),kC=styled("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),BC=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"})),VC=(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 NC=e=>{let t="";switch(e.type){case "technology":case "institution":t="Payment";break;default:t="";break}return `${t} ${gb(e.type)} - ${e.name}`};function yv({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||NC(s),d=s.type,u=m?Zn.platform:Zn[d];return jsx(b$7,{order:p$1,variants:VC(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(BC,{children:jsx(kC,{children:Og(s.name)})}):jsx(a$e,{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(v,{...o,children:jsx(RC,{children:l>0?jsx(LC,{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 Iv=yv;function WC({marketPlaceIcon:e,marketPlaceName:t,...o}){return jsx(v,{...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$1,alt:"marketplace",style:{maxWidth:"18px",maxHeight:"18px",objectFit:"cover"}})}),jsx(Typography,{noWrap:true,sx:{fontSize:"14px",fontWeight:400},children:t})]})})})}var HC={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};var OC=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1.029px solid #F2F2F2",borderRadius:"44px",padding:"4px 8px",lineHeight:"120%"})),_C=styled("div")(({theme:e})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"84px"})),zC=styled("img")(()=>({width:"10.5px",height:"10.5px"})),$C=styled("span")(({theme:e})=>({fontSize:"9.5px",fontWeight:400,color:e.palette.common.white,backgroundColor:e.palette.grey[700],borderRadius:"4px",padding:"1px 2px"})),UC=styled("div")({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}),GC=styled("div")({display:"flex",alignItems:"center",gap:"8px"}),YC=styled("div")({fontWeight:400,fontSize:14,lineHeight:"120%",letterSpacing:0,color:"#B1B1B1",textAlign:"center",width:"100%"});function jC({id:e,status:t,count:o,name:n,...r}){let i=HC[t??"incomplete"];return jsx(v,{...r,sx:{cursor:"pointer"},children:jsx(p,{title:n,children:jsx(OC,{children:e?jsxs(UC,{children:[jsx(_C,{children:e}),jsxs(GC,{children:[jsx(zC,{src:i}),o>1&&jsx("div",{children:jsxs($C,{children:["+",o-1]})})]})]}):jsx(YC,{children:"Not Available"})})})})}var KC=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"})),qC=styled(Sr)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"})),XC=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"}})),ZC=styled("img")(()=>({width:"10.5px",height:"10.5px"})),JC=styled("div")({marginLeft:"auto",width:"auto"});var QC={incomplete:Gj,complete:Fj,reviewed:Fj,verified:Hj};function ex({brand:e,verificationStatus:t,hideStatus:o,brandLogo:n,...r}){let i=QC[t??"incomplete"];return jsx(v,{...r,children:jsx(p,{title:e.name,children:jsx(KC,{hasClick:!!r.onClick,children:jsxs(qC,{children:[n,jsx(XC,{brandName:e.name,children:e.name||"Not Available"}),!o&&jsx(JC,{children:jsx(ZC,{src:i})})]})})})})}var tx=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ox=styled("img")(()=>({maxWidth:"36px",maxHeight:"16px"})),nx=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 rx=(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"}}}),ix=styled(Box)(()=>({display:"flex",gap:"4px",maxWidth:"440px",justifyContent:"space-between",height:"18px"}));var Ev=e=>!e.startsWith("http://")&&!e.startsWith("https://"),ia=e=>/^https?:\/\//i.test(e),ax=(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 Mv(e,t);case "ios":case "android":case "mobile_app":return Dv(e,t);default:return e}},Mv=(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},Dv=(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,lx=e=>{!e||typeof e!="string"||window.open(Ev(e)?`https://${e}`:e,"_blank","noopener,noreferrer");};function Rv({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=ax(r.address??"",r.code??"");return jsx(p,{title:a,children:jsx(b$7,{order:i,variants:rx(i,0,s),sx:{width:"36px",cursor:p$1?"pointer":"default"},onClick:()=>{r?.address&&lx(p$1);},children:jsx(ox,{src:r.logo,alt:l})})},`${r}-${i}`)}),n=o?.length||0;return jsx(v,{...t,children:jsx(tx,{children:o?.length>0?jsx(nx,{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 Lv=Rv;function Fv({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(ix,{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(Nv,{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 Wv=Fv;var Bs={active:uf$1,completed:vf$1,closed:wf,expired:xf$1,ready:yf,registered:vf$1};var px=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(v,{...t,children:e&&Bs[e]&&jsx(p,{title:o(zv(Ht(e))),children:jsx(px,{children:jsx(a$e,{mainIcon:Bs[e],mainIconSize:16,containerSize:16,borderColor:"transparent"})})})})}var mx={SAVED_CARD:"Card Agreement",ORDER:"Order",SUBSCRIPTION:"Subscription",INSTALLMENT:"Installment"};function Gv({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&&mx[e]}),i&&jsx(b$1,{copyTrigger:"press",copyText:i,sx:{minWidth:"38px"},...n,children:i})]})}var Yv=Gv;var ux={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 gx=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})),Cx=styled("img")(()=>({width:"100%",height:"100%",objectFit:"contain"}));function xx({provider:e,...t}){let o=ux[e];return o?jsx(gx,{children:jsx(Cx,{src:o,alt:e})}):jsx(v,{...t,children:jsx(z,{children:e})})}var hx={CHARGE:Vk,AUTHORIZE:zk,SAVE_TOKEN:Yg$1},yx={CHARGE:"Charge",AUTHORIZE:"Authorization",SAVE_TOKEN:"Save Token"},Ix={CHARGE:{backgroundColor:"#1F88D01A",color:"#1F88D0",border:"none"},AUTHORIZE:{backgroundColor:"#FFFFFF",color:"#1F88D0",border:"#1F88D01A"},SAVE_TOKEN:{backgroundColor:"#1F88D00D",color:"#1F88D0",border:"#1F88D01A"}};var bx=styled(Sr,{shouldForwardProp:e=>!["purposeType"].includes(e)})(({purposeType:e})=>{let t=Ix[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}}),Sx=styled("img")(()=>({width:"16px",height:"16px",objectFit:"contain",flexShrink:0})),Tx=styled("span")(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}));function vx({purpose:e,...t}){let o=hx[e],n=yx[e];return jsxs(bx,{purposeType:e,...t,children:[jsx(Sx,{src:o,alt:e}),jsx(Tx,{children:n})]})}var Ax=8,Zv=16,Lt=Ax*2+Zv,Ex=100,Mx=6,Jv=Lt+Mx+Ex,Dx=styled$1(v)(()=>({position:"relative",overflow:"visible",width:Lt,minWidth:Lt,maxWidth:Lt,display:"inline-flex",padding:0})),Rx=styled$1(Sr)(()=>({position:"relative",width:Lt,height:24,flexShrink:0,overflow:"visible"})),Lx=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:Mx,paddingInline:Ax,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:Jv,zIndex:100,boxShadow:"0px 0px 16px 0px #00000021","& .link-cell-label":{maxWidth:Ex,opacity:1}}}})),kx=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 e1({url:e,label:t}){let o=n(),n$1=()=>{try{bb(e),o.success("Copied!");}catch{o.error("Failed to copy");}};return e?jsx(Dx,{children:jsx(Rx,{children:jsxs(Lx,{hasLabel:!!t,onClick:n$1,children:[jsx(d,{src:Jl,alt:"link"}),t&&jsx(kx,{className:"link-cell-label",children:t})]})})}):null}var t1=memo(e1);function K$({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(Nv,{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 Bx="ListHeader";var Vx=styled(Box)(({theme:e})=>({backgroundColor:e.palette.background.default,paddingInline:e.spacing(4),paddingBottom:e.spacing(2),paddingTop:e.spacing(2),overflowX:"clip"})),Nx=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)})),Fx=styled(j)(({theme:e})=>({fontSize:"1.75rem",fontWeight:e.v2.typography.fontWeightMedium,lineHeight:"120%"})),Wx=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%"})),Hx=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1)})),Ox=styled(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"8px",flexShrink:0}));function ca({children:e,component:t="header",...o}){return jsx(Vx,{component:t,...o,children:e})}function ma({title:e,toolbar:t}){return jsxs(Nx,{children:[jsx("span",{children:!!e&&jsx(Fx,{children:e})}),t]})}function da({status:e,activeFilter:t,beforeStatus:o}){let n=t?.visible??false;return jsxs(Hx,{as:"aside",children:[o,jsx(a$8,{status:e?.value,availableStatuses:e?.options,onStatusChange:e?.onChange,isActiveFilterVisible:n,buttonSx:e?.buttonSx}),jsx(a$9,{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})),Ux=styled(Box)(({theme:e})=>({display:"flex",flexDirection:"column",height:"calc(100% - 32px)",backgroundColor:e.palette.background.paper,position:"relative"})),Gx=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:16,paddingRight:16,paddingBottom:64})),Yx=styled(Box)(()=>({padding:"24px 0",display:"flex",justifyContent:"space-between",alignItems:"center"})),jx=styled(Box)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:0})),Kx=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]}})),qx=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"}})),Fs=styled(Box)(()=>({width:20,height:20,marginRight:8,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),Ws=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0})),Xx=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)"})),Zx=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 Jx=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"}})),Qx=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 Hs={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}},eh=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"})),th=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}})),oh={p:0,width:14,height:14,minWidth:14,minHeight:14,"& .MuiSvgIcon-root":{width:16,height:16}},nh=styled(Box)(()=>({minWidth:200,display:"flex",flexDirection:"column",maxHeight:"80vh",overflow:"hidden"})),rh=styled(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:6,paddingRight:6,minHeight:0})),ih=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})),ah={fontSize:11,fontWeight:400,textTransform:"none",color:"text.primary",minWidth:80,height:38,borderRadius:"8px",border:"1px solid",borderColor:"divider"},lh=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 _s(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 C1(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 zs(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=C1(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 Us({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 Ys({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",Ne=(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},h1=(e,t)=>{if(!t?.length)return [];let o=e==="sheet"?"sheet":"advanced",n=t.find(r=>r.code.toLowerCase()===o);return n?ga([n]):[]},js=(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}},y1=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 I1=(e,t,o=false)=>({label:e,id:`custom_${Date.now()}`,columns:t.map(n=>n.name),submenu:t,isCustom:true,default:o}),b1=(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,Fe=e=>!oo(e),ph=e=>Fe(e),rr=e=>e.filter(ph).length,Ks=e=>e.filter(Fe).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$2,u=wb$1,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=>!Ne(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}},qs=(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=[];Fe(e)?o=e.submenu??[]:o=e.submenu?.length?e.submenu:t;let n=vb$2;if(!o.some(c=>O(c.name)))return [n,wb$1,...o];let i=o.findIndex(c=>O(c.name)),a=i>=0?o[i]:wb$1,l=o.filter(c=>!O(c.name)&&!Ne(c.name)),s=[a,...l],p=s.some(c=>Ne(c.name)),m=s.findIndex(c=>Ne(c.name));if(p&&m>0){let c=s[m],d=s.filter(u=>!Ne(u.name));return [c,...d]}return p&&m===0?s:[n,...s]},S1=(e,t)=>ha(e,t).length>0,Qo=e=>e.filter(t=>!Ne(t.name));var Pe=e=>e.toLowerCase(),ch=e=>new Map(e.filter(t=>!O(t.name)).map(t=>[Pe(t.name),t])),mh=(e,t)=>e.some(o=>Pe(o)===Pe(t)),Xs=(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}},Js=(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}}),Qs=(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}}),ep=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)},tp=(e,t)=>e.filter(r=>!O(r.name)).some(r=>r.menuItems?.length?r.menuItems.some(i=>i.selected):r.selected)&&!t,op=(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}))})),np=(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}}),rp=(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}}),ip=e=>e.length===0?false:e.every(t=>t.menuItems?.length?t.menuItems.every(o=>o.selected):t.selected),ap=(e,t)=>e.length===0?false:e.some(n=>n.menuItems?.length?n.menuItems.some(r=>r.selected):n.selected)&&!t,Zs=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=Zs(e),n=Zs(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},T1=e=>e.filter(t=>!O(t.name)).map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),lp=(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?Xs(l,a):{...l,selected:false,menuItems:l.menuItems?.map(s=>({...s,selected:false}))}):a&&r.push(a);}for(let[,i]of n)if(!mh(o,i.name)){let a=e.find(l=>Pe(l.name)===Pe(i.name));r.push(a?Xs(i,a):{...i,selected:false,menuItems:i.menuItems?.map(l=>({...l,selected:false}))});}return r},sp=e=>e.filter(t=>!O(t.name)).map(t=>({...t,selected:false,menuItems:t.menuItems?.map(o=>({...o,selected:false}))})),pp=(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(Xs(l,a)):l&&r.push({...l,selected:false,menuItems:l.menuItems?.map(s=>({...s,selected:false}))});}for(let[,i]of o)mh(n,i.name)||r.push({...i,selected:false,menuItems:i.menuItems?.map(a=>({...a,selected:false}))});return r};function dh(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$1.name,label:wb$1.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 w1(e,t){let o=e.layout?.map(r=>({...r,columns:[...r.columns??[]].sort((i,a)=>ya(i)-ya(a))})),n=dh(e,t);return {id:e.id,label:e.name,layout:o,submenu:n,columns:n.map(r=>r.name),role:Ca(e),isCustom:Fe(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}]}}):[]},v1=(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 cp(e,t,o){let n=e.findIndex(t);if(n===-1)return e;let r=[...e];return r[n]=o,r}function mp(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 dp=e=>{let t=e;return t?!!(t.closest('[role="checkbox"]')||t.closest('input[type="checkbox"]')||t.closest('[class*="CheckboxWrapper"]')):false};var uh=e=>[...yb[e]??yb.default],P1=e=>zb$1[e]??zb$1.default,A1=(e,t)=>({code:e,name:[{text:xb$1[e],lang:"en"}],selected:true,sort_order:t}),E1=(e,t)=>e?.layout?.some(o=>uh(t).includes(o.code?.toLowerCase()??""))??false,up=(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}=qs(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,P]=useState(l.find(R=>R.selected)?.id??a?.id),A=useRef(l.find(R=>R.selected)?.id??a?.id),D=useCallback(R=>{let W=R.submenu?.filter(ee=>ee.selected)||[];return {...R,submenu:W,columns:W.map(ee=>ee.name)}},[]),E=useCallback(R=>{A.current=R?.id,t?.(R?D(R):void 0);},[t,D]),V=useMemo(()=>T?l.find(R=>R.id===T):a,[l,T,a]),H=useMemo(()=>pe(V?.submenu||i),[V,i]),_=useMemo(()=>({id:T||a?.id||"default",label:V?.label||a?.label||"Default"}),[V,T,a?.id,a?.label]);useEffect(()=>{let R=l.find(Se=>Se.selected)?.id,W=a?.id,ee=T?l.some(Se=>Se.id===T):false;if(!(T&&!ee&&R!==T)){if(R&&R!==T){P(R);return}if(!T){P(R??W);return}ee||P(R??W);}},[l,a?.id,T]),useEffect(()=>{!T||!V||V.id===T&&A.current!==T&&(A.current=T,t?.(D(V)));},[T,V,t,D]);let Q=useCallback(R=>{m(W=>W?null:R.currentTarget);},[]),he=useCallback(()=>{m(null);},[]),Le=useCallback((R,W)=>{P(W?.id),E(W),he();},[he,E]),be=useCallback((R=false,W,ee,Se)=>{s!=null&&s>=3||(f(null),y(R),g(W??null),b(ee?.length?ee:null),w(Se),d(true),m(null));},[s]),$=useCallback(R=>{let W=l.find(ee=>ee.id===R.id)??R;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 R=l.find(W=>W.id===u.id);R&&(f(R),b(R.submenu?.length?pe(R.submenu):null));},[c,u?.id,l]);let ml=useCallback(async R=>{if(u){let W=u.id;await n?.(W,R),P(W);let ee=l.find(Se=>Se.id===W)??u;E(ee),he();}else {let W=await o?.({...R,sourceTemplateId:I});if(W?.id){P(W.id);let ee=l.find(Se=>Se.id===W.id);E(ee??{id:W.id,label:W.name,isCustom:true,columns:R.selectedColumns.map(Se=>Se.name),submenu:R.selectedColumns});}}},[u,n,o,he,l,E,I]),dl=useCallback(async R=>{let W=l.find(ee=>ee.id===R);await r?.(W?.id??R),T===(W?.id??R)&&P(a?.id);},[l,r,T,a]);return {anchorEl:p,isCreateDialogOpen:c,editingView:u,selectedViewInfo:_,shouldUseCurrentState:x,selectedView:V,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 Ch=()=>{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 hp=({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$2,g=wb$1;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=lp(_,Q).filter(et=>!Ne(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?pp(_,r):sp(_)).filter(be=>!Ne(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(()=>ep(l),[l]),I=useMemo(()=>tp(l,b),[l,b]),w=useMemo(()=>op(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(_=>Js(_,H));},handleSubItemToggle:(H,_)=>{s(Q=>ar(Q,H,_));},handleSelectAll:()=>{s(H=>Qs(H,!b));},handleResetToDefault:()=>{m.current.length>0&&s(pe(m.current));}}};function Ip({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=up(h,i,I),T=await o({name:g,layout:w}),P=Ia(T);return t(A=>[...A.filter(E=>E.id!==P.id).map(E=>({...E,selected:false})),{...P,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}=mp(b,h),T=await n(g,{name:I,layout:w}),P=Ia(T);t(A=>cp(A,D=>D.id===g,P)),c(P.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}Fe(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 F1({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}=Ys({column:e,index:t,openSubMenuName:o,toggleColumnSelection:r,handleSubMenuOpen:a,handleSubMenuClose:l}),S=g=>g?s(g)??Og(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$1,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 Ih=F1;function _1({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}=Us({columns:l,setTableViews:o}),{subMenuAnchorEl:d,openSubMenuName:u,handleSubMenuClose:f,handleSubMenuOpen:x,handleMenuScroll:y}=_s(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,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(Ih,{column:S,index:g,openSubMenuName:u,subMenuAnchorEl:d,toggleColumnSelection:m,toggleSubmenuItem:c,handleSubMenuOpen:x,handleSubMenuClose:f},S.name))})})]})]})}var Sp=memo(_1);function G1({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,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsx($1,{open:e,anchorEl:i,placement:"bottom-start",children:jsxs(Ko,{children:[Cb$1.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 Tp=Pp.memo(G1);function q1({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$2),{t:f}=useTranslation(),x=h=>{e?.(),l(h.currentTarget),t(true);},y=()=>{p$1(null),c(null);},S=()=>{l(null),t(false),u(Ab$2);},g=h=>{u(h),h.id!==Bb.id&&r?.(h),y();};return a?jsx(K1,{onClickAway:y,children:jsxs(ua,{"data-testid":"TableView",children:[d$1.id===Bb.id&&jsx(Sp,{tableViews:n,setTableViews:o,anchorEl:m,open:!!m,onSelect:h=>{c(m?null:h.currentTarget),p$1(null);},onClose:()=>{c(null);}}),jsx(Tp,{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$1,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 wp=memo(q1);var Sh=({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}=Ch();return jsxs(Fragment,{children:[jsxs(th,{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:oh})}),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$1,{}),jsx(rh,{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,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(Pp.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$1,{})]},h.name))})]})})]}),f<e.length-1&&jsx(v$1,{})]},u.name)})})})]})};function iP({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]=Pp.useState(null),[w,T]=Pp.useState(null),P=useMemo(()=>[...m.length?m:p$1?[p$1]:[],...a],[m,p$1,a]),A=useCallback(L=>L.submenu?.length?L.submenu:s,[s]),D=useCallback(L=>L?ha(L,A(L)):s,[s,A]),E=useCallback(L=>D(L).length>0,[D]),V=useMemo(()=>f?P.find(L=>L.id===f):void 0,[f,P]),H=useMemo(()=>D(V),[V,D]),_=useMemo(()=>f?w?.length?w:H:[],[f,H,w]),Q=useMemo(()=>ip(_),[_]),he=useMemo(()=>ap(_,Q),[_,Q]),Le=w!=null&&!lr(w,H),be=(c??Ks(a))>=3,$=d||be,et=$||!Le;function ml(L){h(),T(null);let ie;if(oo(L)){let Ae=L.submenu?.length?L.submenu:s.length?s:p$1?.submenu??[];ie={...L,submenu:pe(Ae),columns:Ae.map($e=>$e.name)};}else Fe(L)&&(ie=L);o(L,ie);}function dl(L,ie){let Ae=P.find($e=>$e.id===L);T(pe(D(Ae))),y(L,ie);}function R$1(){T(null),S(),h();}function W(L){if(L.stopPropagation(),et)return;let ie=pe(H),Ae=w?.length?pe(w):ie;i?.(true,Ae,ie,V?.id),T(null),h();}function ee(L){w&&T(np(w,L));}function Se(L,ie){w&&T(ar(w,L,ie));}function gb(){w&&T(rp(w,!Q));}function Cb(){T(pe(H));}return jsxs(qo,{"data-testid":"ViewsDropdown",children:[jsx($1,{open:e,anchorEl:n,placement:"bottom-start",children:jsxs(Ko,{onScroll:h,children:[jsx(rP,{sx:{paddingX:1.25,py:1.1,fontWeight:500,fontSize:11,color:"#8D8D94"},children:"View"}),jsx(v$1,{}),P.map(L=>{let ie=Fe(L),Ae=!ie&&E(L);return jsxs(Xo,{onMouseEnter:$e=>{ie?I(L.id):Ae&&dl(L.id,$e.currentTarget);},onMouseLeave:()=>{ie?I(null):Ae&&S();},onClick:()=>ml(L),sx:{position:"relative",cursor:"pointer",pr:1.5},children:[L.id===t.id?jsx("img",{style:{width:15,height:15},src:Xj,alt:"check"}):jsx(Zo,{}),jsx("span",{style:{flex:1,fontSize:11},children:L.label}),ie&&b===L.id&&jsx("img",{src:Ah,alt:"edit",style:{width:12,height:12,cursor:"pointer"},onClick:$e=>{$e.stopPropagation(),r?.(),l?.(L);}}),Ae&&jsx("img",{src:wb,alt:"arrow",style:{height:12}})]},L.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:L=>{if(L.stopPropagation(),$)return;let ie=pe(D(p$1)),Ae=ie.map($e=>({...$e,selected:false,menuItems:$e.menuItems?.map(xb=>({...xb,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:R$1,children:jsxs(nh,{children:[jsx(Sh,{columns:Qo(_),allCurrentSelected:Q,someCurrentSelected:he,onSelectAll:gb,onReset:Cb,onColumnToggle:ee,onNestedItemToggle:Se,anchorEl:x,isModified:Le}),jsxs(ih,{children:[jsx(Th,{variant:"text",onClick:R$1,sx:ah,children:"Cancel"}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"top",disableHoverListener:!be,children:jsx(Th,{variant:"contained",onClick:W,disabled:et,sx:lh,children:"Create view"})})]})]})})]})}var Ap=Pp.memo(iP);var Ph=({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}=zs(f),S=useCallback(g=>{if(dp(g.target)){g.preventDefault();return}x();},[x]);return jsxs(jx,{children:[jsxs(Kx,{children:[jsx(Fs,{children:jsx("img",{src:C,alt:"drag",style:{width:16,height:16,opacity:.5}})}),jsx(Ws,{onClick:g=>{g.stopPropagation(),p();},children:jsx(f$1,{checked:o,indeterminate:n,size:"small",sx:Hs,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(qx,{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(Fs,{children:jsx("img",{src:Fb,alt:"drag",draggable:false,style:{width:16,height:16,cursor:h?"default":"grab",pointerEvents:"none"}})}),jsx(Ws,{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:Hs})}),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$1,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,P)=>jsxs(Pp.Fragment,{children:[jsx(V,{isSelected:T.selected,isDisabled:h,onClick:()=>{h||s(g.name,T.name);},sx:{fontSize:13},children:T.label||T.name}),P<(g.menuItems?.length??0)-1&&jsx(v$1,{})]},T.name))})]})})]},g.name)})})})]})};function uP({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:P,openSubmenu:A,closeSubmenu:D,cancelClose:E,handleReorder:V,handleColumnToggle:H,handleSubItemToggle:_,handleSelectAll:Q,handleResetToDefault:he}=hp({open:e,availableColumns:n,defaultColumns:r,editingView:i,tableViews:l}),Le=async()=>{if(!(!I||!w||f||d)){x(true);try{let $=js(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(eh,{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$5,{onClick:t,onPointerDown:$=>$.stopPropagation()})})}),jsxs(Ux,{children:[jsxs(Gx,{onScroll:()=>{D();},children:[jsxs(Yx,{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(Jx,{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(Ph,{selectedColumns:Qo(g),columnNames:Qo(g).map($=>$.name),allSelected:h,someSelected:b,hoveredColumn:T,anchorEl:P,onReorder:V,onColumnToggle:H,onSubItemToggle:_,onSelectAll:Q,onResetToDefault:he,onSubmenuEnter:A,onSubmenuLeave:D,onCancelClose:E})]}),jsx(Xx,{}),jsx(Zx,{children:jsx(Qx,{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 Ep=uP;function xP({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:P,handleCloseViewDropdown:A,handleSelectedViewInfo:D,handleOpenCreateDialog:E,handleOpenEditDialog:V,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(K1,{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:P,"aria-label":p$1("tableView")})}),jsx(Ap,{open:!!y,anchorEl:y,onClose:A,setSelectedViewInfo:D,selectedViewInfo:h,onCreateCustomView:E,customViews:u,onEditCustomView:V,defaultColumns:m,defaultTemplate:c,defaultTemplates:d$1,customTemplateCount:x,isLoading:l})]})}),jsx(Ep,{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 Mp=memo(xP);function Dp(e=[]){let[t,o]=useState(false),n=useMemo(()=>e.map(({code:r})=>r),[e]);return {isColumnPickerVisible:t,setIsColumnPickerVisible:o,timezoneCountryCodes:n}}function SP({tableMode:e,onToggle:t}){let o=Va(e),n=Wa(e);return jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:n?Kh$1: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 kh=memo(SP);function mr({children:e,component:t="aside",...o}){return jsx(Ox,{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}=Dp(t?.segmentCountries),c=e?.variant==="acceptance",d=n?.tableMode??"default",u=useMemo(()=>n?.onSheetToggle?jsx(kh,{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$6,{onSearchChange:r.onChange,placeholder:r.placeholder}),i?.filter,u&&!c&&u,o&&t&&jsx(a$7,{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(Mp,{onViewChange:n.onViewChange,tableMode:d,lang:l,...n.templates}):jsx(wp,{onViewChange:n.onViewChange,setIsViewVisible:p,tableViews:n.columns,setTableViews:n.setColumns,resetTableViews:n.onPresetReset,onTableViewOptionClick:n.onPresetOptionClick})),i?.trailing&&!s&&i.trailing]})}function MP({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=Bc(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":Bx,children:[t?.maximized&&jsx(ma,{title:e,toolbar:u}),jsxs(Wx,{as:"section",children:[jsx(da,{status:a,activeFilter:l,beforeStatus:m?.beforeStatus}),!t?.maximized&&u]}),c]})}var Nh=memo(MP);var Wh=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)})),RP=wa(),Hh=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:RP==="safari"?"-1px":"",padding:8,borderRadius:o.shape.borderRadius}}}});function VP({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(Hh,{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,alt:"new-window-icon"}),onClick:c=>{c.stopPropagation(),i?.(o),m();}}]})]})}var Oh=memo(VP);var GP=e$1=>jsx(e,{src:e$1.className.includes("MuiSelect-iconOpen")?Wc:Vc,alt:"dropdown"});function YP({isMaximized:e,serviceCode:t,dimensions:o,services:n,onChangeServiceCode:r,onClickServiceItem:i}){let a=Bc(useId(),"app-services"),[l,s]=useState(0),[p,m]=useState(false),[c,d]=useState(""),u=useRef(null),[f,x]=Pp.useState(false),{i18n:y}=useTranslation(),S=w=>{d(w.target.value);},g=()=>{x(w=>!w);},h=useMemo(()=>cc$1(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(Wh,{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(Oh,{activeCode:t,onClickServiceItem:i,navigateToMenuItem:b,name:cc$1(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:GP,onChange:S,renderValue:I,sx:{"& .MuiOutlinedInput-root.MuiList-root-MuiMenu-list":{paddingTop:"0px !important",paddingBottom:"0px !important"}},children:n.map((w,T)=>cc$1(w.name,y.language)?.toLowerCase()===c?.toLowerCase()?null:jsx(b$2,{value:cc$1(w.name,y.language),onClick:P=>{P.preventDefault(),P.stopPropagation(),b(w.code);},children:jsx(d$1,{children:cc$1(w.name,y.language)})},`option-${w.code}-${T}`))})]})}var _h=memo(YP);var Vp=_h;function JP({appCode:e,services:t,isMaximized:o,dimensions:n,serviceCode:r,ui:{onStartDrag:i},onChangeServiceCode:a,onClickServiceItem:l,sx:s}){let p=Bc(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(Vp,{onClickServiceItem:l,dimensions:{width:n.width},serviceCode:r,services:t,isMaximized:o,onChangeServiceCode:a})})}var $h=memo(JP);var QP=$h;var Gh=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"}})),Yh=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})),jh=styled$1(Sr)(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",padding:"2px","& img":{width:14,height:14}})),Kh=styled$1(eA)(({theme:e})=>({marginTop:e.spacing(1),marginBottom:e.spacing(1),minWidth:193,"& .MuiPaper-root":{borderRadius:e.spacing(.5),"&>.MuiList-root":{padding:0}}})),qh=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}`})),Fp=styled$1(Th)(({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}})),Wp=styled$1(Th)(({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 Hp=createContext(null);function nA(){let e=useContext(Hp);if(!e)throw new Error("useFilterDropdown must be used inside a FilterDropdown");return e}function Zh({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=Bc(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());},P=()=>{e?.(),I();},A=typeof m=="number"&&m>0,D=E=>{E.stopPropagation(),c?.();};return jsx(Hp.Provider,{value:{onConfirm:P,onCancel:T,onClose:I},children:jsx(K1,{onClickAway:T,children:jsxs(Sr,{id:y,"data-testid":"FilterDropdown",...x,children:[jsx(Gh,{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(Yh,{children:m}),jsx(jh,{onClick:D,"aria-label":"clear filters",children:jsx(Sr,{component:"img",src:Eb$1,alt:"clear"})})]})]})}),jsxs(Kh,{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(qh,{component:"span",children:a??b("filterBy")}),n,!p&&jsxs(Np,{children:[jsx(Wp,{onClick:T,children:b("cancel")}),jsx(Fp,{disabled:o,onClick:P,children:b("okay")})]})]}),h&&jsx(a$3,{onClick:I})]})})})}var Jh=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),Qh=styled$1(Sr)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),ey=styled$1(Sr)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),ty=styled$1(Sr)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"178px"}));function $p({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(Jh,{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(Qh,{children:[jsx(ty,{component:"span",children:S.display_name}),jsx(ey,{component:"span",children:S.legacy_id})]})},S?.legacy_id))]})}var La=$p;var ny=styled$1(Sr)(()=>({display:"flex",gap:"4px",alignItems:"center",flex:1,marginInlineEnd:"8px"}));function Yp({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(ny,{children:[i?.(e.logo),jsx(j,{sx:{fontSize:"11px"},children:cc$1(e.name)})]}),e.merchants?.length>0&&jsx("img",{src:vb$1,alt:"arrow",style:{height:12}}),jsx(La,{anchorEl:l,brand:e,merchantsIds:t,onChangeMerchant:a,atLeastOneMerchantSelected:n,showSearchInput:r})]})}var iy=Yp;function jp({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:D})=>n.includes(D))):false,[n,e,a]),S=useMemo(()=>!y&&n.length>0,[n,y]),g=useMemo(()=>e.filter(A=>A.merchants?.some(D=>n?.includes(D.legacy_id))).length,[e,n]),h=()=>{if(y&&!r){o?.([]);return}let A=e.flatMap(D=>D.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(D=>cc$1(D.name)?.toLowerCase()?.includes(A)||D.merchants?.some(E=>E.legacy_id?.toLowerCase().includes(A)))},[m,e]),P=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$1,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})}),P?.map(A=>jsx(iy,{isDisabled:g===1&&r,brand:A,merchantsIds:n,onChangeMerchant:o,atLeastOneMerchantSelected:r,showSearchInput:i,renderBrandLogo:l},A.id))]})]})}var sy=styled$1(Sr)(()=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"164px"}));function TA({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,V)=>{if(E.stopPropagation(),b(V))return;if(y(V)){n?.(e.filter(_=>_!==V));return}let H=[...new Set([...e,V])];n?.(H);},w=t||!o?.length,T=E=>{u(E);},P=()=>{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]),D=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$1,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:P})}),D?.map((E,V$1)=>jsx(V,{isSelected:y(E.id),isDisabled:t||b(E.id),onClick:H=>{I(H,E.id);},sx:{maxHeight:35,minHeight:35},children:jsx(sy,{children:E?.brand?.name?.[c.language]??E?.brand?.name?.en})},`key-${E?.id}-${V$1}`))]})]})}var my=memo(TA);function EA({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$1,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 fy=memo(EA);function kA({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$1,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 xy=memo(kA);var BA=(r=>(r.BRAND="BRAND",r.COUNTRY="COUNTRY",r.ENTITY="ENTITY",r.MERCHANT="MERCHANT",r))(BA||{});var VA="/",hr=5,hy=(...e)=>e.join(VA),Kp=e=>[e.label,e.id],yy=(e,t)=>{if(e.levelKey==="MERCHANT")return e.id.toLowerCase().includes(t)?e:null;let o=(e.children??[]).map(i=>yy(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}}},Iy=(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:hy(r.id,s,c.id),label:cc$1(c.legal_name,o)??c.id,levelKey:"ENTITY",children:u,header:"Merchants",...u.length>=hr&&{searchProps:{getValues:Kp}}}});return {id:hy(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:Kp}}}});return {id:r.id,label:cc$1(r.name,o)??r.id,levelKey:"BRAND",children:l,header:"Countries",icon:{fileId:r.logo},...l.length>=hr&&{searchProps:{getValues:Kp}}}});return {levelKey:"BRAND",children:n,header:"Brands",...n.length>=hr&&{searchProps:{filterItem:(r,i)=>(typeof r.label=="string"?r.label.toLowerCase():"").includes(i)?r:yy(r,i)}}}};var _A=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(()=>Iy(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"),P=w.filter(A=>A.status==="INDETERMINATE");return T.length===y.length?"CHECKED":P.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:P})=>P);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$1,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})]})},Sy=_A;var $A=Sy;function Ty({onPhoneChange:e,onCountryChange:t,selectedPhone:o,selectedCountry:n,countriesOptions:r,isCountriesLoading:i}){let a=Bc(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 vy=styled$1(R)(()=>({marginTop:"-1px","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"}})),Py=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 Na({menuLabel:e,options:t,selectedValue:o,onValueChange:n}){let r=Bc(useId(),"view-column-radio-filter"),[i,a]=useState(null),[l,s]=useState(o),p=useRef(null);return useEffect(()=>{s(o);},[o]),jsxs(Py,{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$1,alt:"arrow",style:{height:12}}),jsx(vy,{open:!!i,anchorEl:i,placement:"right-start",children:jsx(a$f,{options:t,value:l||"",onOptionChange:f=>{s(f),n(f);},defaultValue:t[0].value})})]})}var Ey=(e,t)=>{let o=e||{},n={};return t?.forEach(({value:r})=>{let i=o?.[r];n[r]=i===void 0?"all":i;}),n};function Dy({anchorEl:e,options:t,apiKey:o="statuses",initialStatuses:n,onCloseDropdown:r,onClear:i,onConfirm:a}){let l=!!e,s=Bc(useId(),"status-filter"),{t:p}=useTranslation(),[m,c]=useState(()=>Ey(n,t)),d=useRef(null),[u,f]=useState(null),[x,y]=useState(null),S=(P,A)=>{f(P.currentTarget),y(A);},g=useCallback(()=>{f(null),y(null);},[]),h=useCallback(P=>{r(P),g();},[g,r]),b=()=>{let P=Object.keys(m).reduce((D,E)=>{let V=m[E];return V!=="all"&&(D[E]=V),D},{});Object.values(m).every(D=>D==="all")?i([o]):a({[o]:P});},I=r$1(b,r),w=P=>{b(),r(P);},T=P=>{x&&c(A=>({...A,[x]:P}));};return jsx(ClickAwayListener,{onClickAway:P=>{P.stopPropagation(),r(P);},children:jsxs(Sr,{id:s,"data-testid":"StatusFilter",ref:d,tabIndex:-1,onKeyDown:I,children:[jsxs(R,{open:l,anchorEl:e,children:[jsx(a$g,{component:"span",children:p("filterBy")}),t.map(({value:P,label:A})=>jsxs(V,{onClick:D=>{f(D.currentTarget);},onMouseOver:D=>{S(D,P);},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$1,width:16,height:12,sx:{marginLeft:"auto"}})]},P)),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$f,{options:[{value:"all",label:"All"},{value:"enabled",label:"Enabled"},{value:"disabled",label:"Disabled"}],value:m[x||""],onOptionChange:T})})})]})})}var Ry=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]}})),Ly=styled(Box)(()=>({position:"relative"})),ky=styled(Box)(({theme:e})=>({background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:"4px",marginTop:"8px"})),By=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"})),Vy=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]}})),Ny=styled("img")(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),Fy=styled(Box)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),Wy=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"space-between",flex:1})),Hy=styled(Box)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:500,wordBreak:"break-all",paddingInlineEnd:"8px"})),Oy=styled(Box)(({theme:e})=>({fontSize:"9px",color:e.palette.text.textSecondary,fontWeight:600})),_y=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]}})),zy=styled(Box)(({theme:e})=>({fontSize:"11px",color:e.palette.text.primary,fontWeight:400,textTransform:"uppercase"})),Zp=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}})),Ft=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})),$y=styled(Box)(()=>({display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",padding:"8px"}));var Gy=e=>{let t=new Date,o=nc(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"}),nc(e).calendar(null,n)},Yy=(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 Jp={loading:false,success:false,error:null},iE=(e=Jp,t)=>{switch(t.type){case "RESET":return Jp;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(iE,Jp),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$1(c.url,Yy(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 lE({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(Ft,{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(Ft,{children:jsx(za,{src:Ze,alt:"done"})})}):o?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsx(Ft,{children:jsx(za,{src:Ij,alt:"failed"})})}):jsx(za,{onClick:r,src:Xe,alt:"reports"})}var ec=lE;function oc(){return jsxs($y,{children:[jsx(r,{width:"16px",height:"16px",variant:"rectangular"}),jsx(r,{width:"100%",variant:"text"}),jsx(r,{width:"12px",height:"12px",variant:"circular"})]})}function dE({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=nc(i.created_at).isBefore(nc().subtract(1,"day")),l=_b(i.result_file);return jsxs(Vy,{children:[jsx(Ny,{src:l,alt:"download"}),jsxs(Wy,{children:[jsxs(Fy,{children:[jsx(Hy,{children:i.result_file}),jsx(Oy,{children:a?Gy(new Date(i.created_at)):nc(new Date(i.created_at)).fromNow()})]}),jsx(ec,{onDownload:()=>n(i.id)})]})]},i.id)});return t?jsxs(Zp,{children:[jsx(oc,{}),jsx(oc,{})]}):jsx(Zp,{children:r})}var jy=memo(dE);function yE(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(P=>{i||n||(l?.(),f(P.currentTarget));},[i,n,l]),b=useCallback(()=>{f(null);},[]),I=useCallback(()=>{i||(b(),s?.());},[i,b,s]),w=P=>{P.stopPropagation(),p$1?.(),b();},T=()=>i?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Ft,{children:[jsxs(Oa,{children:[jsx(_a,{children:"1"}),jsx(xE,{})]}),jsx("span",{children:x("preparing")}),jsx(Ha,{children:jsx(ac,{variant:"determinate",value:t})})]})}):n?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Ft,{children:[jsx("img",{src:Ze,alt:"done"}),jsx("span",{children:x("ready")}),jsx(Ha,{className:"done",children:jsx(ac,{variant:"determinate",value:100})})]})}):r?jsx(motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:jsxs(Ft,{children:[jsx("img",{src:Ij,alt:"failed"}),jsx("span",{children:x("failed")}),jsx(Ha,{className:"failed",children:jsx(ac,{variant:"determinate",value:100})})]})}):jsx("img",{src:Ye,alt:"reports"});return jsxs(Ly,{"data-testid":"TableReports_ReportsWrapper",children:[jsx(AnimatePresence,{children:jsx(p,{title:x("reports"),children:jsx(Ry,{"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($1,{open:y,anchorEl:u,placement:"bottom-end",children:jsxs(ky,{sx:{width:208},children:[d?.({closeDropdown:b})??jsxs(_y,{onClick:I,children:[jsx("img",{src:Ve$1,alt:"download"}),jsx(zy,{children:"csv"})]}),jsx(jy,{reports:S?.reports??[],isLoading:g,onDownloadReport:c}),!m&&jsx(By,{onClick:w,children:x("openReportsApp")})]})})]})}var Ky=memo(yE);var qy=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 AE({onDownload:e}){let t=Bc(useId(),"download-button"),{loading:o,error:n,success:r,handleDownloadReport:i}=$a({onDownload:e}),{t:a}=useTranslation(),l=!o&&!n&&!r;return jsx(qy,{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(xE,{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 Xy=memo(AE);var ME=Xy;var DE=Ky;var ue=styled$1(V)(({theme:e})=>({height:40,flex:"unset",paddingTop:0,paddingBottom:0,borderBottom:`1px solid ${e.palette.divider}`,".label":{flexGrow:1}})),Jy=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(Jy,{children:jsx(Sr,{component:"img",src:h(e),sx:{width:18,height:12,objectFit:"contain"},onError:t=>{t.currentTarget.src=h("card");}})})}function sc({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$1,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$1,alt:"arrow",style:{height:12}}),jsx(R,{open:!!n,anchorEl:n,placement:"right-start",children:e?.options?.map(u=>jsx(sc,{...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$1,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$1,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 cc({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$1,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$1,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 rI({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=Bc(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$g,{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(cc,{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 dc=[{label:dp$1.C,value:"C"},{label:dp$1.F,value:"F"}],iM=({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(()=>dc.map(f=>f.value),[]),p=useMemo(()=>dc.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$1,alt:"arrow",style:{height:12}}),jsx(R,{open:r,anchorEl:o,placement:"right-start",children:dc.map(f=>jsxs(V,{isSelected:d(f.value),onClick:x=>u(x,f.value),children:[jsx(zf,{mode:f.value}),f.label]},f.value))})]})};var aM=styled$1(j)(()=>({fontSize:"11px"})),aI=styled$1(Sr)(()=>({display:"flex",alignItems:"center",gap:"4px",width:"100%",paddingInline:"16px"})),lI=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}`})),sI=styled$1(b)(()=>({minWidth:"auto",width:70})),pI=styled$1(b)(()=>({minWidth:"auto",width:70})),cI=styled$1(Sr)(()=>({display:"flex",flexDirection:"column",gap:"8px",marginBottom:"8px"})),uc=styled$1(aM)(()=>({fontSize:"11px",fontWeight:500,color:"#8D8D94",padding:"8px 16px"})),mI=styled$1(Sr)(({theme:e})=>({borderBlock:`1px solid ${e.palette.divider}`,display:"flex",justifyContent:"space-between",alignItems:"center",gap:"2px",width:"100%"})),dI=styled$1(Sr)(({theme:e})=>({...a(e),width:"auto",marginTop:"8px","&:focus":{outline:"none"}})),uI=styled$1(uc)(()=>({color:"#1F88D0",padding:"4px 24px",cursor:"pointer"})),fI=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 CI({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=Bc(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=nc(I).format("MMM D"),P=nc(w).format("MMM D");return T===P?T:`${T} - ${P}`};return jsxs(dI,{ref:u,tabIndex:-1,onKeyDown:x,id:c,"data-testid":"DateFilter",children:[jsxs(cI,{children:[jsx(mI,{children:jsx(uc,{component:"span",children:d$1("filterBy")})}),jsx(aI,{children:jsx(a$7,{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(fI,{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(uI,{component:"span",onClick:()=>t(void 0),children:"Clear"})]}),jsxs(lI,{children:[jsx(pI,{variant:"secondary",size:"md",onClick:m,children:d$1("cancel")}),jsx(sI,{variant:"primary",size:"md",onClick:S,children:d$1("okay")})]})]})}var hI=styled$1(R)(()=>({marginBottom:"8px"})),yI=styled$1(L)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,".icon":{width:14}})),II=styled$1(Sr)(()=>({padding:"8px 16px","> div + div":{marginTop:"8px"}})),bI=styled$1(Th)(({theme:e})=>({color:e.palette.info.dark,fontSize:"11px",textTransform:"capitalize",padding:"4px 9px",minWidth:"auto","&:hover":{background:"transparent"}})),SI=styled$1(Sr)(({theme:e})=>({padding:"0 16px 8px",textAlign:"left",borderBottom:`1px solid ${e.palette.divider}`}));function wI({selectedRadioValue:e,onRadioButtonChange:t,radioOptions:o,label:n,onConfirm:r,onClear:i,inputValues:a,onInputValuesChange:l,anchorEl:s,onCloseDropdown:p,inputFilters:m=[]}){let c=Bc(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(()=>gM(a).some(I=>!!I),[a]),b=()=>{l(m.reduce((I,{apiKey:w})=>({...I,[w]:""}),{}));};return jsxs(hI,{id:c,"data-testid":"ReferenceTypeFilter",open:!!s,anchorEl:s,onKeyDown:f,children:[jsx(a$g,{component:"span",children:d("filterBy")}),jsx(Na,{menuLabel:n,options:o,selectedValue:e,onValueChange:t}),m.length>0&&jsx(II,{"data-testid":"ColumnFilterInputs_inputs",component:"main",children:m.map(({apiKey:I,placeholder:w})=>jsx(yI,{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(xM,{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(SI,{"data-testid":"ColumnFilterInputs_ClearWrapper",children:jsx(bI,{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})),PI=styled$1(V)(()=>({padding:"12px 16px",border:"none !important","&:hover":{boxShadow:"0px 0px 16px 0px #00000021"},maxHeight:35,minHeight:35})),AI=styled$1(Sr)(()=>({display:"flex",flexDirection:"column",gap:"2px"})),EI=styled$1(Sr)(({theme:e})=>({color:alpha(e.palette.text.primary,.5),fontSize:"9px"})),MI=styled$1(Sr)(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"120px"})),DI=styled$1(R)(()=>({marginBottom:"8px"}));function kI({anchorEl:e,onCloseDropdown:t,list:o,apiKey:n,placeholder:r,onConfirm:i,onClear:a,onClickItem:l,inputValue:s,onInputValueChange:p,selectedListItems:m}){let c=Bc(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(DI,{id:c,"data-testid":"ListColumnFilter",open:!!e,anchorEl:e,onKeyDown:f,children:[jsx(a$g,{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,P)=>jsx(PI,{isSelected:w.has(T?.id),onClick:()=>{l(T?.id);},children:jsxs(AI,{children:[jsx(MI,{children:T.name}),jsx(EI,{component:"span",children:T.id})]})},`${T.id}-${P}`))}),jsxs(b$a,{children:[jsx(d$3,{onClick:y,children:d("cancel")}),jsx(c$4,{onClick:x,children:d("okay")})]})]})}var BI="os-shared-VerificationIcon",ol={root:`${BI}-root`,img:`${BI}-img`},VI=(l=>(l.Verified="verified",l.Reviewed="reviewed",l.Completed="completed",l.Incomplete="incomplete",l.Rejected="rejected",l.Closed="closed",l.Archived="archived",l))(VI||{});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 SM=2.3,NI=styled$1("span",{shouldForwardProp:e=>!["$variant","$bgColor","$size"].includes(e)})(({$variant:e="default",$bgColor:t,$size:o=10.5})=>{let n=Math.round(o*SM);return {display:"inline-flex",alignItems:"center",justifyContent:"center",...e==="circle"&&{width:`${n}px`,height:`${n}px`,borderRadius:"50%",backgroundColor:t||"#D9D9D929"}}});var FI=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||Og(o),u=a??i,f=l??i,x=jsx(NI,{ref:p$1,className:nc$1(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})});FI.displayName="VerificationIcon";var PM=memo(FI);function LM({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=Bc(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:P}=Ia$1(w,a);return `Partial ${I} - ${a} ${T}.${P}`},[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,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(Ju,{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(Xu,{children:f("captured")}):h,[l,h,p$1,f]);return b&&jsx("div",{id:d,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:b})}var HI=LM;function WM({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=Bc(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:P}=Ia$1(w,a);return `Partial ${I} - ${a} ${T}.${P}`},[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,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,alt:"void"})})}):g,b=useMemo(()=>s&&h?jsx(b$1,{copyTrigger:"press",copyText:f("void"),children:f("void")}):l&&h?jsx(Zu,{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 _I=WM;var HM=HI;var $M=({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 zI=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)})),$I=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),Cc=styled$1("img")(()=>({width:"10px",height:"10px"})),xc=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"})),hc=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"}})),UI=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),GI=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),YI={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},jI={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},KI={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},qI={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},yc={fadeIn:{duration:.3},animate:{duration:.1}},XI={fadeIn:{opacity:1}},ZI=styled$1(z)(()=>({width:"88px",height:"100%"})),Ic=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=Bc(useId(),"charge-status-icon"),T=n&&jsx(Fragment,{children:jsx("div",{children:n})}),P=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})]}),D=e&&a$c[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$c[e],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:g$1?"50%":"",width:"16px",height:"16px",...p$1}})});return x?jsxs(Ic,{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(Ic,{children:[jsx(p,{title:T,children:jsxs(ZI,{"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:P,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||P||A)?jsxs(GI,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...f&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...s},children:[jsx(UI,{"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:[D,jsx($I,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:qI,style:{...r&&{padding:"0 !important"}},children:jsx(zI,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:g$1?.color},transition:YI,variants:XI,initial:{opacity:0},children:r})})]})})}),jsx(hc,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:yc,variants:jI,style:d,isVisible:!!A,children:A&&jsx(p,{title:A,children:jsx(xc,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:g$1?.background,...c},children:jsx(Cc,{src:g$1?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:u})})})}),jsx(hc,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:yc,variants:KI,style:d,isVisible:!!P,children:P&&jsx(p,{title:P,children:jsx(xc,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:g$1?.background,...c},children:jsx(Cc,{src:g$1?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:u})})})})]}):jsx(p,{title:T??I(Ht(e)),children:jsx(ve,{children:D})})})}var XM=()=>{let{t:e}=useTranslation(),t=Bc(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 ZM={G:"Global",R:"Regional",L:"Local"},Kt=({geographyVariant:e,countryCode:t,isTextShown:o})=>{let n=e?ZM[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 eD=({geographyVariant:e,isTextShown:t,deviceCountry:o,deviceType:n,tableMode:r})=>{let i=Bc(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 nD=({isDisputeOpen:e,iconStyles:t})=>{let o=Bc(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 ob=styled$1(Sr,{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",gap:e.spacing(.5),...Wa(t)&&{height:"18px"},alignItems:"center"})),nb=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function Sc({countryCode:e,isTextShown:t,cardNumber:o,bankName:n,tableMode:r}){let i=Bc(useId(),"issuer-icon"),a=o?.slice(0,4),l=o?.slice(-4);return jsxs(ob,{id:i,"data-testid":"IssuerIcon",tableMode:r,children:[e&&jsx(Kt,{countryCode:e,isTextShown:t}),jsx(p,{title:`${n?`Issuer - ${n}`:""}`,children:jsx(nb,{children:`${a||""} ${l||""}`})})]})}var sD=Sc;var dD=({payoutStatus:e="PENDING",isTextShown:t,payoutTooltip:o,iconStyles:n,isSheetViewShown:r,chipIndex:i=0,selectionProps:a={}})=>{let{t:l}=useTranslation(),s=Bc(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 xD=({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=Bc(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(uf,{"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(Zl,{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(Zl,{id:m,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[jsx(df,{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})})},rb=xD;var hD=rb;var yD={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},Ce=e=>yD[e?.toLowerCase()||""]||e;styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var ib=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 ab=styled("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),lb=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 sb=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(e);return jsx(p,{title:o,children:t?jsx(lb,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(ab,{"data-testid":"SourceCell_TextLabel","data-source":e,children:a(Ht(e))})}):jsx(ib,{src:l,alt:e,width:n,height:r,onError:s=>{s.currentTarget.src=h("card");},sx:i})})}function AD({payment:e,card:t,isTextShown:o,firstIcon:n}){let r=Bc(useId(),"source-icons"),{t:i}=useTranslation(),a=useCallback(()=>{let p=[],m=ec$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(sb,{children:["\xB7\xB7\xB7 ",t?.last_four]})]})}var wr={PROCESSED:Sg,FAILED:""};var db=styled("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),ub=styled("img")(()=>({width:"16px",height:"16px"})),fb=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=Bc(useId(),"destination-icon"),a=r(Ht(e));return o&&wr[e]?jsx(b$1,{copyTrigger:"press",copyText:a,children:a}):t&&wr[e]?jsx(db,{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(fb,{id:i,"data-testid":"DestinationIcon",className:"destination-status",children:e&&wr[e]&&jsx(p,{title:r(Ht(e)),children:jsx(ub,{src:wr[e],alt:"destination-icon"})})})}
2
+ export{sD as $,sv as $a,Ia as $b,CI as $c,Xl as A,Ew as Aa,rr as Ab,Fp as Ac,Pi as B,Mw as Ba,Ks as Bb,Wp as Bc,JL as C,kw as Ca,xa as Cb,nA as Cc,To as D,Vw as Da,qs as Db,Zh as Dc,wo as E,Hw as Ea,ha as Eb,jp as Ec,uS as F,$w as Fa,S1 as Fb,my as Fc,CS as G,Kw as Ga,Qo as Gb,fy as Gc,yS as H,Zw as Ha,ir as Hb,xy as Hc,TS as I,t0 as Ia,Js as Ib,BA as Ic,PS as J,qi as Ja,ar as Jb,VA as Jc,MS as K,xH as Ka,Qs as Kb,hr as Kc,kn as L,Rg as La,ep as Lb,hy as Lc,es as M,FH as Ma,tp as Mb,Iy as Mc,rV as N,y0 as Na,op as Nb,$A as Nc,KS as O,S0 as Oa,pe as Ob,Ty as Oc,QS as P,P0 as Pa,np as Pb,Na as Pc,vb as Q,qg as Qa,rp as Qb,Dy as Qc,Eb as R,L0 as Ra,ip as Rb,$a as Rc,Mb as S,lC as Sa,ap as Sb,ec as Sc,_I as T,Y0 as Ta,Zs as Tb,ME as Tc,HM as U,j0 as Ua,lr as Ub,DE as Uc,$M as V,X0 as Va,T1 as Vb,ja as Vc,rt as W,Q0 as Wa,lp as Wb,Ka as Wc,XM as X,dC as Xa,sp as Xb,Xa as Xc,Kt as Y,rv as Ya,pp as Yb,Ja as Yc,eD as Z,av as Za,dh as Zb,rI as Zc,nD as _,lv as _a,ya as _b,iM as _c,v as a,dD as aa,vC as ab,w1 as ac,wI as ad,gi as b,hD as ba,DC as bb,ba as bc,kI as bd,vn as c,Ce as ca,Iv as cb,v1 as cc,ol as cd,Tt as d,qe as da,WC as db,cp as dc,VI as dd,BR as e,AD as ea,jC as eb,mp as ec,nl as ed,ju as f,Yi as fa,ex as fb,dp as fc,rl as fd,VR as g,nT as ga,Lv as gb,uh as gc,PM as gd,Ku as h,sT as ha,Wv as hb,P1 as hc,qu as i,dT as ia,cx as ib,A1 as ic,z as j,CT as ja,Yv as jb,E1 as jc,Xu as k,dN as ka,xx as kb,up as kc,Zu as l,ST as la,vx as lb,Sa as lc,Ci as m,vT as ma,t1 as mb,Ta as mc,Me as n,RT as na,K$ as nb,en as nc,ve as o,sF as oa,O as ob,Ip as oc,Y as p,fF as pa,Ne as pb,Sp as pc,xi as q,IF as qa,ga as qb,Tp as qc,En as r,PF as ra,h1 as rb,wp as rc,ef as s,zf as sa,js as sb,Ap as sc,Xb as t,ew as ta,y1 as tb,Ep as tc,Qb as u,nw as ua,I1 as ub,Mp as uc,nS as v,qf as va,b1 as vb,mr as vc,aS as w,Zf as wa,Ca as wb,Nh as wc,vi as x,yw as xa,oo as xb,Vp as xc,rf as y,bw as ya,Fe as yb,QP as yc,af as z,Tw as za,ph as zb,Np as zc};