@tap-payments/os-micro-frontend-shared 0.3.91 → 0.3.92

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 (77) hide show
  1. package/build/_chunks/{chunk-5I73HF6E.js → chunk-2R6P6DU4.js} +1 -1
  2. package/build/_chunks/{chunk-APAWGA27.js → chunk-ARZK7WOR.js} +1 -1
  3. package/build/_chunks/chunk-HZEMOGFU.js +1 -0
  4. package/build/_chunks/{chunk-PJELM2TG.js → chunk-KON2OXDU.js} +1 -1
  5. package/build/_chunks/{chunk-VYWKGODA.js → chunk-LLCS4L25.js} +1 -1
  6. package/build/_chunks/{chunk-JWINVJHI.js → chunk-P4DF2UNP.js} +1 -1
  7. package/build/_chunks/{chunk-EJQDFXYZ.js → chunk-QU6CDB3S.js} +1 -1
  8. package/build/_chunks/chunk-TKV75GFJ.js +1 -0
  9. package/build/_chunks/{chunk-G4XAKGR3.js → chunk-U7VSW2TH.js} +1 -1
  10. package/build/_chunks/{chunk-BMALOMIZ.js → chunk-UCDJY6XI.js} +1 -1
  11. package/build/_v2/components/primitives/Accordion/icons.d.ts +3 -0
  12. package/build/_v2/components/primitives/Accordion/style.d.ts +6 -0
  13. package/build/_v2/components/primitives/Accordion/type.d.ts +14 -6
  14. package/build/_v2/components/primitives/Badge/index.d.ts +1 -1
  15. package/build/_v2/components/primitives/Badge/style.d.ts +2 -2
  16. package/build/_v2/components/primitives/Badge/type.d.ts +4 -4
  17. package/build/_v2/components/primitives/Button/constants.d.ts +4 -3
  18. package/build/_v2/components/primitives/Button/style.d.ts +1 -0
  19. package/build/_v2/components/primitives/CircularProgress/style.d.ts +1 -1
  20. package/build/_v2/components/primitives/CopyButton/CopyButton.d.ts +1 -1
  21. package/build/_v2/components/primitives/CopyButton/constants.d.ts +4 -0
  22. package/build/_v2/components/primitives/CopyButton/style.d.ts +3 -2
  23. package/build/_v2/components/primitives/CopyButton/type.d.ts +2 -2
  24. package/build/_v2/components/primitives/Menu/type.d.ts +1 -1
  25. package/build/_v2/components/primitives/index.d.ts +1 -1
  26. package/build/components/ActiveFilterChip/index.js +1 -1
  27. package/build/components/Amount/index.js +1 -1
  28. package/build/components/AmountConversionFilter/index.js +1 -1
  29. package/build/components/AmountInput/index.js +1 -1
  30. package/build/components/AmountSlider/index.js +1 -1
  31. package/build/components/AppServices/index.js +1 -1
  32. package/build/components/AppServicesBar/index.js +1 -1
  33. package/build/components/BrandLogo/index.js +1 -1
  34. package/build/components/CircularProgressWithLabel/CircularProgressWithLabel.d.ts +2 -1
  35. package/build/components/CircularProgressWithLabel/index.js +1 -1
  36. package/build/components/CircularProgressWithLabel/style.d.ts +3 -3
  37. package/build/components/ColumnViews/index.js +1 -1
  38. package/build/components/CopyImage/index.js +1 -1
  39. package/build/components/CountBadge/index.js +1 -1
  40. package/build/components/CountryFilter/index.js +1 -1
  41. package/build/components/CurrencyFilter/index.js +1 -1
  42. package/build/components/Customer/index.js +1 -1
  43. package/build/components/DateFilter/index.js +1 -1
  44. package/build/components/Discount/index.js +1 -1
  45. package/build/components/FileInputPreview/index.js +1 -1
  46. package/build/components/FileUpload/index.js +1 -1
  47. package/build/components/FilterDropdown/index.js +1 -1
  48. package/build/components/Filters/index.js +1 -1
  49. package/build/components/LanguageDropdown/index.js +1 -1
  50. package/build/components/ListColumnFilter/index.js +1 -1
  51. package/build/components/ListHeader/index.js +1 -1
  52. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  53. package/build/components/MerchantLogo/index.js +1 -1
  54. package/build/components/MerchantsDropdown/index.js +1 -1
  55. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  56. package/build/components/PartnersFilter/index.js +1 -1
  57. package/build/components/PaymentSourceFilter/index.js +1 -1
  58. package/build/components/PhoneFilter/index.js +1 -1
  59. package/build/components/ReceiptsViewer/index.js +1 -1
  60. package/build/components/ReferenceTypeFilter/index.js +1 -1
  61. package/build/components/SearchButton/index.js +1 -1
  62. package/build/components/StatusBar/index.js +1 -1
  63. package/build/components/StatusButton/index.js +1 -1
  64. package/build/components/StatusFilter/index.js +1 -1
  65. package/build/components/StatusIcons/index.js +1 -1
  66. package/build/components/TableCells/index.js +1 -1
  67. package/build/components/TableReports/index.js +1 -1
  68. package/build/components/TreeDropdown/index.js +1 -1
  69. package/build/components/VAT/index.js +1 -1
  70. package/build/components/VerificationIcon/index.js +1 -1
  71. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  72. package/build/components/WindowSideBar/index.js +1 -1
  73. package/build/components/index.js +1 -1
  74. package/build/index.js +1 -1
  75. package/package.json +1 -1
  76. package/build/_chunks/chunk-RI3P5LR2.js +0 -1
  77. package/build/_chunks/chunk-YGKBVN23.js +0 -1
@@ -1 +1 @@
1
- import {b}from'./chunk-RW2YU6WS.js';import {e}from'./chunk-YGKBVN23.js';import {Lc}from'./chunk-W5HUJVZ6.js';import {Bh}from'./chunk-RZ3IAVXL.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var l=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:i})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:i?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:i,label:o,onDismiss:d,dismissible:m=true}){let c=Lc(useId(),"active-filter-chip");return i?jsxs(l,{id:c,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(e,{pointer:true,round:true,onClick:d,variant:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Bh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var N=s;export{N as a};
1
+ import {b}from'./chunk-RW2YU6WS.js';import {e}from'./chunk-HZEMOGFU.js';import {Lc}from'./chunk-W5HUJVZ6.js';import {Bh}from'./chunk-RZ3IAVXL.js';import {memo,useId}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var l=styled(Box,{shouldForwardProp:t=>t!=="isLongLabel"})(({theme:t,isLongLabel:i})=>({display:"flex",justifyContent:"center",alignItems:"center",padding:"6px 16px",height:"32px",background:t.palette.background.gradient.shadedBlue,color:t.palette.common.white,borderRadius:"50px",fontSize:"11px",gap:t.spacing(1),minWidth:i?"12rem":"8.4rem",marginRight:"auto",position:"relative"}));function u({ids:t,visible:i,label:o,onDismiss:d,dismissible:m=true}){let c=Lc(useId(),"active-filter-chip");return i?jsxs(l,{id:c,"data-testid":"ActiveFilterChip",isLongLabel:(o?.length??0)>11,children:[o?jsx(b,{children:o}):jsx("span",{children:t?.join(",")}),m&&jsx(e,{pointer:true,round:true,onClick:d,variant:"active",sx:{position:"absolute",right:"8px"},children:jsx("img",{src:Bh,alt:"close",style:{width:"8px",height:"7px"}})})]}):null}var s=memo(u);var N=s;export{N as a};
@@ -1,2 +1,2 @@
1
- import {h,g,a,f,e as e$1,d,c}from'./chunk-RW2YU6WS.js';import {e}from'./chunk-YGKBVN23.js';import {Lc,Ua,r}from'./chunk-W5HUJVZ6.js';import {jl,ha,Ra,zg,Vk,Wa,Qa,Ig,Hg,Jg,Gg,Lg,xb,wb,lk,Vj,eb,gk,B,w,A,D,Eh,Uj,u,mk}from'./chunk-RZ3IAVXL.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function L({isActive:p,disableHover:o}){let[s,C]=useState(false),c=useTheme(),e=()=>{o||C(true);},i=()=>{C(false);},I=p?c.palette.common.white:c.palette.grey[700],u=s?c.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:u,fillOpacity:"0.1",onMouseEnter:e,onMouseLeave:i}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:I})]})})}var vt={inProgress:mk,initiated:mk,abandoned:u,cancelled:Uj,reversed:Eh,reports:D,search:A,chevronDown:w,unAuthorized:B,unSettled:gk,unCaptured:eb,captured:Vj,authorized:lk,openFlag:wb,closedFlag:xb,unauthenticated:Lg,authenticated:Gg,paidOut:Jg,scheduled:Hg,checked:Ig,dashedChecked:Qa,deactivated:Wa,destination:Vk,destinationReversed:zg,outstanding:Ra,active:ha,inactive:jl};var Nt=memo(p=>{let{variant:o="inActive",badgeCount:s,icon:C,label:c$1,dropdownOptions:e$2,selectedStatus:i,onButtonBodyClick:I,iconMapper:u=vt,buttonSx:Bt,...bt}=p,St=Lc(useId(),"status-button"),[Lt,M]=useState(0),{t:E}=useTranslation(),y=useRef(null),[T,f$1]=useState(null),[n,A]=useState(i??e$2?.[0]?.status);useEffect(()=>{i!==void 0&&A(i);},[i]);let d$1=useMemo(()=>!!e$2?.length,[e$2]),h$1=!!T&&Lt>1,l=o==="active",x=useMemo(()=>l?"active":"inActive",[l]),m=useMemo(()=>n?e$2?.find(t=>t.status===n):null,[n,e$2]),kt=useMemo(()=>{if(m?.icon)return jsx(h,{variant:o,children:m.icon});let t=n&&u[n]?n:C;if(t&&u[t])return jsx(g,{icon:t,variant:o,src:u[t],alt:`${t}-icon`})},[m,n,u,C,o]),wt=useMemo(()=>!s||Number.isNaN(Ua(s))?null:jsx(e,{variant:x,children:r(Number(s))}),[s,x]),H=useMemo(()=>d$1?jsx(L,{isActive:l}):null,[d$1,l]);useEffect(()=>{l||(M(0),f$1(null));},[l]);let g$1=useCallback(()=>{f$1(null);},[]),P=useCallback(()=>{d$1&&f$1(h$1?null:y.current);},[d$1,h$1]),Mt=useCallback(t=>{t.stopPropagation(),p?.onClick?.(t),I?.(n||e$2?.[0]?.status||"all"),P(),M(B=>B+1);},[p,I,n,e$2,P]),D=useCallback(t=>B=>{t?.onClick?.(B),A(t.status),g$1();},[g$1]),Et=useMemo(()=>e$2?.map(t=>({...t,onClick:D(t)}))||[],[e$2,D]),yt=a[o],Tt=useMemo(()=>m?.label||(n?E(n):c$1),[m,n,E,c$1]);return jsxs(Fragment,{children:[jsx(yt,{id:St,"data-testid":"StatusButton",...bt,ref:y,onClick:Mt,statusVariant:o,sx:{...d$1&&{paddingInlineEnd:"27px"},...Bt},children:jsxs(f,{children:[jsxs(e$1,{variant:o,children:[kt,Tt,wt]}),H&&jsx(d,{children:H})]})}),h$1&&d$1&&jsx(c,{open:h$1,onClose:g$1,anchorEl:T,menuItems:Et})]})}),gt=Nt;var en=gt;
1
+ import {h,g,a,f,e as e$1,d,c}from'./chunk-RW2YU6WS.js';import {e}from'./chunk-HZEMOGFU.js';import {Lc,Ua,r}from'./chunk-W5HUJVZ6.js';import {jl,ha,Ra,zg,Vk,Wa,Qa,Ig,Hg,Jg,Gg,Lg,xb,wb,lk,Vj,eb,gk,B,w,A,D,Eh,Uj,u,mk}from'./chunk-RZ3IAVXL.js';import {memo,useId,useState,useRef,useEffect,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function L({isActive:p,disableHover:o}){let[s,C]=useState(false),c=useTheme(),e=()=>{o||C(true);},i=()=>{C(false);},I=p?c.palette.common.white:c.palette.grey[700],u=s?c.palette.common.black:"transparent";return jsx("svg",{width:"27",height:"30",viewBox:"0 0 27 32",xmlns:"http://www.w3.org/2000/svg",children:jsxs("g",{id:"Group 140343",children:[jsx("path",{id:"Active",d:"M0 0H11C19.8366 0 27 7.16344 27 16C27 24.8366 19.8366 32 11 32H0V0Z",fill:u,fillOpacity:"0.1",onMouseEnter:e,onMouseLeave:i}),jsx("path",{id:"Union",fillRule:"evenodd",clipRule:"evenodd",d:"M15.6941 15.0078C15.6494 15.0193 15.6083 15.043 15.5758 15.0769L12.5026 18.1501L12.5025 18.1501L15.5756 15.0769C15.6082 15.043 15.6493 15.0193 15.6941 15.0078ZM12.5619 18.7465C12.5426 18.7512 12.5227 18.7536 12.5026 18.7536C12.4363 18.7536 12.3727 18.7273 12.3258 18.6804L9.07581 15.4304C9.04012 15.3957 9.01559 15.3512 9.00535 15.3025C8.99511 15.2538 8.99963 15.2032 9.01833 15.1571C9.03703 15.111 9.06907 15.0715 9.11033 15.0437C9.13446 15.0275 9.16112 15.0156 9.18904 15.0086C9.16105 15.0156 9.13433 15.0275 9.11013 15.0438C9.06887 15.0716 9.03684 15.111 9.01814 15.1571C8.99944 15.2032 8.99492 15.2539 9.00516 15.3026C9.0154 15.3513 9.03993 15.3958 9.07562 15.4305L12.3256 18.6805C12.3725 18.7273 12.4361 18.7537 12.5024 18.7537C12.5226 18.7537 12.5426 18.7512 12.5619 18.7465ZM16.1965 15.342C16.1781 15.4301 16.1338 15.5105 16.0693 15.5731L12.8205 18.8219C12.7361 18.9063 12.6217 18.9537 12.5024 18.9537C12.3831 18.9537 12.2686 18.9062 12.1842 18.8219L8.93507 15.5728C8.87148 15.5105 8.82775 15.4308 8.80944 15.3437C8.79101 15.2561 8.79914 15.165 8.8328 15.082C8.86646 14.999 8.92412 14.9279 8.99839 14.8779C9.07266 14.8279 9.16022 14.8011 9.24978 14.8011C9.30998 14.8011 9.36958 14.8132 9.42503 14.8366C9.47997 14.8599 9.52973 14.8938 9.57144 14.9364L12.5024 17.8673L15.433 14.9368C15.5151 14.852 15.6273 14.803 15.7454 14.8002C15.836 14.798 15.9252 14.8233 16.0013 14.8728C16.0773 14.9222 16.1367 14.9935 16.1715 15.0772C16.2063 15.1609 16.2151 15.2533 16.1965 15.342Z",fill:I})]})})}var vt={inProgress:mk,initiated:mk,abandoned:u,cancelled:Uj,reversed:Eh,reports:D,search:A,chevronDown:w,unAuthorized:B,unSettled:gk,unCaptured:eb,captured:Vj,authorized:lk,openFlag:wb,closedFlag:xb,unauthenticated:Lg,authenticated:Gg,paidOut:Jg,scheduled:Hg,checked:Ig,dashedChecked:Qa,deactivated:Wa,destination:Vk,destinationReversed:zg,outstanding:Ra,active:ha,inactive:jl};var Nt=memo(p=>{let{variant:o="inActive",badgeCount:s,icon:C,label:c$1,dropdownOptions:e$2,selectedStatus:i,onButtonBodyClick:I,iconMapper:u=vt,buttonSx:Bt,...bt}=p,St=Lc(useId(),"status-button"),[Lt,M]=useState(0),{t:E}=useTranslation(),y=useRef(null),[T,f$1]=useState(null),[n,A]=useState(i??e$2?.[0]?.status);useEffect(()=>{i!==void 0&&A(i);},[i]);let d$1=useMemo(()=>!!e$2?.length,[e$2]),h$1=!!T&&Lt>1,l=o==="active",x=useMemo(()=>l?"active":"inActive",[l]),m=useMemo(()=>n?e$2?.find(t=>t.status===n):null,[n,e$2]),kt=useMemo(()=>{if(m?.icon)return jsx(h,{variant:o,children:m.icon});let t=n&&u[n]?n:C;if(t&&u[t])return jsx(g,{icon:t,variant:o,src:u[t],alt:`${t}-icon`})},[m,n,u,C,o]),wt=useMemo(()=>!s||Number.isNaN(Ua(s))?null:jsx(e,{variant:x,children:r(Number(s))}),[s,x]),H=useMemo(()=>d$1?jsx(L,{isActive:l}):null,[d$1,l]);useEffect(()=>{l||(M(0),f$1(null));},[l]);let g$1=useCallback(()=>{f$1(null);},[]),P=useCallback(()=>{d$1&&f$1(h$1?null:y.current);},[d$1,h$1]),Mt=useCallback(t=>{t.stopPropagation(),p?.onClick?.(t),I?.(n||e$2?.[0]?.status||"all"),P(),M(B=>B+1);},[p,I,n,e$2,P]),D=useCallback(t=>B=>{t?.onClick?.(B),A(t.status),g$1();},[g$1]),Et=useMemo(()=>e$2?.map(t=>({...t,onClick:D(t)}))||[],[e$2,D]),yt=a[o],Tt=useMemo(()=>m?.label||(n?E(n):c$1),[m,n,E,c$1]);return jsxs(Fragment,{children:[jsx(yt,{id:St,"data-testid":"StatusButton",...bt,ref:y,onClick:Mt,statusVariant:o,sx:{...d$1&&{paddingInlineEnd:"27px"},...Bt},children:jsxs(f,{children:[jsxs(e$1,{variant:o,children:[kt,Tt,wt]}),H&&jsx(d,{children:H})]})}),h$1&&d$1&&jsx(c,{open:h$1,onClose:g$1,anchorEl:T,menuItems:Et})]})}),gt=Nt;var en=gt;
2
2
  export{L as a,en as b};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-KHM5KW53.js';import {Lc,q}from'./chunk-W5HUJVZ6.js';import {kb}from'./chunk-RZ3IAVXL.js';import {styled as styled$1,alpha}from'@mui/material';import {styled}from'@mui/material/styles';import {useId}from'react';import {useTranslation}from'react-i18next';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var c=(o=>(o.DEFAULT="default",o.PRIMARY="primary",o.SECONDARY="secondary",o.SUCCESS="success",o.WARNING="warning",o.ERROR="error",o.INACTIVE="inActive",o.ACTIVE="active",o.DARK="dark",o.NEUTRAL="neutral",o.GRAY="gray",o.ORANGE="orange",o.RED="red",o))(c||{});var I=(t,e)=>new Map([["default",e.palette.info.main],["primary","#1976d2"],["secondary","#f50057"],["inActive",e.palette.grey[100]],["active",alpha(e.palette.text.primary,.1)],["dark",e.palette.info.dark],["neutral","#656565"],["gray","#CFCFCF"],["orange","#FFD503"],["red","#FF0000"]]).get(t)||e.palette.common.white,x=(t,e)=>new Map([["default",e.palette.common.white],["primary",e.palette.common.white],["secondary",e.palette.common.white],["inActive",e.palette.text.primary],["active",e.palette.common.white],["dark",e.palette.common.white],["neutral",e.palette.common.white]]).get(t)||e.palette.common.white,E=new Map([["compact",.5],["round",0],["normal",2]]),d=styled("span")(({theme:t,variant:e,compact:r,round:n,pointer:C})=>({padding:r?"0.08031rem 0.16056rem":n?"0.5rem 0.275rem":"8px 8px",borderRadius:t.spacing(E.get(n?"round":r?"compact":"normal")||2),backgroundColor:I(e,t),color:x(e,t),fontSize:"0.6rem",fontWeight:600,overflow:"hidden",height:"12px",display:"inline-flex",alignItems:"center",justifyContent:"center",fontFamily:"Tap Sans",cursor:C?"pointer":"auto"}));d.displayName="CountBadge";var u=d;var A=styled$1(motion.span)(({order:t})=>({zIndex:(t||0)+1})),p=(t,e)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:e?t*e:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}}),f=styled$1("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.25)}));function N({totalPaymentsCount:t,index:e}){let r=Lc(useId(),"count-animated-badge"),{t:n}=useTranslation();return jsx(a,{title:n("totalPaymentCount",{amount:q(t)}),children:jsx(A,{id:r,order:e,variants:p(e),"data-testid":"AgreementCell_CountAnimatedBadge",children:jsxs(f,{children:[jsx("img",{src:kb,alt:"start",style:{width:"10px",height:"10px"}})," ",(t||0)>1&&jsx("span",{style:{fontSize:"9.782px"},children:t})]})})})}var _=u;export{c as a,A as b,p as c,N as d,_ as e};
@@ -1 +1 @@
1
- import {e as e$2}from'./chunk-HJIXBSS4.js';import {a as a$1}from'./chunk-KTOJBKJU.js';import {a as a$2}from'./chunk-SKKU43MT.js';import {a,f,e as e$1}from'./chunk-RW2YU6WS.js';import {e}from'./chunk-YGKBVN23.js';import {Ua,r,Lc}from'./chunk-W5HUJVZ6.js';import {Ab}from'./chunk-RZ3IAVXL.js';import {memo,useRef,useMemo,useCallback,useId,useState}from'react';import {styled,Typography,Box,Popper}from'@mui/material';import {useTranslation}from'react-i18next';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var O=styled(Typography)(()=>({display:"block",textAlign:"center",fontSize:"10px",fontWeight:500,color:"#8D8D94",padding:"24px 0"})),A=styled(Box,{shouldForwardProp:t=>t!=="isDisabled"})(({isDisabled:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",...t&&{"& img":{opacity:.3}}}));var tt=memo(t=>{let{variant:e$2="inActive",badgeCount:o,label:r$1,...n}=t,s=useRef(null),m=useMemo(()=>!o||Number.isNaN(Ua(o))?null:jsx(e,{variant:"inActive",children:r(Number(o))}),[o]),u=useCallback(p=>{p.stopPropagation(),t?.onClick?.(p);},[t]),l=a[e$2];return jsx(l,{"data-testid":"MultiSelectStatusButton",...n,ref:s,onClick:u,statusVariant:e$2,children:jsx(f,{children:jsxs(e$1,{variant:e$2,children:[r$1,m]})})})}),V=tt;function W(t){let e=new Set;return t.filter(o=>e.has(o.value)?false:(e.add(o.value),true))}function h(t,e){let o=e.toLowerCase();return t.reduce((r,n)=>{if(n.options?.length){let s=h(n.options,e);s.length&&r.push({...n,options:s});}else (n.placeholder?.toLowerCase().includes(o)||n.value.toLowerCase().includes(o))&&r.push(n);return r},[])}function it({buttonLabel:t,onClear:e,onConfirm:o,dropdownItems:r,apiKey:n,data:s,styles:m,buttonDisabled:u,searchable:l,searchPlaceholder:p}){let{t:Q}=useTranslation(),Y=p??`${Q("search")}...`,$=Lc(useId(),"multi-select-dropdown-button"),[C,b]=useState(null),[a,d]=useState(""),G=c=>{b(c.currentTarget);},g=()=>{b(null),d("");},x=!!C,L=s?.[n],J=Array.isArray(L)?L.length:0,S=useMemo(()=>{if(!r)return r;let c=W(r);return !l||!a?c:h(c,a)},[l,a,r]),v=l&&!!a&&S?.length===0,U=l?jsxs(Fragment,{children:[jsx(a$1,{name:"multi-select-search",value:a,placeholder:Y,onSearchChange:d,onSearchReset:()=>d(""),sx:{pt:0}}),v&&jsx(O,{children:"No results found"})]}):void 0;return jsxs("div",{id:$,"data-testid":"MultiSelectDropdownButton",children:[jsx(V,{onClick:G,label:jsxs(A,{isDisabled:u,children:[t,jsx("img",{src:Ab,alt:"arrow-down"})]}),disabled:u,badgeCount:J}),x&&jsx(a$2,{onClick:g}),jsx(Popper,{open:x,anchorEl:C,placement:"bottom-start",sx:{zIndex:9999},children:jsx(e$2,{onCloseDropdown:g,filter:{apiKey:n,data:s,onClear:e,onConfirm:o,options:S,type:"list"},styles:{...m,height:v?"auto":"300px",overflowY:"scroll",maxWidth:"200px"},header:U,searchable:l})})]})}var z=memo(it);var At=z;export{At as a};
1
+ import {e as e$2}from'./chunk-HJIXBSS4.js';import {a as a$1}from'./chunk-KTOJBKJU.js';import {a as a$2}from'./chunk-SKKU43MT.js';import {a,f,e as e$1}from'./chunk-RW2YU6WS.js';import {e}from'./chunk-HZEMOGFU.js';import {Ua,r,Lc}from'./chunk-W5HUJVZ6.js';import {Ab}from'./chunk-RZ3IAVXL.js';import {memo,useRef,useMemo,useCallback,useId,useState}from'react';import {styled,Typography,Box,Popper}from'@mui/material';import {useTranslation}from'react-i18next';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var O=styled(Typography)(()=>({display:"block",textAlign:"center",fontSize:"10px",fontWeight:500,color:"#8D8D94",padding:"24px 0"})),A=styled(Box,{shouldForwardProp:t=>t!=="isDisabled"})(({isDisabled:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:"4px",...t&&{"& img":{opacity:.3}}}));var tt=memo(t=>{let{variant:e$2="inActive",badgeCount:o,label:r$1,...n}=t,s=useRef(null),m=useMemo(()=>!o||Number.isNaN(Ua(o))?null:jsx(e,{variant:"inActive",children:r(Number(o))}),[o]),u=useCallback(p=>{p.stopPropagation(),t?.onClick?.(p);},[t]),l=a[e$2];return jsx(l,{"data-testid":"MultiSelectStatusButton",...n,ref:s,onClick:u,statusVariant:e$2,children:jsx(f,{children:jsxs(e$1,{variant:e$2,children:[r$1,m]})})})}),V=tt;function W(t){let e=new Set;return t.filter(o=>e.has(o.value)?false:(e.add(o.value),true))}function h(t,e){let o=e.toLowerCase();return t.reduce((r,n)=>{if(n.options?.length){let s=h(n.options,e);s.length&&r.push({...n,options:s});}else (n.placeholder?.toLowerCase().includes(o)||n.value.toLowerCase().includes(o))&&r.push(n);return r},[])}function it({buttonLabel:t,onClear:e,onConfirm:o,dropdownItems:r,apiKey:n,data:s,styles:m,buttonDisabled:u,searchable:l,searchPlaceholder:p}){let{t:Q}=useTranslation(),Y=p??`${Q("search")}...`,$=Lc(useId(),"multi-select-dropdown-button"),[C,b]=useState(null),[a,d]=useState(""),G=c=>{b(c.currentTarget);},g=()=>{b(null),d("");},x=!!C,L=s?.[n],J=Array.isArray(L)?L.length:0,S=useMemo(()=>{if(!r)return r;let c=W(r);return !l||!a?c:h(c,a)},[l,a,r]),v=l&&!!a&&S?.length===0,U=l?jsxs(Fragment,{children:[jsx(a$1,{name:"multi-select-search",value:a,placeholder:Y,onSearchChange:d,onSearchReset:()=>d(""),sx:{pt:0}}),v&&jsx(O,{children:"No results found"})]}):void 0;return jsxs("div",{id:$,"data-testid":"MultiSelectDropdownButton",children:[jsx(V,{onClick:G,label:jsxs(A,{isDisabled:u,children:[t,jsx("img",{src:Ab,alt:"arrow-down"})]}),disabled:u,badgeCount:J}),x&&jsx(a$2,{onClick:g}),jsx(Popper,{open:x,anchorEl:C,placement:"bottom-start",sx:{zIndex:9999},children:jsx(e$2,{onCloseDropdown:g,filter:{apiKey:n,data:s,onClear:e,onConfirm:o,options:S,type:"list"},styles:{...m,height:v?"auto":"300px",overflowY:"scroll",maxWidth:"200px"},header:U,searchable:l})})]})}var z=memo(it);var At=z;export{At as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-APAWGA27.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
1
+ import {b}from'./chunk-ARZK7WOR.js';import {memo,useCallback,Fragment as Fragment$1,createElement}from'react';import {useTranslation}from'react-i18next';import {jsx,Fragment}from'react/jsx-runtime';function B({isActiveFilterVisible:f,availableStatuses:v,status:e,onStatusChange:i,buttonSx:l}){let{t:I}=useTranslation(),S=f??false,b$1=useCallback(s=>s===e&&!S?"active":"inActive",[e,S]),u=useCallback(s=>{i?.(s);},[i]);return jsx(Fragment,{children:v?.map(({render:s,...a},d)=>{if(s)return jsx(Fragment$1,{children:s({status:e,onChange:u},{...a,index:d})},`custom-status-slot-${d}`);if(!Array.isArray(a.status))return createElement(b,{...a,key:`status-button-array-${a.status}`,variant:b$1(a.status),onClick:()=>{Array.isArray(a.status)||u(a.status);},buttonSx:l});if(!a.status)return null;let o=a.status.filter(Boolean).map(t=>typeof t=="string"?{value:t}:t)||[],c=!!e&&o.some(t=>t?.value===e);return jsx("div",{children:jsx(b,{...a,selectedStatus:c?e:void 0,variant:c?"active":"inActive",onButtonBodyClick:t=>u(t),dropdownOptions:o.map(t=>({label:t?.label||I(t?.value||""),status:t?.value,icon:t.icon,onClick:()=>u(t.value)})),buttonSx:l})},o[0]?.value)})})}var p=memo(B);var M=p;export{M as a};
@@ -1 +1 @@
1
- import {a as a$2}from'./chunk-ULODM6GK.js';import {a as a$3}from'./chunk-RI3P5LR2.js';import {a as a$1}from'./chunk-TGRKEJOI.js';import {a}from'./chunk-GNY2VGGW.js';import {gc,Lc}from'./chunk-W5HUJVZ6.js';import {nj,oj,uj,Le}from'./chunk-RZ3IAVXL.js';import {forwardRef,useState,useImperativeHandle,useEffect,useMemo,memo,useId}from'react';import {Button}from'@mui/material';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {useTranslation}from'react-i18next';import {useDropzone}from'react-dropzone';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var G=styled(p)(()=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"32px"})),u=styled(p)(()=>({paddingInline:"40px"})),d=styled(a,{shouldForwardProp:e=>e!=="isError"})(({theme:e,isError:i})=>({color:i?"#FF2000":e.palette.text.primary,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:"8px"})),J=styled(p)(({theme:e})=>({color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,cursor:"pointer"})),g=styled(a)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),F=styled(p,{shouldForwardProp:e=>e!=="width"})(({theme:e,width:i})=>({width:i||431,minHeight:176,border:`1px dashed ${e.palette.secondary.light}`,borderRadius:"8px",padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center"})),h=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"24px",color:e.palette.text.primary,fontSize:"14px",lineHeight:"20px",cursor:"default"})),K=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),b=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px",color:e.palette.text.primary})),z=styled(p)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),L=styled(Button)(({theme:e,disabled:i})=>({borderRadius:"4px",minWidth:"105px",background:i?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"4px 8px",fontSize:"9px",fontWeight:600,height:"32px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),O=styled(p)(()=>({display:"flex",gap:"8px",justifyContent:"center",alignItems:"center",padding:"6px",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px"}));var X=forwardRef(({accept:e,footer:i,options:x,isCreateLoading:U,progress:te,error:R,errorHint:oe,subtitleComponent:S,isSuccess:P,onConfirm:re,isSendDisabled:ie,errorActionComponent:le,title:l,width:B,successFooter:pe,progressVariant:ne},ae)=>{let{t:n}=useTranslation(),[a,H]=useState([]),{getRootProps:de,getInputProps:se,open:f,acceptedFiles:j,isDragReject:M,fileRejections:s}=useDropzone(x);useImperativeHandle(ae,()=>({open:f}),[f]),useEffect(()=>{H(j);},[j]);let C=gc(x?.maxSize||0,0).toUpperCase(),m=useMemo(()=>{let me=s.length&&s[0].errors.some(k=>k.code==="file-invalid-type"),ce=s.length&&s[0].errors.some(k=>k.code==="file-too-large");return M||me?n("invalidFileType"):ce?`File is larger than ${C}`:R},[M,R,s,C,n]),W=useMemo(()=>a.length?jsxs(b,{sx:{fontWeight:600},children:[jsx(p,{children:a[0].name}),jsx(z,{children:gc(a[0].size)})]}):null,[a]);return P&&a.length&&!U?jsxs(Fragment,{children:[jsxs(u,{children:[typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:"File uploaded"}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[P&&jsx(p,{component:"img",src:nj,width:56,height:56}),W]})}),pe??jsxs(O,{children:[jsx(a$1,{onClick:()=>{H([]);},children:jsx(a$2,{src:oj,alt:"delete",sx:{width:14,height:14}})}),jsx(L,{disabled:ie,onClick:()=>{re?.(a);},children:"Bulk Send"})]})]}):U&&a.length?jsxs(Fragment,{children:[jsxs(u,{children:[l&&typeof l!="string"?l:jsxs(Fragment,{children:[jsx(d,{children:l??n("uploading")}),jsx(g,{children:n("wait")})]}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[U&&jsx(a$3,{size:56,value:te,variant:ne}),W]})}),i]}):jsxs(Fragment,{children:[jsxs(u,{children:[m?jsx(d,{isError:true,children:m}):typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:n("uploadBulkFile")}),S||!!m&&jsx(g,{children:"Supported formats: xls, xlxs"})]}),jsxs(F,{width:B,...de(),children:[jsx("input",{...se()}),jsxs(h,{"data-slot":"content",children:[jsx(p,{component:"img",src:m?uj:Le,width:56,height:56}),oe,W,m?jsx(Fragment,{children:le||jsx(J,{onClick:f,children:n("uploadAgain")})}):jsxs(b,{children:[jsxs(p,{children:[jsx(K,{onClick:f,children:"Click to upload"})," or drag and drop"]}),jsxs(z,{children:["Maximum file size ",C]}),e&&jsx(g,{children:n("supportedFormats",{accept:e})})]})]})]}),i]})});X.displayName="FileUploadBase";var Y=memo(X);var _=forwardRef((e,i)=>{let x=Lc(useId(),"file-upload");return jsx(G,{id:x,"data-testid":"FileUpload","data-slot":"file-upload-wrapper",children:jsx(Y,{...e,ref:i})})});_.displayName="FileUpload";var ee=memo(_);var Qe=ee;export{Qe as a};
1
+ import {a as a$2}from'./chunk-ULODM6GK.js';import {a as a$3}from'./chunk-TKV75GFJ.js';import {a as a$1}from'./chunk-TGRKEJOI.js';import {a}from'./chunk-GNY2VGGW.js';import {gc,Lc}from'./chunk-W5HUJVZ6.js';import {nj,oj,uj,Le}from'./chunk-RZ3IAVXL.js';import {forwardRef,useState,useImperativeHandle,useEffect,useMemo,memo,useId}from'react';import {Button}from'@mui/material';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {useTranslation}from'react-i18next';import {useDropzone}from'react-dropzone';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var G=styled(p)(()=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:"32px"})),u=styled(p)(()=>({paddingInline:"40px"})),d=styled(a,{shouldForwardProp:e=>e!=="isError"})(({theme:e,isError:i})=>({color:i?"#FF2000":e.palette.text.primary,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:"8px"})),J=styled(p)(({theme:e})=>({color:e.palette.text.primary,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:"4px",border:`1px solid ${e.palette.divider}`,background:e.palette.common.white,cursor:"pointer"})),g=styled(a)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),F=styled(p,{shouldForwardProp:e=>e!=="width"})(({theme:e,width:i})=>({width:i||431,minHeight:176,border:`1px dashed ${e.palette.secondary.light}`,borderRadius:"8px",padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center"})),h=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"24px",color:e.palette.text.primary,fontSize:"14px",lineHeight:"20px",cursor:"default"})),K=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),b=styled(p)(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"8px",color:e.palette.text.primary})),z=styled(p)(({theme:e})=>({color:alpha(e.palette.text.primary,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"})),L=styled(Button)(({theme:e,disabled:i})=>({borderRadius:"4px",minWidth:"105px",background:i?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"4px 8px",fontSize:"9px",fontWeight:600,height:"32px",display:"flex",alignItems:"center",justifyContent:"center",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),O=styled(p)(()=>({display:"flex",gap:"8px",justifyContent:"center",alignItems:"center",padding:"6px",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px"}));var X=forwardRef(({accept:e,footer:i,options:x,isCreateLoading:U,progress:te,error:R,errorHint:oe,subtitleComponent:S,isSuccess:P,onConfirm:re,isSendDisabled:ie,errorActionComponent:le,title:l,width:B,successFooter:pe,progressVariant:ne},ae)=>{let{t:n}=useTranslation(),[a,H]=useState([]),{getRootProps:de,getInputProps:se,open:f,acceptedFiles:j,isDragReject:M,fileRejections:s}=useDropzone(x);useImperativeHandle(ae,()=>({open:f}),[f]),useEffect(()=>{H(j);},[j]);let C=gc(x?.maxSize||0,0).toUpperCase(),m=useMemo(()=>{let me=s.length&&s[0].errors.some(k=>k.code==="file-invalid-type"),ce=s.length&&s[0].errors.some(k=>k.code==="file-too-large");return M||me?n("invalidFileType"):ce?`File is larger than ${C}`:R},[M,R,s,C,n]),W=useMemo(()=>a.length?jsxs(b,{sx:{fontWeight:600},children:[jsx(p,{children:a[0].name}),jsx(z,{children:gc(a[0].size)})]}):null,[a]);return P&&a.length&&!U?jsxs(Fragment,{children:[jsxs(u,{children:[typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:"File uploaded"}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[P&&jsx(p,{component:"img",src:nj,width:56,height:56}),W]})}),pe??jsxs(O,{children:[jsx(a$1,{onClick:()=>{H([]);},children:jsx(a$2,{src:oj,alt:"delete",sx:{width:14,height:14}})}),jsx(L,{disabled:ie,onClick:()=>{re?.(a);},children:"Bulk Send"})]})]}):U&&a.length?jsxs(Fragment,{children:[jsxs(u,{children:[l&&typeof l!="string"?l:jsxs(Fragment,{children:[jsx(d,{children:l??n("uploading")}),jsx(g,{children:n("wait")})]}),S]}),jsx(F,{width:B,children:jsxs(h,{children:[U&&jsx(a$3,{size:56,value:te,variant:ne}),W]})}),i]}):jsxs(Fragment,{children:[jsxs(u,{children:[m?jsx(d,{isError:true,children:m}):typeof l=="string"?jsx(d,{children:l}):l??jsx(d,{children:n("uploadBulkFile")}),S||!!m&&jsx(g,{children:"Supported formats: xls, xlxs"})]}),jsxs(F,{width:B,...de(),children:[jsx("input",{...se()}),jsxs(h,{"data-slot":"content",children:[jsx(p,{component:"img",src:m?uj:Le,width:56,height:56}),oe,W,m?jsx(Fragment,{children:le||jsx(J,{onClick:f,children:n("uploadAgain")})}):jsxs(b,{children:[jsxs(p,{children:[jsx(K,{onClick:f,children:"Click to upload"})," or drag and drop"]}),jsxs(z,{children:["Maximum file size ",C]}),e&&jsx(g,{children:n("supportedFormats",{accept:e})})]})]})]}),i]})});X.displayName="FileUploadBase";var Y=memo(X);var _=forwardRef((e,i)=>{let x=Lc(useId(),"file-upload");return jsx(G,{id:x,"data-testid":"FileUpload","data-slot":"file-upload-wrapper",children:jsx(Y,{...e,ref:i})})});_.displayName="FileUpload";var ee=memo(_);var Qe=ee;export{Qe as a};
@@ -1 +1 @@
1
- import {f,b as b$3,g,a as a$3,e as e$1,d,c as c$1}from'./chunk-AYKYAW5X.js';import {a as a$2}from'./chunk-ULODM6GK.js';import {c}from'./chunk-IUZTPFV7.js';import {o,j,k as k$1,l,p}from'./chunk-E2ZEEVOW.js';import {b as b$2}from'./chunk-G4B2COJS.js';import {a as a$4}from'./chunk-4YOBVV3E.js';import {b as b$1,e,d as d$1}from'./chunk-YGKBVN23.js';import {a as a$1}from'./chunk-KHM5KW53.js';import {fb,gb,db,Lc,Ra,Sa,oc,q as q$2}from'./chunk-W5HUJVZ6.js';import {q as q$1}from'./chunk-ETCFQM4S.js';import {T,ii,ki,ji,hi,oi,Og,Fg,Ng,Bj,Cj,rb,Sj,Vj,kk,Tj,sb,ta,sa,ck,h,Eg}from'./chunk-RZ3IAVXL.js';import {a,b}from'./chunk-YRT7GXGY.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import cr from'@mui/material/Box';var V=a((Sa,Ve)=>{var Xo=fb(),Qo=gb(),Yo=Qo(function(t,e,o){return e=e.toLowerCase(),t+(o?Xo(e):e)});Ve.exports=Yo;});var ct={ORDER:{label:"order",icon:hi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:ji,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:ki,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:ii,color:"#32ADE6"}},mt={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.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 ut=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),ft=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function vo({type:t,hasSavedCard:e,totalPaymentsCount:o,isTextShown:r}){let l=Lc(useId(),"agreement-icon"),p=useTheme(),{t:i}=useTranslation(),n=useMemo(()=>[...e?[mt.SAVED_TOKEN]:[],...(o||0)>0?[mt.COUNT]:[],...t&&ct[t]?[ct[t]]:[]],[e,o,t]),d=c=>r?jsx(b$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a$1,{title:i("totalPaymentCount",{amount:q$2(o)}),children:jsx(ft,{children:jsxs(ut,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:mt.COUNT.color},children:["x",o]})})})},c):jsx(d$1,{totalPaymentsCount:o,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a$1,{title:i(c.label),children:jsx(b$1,{children:r?jsx(ft,{children:jsx(ut,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:i(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a$1,{title:"No agreement",children:jsx(b$1,{children:r?jsx(ft,{children:jsx(ut,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:oi,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var Ae=vo;var Ro=Ae;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Pe=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),ve=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var We=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var Et={"3DS":{tooltip:"3DS",icon:Cj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Bj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Ng,borderColor:"rgba(31, 136, 208, 0.10)"}},Re={FAILED:{tooltip:"Failed",icon:Fg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:Og,borderColor:"rgba(255, 61, 0, 0.10)"}};function Bo({transactionStatus:t,eci:e,authType:o,isTextShown:r}){let l=Lc(useId(),"auth-icons"),p=useMemo(()=>{let n=t?Re[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...o?[{tooltip:o,content:r?Et[o]?.tooltip:Et[o]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:e?`ECI ${e}`:"",type:"text"}]},[t,r,o,e]),i=useMemo(()=>p.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(ve,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Pe,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a$1,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(We,{id:l,"data-testid":"AuthIcons",children:i})}var Be=Bo;var Lo=(t,e,o)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:o?t*o:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:e,...t>0&&{opacity:1}}});var Do=Be;var ot={VOID:{icon:Tj},CAPTURED:{icon:Sj}};var xt=styled$1(motion.div)(({theme:t,isCapture:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:e?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),gt=styled$1("div")(({theme:t,percentage:e,isCapture:o})=>({border:`0.6px ${[0,100].includes(e)?"solid":"dashed"} ${o?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:o?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),It=styled$1("div")(({percentage:t,isCapture:e,theme:o})=>({background:`conic-gradient(${e?o.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${e?o.palette.info.dark:"#656565"}`})),ht=styled$1("img")({width:"14px",height:"14px"}),q=styled$1(o)({width:"16px",height:"16px"}),F=styled$1("img")({width:"16px",height:"16px"}),Le=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function Ct(t){return t<5?5:t===100?95:t}function Fo({voidPercentage:t,capturePercentage:e$1,captureCount:o,autoType:r,captureAmount:l,voidAmount:p,currency:i,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(e$1)+Number(t)===100||d<=0,g=Lc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:w}=useTranslation(),P=Ra(d||0),D=useCallback(C=>`Auto ${C} - ${i} ${P.integerAmount}.${P.decimalAmount}`,[i,P.decimalAmount,P.integerAmount]),Q=useCallback(C=>{let Y=C==="Capture"?l:p,{integerAmount:E,decimalAmount:W}=Sa(Y,i);return `Partial ${C} - ${i} ${E}.${W}`},[l,p,i]),x=e$1>0?jsx(a$1,{title:Q("Capture"),children:jsxs(xt,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(ht,{src:rb,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(gt,{isCapture:true,percentage:e$1,children:[e$1,"% ",jsx(It,{isCapture:true,percentage:Ct(e$1)})]}),o>1&&jsxs(e,{compact:true,variant:"dark",children:[o,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a$1,{title:D("Capture"),children:jsx(q,{children:jsx(F,{src:ot.CAPTURED?.icon,alt:"auto"})})}):jsx(a$1,{title:D("Capture"),children:jsx(q,{children:jsx(F,{src:ot.CAPTURED?.icon,alt:"auto"})})}),I=e$1===100?jsx(a$1,{title:w("captured"),children:jsx(Le,{children:jsx(F,{src:Vj,alt:"captured"})})}):x,v=useMemo(()=>s&&I?jsx(b$2,{chipIndex:4,copyText:w("captured"),selectionProps:f,children:w("captured")}):n&&I?jsx(k$1,{children:w("captured")}):I,[n,I,s,f]);return v&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:v})}var Ee=Fo;function Ko({voidPercentage:t,capturePercentage:e$1,voidCount:o,autoType:r,captureAmount:l$1,voidAmount:p,currency:i,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(e$1)+Number(t)===100||f<=0,g=Lc(useId(),"void-auto-icon"),T=useTheme$1(),{t:w}=useTranslation(),P=Ra(f||0),D=useCallback(C=>`Auto ${C} - ${i} ${P.integerAmount}.${P.decimalAmount}`,[i,P.decimalAmount,P.integerAmount]),Q=useCallback(C=>{let Y=C==="Capture"?l$1:p,{integerAmount:E,decimalAmount:W}=Sa(Y,i);return `Partial ${C} - ${i} ${E}.${W}`},[l$1,p,i]),x=t>0||p?jsx(a$1,{title:Q("Void"),children:jsxs(xt,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(ht,{src:kk,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(gt,{percentage:t,children:[t,"% ",jsx(It,{percentage:Ct(t)})]}),o>0&&jsxs(e,{compact:true,variant:"neutral",children:[o,"x"]})]})]})}):r==="VOID"&&!c?jsx(a$1,{title:D("Void"),children:jsx(q,{children:jsx(F,{src:ot.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a$1,{title:w("void"),children:jsx(q,{children:jsx(F,{src:kk,alt:"void"})})}):x,v=useMemo(()=>d&&I?jsx(b$2,{chipIndex:5,copyText:w("void"),selectionProps:s,children:w("void")}):n&&I?jsx(l,{children:w("void")}):I,[n,I,d,s]);return v?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:v}):null}var _e=Ko;var Jo=Ee;var ze=b(V(),1);var er=({authorizedStatus:t,isTextShown:e,iconStyles:o,tableMode:r,chipIndex:l=0,selectionProps:p={}})=>{let{t:i}=useTranslation(),n=useTheme$1(),d=i((0, ze.default)(t));return db(r)?jsx(b$2,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a$1,{title:d,children:e?jsx(j,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:o})})};var k=b(V(),1);var Me=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Ne=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),$t=styled$1("img")(()=>({width:"10px",height:"10px"})),_t=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Vt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Ge=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),Fe=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),Ue={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Oe={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},je={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},He={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},zt={fadeIn:{duration:.3},animate:{duration:.1}},qe={fadeIn:{opacity:1}},Ke=styled$1(j)(()=>({width:"88px",height:"100%"})),Mt=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function ir({chargeStatus:t,gatewayTooltip:e,acquirerTooltip:o$1,chargeTooltip:r,errorCode:l,isTextShown:p$1,gatewayCode:i,acquirerCode:n,unCapturedStyles:d,iconStyles:s,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:w=true,isSheetViewShown:P=false,selectionProps:D={},chipIndex:Q=0}){let x=t?b$3[t]:null,I=t?g[t]:null,v=useTheme$1(),{t:C}=useTranslation(),Y=Lc(useId(),"charge-status-icon"),E=r&&jsx(Fragment,{children:jsx("div",{children:r})}),W=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o$1})]}),Z=e&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:e})]}),Ot=t&&a$3[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p,{src:a$3[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s}})});return P?jsxs(Mt,{children:[jsxs(b$2,{copyText:C((0, k.default)(t)),chipIndex:Q,selectionProps:D,children:[C((0, k.default)(t))," ",l]}),x&&jsxs(Fragment,{children:[i&&jsxs(b$2,{copyText:"Gateway",chipIndex:1,selectionProps:D,children:["Gateway ",i]}),n&&jsxs(b$2,{copyText:"Acquirer",chipIndex:2,selectionProps:D,children:["Acquirer ",n]})]})]}):p$1?jsxs(Mt,{children:[jsx(a$1,{title:E,children:jsxs(Ke,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||v.palette.info.dark,borderColor:`${x?.color||I?.color||v.palette.info.dark}1A`},children:[C((0, k.default)(t))," ",l]})}),x&&jsxs(Fragment,{children:[i&&jsx(a$1,{title:Z,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||v.palette.info.dark},children:["Gateway ",i]})}),n&&jsx(a$1,{title:W,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||v.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:Y,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:q$1?.includes(t||"")&&(E||W||Z)?jsxs(Fe,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...w&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Ge,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a$1,{title:E??C((0, k.default)(t)),children:jsxs(Fragment,{children:[Ot,jsx(Ne,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:He,style:{...l&&{padding:"0 !important"}},children:jsx(Me,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:Ue,variants:qe,initial:{opacity:0},children:l})})]})})}),jsx(Vt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:zt,variants:Oe,style:g$1,isVisible:!!Z,children:Z&&jsx(a$1,{title:Z,children:jsx(_t,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx($t,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Vt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:zt,variants:je,style:g$1,isVisible:!!W,children:W&&jsx(a$1,{title:W,children:jsx(_t,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx($t,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a$1,{title:E??C((0, k.default)(t)),children:jsx(o,{children:Ot})})})}var lr=()=>{let{t}=useTranslation(),e=Lc(useId(),"customer-initiated-icon");return jsx(a$1,{title:t("merchantInitiated"),children:jsx("img",{id:e,"data-testid":"merchantInitiatedIcon",src:sb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var dr={G:"Global",R:"Regional",L:"Local"},rt=({geographyVariant:t,countryCode:e,isTextShown:o})=>{let r=t?dr[t]:void 0,l=r||e?`${r||""} ${r&&e?"-":""} ${e?`Country - ${e}`:""}`:void 0;return o||!e?null:jsx(a$1,{title:l,children:jsx(a$4,{countryCode:e})})};var ur=({geographyVariant:t,isTextShown:e,deviceCountry:o,deviceType:r,tableMode:l})=>{let p=Lc(useId(),"device-icon-chip");return jsxs(cr,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...db(l)&&{height:"18px"}},children:[jsx(rt,{geographyVariant:t,isTextShown:e,countryCode:o}),jsx(c,{type:r,isTextShown:e,tableMode:l})]})};var gr=({isDisputeOpen:t,iconStyles:e})=>{let o=Lc(useId(),"dispute-icon");return jsx(p,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?ta:sa,alt:"dispute-icon",style:e})};var Ze=styled$1(cr,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:e})=>({display:"flex",gap:t.spacing(.5),...db(e)&&{height:"18px"},alignItems:"center"})),to=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Gt({countryCode:t,isTextShown:e,cardNumber:o,bankName:r,tableMode:l}){let p=Lc(useId(),"issuer-icon"),i=o?.slice(0,4),n=o?.slice(-4);return jsxs(Ze,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(rt,{countryCode:t,isTextShown:e}),jsx(a$1,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(to,{children:`${i||""} ${n||""}`})})]})}var br=Gt;var eo=b(V(),1);styled(motion.div)(({theme:t,background:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:e,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var zi=styled("img")(()=>({height:"13.125px",width:"12px"})),Tt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),Mi=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ni=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var wr=({payoutStatus:t="PENDING",isTextShown:e,payoutTooltip:o,iconStyles:r,isSheetViewShown:l,chipIndex:p$1=0,selectionProps:i={}})=>{let{t:n}=useTranslation(),d=Lc(useId(),"payout-icon"),s=n((0, eo.default)(t)),f=o||s;return l?jsx(b$2,{chipIndex:p$1,copyText:s,selectionProps:i,children:s}):jsx(a$1,{title:f,children:e?jsx(Tt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{id:d,src:e$1[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var no=b(V(),1);var oo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),ro=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Ft=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),ep=(t,e,o)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?t*o:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:e}}),op=styled$1(motion.span)(({isTextShown:t,theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),rp=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),np=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),ap=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var Rr=({isTextShown:t,refundStatus:e="PENDING",refundTooltip:o="",refundCount:r,iconStyles:l,isSheetViewShown:p$1,chipIndex:i=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=Lc(useId(),"refund-icon"),c=(r||0)>1,g=d$1((0, no.default)(e));if(p$1)return jsxs(b$2,{chipIndex:i,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(ro,{"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:[r,"x"]});return t?jsx(a$1,{title:jsx("div",{children:jsx("div",{children:o})}),children:jsx(Tt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[e].color,backgroundColor:d[e].backgroundColor,width:"90px"},children:jsxs(Ft,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a$1,{title:jsx("div",{children:jsx("div",{children:o})}),children:c?jsxs(Ft,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(oo,{src:ck,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[e],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},ao=Rr;var kr=ao;var Wt=b(V(),1);var Br={american_express:"AMEX",debit:"card",credit:"card"},L=t=>Br[t?.toLowerCase()||""]||t;var co=b(V(),1);styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var io=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var po=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),so=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var lo=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function vt({source:t,isTextShown:e,title:o,width:r,height:l,imgSx:p}){let{t:i}=useTranslation(),n=h(t);return jsx(a$1,{title:o,children:e?jsx(so,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(po,{"data-testid":"SourceCell_TextLabel","data-source":t,children:i((0, co.default)(t))})}):jsx(io,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}function zr({payment:t,card:e,isTextShown:o,firstIcon:r}){let l=Lc(useId(),"source-icons"),{t:p}=useTranslation(),i=useCallback(()=>{let s=[],f=oc(t),c=t?.method,g=t?.scheme;return L(c)?.toLowerCase()===L(g)?.toLowerCase()?s.push(L(c),L(f)):s.push(L(c),L(f),L(g)),s},[t]),n=useMemo(()=>jsx(vt,{source:r,isTextShown:o,title:p((0, Wt.default)(r))},r),[r,o,p]),d=useMemo(()=>i()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&e?.last_four?`${p((0, Wt.default)(s))} - ${e?.last_four}`:p((0, Wt.default)(s));return jsx(vt,{source:s,isTextShown:o,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[i,t,e,o,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,e?.last_four&&jsxs(lo,{children:["\xB7\xB7\xB7 ",e?.last_four]})]})}var at={PROCESSED:Eg,FAILED:""};var xo=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),go=styled("img")(()=>({width:"16px",height:"16px"})),Io=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));var Rt=b(V(),1);function ho({status:t,isTextShown:e,isSheetViewShown:o,chipIndex:r=0,selectionProps:l={}}){let p=useTheme(),{t:i}=useTranslation(),n=Lc(useId(),"destination-icon"),d=i((0, Rt.default)(t));return o&&at[t]?jsx(b$2,{copyText:d,chipIndex:r,selectionProps:l,children:d}):e&&at[t]?jsx(xo,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, Rt.default)(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p.palette.info.dark:p.palette.common.black},children:d}):jsx(Io,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&at[t]&&jsx(a$1,{title:i((0, Rt.default)(t)),children:jsx(go,{src:at[t],alt:"destination-icon"})})})}export{ho as A,ep as a,op as b,rp as c,np as d,ap as e,Ro as f,Lo as g,Do as h,_e as i,Jo as j,V as k,er as l,ir as m,lr as n,rt as o,ur as p,gr as q,br as r,zi as s,Mi as t,Ni as u,wr as v,kr as w,L as x,vt as y,zr as z};
1
+ import {f,b as b$3,g,a as a$3,e as e$1,d,c as c$1}from'./chunk-AYKYAW5X.js';import {a as a$2}from'./chunk-ULODM6GK.js';import {c}from'./chunk-IUZTPFV7.js';import {o,j,k as k$1,l,p}from'./chunk-E2ZEEVOW.js';import {b as b$2}from'./chunk-G4B2COJS.js';import {b as b$1,e,d as d$1}from'./chunk-HZEMOGFU.js';import {a as a$1}from'./chunk-KHM5KW53.js';import {a as a$4}from'./chunk-4YOBVV3E.js';import {fb,gb,db,Lc,Ra,Sa,oc,q as q$2}from'./chunk-W5HUJVZ6.js';import {q as q$1}from'./chunk-ETCFQM4S.js';import {T,ii,ki,ji,hi,oi,Og,Fg,Ng,Bj,Cj,rb,Sj,Vj,kk,Tj,sb,ta,sa,ck,h,Eg}from'./chunk-RZ3IAVXL.js';import {a,b}from'./chunk-YRT7GXGY.js';import {useId,useMemo,useCallback}from'react';import {useTranslation}from'react-i18next';import {styled,Box,useTheme}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {motion}from'framer-motion';import {styled as styled$1,useTheme as useTheme$1}from'@mui/material/styles';import cr from'@mui/material/Box';var V=a((Sa,Ve)=>{var Xo=fb(),Qo=gb(),Yo=Qo(function(t,e,o){return e=e.toLowerCase(),t+(o?Xo(e):e)});Ve.exports=Yo;});var ct={ORDER:{label:"order",icon:hi,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:ji,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:ki,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:ii,color:"#32ADE6"}},mt={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.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 ut=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),ft=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"}));function vo({type:t,hasSavedCard:e,totalPaymentsCount:o,isTextShown:r}){let l=Lc(useId(),"agreement-icon"),p=useTheme(),{t:i}=useTranslation(),n=useMemo(()=>[...e?[mt.SAVED_TOKEN]:[],...(o||0)>0?[mt.COUNT]:[],...t&&ct[t]?[ct[t]]:[]],[e,o,t]),d=c=>r?jsx(b$1,{"data-testid":"AgreementCell_countBadge",children:jsx(a$1,{title:i("totalPaymentCount",{amount:q$2(o)}),children:jsx(ft,{children:jsxs(ut,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:mt.COUNT.color},children:["x",o]})})})},c):jsx(d$1,{totalPaymentsCount:o,index:c},c),s=n.map((c,g)=>c.label==="countBadge"?d(g):jsx(a$1,{title:i(c.label),children:jsx(b$1,{children:r?jsx(ft,{children:jsx(ut,{"data-testid":"AgreementCell_agreementType",sx:{color:c.color},children:i(c.label)})}):jsx(a$2,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:c.icon,alt:"agreement"})},c.color)},c.color)),f=jsx(a$1,{title:"No agreement",children:jsx(b$1,{children:r?jsx(ft,{children:jsx(ut,{"data-testid":"AgreementCell_agreementType",sx:{color:p.palette.text.secondary},children:"No agreement"})}):jsx(a$2,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:oi,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:l,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:s?.length>0?s:f})}var Ae=vo;var Ro=Ae;styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));styled("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var Pe=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),ve=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled(motion.div)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var We=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var Et={"3DS":{tooltip:"3DS",icon:Cj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Bj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:Ng,borderColor:"rgba(31, 136, 208, 0.10)"}},Re={FAILED:{tooltip:"Failed",icon:Fg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:Og,borderColor:"rgba(255, 61, 0, 0.10)"}};function Bo({transactionStatus:t,eci:e,authType:o,isTextShown:r}){let l=Lc(useId(),"auth-icons"),p=useMemo(()=>{let n=t?Re[t]:null,d=n?.tooltip,s=t==="AUTHENTICATED"?null:n?.icon;return [{tooltip:d,content:r?d:s,type:r?"text":"icon"},...o?[{tooltip:o,content:r?Et[o]?.tooltip:Et[o]?.icon,type:r?"text":"icon"}]:[],{tooltip:"",content:e?`ECI ${e}`:"",type:"text"}]},[t,r,o,e]),i=useMemo(()=>p.filter(n=>!!n.content).map((n,d)=>{let s=n.type==="text"?jsx(ve,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(Pe,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":n.content,children:n.content})}):jsx(a$2,{sx:{width:"16px",height:"16px"},src:n.content,alt:n.tooltip});return jsx(a$1,{title:n.tooltip,children:s},`${n.tooltip}-${d}`)}),[p]);return jsx(We,{id:l,"data-testid":"AuthIcons",children:i})}var Be=Bo;var Lo=(t,e,o)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...t>0&&{opacity:0}},animate:{x:o?t*o:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:e,...t>0&&{opacity:1}}});var Do=Be;var ot={VOID:{icon:Tj},CAPTURED:{icon:Sj}};var xt=styled$1(motion.div)(({theme:t,isCapture:e})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:t.spacing(.5),paddingInline:t.spacing(.3),paddingBlock:t.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:e?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:t.palette.text.primary,position:"relative",zIndex:10})),gt=styled$1("div")(({theme:t,percentage:e,isCapture:o})=>({border:`0.6px ${[0,100].includes(e)?"solid":"dashed"} ${o?t.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:t.spacing(.316),paddingLeft:t.spacing(.516),fontSize:"7px",fontWeight:t.typography.fontWeightBold,color:o?t.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5)})),It=styled$1("div")(({percentage:t,isCapture:e,theme:o})=>({background:`conic-gradient(${e?o.palette.info.dark:"#656565"} ${t}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${e?o.palette.info.dark:"#656565"}`})),ht=styled$1("img")({width:"14px",height:"14px"}),q=styled$1(o)({width:"16px",height:"16px"}),F=styled$1("img")({width:"16px",height:"16px"}),Le=styled$1(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function Ct(t){return t<5?5:t===100?95:t}function Fo({voidPercentage:t,capturePercentage:e$1,captureCount:o,autoType:r,captureAmount:l,voidAmount:p,currency:i,isTextShown:n,remainingAmount:d,isSheetViewShown:s,selectionProps:f={}}){let c=Number(e$1)+Number(t)===100||d<=0,g=Lc(useId(),"capture-auto-icon"),T=useTheme$1(),{t:w}=useTranslation(),P=Ra(d||0),D=useCallback(C=>`Auto ${C} - ${i} ${P.integerAmount}.${P.decimalAmount}`,[i,P.decimalAmount,P.integerAmount]),Q=useCallback(C=>{let Y=C==="Capture"?l:p,{integerAmount:E,decimalAmount:W}=Sa(Y,i);return `Partial ${C} - ${i} ${E}.${W}`},[l,p,i]),x=e$1>0?jsx(a$1,{title:Q("Capture"),children:jsxs(xt,{isCapture:true,isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(ht,{src:rb,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(gt,{isCapture:true,percentage:e$1,children:[e$1,"% ",jsx(It,{isCapture:true,percentage:Ct(e$1)})]}),o>1&&jsxs(e,{compact:true,variant:"dark",children:[o,"x"]})]})]})}):r==="CAPTURED"&&!c?jsx(a$1,{title:D("Capture"),children:jsx(q,{children:jsx(F,{src:ot.CAPTURED?.icon,alt:"auto"})})}):jsx(a$1,{title:D("Capture"),children:jsx(q,{children:jsx(F,{src:ot.CAPTURED?.icon,alt:"auto"})})}),I=e$1===100?jsx(a$1,{title:w("captured"),children:jsx(Le,{children:jsx(F,{src:Vj,alt:"captured"})})}):x,v=useMemo(()=>s&&I?jsx(b$2,{chipIndex:4,copyText:w("captured"),selectionProps:f,children:w("captured")}):n&&I?jsx(k$1,{children:w("captured")}):I,[n,I,s,f]);return v&&jsx("div",{id:g,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:v})}var Ee=Fo;function Ko({voidPercentage:t,capturePercentage:e$1,voidCount:o,autoType:r,captureAmount:l$1,voidAmount:p,currency:i,isTextShown:n,isSheetViewShown:d,selectionProps:s={},remainingAmount:f}){let c=Number(e$1)+Number(t)===100||f<=0,g=Lc(useId(),"void-auto-icon"),T=useTheme$1(),{t:w}=useTranslation(),P=Ra(f||0),D=useCallback(C=>`Auto ${C} - ${i} ${P.integerAmount}.${P.decimalAmount}`,[i,P.decimalAmount,P.integerAmount]),Q=useCallback(C=>{let Y=C==="Capture"?l$1:p,{integerAmount:E,decimalAmount:W}=Sa(Y,i);return `Partial ${C} - ${i} ${E}.${W}`},[l$1,p,i]),x=t>0||p?jsx(a$1,{title:Q("Void"),children:jsxs(xt,{isFullyUsed:c,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:T.palette.common.white,border:`0.75px solid ${T.palette.grey[600]}1A`},variants:{animate:{boxShadow:T.shadows[4]}},children:[jsx(ht,{src:kk,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(gt,{percentage:t,children:[t,"% ",jsx(It,{percentage:Ct(t)})]}),o>0&&jsxs(e,{compact:true,variant:"neutral",children:[o,"x"]})]})]})}):r==="VOID"&&!c?jsx(a$1,{title:D("Void"),children:jsx(q,{children:jsx(F,{src:ot.VOID?.icon,alt:"auto"})})}):null,I=t===100?jsx(a$1,{title:w("void"),children:jsx(q,{children:jsx(F,{src:kk,alt:"void"})})}):x,v=useMemo(()=>d&&I?jsx(b$2,{chipIndex:5,copyText:w("void"),selectionProps:s,children:w("void")}):n&&I?jsx(l,{children:w("void")}):I,[n,I,d,s]);return v?jsx("div",{id:g,"data-testid":"VoidAutoIcon",style:{...!d&&{zIndex:11}},children:v}):null}var _e=Ko;var Jo=Ee;var ze=b(V(),1);var er=({authorizedStatus:t,isTextShown:e,iconStyles:o,tableMode:r,chipIndex:l=0,selectionProps:p={}})=>{let{t:i}=useTranslation(),n=useTheme$1(),d=i((0, ze.default)(t));return db(r)?jsx(b$2,{copyText:d,chipIndex:l,selectionProps:p,children:d}):jsx(a$1,{title:d,children:e?jsx(j,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:n.palette.info.dark},children:d}):jsx(a$2,{src:f[t],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:o})})};var k=b(V(),1);var Me=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,display:"block",fontWeight:t.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:t.spacing(.45)})),Ne=styled$1(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),$t=styled$1("img")(()=>({width:"10px",height:"10px"})),_t=styled$1(motion.span)(({theme:t})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:t.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Vt=styled$1(motion.div,{shouldForwardProp:t=>t!=="isVisible"})(({isVisible:t})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!t&&{padding:"0 !important"}})),Ge=styled$1(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),Fe=styled$1(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),Ue={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Oe={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},je={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},He={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},zt={fadeIn:{duration:.3},animate:{duration:.1}},qe={fadeIn:{opacity:1}},Ke=styled$1(j)(()=>({width:"88px",height:"100%"})),Mt=styled$1(Box)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.25),height:"100%"}));function ir({chargeStatus:t,gatewayTooltip:e,acquirerTooltip:o$1,chargeTooltip:r,errorCode:l,isTextShown:p$1,gatewayCode:i,acquirerCode:n,unCapturedStyles:d,iconStyles:s,iconWrapperStyles:f,gatewayIconWrapperStyles:c,gatewayContainerStyles:g$1,gateWayIconStyles:T,showBadge:w=true,isSheetViewShown:P=false,selectionProps:D={},chipIndex:Q=0}){let x=t?b$3[t]:null,I=t?g[t]:null,v=useTheme$1(),{t:C}=useTranslation(),Y=Lc(useId(),"charge-status-icon"),E=r&&jsx(Fragment,{children:jsx("div",{children:r})}),W=o$1&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o$1})]}),Z=e&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:e})]}),Ot=t&&a$3[t]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:x?"50%":"",...f},children:jsx(p,{src:a$3[t],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:x?"50%":"",width:"16px",height:"16px",...s}})});return P?jsxs(Mt,{children:[jsxs(b$2,{copyText:C((0, k.default)(t)),chipIndex:Q,selectionProps:D,children:[C((0, k.default)(t))," ",l]}),x&&jsxs(Fragment,{children:[i&&jsxs(b$2,{copyText:"Gateway",chipIndex:1,selectionProps:D,children:["Gateway ",i]}),n&&jsxs(b$2,{copyText:"Acquirer",chipIndex:2,selectionProps:D,children:["Acquirer ",n]})]})]}):p$1?jsxs(Mt,{children:[jsx(a$1,{title:E,children:jsxs(Ke,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||v.palette.info.dark,borderColor:`${x?.color||I?.color||v.palette.info.dark}1A`},children:[C((0, k.default)(t))," ",l]})}),x&&jsxs(Fragment,{children:[i&&jsx(a$1,{title:Z,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||v.palette.info.dark},children:["Gateway ",i]})}),n&&jsx(a$1,{title:W,children:jsxs(j,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, k.default)(t),sx:{background:x?.background||I?.background||"transparent",color:x?.color||I?.color||v.palette.info.dark},children:["Acquirer ",n]})})]})]}):jsx(o,{id:Y,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...f},children:q$1?.includes(t||"")&&(E||W||Z)?jsxs(Fe,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...w&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...d},children:[jsx(Ge,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:x?.background}},children:jsx(a$1,{title:E??C((0, k.default)(t)),children:jsxs(Fragment,{children:[Ot,jsx(Ne,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:He,style:{...l&&{padding:"0 !important"}},children:jsx(Me,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:x?.color},transition:Ue,variants:qe,initial:{opacity:0},children:l})})]})})}),jsx(Vt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:zt,variants:Oe,style:g$1,isVisible:!!Z,children:Z&&jsx(a$1,{title:Z,children:jsx(_t,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:x?.background,...c},children:jsx($t,{src:x?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:T})})})}),jsx(Vt,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:zt,variants:je,style:g$1,isVisible:!!W,children:W&&jsx(a$1,{title:W,children:jsx(_t,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:x?.background,...c},children:jsx($t,{src:x?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:T})})})})]}):jsx(a$1,{title:E??C((0, k.default)(t)),children:jsx(o,{children:Ot})})})}var lr=()=>{let{t}=useTranslation(),e=Lc(useId(),"customer-initiated-icon");return jsx(a$1,{title:t("merchantInitiated"),children:jsx("img",{id:e,"data-testid":"merchantInitiatedIcon",src:sb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var dr={G:"Global",R:"Regional",L:"Local"},rt=({geographyVariant:t,countryCode:e,isTextShown:o})=>{let r=t?dr[t]:void 0,l=r||e?`${r||""} ${r&&e?"-":""} ${e?`Country - ${e}`:""}`:void 0;return o||!e?null:jsx(a$1,{title:l,children:jsx(a$4,{countryCode:e})})};var ur=({geographyVariant:t,isTextShown:e,deviceCountry:o,deviceType:r,tableMode:l})=>{let p=Lc(useId(),"device-icon-chip");return jsxs(cr,{id:p,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...db(l)&&{height:"18px"}},children:[jsx(rt,{geographyVariant:t,isTextShown:e,countryCode:o}),jsx(c,{type:r,isTextShown:e,tableMode:l})]})};var gr=({isDisputeOpen:t,iconStyles:e})=>{let o=Lc(useId(),"dispute-icon");return jsx(p,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:t?ta:sa,alt:"dispute-icon",style:e})};var Ze=styled$1(cr,{shouldForwardProp:t=>t!=="tableMode"})(({theme:t,tableMode:e})=>({display:"flex",gap:t.spacing(.5),...db(e)&&{height:"18px"},alignItems:"center"})),to=styled$1("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function Gt({countryCode:t,isTextShown:e,cardNumber:o,bankName:r,tableMode:l}){let p=Lc(useId(),"issuer-icon"),i=o?.slice(0,4),n=o?.slice(-4);return jsxs(Ze,{id:p,"data-testid":"IssuerIcon",tableMode:l,children:[t&&jsx(rt,{countryCode:t,isTextShown:e}),jsx(a$1,{title:`${r?`Issuer - ${r}`:""}`,children:jsx(to,{children:`${i||""} ${n||""}`})})]})}var br=Gt;var eo=b(V(),1);styled(motion.div)(({theme:t,background:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(.5),paddingInline:t.spacing(.75),paddingBlock:t.spacing(.5),backgroundColor:e,height:"24px",width:"fit-content",borderRadius:"24px",fontSize:"10px",color:t.palette.text.primary}));var zi=styled("img")(()=>({height:"13.125px",width:"12px"})),Tt=styled("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"})),Mi=styled("div")(({theme:t})=>({color:t.palette.common.white,background:t.palette.error.main,fontSize:"0.6rem",fontWeight:600,borderRadius:"16px",padding:"2px 8px",display:"flex",alignItems:"center",justifyContent:"center"})),Ni=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px"}));var wr=({payoutStatus:t="PENDING",isTextShown:e,payoutTooltip:o,iconStyles:r,isSheetViewShown:l,chipIndex:p$1=0,selectionProps:i={}})=>{let{t:n}=useTranslation(),d=Lc(useId(),"payout-icon"),s=n((0, eo.default)(t)),f=o||s;return l?jsx(b$2,{chipIndex:p$1,copyText:s,selectionProps:i,children:s}):jsx(a$1,{title:f,children:e?jsx(Tt,{id:d,"data-testid":"StatusCell_PayoutStatusLabel",children:s}):jsx(p,{id:d,src:e$1[t],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:r})})};var no=b(V(),1);var oo=styled$1(motion.img)(()=>({width:"14px",height:"14px"})),ro=styled$1(motion.span)(({theme:t})=>({color:t.palette.common.white,borderRadius:t.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:t.palette.secondary.main})),Ft=styled$1(motion.div)(({theme:t})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${t.palette.secondary.main}1A`,paddingInline:t.spacing(.5),borderRadius:"56px"})),ep=(t,e,o)=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?t*o:t*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:e}}),op=styled$1(motion.span)(({isTextShown:t,theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:t?"auto":"36px",...t&&{border:"none"}})),rp=styled$1(motion.div,{shouldForwardProp:t=>t!=="order"})(({order:t=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:t+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),np=styled$1(motion.div,{shouldForwardProp:t=>t!=="statusesCount"})(({statusesCount:t=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${t*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),ap=styled$1("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var Rr=({isTextShown:t,refundStatus:e="PENDING",refundTooltip:o="",refundCount:r,iconStyles:l,isSheetViewShown:p$1,chipIndex:i=0,selectionProps:n={}})=>{let{t:d$1}=useTranslation(),s=useTheme$1(),f=Lc(useId(),"refund-icon"),c=(r||0)>1,g=d$1((0, no.default)(e));if(p$1)return jsxs(b$2,{chipIndex:i,selectionProps:n,copyText:g,children:[g," ",c?`${r}x`:null]});let T=jsxs(ro,{"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:[r,"x"]});return t?jsx(a$1,{title:jsx("div",{children:jsx("div",{children:o})}),children:jsx(Tt,{id:f,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:d[e].color,backgroundColor:d[e].backgroundColor,width:"90px"},children:jsxs(Ft,{whileInView:c?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[g," ",c?T:null]})})}):jsx(a$1,{title:jsx("div",{children:jsx("div",{children:o})}),children:c?jsxs(Ft,{id:f,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:s.shadows[4],gap:s.spacing(.5)}},children:[jsx(oo,{src:ck,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),T]}):jsx(p,{id:f,src:c$1[e],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:l})})},ao=Rr;var kr=ao;var Wt=b(V(),1);var Br={american_express:"AMEX",debit:"card",credit:"card"},L=t=>Br[t?.toLowerCase()||""]||t;var co=b(V(),1);styled("span")(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:t.spacing(1)}));var io=styled("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled(motion.span,{shouldForwardProp:t=>t!=="sourcesCount"})(({theme:t,sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:t.palette.background.paper,borderRadius:"16px"}));var po=styled("span")(({theme:t})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:t.palette.text.primary})),so=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled("span")(({theme:t})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var lo=styled("span")(({theme:t})=>({fontSize:"10px",fontWeight:500,color:t.palette.text.primary}));function vt({source:t,isTextShown:e,title:o,width:r,height:l,imgSx:p}){let{t:i}=useTranslation(),n=h(t);return jsx(a$1,{title:o,children:e?jsx(so,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(po,{"data-testid":"SourceCell_TextLabel","data-source":t,children:i((0, co.default)(t))})}):jsx(io,{src:n,alt:t,width:r,height:l,onError:d=>{d.currentTarget.src=h("card");},sx:p})})}function zr({payment:t,card:e,isTextShown:o,firstIcon:r}){let l=Lc(useId(),"source-icons"),{t:p}=useTranslation(),i=useCallback(()=>{let s=[],f=oc(t),c=t?.method,g=t?.scheme;return L(c)?.toLowerCase()===L(g)?.toLowerCase()?s.push(L(c),L(f)):s.push(L(c),L(f),L(g)),s},[t]),n=useMemo(()=>jsx(vt,{source:r,isTextShown:o,title:p((0, Wt.default)(r))},r),[r,o,p]),d=useMemo(()=>i()?.filter(s=>!!s&&s!==r)?.map((s,f,c)=>{let g=t?.wallet===p("sv_wallet")?p("storedValueWallet"):p("passThruWallet"),T=f===c.length-1&&e?.last_four?`${p((0, Wt.default)(s))} - ${e?.last_four}`:p((0, Wt.default)(s));return jsx(vt,{source:s,isTextShown:o,title:f===0&&s==="Wallet"?g:T},`${s}-${f}`)}),[i,t,e,o,p,r]);return jsxs(Box,{id:l,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[r&&n,d,e?.last_four&&jsxs(lo,{children:["\xB7\xB7\xB7 ",e?.last_four]})]})}var at={PROCESSED:Eg,FAILED:""};var xo=styled("span")(({theme:t})=>({fontSize:"11px",padding:"2px 0",color:t.palette.text.primary})),go=styled("img")(()=>({width:"16px",height:"16px"})),Io=styled("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));var Rt=b(V(),1);function ho({status:t,isTextShown:e,isSheetViewShown:o,chipIndex:r=0,selectionProps:l={}}){let p=useTheme(),{t:i}=useTranslation(),n=Lc(useId(),"destination-icon"),d=i((0, Rt.default)(t));return o&&at[t]?jsx(b$2,{copyText:d,chipIndex:r,selectionProps:l,children:d}):e&&at[t]?jsx(xo,{id:n,"data-testid":"ChargeStatusIcon_isTextShown","data-status":(0, Rt.default)(t),sx:{background:"#1F88D00D",color:t==="PROCESSED"?p.palette.info.dark:p.palette.common.black},children:d}):jsx(Io,{id:n,"data-testid":"DestinationIcon",className:"destination-status",children:t&&at[t]&&jsx(a$1,{title:i((0, Rt.default)(t)),children:jsx(go,{src:at[t],alt:"destination-icon"})})})}export{ho as A,ep as a,op as b,rp as c,np as d,ap as e,Ro as f,Lo as g,Do as h,_e as i,Jo as j,V as k,er as l,ir as m,lr as n,rt as o,ur as p,gr as q,br as r,zi as s,Mi as t,Ni as u,wr as v,kr as w,L as x,vt as y,zr as z};
@@ -0,0 +1 @@
1
+ import {Lc}from'./chunk-W5HUJVZ6.js';import {memo,useId}from'react';import {Typography}from'@mui/material';import i from'@mui/material/Box';import f,{circularProgressClasses}from'@mui/material/CircularProgress';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var n=styled(f)(({theme:r})=>({color:r.palette.common.blue,background:alpha(r.palette.info.dark,.05),borderRadius:"50%",[`& .${circularProgressClasses.circle}`]:{strokeLinecap:"round"}})),p=styled(i)(()=>({position:"relative",display:"inline-flex"})),l=styled(i)(()=>({top:0,left:0,bottom:0,right:0,position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"})),s=styled(Typography)(()=>({fontSize:"14px",fontWeight:700,color:"#3B4152"}));function c({variant:r="determinate",hasLabel:m=true,...t}){let u=Lc(useId(),"circular-progress-with-label");return jsxs(p,{id:u,"data-testid":"CircularProgressWithLabel",children:[jsx(n,{variant:r,...t}),r==="determinate"&&m&&jsx(l,{children:jsx(s,{variant:"caption",color:"text.secondary",children:`${Math.round(t?.value??0)}%`})})]})}c.displayName="CircularProgressWithLabel";var d=memo(c);var M=d;export{M as a};
@@ -1 +1 @@
1
- import {b}from'./chunk-APAWGA27.js';import {Lc}from'./chunk-W5HUJVZ6.js';import {gi}from'./chunk-RZ3IAVXL.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=Lc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:gi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
1
+ import {b}from'./chunk-ARZK7WOR.js';import {Lc}from'./chunk-W5HUJVZ6.js';import {gi}from'./chunk-RZ3IAVXL.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=Lc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:gi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};