@tap-payments/os-micro-frontend-shared 0.3.310 → 0.3.311-test.1795629953
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_chunks/{chunk-OL6JOGIF.js → chunk-5NBAX42H.js} +1 -1
- package/build/_chunks/chunk-BE2RKFQJ.js +1 -0
- package/build/_chunks/chunk-SSPZ77B7.js +2 -0
- package/build/components/ColumnViews/index.js +1 -1
- package/build/components/ListHeader/index.js +1 -1
- package/build/components/StatusIcons/AuthorizationAutoIcons/CaptureAutoIcon.d.ts +2 -2
- package/build/components/StatusIcons/AuthorizationAutoIcons/VoidAutoIcon.d.ts +2 -2
- package/build/components/StatusIcons/AuthorizationAutoIcons/style.d.ts +0 -4
- package/build/components/StatusIcons/AuthorizationAutoIcons/type.d.ts +1 -1
- package/build/components/{TableCells/CustomCells/RefundStatusCell/components → StatusIcons/RefundStatusIcon}/RefundStateIcon.d.ts +2 -2
- package/build/components/StatusIcons/RefundStatusIcon/RefundStatusIcon.d.ts +3 -0
- package/build/components/StatusIcons/RefundStatusIcon/constant.d.ts +14 -0
- package/build/components/StatusIcons/RefundStatusIcon/index.d.ts +3 -0
- package/build/components/StatusIcons/RefundStatusIcon/type.d.ts +16 -0
- package/build/components/StatusIcons/index.d.ts +1 -0
- package/build/components/StatusIcons/index.js +1 -1
- package/build/components/StatusIcons/style.d.ts +2 -0
- package/build/components/TableCells/CustomCells/ActionCell/ActionCell.d.ts +2 -5
- package/build/components/TableCells/CustomCells/AmountCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/AmountCell/type.d.ts +0 -11
- package/build/components/TableCells/CustomCells/BrandsCell/style.d.ts +0 -2
- package/build/components/TableCells/CustomCells/BrandsCell/type.d.ts +3 -2
- package/build/components/TableCells/CustomCells/CustomerCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CustomerCell/type.d.ts +0 -2
- package/build/components/TableCells/CustomCells/DestinationCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/DestinationCell/type.d.ts +0 -1
- package/build/components/TableCells/CustomCells/EntityCell/style.d.ts +0 -2
- package/build/components/TableCells/CustomCells/EntityCell/type.d.ts +2 -1
- package/build/components/TableCells/CustomCells/IndividualsCell/IndividualsCell.d.ts +2 -2
- package/build/components/TableCells/CustomCells/IndividualsCell/style.d.ts +0 -1
- package/build/components/TableCells/CustomCells/IndividualsCell/type.d.ts +4 -3
- package/build/components/TableCells/CustomCells/MarketPlaceCell/style.d.ts +6 -0
- package/build/components/TableCells/CustomCells/OrderCell/OrderCell.d.ts +2 -2
- package/build/components/TableCells/CustomCells/OrderCell/index.d.ts +1 -1
- package/build/components/TableCells/CustomCells/OrderCell/type.d.ts +5 -0
- package/build/components/TableCells/CustomCells/PercentageCell/PercentageCell.d.ts +4 -0
- package/build/components/TableCells/CustomCells/PercentageCell/index.d.ts +2 -0
- package/build/components/TableCells/CustomCells/{BalanceCell → PercentageCell}/style.d.ts +2 -6
- package/build/components/TableCells/CustomCells/PercentageCell/type.d.ts +10 -0
- package/build/components/TableCells/CustomCells/ReferenceCell/type.d.ts +0 -2
- package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCell.d.ts +2 -2
- package/build/components/TableCells/CustomCells/SalesChannelCell/SalesChannelCellSheet.d.ts +2 -2
- package/build/components/TableCells/CustomCells/SalesChannelCell/type.d.ts +2 -2
- package/build/components/TableCells/CustomCells/SourceCell/SourceCell.d.ts +2 -2
- package/build/components/TableCells/CustomCells/SourceCell/type.d.ts +1 -1
- package/build/components/TableCells/CustomCells/StatusCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/VerificationStatus/index.d.ts +3 -0
- package/build/components/TableCells/CustomCells/VerificationStatus/style.d.ts +3 -0
- package/build/components/TableCells/CustomCells/VerificationStatus/type.d.ts +1 -0
- package/build/components/TableCells/CustomCells/index.d.ts +1 -26
- package/build/components/TableCells/CustomCells/style.d.ts +2 -4
- package/build/components/TableCells/CustomCells/type.d.ts +1 -27
- package/build/components/TableCells/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/components/internal/PiePercentage.d.ts +6 -0
- package/build/components/modules/WindowShell/index.js +1 -1
- package/build/components/modules/index.js +1 -1
- package/build/datetime/components/index.js +1 -1
- package/build/datetime/index.js +1 -1
- package/build/index.js +1 -1
- package/package.json +1 -1
- package/build/_chunks/chunk-IXFXTDH7.js +0 -1
- package/build/_chunks/chunk-Q6BI36AR.js +0 -2
- package/build/components/TableCells/CustomCells/AmountCell/AmountCellSheet.d.ts +0 -4
- package/build/components/TableCells/CustomCells/AmountCell/AmountCellText.d.ts +0 -4
- package/build/components/TableCells/CustomCells/AuthenticationCell/AuthenticationCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/AuthenticationCell/constant.d.ts +0 -49
- package/build/components/TableCells/CustomCells/AuthenticationCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/AuthenticationCell/style.d.ts +0 -555
- package/build/components/TableCells/CustomCells/AuthenticationCell/type.d.ts +0 -8
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/AuthenticationStatusCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/constant.d.ts +0 -48
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/index.d.ts +0 -3
- package/build/components/TableCells/CustomCells/AuthenticationStatusCell/type.d.ts +0 -15
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/AuthenticationTypeCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/constant.d.ts +0 -8
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/AuthenticationTypeCell/type.d.ts +0 -6
- package/build/components/TableCells/CustomCells/BalanceCell/BalanceCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/BalanceCell/BalanceCellSheet.d.ts +0 -4
- package/build/components/TableCells/CustomCells/BalanceCell/index.d.ts +0 -3
- package/build/components/TableCells/CustomCells/BalanceCell/type.d.ts +0 -13
- package/build/components/TableCells/CustomCells/BalanceCell/utils.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BankCell/BankCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/BankCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/BankCell/style.d.ts +0 -6
- package/build/components/TableCells/CustomCells/BankCell/type.d.ts +0 -6
- package/build/components/TableCells/CustomCells/BankReferenceCell/BankReferenceCell.d.ts +0 -6
- package/build/components/TableCells/CustomCells/BankReferenceCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/BankReferenceCell/style.d.ts +0 -4
- package/build/components/TableCells/CustomCells/BrandCell/BrandCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/BrandCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/BrandCell/style.d.ts +0 -4
- package/build/components/TableCells/CustomCells/BrandCell/type.d.ts +0 -5
- package/build/components/TableCells/CustomCells/BrandsCell/constants.d.ts +0 -6
- package/build/components/TableCells/CustomCells/ChannelsCell/ChannelsCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/ChannelsCell/constant.d.ts +0 -5
- package/build/components/TableCells/CustomCells/ChannelsCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/ChannelsCell/style.d.ts +0 -287
- package/build/components/TableCells/CustomCells/ChannelsCell/type.d.ts +0 -7
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/CheckoutStatusCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/constant.d.ts +0 -4
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/CheckoutStatusCell/type.d.ts +0 -6
- package/build/components/TableCells/CustomCells/CurrencyCell/CurrencyCell.d.ts +0 -6
- package/build/components/TableCells/CustomCells/CurrencyCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/CurrencyCell/style.d.ts +0 -7
- package/build/components/TableCells/CustomCells/CustomerCell/CustomerCellSheet.d.ts +0 -4
- package/build/components/TableCells/CustomCells/DestinationCell/DestinationCellText.d.ts +0 -4
- package/build/components/TableCells/CustomCells/DestinationStatusCell/DestinationStatusCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/DestinationStatusCell/constant.d.ts +0 -16
- package/build/components/TableCells/CustomCells/DestinationStatusCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/DestinationStatusCell/type.d.ts +0 -9
- package/build/components/TableCells/CustomCells/DeviceCell/DeviceCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/DeviceCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/EntityCell/constants.d.ts +0 -6
- package/build/components/TableCells/CustomCells/IntentsStatusCell/IntentsStatusCell.d.ts +0 -3
- package/build/components/TableCells/CustomCells/IntentsStatusCell/constant.d.ts +0 -6
- package/build/components/TableCells/CustomCells/IntentsStatusCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/IntentsStatusCell/type.d.ts +0 -9
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/ChargeStatusIcon.d.ts +0 -11
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/InvoiceStatusCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/constant.d.ts +0 -16
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/style.d.ts +0 -269
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/type.d.ts +0 -16
- package/build/components/TableCells/CustomCells/InvoiceStatusCell/utils.d.ts +0 -6
- package/build/components/TableCells/CustomCells/MetadataCell/MetadataCell.d.ts +0 -6
- package/build/components/TableCells/CustomCells/MetadataCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/OrderCell/OrderCellSheet.d.ts +0 -4
- package/build/components/TableCells/CustomCells/OrderCell/constant.d.ts +0 -1
- package/build/components/TableCells/CustomCells/OrdersCell/OrdersCellSheet.d.ts +0 -23
- package/build/components/TableCells/CustomCells/OrdersCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PaymentAgreementCell/PaymentAgreementCellSheet.d.ts +0 -4
- package/build/components/TableCells/CustomCells/PaymentAgreementCell/constant.d.ts +0 -6
- package/build/components/TableCells/CustomCells/PaymentAgreementCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PaymentAgreementCell/type.d.ts +0 -6
- package/build/components/TableCells/CustomCells/PayoutReportCell/AnimatedSpinnerIcon/AnimatedSpinnerIcon.d.ts +0 -9
- package/build/components/TableCells/CustomCells/PayoutReportCell/AnimatedSpinnerIcon/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/PayoutReportCell/AnimatedSpinnerIcon/style.d.ts +0 -280
- package/build/components/TableCells/CustomCells/PayoutReportCell/PayoutReportCell.d.ts +0 -10
- package/build/components/TableCells/CustomCells/PayoutReportCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/PayoutReportCell/style.d.ts +0 -278
- package/build/components/TableCells/CustomCells/PayoutStatusCell/PayoutStatusCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/PayoutStatusCell/constant.d.ts +0 -11
- package/build/components/TableCells/CustomCells/PayoutStatusCell/index.d.ts +0 -3
- package/build/components/TableCells/CustomCells/PayoutStatusCell/style.d.ts +0 -1314
- package/build/components/TableCells/CustomCells/PayoutStatusCell/type.d.ts +0 -7
- package/build/components/TableCells/CustomCells/ProductsCell/ProductsCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/ProductsCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/ProductsCell/style.d.ts +0 -275
- package/build/components/TableCells/CustomCells/ProductsCell/type.d.ts +0 -4
- package/build/components/TableCells/CustomCells/PurposeCell/PurposeCell.d.ts +0 -3
- package/build/components/TableCells/CustomCells/PurposeCell/constants.d.ts +0 -8
- package/build/components/TableCells/CustomCells/PurposeCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/PurposeCell/style.d.ts +0 -9
- package/build/components/TableCells/CustomCells/PurposeCell/type.d.ts +0 -5
- package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCell.d.ts +0 -3
- package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCellSheet.d.ts +0 -3
- package/build/components/TableCells/CustomCells/ReceiptCell/ReceiptCellText.d.ts +0 -3
- package/build/components/TableCells/CustomCells/ReceiptCell/index.d.ts +0 -3
- package/build/components/TableCells/CustomCells/ReceiptCell/type.d.ts +0 -3
- package/build/components/TableCells/CustomCells/RefundChargeCell/RefundChargeCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/RefundChargeCell/constant.d.ts +0 -14
- package/build/components/TableCells/CustomCells/RefundChargeCell/index.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundChargeCell/style.d.ts +0 -531
- package/build/components/TableCells/CustomCells/RefundChargeCell/type.d.ts +0 -12
- package/build/components/TableCells/CustomCells/RefundChargeCell/utils.d.ts +0 -1
- package/build/components/TableCells/CustomCells/RefundStatusCell/RefundStatusCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStatus.d.ts +0 -3
- package/build/components/TableCells/CustomCells/RefundStatusCell/components/RefundStatusIcon.d.ts +0 -3
- package/build/components/TableCells/CustomCells/RefundStatusCell/components/index.d.ts +0 -3
- package/build/components/TableCells/CustomCells/RefundStatusCell/constant.d.ts +0 -7
- package/build/components/TableCells/CustomCells/RefundStatusCell/hooks/useRefundStyles.d.ts +0 -50
- package/build/components/TableCells/CustomCells/RefundStatusCell/index.d.ts +0 -3
- package/build/components/TableCells/CustomCells/RefundStatusCell/style.d.ts +0 -279
- package/build/components/TableCells/CustomCells/RefundStatusCell/type.d.ts +0 -20
- package/build/components/TableCells/CustomCells/StatusCell/StatusCellText.d.ts +0 -7
- package/build/components/TableCells/CustomCells/TextWithBadgeCell/TextWithBadgeCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/TextWithBadgeCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/TextWithBadgeCell/type.d.ts +0 -6
- package/build/components/TableCells/CustomCells/TokenStatusCell/TokenStatusCell.d.ts +0 -4
- package/build/components/TableCells/CustomCells/TokenStatusCell/constant.d.ts +0 -8
- package/build/components/TableCells/CustomCells/TokenStatusCell/index.d.ts +0 -2
- package/build/components/TableCells/CustomCells/TokenStatusCell/type.d.ts +0 -17
- /package/build/components/TableCells/CustomCells/{IndividualsCell → VerificationStatus}/constants.d.ts +0 -0
- /package/build/{components/StatusIcons/AuthorizationAutoIcons/utils.d.ts → utils/percentage.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import {f,g,h as h$2,i as i$1,b}from'./chunk-2BU56HDE.js';import {d,c as c$1}from'./chunk-UHP2ZQJO.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-HNVAFVUA.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Db,Eb}from'./chunk-XBJ4RS2B.js';import'./chunk-EYLBXWXJ.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:Eb(d,o.className),"data-testid":i,...l,sx:Db({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:Eb(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:Eb(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:Db({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:Eb(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:Db({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?Db(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
|
|
1
|
+
import {d,c as c$1}from'./chunk-UHP2ZQJO.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-2BU56HDE.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-HNVAFVUA.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Db,Eb}from'./chunk-XBJ4RS2B.js';import'./chunk-EYLBXWXJ.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:Eb(d,o.className),"data-testid":i,...l,sx:Db({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:Eb(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:Eb(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:Db({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:Eb(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:Db({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?Db(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import Z from'dayjs';import ne from'dayjs/plugin/calendar.js';import oe from'dayjs/plugin/customParseFormat.js';import re from'dayjs/plugin/utc.js';import {getTimezone,getCountry}from'countries-and-timezones';var T=/(?:Z|[+-]\d{2}:?\d{2})$/i,c=e=>{if(e==null||e==="")return;if(e instanceof Date)return Number.isNaN(e.getTime())?void 0:e;if(typeof e=="number"){if(!Number.isFinite(e))return;let o=new Date(e);return Number.isNaN(o.getTime())?void 0:o}let t=e.trim();if(!T.test(t))return;let n=new Date(t);return Number.isNaN(n.getTime())?void 0:n},C=e=>{let t=new Date(Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.ms));return t.setUTCFullYear(e.year),t.getTime()};var w=(e,t=2)=>String(e).padStart(t,"0"),_=new Map,V=e=>{let t=_.get(e);if(t)return t;try{let n=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",era:"short",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"});return _.set(e,n),n}catch{return}},q=e=>{let t=r=>Number(e.find(s=>s.type===r)?.value??0),n=t("year");return {year:e.find(r=>r.type==="era")?.value==="BC"?1-n:n,month:t("month"),day:t("day"),hour:t("hour"),minute:t("minute"),second:t("second"),ms:0}},Q=new Set(["Africa/Cairo","Egypt"]),v=2023,R=new Map,ee=(e,t)=>{let n=R.get(e);if(n)return n;let o=t.resolvedOptions().timeZone;return R.set(e,o),o},O=(e,t,n)=>{let o=new Date(Date.UTC(e,t+1,0));return o.getUTCDate()-(o.getUTCDay()-n+7)%7},te=e=>{let t=new Date(e).getUTCFullYear();if(t<v)return;let n=Date.UTC(t,3,O(t,3,5))-2*36e5,o=Date.UTC(t,9,O(t,9,4)+1)-3*36e5;return e>=n&&e<o?180:120},i=(e,t=Date.now())=>{let n=c(t),o=V(e);if(!n||!o)return;if(Q.has(ee(e,o))){let s=te(n.getTime());if(s!==void 0)return s}let r=Math.floor(n.getTime()/1e3)*1e3;return Math.round((C(q(o.formatToParts(n)))-r)/6e4)},Fe=(e,t,n=Date.now())=>{let o=i(e,n),r=i(t,n);return o!==void 0&&r!==void 0&&o!==r},Y=(e,t=Date.now())=>{let n=i(e,t);if(n===void 0)return "";let o=Math.abs(n);return `UTC${n<0?"-":"+"}${w(Math.floor(o/60))}:${w(o%60)}`};Z.extend(re);Z.extend(oe);Z.extend(ne);var E=Z;var L=e=>`${String(e.year).padStart(4,"0")}-${String(e.month).padStart(2,"0")}-${String(e.day).padStart(2,"0")} ${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}.${String(e.ms).padStart(3,"0")}`,l=e=>({year:e.year(),month:e.month()+1,day:e.date(),hour:e.hour(),minute:e.minute(),second:e.second(),ms:e.millisecond()}),B=e=>Number.isNaN(e.getTime())?void 0:{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hour:e.getHours(),minute:e.getMinutes(),second:e.getSeconds(),ms:e.getMilliseconds()},se=[31,28,31,30,31,30,31,31,30,31,30,31],ie=e=>e%4===0&&(e%100!==0||e%400===0),ae=68,de=e=>e>=48&&e<=57,M=e=>e.length>0&&[...e].every(t=>t>="0"&&t<="9"),$=e=>{let t=e.month===2&&ie(e.year)?29:se[e.month-1];return e.month<1||e.month>12||e.day<1||e.day>(t??0)||e.hour>23||e.minute>59||e.second>59?void 0:e},ue=e=>{let t=0;for(;t<e.length&&(de(e.charCodeAt(t))||e[t]==="-"||e[t]==="/");)t++;return t},ce=e=>{let t=e.split("-"),n=[4,2,2];return t.length===3&&t.every((o,r)=>o.length===n[r]&&M(o))?t.map(Number):void 0},me=e=>{let t=e.split("/");if(t.length!==3||!t.every(M))return;let[n,o,r]=t;if(n.length>2||o.length>2||r.length<2||r.length>4)return;let s=Number(r);return [s<100?(s>ae?1900:2e3)+s:s,Number(o),Number(n)]},le=e=>{let[t,n,o="0"]=e.split(":"),[r,s="0"]=o.split(".");if(!(t===void 0||n===void 0)&&!(s.length>3||![t,n,r,s].every(M)))return {hour:Number(t),minute:Number(n),second:Number(r),ms:Number(s.padEnd(3,"0"))}},F=e=>{let t=e.trim(),n=t.slice(0,ue(t)),o=n.includes("/"),r=o?me(n):ce(n);if(!r)return;let[s,u,f]=r,a=t.slice(n.length).trim(),[g="",K=""]=(a[0]==="T"||a[0]==="t"?a.slice(1):a).trim().split(" ").filter(Boolean),y=K.toUpperCase();if(y&&(!o||y!=="AM"&&y!=="PM"))return;if(!g)return $({year:s,month:u,day:f,hour:0,minute:0,second:0,ms:0});let D=le(g);if(!D||y&&(D.hour<1||D.hour>12))return;let J=y?D.hour%12+(y==="PM"?12:0):D.hour;return $({year:s,month:u,day:f,...D,hour:J})},Oe=e=>{let t=F(e);return t&&H(t)},H=e=>{let t=new Date(0);return t.setFullYear(e.year,e.month-1,e.day),t.setHours(e.hour,e.minute,e.second,e.ms),t},d=(e,t)=>{let n=c(e);if(!n)return;let o=i(t,n);if(o!==void 0)return E.utc(n.getTime()+o*6e4)},Ye=(e,t)=>{let n=d(e,t);if(n)return H(l(n))},k=(e,t,n)=>{let o=d(e,n),r=d(t,n);return o&&r?[l(o),l(r)]:void 0},fe=(e,t)=>e.year===t.year&&e.month===t.month&&e.day===t.day,Ee=(e,t,n)=>{let o=k(e,t,n);return !!o&&fe(o[0],o[1])},$e=(e,t,n)=>{let o=k(e,t,n);return !!o&&o[0].year===o[1].year},P=e=>Date.UTC(e.year,e.month-1,e.day),Pe=(e,t,n)=>{let o=k(e,t,n);if(o)return Math.abs(P(o[1])-P(o[0]))/864e5};var pe=(e,t)=>{let n=C(e),o=i(t,n-864e5),r=i(t,n+864e5);if(o===void 0||r===void 0)return;let u=(o===r?[o]:[o,r]).map(a=>n-a*6e4),f=u.filter(a=>a+(i(t,a)??NaN)*6e4===n);return new Date(f.length?Math.min(...f):Math.max(...u))},p=(e,t)=>{if(e==null||e==="")return;if(!(e instanceof Date)){if(typeof e=="number"){if(!Number.isFinite(e))return;let o=new Date(e);return Number.isNaN(o.getTime())?void 0:o}if(T.test(e.trim()))return c(e)}let n=typeof e=="string"?F(e):B(e);if(n)return pe(n,t)};var Ve=(e,t)=>{if(!(typeof e!="number"||!Number.isFinite(e))&&!(Math.abs(e)>864e13))return p(new Date(e).toISOString().replace(/Z$/,""),t)},S=(e,t)=>{let n=c(e);if(!n)return;let o=i(t,n);if(o!==void 0)return n.getTime()+o*6e4};var ye=e=>{let t=", h:mma",n=e?"MMM DD":"MMM DD, YYYY";return {sameDay:`[Today]${t}`,nextDay:`[Tomorrow]${t}`,lastDay:`[Yesterday]${t}`,sameElse:`${n}${t}`,lastWeek:`${n}${t}`,nextWeek:`${n}${t}`}},ve=e=>({sameDay:e,nextDay:e,lastDay:e,sameElse:e,lastWeek:e,nextWeek:e}),et=(e,t,n)=>{let o=d(e,t),r=d(Date.now(),t);return !o||!r?"":o.calendar(r,n??ye(o.isSame(r,"year")))};var De=(e,t)=>{let n=p(e?.[0],t),o=p(e?.[1],t);return n&&o?[n,o]:void 0},z=(e,t)=>{let n=De(e,t);if(!n)return;let o=d(n[0],t),r=d(n[1],t);if(!(!o||!r))return [{fields:l(o),instant:n[0]},{fields:l(r),instant:n[1]}]},X=(e,t=0)=>{let n=new Date(Date.UTC(e.year,e.month-1,e.day+t));return L({year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:0,minute:0,second:0,ms:0})},b=(e,t,n=0)=>p(X(e,n),t),N=(e,t)=>{let n=p(X(e,1),t);return n&&new Date(n.getTime()-1)},ge=(e,t)=>{let n=b(e.fields,t);return !!n&&n.getTime()===e.instant.getTime()||e.fields.hour===23&&e.fields.minute===59},st=(e,t)=>{let n=z(e,t);if(!n)return false;let[o,r]=n;return o.fields.year!==r.fields.year||o.fields.month!==r.fields.month||o.fields.day!==r.fields.day||ge(r,t)},it=(e,t)=>{let n=z(e,t);if(!n)return;let o=b(n[0].fields,t),r=N(n[1].fields,t);return o&&r?[o,r]:void 0},at=(e,t)=>{let n=d(Date.now(),t);if(!n)return;let o=l(n),r=Number.isFinite(e)&&e>=1?Math.floor(e):1,s=N(o,t),u=b(o,t,-(r-1));return u&&s?[u,s]:void 0},dt=(e,t)=>{let n=d(Date.now(),t);if(!n)return;let o=l(n),r=Number.isFinite(e)&&e>=1?Math.floor(e):1,s=new Date(Date.UTC(o.year,o.month-1-r,1)),u=new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth()+1,0)).getUTCDate(),f={...o,year:s.getUTCFullYear(),month:s.getUTCMonth()+1,day:Math.min(o.day,u)},a=b(f,t),g=N(o,t);return a&&g?[a,g]:void 0},ut=(e,t)=>({from:S(e[0],t),to:S(e[1],t)});var he=new Intl.DisplayNames(["en"],{type:"region"}),W=e=>{try{return he.of(e)}catch{return}},Te={US:"America/New_York",CA:"America/Toronto",BR:"America/Sao_Paulo",MX:"America/Mexico_City",AR:"America/Argentina/Buenos_Aires",CL:"America/Santiago",AU:"Australia/Sydney",NZ:"Pacific/Auckland",RU:"Europe/Moscow",UA:"Europe/Kyiv",ES:"Europe/Madrid",PT:"Europe/Lisbon",ID:"Asia/Jakarta",KZ:"Asia/Almaty",UZ:"Asia/Tashkent",MN:"Asia/Ulaanbaatar"},h="UTC",j={id:h,countryCode:h,countryName:h},U=e=>{if(!e)return false;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{return false}},G=e=>{if(!e)return;if(e===h)return j;let t=getTimezone(e);if(t){let[n]=t.countries;return {id:e,countryCode:n??"",countryName:W(n)??n??e}}return U(e)?{id:e,countryCode:"",countryName:e}:void 0},Ze=e=>{let t=e?.trim().toUpperCase();if(!t)return;if(t===h)return j;let n=getCountry(t),o=Te[t]??n?.timezones[0];if(o)return {id:o,countryCode:t,countryName:W(t)??n?.name??t}},ft=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||void 0}catch{return}},A=(e,t)=>({zone:e,countryCode:t?.trim().toUpperCase()||G(e)?.countryCode||""}),pt=e=>{if(e){if(typeof e=="string")return U(e)?A(e):void 0;if(!(!e.timezone||!U(e.timezone)))return A(e.timezone,e.countryCode)}},yt=e=>{let t=Ze(e);return t?A(t.id,t.countryCode):void 0},Dt=(e,t)=>!!e&&!!t&&e.zone===t.zone&&e.countryCode===t.countryCode,be=(e,t=Date.now())=>{let n=Y(e.zone,t).replace("UTC","GMT");return n?`(${n}) ${W(e.countryCode)??G(e.zone)?.countryName??e.zone}`:""},gt=e=>({timezone:e.zone,countryCode:e.countryCode,label:be(e),offset:(i(e.zone)??0)/60});export{yt as A,Dt as B,be as C,gt as D,i as a,Fe as b,Y as c,Oe as d,Ye as e,Ee as f,$e as g,Pe as h,p as i,Ve as j,S as k,ve as l,et as m,De as n,st as o,it as p,at as q,dt as r,ut as s,h as t,U as u,G as v,Ze as w,ft as x,A as y,pt as z};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b as b$3,h,c,j as j$1,i}from'./chunk-HNVAFVUA.js';import {b as b$1}from'./chunk-673TILTX.js';import {a}from'./chunk-EGIKB732.js';import {b as b$5}from'./chunk-YFL4D5VW.js';import {d as d$1}from'./chunk-MUBZJUHH.js';import {b as b$4}from'./chunk-KLN3YM53.js';import {b as b$6}from'./chunk-G4W4TPFT.js';import {b as b$2}from'./chunk-TRXHMROX.js';import {b as b$7}from'./chunk-3YZF4W2L.js';import {b as b$8}from'./chunk-WE5WS7B2.js';import {b as b$a}from'./chunk-VLXDIIDL.js';import {b as b$9}from'./chunk-FXTZ22TS.js';import {c as c$1}from'./chunk-SKDHJYOO.js';import {t,j,p,z,R,B,b,d,v as v$1,D,V,f}from'./chunk-Z6D3LMCU.js';import {l}from'./chunk-U3ZJP2GE.js';import {Sb,na as na$1,xb,Va,Ua,Ta,Eb as Eb$1,Oa,Pa,ua,Ra,Sa,Qa,rb,W,ba,ca,vb as vb$1,ma as ma$1,Z,wb as wb$1,fa}from'./chunk-XBJ4RS2B.js';import {b as b$b}from'./chunk-TIPJC5YT.js';import {Cb,zb,Bb,Xd as Xd$1,Fj,rc as rc$1,Ei as Ei$1,Ci as Ci$1,Di as Di$1,Eh,Pg,Vh,Ve,ik,ja,Ak,rk,F,E,Eb,Fb,Gb,C,Zj,Dh,yb,im,jc as jc$1,kc as kc$1,hc as hc$1,ma,Ll as Ll$1,xb as xb$1,Hb,G,wb,T,zi as zi$1,Bi as Bi$1,Ai as Ai$1,yi as yi$1,Fi as Fi$1,dh,Wg,ch,Rj,Sj,vb,gk,jk,hk,Bk,zk,xk,uk,kk,mk,Ck,Oh,ub,nk,sb,ok,Pn as Pn$1,va,ua as ua$1,wk,vk,pk,sk as sk$1,qk,tk as tk$1,h as h$1,Vg,z as z$1,ap,da,ca as ca$1,na as na$2,cc,$d,wn as wn$1,ae,rb as rb$1,qb,Kj,Ij,Jj,Tb,Pm,Mm as Mm$1,Hm,Im,Om as Om$1,Am as Am$1,Qm,Bm,Rm,Cm,Jm,Em,Gm,Nm,Fm,ym,Km,Lm as Lm$1,zm,Dm,xm as xm$1,wm,vm as vm$1,um as um$1,tm as tm$1}from'./chunk-EYLBXWXJ.js';import zi,{forwardRef,useId,memo,useMemo,useState,useCallback,useEffect,useRef,Fragment as Fragment$1}from'react';import {styled,useTheme}from'@mui/material/styles';import am from'@mui/material/TableCell';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {useTranslation}from'react-i18next';import {styled as styled$1,Box,Paper,Button,TextField,Menu,MenuItem,ListItemIcon,ListItemText,Typography,Popper,CircularProgress,Link,useTheme as useTheme$1}from'@mui/material';import {motion,AnimatePresence,Reorder,useDragControls}from'framer-motion';import Oe from'lodash/camelCase';import pa from'@mui/material/Box';import Lf from'@mui/material/ClickAwayListener';import mc from'lodash/startCase';import Pf from'@mui/material/Popper';import _f from'@mui/material/Typography';import td from'@mui/material/Button';import BC from'@mui/material/SvgIcon';import xx from'@mui/material/Popover';var Js=styled(am,{shouldForwardProp:e=>e!=="rowId"})(({theme:e})=>({fontSize:e.typography.body2.fontSize,fontWeight:e.typography.fontWeightRegular,color:e.palette.text.primary,padding:e.spacing(0),verticalAlign:"center",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",display:"block",width:"100%",border:"none",textAlign:e?.direction==="ltr"?"left":"right"}));var dm=forwardRef(({children:e,...t},o)=>{let n=Sb(useId(),"table-cell");return jsx(Js,{id:n,component:"div","data-testid":"TableCell",...t,ref:o,children:e})}),v=memo(dm);function mm({value:e,label:t,...o}){let n=Number.isInteger(e)&&Number(e)>1&&t.charAt(t.length-1)!=="s"?`${t}s`:t,r=`${e} ${n}`;return jsx(p,{title:void 0,children:jsx(v,{...o,children:jsx("span",{children:r})})})}var um=mm;var Zs=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Qs=styled("span",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"25ch",flex:1,...na$1(t)&&{fontSize:"11px",color:e.palette.text.primary}})),el=styled("span")({width:"11.6px",height:"11.6px",flexShrink:0,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"flex-start"}),tl=styled("img")({width:"11.6px",height:"11.6px",borderRadius:"50%"});var Je=styled$1("div")(({percentage:e,isCapture:t,theme:o})=>({background:`conic-gradient(${t?o.palette.info.dark:"#656565"} ${e}%, transparent 0.00%)`,borderRadius:"50%",width:"8.333px",height:"8.333px",border:`0.6px solid ${t?o.palette.info.dark:"#656565"}`}));var Zx=styled$1("span",{shouldForwardProp:e=>e!=="variant"})(({theme:e,variant:t})=>({display:"flex",width:"17px",height:"12px",backgroundColor:t?xb(e.palette)[t]:"transparent",borderRadius:"2px",flexShrink:0,overflow:"hidden",visibility:"hidden","& > img":{width:"100%",height:"100%",objectFit:"cover"}})),qt=styled$1("button")({background:"transparent",border:"none",padding:0,cursor:"pointer",outline:"none",display:"flex",alignItems:"center",justifyContent:"center",overflow:"visible"}),Ct=styled$1(motion.div)(({theme:e})=>({borderRadius:"12px",backgroundColor:e.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5)})),Qx=styled$1("img")(()=>({width:"12px",height:"12px"})),nl=styled$1("span",{shouldForwardProp:e=>e!=="isShown"})(({theme:e,isShown:t})=>({...t&&{border:`1px solid ${e.palette.divider}`},borderRadius:"12px",backgroundColor:t?e.palette.background.paper:"transparent",width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,overflow:"hidden",visibility:"hidden"})),ey=styled$1("span")(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),padding:"1.285px 2.569px",height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600})),rl=styled$1("div")(()=>({display:"flex",width:"24px",height:"24px",alignItems:"center",justifyContent:"center",borderRadius:"64px;",border:"1px solid #F2F2F2;"})),il=styled$1(t)(({theme:e})=>({width:24,height:24,fontSize:"8.5px",fontWeight:500,color:e.palette.background.default,border:`1px solid ${e.palette.divider}`})),J=styled$1("div")(({theme:e})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`})),al=styled$1(J)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:e.palette.info.light,borderColor:e.palette.divider,minWidth:"88px",height:"24px"})),sl=styled$1(J)(({theme:e})=>({color:e.palette.grey.A700,backgroundColor:`${e.palette.grey.A700}1A`,minWidth:"88px",height:"24px"})),ll=styled$1(v)(()=>({fontSize:"11px",textAlign:"left",display:"flex",justifyContent:"flex-start",alignItems:"center",overflow:"hidden",gap:"4px",textOverflow:"ellipsis",whiteSpace:"nowrap"})),ty=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Ze=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),We=styled$1("img")(()=>({width:"36px",height:"24px"})),Zo=styled$1(motion.span)(({theme:e,order:t})=>({position:"absolute",left:0,zIndex:t+6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"})),oy=styled$1("span")(({theme:e})=>({textDecorationLine:"underline",color:e.palette.info.dark}));function gm({customerInitiated:e,children:t,isTimezoneIconShown:o,hasCustomerIcon:n,customerIcon:r,customerName:s,hideCustomerInitiatedIcon:i,hideTimezoneIcon:a,phone:l,email:p$1,id:d,...m}){let{t:u}=useTranslation(),C=e===false?u("merchantInitiated"):"",g=rb(s),b=s?.split(" ")?.map(I=>I?.[0]?.toUpperCase()).join(""),S=useMemo(()=>W(),[]),T=n&&jsx(p,{title:t,children:jsx(il,{"data-testid":"CustomerCell_customerShownIcon",sx:{background:S},src:r,alt:r,children:b})}),c=useMemo(()=>[{name:"ID",value:d},{name:"Name",value:s},{name:"Email",value:p$1},{name:"Phone",value:l}],[p$1,l,d,s]),x=useMemo(()=>c.some(({value:I})=>I)?jsx("div",{"data-testid":"CustomerCell_customerTooltip",children:c.map(({name:I,value:h},w)=>h&&jsx("div",{"data-testid":`CustomerCell_customerTooltip_${I}`,children:I==="Name"?h:`${I}: ${h}`},`${w}-${h}`))}):null,[c]);return jsx(v,{...m,"data-testid":"CustomerCell_TableCell",children:jsxs(Zs,{"data-testid":"CustomerCell_StyledCustomerCell",children:[T,jsx(p,{title:x,children:jsx(Qs,{"data-testid":"CustomerCell_StyledCustomerName","data-is-arabic":g,children:t})}),!a&&jsx(el,{"data-testid":"CustomerCell_StyledCustomerIconContainer",children:o&&jsx(tl,{src:G,"data-testid":"CustomerCell_StyledCustomerIcon"})}),!i&&jsx(p,{title:C,children:jsx(nl,{"data-testid":"CustomerCell_StarBadgeWrapper",className:"geography-box",isShown:!!C,children:C&&jsx("img",{"data-testid":"CustomerCell_merchantInitiatedIcon",src:wb,alt:"merchant",style:{width:"16px",height:"16px"}})})})]})})}var xm=gm;var Qo={ORDER:{label:"order",icon:yi$1,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:Ai$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Bi$1,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:zi$1,color:"#32ADE6"}},en={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled$1("img")(()=>({width:"35px",height:"16px",display:"block"}));styled$1("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled$1("img")(()=>({maxWidth:"100%",width:"100%"}));var tn=styled$1("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),on=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),nn=styled$1(motion.span)(({order:e})=>({zIndex:(e||0)+1}));function Am({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n}){let r=Sb(useId(),"agreement-icon"),s=useTheme$1(),{t:i}=useTranslation(),a$1=useMemo(()=>[...t?[en.SAVED_TOKEN]:[],...(o||0)>0?[en.COUNT]:[],...e&&Qo[e]?[Qo[e]]:[]],[t,o,e]),l=m=>n?jsx(nn,{"data-testid":"AgreementCell_countBadge",children:jsx(p,{title:i("totalPaymentCount",{amount:b$b(o)}),children:jsx(on,{children:jsxs(tn,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:en.COUNT.color},children:["x",o]})})})},m):jsx(a,{value:o,index:m},m),p$1=a$1.map((m,u)=>m.label==="countBadge"?l(u):jsx(p,{title:i(m.label),children:jsx(nn,{children:n?jsx(on,{children:jsx(tn,{"data-testid":"AgreementCell_agreementType",sx:{color:m.color},children:i(m.label)})}):jsx(d,{sx:{maxWidth:"16px",maxHeight:"16px",height:"auto",width:"auto"},src:m.icon,alt:"agreement"})},m.color)},m.color)),d$1=jsx(p,{title:"No agreement",children:jsx(nn,{children:n?jsx(on,{children:jsx(tn,{"data-testid":"AgreementCell_agreementType",sx:{color:s.palette.text.secondary},children:"No agreement"})}):jsx(d,{sx:{maxWidth:"24px",maxHeight:"24px",height:"auto",width:"auto"},src:Fi$1,alt:"agreement"})},"no-agreement")},"no-agreement");return jsx(Box,{id:r,"data-testid":"AgreementIcon",sx:{display:"flex",alignItems:"center",gap:"4px"},children:p$1?.length>0?p$1:d$1})}var pl=Am;var vm=pl;styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));styled$1("img")(()=>({maxWidth:"36px",maxHeight:"24px"}));styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var cl=styled$1("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),ml=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px",textAlign:"center",width:"100%"}));styled$1("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var ul=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px"}));var Fr={"3DS":{tooltip:"3DS",icon:Sj,borderColor:"rgba(31, 136, 208, 0.10)"},"Device Biometric":{tooltip:"Biometric",icon:Rj,borderColor:"rgba(31, 136, 208, 0.10)"},"Non-3DS":{tooltip:"Non 3DS",icon:ch,borderColor:"rgba(31, 136, 208, 0.10)"}},fl={FAILED:{tooltip:"Failed",icon:Wg,borderColor:"rgba(255, 61, 0, 0.10)"},REJECTED:{tooltip:"Rejected",icon:dh,borderColor:"rgba(255, 61, 0, 0.10)"}};function Vm({transactionStatus:e,eci:t,authType:o,isTextShown:n}){let r=Sb(useId(),"auth-icons"),s=useMemo(()=>{let a=e?fl[e]:null,l=a?.tooltip,p=e==="AUTHENTICATED"?null:a?.icon;return [{tooltip:l,content:n?l:p,type:n?"text":"icon"},...o?[{tooltip:o,content:n?Fr[o]?.tooltip:Fr[o]?.icon,type:n?"text":"icon"}]:[],{tooltip:"",content:t?`ECI ${t}`:"",type:"text"}]},[e,n,o,t]),i=useMemo(()=>s.filter(a=>!!a.content).map((a,l)=>{let p$1=a.type==="text"?jsx(ml,{"data-testid":"AuthenticationCell_BadgeTextWrapper",children:jsx(cl,{sx:{border:"none"},"data-testid":"AuthenticationCell_TextLabel","data-source":a.content,children:a.content})}):jsx(d,{sx:{width:"16px",height:"16px"},src:a.content,alt:a.tooltip});return jsx(p,{title:a.tooltip,children:p$1},`${a.tooltip}-${l}`)}),[s]);return jsx(ul,{id:r,"data-testid":"AuthIcons",children:i})}var gl=Vm;var Mm=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"},...e>0&&{opacity:0}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t,...e>0&&{opacity:1}}});var Lm=gl;function gt(e){return e<5?5:e===100?95:e}var Xt={VOID:{icon:hk},CAPTURED:{icon:gk}};var rn=styled(motion.div)(({theme:e,isCapture:t})=>({display:"flex",alignItems:"center",justifyContent:"center",gap:e.spacing(.5),paddingInline:e.spacing(.3),paddingBlock:e.spacing(.3),height:"100%",minWidth:"100%",backgroundColor:t?"#eaf3fb":"#eeeeee",borderRadius:"56px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,position:"relative",zIndex:10})),an=styled("div")(({theme:e,percentage:t,isCapture:o})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} ${o?e.palette.info.dark:"#656565"}`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(.516),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:o?e.palette.info.dark:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),sn=styled("img")({width:"14px",height:"14px"}),yt=styled(Ze)({width:"16px",height:"16px"}),et=styled("img")({width:"16px",height:"16px"}),xl=styled(Box)({display:"flex",alignItems:"center",justifyContent:"center"});function Om({voidPercentage:e,capturePercentage:t,captureCount:o,autoType:n,captureAmount:r,voidAmount:s,currency:i,isTextShown:a,remainingAmount:l,isSheetViewShown:p$1,selectionProps:d={}}){let m=Number(t)+Number(e)===100||l<=0,u=Sb(useId(),"capture-auto-icon"),C=useTheme(),{t:g}=useTranslation(),b=ba(l||0),S=useCallback(h=>`Auto ${h} - ${i} ${b.integerAmount}.${b.decimalAmount}`,[i,b.decimalAmount,b.integerAmount]),T=useCallback(h=>{let w=h==="Capture"?r:s,{integerAmount:y,decimalAmount:A}=ca(w,i);return `Partial ${h} - ${i} ${y}.${A}`},[r,s,i]),c=t>0?jsx(p,{title:T("Capture"),children:jsxs(rn,{isCapture:true,isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:C.shadows[4]}},children:[jsx(sn,{src:vb,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(an,{isCapture:true,percentage:t,children:[t,"% ",jsx(Je,{isCapture:true,percentage:gt(t)})]}),o>1&&jsxs(z,{compact:true,color:"dark",children:[o,"x"]})]})]})}):n==="CAPTURED"&&!m?jsx(p,{title:S("Capture"),children:jsx(yt,{children:jsx(et,{src:Xt.CAPTURED?.icon,alt:"auto"})})}):jsx(p,{title:S("Capture"),children:jsx(yt,{children:jsx(et,{src:Xt.CAPTURED?.icon,alt:"auto"})})}),x=t===100?jsx(p,{title:g("captured"),children:jsx(xl,{children:jsx(et,{src:jk,alt:"captured"})})}):c,I=useMemo(()=>p$1&&x?jsx(b$1,{copyTrigger:"click",copyText:g("captured"),children:g("captured")}):a&&x?jsx(al,{children:g("captured")}):x,[a,x,p$1,g]);return I&&jsx("div",{id:u,"data-testid":"CaptureAutoIcon",style:{zIndex:12},children:I})}var hl=Om;function $m({voidPercentage:e,capturePercentage:t,voidCount:o,autoType:n,captureAmount:r,voidAmount:s,currency:i,isTextShown:a,isSheetViewShown:l,selectionProps:p$1={},remainingAmount:d}){let m=Number(t)+Number(e)===100||d<=0,u=Sb(useId(),"void-auto-icon"),C=useTheme(),{t:g}=useTranslation(),b=ba(d||0),S=useCallback(h=>`Auto ${h} - ${i} ${b.integerAmount}.${b.decimalAmount}`,[i,b.decimalAmount,b.integerAmount]),T=useCallback(h=>{let w=h==="Capture"?r:s,{integerAmount:y,decimalAmount:A}=ca(w,i);return `Partial ${h} - ${i} ${y}.${A}`},[r,s,i]),c=e>0||s?jsx(p,{title:T("Void"),children:jsxs(rn,{isFullyUsed:m,whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:14,background:C.palette.common.white,border:`0.75px solid ${C.palette.grey[600]}1A`},variants:{animate:{boxShadow:C.shadows[4]}},children:[jsx(sn,{src:Ak,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(an,{percentage:e,children:[e,"% ",jsx(Je,{percentage:gt(e)})]}),o>0&&jsxs(z,{compact:true,color:"neutral",children:[o,"x"]})]})]})}):n==="VOID"&&!m?jsx(p,{title:S("Void"),children:jsx(yt,{children:jsx(et,{src:Xt.VOID?.icon,alt:"auto"})})}):null,x=e===100?jsx(p,{title:g("void"),children:jsx(yt,{children:jsx(et,{src:Ak,alt:"void"})})}):c,I=useMemo(()=>l&&x?jsx(b$1,{copyTrigger:"click",copyText:g("void"),children:g("void")}):a&&x?jsx(sl,{children:g("void")}):x,[a,x,l,g]);return I?jsx("div",{id:u,"data-testid":"VoidAutoIcon",style:{...!l&&{zIndex:11}},children:I}):null}var bl=$m;var Ym=hl;var Or={ABANDONED:Oh,IN_PROGRESS:Ck,VOID:Ak,CANCELLED:ik,CAPTURED:jk,INITIATED:Ck,FAILED:mk,DECLINED:kk,RESTRICTED:uk,TIMEDOUT:xk,UNKNOWN:zk,AUTHORIZED:Bk},Sl={UNKNOWN:{gatewayIcon:nk,acquirerIcon:ub,color:"#FF7A00",background:"#FF7A001A"},TIMEDOUT:{gatewayIcon:nk,acquirerIcon:ub,color:"#FF7A00",background:"#FFF3E5"},FAILED:{gatewayIcon:nk,acquirerIcon:ub,color:"#FF7A00",background:"#FFF3E5"},DECLINED:{gatewayIcon:ok,acquirerIcon:sb,color:"#FF3D00",background:"#FFEAE5"},RESTRICTED:{gatewayIcon:ok,acquirerIcon:sb,color:"#FF3D00",background:"#FFEAE5"},ABANDONED:{gatewayIcon:nk,acquirerIcon:ub,color:"#FFD600",background:"#FFFBE5"},CANCELLED:{gatewayIcon:nk,acquirerIcon:ub,color:"#FFD600",background:"#FFFBE5"},INITIATED:{color:"#8D8D94",background:"transparent",gatewayIcon:nk,acquirerIcon:ub}},wl={PENDING:rk,REFUNDED:qk},Hr={PENDING:{color:"#FF7A00",backgroundColor:"#FF7A000D"},REFUNDED:{color:"#4E1FD0",backgroundColor:"#4E1FD00D"}},Tl={PAID_OUT:pk,SETTLED:vk,PENDING:wk},Al={AUTHORIZED:Bk},Pl={CAPTURED:{color:"#1F88D0",background:"#1F88D00D"}};var Xm=({authorizedStatus:e,isTextShown:t,iconStyles:o,tableMode:n,chipIndex:r=0,selectionProps:s={}})=>{let{t:i}=useTranslation(),a=useTheme(),l=i(Oe(e));return na$1(n)?jsx(b$1,{copyTrigger:"click",copyText:l,children:l}):jsx(p,{title:l,children:t?jsx(J,{"data-testid":"StatusCell_AuthorizedStatusLabel",sx:{color:a.palette.info.dark},children:l}):jsx(d,{src:Al[e],alt:"authorized-icon","data-testid":"StatusCell_AuthorizedStatusIcon",sx:o})})};var vl=styled(motion.span)(({theme:e})=>({color:e.palette.common.white,display:"block",fontWeight:e.typography.fontWeightBold,fontSize:"9.78px",borderRadius:"4px",paddingInline:e.spacing(.45)})),El=styled(motion.span)(()=>({display:"block",width:"0",overflow:"hidden"})),_r=styled("img")(()=>({width:"10px",height:"10px"})),zr=styled(motion.span)(({theme:e})=>({width:"18px",height:"18px",borderRadius:"50%",backgroundColor:e.palette.background.paper,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,position:"relative"})),Ur=styled(motion.div,{shouldForwardProp:e=>e!=="isVisible"})(({isVisible:e})=>({display:"flex",justifyContent:"center",alignItems:"center",gap:"4px",width:"0",overflow:"hidden",opacity:0,...!e&&{padding:"0 !important"}})),Vl=styled(motion.div)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start"})),Ml=styled(motion.span)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),Ll={delay:.2,ease:"easeIn",fadeIn:{duration:.2}},Rl={animate:{width:"auto",paddingRight:"4px",paddingLeft:"4px"},fadeIn:{opacity:1,transition:{delay:.7}}},kl={animate:{width:"auto"},fadeIn:{opacity:1,transition:{delay:1}}},Dl={animate:{width:"auto",paddingRight:"8px",paddingLeft:"4px"}},Gr={fadeIn:{duration:.3},animate:{duration:.1}},Nl={fadeIn:{opacity:1}},Bl=styled(J)(()=>({width:"88px",height:"100%"})),$r=styled(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.25),height:"100%"}));function Yr({chargeStatus:e,gatewayTooltip:t,acquirerTooltip:o,chargeTooltip:n,errorCode:r,isTextShown:s,gatewayCode:i,acquirerCode:a,unCapturedStyles:l,iconStyles:p$1,iconWrapperStyles:d,gatewayIconWrapperStyles:m,gatewayContainerStyles:u,gateWayIconStyles:C,showBadge:g=true,isSheetViewShown:b=false,selectionProps:S={},chipIndex:T=0}){let c=e?Sl[e]:null,x=e?Pl[e]:null,I=useTheme(),{t:h}=useTranslation(),w=Sb(useId(),"charge-status-icon"),y=n&&jsx(Fragment,{children:jsx("div",{children:n})}),A=o&&jsxs(Fragment,{children:[jsx("div",{children:"Acquirer"}),jsx("div",{children:o})]}),L=t&&jsxs(Fragment,{children:[jsx("div",{children:"Gateway"}),jsx("div",{children:t})]}),F=e&&Or[e]&&jsx("div",{"data-testid":"ChargeStatusIcon_ChargeIcon",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",borderRadius:c?"50%":"",...d},children:jsx(We,{src:Or[e],alt:"charge-icon","data-testid":"ChargeStatusIcon_StatusIcon",style:{borderRadius:c?"50%":"",width:"16px",height:"16px",...p$1}})});return b?jsxs($r,{children:[jsxs(b$1,{copyTrigger:"click",copyText:h(Oe(e)),children:[h(Oe(e))," ",r]}),c&&jsxs(Fragment,{children:[i&&jsxs(b$1,{copyTrigger:"click",copyText:"Gateway",children:["Gateway ",i]}),a&&jsxs(b$1,{copyTrigger:"click",copyText:"Acquirer",children:["Acquirer ",a]})]})]}):s?jsxs($r,{children:[jsx(p,{title:y,children:jsxs(Bl,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Oe(e),sx:{background:c?.background||x?.background||"transparent",color:c?.color||x?.color||I.palette.info.dark,borderColor:`${c?.color||x?.color||I.palette.info.dark}1A`},children:[h(Oe(e))," ",r]})}),c&&jsxs(Fragment,{children:[i&&jsx(p,{title:L,children:jsxs(J,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Oe(e),sx:{background:c?.background||x?.background||"transparent",color:c?.color||x?.color||I.palette.info.dark},children:["Gateway ",i]})}),a&&jsx(p,{title:A,children:jsxs(J,{"data-testid":"ChargeStatusIcon_isTextShown","data-status":Oe(e),sx:{background:c?.background||x?.background||"transparent",color:c?.color||x?.color||I.palette.info.dark},children:["Acquirer ",a]})})]})]}):jsx(Ze,{id:w,"data-testid":"ChargeStatusIcon_StatusIconWrapper",style:{...d},children:Pn$1?.includes(e||"")&&(y||A||L)?jsxs(Ml,{"data-testid":"ChargeStatusIcon_UnCapturedContainer",whileHover:["animate","fadeIn"],style:{left:"0",...g&&{paddingInline:"12px",border:"1px solid #F2F2F2",borderRadius:"12px",backgroundColor:"#fff"},...l},children:[jsx(Vl,{"data-testid":"ChargeStatusIcon_UnCapturedBadge",sx:{borderRadius:"56px"},initial:{background:"transparent"},variants:{animate:{background:c?.background}},children:jsx(p,{title:y??h(Oe(e)),children:jsxs(Fragment,{children:[F,jsx(El,{"data-testid":"ChargeStatusIcon_ErrorCodeWrapper",transition:{animate:{duration:.05}},variants:Dl,style:{...r&&{padding:"0 !important"}},children:jsx(vl,{"data-testid":"ChargeStatusIcon_ErrorCodeLabel",sx:{background:c?.color},transition:Ll,variants:Nl,initial:{opacity:0},children:r})})]})})}),jsx(Ur,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Gr,variants:Rl,style:u,isVisible:!!L,children:L&&jsx(p,{title:L,children:jsx(zr,{"data-testid":"ChargeStatusIcon_GatewayIconWrapper",style:{background:c?.background,...m},children:jsx(_r,{src:c?.gatewayIcon,alt:"gateway-icon","data-testid":"ChargeStatusIcon_GatewayIcon",style:C})})})}),jsx(Ur,{"data-testid":"ChargeStatusIcon_GatewaysContainer",transition:Gr,variants:kl,style:u,isVisible:!!A,children:A&&jsx(p,{title:A,children:jsx(zr,{"data-testid":"ChargeStatusIcon_AcquirerIconWrapper",style:{background:c?.background,...m},children:jsx(_r,{src:c?.acquirerIcon,alt:"acquirer-icon","data-testid":"ChargeStatusIcon_AcquirerIcon",style:C})})})})]}):jsx(p,{title:y??h(Oe(e)),children:jsx(Ze,{children:F})})})}var nu=()=>{let{t:e}=useTranslation(),t=Sb(useId(),"customer-initiated-icon");return jsx(p,{title:e("merchantInitiated"),children:jsx("img",{id:t,"data-testid":"merchantInitiatedIcon",src:wb,alt:"merchant",style:{width:"16px",height:"16px"}})})};var ru={G:"Global",R:"Regional",L:"Local"},Jt=({geographyVariant:e,countryCode:t,isTextShown:o})=>{let n=e?ru[e]:void 0,r=n||t?`${n||""} ${n&&t?"-":""} ${t?`Country - ${t}`:""}`:void 0;return o||!t?null:jsx(p,{title:r,children:jsx(b$8,{countryCode:t})})};var su=({geographyVariant:e,isTextShown:t,deviceCountry:o,deviceType:n,tableMode:r})=>{let s=Sb(useId(),"device-icon-chip");return jsxs(pa,{id:s,"data-testid":"DeviceIconChip",sx:{display:"flex",gap:"8px",alignItems:"center",...na$1(r)&&{height:"18px"}},children:[jsx(Jt,{geographyVariant:e,isTextShown:t,countryCode:o}),jsx(c$1,{type:n,isTextShown:t,tableMode:r})]})};var du=({isDisputeOpen:e,iconStyles:t})=>{let o=Sb(useId(),"dispute-icon");return jsx(We,{id:o,"data-testid":"StatusCell_DisputeStatusIcon",sx:{width:"13.5px",height:"13.5px"},src:e?va:ua$1,alt:"dispute-icon",style:t})};var _l=styled(pa,{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",gap:e.spacing(.5),...na$1(t)&&{height:"18px"},alignItems:"center"})),zl=styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function qr({countryCode:e,isTextShown:t,cardNumber:o,bankName:n,tableMode:r}){let s=Sb(useId(),"issuer-icon"),i=o?.slice(0,4),a=o?.slice(-4);return jsxs(_l,{id:s,"data-testid":"IssuerIcon",tableMode:r,children:[e&&jsx(Jt,{countryCode:e,isTextShown:t}),jsx(p,{title:`${n?`Issuer - ${n}`:""}`,children:jsx(zl,{children:`${i||""} ${a||""}`})})]})}var Cu=qr;var cn=styled$1("div")(()=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",width:"65px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4.5px 8px",borderRadius:"24px"}));var Iu=({payoutStatus:e="PENDING",isTextShown:t,payoutTooltip:o,iconStyles:n,isSheetViewShown:r,chipIndex:s=0,selectionProps:i={}})=>{let{t:a}=useTranslation(),l=Sb(useId(),"payout-icon"),p$1=a(Oe(e)),d=o||p$1;return r?jsx(b$1,{copyTrigger:"click",copyText:p$1,children:p$1}):jsx(p,{title:d,children:t?jsx(cn,{id:l,"data-testid":"StatusCell_PayoutStatusLabel",children:p$1}):jsx(We,{id:l,src:Tl[e],alt:"settled-icon","data-testid":"StatusCell_PayoutStatusIcon",style:n})})};var Ul=styled(motion.img)(()=>({width:"14px",height:"14px"})),Gl=styled(motion.span)(({theme:e})=>({color:e.palette.common.white,borderRadius:e.spacing(.5),height:"12px",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"9.782px",fontWeight:600,backgroundColor:e.palette.secondary.main})),Kr=styled(motion.div)(({theme:e})=>({height:"16px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.secondary.main}1A`,paddingInline:e.spacing(.5),borderRadius:"56px"})),$l=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*49,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}}),Yl=styled(motion.span)(({isTextShown:e,theme:t})=>({border:`1px solid ${t.palette.divider}`,borderRadius:"12px",backgroundColor:t.palette.background.paper,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",minWidth:e?"auto":"36px",...e&&{border:"none"}})),jl=styled(motion.div,{shouldForwardProp:e=>e!=="order"})(({order:e=0})=>({display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:0,left:0,zIndex:e+6,width:"fit-content",height:"24px",cursor:"pointer",borderRadius:"16px","&:hover":{zIndex:200}})),ql=styled(motion.div,{shouldForwardProp:e=>e!=="statusesCount"})(({statusesCount:e=1})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",minWidth:`${e*6+36}px`,height:"24px",cursor:"pointer",borderRadius:"16px",overflow:"visible"})),Kl=styled("div")(()=>({display:"flex",gap:"4px",justifyContent:"flex-start",alignItems:"center",position:"relative",width:"100%",overflow:"visible"}));var Au=({isTextShown:e,refundStatus:t="PENDING",refundTooltip:o="",refundCount:n,iconStyles:r,isSheetViewShown:s,chipIndex:i=0,selectionProps:a={}})=>{let{t:l}=useTranslation(),p$1=useTheme(),d=Sb(useId(),"refund-icon"),m=(n||0)>1,u=l(Oe(t));if(s)return jsxs(b$1,{copyTrigger:"click",copyText:u,children:[u," ",m?`${n}x`:null]});let C=jsxs(Gl,{"data-testid":"StatusCell_RefundsCountBadge",initial:{width:0,opacity:0,padding:"0px"},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex",padding:"1.285px 2.569px"},fadeIn:{transition:{delay:.5},opacity:1}},children:[n,"x"]});return e?jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:jsx(cn,{id:d,"data-testid":"StatusCell_RefundStatusLabel",sx:{color:Hr[t].color,backgroundColor:Hr[t].backgroundColor,width:"90px"},children:jsxs(Kr,{whileInView:m?["animate","fadeIn"]:void 0,variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[u," ",m?C:null]})})}):jsx(p,{title:jsx("div",{children:jsx("div",{children:o})}),children:m?jsxs(Kr,{id:d,whileHover:["animate","fadeIn"],animate:"start",variants:{animate:{boxShadow:p$1.shadows[4],gap:p$1.spacing(.5)}},children:[jsx(Ul,{src:sk$1,alt:"multi-refunded-icon","data-testid":"StatusCell_MultiRefundIcon"}),C]}):jsx(We,{id:d,src:wl[t],alt:"refunded-icon","data-testid":"StatusCell_RefundStatusIcon",style:r})})},Xl=Au;var Pu=Xl;var Jl={REFUNDED:qk,PAID_OUT:pk,SETTLED:sk$1,PENDING:rk,UNKNOWN:zk,TIMEDOUT:xk,CANCELLED:ik,FAILED:mk,DECLINED:kk,RESTRICTED:uk,IN_PROGRESS:Ck,ACCEPTED:tk$1};function Cn({status:e,refundTooltip:t}){let{t:o}=useTranslation();return jsx(p,{title:jsxs("div",{children:[jsx("div",{children:o(Oe(e))}),t]}),children:jsx(Ze,{children:jsx("img",{src:Jl[e],alt:"refund-requested"})})})}function Ql({status:e,gatewayTooltip:t,unCapturedTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:s,gatewayCode:i,refundTooltip:a}){let{t:l}=useTranslation();return Pn$1?.includes(e??"")?jsx(Yr,{chargeStatus:e,gatewayTooltip:t,chargeTooltip:o,acquirerTooltip:n,errorCode:r,acquirerCode:s,gatewayCode:i,iconWrapperStyles:{height:17}}):jsx(Cn,{status:e,refundTooltip:a})}var Lu={american_express:"AMEX",debit:"card",credit:"card",unionpay:"UnionPay",jaywan:"JAYWAN"},re=e=>Lu[e?.toLowerCase()||""]||e;styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)}));var ep=styled$1("img")(()=>({maxWidth:"24px",maxHeight:"16px"}));styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));var tp=styled$1("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),op=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px",textAlign:"center",width:"100%"}));styled$1("span")(({theme:e})=>({position:"absolute",left:0,zIndex:6,border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));var np=styled$1("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function Se({source:e,isTextShown:t,title:o,width:n,height:r,imgSx:s}){let{t:i}=useTranslation(),a=h$1(e);return jsx(p,{title:o,children:t?jsx(op,{"data-testid":"SourceCell_BadgeTextWrapper",children:jsx(tp,{"data-testid":"SourceCell_TextLabel","data-source":e,children:i(Oe(e))})}):jsx(ep,{src:a,alt:e,width:n,height:r,onError:l=>{l.currentTarget.src=h$1("card");},sx:s})})}function Ou({payment:e,card:t,isTextShown:o,firstIcon:n}){let r=Sb(useId(),"source-icons"),{t:s}=useTranslation(),i=useCallback(()=>{let p=[],d=vb$1(e),m=e?.method,u=e?.scheme;return re(m)?.toLowerCase()===re(u)?.toLowerCase()?p.push(re(m),re(d)):p.push(re(m),re(d),re(u)),p},[e]),a=useMemo(()=>jsx(Se,{source:n,isTextShown:o,title:s(Oe(n))},n),[n,o,s]),l=useMemo(()=>i()?.filter(p=>!!p&&p!==n)?.map((p,d,m)=>{let u=e?.wallet===s("sv_wallet")?s("storedValueWallet"):s("passThruWallet"),C=d===m.length-1&&t?.last_four?`${s(Oe(p))} - ${t?.last_four}`:s(Oe(p));return jsx(Se,{source:p,isTextShown:o,title:d===0&&p==="Wallet"?u:C},`${p}-${d}`)}),[i,e,t,o,s,n]);return jsxs(Box,{id:r,"data-testid":"SourceIcons",display:"flex",alignItems:"center",gap:.5,children:[n&&a,l,t?.last_four&&jsxs(np,{children:["\xB7\xB7\xB7 ",t?.last_four]})]})}var Zt={PROCESSED:Vg,FAILED:""};var sp=styled$1("span")(({theme:e})=>({fontSize:"11px",padding:"2px 0",color:e.palette.text.primary})),lp=styled$1("img")(()=>({width:"16px",height:"16px"})),pp=styled$1("span")(()=>({width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"transparent",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}));function dp({status:e,isTextShown:t,isSheetViewShown:o}){let n=useTheme$1(),{t:r}=useTranslation(),s=Sb(useId(),"destination-icon"),i=r(Oe(e));return o&&Zt[e]?jsx(b$1,{copyTrigger:"click",copyText:i,children:i}):t&&Zt[e]?jsx(sp,{id:s,"data-testid":"ChargeStatusIcon_isTextShown","data-status":Oe(e),sx:{background:"#1F88D00D",color:e==="PROCESSED"?n.palette.info.dark:n.palette.common.black},children:i}):jsx(pp,{id:s,"data-testid":"DestinationIcon",className:"destination-status",children:e&&Zt[e]&&jsx(p,{title:r(Oe(e)),children:jsx(lp,{src:Zt[e],alt:"destination-icon"})})})}var cp="ListHeader";var mp=styled$1(Box)(({theme:e})=>({backgroundColor:e.palette.background.default,paddingInline:e.spacing(4),paddingBottom:e.spacing(2),paddingTop:e.spacing(2),overflowX:"clip"})),up=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%",marginBottom:e.spacing(2.25),marginTop:e.spacing(2)})),fp=styled$1(j)(({theme:e})=>({fontSize:"1.75rem",fontWeight:e.v2.typography.fontWeightMedium,lineHeight:"120%"})),Cp=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(3),width:"100%"})),gp=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:e.spacing(1)})),xp=styled$1(Box)(()=>({display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"8px",flexShrink:0}));function xn({children:e,component:t="header",...o}){return jsx(mp,{component:t,...o,children:e})}function yn({title:e,toolbar:t}){return jsxs(up,{children:[jsx("span",{children:!!e&&jsx(fp,{children:e})}),t]})}function hn({status:e,activeFilter:t,beforeStatus:o}){let n=t?.visible??false;return jsxs(gp,{as:"aside",children:[o,jsx(b$7,{value:e?.value,items:e?.options,onValueChange:e?.onChange&&(r=>e.onChange?.(r)),keepInactive:n,itemSx:e?.buttonSx}),jsx(d$1,{value:t?.ids,visible:n,label:t?.label,dismissible:t?.dismissible,isActive:t?.isActive??true,onDismiss:t?.onDismiss})]})}var wt=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:"4px",background:e.palette.common.white,padding:"8px",border:"1px solid",borderColor:e.palette.divider,gap:8,height:32,cursor:"pointer","&:hover":{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),In=styled$1(Box)(({theme:e})=>({background:e.palette.common.white,display:"flex",gap:e.spacing(1),alignItems:"center",color:e.palette.text.primary,fontSize:"11px",fontWeight:e.typography.fontWeightRegular,textTransform:"capitalize",position:"relative",transition:"0.5s",paddingRight:0,marginRight:0,"&:after":{content:'""',position:"absolute",left:-8,right:0,width:"100%",height:"100%",boxShadow:e.shadows[11],borderRadius:e.spacing(.5),paddingInlineStart:e.spacing(1),paddingTop:"9px",paddingBottom:"9px",paddingInlineEnd:"9px",zIndex:-1},"& > *:last-child":{marginRight:0,paddingRight:"6px"}})),Tt=styled$1(Box)(({theme:e})=>({background:e.palette.common.white,borderRadius:e.spacing(1),boxShadow:e.shadows[5],border:"1px solid",borderColor:e.palette.divider,zIndex:5,fontSize:"11px",width:192})),At=styled$1(Box)(()=>({minWidth:160,position:"relative",marginRight:0,paddingRight:0})),Pt=styled$1(Box,{shouldForwardProp:e=>e!=="addColumnViewEl"})(({theme:e})=>({padding:e.spacing(1),paddingInlineEnd:2,borderBottom:"1px solid",borderColor:e.palette.divider,display:"flex",alignItems:"center",height:32,cursor:"pointer",img:{height:12},".check-icon":{height:"auto",marginInlineEnd:e.spacing(1)},"&:hover":{color:e.palette.info.dark,fontWeight:e.typography.fontWeightBold},"&.add-column":{justifyContent:"space-between",paddingInlineEnd:e.spacing(1),position:"relative",border:"none",zIndex:5,borderBottom:"1px solid",borderColor:e.palette.divider,borderTopRightRadius:e.spacing(1),borderTopLeftRadius:e.spacing(1),"&:hover":{boxShadow:e.shadows[6]}}})),vt=styled$1(Box)(()=>({width:15})),to=styled$1(Box)(()=>({width:16})),bp=styled$1(Box)(({theme:e})=>({display:"flex",flexDirection:"column",height:"calc(100% - 32px)",backgroundColor:e.palette.background.paper,position:"relative"})),Sp=styled$1(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:16,paddingRight:16,paddingBottom:64})),wp=styled$1(Box)(()=>({padding:"24px 0",display:"flex",justifyContent:"space-between",alignItems:"center"})),Tp=styled$1(Box)(({theme:e})=>({border:"1px solid",borderColor:e.palette.divider,borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,minHeight:0})),Ap=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:e.palette.grey[50],cursor:"pointer","&:hover":{backgroundColor:e.palette.grey[100]}})),Pp=styled$1(Box,{shouldForwardProp:e=>e!=="isHovered"&&e!=="isDate"})(({theme:e,isHovered:t,isDate:o})=>({display:"flex",alignItems:"center",padding:"12px",borderBottom:"1px solid",borderColor:e.palette.divider,backgroundColor:t?e.palette.action.hover:e.palette.background.paper,cursor:o?"default":"grab","&:hover":{backgroundColor:o?e.palette.background.paper:e.palette.action.hover},"&:last-child":{borderBottom:"none"}})),Qr=styled$1(Box)(()=>({width:20,height:20,marginRight:8,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0})),ei=styled$1(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0})),vp=styled$1(Box)(({theme:e})=>({position:"absolute",bottom:0,left:0,right:0,height:35,borderTop:"1px solid",borderColor:e.palette.divider,background:"#F6F8FACC",backdropFilter:"blur(24px)"})),Ep=styled$1(Box)(({theme:e})=>({position:"absolute",bottom:12,right:16,padding:6,backgroundColor:e.palette.background.paper,border:"1px solid #9F9F9F29",borderRadius:"4px"})),bn=styled$1(Paper)(()=>({paddingTop:4,paddingBottom:4,minWidth:180,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",borderRadius:"8px"}));styled$1(Box)(()=>({display:"flex",alignItems:"center",padding:"8px 12px",cursor:"pointer"}));var Vp=styled$1(Button)(({theme:e})=>({color:e.palette.error.main,textTransform:"none",fontSize:10,fontWeight:500,borderRadius:"4px",border:`1px solid ${e.palette.divider}`,paddingLeft:8,paddingRight:8,paddingTop:4,paddingBottom:4,"&:hover":{backgroundColor:"transparent"}})),Mp=styled$1(Button)(({theme:e})=>({fontSize:9,fontWeight:600,borderRadius:4,paddingLeft:20,paddingRight:20,paddingTop:8,paddingBottom:8,height:28,textTransform:"none",backgroundColor:e.palette.info.dark,"&:hover":{backgroundColor:e.palette.info.dark},"&.Mui-disabled":{backgroundColor:e.palette.grey[300],color:e.palette.grey[500]}}));styled$1(TextField)(({theme:e})=>({"& .MuiFilledInput-root":{borderRadius:"8px",backgroundColor:e.palette.background.paper,border:"1px solid",borderColor:e.palette.divider,"&:hover":{backgroundColor:e.palette.background.paper},"&.Mui-focused":{backgroundColor:e.palette.background.paper},"&::before, &::after":{display:"none"}}}));var ti={display:"flex",alignItems:"center",justifyContent:"center",padding:0,width:14,height:14,minWidth:14,minHeight:14,flexShrink:0,"& .MuiSvgIcon-root":{width:16,height:16},"& img":{width:14,height:14}},Lp=styled$1(motion.div)(({theme:e})=>({position:"fixed",display:"flex",flexDirection:"column",maxHeight:"calc(100vh - 46px)",backgroundColor:e.palette.background.paper,boxShadow:"0px 8px 32px rgba(0, 0, 0, 0.15)",borderRadius:12,overflow:"hidden",boxSizing:"border-box"})),Rp=styled$1(Box)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),cursor:"pointer","&:hover":{backgroundColor:e.palette.action.hover}})),kp={p:0,width:14,height:14,minWidth:14,minHeight:14,"& .MuiSvgIcon-root":{width:16,height:16}},Dp=styled$1(Box)(()=>({minWidth:200,display:"flex",flexDirection:"column",maxHeight:"80vh",overflow:"hidden"})),Np=styled$1(Box)(()=>({flex:1,overflowY:"auto",paddingLeft:6,paddingRight:6,minHeight:0})),Bp=styled$1(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",gap:12,paddingTop:8,paddingBottom:8,paddingLeft:12,paddingRight:12,flexShrink:0,borderTop:"1px solid",borderColor:e.palette.divider})),Wp={fontSize:11,fontWeight:400,textTransform:"none",color:"text.primary",minWidth:80,height:38,borderRadius:"8px",border:"1px solid",borderColor:"divider"},Fp=e=>({fontSize:11,fontWeight:500,textTransform:"none",backgroundColor:"info.dark",minWidth:80,height:38,borderRadius:"8px",boxShadow:"none","&:hover":{backgroundColor:e.palette.info.dark}}),Op=styled$1("div",{shouldForwardProp:e=>e!=="sandboxMode"&&e!=="maximized"&&e!=="isDragging"})(({maximized:e,isDragging:t})=>({...!e&&{borderTopRightRadius:12,borderTopLeftRadius:12},...t&&{cursor:"move"},margin:0,position:"sticky",top:0,left:0,right:0,zIndex:1e3,background:"#eaeaea",backdropFilter:"blur(32px)"}));function ni(e,t){let[o,n]=useState(null),[r,s]=useState(null),i=useCallback(()=>{n(null),s(null);},[]),a=useCallback((p,d)=>{n(p.currentTarget),s(d);},[]),l=useCallback(()=>{r&&i();},[r,i]);return useEffect(()=>{e||(i(),t?.());},[e,t,i]),{subMenuAnchorEl:o,openSubMenuName:r,handleSubMenuClose:i,handleSubMenuOpen:a,handleMenuScroll:l}}function Zu(e){let t=e;for(;t&&t!==document.body;){let n=window.getComputedStyle(t).overflowY;if((n==="auto"||n==="scroll")&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement;}return document.documentElement}function ri(e){let t=useRef(false),o=useRef(null),n=useRef({x:0,y:0}),r=useRef(1),s=useRef(null),i=useRef(0),a=useRef(false),l=useCallback(()=>{o.current!==null&&(cancelAnimationFrame(o.current),o.current=null);},[]),p=useCallback((g,b)=>{a.current=true,window.dispatchEvent(new PointerEvent("pointermove",{bubbles:true,cancelable:true,pointerId:r.current,clientX:g,clientY:b+i.current,pointerType:"mouse",isPrimary:true})),a.current=false;},[]),d=useCallback(()=>{if(o.current!==null)return;let g=()=>{let b=s.current;if(!t.current||!b)return;let S=b.getBoundingClientRect(),{x:T,y:c}=n.current,x=c-S.top,I=S.bottom-c;if(x>0&&x<60){let h=(60-x)/60*15;b.scrollTop-=h,i.current-=h,p(T,c);}else if(I>0&&I<60){let h=(60-I)/60*15;b.scrollTop+=h,i.current+=h,p(T,c);}o.current=requestAnimationFrame(g);};o.current=requestAnimationFrame(g);},[p]),m=useCallback(g=>{a.current||(n.current={x:g.clientX,y:g.clientY},r.current=g.pointerId,t.current&&i.current!==0&&(g.stopImmediatePropagation(),p(g.clientX,g.clientY)));},[p]),u=useCallback(()=>{s.current=Zu(e.current),i.current=0,t.current=true,window.addEventListener("pointermove",m,{capture:true}),d();},[e,m,d]),C=useCallback(()=>{t.current=false,i.current=0,l(),window.removeEventListener("pointermove",m,{capture:true});},[m,l]);return useEffect(()=>()=>{t.current=false,l(),window.removeEventListener("pointermove",m,{capture:true});},[m,l]),{onDragStart:u,onDragEnd:C}}function ai({columns:e,setTableViews:t}){let o=useCallback(s=>{let i=s.map(a=>e.find(l=>l.name===a)).filter(a=>!!a);t?.(i);},[e,t]),n=useCallback(s=>{let i=e.map(a=>{if(a.name!==s)return a;let l=a.menuItems&&a.menuItems.length>0,p=!a.selected;if(!l)return {...a,selected:p};let d=a.menuItems?.map(m=>({...m,selected:p}));return {...a,selected:p,menuItems:d}});t?.(i);},[e,t]),r=useCallback((s,i)=>{let a=e.map(l=>{if(l.name!==s)return l;let p=l.menuItems?.map(m=>m.name===i?{...m,selected:!m.selected}:m),d=p?.some(m=>m.selected)??false;return {...l,menuItems:p,selected:d}});t?.(a);},[e,t]);return {reorderColumns:o,toggleColumnSelection:n,toggleSubmenuItem:r}}function li({column:e,index:t,openSubMenuName:o,toggleColumnSelection:n,handleSubMenuOpen:r,handleSubMenuClose:s}){let i=e.menuItems&&e.menuItems.length>0,a=o===e.name,l=t===0,p=useMemo(()=>!!(e.selected&&e.menuItems?.some(C=>C.selected)&&!e.menuItems?.every(C=>C.selected)),[e.selected,e.menuItems]),d=useCallback(()=>{n(e.name);},[n,e.name]),m=useCallback(C=>{i&&r(C,e.name);},[i,r,e.name]),u=useCallback(()=>{i||s();},[i,s]);return {isIndeterminate:p,hasSubmenuItems:i,isSubmenuOpen:a,isFirstItem:l,handleColumnClick:d,handleMouseEnter:m,handleMouseLeave:u}}var M=(e="")=>e.toLowerCase()==="date",ge=(e="")=>e.toLowerCase()==="index",Sn=(e,t="en")=>{let o=[];return e.forEach(n=>{n.columns.forEach(r=>{let s=r.name.find(a=>a.lang===t)?.text||r.name[0]?.text||r.code,i=r.fields?.length?r.fields.map(a=>({name:a.code,label:a.name?.find(l=>l.lang===t||l.lang==="")?.text||a.code,selected:a.default??false})):void 0;o.push({name:r.code,label:s,selected:M(r.code)?true:r.default??false,menuItems:i?.length?i:void 0});});}),o},ef=(e,t)=>{if(!t?.length)return [];let o=e==="sheet"?"sheet":"advanced",n=t.find(r=>r.code.toLowerCase()===o);return n?Sn([n]):[]},pi=(e,t,o="en")=>{let n=e.map((s,i)=>{let a=s.menuItems?.map(p=>({code:p.name,name:[{text:typeof p.label=="string"?p.label:p.name,lang:o||""}],default:p.selected??false})),l=typeof s.label=="string"?s.label:s.name;return {code:s.name,name:[{text:l,lang:o}],order:i+1,default:s.selected??false,...a?.length?{fields:a}:{}}});return {code:t==="sheet"?"Sheet":"Advanced",columns:n}},tf=e=>{let t=new Map;return e.forEach(o=>{o.layout.forEach(n=>{let r=t.get(n.code);if(r){let s=new Set(r.columns.map(i=>i.code));n.columns.forEach(i=>{s.has(i.code)||r.columns.push(i);});}else t.set(n.code,{...n,columns:[...n.columns]});});}),Array.from(t.values())};var of=(e,t,o=false)=>({label:e,id:`custom_${Date.now()}`,columns:t.map(n=>n.name),submenu:t,isCustom:true,default:o}),nf=(e,t)=>e.map(o=>({...o,default:o.id===t})),wn=e=>e.role??(e.default?"default":void 0),rt=e=>!!e.role||!!e.default,xe=e=>!rt(e),_p=e=>xe(e),no=e=>e.filter(_p).length,di=e=>e.filter(xe).length,Tn=(e,t="sheet",o="en")=>{let n=[],r=[],s;e.forEach(a=>{let l=t==="sheet"?"sheet":"advanced",p=a.layout.find(w=>w.code.toLowerCase()===l),d=p?Sn([p],o):[],m=a.id,u=Oa,C=Pa,g=d.some(w=>M(w.name))?d:[C,...d],b=g.findIndex(w=>M(w.name)),T=(b>0?[g[b],...g.filter(w=>!M(w.name))]:g).filter(w=>!ge(w.name)),c=[u,...T],x=wn(a),I=rt(a),h={id:m,label:a.name,role:x,isCustom:!I,selected:a.selected,default:!!a.default,columns:c.map(w=>w.name),submenu:c};I?(a.default&&!s&&(s=c),r.push(h)):n.push(h);});let i=r.find(a=>a.default)??r[0];return {customViews:n,defaultTemplates:r,defaultTemplateColumns:s,defaultTemplate:i}},ci=(e,t="sheet",o="en")=>{let{customViews:n,defaultTemplates:r,defaultTemplate:s}=Tn(e,t,o),i=[...r,...n];return {customViews:n,defaultTemplates:r,defaultTemplate:s,allTemplates:i}},An=(e,t)=>{let o=[];xe(e)?o=e.submenu??[]:o=e.submenu?.length?e.submenu:t;let n=Oa;if(!o.some(m=>M(m.name)))return [n,Pa,...o];let s=o.findIndex(m=>M(m.name)),i=s>=0?o[s]:Pa,a=o.filter(m=>!M(m.name)&&!ge(m.name)),l=[i,...a],p=l.some(m=>ge(m.name)),d=l.findIndex(m=>ge(m.name));if(p&&d>0){let m=l[d],u=l.filter(C=>!ge(C.name));return [m,...u]}return p&&d===0?l:[n,...l]},rf=(e,t)=>An(e,t).length>0,Vt=e=>e.filter(t=>!ge(t.name));var ce=e=>e.toLowerCase(),zp=e=>new Map(e.filter(t=>!M(t.name)).map(t=>[ce(t.name),t])),Up=(e,t)=>e.some(o=>ce(o)===ce(t)),mi=(e,t)=>({...e,selected:t.selected??false,menuItems:e.menuItems?.map(o=>{let n=t.menuItems?.find(r=>ce(r.name)===ce(o.name));return {...o,selected:n?.selected??false}})}),ro=e=>{if(!e.menuItems?.length)return {checked:e.selected??false,indeterminate:false};let t=e.menuItems.filter(o=>o.selected).length;return {checked:t>0,indeterminate:t>0&&t<e.menuItems.length}},fi=(e,t)=>e.map(o=>{if(o.name!==t)return o;let n=!o.selected,r=o.menuItems?.map(s=>({...s,selected:n}));return {...o,selected:n,menuItems:r}}),io=(e,t,o)=>e.map(n=>{if(n.name!==t)return n;let r=n.menuItems?.map(i=>i.name===o?{...i,selected:!i.selected}:i),s=r?.some(i=>i.selected)??false;return {...n,menuItems:r,selected:s}}),Ci=(e,t)=>e.map(o=>{if(M(o.name))return o;let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),gi=e=>{let t=e.filter(o=>!M(o.name));return t.length===0?false:t.every(o=>o.menuItems?.length?o.menuItems.every(n=>n.selected):o.selected)},xi=(e,t)=>e.filter(r=>!M(r.name)).some(r=>r.menuItems?.length?r.menuItems.some(s=>s.selected):r.selected)&&!t,yi=(e,t)=>e.trim().length>0&&e.length<=t,Q=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),hi=(e,t)=>e.map(o=>{if(o.name!==t)return o;if(M(o.name))return {...o,selected:true};let n=!o.selected,r=o.menuItems?.map(s=>({...s,selected:n}));return {...o,selected:n,menuItems:r}}),Ii=(e,t)=>e.map(o=>{if(M(o.name))return {...o,selected:true};let n=o.menuItems?.map(r=>({...r,selected:t}));return {...o,selected:t,menuItems:n}}),bi=e=>e.length===0?false:e.every(t=>t.menuItems?.length?t.menuItems.every(o=>o.selected):t.selected),Si=(e,t)=>e.length===0?false:e.some(n=>n.menuItems?.length?n.menuItems.some(r=>r.selected):n.selected)&&!t,ui=e=>e.map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),ao=(e,t)=>{if(e.length!==t.length)return false;let o=ui(e),n=ui(t);for(let r=0;r<o.length;r++){let s=o[r],i=n[r];if(s.name!==i.name||s.selected!==i.selected)return false;if(s.menuItems&&i.menuItems){if(s.menuItems.length!==i.menuItems.length)return false;for(let a=0;a<s.menuItems.length;a++)if(s.menuItems[a].name!==i.menuItems[a].name||s.menuItems[a].selected!==i.menuItems[a].selected)return false}else if(s.menuItems||i.menuItems)return false}return true},af=e=>e.filter(t=>!M(t.name)).map(t=>({...t,selected:t.selected??false,menuItems:t.menuItems?.map(o=>({...o,selected:o.selected??false}))})),wi=(e,t)=>{let o=e.filter(s=>!M(s.name)).map(s=>s.name),n=zp(t),r=[];for(let s of o){let i=e.find(l=>ce(l.name)===ce(s)),a=n.get(ce(s));a?r.push(i?mi(a,i):{...a,selected:false,menuItems:a.menuItems?.map(l=>({...l,selected:false}))}):i&&r.push(i);}for(let[,s]of n)if(!Up(o,s.name)){let i=e.find(a=>ce(a.name)===ce(s.name));r.push(i?mi(s,i):{...s,selected:false,menuItems:s.menuItems?.map(a=>({...a,selected:false}))});}return r},Ti=e=>e.filter(t=>!M(t.name)).map(t=>({...t,selected:false,menuItems:t.menuItems?.map(o=>({...o,selected:false}))})),Ai=(e,t)=>{let o=zp(e),n=t.filter(s=>!M(s.name)).map(s=>s.name),r=[];for(let s of n){let i=t.find(l=>ce(l.name)===ce(s)),a=o.get(ce(s));a&&i?r.push(mi(a,i)):a&&r.push({...a,selected:false,menuItems:a.menuItems?.map(l=>({...l,selected:false}))});}for(let[,s]of o)Up(n,s.name)||r.push({...s,selected:false,menuItems:s.menuItems?.map(i=>({...i,selected:false}))});return r};function Gp(e,t,o="en"){if(!e?.layout?.length)return [];let n=na$1(t)?"sheet":"advanced",r=e.layout.find(a=>a.code?.toLowerCase()===n);if(!r?.columns?.length)return [];let s=r.columns.map(a=>{let l=a.name?.find(d=>d.lang===o)?.text||a.name?.[0]?.text||a.code,p=a.fields?.length?a.fields.map(d=>({name:d.code,label:d.name?.find(m=>m.lang===o||m.lang==="")?.text||d.code,selected:d.default??false})):void 0;return {name:a.code,label:l,selected:M(a.code)?true:a.default??false,...p&&p.length>0&&{menuItems:p}}});return s.some(a=>M(a.name))?s:[{name:Pa.name,label:Pa.label,selected:true},...s]}var Pn=e=>{let t=e?.order;if(t==null)return 999;let o=Number(t);return Number.isFinite(o)?o:999};function vn(e){return {...e,layout:e.layout?.map(t=>({...t,columns:[...t.columns??[]]}))??[]}}function sf(e,t){let o=e.layout?.map(r=>({...r,columns:[...r.columns??[]].sort((s,i)=>Pn(s)-Pn(i))})),n=Gp(e,t);return {id:e.id,label:e.name,layout:o,submenu:n,columns:n.map(r=>r.name),role:wn(e),isCustom:xe(e),default:e.default}}var En=(e,t)=>{if(!e)return [];let o=e;if(e.layout&&Array.isArray(e.layout)&&e.layout.length>0){let n=ma$1(t)?"Advanced":"Sheet",r=e.layout.find(s=>{let i=s.code?.trim();return i===n||i?.toLowerCase()===n.toLowerCase()})||e.layout.find(s=>{let i=s.code?.trim()?.toLowerCase();return ma$1(t)?i==="default"||i==="advanced":i==="sheet"||i==="sheets"});if(r&&r.columns&&r.columns.length>0)return r.columns.map(i=>{let l=!!i.fields?.length&&i.fields.some(d=>d.default??false),p=(i.default??false)||l;return {code:i.code,name:i.name&&i.name.length>0?i.name:[{text:i.code,lang:"en"}],selected:p,sort_order:Pn(i),fields:i.fields?.map(d=>({code:d.code.toLowerCase(),type:"single",parameters:[{parameter:d.code.toLowerCase(),code:d.code.toLowerCase(),selected:d.default??false}]}))||[{code:i.code.toLowerCase(),type:"single",parameters:[{parameter:i.code.toLowerCase(),code:i.code.toLowerCase(),selected:i.default??false}]}]}}).sort((i,a)=>(i.sort_order??999)-(a.sort_order??999))}return o.submenu&&Array.isArray(o.submenu)&&o.submenu.length>0?o.submenu.map((r,s)=>{let i=r.name.toLowerCase(),a;r.menuItems&&r.menuItems.length>0?a=r.menuItems.filter(m=>m.selected):a=[{name:i,label:r.label||r.name,selected:true}];let l=a.length>0?a.map(m=>({parameter:m.name.toLowerCase(),code:m.name.toLowerCase()})):[{parameter:i,code:i}],p=a.length>1?"combined":"single";return {code:r.name,name:[{text:r.label||r.name,lang:"en"}],selected:r.selected,sort_order:s+1,fields:[{code:i,type:p,parameters:l}]}}):[]},lf=(e,t)=>{if(!e||!Array.isArray(e)||e.length===0)return [];let o=e?.find(n=>n.default)||e[0];return o?En(o,t):[]};function Pi(e,t,o){let n=e.findIndex(t);if(n===-1)return e;let r=[...e];return r[n]=o,r}function vi(e,t){let o=t?.name??e?.name??"",n=t?.layout,r=Array.isArray(n)?n[0]:n??null,i=[...e?.layout??[]];if(r){let a=r.code?.toLowerCase(),l=i.findIndex(p=>p.code?.toLowerCase()===a);l>=0?i[l]=r:i.push(r);}return {name:o,layout:i}}var Ei=e=>{let t=e;return t?!!(t.closest('[role="checkbox"]')||t.closest('input[type="checkbox"]')||t.closest('[class*="CheckboxWrapper"]')):false};var $p=e=>[...Ra[e]??Ra.default],pf=e=>Sa[e]??Sa.default,df=(e,t)=>({code:e,name:[{text:Qa[e],lang:"en"}],selected:true,sort_order:t}),cf=(e,t)=>e?.layout?.some(o=>$p(t).includes(o.code?.toLowerCase()??""))??false,Vi=(e,t,o)=>{let n=Sa[t],r=o?.layout?.find(i=>i.code?.toLowerCase()===n.toLowerCase()),s=r?{...r,columns:r.columns?.map(i=>({...i,name:i.name?.map(a=>({...a})),fields:i.fields?.map(a=>({...a,name:a.name?.map(l=>({...l}))}))}))??[]}:{code:n,columns:[]};return [e,s]};var Vn=({tableMode:e,templates:t,lang:o="en",mainDefaultTemplate:n})=>useMemo(()=>{let{customViews:r,defaultTemplates:s,defaultTemplate:i,allTemplates:a}=ci(t,e,o),p=(n?Tn([n],e,o).defaultTemplate:void 0)??i,d=p?.submenu?structuredClone(p.submenu):[],m=no(t);return {customViews:r,defaultTemplates:s,defaultTemplate:i,allTemplates:a,defaultColumns:d,customTemplateCount:m}},[t,e,o,n]);var Mn=({mode:e,onViewChange:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:s,defaultTemplate:i,allTemplates:a,customTemplateCount:l})=>{let[p,d]=useState(null),[m,u]=useState(false),[C,g]=useState(null),[b,S]=useState(false),[T,c]=useState(null),[x,I]=useState(null),[h,w]=useState(),[y,A]=useState(a.find(P=>P.selected)?.id??i?.id),L=useRef(a.find(P=>P.selected)?.id??i?.id),F=useCallback(P=>{let V=P.submenu?.filter(G=>G.selected)||[];return {...P,submenu:V,columns:V.map(G=>G.name)}},[]),Y=useCallback(P=>{L.current=P?.id,t?.(P?F(P):void 0);},[t,F]),R=useMemo(()=>y?a.find(P=>P.id===y):i,[a,y,i]),k=useMemo(()=>Q(R?.submenu||s),[R,s]),D=useMemo(()=>({id:y||i?.id||"default",label:R?.label||i?.label||"Default"}),[R,y,i?.id,i?.label]);useEffect(()=>{let P=a.find(pe=>pe.selected)?.id,V=i?.id,G=y?a.some(pe=>pe.id===y):false;if(!(y&&!G&&P!==y)){if(P&&P!==y){A(P);return}if(!y){A(P??V);return}G||A(P??V);}},[a,i?.id,y]),useEffect(()=>{!y||!R||R.id===y&&L.current!==y&&(L.current=y,t?.(F(R)));},[y,R,t,F]);let U=useCallback(P=>{d(V=>V?null:P.currentTarget);},[]),ie=useCallback(()=>{d(null);},[]),Ce=useCallback((P,V)=>{A(V?.id),Y(V),ie();},[ie,Y]),le=useCallback((P=false,V,G,pe)=>{l!=null&&l>=3||(g(null),S(P),c(V??null),I(G?.length?G:null),w(pe),u(true),d(null));},[l]),N=useCallback(P=>{let V=a.find(G=>G.id===P.id)??P;g(V),S(true),c(null),I(V.submenu?.length?Q(V.submenu):null),u(true);},[a]),Pe=useCallback(()=>{u(false),g(null),S(false),c(null),I(null),w(void 0);},[]);useEffect(()=>{if(!m||!C?.id)return;let P=a.find(V=>V.id===C.id);P&&(g(P),I(P.submenu?.length?Q(P.submenu):null));},[m,C?.id,a]);let dr=useCallback(async P=>{if(C){let V=C.id;await n?.(V,P),A(V);let G=a.find(pe=>pe.id===V)??C;Y(G),ie();}else {let V=await o?.({...P,sourceTemplateId:h});if(V?.id){A(V.id);let G=a.find(pe=>pe.id===V.id);Y(G??{id:V.id,label:V.name,isCustom:true,columns:P.selectedColumns.map(pe=>pe.name),submenu:P.selectedColumns});}}},[C,n,o,ie,a,Y,h]),cr=useCallback(async P=>{let V=a.find(G=>G.id===P);await r?.(V?.id??P),y===(V?.id??P)&&A(i?.id);},[a,r,y,i]);return {anchorEl:p,isCreateDialogOpen:m,editingView:C,selectedViewInfo:D,shouldUseCurrentState:b,selectedView:R,currentViewColumns:k,initialColumnsForCreate:T,availableColumnsForCreate:x,handleViewButtonClick:U,handleCloseViewDropdown:ie,handleSelectedViewInfo:Ce,handleOpenCreateDialog:le,handleOpenEditDialog:N,handleCloseCreateDialog:Pe,handleSaveView:dr,handleDeleteView:cr}};var Mt=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),s=useCallback((p,d)=>{r.current&&(clearTimeout(r.current),r.current=null),t(p),n(d);},[]),i=useCallback(()=>{r.current=setTimeout(()=>{t(null),n(null);},0);},[]),a=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]),l=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null),t(null),n(null);},[]);return {hoveredColumn:e,anchorEl:o,openSubmenu:s,closeSubmenu:i,cancelClose:a,forceClose:l}};var qp=()=>{let[e,t]=useState(null),[o,n]=useState(null),r=useRef(null),s=useCallback((l,p)=>{t(l),n(p);},[]),i=useCallback(()=>{t(null),n(null);},[]),a=useCallback(()=>{r.current&&(clearTimeout(r.current),r.current=null);},[]);return {hoveredNestedColumn:e,nestedSubmenuAnchorEl:o,openNestedSubmenu:s,closeNestedSubmenu:i,cancelNestedClose:a}};var Di=({open:e,availableColumns:t,defaultColumns:o,editingView:n,tableViews:r=[]})=>{let[s,i]=useState(()=>n?.label||""),[a,l]=useState([]),p=useRef(false),d=useRef([]),m=useRef(n?.label?.trim()||""),{hoveredColumn:u,anchorEl:C,openSubmenu:g,closeSubmenu:b,cancelClose:S}=Mt(),T=Oa,c=Pa;useEffect(()=>{if(!e){p.current=false;return}if(!p.current&&e)if(n){let D=n.submenu&&n.submenu.length>0?n.submenu:o,U=t.length>0?t:D,Ce=wi(D,U).filter(Pe=>!ge(Pe.name)&&!M(Pe.name)),le=[T,c,...Ce];l(le),d.current=Q(le);let N=n.label?.trim()||"";m.current=N,i(N);}else {let D=t.length>0?t:r,ie=(r&&r.length>0?Ai(D,r):Ti(D)).filter(le=>!ge(le.name)&&!M(le.name)),Ce=[T,c,...ie];l(Ce),d.current=Q(Ce),m.current="",i("");}else if(e&&n){let D=n.label?.trim()||"";i(D);}p.current=e;},[e,n?.id,n?.label,n?.submenu,t,o,r,T,c]);let x=useMemo(()=>a.map(k=>k.name),[a]),I=useMemo(()=>gi(a),[a]),h=useMemo(()=>xi(a,I),[a,I]),w=useMemo(()=>yi(s,20),[s]),y=useMemo(()=>{let k=s.trim()!==m.current,D=d.current.length>0&&!ao(a,d.current);return k||D},[s,a]);return {templateName:s,setTemplateName:i,selectedColumns:a,columnNames:x,allSelected:I,someSelected:h,isNameValid:w,hasChanges:y,hoveredColumn:u,anchorEl:C,openSubmenu:g,closeSubmenu:b,cancelClose:S,handleReorder:k=>{let D=k.filter(U=>!M(U)).flatMap(U=>a.find(ie=>ie.name===U)??[]);l([T,c,...D]);},handleColumnToggle:k=>{l(D=>fi(D,k));},handleSubItemToggle:(k,D)=>{l(U=>io(U,k,D));},handleSelectAll:()=>{l(k=>Ci(k,!I));},handleResetToDefault:()=>{d.current.length>0&&l(Q(d.current));}}};function Bi({templates:e,setTemplates:t,createTemplate:o,updateTemplate:n,deleteTemplate:r,tableMode:s,isTemplatesLoading:i,lang:a="en",mainDefaultTemplate:l}){let p=useMemo(()=>l??e.find(c=>c.default),[e,l]),d=e.find(c=>c.selected)?.id??p?.id,m=useCallback(c=>{t(x=>x.find(h=>h.selected)?.id===c?x:x.map(h=>({...h,selected:c?h.id===c:false})));},[t]),u=useCallback(async({name:c,layout:x,sourceTemplateId:I})=>{if(no(e)>=3)return;let h=e.find(L=>L.id===I)??e.find(L=>L.id===d)??p,w=Vi(x,s,h),y=await o({name:c,layout:w}),A=vn(y);return t(L=>[...L.filter(Y=>Y.id!==A.id).map(Y=>({...Y,selected:false})),{...A,selected:true}]),{id:y.id,name:y.name??""}},[o,t,s,p,e,d]),C=useCallback(async c=>{await r(c),t(x=>x.filter(I=>I.id!==c)),m(d===c?p?.id:d);},[r,t,p,m]),g=useCallback(async(c,x)=>{let I=e.find(L=>L.id===c),{name:h,layout:w}=vi(I,x),y=await n(c,{name:h,layout:w}),A=vn(y);t(L=>Pi(L,F=>F.id===c,A)),m(A.id);},[e,n,t,m]),b=useMemo(()=>({templates:e,onCreateCustomView:u,onEditCustomView:g,onDeleteCustomView:C,isLoading:i,mainDefaultTemplate:l}),[e,u,g,C,i,l]),S=useCallback(c=>{if(!p){m(void 0);return}if(!c?.id){m(p.id);return}if(rt(c)){m(c.id);return}let x=e.find(I=>I.id===c.id);if(x){m(x.id);return}xe(c)&&m(c.id);},[e,p,m]),T=useMemo(()=>{let c=e.find(I=>d?I.id===d:false)??p;if(!c)return [];let x=En(c,s);return x.length>0?x:[]},[s,e,d,p]);return {customViews:b,onViewChange:S,columnsView:T,selectedViewId:d}}function If({column:e,index:t,openSubMenuName:o,subMenuAnchorEl:n,toggleColumnSelection:r,toggleSubmenuItem:s,handleSubMenuOpen:i,handleSubMenuClose:a}){let{t:l}=useTranslation(),p=useTheme(),{isIndeterminate:d,hasSubmenuItems:m,isSubmenuOpen:u,isFirstItem:C,handleColumnClick:g,handleMouseEnter:b,handleMouseLeave:S}=li({column:e,index:t,openSubMenuName:o,toggleColumnSelection:r,handleSubMenuOpen:i,handleSubMenuClose:a}),T=c=>c?l(c)??mc(c):"";return jsxs(pa,{sx:{borderTop:`1px solid ${p.palette.divider}`,...C&&{borderTop:"none",height:33}},children:[jsxs(V,{isIndeterminate:d,isSelected:e.selected,onMouseEnter:b,onMouseLeave:S,onClick:g,children:[jsx(pa,{sx:{flex:1},children:T(e.label)}),m&&jsx("img",{src:xb$1,className:"arrow-icon",alt:"arrow"})]}),m&&jsx(R,{open:u,anchorEl:n,placement:"right-start",onMouseEnter:()=>{},onMouseLeave:a,children:e.menuItems?.map(c=>jsx(V,{isSelected:e.selected&&c.selected,onClick:()=>s(e.name,c.name),children:T(c.label)},c.name))})]},e.name)}var Zp=If;function Tf({open:e,onSelect:t,setTableViews:o,tableViews:n,anchorEl:r,onClose:s}){let{t:i}=useTranslation(),a=useMemo(()=>n||[],[n]),l=useMemo(()=>a.map(T=>T.name),[a]),{reorderColumns:p,toggleColumnSelection:d,toggleSubmenuItem:m}=ai({columns:a,setTableViews:o}),{subMenuAnchorEl:u,openSubMenuName:C,handleSubMenuClose:g,handleSubMenuOpen:b,handleMenuScroll:S}=ni(e,s);return jsxs(At,{"data-testid":"TableView_CustomViews",children:[jsxs(wt,{"data-testid":"TableView_CustomViews_Button",onClick:t,children:[jsx("div",{children:i("columns")}),jsx("img",{src:Eb,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsxs(R,{open:e,anchorEl:r,"data-testid":"TableView_CustomViews_Popper",sx:{padding:0,marginTop:"8px",borderRadius:1},children:[e&&jsx(B,{onClick:s}),jsx(Tt,{component:"article","data-testid":"TableView_CustomViews_List",children:jsx(Reorder.Group,{as:"div",axis:"y",onReorder:p,values:l,onScroll:S,children:a.map((T,c)=>jsx(Zp,{column:T,index:c,openSubMenuName:C,subMenuAnchorEl:u,toggleColumnSelection:d,toggleSubmenuItem:m,handleSubMenuOpen:b,handleSubMenuClose:g},T.name))})})]})]})}var Fi=memo(Tf);function Ef({open:e,selectedViewInfo:t,setSelectedViewInfo:o,onSelect:n,onTableViewOptionClick:r,anchorEl:s}){let{t:i}=useTranslation();return jsxs(At,{"data-testid":"TableView_DefaultViews",children:[jsxs(wt,{onClick:a=>{n(a);},children:[jsx("div",{children:t.label}),jsx("img",{src:Eb,alt:"arrow",style:{...!!e&&{transform:"rotate(180deg)"}}})]}),jsx(Pf,{open:e,anchorEl:s,placement:"bottom-start",children:jsxs(Tt,{children:[Va.map(a=>jsxs(Pt,{onClick:()=>{o(a),r?.(a);},children:[a.id===t.id?jsx("img",{className:"check-icon",src:Fb,alt:"arrow"}):jsx(vt,{}),jsx("span",{children:a.label}),jsx(to,{})]},a.id)),jsxs(Pt,{sx:{border:"none"},onClick:a=>{a.stopPropagation(),o(Ua),r?.(Ua);},children:[t.id===Ua.id?jsx("img",{className:"check-icon",src:Fb,alt:"arrow"}):jsx(vt,{}),jsx("span",{children:i("createCustomView")}),jsx(to,{})]})]})})]})}var Oi=zi.memo(Ef);function Rf({onViewChange:e,setIsViewVisible:t,setTableViews:o,tableViews:n,resetTableViews:r,onTableViewOptionClick:s}){let[i,a]=useState(null),[l,p$1]=useState(null),[d$1,m]=useState(null),[u,C$1]=useState(Ta),{t:g}=useTranslation(),b$1=x=>{e?.(),a(x.currentTarget),t(true);},S=()=>{p$1(null),m(null);},T=()=>{a(null),t(false),C$1(Ta);},c=x=>{C$1(x),x.id!==Ua.id&&r?.(x),S();};return i?jsx(Lf,{onClickAway:S,children:jsxs(In,{"data-testid":"TableView",children:[u.id===Ua.id&&jsx(Fi,{tableViews:n,setTableViews:o,anchorEl:d$1,open:!!d$1,onSelect:x=>{m(d$1?null:x.currentTarget),p$1(null);},onClose:()=>{m(null);}}),jsx(Oi,{open:!!l,anchorEl:l,setSelectedViewInfo:x=>{c(x);},selectedViewInfo:u,onSelect:x=>{p$1(l?null:x.currentTarget),m(null);},onTableViewOptionClick:s}),jsx(wt,{sx:{width:32,justifyContent:"center"},onClick:T,children:jsx("img",{src:Gb,alt:"close"})})]})}):jsx(p,{title:g("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"TableView_no_anchorViewEl",onClick:b$1,"aria-label":g("tableView")})})}var Hi=memo(Rf);var ed=({columns:e,allCurrentSelected:t,someCurrentSelected:o,onSelectAll:n,onReset:r,onColumnToggle:s,onNestedItemToggle:i,isModified:a=false})=>{let{hoveredNestedColumn:l,nestedSubmenuAnchorEl:p,openNestedSubmenu:d,closeNestedSubmenu:m,cancelNestedClose:u}=qp();return jsxs(Fragment,{children:[jsxs(Rp,{children:[jsx(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:jsx(f,{checked:t,indeterminate:o,onChange:C=>{C.stopPropagation(),n();},onClick:C=>{C.stopPropagation();},sx:kp})}),jsx(Typography,{component:"button",disabled:!a,onClick:C=>{C.stopPropagation(),a&&r();},sx:{fontSize:11,fontWeight:500,color:"#1F88D0",background:"none",border:"none",cursor:a?"pointer":"default",padding:0,opacity:a?1:.5,pointerEvents:a?"auto":"none","&:hover":a?{textDecoration:"underline"}:void 0},children:"Reset"})]}),jsx(v$1,{}),jsx(Np,{onScroll:m,children:jsx(Box,{component:"ul",sx:{listStyle:"none",padding:0,margin:0},children:e.map((C,g)=>{let b=C.menuItems&&C.menuItems.length>0,{checked:S,indeterminate:T}=ro(C),c=M(C.name);return jsxs(Box,{component:"li",sx:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%"},children:[jsxs(Box,{sx:{position:"relative"},onMouseEnter:x=>b&&d(C.name,x.currentTarget),onMouseLeave:()=>b&&m(),children:[jsxs(Box,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[jsx(V,{isSelected:b?S:C.selected,isIndeterminate:b?T:false,isDisabled:c,onClick:()=>{c||s(C.name);},sx:{flex:1,display:"flex",alignItems:"center"},children:jsx("span",{children:C.label||C.name})}),b&&jsx(Box,{sx:{display:"flex",alignItems:"center",pr:1,pointerEvents:"none"},children:jsx("img",{src:yb,alt:"arrow",style:{height:12}})})]}),b&&jsx(Popper,{open:l===C.name,anchorEl:p,placement:"right-start",sx:{zIndex:1e4},children:jsxs(Box,{onMouseEnter:u,onMouseLeave:m,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(bn,{children:C.menuItems?.map((x,I)=>jsxs(zi.Fragment,{children:[jsx(V,{isSelected:x.selected,isDisabled:c,onClick:()=>{c||i(C.name,x.name);},children:x.label||x.name}),I<(C.menuItems?.length??0)-1&&jsx(v$1,{})]},x.name))})]})})]}),g<e.length-1&&jsx(v$1,{})]},C.name)})})})]})};function zf({open:e,selectedViewInfo:t,setSelectedViewInfo:o,anchorEl:n,onClose:r,onCreateCustomView:s,customViews:i=[],onEditCustomView:a,defaultColumns:l=[],defaultTemplate:p$1,defaultTemplates:d=[],customTemplateCount:m,isLoading:u}){let{t:C}=useTranslation(),{hoveredColumn:g,anchorEl:b,openSubmenu:S,closeSubmenu:T,cancelClose:c,forceClose:x}=Mt(),[I,h]=zi.useState(null),[w,y]=zi.useState(null),A=useMemo(()=>[...d.length?d:p$1?[p$1]:[],...i],[d,p$1,i]),L=useCallback(E=>E.submenu?.length?E.submenu:l,[l]),F=useCallback(E=>E?An(E,L(E)):l,[l,L]),Y=useCallback(E=>F(E).length>0,[F]),R$1=useMemo(()=>g?A.find(E=>E.id===g):void 0,[g,A]),k=useMemo(()=>F(R$1),[R$1,F]),D=useMemo(()=>g?w?.length?w:k:[],[g,k,w]),U=useMemo(()=>bi(D),[D]),ie=useMemo(()=>Si(D,U),[D,U]),Ce=w!=null&&!ao(w,k),le=(m??di(i))>=3,N=u||le,Pe=N||!Ce;function dr(E){x(),y(null);let j;if(rt(E)){let me=E.submenu?.length?E.submenu:l.length?l:p$1?.submenu??[];j={...E,submenu:Q(me),columns:me.map(Ie=>Ie.name)};}else xe(E)&&(j=E);o(E,j);}function cr(E,j){let me=A.find(Ie=>Ie.id===E);y(Q(F(me))),S(E,j);}function P(){y(null),T(),x();}function V(E){if(E.stopPropagation(),Pe)return;let j=Q(k),me=w?.length?Q(w):j;s?.(true,me,j,R$1?.id),y(null),x();}function G(E){w&&y(hi(w,E));}function pe(E,j){w&&y(io(w,E,j));}function om(){w&&y(Ii(w,!U));}function nm(){y(Q(k));}return jsxs(At,{"data-testid":"ViewsDropdown",children:[jsx(Pf,{open:e,anchorEl:n,placement:"bottom-start",children:jsxs(Tt,{onScroll:x,children:[jsx(_f,{sx:{paddingX:1.25,py:1.1,fontWeight:500,fontSize:11,color:"#8D8D94"},children:"View"}),jsx(v$1,{}),A.map(E=>{let j=xe(E),me=!j&&Y(E);return jsxs(Pt,{onMouseEnter:Ie=>{j?h(E.id):me&&cr(E.id,Ie.currentTarget);},onMouseLeave:()=>{j?h(null):me&&T();},onClick:()=>dr(E),sx:{position:"relative",cursor:"pointer",pr:1.5},children:[E.id===t.id?jsx("img",{style:{width:15,height:15},src:Zj,alt:"check"}):jsx(vt,{}),jsx("span",{style:{flex:1,fontSize:11},children:E.label}),j&&I===E.id&&jsx("img",{src:Dh,alt:"edit",style:{width:12,height:12,cursor:"pointer"},onClick:Ie=>{Ie.stopPropagation(),r?.(),a?.(E);}}),me&&jsx("img",{src:yb,alt:"arrow",style:{height:12}})]},E.id)}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"left",disableHoverListener:!le,children:jsxs(Pt,{sx:{border:"none",opacity:N?.5:1,cursor:N?"not-allowed":"pointer"},onClick:E=>{if(E.stopPropagation(),N)return;let j=Q(F(p$1)),me=j.map(Ie=>({...Ie,selected:false,menuItems:Ie.menuItems?.map(rm=>({...rm,selected:false}))}));s?.(true,me,j,p$1?.id),x();},children:[jsx(vt,{}),jsxs(pa,{sx:{display:"flex",alignItems:"center",gap:.5},children:[jsx("img",{src:im,alt:"",style:{opacity:N?.5:1,width:10,height:10}}),jsx("span",{style:{color:N?"#999":"#1F88D0",fontSize:11,fontWeight:500},children:C("New Custom View")})]}),jsx(to,{})]})})]})}),g&&b&&D.length>0&&jsx(R,{open:!!b,anchorEl:b,placement:"auto-end",onMouseEnter:c,onMouseLeave:P,children:jsxs(Dp,{children:[jsx(ed,{columns:Vt(D),allCurrentSelected:U,someCurrentSelected:ie,onSelectAll:om,onReset:nm,onColumnToggle:G,onNestedItemToggle:pe,anchorEl:b,isModified:Ce}),jsxs(Bp,{children:[jsx(td,{variant:"text",onClick:P,sx:Wp,children:"Cancel"}),jsx(p,{title:"Limit reached. Delete a view to create a new one.",placement:"top",disableHoverListener:!le,children:jsx(td,{variant:"contained",onClick:V,disabled:Pe,sx:Fp,children:"Create view"})})]})]})})]})}var Ui=zi.memo(zf);var rd=({selectedColumns:e,columnNames:t,allSelected:o,someSelected:n,hoveredColumn:r,anchorEl:s,onReorder:i,onColumnToggle:a,onSubItemToggle:l,onSelectAll:p,onResetToDefault:d,onSubmenuEnter:m,onSubmenuLeave:u,onCancelClose:C$1})=>{let g=useRef(null),{onDragStart:b,onDragEnd:S}=ri(g),T=useCallback(c=>{if(Ei(c.target)){c.preventDefault();return}b();},[b]);return jsxs(Tp,{children:[jsxs(Ap,{children:[jsx(Qr,{children:jsx("img",{src:C,alt:"drag",style:{width:16,height:16,opacity:.5}})}),jsx(ei,{onClick:c=>{c.stopPropagation(),p();},children:jsx(f,{checked:o,indeterminate:n,size:"small",sx:ti,onChange:c=>{c.stopPropagation(),p();},onClick:c=>{c.stopPropagation();}})}),jsx(Typography,{onClick:c=>{c.stopPropagation(),p();},sx:{flex:1,fontSize:13,fontWeight:500,color:"text.primary",ml:.75,cursor:"pointer"},children:"Select All"}),jsx(Link,{component:"button",type:"button",onClick:c=>{c.stopPropagation(),d();},underline:"none",sx:{fontSize:13,fontWeight:500,cursor:"pointer",color:"common.blue"},children:"Reset to default"})]}),jsx(Box,{sx:{flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto",position:"relative"},children:jsx(Reorder.Group,{ref:g,axis:"y",onReorder:i,values:t,style:{listStyle:"none",padding:0,margin:0},children:e.map(c=>{let x=M(c.name),I=c.menuItems&&c.menuItems.length>0,{checked:h,indeterminate:w}=ro(c);return jsxs(Reorder.Item,{value:c.name,drag:x?false:"y",dragListener:!x,dragConstraints:g,dragElastic:{top:0,bottom:0,left:0,right:0},transition:{duration:0},whileDrag:{zIndex:9999,boxShadow:"0 4px 12px rgba(0,0,0,0.15)",scale:1},style:{listStyle:"none",margin:0,padding:0,position:"relative",zIndex:1,backgroundColor:"#fff",width:"100%",willChange:"transform"},onDragStart:T,onDragEnd:S,children:[jsxs(Pp,{isHovered:r===c.name,isDate:x,onMouseEnter:y=>I&&m(c.name,y.currentTarget),onMouseLeave:()=>I&&u(),onClick:y=>{(y.target.closest('[role="checkbox"]')||y.target.closest('input[type="checkbox"]'))&&y.stopPropagation();},sx:{width:"100%",position:"relative"},children:[jsx(Qr,{children:jsx("img",{src:Hb,alt:"drag",draggable:false,style:{width:16,height:16,cursor:x?"default":"grab",pointerEvents:"none"}})}),jsx(ei,{onMouseDown:y=>{y.stopPropagation();},onPointerDown:y=>{y.stopPropagation();},children:jsx(f,{checked:h,indeterminate:w,onChange:y=>{y.stopPropagation(),a(c.name);},onClick:y=>{y.stopPropagation();},disabled:x,size:"small",sx:ti})}),jsx(Typography,{sx:{flex:1,fontSize:13,fontWeight:400,color:"text.primary",ml:1},children:c.label||c.name}),I&&jsx(Box,{sx:{display:"flex",alignItems:"center",ml:1,flexShrink:0},children:jsx("img",{src:xb$1,alt:"arrow",style:{width:12,height:12}})})]}),I&&jsx(Popper,{open:r===c.name,anchorEl:s,placement:"right-start",sx:{zIndex:1e4},modifiers:[{name:"offset",options:{offset:[0,0]}}],children:jsxs(Box,{onMouseEnter:C$1,onMouseLeave:u,sx:{display:"flex",pl:.5},children:[jsx(Box,{sx:{width:8,height:"100%",position:"absolute",left:-8,top:0,bottom:0}}),jsx(bn,{children:c.menuItems?.map((y,A)=>jsxs(zi.Fragment,{children:[jsx(V,{isSelected:y.selected,isDisabled:x,onClick:()=>{x||l(c.name,y.name);},sx:{fontSize:13},children:y.label||y.name}),A<(c.menuItems?.length??0)-1&&jsx(v$1,{})]},y.name))})]})})]},c.name)})})})]})};function Xf({open:e,onClose:t,onCreate:o,availableColumns:n=[],defaultColumns:r=[],editingView:s,onDelete:i$1,tableViews:a=[],mode:l="sheet",stackOrder:p=1}){let{t:d}=useTranslation(),m=useDragControls(),[u,C]=useState(false),[g,b]=useState(false);useEffect(()=>{e||(C(false),b(false));},[e]),useEffect(()=>{if(!e)return;let N=Pe=>{Pe.key==="Escape"&&t();};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[e,t]);let{templateName:S,setTemplateName:T,selectedColumns:c$1,allSelected:x,someSelected:I,isNameValid:h$1,hasChanges:w,hoveredColumn:y,anchorEl:A,openSubmenu:L,closeSubmenu:F,cancelClose:Y,handleReorder:R,handleColumnToggle:k,handleSubItemToggle:D,handleSelectAll:U,handleResetToDefault:ie}=Di({open:e,availableColumns:n,defaultColumns:r,editingView:s,tableViews:a}),Ce=async()=>{if(!(!h$1||!w||g||u)){b(true);try{let N=pi(c$1,l);await o?.({name:S,selectedColumns:c$1,layout:N}),t();}catch{console.warn("Failed to create view");}finally{b(false);}}},le=async()=>{if(!s||u||g)return;let N=s.id;C(true);try{await i$1?.(N),t();}catch{console.warn("Failed to delete view");}finally{C(false);}};return e?jsxs(Lp,{role:"dialog","aria-modal":"true","data-testid":"CreateViewDialog",drag:true,dragListener:false,dragControls:m,dragMomentum:false,initial:false,style:{width:450,minWidth:0,maxWidth:"min(100vw - 16px, 450px)",height:600,left:`max(8px, calc(50% - ${450/2}px))`,top:`max(8px, calc(50% - ${600/2}px))`},animate:{zIndex:2+p},transition:{duration:.1},children:[jsx(Op,{id:"draggable-dialog-title",onPointerDown:N=>m.start(N),style:{cursor:"move",flexShrink:0},children:jsxs(b$3,{children:[jsx(h,{children:jsx(c,{onClick:t,onPointerDown:N=>N.stopPropagation()})}),jsx(j$1,{title:s?"Edit Custom View":d("createCustomView")||"Create Custom View"}),jsx(i,{})]})}),jsxs(bp,{children:[jsxs(Sp,{onScroll:()=>{F();},children:[jsxs(wp,{children:[jsxs(Box,{children:[jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#9F9F9F",lineHeight:"0.7"},children:"Custom"}),jsx(Typography,{sx:{fontSize:24,fontWeight:700,color:"#20232B",lineHeight:1.2},children:"View"})]}),s&&jsx(Vp,{onClick:le,disabled:u||g,children:u?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:"Deleting..."})]}):"Delete View"})]}),jsx(Box,{sx:{mb:3},children:jsx(b$4,{name:"custom-template-name",label:"Template Name",value:S,onChange:N=>T(N),inputProps:{maxLength:20,autoComplete:"off",readOnly:true,"data-form-type":"other",onFocus:N=>N.currentTarget.removeAttribute("readonly")},required:true})}),jsx(rd,{selectedColumns:Vt(c$1),columnNames:Vt(c$1).map(N=>N.name),allSelected:x,someSelected:I,hoveredColumn:y,anchorEl:A,onReorder:R,onColumnToggle:k,onSubItemToggle:D,onSelectAll:U,onResetToDefault:ie,onSubmenuEnter:L,onSubmenuLeave:F,onCancelClose:Y})]}),jsx(vp,{}),jsx(Ep,{children:jsx(Mp,{variant:"contained",onClick:Ce,disabled:!h$1||!w||g||u,title:h$1?void 0:`Name is required. Current: "${S}"`,children:g?jsxs(Box,{sx:{display:"flex",alignItems:"center",gap:1},children:[jsx(CircularProgress,{size:14,color:"inherit"}),jsx("span",{children:s?"Saving...":"Creating..."})]}):s?"Update View":"Create View"})})]})]}):null}var Gi=Xf;function eC({onViewChange:e,templates:t,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,tableMode:s="default",lang:i="en",isLoading:a,mainDefaultTemplate:l}){let{t:p$1}=useTranslation(),{defaultColumns:d$1,defaultTemplate:m,defaultTemplates:u,customViews:C$1,allTemplates:g,customTemplateCount:b$1}=Vn({tableMode:s,templates:t,lang:i,mainDefaultTemplate:l}),{anchorEl:S,isCreateDialogOpen:T,editingView:c,selectedViewInfo:x,shouldUseCurrentState:I,currentViewColumns:h,initialColumnsForCreate:w,availableColumnsForCreate:y,handleViewButtonClick:A,handleCloseViewDropdown:L,handleSelectedViewInfo:F,handleOpenCreateDialog:Y,handleOpenEditDialog:R,handleCloseCreateDialog:k,handleSaveView:D,handleDeleteView:U}=Mn({mode:s,onViewChange:e,onCreateCustomView:o,onEditCustomView:n,onDeleteCustomView:r,defaultColumns:d$1,defaultTemplate:m,allTemplates:g,customTemplateCount:b$1});return jsxs(Fragment,{children:[jsx(Lf,{onClickAway:L,children:jsxs(In,{sx:{width:"32px"},"data-testid":"ViewsMenu",children:[jsx(p,{title:p$1("tableView"),children:jsx(b,{variant:"secondary",size:"md",icon:jsx(d,{src:C,alt:"view",sx:{width:14,height:14}}),"data-testid":"ViewsMenu_button",onClick:A,"aria-label":p$1("tableView")})}),jsx(Ui,{open:!!S,anchorEl:S,onClose:L,setSelectedViewInfo:F,selectedViewInfo:x,onCreateCustomView:Y,customViews:C$1,onEditCustomView:R,defaultColumns:d$1,defaultTemplate:m,defaultTemplates:u,customTemplateCount:b$1,isLoading:a})]})}),jsx(Gi,{open:T,onClose:k,availableColumns:y?.length?y:d$1,defaultColumns:d$1,onCreate:D,editingView:c,onDelete:U,tableViews:I?w??h:void 0,mode:s})]})}var dd=memo(eC);function $i(){let[e,t]=useState(false);return {isColumnPickerVisible:e,setIsColumnPickerVisible:t}}function co({children:e,component:t="aside",...o}){return jsx(xp,{component:t,"data-testid":"ListHeaderToolbar",...o,children:e})}function Wn({display:e,views:t,search:o,slots:n,reportsVisible:r,lang:s}){let{isColumnPickerVisible:i,setIsColumnPickerVisible:a}=$i(),l=e?.variant==="acceptance",p=t?.tableMode??"default",d=useMemo(()=>t?.onSheetToggle?jsx(b$5,{tableMode:p,onToggle:t.onSheetToggle}):null,[p,t?.onSheetToggle]);return jsxs(co,{children:[n?.leading&&!i&&n.leading,!i&&jsxs(Fragment,{children:[o?.onChange&&jsx(b$6,{onSearchChange:o.onChange,placeholder:o.placeholder,defaultValue:o.defaultValue}),n?.filter,d&&!l&&d,n?.calendar,r&&n?.reports,d&&l&&d]}),t?.onViewChange&&(t.templates?jsx(dd,{onViewChange:t.onViewChange,tableMode:p,lang:s,...t.templates}):jsx(Hi,{onViewChange:t.onViewChange,setIsViewVisible:a,tableViews:t.columns,setTableViews:t.setColumns,resetTableViews:t.onPresetReset,onTableViewOptionClick:t.onPresetOptionClick})),n?.trailing&&!i&&n.trailing]})}function lC({title:e,display:t,lang:o,reportsVisible:n,status:r,activeFilter:s,views:i,search:a,slots:l,children:p}){let d=useMemo(()=>jsx(Wn,{display:t,views:i,search:a,slots:l,reportsVisible:n,lang:o}),[t,i,a,l,n,o]);return jsxs(xn,{"data-testid":cp,children:[t?.maximized&&jsx(yn,{title:e,toolbar:d}),jsxs(Cp,{as:"section",children:[jsx(hn,{status:r,activeFilter:s,beforeStatus:l?.beforeStatus}),!t?.maximized&&d]}),p]})}var ud=memo(lC);var fd=styled("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",gap:e.spacing(1)})),Cd=styled("span")(({theme:e,tableMode:t})=>({backgroundColor:e.palette.grey[100],display:"block",borderRadius:"4px",padding:"1.5px 3px",fontSize:na$1(t)?"11px":"10px",lineHeight:"13px",textTransform:"uppercase",fontWeight:e.typography.fontWeightBold})),gd=styled("span")(({theme:e,tableMode:t})=>({fontSize:na$1(t)?"11px":e.typography.body2.fontSize,lineHeight:"17px",fontWeight:"700"})),ji=styled("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"})),Fn=styled("div")(({theme:e,count:t})=>({justifyContent:"space-between",display:"flex",width:"100%",gap:(t||1)<=1?e.spacing(1.5):e.spacing(1)}));var PV=({type:e,selectAmount:t,selectCurrency:o,requestAmount:n,requestCurrency:r,merchantAmount:s,merchantCurrency:i})=>{let a=ca(t,o),l=ca(n,r),p=ca(s,i);return jsxs(ji,{sx:{textAlign:"right",justifyContent:"flex-end"},children:[jsx("span",{style:{fontWeight:"bold"},children:e?Z[e]:""}),jsxs(ji,{children:[e!=="fx"&&jsxs(Fn,{children:[jsx("span",{children:"Customer Selected"})," ",jsxs("span",{children:[jsx(b$9,{currency:o})," ",a.integerAmount,".",a.decimalAmount]})]}),jsxs(Fn,{children:[jsx("span",{children:"Charge"})," ",jsxs("span",{children:[jsx(b$9,{currency:r})," ",l.integerAmount,".",l.decimalAmount]})]}),jsxs(Fn,{children:[jsx("span",{children:"Settlement"})," ",jsxs("span",{children:[jsx(b$9,{currency:i})," ",p.integerAmount,".",p.decimalAmount]})]})]})]})};var yd=({tableMode:e,conversionType:t})=>t?jsx(Cd,{tableMode:e,className:"conversion-type",children:t}):jsx(Fragment,{});var hd=({tableMode:e,amount:t,currency:o})=>jsx(gd,{tableMode:e,children:t!==void 0?jsxs(Fragment,{children:[jsx("span",{children:jsx(b$9,{currency:o,fontSize:10})})," ",jsx(b$a,{amount:t,currency:o,sx:{fontSize:"inherit",fontWeight:"inherit"}})]}):jsx("span",{children:"-"})});var Id="default";function uC({conversionType:e,amount:t,currency:o,tooltipLabel:n,amountTooltipLabel:r,...s}){return jsx(v,{...s,children:jsxs(fd,{children:[jsx(p,{title:n||"",children:jsx(Box,{children:jsx(yd,{tableMode:Id,conversionType:e})})}),o&&jsx(p,{title:jsx(b$9,{currency:o}),children:jsx(b$8,{currencyCode:o})}),jsx(p,{title:r,children:jsx(hd,{tableMode:Id,amount:t,currency:o})})]})})}var fC=uC;var bd=e=>e?Object.keys(e).filter(t=>e[t]).reduce((t,o)=>(t[o]=e[o],t),{}):{};var On=({statuses:e,centerIconKey:t})=>{let o=useMemo(()=>bd(e),[e]),n=useMemo(()=>Object.values(o).filter(Boolean),[o]),r=useMemo(()=>{if(!t)return 0;let s=Object.entries(o).findIndex(([i])=>i===t);return s===-1?Math.floor((n.length-1)/2):s},[o,t,n.length]);return {statusesList:n,centerIconIndex:r}};function xC({statuses:e,centerIconKey:t,...o}){let{statusesList:n}=On({statuses:e,centerIconKey:t}),r=useTheme(),s=n.length||0;return jsx(v,{...o,"data-testid":"StatusCell",sx:{position:"relative",overflow:"visible"},children:jsx(ql,{whileHover:"animate",animate:"start",statusesCount:s,children:n.map((i,a)=>i?jsx(jl,{order:a,variants:$l(a,r.shadows[4],40),children:jsx(Yl,{children:i})},a):null)})})}var yC=xC;function IC({statuses:e,...t}){let{statusesList:o}=On({statuses:e});return jsx(v,{...t,children:jsx(Kl,{sx:{paddingRight:"30px"},children:o.map((n,r)=>jsx(Fragment$1,{children:n},r))})})}var bC=IC;var PC=styled$1(Menu)(()=>({zIndex:2e3,".MuiMenu-paper":{borderRadius:4},".MuiMenu-list":{padding:0}})),vC=styled$1(MenuItem)(({theme:e})=>({display:"flex",gap:"4px",minHeight:"36px",alignItems:"center",paddingInline:8,"&:hover":{backgroundColor:"transparent",boxShadow:e.shadows[10]}})),EC=styled$1(ListItemIcon)(()=>({minWidth:"16px !important"})),VC=styled$1(ListItemText)(()=>({".MuiTypography-root":{fontSize:"0.6875rem"}})),zn=({id:e="ActionCellMenu",open:t,anchorEl:o,onClose:n,items:r})=>jsx(PC,{id:e,"data-testid":"ActionCellMenu",open:t,anchorEl:o,onClose:n,onContextMenu:s=>{s.preventDefault(),n();},children:r.map((s,i)=>jsxs(vC,{onClick:a=>{s.onClick?.(a);},onContextMenu:s.onContextMenu,children:[s.icon&&jsx(EC,{children:s.icon}),jsx(VC,{children:s.label})]},`${s.label}-${i}`))});var Gn=styled("section",{shouldForwardProp:e=>e!=="tableMode"})(({theme:e,tableMode:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",textAlign:"center",borderRadius:"50%",gap:na$1(t)?"4px":e.spacing(1),overflow:"visible"})),$n=styled("span")(({selected:e})=>({overflow:"visible",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",position:"relative","&:hover":{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},...e&&{boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.18);"},span:{flexGrow:1}})),Sd=styled("img",{shouldForwardProp:e=>e!=="isActive"})(({isActive:e})=>({width:"18px",height:"18px",...!e&&{pointerEvents:"none",filter:"opacity(0.3)"}})),he=styled(motion.img)(({icon:e})=>({width:"13.3px",height:"13.3px",...e==="cancel"&&{padding:"1.15px"}}));function wd({isAnyActionLoading:e,isAnyActionHasError:t,isAnyActionSuccessful:o,areThereAnyShownActions:n}){let{t:r}=useTranslation();return t?jsx(he,{src:jc$1,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"fail-icon"):o?jsx(he,{src:kc$1,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},"success-icon"):e?jsx(he,{src:hc$1,className:"spinner-loader"},"spinner-icon"):jsx(p,{title:r("moreActions"),children:jsx(Sd,{alt:"more",src:ma,isActive:n},"ellipsis-icon")})}wd.displayName="ActionIconsVariants";var Co=memo(wd);var Nt={GRAY:{icon:Bb,color:"#CFCFCF"},ORANGE:{icon:zb,color:"#FFD503"},RED:{icon:Cb,color:"#FF0000"}},Yn={"#CFCFCF":"gray","#FFD503":"orange","#FF0000":"red",gray:"gray",red:"red",orange:"orange"},jn={flag:E,dispute:F,refund:rk,void:Ak,capture:ja,cancel:ik,clock:Ve,reverse:Vh,destination:Pg,invoice:Eh,users:Di$1,brand:Ci$1,clipboard:Ei$1,viewApi:Xd$1,viewReceipt:rc$1,delete:Fj};function qn({actions:e,isDropdownShown:t,onCloseDropdown:o,renderDropdown:n}){let[r,s]=useState(null),i=!!r,a=(e||[]).filter(g=>g.isVisible!==false),l=a.some(g=>g.isLoading),p=a.some(g=>g.isError),d=a.some(g=>g.isSuccess),m=a.length>0||!!n,u=g=>{l||!m||s(g.currentTarget);},C=()=>{s(null),o?.();};return useEffect(()=>{t||s(null);},[t]),{anchorEl:r,open:i,filteredActions:a,isAnyActionLoading:l,isAnyActionHasError:p,isAnyActionSuccessful:d,areThereAnyShownActions:m,handleClick:u,handleClose:C,setAnchorEl:s}}var Td=e=>jsx(BC,{sx:{height:12.6,width:13},...e,children:jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"11",height:"13",viewBox:"2.67 1.07 10.66 12.66",fill:"none",children:jsxs("g",{transform:"translate(-4 -4)",children:[jsx("path",{d:"M7.5918 15.166C7.5918 16.4041 8.5959 17.4072 9.83398 17.4072H15.5273L15.334 17.6973C15.101 18.0473 14.7079 18.2577 14.2871 18.2578H9.83398C8.12641 18.2578 6.74219 16.8736 6.74219 15.166V8.71289C6.74219 8.2923 6.9526 7.89944 7.30273 7.66602L7.5918 7.47266V15.166ZM10.167 5.74121H15.5C16.4651 5.74121 17.2586 6.534 17.2588 7.49902V14.833C17.2586 15.798 16.4651 16.5908 15.5 16.5908H10.167C9.20193 16.5908 8.40838 15.798 8.4082 14.833V7.49902C8.40838 6.534 9.20193 5.74121 10.167 5.74121ZM10.167 6.59082C9.6596 6.59082 9.25896 6.99168 9.25879 7.49902V14.833C9.25896 15.3404 9.6596 15.7412 10.167 15.7412H15.5C16.0074 15.7412 16.408 15.3404 16.4082 14.833V7.49902C16.408 6.99168 16.0074 6.59082 15.5 6.59082H10.167Z",fill:"#20232B",stroke:"white",strokeWidth:"0.15"}),jsx("path",{d:"M10.7598 12.84V9H11.4851V12.84H10.7598Z",fill:"black"}),jsx("path",{d:"M12.2846 12.84V9H13.5272C13.5574 9 13.6197 9.00089 13.7139 9.00267C13.8081 9.00444 13.8988 9.01067 13.9859 9.02133C14.2952 9.05867 14.5574 9.16622 14.7726 9.344C14.9877 9.52178 15.1512 9.74756 15.2632 10.0213C15.3752 10.2951 15.4312 10.5947 15.4312 10.92C15.4312 11.2453 15.3752 11.5449 15.2632 11.8187C15.1512 12.0924 14.9877 12.3182 14.7726 12.496C14.5574 12.6738 14.2952 12.7813 13.9859 12.8187C13.8988 12.8293 13.8081 12.8356 13.7139 12.8373C13.6197 12.8391 13.5574 12.84 13.5272 12.84H12.2846ZM13.0206 12.1573H13.5272C13.5752 12.1573 13.6401 12.1564 13.7219 12.1547C13.8037 12.1511 13.8774 12.1431 13.9432 12.1307C14.1103 12.0969 14.2463 12.0187 14.3512 11.896C14.4579 11.7733 14.5361 11.6258 14.5859 11.4533C14.6374 11.2809 14.6632 11.1031 14.6632 10.92C14.6632 10.728 14.6366 10.5458 14.5832 10.3733C14.5317 10.2009 14.4526 10.0551 14.3459 9.936C14.2392 9.81689 14.105 9.74133 13.9432 9.70933C13.8774 9.69511 13.8037 9.68711 13.7219 9.68533C13.6401 9.68356 13.5752 9.68267 13.5272 9.68267H13.0206V12.1573Z",fill:"black"})]})})});var Pd=".IDButton-root:not(.IDButton-hoverDisabled):hover &",vd=styled("div")(({theme:e})=>({paddingInlineStart:"8px",border:"1px solid transparent",display:"flex",gap:"4px",alignItems:"center",justifyContent:"flex-end",backgroundColor:e.palette.common.white,float:"right",borderRadius:"56px",height:"100%",paddingLeft:"4px",paddingRight:"4px",width:"24px",overflow:"hidden",[Pd]:{width:"max-content",overflow:"visible",borderColor:"rgba(92, 92, 92, 0.05)",boxShadow:"-7px 0px 8px 0px #F2F2F2",position:"absolute",right:0,top:0,zIndex:101}})),Ed=styled("div")(({theme:e})=>({color:e.palette.text.primary,fontSize:"11px",lineHeight:"120%",display:"grid",gridTemplateColumns:"0fr",opacity:0,transition:"grid-template-columns 0.1s ease, opacity 0.1s ease","& > span":{overflow:"hidden",minWidth:0,whiteSpace:"nowrap"},[Pd]:{gridTemplateColumns:"1fr",opacity:1,transition:"grid-template-columns 0.3s ease, opacity 0.3s ease 0.3s"}}));function _C({icon:e=jsx(Td,{}),id:t,sx:o,disableOnHoverEffect:n=false,onCopyId:r,className:s,...i}){let{t:a}=useTranslation();return jsx(p,{title:a("copy"),children:jsx(pa,{className:Eb$1("IDButton-root",n&&"IDButton-hoverDisabled",s),sx:{position:"relative",width:"24px",height:"24px",cursor:"pointer",...o},...i,children:jsxs(vd,{className:"IDButton-button",children:[t?jsx(Ed,{className:"IDButton-rowId",children:jsx("span",{children:t})}):null,t?jsx(D,{className:"IDButton-icon",icon:e,text:t,onClick:()=>r?.()}):null]})})})}var Ji=memo(_C);var cL=memo(({flag:e,actions:t,flagTooltip:o,flagsCount:n,dropdownAction:r,onCloseDropdown:s,isDropdownShown:i=true,row:a,showJsonViewer:l=true,isTextShown:p$1,showIdButton:d=true,onCopyId:m,rowId:u,onJsonViewClick:C,renderDropdown:g,startSlot:b,...S})=>{let{t:T}=useTranslation(),{open:c,anchorEl:x,filteredActions:I,isAnyActionLoading:h,isAnyActionHasError:w,isAnyActionSuccessful:y,areThereAnyShownActions:A,handleClick:L,handleClose:F,setAnchorEl:Y}=qn({actions:t,isDropdownShown:i,onCloseDropdown:s,renderDropdown:g});return jsx(v,{...S,sx:{overflow:"visible",...S.sx},children:jsxs(Gn,{"data-testid":"ActionCell_ActionCellContainer",children:[b,e&&jsx(Fragment,{children:p$1?jsx(p,{title:o,children:jsx(J,{"data-testid":"ActionCell_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:o})}):jsx(p,{title:o,children:jsxs(Ct,{"data-testid":"ActionCell_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(he,{"data-testid":"ActionCell_FlagIcon",sx:{width:"12px",height:"11px"},src:Nt[e]?.icon,alt:"flag-icon"}),(n??0)>1&&jsx(motion.div,{"data-testid":"ActionCell_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:Yn[Nt[e]?.color]||"orange","data-testid":"ActionCell_StyledBadge",children:[n,"x"]})})]})})}),d&&jsx(Ji,{id:u||a.id,onCopyId:m}),jsxs("div",{"data-testid":"ActionCell_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[l&&jsx(Fragment,{children:jsx(qt,{onClick:C,type:"button","data-testid":"ActionCell_TransparentButton",children:jsx(p,{title:T("jsonViewer"),children:jsx(rl,{"data-testid":"ActionCell_IdButtonContainer",children:jsx(motion.img,{src:Xd$1,alt:"icon"},"id-icon")})})})}),jsxs($n,{id:"styled-popover",selected:!!r||c,"data-testid":"ActionCell_ActionsIconContainer","data-is-active":A,sx:{...!A&&{pointerEvents:"none"}},children:[jsx(qt,{onClick:L,"data-testid":"ActionCell_ActionsIconContainer_TransparentButton","data-is-active":A,sx:{...!A&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(Co,{isAnyActionLoading:h,isAnyActionHasError:w,isAnyActionSuccessful:y,areThereAnyShownActions:A})})}),r,g?g(x,Y):jsx(Fragment,{children:A&&jsx(zn,{open:c,onClose:F,anchorEl:x,items:I.map(R=>({label:R.label,onClick:k=>{R?.onClick?.(k),R.hasActionMenu||F();},onContextMenu:k=>{R?.onRightClick?.(k),F();},icon:R.customIcon||jsx(he,{icon:R.icon,src:R.iconSrc??(R.icon&&jn[R.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${R.label.trim()}`)}))})})]})]})]})})});function qC({flag:e,flagTooltip:t,flagsCount:o,row:n,showJsonViewer:r=true,isTextShown:s,showIdButton:i=true,rowId:a,onJsonViewClick:l,tableMode:p$1,...d}){return jsx(v,{...d,sx:{overflow:"visible"},children:jsxs(Gn,{"data-testid":"ActionsColumn_ActionCellContainer",tableMode:p$1,children:[e&&jsx(Fragment,{children:s?jsx(p,{title:t,children:jsx(J,{"data-testid":"ActionsColumn_FlagLabel",sx:{textAlign:"left",justifyContent:"flex-start"},children:t})}):jsx(p,{title:t,children:jsxs(Ct,{"data-testid":"ActionsColumn_FlagBadge",sx:{paddingInline:"12px",width:"auto",alignItems:"center",position:"relative",zIndex:21,gap:"0px"},whileHover:["animate","fadeIn"],variants:{animate:{gap:"4px"}},children:[jsx(he,{"data-testid":"ActionsColumn_FlagIcon",sx:{width:"12px",height:"11px"},src:Nt[e]?.icon,alt:"flag-icon"}),(o??0)>1&&jsx(motion.div,{"data-testid":"ActionsColumn_StyledBadge_Container",style:{alignItems:"center",justifyContent:"center",gap:"4px",display:"flex",zIndex:10},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsxs(z,{compact:true,color:Yn[Nt[e]?.color]||"orange","data-testid":"ActionsColumn_StyledBadge",children:[o,"x"]})})]})})}),i&&jsx(b$1,{sx:{minWidth:"213px"},children:a||n.id}),jsx("div",{"data-testid":"ActionsColumn_IconsContainer",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:r&&jsx(b$1,{onClick:l,children:"View API"})})]})})}var KC=memo(qC);function QC({actions:e,dropdownAction:t,onCloseDropdown:o,isDropdownShown:n=true,renderDropdown:r,...s}){let{open:i,anchorEl:a,filteredActions:l,isAnyActionLoading:p,isAnyActionHasError:d,isAnyActionSuccessful:m,areThereAnyShownActions:u,handleClick:C,handleClose:g,setAnchorEl:b}=qn({actions:e,isDropdownShown:n,onCloseDropdown:o,renderDropdown:r});return jsx(v,{...s,sx:{overflow:"visible"},children:jsx("div",{"data-testid":"ActionIconColumn_Container",style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:jsxs($n,{id:"styled-popover",selected:!!t||i,"data-testid":"ActionIconColumn_ActionsIconContainer","data-is-active":u,sx:{...!u&&{pointerEvents:"none"}},children:[jsx(qt,{onClick:C,"data-testid":"ActionIconColumn_ActionsIconContainer_TransparentButton","data-is-active":u,sx:{...!u&&{pointerEvents:"none"}},children:jsx(AnimatePresence,{mode:"wait",children:jsx(Co,{isAnyActionLoading:p,isAnyActionHasError:d,isAnyActionSuccessful:m,areThereAnyShownActions:u})})}),r?r(a,b):jsxs(Fragment,{children:[t,u&&jsx(zn,{open:i,onClose:g,anchorEl:a,items:l.map(S=>({label:S.label,onClick:T=>{S?.onClick?.(T),S.hasActionMenu||g();},onContextMenu:T=>{S?.onRightClick?.(T),g();},icon:S.customIcon||jsx(he,{icon:S.icon,src:S.iconSrc??(S.icon&&jn[S.icon]),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},`action.label-${S.label.trim()}`)}))})]})]})})})}var eg=memo(QC);var Ld=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),position:"relative",minWidth:"23px",height:"24px"})),Rd=styled$1("span")(({theme:e})=>({fontSize:e.typography.pxToRem(12),color:e.palette.info.dark,fontWeight:700,paddingInline:e.spacing(1),borderRadius:e.spacing(1),display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:`${e.palette.info.dark}1A`})),kd=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1),backgroundColor:e.palette.common.white,border:`1px solid ${e.palette.divider}`,paddingInline:e.spacing(1),borderRadius:"56px",height:"24px"}));styled$1("img")(({theme:e,order:t})=>({borderRadius:"50%",backgroundColor:e.palette.common.white,width:"16px",height:"16px",padding:"2px",zIndex:t+1,position:"absolute",left:`${t*9}px`}));var Dd=styled$1("img")(({pointLeft:e})=>({width:"12.5px",height:"13px",transform:`scale(${e?"-1":"1"}, 1)`}));styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:e.palette.common.white,borderRadius:"50%",width:"16px",height:"16px",fontSize:"8px",fontWeight:e.typography.fontWeightBold,lineHeight:"11px",position:"absolute",left:"18px",zIndex:4,textAlign:"center",span:{flexGrow:1}}));function rg({destinationsCount:e,destinationsTooltip:t,destination:o,destinationsAmount:n,hidden:r,iconDirection:s,...i}){let a=useMemo(()=>{if(typeof e=="number")return e;let d=Number(e);return Number.isNaN(d)?void 0:d},[e]),l=a!==void 0?a>0:!!e,p$1=a!==void 0&&a>1;return !l||r?null:jsx(pa,{sx:{width:"fit-content",overflow:"visible"},...i,children:jsx(p,{title:t,children:jsxs(kd,{children:[jsx(Dd,{src:z$1,pointLeft:s==="left"}),p$1&&jsx(Ld,{children:jsx(Rd,{children:e})})]})})})}var ig=rg;function lg(e){let{destination:t,...o}=e,n={...o};delete n.destinationsCount,delete n.destinationsTooltip,delete n.destinationsAmount,delete n.hidden,delete n.iconDirection,delete n.selectionProps;let r=t?.destination||[];return jsx(pa,{sx:{display:"flex",gap:"4px",alignItems:"center"},...n,children:r.map((s,i)=>{let a=ba(s?.amount||0),l=`${a.integerAmount}.${a.decimalAmount}`;return jsxs(b$1,{copyTrigger:"click",copyText:l,children:[s?.id," | ",jsx(b$9,{currency:s?.currency})," ",l]},s?.id||i)})})}var pg=lg;var rR=({destination:e,amount:t})=>{let o=e?.destination||[];return o?.length>1?jsxs("div",{children:[jsx("div",{children:"Destination"}),e?.destination?.map(r=>{let s=ba(r.amount||0);return jsxs("div",{children:[r?.id," - ",jsx(b$9,{currency:r?.currency})," ",s.integerAmount,".",s.decimalAmount]},r?.id)})]}):jsxs("div",{children:["Destination ",o?.[0]?.id," - ",jsx(b$9,{currency:o?.[0]?.currency})," ",t.integerAmount,".",t.decimalAmount]})};var Wd=styled$1(motion.div)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5),paddingInline:e.spacing(.5),paddingBlock:e.spacing(.5),backgroundColor:"#eeeeee",borderRadius:"56px",height:"24px",minWidth:"24px",width:"fit-content",fontSize:"10px",color:e.palette.text.primary,zIndex:10,position:"absolute"})),Fd=styled$1("div")(({theme:e,percentage:t})=>({border:`0.6px ${[0,100].includes(t)?"solid":"dashed"} #656565`,borderRadius:"80px",padding:e.spacing(.316),paddingLeft:e.spacing(1),fontSize:"7px",fontWeight:e.typography.fontWeightBold,color:"#656565",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));function fg({value:e,label:t,tooltip:o,...n}){let r=useTheme(),s=Math.min(100,Math.max(0,e));return !Number.isFinite(e)||s<=0?null:jsx(v,{...n,children:jsx(p,{title:o,placement:"top",children:jsx("div",{style:{height:24},children:jsxs(Wd,{whileHover:["animate","fadeIn"],animate:"start",sx:{zIndex:22},variants:{animate:{...!!t&&{boxShadow:r.shadows[4]}}},children:[jsxs(Fd,{percentage:s,children:[s,"% ",jsx(Je,{percentage:gt(s)})]}),!!t&&jsx(motion.div,{style:{display:"none",alignItems:"center",justifyContent:"center",gap:"4px",width:0},initial:{width:0,opacity:0},transition:{animate:{duration:.5},fadeIn:{duration:.2}},variants:{animate:{width:"auto",display:"flex"},fadeIn:{transition:{delay:.5},opacity:1}},children:jsx("span",{children:t})})]})})})})}var Cg=fg;var oa=["authenticationMode","paymentAuth","paymentAgreement"],na=["paymentIssuer","paymentInitiated","paymentDevice"],Hd=["paymentMethod","paymentType","paymentScheme","paymentCardNumber",...na,...oa];var Ud=styled(pa)(()=>({marginRight:"8px",display:"flex",alignItems:"center",gap:"4px"})),Gd=styled(pa)(()=>({marginLeft:"8px",width:20}));function yg(e){let{centerIcon:t,centerIconId:o}=useMemo(()=>{for(let i of Hd)if(e?.[i])return {centerIcon:e?.[i],centerIconId:i};return {centerIcon:null,centerIconId:null}},[e]);if(!o)return null;let n=o!=="paymentScheme"&&e.paymentScheme,r=o!=="paymentCardNumber"&&e.paymentCardNumber,s=o!=="paymentType"&&e.paymentType;return jsx(b$2,{sx:{justifyContent:"center",zIndex:101},main:t,startItems:na.filter(i=>i!==o&&e?.[i]).map(i=>e?.[i]),endItems:oa.filter(i=>i!==o&&e?.[i]).map(i=>e?.[i]),endAdornment:n||r?jsxs(Ud,{children:[n&&e.paymentScheme,r&&e.paymentCardNumber]}):void 0,startAdornment:s?jsx(Gd,{children:e.paymentType}):void 0})}var hg=memo(yg);var Yd=styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.palette.text.primary}));function UR({card:e,paymentMethod:t,paymentType:o,paymentScheme:n}){let{t:r}=useTranslation();if(!e.last_four)return null;let s=e?.name||`${r(Oe(wb$1(t,n)?o:n))} - ${e?.last_four}`;return jsx(p,{title:s,children:jsxs(Yd,{children:["\xB7\xB7\xB7 ",e?.last_four]})})}function KR({method:e}){let{t}=useTranslation();return e?jsx(Se,{source:re(e)??e,title:`Payment Method - ${t(Oe(e))}`}):null}function tk({type:e}){let{t}=useTranslation();return e?jsx(Se,{source:re(e)??e??"",title:`Payment Type - ${t(Oe(e))}`}):null}function sk({scheme:e}){let{t}=useTranslation();return e?jsx(Se,{source:re(e)??e,title:`Payment Scheme - ${t(Oe(e))}`}):null}var fk=({mode:e})=>e?jsx(p,{title:ap[e],children:jsx(pa,{component:"img",src:e==="C"?da:ca$1})}):null;var Kn={ORDER:{label:"order",icon:yi$1,color:"#5E30EB"},SAVED_CARD:{label:"cardAgreement",icon:Ai$1,color:"#76BB40"},SUBSCRIPTION:{label:"subscription",icon:Bi$1,color:"#00C7BE"},INSTALLMENT:{label:"installment",icon:zi$1,color:"#32ADE6"}},Xn={SAVED_TOKEN:{label:"savedToken",icon:T,color:"#76BB40"},COUNT:{label:"countBadge",icon:"countBadge",color:"#76BB40"}};styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)}));styled$1("img")(()=>({width:"35px",height:"16px",display:"block"}));styled$1("span")(()=>({display:"flex",alignItems:"center",justifyContent:"center",width:"14.67px",height:"10px"}));styled$1("img")(()=>({maxWidth:"100%",width:"100%"}));var Jn=styled$1("span")(({theme:e})=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0",color:e.palette.text.primary})),Zn=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"8px"})),Kd=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"pointer",backgroundColor:e.palette.background.paper,borderRadius:"16px"})),Xd=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ra=styled$1("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),Qn=(e,t)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}}),er=styled$1(motion.span)(({order:e})=>({zIndex:(e||0)+1}));function Og({type:e,hasSavedCard:t,totalPaymentsCount:o,isTextShown:n,...r}){let s=useTheme(),{t:i}=useTranslation(),a$1=useMemo(()=>[...t?[Xn.SAVED_TOKEN]:[],...(o||0)>0?[Xn.COUNT]:[],...e&&Kn[e]?[Kn[e]]:[]],[t,o,e]),l=u=>n?jsx(er,{"data-testid":"AgreementCell_countBadge",order:u,variants:Qn(u,n?85:0),children:jsx(p,{title:i("totalPaymentCount",{amount:b$b(o)}),children:jsx(Zn,{children:jsxs(Jn,{"data-testid":"AgreementCell_totalPaymentsCount",sx:{color:Xn.COUNT.color},children:["x",o]})})})},u):jsx(a,{value:o,index:u},u),p$1=a$1.map((u,C)=>u.label==="countBadge"?l(C):jsx(p,{title:i(u.label),children:jsx(er,{order:C,variants:Qn(C,C>1&&n?62:0),sx:{width:n?"auto":"36px"},children:n?jsx(Zn,{children:jsx(Jn,{"data-testid":"AgreementCell_agreementType",sx:{color:u.color},children:i(u.label)})}):jsx(ra,{src:u.icon,alt:"agreement"})},u.color)},u.color)),d=p$1.length,m=jsx(p,{title:"No agreement",children:jsx(er,{order:0,variants:Qn(0,0),sx:{width:n?"auto":"36px"},children:n?jsx(Zn,{children:jsx(Jn,{"data-testid":"AgreementCell_agreementType",sx:{color:s.palette.text.secondary},children:"No agreement"})}):jsx(ra,{src:Fi$1,alt:"no-agreement"})},"no-agreement")},"no-agreement");return jsx(v,{...r,children:jsx(Xd,{"data-testid":"AgreementCell",children:jsx(Kd,{layout:true,className:"payment-sources-container","data-testid":"AgreementCell_PaymentSourcesContainer",whileHover:"animate",animate:"start",sourcesCount:d||0,variants:{animate:{width:(d||0)*38}},children:p$1?.length>0?p$1:m})})})}var Hg=Og;var Zd=styled("img")(()=>({width:"12.67px",height:"15px"}));styled("span")(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:"12px",backgroundColor:e.palette.background.paper,width:"36px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center"}));function zg({hasAuth:e,tooltip:t,isTextShown:o,align:n,...r}){return jsx(v,{style:{textAlign:n||"center",overflow:"visible",display:"flex",width:"100%",justifyContent:n==="left"?"flex-start":"center"},...r,children:e?jsx(p,{title:t,children:jsx(Ct,{"data-testid":"AuthCell_BadgeWrapper",children:o?jsx(J,{"data-testid":"AuthCell_TextLabel",sx:{minWidth:"max-content"},children:t}):jsx(Zd,{src:na$2,alt:"icon","data-testid":"AuthCell_AuthIcon"})})}):null})}var Ug=zg;var Qd=styled$1("img")(()=>({width:"16px",height:"16px"})),ec=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(.5)})),tc=styled$1("span")(({theme:e})=>({display:"flex",paddingInline:e.spacing(1),paddingBlock:e.spacing(.5),alignItems:"center",justifyContent:"center",gap:e.spacing(.5),borderRadius:"56px",background:`${e.palette.info.dark}1a`})),oc=styled$1("span")(({theme:e})=>({color:e.palette.info.dark,fontSize:"14px",lineHeight:"16.8px"}));function Gg({walletId:e,country:t,showCountry:o=true,...n}){return jsx(v,{style:{textAlign:"center",overflow:"visible"},...n,children:jsxs(ec,{children:[o&&t&&jsx(p,{title:fa(t),children:jsx(b$8,{countryCode:t})}),jsxs(tc,{children:[jsx(Qd,{src:cc,alt:"wallet-icon"}),e&&jsxs(oc,{children:["\xB7\xB7\xB7\xB7 ",e?.substring((e?.length||0)-4)]})]})]})})}var $g=Gg;function rc(e){return jsx(ll,{...e,children:jsx(p,{title:e.tooltip||e.children,children:e.children})})}var aa={acquirer:qb,generic:rb$1,payment:ae,gateway:wn$1,order:$d};var ic=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),ac=styled$1("img")(()=>({maxWidth:"36px",maxHeight:"24px"})),sc=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({sourcesCount:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${e*6+36}px `,minHeight:"24px",cursor:"pointer",borderRadius:"16px"})),lc=styled$1("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"})),pc=styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));styled$1("div")(()=>({height:"18px"}));var dc=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:o?e*o:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},boxShadow:t}});var Xg=120,Jg=50;function Zg({isTextShown:e,getTooltipTitle:t,...o}){let[n,r]=useState(false),[s,i]=useState(null),a=useRef(null),l=useRef(false),p$1=useRef(false),d=useRef(null),m=useTheme(),u=useMemo(()=>Object.keys(aa).filter(h=>!!o[h]),[o]),C=()=>{d.current&&(clearTimeout(d.current),d.current=null);},g=()=>{i(a.current);},b=()=>{l.current=true,p$1.current=false,r(true),i(null),C(),d.current=setTimeout(()=>{p$1.current=true,g();},Xg);};useEffect(()=>()=>C(),[]);let S=()=>{l.current||b();},T=()=>{C(),a.current=null,l.current=false,p$1.current=false,i(null),r(false);},c=h=>{if(a.current=h,p$1.current){C(),i(h);return}l.current||b();},x=()=>{a.current=null,p$1.current&&(C(),d.current=setTimeout(g,Jg));},I=u.length;return jsx(v,{...o,children:jsx(ic,{children:I>0?jsx(sc,{layout:true,className:"reference-sources-container",whileHover:"animate",onHoverStart:S,onHoverEnd:T,animate:n?"animate":"start",sourcesCount:I,variants:{animate:{width:I*38}},style:{zIndex:29},children:u.map((h,w)=>{let y=t?.(h)||`${mc(h)} - ${o[h]}`,A=s===h;return jsx(Zo,{order:w,variants:dc(w,m.shadows[4],e?83:0),sx:{width:e?"79px":"36px"},onMouseEnter:()=>c(h),onMouseLeave:x,children:jsx(p,{open:A,disableHoverListener:true,disableInteractive:true,title:A?y:"",children:e?jsx(pc,{children:jsx(lc,{children:mc(h)})}):jsx(ac,{src:aa[h],alt:h,sx:{...h==="order"&&{width:"11.82px"}}})})},`${h}-${w}`)})}):null})})}var Qg=Zg;var Ht={incomplete:Jj,complete:Ij,reviewed:Ij,verified:Kj};var _t=styled$1("img")(()=>({width:"10.5px",height:"10.5px"})),rr=styled$1("div")({marginLeft:"auto",width:"auto"});var fc=styled$1("div",{shouldForwardProp:e=>!["licenseNumber","hasClick"].includes(e)})(({theme:e,licenseNumber:t,hasClick:o})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:o?"pointer":"default",...t&&{padding:"3.5px 8px"}})),Cc=styled$1(pa)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"}));styled$1("img")(()=>({width:"16px",height:"11.73px"}));var gc=styled$1("div",{shouldForwardProp:e=>!["licenseNumber"].includes(e)})(({theme:e,licenseNumber:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",margin:"0",width:"74px",...!t&&{color:"#B1B1B1",width:"84px"}}));function xc({entity:e,country:t,verificationStatus:o,licenseNumber:n,hideStatus:r,...s}){let i=Ht[o??"incomplete"];return jsx(v,{...s,sx:{cursor:s?.onClick?"pointer":"default"},children:jsx(p,{title:e,children:jsx(fc,{hasClick:!!s?.onClick,licenseNumber:n,children:jsxs(Cc,{children:[jsx(p,{title:t?fa(t):"",children:jsx(b$8,{countryCode:t})}),jsx(gc,{licenseNumber:n,children:n||"Not Available"}),!r&&jsx(rr,{children:jsx(_t,{src:i})})]})})})})}var yc={display:"flex",alignItems:"center",gap:1,minWidth:0},hc={width:"24px",height:"24px",border:"1px solid #F2F2F2",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},Ic={fontSize:"14px",fontWeight:400},bc={maxWidth:"18px",maxHeight:"18px",objectFit:"cover"};function wc({marketPlaceIcon:e,marketPlaceName:t,...o}){return jsx(v,{...o,children:jsx(Box,{sx:yc,children:t&&jsxs(Fragment,{children:[jsx(Box,{sx:hc,children:e??jsx("img",{src:Tb,alt:"marketplace",style:bc})}),jsx(Typography,{noWrap:true,sx:Ic,children:t})]})})})}var Tc=styled$1("div")(({theme:e})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1.029px solid #F2F2F2",borderRadius:"44px",padding:"4px 8px",lineHeight:"120%"})),Ac=styled$1("div")(({theme:e})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"84px"})),Pc=styled$1("span")(({theme:e})=>({fontSize:"9.5px",fontWeight:400,color:e.palette.common.white,backgroundColor:e.palette.grey[700],borderRadius:"4px",padding:"1px 2px"})),vc=styled$1("div")({width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"}),Ec=styled$1("div")({display:"flex",alignItems:"center",gap:"8px"}),Vc=styled$1("div")({fontWeight:400,fontSize:14,lineHeight:"120%",letterSpacing:0,color:"#B1B1B1",textAlign:"center",width:"100%"});function Mc({id:e,status:t,count:o,name:n,...r}){let s=Ht[t??"incomplete"];return jsx(v,{...r,sx:{cursor:"pointer"},children:jsx(p,{title:n,children:jsx(Tc,{children:e?jsxs(vc,{children:[jsx(Ac,{children:e}),jsxs(Ec,{children:[jsx(_t,{src:s}),o!==void 0&&o>1&&jsx("div",{children:jsxs(Pc,{children:["+",o-1]})})]})]}):jsx(Vc,{children:"Not Available"})})})})}var Lc=styled$1("div",{shouldForwardProp:e=>!["hasClick"].includes(e)})(({theme:e,hasClick:t})=>({display:"flex",alignItems:"center",gap:e.spacing(1),border:"1px solid #F2F2F2",borderRadius:"44px",padding:"3.5px 5px",height:"24px",cursor:t?"pointer":"default"})),Rc=styled$1(pa)(()=>({display:"flex",alignItems:"center",gap:"4px",overflow:"hidden",width:"100%"})),kc=styled$1("p",{shouldForwardProp:e=>!["brandName"].includes(e)})(({theme:e,brandName:t})=>({fontSize:"14px",fontWeight:400,color:e.palette.text.primary,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",width:"74px",margin:"0",...!t&&{color:"#B1B1B1",width:"84px"}}));function Dc({brand:e,verificationStatus:t,hideStatus:o,brandLogo:n,...r}){let s=Ht[t??"incomplete"];return jsx(v,{...r,children:jsx(p,{title:e.name,children:jsx(Lc,{hasClick:!!r.onClick,children:jsxs(Rc,{children:[n,jsx(kc,{brandName:e.name,children:e.name||"Not Available"}),!o&&jsx(rr,{children:jsx(_t,{src:s})})]})})})})}var Nc=styled$1("span")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:e.spacing(1)})),Bc=styled$1("img")(()=>({maxWidth:"36px",maxHeight:"16px"})),Wc=styled$1(motion.span,{shouldForwardProp:e=>e!=="sourcesCount"})(({theme:e,sourcesCount:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"absolute",minWidth:`${t*6+36}px `,minHeight:"24px",cursor:"default",backgroundColor:e.palette.background.paper,borderRadius:"16px"}));styled$1("span")(()=>({fontSize:"11px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"2px 0"}));styled$1("div")(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingInline:"4px"}));var Fc=(e,t,o)=>({start:{x:e*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t?e*t:e*39,transition:{duration:.3,type:"tween",ease:"easeOut"},...o&&{boxShadow:"7px 0px 8px 0px #F2F2F2"}}}),Oc=styled$1(Box)(()=>({display:"flex",gap:"4px",maxWidth:"440px",justifyContent:"space-between",height:"18px"}));var px=e=>!e.startsWith("http://")&&!e.startsWith("https://"),ar=e=>/^https?:\/\//i.test(e),Hc=(e,t)=>{switch(t){case "website":return e;case "physical_store":case "call_center":return null;case "linkedin":case "instagram":case "twitter":case "social_media":return dx(e,t);case "ios":case "android":case "mobile_app":return cx(e,t);default:return e}},dx=(e,t)=>{let o=e.toLowerCase();return t==="linkedin"?o.includes("linkedin.com")||o.includes("linked.com")?e:ar(e)?null:`https://linkedin.com/company/${e}`:t==="instagram"?o.includes("instagram.com")?e:ar(e)?null:`https://instagram.com/${e}`:t==="twitter"?o.includes("twitter.com")||o.includes("x.com")?e:ar(e)?null:`https://x.com/${e}`:null},cx=(e,t)=>e.toLowerCase().includes("apps.apple.com")&&t==="ios"?e:t==="android"?ar(e)?e:`https://play.google.com/store/apps/details?id=${e}`:null,_c=e=>{!e||typeof e!="string"||window.open(px(e)?`https://${e}`:e,"_blank","noopener,noreferrer");};function mx({channels:e,...t}){let o=e?.filter(r=>!!r.address)?.map((r,s)=>{let i=r.address,a=r.code?.replace(/_/g,""),l=s===e?.length-1,p$1=Hc(r.address??"",r.code??"");return jsx(p,{title:i,children:jsx(Zo,{order:s,variants:Fc(s,0,l),sx:{width:"36px",cursor:p$1?"pointer":"default"},onClick:()=>{r?.address&&_c(p$1);},children:jsx(Bc,{src:r.logo,alt:a})})},`${r}-${s}`)}),n=o?.length||0;return jsx(v,{...t,children:jsx(Nc,{children:o?.length>0?jsx(Wc,{layout:true,className:"sales-channels-container",whileHover:"animate",animate:"start",sourcesCount:n||0,variants:{animate:{width:(n||0)*38}},style:{zIndex:29},children:o}):null})})}var ux=mx;function yx({channels:e}){let t=useRef(null),[o,n]=useState(false),[r,s]=useState(null),i=!!r;useEffect(()=>{t.current&&n(t.current.scrollHeight>20);},[e]);let a=useMemo(()=>(e||[]).filter(l=>!!l.address),[e]);return jsxs(Oc,{children:[jsx(pa,{sx:{display:"flex",flexWrap:"wrap",gap:o?"8px":"4px"},ref:t,children:a.map(l=>jsxs(b$1,{copyTrigger:"click",copyText:l.address,sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px","& div":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"367px"}},children:[l.name?.en,": ",l.address]},l.id))}),o&&jsx(pa,{onClick:l=>{s(l.currentTarget.parentElement);},sx:{height:"18px"},children:jsx(b$1,{sx:{minWidth:25,borderRadius:"24px",overflow:"hidden"},children:"..."})}),jsx(xx,{open:i,anchorEl:r,sx:{minWidth:r?.clientWidth},onClose:()=>{s(null);},anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{style:{maxWidth:"unset",minWidth:r?.clientWidth,marginTop:"22px"}}},children:jsx(pa,{sx:{display:"flex",flexDirection:"column",gap:"4px",padding:"4px"},children:a.map(l=>jsxs(b$1,{copyTrigger:"click",copyText:l.address,children:[l.name?.en,": ",l.address]},l.id))})})]})}var hx=yx;var Ix=(u=>(u.ABANDONED="ABANDONED",u.IN_PROGRESS="IN_PROGRESS",u.VOID="VOID",u.CANCELLED="CANCELLED",u.CAPTURED="CAPTURED",u.INITIATED="INITIATED",u.FAILED="FAILED",u.DECLINED="DECLINED",u.RESTRICTED="RESTRICTED",u.TIMEDOUT="TIMEDOUT",u.UNKNOWN="UNKNOWN",u.AUTHORIZED="AUTHORIZED",u))(Ix||{});var Uc={CYBERSOURCE:tm$1,MPGS:um$1,NETCETERA:vm$1,APPLEPAY:wm,TAP3DS:xm$1,FSS:Dm,BENEFIT:zm,QPAY:Lm$1,POSTPAY:Km,BENEFITPAY:ym,MEEZA:Fm,STC_PAY:Nm,NGENIUS:Gm,KNET:Em,PAYPAL:Jm,FAWRY:Cm,TPG:Rm,DEEMA:Bm,TPAY:Qm,"CAREEM PAY":Am$1,TABBY:Om$1,OMANNET:Im,NPG:Hm,SPG:Mm$1,TAMARA:Pm};var $c=styled$1(pa)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"24px",gap:"8px",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper})),Yc=styled$1("img")(()=>({width:"100%",height:"100%",objectFit:"contain"}));function jc({provider:e,...t}){let o=Uc[e];return o?jsx($c,{children:jsx(Yc,{src:o,alt:e})}):jsx(v,{...t,children:jsx(J,{children:e})})}var Kc=8,Sx=16,je=Kc*2+Sx,Xc=100,Jc=6,wx=je+Jc+Xc,Zc=styled(v)(()=>({position:"relative",overflow:"visible",width:je,minWidth:je,maxWidth:je,display:"inline-flex",padding:0})),Qc=styled(pa)(()=>({position:"relative",width:je,height:24,flexShrink:0,overflow:"visible"})),em=styled(pa,{shouldForwardProp:e=>e!=="hasLabel"})(({theme:e,hasLabel:t})=>({position:"absolute",top:0,left:0,width:je,minWidth:je,maxWidth:je,height:24,display:"inline-flex",alignItems:"center",gap:Jc,paddingInline:Kc,borderRadius:"24px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.background.paper,boxSizing:"border-box",cursor:"pointer",overflow:"hidden",transition:e.transitions.create(["max-width","box-shadow"]),"& img":{flexShrink:0},...t&&{"&:hover":{width:"max-content",maxWidth:wx,zIndex:100,boxShadow:"0px 0px 16px 0px #00000021","& .link-cell-label":{maxWidth:Xc,opacity:1}}}})),tm=styled("span")(({theme:e})=>({display:"inline-block",maxWidth:0,opacity:0,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",fontSize:12,lineHeight:"16px",color:e.palette.text.primary,transition:e.transitions.create(["max-width","opacity"],{duration:e.transitions.duration.shorter})}));function Ax({url:e,label:t}){let o=l(),n=()=>{try{ua(e),o.success("Copied!");}catch{o.error("Failed to copy");}};return e?jsx(Zc,{children:jsx(Qc,{children:jsxs(em,{hasLabel:!!t,onClick:n,children:[jsx(d,{src:Ll$1,alt:"link"}),t&&jsx(tm,{className:"link-cell-label",children:t})]})})}):null}var Px=memo(Ax);
|
|
2
|
+
export{wc as $,Q as $a,PV as A,dp as Aa,Mt as Ab,yd as B,M as Ba,Bi as Bb,hd as C,ge as Ca,Fi as Cb,fC as D,Sn as Da,Oi as Db,yC as E,ef as Ea,Hi as Eb,bC as F,pi as Fa,Ui as Fb,Co as G,tf as Ga,Gi as Gb,Ji as H,of as Ha,co as Hb,cL as I,nf as Ia,ud as Ib,KC as J,wn as Ja,eg as K,rt as Ka,ig as L,xe as La,pg as M,_p as Ma,rR as N,no as Na,Cg as O,di as Oa,hg as P,Tn as Pa,UR as Q,ci as Qa,KR as R,An as Ra,tk as S,rf as Sa,sk as T,Vt as Ta,fk as U,ro as Ua,Hg as V,fi as Va,Ug as W,io as Wa,$g as X,Ci as Xa,rc as Y,gi as Ya,Qg as Z,xi as Za,xc as _,yi as _a,v as a,Mc as aa,hi as ab,um as b,Dc as ba,Ii as bb,Je as c,ux as ca,bi as cb,Zx as d,hx as da,Si as db,qt as e,Ix as ea,ui as eb,Ct as f,jc as fa,ao as fb,Qx as g,Px as ga,af as gb,nl as h,vm as ha,wi as hb,ey as i,Mm as ia,Ti as ib,rl as j,Lm as ja,Ai as jb,il as k,bl as ka,Gp as kb,J as l,Ym as la,Pn as lb,al as m,Xm as ma,vn as mb,sl as n,Yr as na,sf as nb,ll as o,nu as oa,En as ob,ty as p,Jt as pa,lf as pb,Ze as q,su as qa,Pi as qb,We as r,du as ra,vi as rb,Zo as s,Cu as sa,Ei as sb,oy as t,Iu as ta,$p as tb,xm as u,Pu as ua,pf as ub,fd as v,Cn as va,df as vb,Cd as w,Ql as wa,cf as wb,gd as x,re as xa,Vi as xb,ji as y,Se as ya,Vn as yb,Fn as z,Ou as za,Mn as zb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Eb as ColumnViewsPicker,Gb as CreateViewDialog,Cb as CustomViews,Db as DefaultViews,Fb as ViewsDropdown,Ya as areAllColumnsSelected,cb as areAllCurrentColumnsSelected,fb as areColumnsEqual,Za as areSomeColumnsSelected,db as areSomeCurrentColumnsSelected,xb as buildFullTemplateLayouts,vb as buildRequiredColumnView,Fa as convertColumnsToLayoutSection,ob as convertTemplateToColumnsView,pb as convertTemplatesToColumnsView,Na as countCustomTemplates,Oa as countCustomViewMenuItems,Ha as createCustomViewMenuItem,$a as deepCloneColumns,Ua as getColumnCheckState,lb as getColumnOrder,Ea as getColumnsByMode,tb as getLayoutCodesForMode,Ga as getLayoutDataFromTemplates,ub as getOtherModeSectionCode,kb as getSubmenuFromTemplateLayout,Ra as getSubmenuItems,Ta as getSubmenuItemsForDisplay,Ja as getTemplateRole,mb as handleTemplateUpdate,wb as hasLayoutSectionForMode,Sa as hasSubmenu,ib as initializeCreateColumns,jb as initializeCreateColumnsWithCurrentState,hb as initializeEditingColumns,sb as isCheckboxInteractionTarget,Ma as isCustomTemplate,La as isCustomView,Ba as isDateColumn,Ca as isIndexColumn,Ka as isPresetView,_a as isValidTemplateName,Qa as mapTemplatesToMenuItems,eb as normalizeColumnsSelected,qb as replaceTemplateInList,gb as resetColumnsToDefault,Ia as setViewAsDefault,nb as templateToViewMenuItem,Xa as toggleAllColumns,bb as toggleAllCurrentColumns,Va as toggleColumn,ab as toggleSingleColumn,Wa as toggleSubItem,Da as transformLayoutToColumns,Pa as transformTemplatesToViewMenuItems,rb as updateCurrentTemplate,Bb as useCustomTableViews,Ab as useSubmenuHover,yb as useViewsManager,zb as useViewsMenu}from'../../_chunks/chunk-SSPZ77B7.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-JBD7LBKC.js';import'../../_chunks/chunk-632OM3TB.js';import'../../_chunks/chunk-TJ3OEL7X.js';import'../../_chunks/chunk-5NBAX42H.js';import'../../_chunks/chunk-UHP2ZQJO.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-HNVAFVUA.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-2MGV5XP4.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-GGX2FEQV.js';import'../../_chunks/chunk-EGIKB732.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-AM66KDGG.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-RF6JK6KJ.js';import'../../_chunks/chunk-4V64TJJW.js';import'../../_chunks/chunk-KLN3YM53.js';import'../../_chunks/chunk-LQSTGJBJ.js';import'../../_chunks/chunk-L2SDX2MP.js';import'../../_chunks/chunk-G4W4TPFT.js';import'../../_chunks/chunk-PEQGKPA2.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-W755BEL7.js';import'../../_chunks/chunk-AO5BBZSP.js';import'../../_chunks/chunk-3YBLN7RZ.js';import'../../_chunks/chunk-7UR5RTMD.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-JGXI5MLK.js';import'../../_chunks/chunk-R6E5X56S.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-565FQDLE.js';import'../../_chunks/chunk-SMGH6EBP.js';import'../../_chunks/chunk-XJOPGP7Y.js';import'../../_chunks/chunk-3YZF4W2L.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-TKWUFXNT.js';import'../../_chunks/chunk-AIKE5IVU.js';import'../../_chunks/chunk-WE5WS7B2.js';import'../../_chunks/chunk-VLXDIIDL.js';import'../../_chunks/chunk-FXTZ22TS.js';import'../../_chunks/chunk-MXZD4IG6.js';import'../../_chunks/chunk-SKDHJYOO.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-3ZUUAIFN.js';import'../../_chunks/chunk-QIUS47UY.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-NFDDJIRN.js';import'../../_chunks/chunk-Z7GYOTVN.js';import'../../_chunks/chunk-PI263RZJ.js';import'../../_chunks/chunk-V4ZKOYOF.js';import'../../_chunks/chunk-Q6MQJAZI.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-VLOXMCB3.js';import'../../_chunks/chunk-Z6D3LMCU.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';export{Ua as CUSTOM_VIEW,Pa as DATE_COLUMN_CONFIG,Ta as DEFAULT_VIEW,Va as DEFAULT_VIEW_OPTIONS,Ka as DIALOG_HEIGHT,Ja as DIALOG_WIDTH,Oa as INDEX_COLUMN_CONFIG,La as MAX_CUSTOM_VIEWS,Ma as TEMPLATE_NAME_MAX_LENGTH,Na as TableViewColumnNames}from'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{Ib as ListHeader}from'../../_chunks/chunk-SSPZ77B7.js';import'../../_chunks/chunk-B2OUV4UE.js';import'../../_chunks/chunk-JBD7LBKC.js';import'../../_chunks/chunk-632OM3TB.js';import'../../_chunks/chunk-TJ3OEL7X.js';import'../../_chunks/chunk-5NBAX42H.js';import'../../_chunks/chunk-UHP2ZQJO.js';import'../../_chunks/chunk-2BU56HDE.js';import'../../_chunks/chunk-2I5L7ASP.js';import'../../_chunks/chunk-HNVAFVUA.js';import'../../_chunks/chunk-ISC5KT5E.js';import'../../_chunks/chunk-2MGV5XP4.js';import'../../_chunks/chunk-673TILTX.js';import'../../_chunks/chunk-GGX2FEQV.js';import'../../_chunks/chunk-EGIKB732.js';import'../../_chunks/chunk-G3QDXDRW.js';import'../../_chunks/chunk-YFL4D5VW.js';import'../../_chunks/chunk-AM66KDGG.js';import'../../_chunks/chunk-MUBZJUHH.js';import'../../_chunks/chunk-RF6JK6KJ.js';import'../../_chunks/chunk-4V64TJJW.js';import'../../_chunks/chunk-KLN3YM53.js';import'../../_chunks/chunk-LQSTGJBJ.js';import'../../_chunks/chunk-L2SDX2MP.js';import'../../_chunks/chunk-G4W4TPFT.js';import'../../_chunks/chunk-PEQGKPA2.js';import'../../_chunks/chunk-U6HZMYNW.js';import'../../_chunks/chunk-W755BEL7.js';import'../../_chunks/chunk-AO5BBZSP.js';import'../../_chunks/chunk-3YBLN7RZ.js';import'../../_chunks/chunk-7UR5RTMD.js';import'../../_chunks/chunk-637LQKFX.js';import'../../_chunks/chunk-JGXI5MLK.js';import'../../_chunks/chunk-R6E5X56S.js';import'../../_chunks/chunk-TRXHMROX.js';import'../../_chunks/chunk-565FQDLE.js';import'../../_chunks/chunk-SMGH6EBP.js';import'../../_chunks/chunk-XJOPGP7Y.js';import'../../_chunks/chunk-3YZF4W2L.js';import'../../_chunks/chunk-U2JLXSW5.js';import'../../_chunks/chunk-TKWUFXNT.js';import'../../_chunks/chunk-AIKE5IVU.js';import'../../_chunks/chunk-WE5WS7B2.js';import'../../_chunks/chunk-VLXDIIDL.js';import'../../_chunks/chunk-FXTZ22TS.js';import'../../_chunks/chunk-MXZD4IG6.js';import'../../_chunks/chunk-SKDHJYOO.js';import'../../_chunks/chunk-S7AZOXFD.js';import'../../_chunks/chunk-3ZUUAIFN.js';import'../../_chunks/chunk-QIUS47UY.js';import'../../_chunks/chunk-ETLDR6XW.js';import'../../_chunks/chunk-NFDDJIRN.js';import'../../_chunks/chunk-Z7GYOTVN.js';import'../../_chunks/chunk-PI263RZJ.js';import'../../_chunks/chunk-V4ZKOYOF.js';import'../../_chunks/chunk-Q6MQJAZI.js';import'../../_chunks/chunk-YZF24X6P.js';import'../../_chunks/chunk-VLOXMCB3.js';import'../../_chunks/chunk-Z6D3LMCU.js';import'../../_chunks/chunk-U3ZJP2GE.js';import'../../_chunks/chunk-FDYQ25JQ.js';import'../../_chunks/chunk-XBJ4RS2B.js';import'../../_chunks/chunk-TIPJC5YT.js';import'../../_chunks/chunk-EYLBXWXJ.js';import'../../_chunks/chunk-LS57WE6K.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, isSheetViewShown, selectionProps, }:
|
|
2
|
+
import { AuthorizationAutoIconProps } from './type';
|
|
3
|
+
declare function CaptureAutoIcon({ voidPercentage, capturePercentage, captureCount, autoType, captureAmount, voidAmount, currency, isTextShown, remainingAmount, isSheetViewShown, selectionProps, }: AuthorizationAutoIconProps): import("react").JSX.Element;
|
|
4
4
|
export default CaptureAutoIcon;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType, captureAmount, voidAmount, currency, isTextShown, isSheetViewShown, selectionProps, remainingAmount, }:
|
|
2
|
+
import { AuthorizationAutoIconProps } from './type';
|
|
3
|
+
declare function VoidAutoIcon({ voidPercentage, capturePercentage, voidCount, autoType, captureAmount, voidAmount, currency, isTextShown, isSheetViewShown, selectionProps, remainingAmount, }: AuthorizationAutoIconProps): import("react").JSX.Element | null;
|
|
4
4
|
export default VoidAutoIcon;
|
|
@@ -268,10 +268,6 @@ export declare const PercentageContainer: import("@emotion/styled").StyledCompon
|
|
|
268
268
|
percentage: number;
|
|
269
269
|
isCapture?: boolean | undefined;
|
|
270
270
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
271
|
-
export declare const PiePercentage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & {
|
|
272
|
-
percentage: number;
|
|
273
|
-
isCapture?: boolean | undefined;
|
|
274
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
275
271
|
export declare const PartialIcon: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
276
272
|
export declare const AutoIconWrapper: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, {}, {}>;
|
|
277
273
|
export declare const AutoIconImage: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TableCellProps } from '@mui/material';
|
|
2
2
|
import { SelectionProps } from '../../../types/index.js';
|
|
3
|
-
export interface
|
|
3
|
+
export interface AuthorizationAutoIconProps extends TableCellProps {
|
|
4
4
|
autoType?: 'VOID' | 'CAPTURED';
|
|
5
5
|
capturePercentage: number;
|
|
6
6
|
captureCount: number;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export declare function RefundStateIcon({ status, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, refundTooltip, }:
|
|
2
|
+
import type { RefundStateIconProps } from './type';
|
|
3
|
+
export declare function RefundStateIcon({ status, gatewayTooltip, unCapturedTooltip, acquirerTooltip, errorCode, acquirerCode, gatewayCode, refundTooltip, }: RefundStateIconProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const refundStatusIcons: {
|
|
2
|
+
REFUNDED: string;
|
|
3
|
+
PAID_OUT: string;
|
|
4
|
+
SETTLED: string;
|
|
5
|
+
PENDING: string;
|
|
6
|
+
UNKNOWN: string;
|
|
7
|
+
TIMEDOUT: string;
|
|
8
|
+
CANCELLED: string;
|
|
9
|
+
FAILED: string;
|
|
10
|
+
DECLINED: string;
|
|
11
|
+
RESTRICTED: string;
|
|
12
|
+
IN_PROGRESS: string;
|
|
13
|
+
ACCEPTED: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { refundStatusIcons } from './constant';
|
|
3
|
+
export type RefundTooltip = React.ReactNode;
|
|
4
|
+
export type RefundStatusIconStatus = keyof typeof refundStatusIcons;
|
|
5
|
+
export interface RefundStatusIconProps {
|
|
6
|
+
status: RefundStatusIconStatus;
|
|
7
|
+
refundTooltip?: RefundTooltip;
|
|
8
|
+
}
|
|
9
|
+
export interface RefundStateIconProps extends Partial<RefundStatusIconProps> {
|
|
10
|
+
gatewayTooltip?: string;
|
|
11
|
+
acquirerTooltip?: string;
|
|
12
|
+
errorCode?: string;
|
|
13
|
+
acquirerCode?: string;
|
|
14
|
+
gatewayCode?: string;
|
|
15
|
+
unCapturedTooltip?: string;
|
|
16
|
+
}
|
|
@@ -10,5 +10,6 @@ export { GeographyIcon } from './GeographyIcon';
|
|
|
10
10
|
export { default as IssuerIcon, type IssuerIconProps } from './IssuerIcon';
|
|
11
11
|
export { PayoutIcon } from './PayoutIcon';
|
|
12
12
|
export { default as RefundIcon } from './RefundIcon';
|
|
13
|
+
export { RefundStatusIcon, RefundStateIcon, type RefundTooltip } from './RefundStatusIcon';
|
|
13
14
|
export { SourceIcons, SourceIcon, getPaymentMethodKey } from './SourceIcons';
|
|
14
15
|
export { DestinationIcon } from './DestinationIcon';
|