@tap-payments/os-micro-frontend-shared 0.3.294 → 0.3.296

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/build/_chunks/{chunk-45E65P5R.js → chunk-2GYKNKWP.js} +1 -1
  2. package/build/_chunks/{chunk-DXDJ7ZQI.js → chunk-2HMREFM4.js} +1 -1
  3. package/build/_chunks/{chunk-45GQW7K7.js → chunk-2JVB4CBT.js} +1 -1
  4. package/build/_chunks/{chunk-IEPHBQH7.js → chunk-2OJIEX5A.js} +1 -1
  5. package/build/_chunks/{chunk-AJUXDLJF.js → chunk-3DVDHBR2.js} +1 -1
  6. package/build/_chunks/{chunk-MPIENGJC.js → chunk-4WGNULKV.js} +1 -1
  7. package/build/_chunks/{chunk-DJHXUNB6.js → chunk-53X3U5WT.js} +1 -1
  8. package/build/_chunks/{chunk-2V7P76GA.js → chunk-6HNOCQKM.js} +1 -1
  9. package/build/_chunks/{chunk-7LWPKOGV.js → chunk-CFSPFRLR.js} +1 -1
  10. package/build/_chunks/{chunk-H6CKZAJN.js → chunk-CJ3XF5H7.js} +1 -1
  11. package/build/_chunks/{chunk-AN73YAF5.js → chunk-DCMZFHWU.js} +1 -1
  12. package/build/_chunks/{chunk-L4KBXHZI.js → chunk-DE3IY3MT.js} +1 -1
  13. package/build/_chunks/{chunk-M2MILDFL.js → chunk-E4LADATG.js} +1 -1
  14. package/build/_chunks/{chunk-VIIDA663.js → chunk-E5IKW34T.js} +1 -1
  15. package/build/_chunks/{chunk-UBMO65ZL.js → chunk-F5BIYZTP.js} +1 -1
  16. package/build/_chunks/{chunk-HWNPJALM.js → chunk-FREJYXH4.js} +1 -1
  17. package/build/_chunks/{chunk-3MRO5CJP.js → chunk-FZV63FZF.js} +1 -1
  18. package/build/_chunks/{chunk-NBVOXBIW.js → chunk-GZT6TVCH.js} +1 -1
  19. package/build/_chunks/{chunk-BDW6QQXH.js → chunk-H7V3RMFL.js} +1 -1
  20. package/build/_chunks/{chunk-52MTQXHO.js → chunk-I5DP4JJP.js} +1 -1
  21. package/build/_chunks/{chunk-OW3B34TK.js → chunk-IBZBQ24S.js} +1 -1
  22. package/build/_chunks/{chunk-PF6NDV3G.js → chunk-IFP6SF7C.js} +1 -1
  23. package/build/_chunks/{chunk-TMAA4QIY.js → chunk-IPAS7KUG.js} +1 -1
  24. package/build/_chunks/{chunk-2WOWP3QA.js → chunk-JECD3SUJ.js} +1 -1
  25. package/build/_chunks/{chunk-MBZVHLRC.js → chunk-JRXEVVE6.js} +1 -1
  26. package/build/_chunks/{chunk-E74Q7ILM.js → chunk-K53Y4LIP.js} +1 -1
  27. package/build/_chunks/{chunk-BTUNGKV3.js → chunk-KS662THD.js} +1 -1
  28. package/build/_chunks/{chunk-OEZIALDT.js → chunk-LDGSDPQG.js} +1 -1
  29. package/build/_chunks/{chunk-3LLAL7SZ.js → chunk-LLM6NHYM.js} +1 -1
  30. package/build/_chunks/{chunk-73SAT4RE.js → chunk-LON5JVKL.js} +1 -1
  31. package/build/_chunks/{chunk-UGYJHC7J.js → chunk-LQM3Z2DG.js} +1 -1
  32. package/build/_chunks/{chunk-7BA3JMDW.js → chunk-MPXLNM5H.js} +1 -1
  33. package/build/_chunks/{chunk-PVUGMA6R.js → chunk-MXFH4OXG.js} +1 -1
  34. package/build/_chunks/{chunk-JRQZANGX.js → chunk-MZ6XDK2C.js} +1 -1
  35. package/build/_chunks/{chunk-77K53QY2.js → chunk-NK2VZN5J.js} +1 -1
  36. package/build/_chunks/{chunk-CGGZ367Q.js → chunk-O2DVDEYE.js} +1 -1
  37. package/build/_chunks/{chunk-2MXRHXGS.js → chunk-O4DC2S3X.js} +1 -1
  38. package/build/_chunks/{chunk-NIWGDILH.js → chunk-ON73ZZC4.js} +1 -1
  39. package/build/_chunks/{chunk-7CT3QCVP.js → chunk-P4O6ZUHX.js} +1 -1
  40. package/build/_chunks/{chunk-MBZF7BHG.js → chunk-PIQOM3XU.js} +1 -1
  41. package/build/_chunks/{chunk-QKUEMUT3.js → chunk-R36BQKUP.js} +1 -1
  42. package/build/_chunks/{chunk-ZLXQBIAQ.js → chunk-RRCCQYTR.js} +1 -1
  43. package/build/_chunks/{chunk-2W2GZUKF.js → chunk-SFSBWZ7X.js} +1 -1
  44. package/build/_chunks/{chunk-DD3TYF3Y.js → chunk-TIRLOG6N.js} +1 -1
  45. package/build/_chunks/{chunk-ZQFDXQ4J.js → chunk-TQTPWNPP.js} +1 -1
  46. package/build/_chunks/{chunk-ANIJPMR3.js → chunk-TYSOX6NR.js} +1 -1
  47. package/build/_chunks/{chunk-YWZJZGDA.js → chunk-UIPXZKRC.js} +1 -1
  48. package/build/_chunks/{chunk-K67DFHSS.js → chunk-UPMCMJEB.js} +1 -1
  49. package/build/_chunks/{chunk-MKDL4TYN.js → chunk-VGYJZKKP.js} +1 -1
  50. package/build/_chunks/{chunk-3ANVVXOL.js → chunk-VI3D56OM.js} +1 -1
  51. package/build/_chunks/{chunk-OTG5BKW6.js → chunk-VJSBADTP.js} +1 -1
  52. package/build/_chunks/chunk-VRGBJY4Q.js +2 -0
  53. package/build/_chunks/{chunk-6X4K2W2E.js → chunk-WDPW2DRV.js} +1 -1
  54. package/build/_chunks/{chunk-L2PULJKK.js → chunk-WFI7MJL2.js} +1 -1
  55. package/build/_chunks/{chunk-BAXN7S2I.js → chunk-WO7POLIC.js} +1 -1
  56. package/build/_chunks/{chunk-UPUJEOOS.js → chunk-X5C35MQV.js} +1 -1
  57. package/build/_chunks/{chunk-UKV3UR3X.js → chunk-XGCSZNS4.js} +1 -1
  58. package/build/_chunks/{chunk-JZK2QZX3.js → chunk-XS7CI5J5.js} +1 -1
  59. package/build/_chunks/{chunk-7WMSYKS3.js → chunk-XSKYIV6B.js} +1 -1
  60. package/build/_chunks/{chunk-ZQ6WQPET.js → chunk-Y4RJCNYA.js} +1 -1
  61. package/build/_chunks/{chunk-CRSHY7OT.js → chunk-YA3JU4XB.js} +1 -1
  62. package/build/_chunks/{chunk-HI2JOLXL.js → chunk-YUT3GEP2.js} +1 -1
  63. package/build/_chunks/{chunk-F5H3U3NJ.js → chunk-YZFTHJHW.js} +1 -1
  64. package/build/_chunks/{chunk-LBKOWCCN.js → chunk-ZBMJOLJG.js} +1 -1
  65. package/build/_chunks/{chunk-N5K54WNL.js → chunk-ZFPXHFBW.js} +1 -1
  66. package/build/_chunks/{chunk-Q2GI76OF.js → chunk-ZWEVMVLG.js} +1 -1
  67. package/build/components/ActionsDropdownMenu/index.js +1 -1
  68. package/build/components/Alert/index.js +1 -1
  69. package/build/components/AreaChart/index.js +1 -1
  70. package/build/components/Autocomplete/index.js +1 -1
  71. package/build/components/AvatarStack/index.js +1 -1
  72. package/build/components/Calender/index.js +1 -1
  73. package/build/components/Card/index.js +1 -1
  74. package/build/components/CardList/index.js +1 -1
  75. package/build/components/ColorPicker/index.js +1 -1
  76. package/build/components/ColumnViews/index.js +1 -1
  77. package/build/components/ConfirmDialog/index.js +1 -1
  78. package/build/components/CountryFilter/index.js +1 -1
  79. package/build/components/CountryFlag/index.js +1 -1
  80. package/build/components/CurrenciesMenu/index.js +1 -1
  81. package/build/components/CurrencyAmount/index.js +1 -1
  82. package/build/components/CurrencyAmountInput/index.js +1 -1
  83. package/build/components/CurrencySymbol/index.js +1 -1
  84. package/build/components/DateFilter/index.js +1 -1
  85. package/build/components/DateInput/index.js +1 -1
  86. package/build/components/DeviceIcon/index.js +1 -1
  87. package/build/components/EmptyState/index.js +1 -1
  88. package/build/components/ErrorToast/index.js +1 -1
  89. package/build/components/ExpandableChip/index.js +1 -1
  90. package/build/components/ExportReportButton/index.js +1 -1
  91. package/build/components/FileDropbox/index.js +1 -1
  92. package/build/components/FilePreview/index.js +1 -1
  93. package/build/components/FileUploader/index.js +1 -1
  94. package/build/components/FilterBar/index.js +1 -1
  95. package/build/components/FilterChip/index.js +1 -1
  96. package/build/components/FilterDropdown/index.js +1 -1
  97. package/build/components/Filters/index.js +1 -1
  98. package/build/components/FlipCard/index.js +1 -1
  99. package/build/components/GroupedSelect/index.js +1 -1
  100. package/build/components/HeatMap/index.js +1 -1
  101. package/build/components/ListColumnFilter/index.js +1 -1
  102. package/build/components/ListHeader/index.js +1 -1
  103. package/build/components/ListLayout/index.js +1 -1
  104. package/build/components/Loader/index.js +1 -1
  105. package/build/components/Logo/index.js +1 -1
  106. package/build/components/MaskedText/index.js +1 -1
  107. package/build/components/MultiLevelMenu/index.js +1 -1
  108. package/build/components/MultiLevelSelect/index.js +1 -1
  109. package/build/components/PhoneFilter/index.js +1 -1
  110. package/build/components/PhoneInput/index.js +1 -1
  111. package/build/components/ProgressRing/index.js +1 -1
  112. package/build/components/RadioGroup/index.js +1 -1
  113. package/build/components/RangeCalender/index.js +1 -1
  114. package/build/components/RatingCount/index.js +1 -1
  115. package/build/components/SearchButton/index.js +1 -1
  116. package/build/components/SearchInput/index.js +1 -1
  117. package/build/components/Select/index.js +1 -1
  118. package/build/components/SheetViewChip/index.js +1 -1
  119. package/build/components/Sidebar/index.js +1 -1
  120. package/build/components/StatusFilter/index.js +1 -1
  121. package/build/components/StatusIcons/index.js +1 -1
  122. package/build/components/TableCells/index.js +1 -1
  123. package/build/components/TextInput/index.js +1 -1
  124. package/build/components/Timeline/index.js +1 -1
  125. package/build/components/Timepicker/index.js +1 -1
  126. package/build/components/VerificationIcon/index.js +1 -1
  127. package/build/components/VirtualTables/index.js +1 -1
  128. package/build/components/Window/index.js +1 -1
  129. package/build/components/WindowServices/index.js +1 -1
  130. package/build/components/WindowToolbar/index.js +1 -1
  131. package/build/components/index.js +1 -1
  132. package/build/components/modules/JSONViewWindow/index.js +1 -1
  133. package/build/components/modules/RangeCalender/index.js +1 -1
  134. package/build/components/modules/VirtualTables/index.js +1 -1
  135. package/build/components/modules/WindowShell/index.js +1 -1
  136. package/build/components/modules/index.js +1 -1
  137. package/build/components/primitives/index.js +1 -1
  138. package/build/constants/apps.d.ts +3 -0
  139. package/build/constants/index.js +1 -1
  140. package/build/datetime/components/index.js +1 -1
  141. package/build/hooks/core/index.js +1 -1
  142. package/build/hooks/index.js +1 -1
  143. package/build/index.js +1 -1
  144. package/build/utils/index.js +1 -1
  145. package/package.json +1 -1
  146. package/build/_chunks/chunk-FI5H6V55.js +0 -2
@@ -1 +1 @@
1
- import {Hb}from'./chunk-2V7P76GA.js';import {Th}from'./chunk-FI5H6V55.js';import {forwardRef,memo}from'react';import h from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-EmptyState",t={root:`${o}-root`,icon:`${o}-icon`,title:`${o}-title`,description:`${o}-description`},l="Empty state",n="No data found",y="There is nothing to show here yet.";var c=styled(h)(()=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.5rem"})),S=styled("img")(()=>({width:"2rem",height:"2rem"})),d=styled("h1")(({theme:e})=>({fontWeight:600,fontSize:"1rem",color:e.palette.text?.primary,padding:0,margin:0,textAlign:"center"})),f=styled("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,padding:0,margin:0,opacity:.5,textAlign:"center"}));var T=jsx(S,{src:Th,alt:l,className:t.icon}),x=forwardRef(({className:e,sx:E,icon:g=T,title:m=n,description:r=y,children:N,...u},D)=>jsxs(c,{ref:D,className:Hb(t.root,e),sx:E,"data-testid":"EmptyState",...u,children:[g,m?jsx(d,{className:t.title,children:m}):null,r?jsx(f,{className:t.description,children:r}):null,N]}));x.displayName="EmptyState";var A=memo(x);export{t as a,A as b};
1
+ import {Hb}from'./chunk-6HNOCQKM.js';import {Th}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo}from'react';import h from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-EmptyState",t={root:`${o}-root`,icon:`${o}-icon`,title:`${o}-title`,description:`${o}-description`},l="Empty state",n="No data found",y="There is nothing to show here yet.";var c=styled(h)(()=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.5rem"})),S=styled("img")(()=>({width:"2rem",height:"2rem"})),d=styled("h1")(({theme:e})=>({fontWeight:600,fontSize:"1rem",color:e.palette.text?.primary,padding:0,margin:0,textAlign:"center"})),f=styled("p")(({theme:e})=>({fontWeight:400,fontSize:"0.75rem",color:e.palette.text?.primary,padding:0,margin:0,opacity:.5,textAlign:"center"}));var T=jsx(S,{src:Th,alt:l,className:t.icon}),x=forwardRef(({className:e,sx:E,icon:g=T,title:m=n,description:r=y,children:N,...u},D)=>jsxs(c,{ref:D,className:Hb(t.root,e),sx:E,"data-testid":"EmptyState",...u,children:[g,m?jsx(d,{className:t.title,children:m}):null,r?jsx(f,{className:t.description,children:r}):null,N]}));x.displayName="EmptyState";var A=memo(x);export{t as a,A as b};
@@ -1 +1 @@
1
- import {d,j}from'./chunk-3LLAL7SZ.js';import {rb,ob,Hb}from'./chunk-2V7P76GA.js';import {Lj,Re,Gb}from'./chunk-FI5H6V55.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-FileUploader",a={root:`${p}-root`,content:`${p}-content`,iconWrapper:`${p}-iconWrapper`,textWrapper:`${p}-textWrapper`,upload:`${p}-upload`,maximum:`${p}-maximum`,errorMessage:`${p}-errorMessage`,closeButton:`${p}-closeButton`};var E=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>{let{grey:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:s[50],gap:e.v2.spacing(8),cursor:o?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...o&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}}}),V=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),v=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:e.v2.spacing(4),color:"inherit"})),G=styled("div")(({theme:e})=>{let{grey:o,base:s}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,padding:e.v2.spacing(7),backgroundColor:s.white,borderRadius:e.v2.radius(4),border:`1px solid ${o[100]}`}}),H=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16,padding:0,marginLeft:"auto"}));function J(e,o){return e||(o?`PDF, JPG or PNG files up to ${o}`:"PDF, JPG or PNG files")}var pe="Click to upload",L=forwardRef(function({options:o,files:s,onChange:$,processFiles:U,disabled:f,error:I,invalidFileTypeText:P="Invalid file type",fileTooLargePrefix:W="File is larger than",maxFileSize:F,preventDuplicates:y,label:A=pe,hintText:K,onResetError:C,className:O,sx:Q,id:w},Y){let[S,g]=useState(null),T=useCallback(t=>{if(g(null),U)return U(t);if(!y)return t.map(r=>({file:r,id:r.name}));let l=[],n=[];for(let r of t)rb(r,s??[])?l.push(r.name):n.push({file:r,id:r.name});if(l.length>0){let r=l.length===1?"file":"files";g(`Duplicate ${r} detected: ${l.join(", ")}`);}return n},[s,y,U]),Z=useCallback(t=>{if(t.length===0){g(null);return}let l=T(t);(l.length>0||!y)&&$?.(l);},[T,y,$]),{getRootProps:_,getInputProps:ee,open:te,isDragReject:j$1,fileRejections:d$1}=useDropzone({...o,disabled:f||o?.disabled,onDrop:(t,l,n)=>{o?.onDrop?.(t,l,n),Z(t);}}),x=useMemo(()=>{if(F)return F;if(o?.maxSize)return ob(o.maxSize,0).toUpperCase()},[F,o?.maxSize]),c=useMemo(()=>{let t=!!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-invalid-type"));return !!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-too-large"))&&x?`${W} ${x}`:t||j$1?P:S||I},[j$1,d$1,x,S,I,P,W]),oe=J(K,x),re=useCallback(t=>{t.stopPropagation(),g(null),C?.(t);},[C]);return jsxs(E,{ref:Y,id:w,"data-testid":w??"FileUploader",..._(),className:Hb(a.root,O),sx:Q,$disabled:f,onClick:f?void 0:te,children:[jsx("input",{"data-slot":"input",...ee(),disabled:f}),jsxs(V,{"data-slot":"content",className:a.content,children:[jsx(G,{"data-slot":"icon-wrapper",className:a.iconWrapper,children:jsx(d,{src:c?Lj:Re,alt:c?"Upload error":"Upload file",sx:{width:16,height:16}})}),c?jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"micro.medium",className:a.errorMessage,sx:t=>({color:t.v2.palette.error[500]}),children:c}),jsx(j,{textVariant:"caption.medium",className:a.upload,children:"Click to upload again"})]}):jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"caption.medium",className:a.upload,children:A}),jsx(j,{textVariant:"micro.medium",className:a.maximum,sx:{opacity:.7},children:oe})]})]}),c&&C&&jsx(H,{type:"button","data-slot":"close-icon-wrapper",className:a.closeButton,onClick:re,"aria-label":"Dismiss upload error",children:jsx(d,{src:Gb,alt:"Dismiss",sx:{width:10,height:10}})})]})});L.displayName="FileUploader";var X=memo(L);export{a,X as b};
1
+ import {d,j}from'./chunk-LLM6NHYM.js';import {rb,ob,Hb}from'./chunk-6HNOCQKM.js';import {Lj,Re,Gb}from'./chunk-VRGBJY4Q.js';import {forwardRef,useState,useCallback,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var p="os-shared-FileUploader",a={root:`${p}-root`,content:`${p}-content`,iconWrapper:`${p}-iconWrapper`,textWrapper:`${p}-textWrapper`,upload:`${p}-upload`,maximum:`${p}-maximum`,errorMessage:`${p}-errorMessage`,closeButton:`${p}-closeButton`};var E=styled("div",{shouldForwardProp:e=>e!=="$disabled"})(({theme:e,$disabled:o})=>{let{grey:s}=e.v2.palette;return {width:"100%",borderRadius:e.v2.radius(4),padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,display:"flex",alignItems:"center",justifyContent:"flex-start",backgroundColor:s[50],gap:e.v2.spacing(8),cursor:o?"default":"pointer",position:"relative",'& [data-slot="input"]':{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:1,margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:1,whiteSpace:"nowrap"},...o&&{'& [data-slot="content"], & [data-slot="icon-wrapper"]':{cursor:"default",opacity:.6}}}}),V=styled("div")(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",color:"inherit",cursor:"pointer",gap:e.v2.spacing(8)})),v=styled("div")(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"center",gap:e.v2.spacing(4),color:"inherit"})),G=styled("div")(({theme:e})=>{let{grey:o,base:s}=e.v2.palette;return {display:"flex",alignItems:"center",justifyContent:"center",boxSizing:"border-box",width:32,height:32,flexShrink:0,padding:e.v2.spacing(7),backgroundColor:s.white,borderRadius:e.v2.radius(4),border:`1px solid ${o[100]}`}}),H=styled("button")(()=>({display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",border:"none",width:16,height:16,padding:0,marginLeft:"auto"}));function J(e,o){return e||(o?`PDF, JPG or PNG files up to ${o}`:"PDF, JPG or PNG files")}var pe="Click to upload",L=forwardRef(function({options:o,files:s,onChange:$,processFiles:U,disabled:f,error:I,invalidFileTypeText:P="Invalid file type",fileTooLargePrefix:W="File is larger than",maxFileSize:F,preventDuplicates:y,label:A=pe,hintText:K,onResetError:C,className:O,sx:Q,id:w},Y){let[S,g]=useState(null),T=useCallback(t=>{if(g(null),U)return U(t);if(!y)return t.map(r=>({file:r,id:r.name}));let l=[],n=[];for(let r of t)rb(r,s??[])?l.push(r.name):n.push({file:r,id:r.name});if(l.length>0){let r=l.length===1?"file":"files";g(`Duplicate ${r} detected: ${l.join(", ")}`);}return n},[s,y,U]),Z=useCallback(t=>{if(t.length===0){g(null);return}let l=T(t);(l.length>0||!y)&&$?.(l);},[T,y,$]),{getRootProps:_,getInputProps:ee,open:te,isDragReject:j$1,fileRejections:d$1}=useDropzone({...o,disabled:f||o?.disabled,onDrop:(t,l,n)=>{o?.onDrop?.(t,l,n),Z(t);}}),x=useMemo(()=>{if(F)return F;if(o?.maxSize)return ob(o.maxSize,0).toUpperCase()},[F,o?.maxSize]),c=useMemo(()=>{let t=!!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-invalid-type"));return !!d$1?.length&&d$1.some(n=>n.errors?.some(r=>r.code==="file-too-large"))&&x?`${W} ${x}`:t||j$1?P:S||I},[j$1,d$1,x,S,I,P,W]),oe=J(K,x),re=useCallback(t=>{t.stopPropagation(),g(null),C?.(t);},[C]);return jsxs(E,{ref:Y,id:w,"data-testid":w??"FileUploader",..._(),className:Hb(a.root,O),sx:Q,$disabled:f,onClick:f?void 0:te,children:[jsx("input",{"data-slot":"input",...ee(),disabled:f}),jsxs(V,{"data-slot":"content",className:a.content,children:[jsx(G,{"data-slot":"icon-wrapper",className:a.iconWrapper,children:jsx(d,{src:c?Lj:Re,alt:c?"Upload error":"Upload file",sx:{width:16,height:16}})}),c?jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"micro.medium",className:a.errorMessage,sx:t=>({color:t.v2.palette.error[500]}),children:c}),jsx(j,{textVariant:"caption.medium",className:a.upload,children:"Click to upload again"})]}):jsxs(v,{className:a.textWrapper,children:[jsx(j,{textVariant:"caption.medium",className:a.upload,children:A}),jsx(j,{textVariant:"micro.medium",className:a.maximum,sx:{opacity:.7},children:oe})]})]}),c&&C&&jsx(H,{type:"button","data-slot":"close-icon-wrapper",className:a.closeButton,onClick:re,"aria-label":"Dismiss upload error",children:jsx(d,{src:Gb,alt:"Dismiss",sx:{width:10,height:10}})})]})});L.displayName="FileUploader";var X=memo(L);export{a,X as b};
@@ -1 +1 @@
1
- import {d}from'./chunk-3LLAL7SZ.js';import {Gb,Hb}from'./chunk-2V7P76GA.js';import {Pj,j,m}from'./chunk-FI5H6V55.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-CountryFlag",a={root:`${x}-root`};var p=styled(d)({width:"auto",height:"auto"});var f=forwardRef(({countryCode:o,currencyCode:t,width:y=16,height:i,alt:u,id:s,className:F,sx:C},c)=>jsx(p,{ref:c,id:s,"data-testid":s??"CountryFlag",src:o&&j(o)||t&&m(t)||Pj,alt:u??o??t??"flag",loading:"lazy",onError:d=>{d.currentTarget.src=Pj;},className:Hb(a.root,F),sx:Gb({width:y,height:i},C)}));f.displayName="CountryFlag";var P=memo(f);export{a,P as b};
1
+ import {d}from'./chunk-LLM6NHYM.js';import {Gb,Hb}from'./chunk-6HNOCQKM.js';import {Pj,j,m}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var x="os-shared-CountryFlag",a={root:`${x}-root`};var p=styled(d)({width:"auto",height:"auto"});var f=forwardRef(({countryCode:o,currencyCode:t,width:y=16,height:i,alt:u,id:s,className:F,sx:C},c)=>jsx(p,{ref:c,id:s,"data-testid":s??"CountryFlag",src:o&&j(o)||t&&m(t)||Pj,alt:u??o??t??"flag",loading:"lazy",onError:d=>{d.currentTarget.src=Pj;},className:Hb(a.root,F),sx:Gb({width:y,height:i},C)}));f.displayName="CountryFlag";var P=memo(f);export{a,P as b};
@@ -1 +1 @@
1
- import {b as b$1,a}from'./chunk-3LLAL7SZ.js';import {Hb}from'./chunk-2V7P76GA.js';import {forwardRef,useState,useRef,useEffect,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import it from'@mui/material/Box';var r="os-shared-SearchButton",e={root:`${r}-root`,field:`${r}-field`,clear:`${r}-clear`,clearIcon:`${r}-clearIcon`,trigger:`${r}-trigger`,triggerActive:`${r}-triggerActive`},n=12,l=30,E=32,I=30,m=200,b={duration:.18,ease:"easeInOut"},A={duration:.05,ease:"easeIn"},y=3,O=10,f=11,H=48;var L=t=>jsx("svg",{width:n,height:n,viewBox:"0 0 7 7",fill:"none","aria-hidden":"true",...t,children:jsx("path",{d:"M2.55453 0C1.14683 0 0 1.15002 0 2.56164C0 3.97325 1.14683 5.12328 2.55453 5.12328C3.16345 5.12328 3.72322 4.90758 4.16281 4.54912L5.89118 6.28229C5.91553 6.30772 5.9447 6.32803 5.97697 6.34202C6.00925 6.356 6.04398 6.36339 6.07913 6.36375C6.11429 6.36411 6.14917 6.35743 6.18172 6.3441C6.21427 6.33078 6.24384 6.31107 6.2687 6.28614C6.29356 6.26121 6.31321 6.23156 6.3265 6.19892C6.33979 6.16627 6.34645 6.1313 6.3461 6.09605C6.34574 6.06079 6.33837 6.02596 6.32442 5.9936C6.31047 5.96124 6.29022 5.93199 6.26486 5.90757L4.53649 4.17439C4.89396 3.73358 5.10906 3.17225 5.10906 2.56164C5.10906 1.15002 3.96223 0 2.55453 0ZM2.55453 0.529994C3.6766 0.529994 4.58054 1.43645 4.58054 2.56164C4.58054 3.10976 4.36494 3.60497 4.0152 3.96978C3.99364 3.98567 3.97461 4.00475 3.95877 4.02637C3.59497 4.37708 3.10113 4.59328 2.55453 4.59328C1.43247 4.59328 0.528524 3.68682 0.528524 2.56164C0.528524 1.43645 1.43247 0.529994 2.55453 0.529994Z",fill:"currentColor"})}),D=t=>jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":"true",...t,children:jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"currentColor"})});var U=styled(it)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:y,width:"fit-content",height:t.v2.spacing(32),gap:t.v2.spacing(8)})),G=styled(motion.input)(({theme:t})=>{let{base:i,grey:o,brand:s}=t.v2.palette;return {padding:t.v2.spacing(8),paddingRight:t.v2.spacing(24),borderRadius:t.v2.radius(4),height:t.v2.spacing(32),color:o[900],fontSize:t.v2.typography.textVariants.body.small.regular.fontSize,outline:0,position:"relative",zIndex:O,background:i.white,display:"flex",minWidth:0,flexGrow:0,flexShrink:0,boxShadow:`0px 0px 4px 0px ${alpha(s[500],.5)}`,border:`1px solid ${s[500]}`,willChange:"width","::placeholder":{color:"#D5D5D5"}}}),F=styled(motion.button)(({theme:t})=>({position:"absolute",zIndex:f,top:0,bottom:0,right:t.v2.spacing(H),marginBlock:"auto",width:t.v2.spacing(24),height:t.v2.spacing(24),padding:0,border:"none",background:"transparent",color:t.v2.palette.grey[500],cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",lineHeight:0,[`& .${e.clearIcon}`]:{backgroundColor:t.v2.palette.grey[100],borderRadius:"50%"}})),k=styled(b$1)(({theme:t})=>{let{base:i}=t.v2.palette,o="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)";return {position:"relative",zIndex:f,"&&":{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,borderWidth:"1px",borderStyle:"solid",borderRadius:t.v2.radius(4)},[`&& .${a.icon}`]:{width:t.v2.spacing(n),height:t.v2.spacing(n)},"&:hover":{opacity:.7},[`&&.${e.triggerActive}`]:{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,border:"1px solid transparent",backgroundColor:"transparent",backgroundImage:o,backgroundClip:"padding-box",backgroundOrigin:"padding-box",color:i.white,boxShadow:"none",outline:"none","&:hover, &:focus, &:focus-visible":{opacity:.8}}}});var W=forwardRef(({onSearchChange:t,placeholder:i,defaultValue:o,id:s,className:z,sx:M,disabled:V,title:K,"aria-label":Y},j)=>{let[c,S]=useState(!!o),[q,g]=useState(false),[p,T]=useState(o??""),B=useRef(null),d=useRef(false),J=useTheme(),{t:Q}=useTranslation(),R=i??(Q("search")||"");useEffect(()=>{T(o??""),S(!!o);},[o]),useEffect(()=>{if(!c){d.current=false;return}d.current&&(d.current=false,B.current?.focus());},[c]);let tt=()=>{g(true),S(false),t?.(""),T("");},et=()=>{p&&t?.(p);},ot=()=>{c||(d.current=true),g(false),S(true),et();},rt=_=>{_.key==="Enter"&&t?.(p);},nt=_=>{T(_.currentTarget.value);},at=c||q;return jsxs(U,{ref:j,id:s,className:Hb(e.root,z),sx:M,"data-testid":s??"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>g(false),children:c&&jsxs(Fragment,{children:[jsx(G,{ref:B,className:e.field,initial:{width:I},animate:{width:m},exit:{width:I,border:`1px solid ${J.v2.palette.grey[100]}`,boxShadow:"none"},transition:b,placeholder:R,value:p,onKeyDown:rt,onChange:nt,"aria-label":R||"Search"}),jsx(F,{className:e.clear,type:"button",initial:{opacity:1},exit:{opacity:0},transition:A,"aria-label":"Clear search",onClick:tt,children:jsx(D,{className:e.clearIcon})})]})}),jsx(k,{type:"button",variant:"secondary",icon:jsx(L,{}),"aria-label":Y??"Search",disabled:V,title:K,className:Hb(e.trigger,at&&e.triggerActive),onClick:ot})]})});W.displayName="SearchButton";var X=memo(W);export{e as a,X as b};
1
+ import {b as b$1,a}from'./chunk-LLM6NHYM.js';import {Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,useState,useRef,useEffect,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import it from'@mui/material/Box';var r="os-shared-SearchButton",e={root:`${r}-root`,field:`${r}-field`,clear:`${r}-clear`,clearIcon:`${r}-clearIcon`,trigger:`${r}-trigger`,triggerActive:`${r}-triggerActive`},n=12,l=30,E=32,I=30,m=200,b={duration:.18,ease:"easeInOut"},A={duration:.05,ease:"easeIn"},y=3,O=10,f=11,H=48;var L=t=>jsx("svg",{width:n,height:n,viewBox:"0 0 7 7",fill:"none","aria-hidden":"true",...t,children:jsx("path",{d:"M2.55453 0C1.14683 0 0 1.15002 0 2.56164C0 3.97325 1.14683 5.12328 2.55453 5.12328C3.16345 5.12328 3.72322 4.90758 4.16281 4.54912L5.89118 6.28229C5.91553 6.30772 5.9447 6.32803 5.97697 6.34202C6.00925 6.356 6.04398 6.36339 6.07913 6.36375C6.11429 6.36411 6.14917 6.35743 6.18172 6.3441C6.21427 6.33078 6.24384 6.31107 6.2687 6.28614C6.29356 6.26121 6.31321 6.23156 6.3265 6.19892C6.33979 6.16627 6.34645 6.1313 6.3461 6.09605C6.34574 6.06079 6.33837 6.02596 6.32442 5.9936C6.31047 5.96124 6.29022 5.93199 6.26486 5.90757L4.53649 4.17439C4.89396 3.73358 5.10906 3.17225 5.10906 2.56164C5.10906 1.15002 3.96223 0 2.55453 0ZM2.55453 0.529994C3.6766 0.529994 4.58054 1.43645 4.58054 2.56164C4.58054 3.10976 4.36494 3.60497 4.0152 3.96978C3.99364 3.98567 3.97461 4.00475 3.95877 4.02637C3.59497 4.37708 3.10113 4.59328 2.55453 4.59328C1.43247 4.59328 0.528524 3.68682 0.528524 2.56164C0.528524 1.43645 1.43247 0.529994 2.55453 0.529994Z",fill:"currentColor"})}),D=t=>jsx("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none","aria-hidden":"true",...t,children:jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"currentColor"})});var U=styled(it)(({theme:t})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:y,width:"fit-content",height:t.v2.spacing(32),gap:t.v2.spacing(8)})),G=styled(motion.input)(({theme:t})=>{let{base:i,grey:o,brand:s}=t.v2.palette;return {padding:t.v2.spacing(8),paddingRight:t.v2.spacing(24),borderRadius:t.v2.radius(4),height:t.v2.spacing(32),color:o[900],fontSize:t.v2.typography.textVariants.body.small.regular.fontSize,outline:0,position:"relative",zIndex:O,background:i.white,display:"flex",minWidth:0,flexGrow:0,flexShrink:0,boxShadow:`0px 0px 4px 0px ${alpha(s[500],.5)}`,border:`1px solid ${s[500]}`,willChange:"width","::placeholder":{color:"#D5D5D5"}}}),F=styled(motion.button)(({theme:t})=>({position:"absolute",zIndex:f,top:0,bottom:0,right:t.v2.spacing(H),marginBlock:"auto",width:t.v2.spacing(24),height:t.v2.spacing(24),padding:0,border:"none",background:"transparent",color:t.v2.palette.grey[500],cursor:"pointer",display:"inline-flex",alignItems:"center",justifyContent:"flex-end",lineHeight:0,[`& .${e.clearIcon}`]:{backgroundColor:t.v2.palette.grey[100],borderRadius:"50%"}})),k=styled(b$1)(({theme:t})=>{let{base:i}=t.v2.palette,o="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)";return {position:"relative",zIndex:f,"&&":{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,borderWidth:"1px",borderStyle:"solid",borderRadius:t.v2.radius(4)},[`&& .${a.icon}`]:{width:t.v2.spacing(n),height:t.v2.spacing(n)},"&:hover":{opacity:.7},[`&&.${e.triggerActive}`]:{boxSizing:"border-box",width:t.v2.spacing(l),minWidth:t.v2.spacing(l),height:t.v2.spacing(E),padding:0,border:"1px solid transparent",backgroundColor:"transparent",backgroundImage:o,backgroundClip:"padding-box",backgroundOrigin:"padding-box",color:i.white,boxShadow:"none",outline:"none","&:hover, &:focus, &:focus-visible":{opacity:.8}}}});var W=forwardRef(({onSearchChange:t,placeholder:i,defaultValue:o,id:s,className:z,sx:M,disabled:V,title:K,"aria-label":Y},j)=>{let[c,S]=useState(!!o),[q,g]=useState(false),[p,T]=useState(o??""),B=useRef(null),d=useRef(false),J=useTheme(),{t:Q}=useTranslation(),R=i??(Q("search")||"");useEffect(()=>{T(o??""),S(!!o);},[o]),useEffect(()=>{if(!c){d.current=false;return}d.current&&(d.current=false,B.current?.focus());},[c]);let tt=()=>{g(true),S(false),t?.(""),T("");},et=()=>{p&&t?.(p);},ot=()=>{c||(d.current=true),g(false),S(true),et();},rt=_=>{_.key==="Enter"&&t?.(p);},nt=_=>{T(_.currentTarget.value);},at=c||q;return jsxs(U,{ref:j,id:s,className:Hb(e.root,z),sx:M,"data-testid":s??"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>g(false),children:c&&jsxs(Fragment,{children:[jsx(G,{ref:B,className:e.field,initial:{width:I},animate:{width:m},exit:{width:I,border:`1px solid ${J.v2.palette.grey[100]}`,boxShadow:"none"},transition:b,placeholder:R,value:p,onKeyDown:rt,onChange:nt,"aria-label":R||"Search"}),jsx(F,{className:e.clear,type:"button",initial:{opacity:1},exit:{opacity:0},transition:A,"aria-label":"Clear search",onClick:tt,children:jsx(D,{className:e.clearIcon})})]})}),jsx(k,{type:"button",variant:"secondary",icon:jsx(L,{}),"aria-label":Y??"Search",disabled:V,title:K,className:Hb(e.trigger,at&&e.triggerActive),onClick:ot})]})});W.displayName="SearchButton";var X=memo(W);export{e as a,X as b};
@@ -1 +1 @@
1
- import {Hb}from'./chunk-2V7P76GA.js';import {forwardRef,memo}from'react';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p="os-shared-ListLayout",t={root:`${p}-root`};var a=styled(y)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));var e=forwardRef(({id:o,className:r,sx:i,children:m,...L},l)=>jsx(a,{ref:l,component:"article",id:o,"data-testid":o??"ListLayout",...L,className:Hb(t.root,r),sx:i,children:m}));e.displayName="ListLayout";var d=memo(e);export{t as a,d as b};
1
+ import {Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,memo}from'react';import y from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var p="os-shared-ListLayout",t={root:`${p}-root`};var a=styled(y)(()=>({flex:1,position:"relative",display:"flex",flexDirection:"column",height:"100%"}));var e=forwardRef(({id:o,className:r,sx:i,children:m,...L},l)=>jsx(a,{ref:l,component:"article",id:o,"data-testid":o??"ListLayout",...L,className:Hb(t.root,r),sx:i,children:m}));e.displayName="ListLayout";var d=memo(e);export{t as a,d as b};
@@ -1 +1 @@
1
- import {j}from'./chunk-3LLAL7SZ.js';import {Hb}from'./chunk-2V7P76GA.js';import {kf}from'./chunk-FI5H6V55.js';import {forwardRef,memo}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-ErrorToast",t={root:`${a}-root`,message:`${a}-message`,icon:`${a}-icon`};var i=styled(Box,{shouldForwardProp:o=>o!=="toastPosition"})(({theme:o,toastPosition:r})=>({width:160,position:"absolute",bottom:12,zIndex:1e3,display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:o.v2.palette.background.primary,height:31,gap:o.v2.spacing(8),borderRadius:o.v2.radius(8),borderWidth:1,padding:o.v2.spacing(8),border:`1px solid ${o.v2.palette.border.default}`,boxShadow:"0px 0px 16px 0px #00000014",animation:"slideIn 0.5s ease-out",...r==="bottom-center"&&{left:"50%",transform:"translateX(-50%)"},...r==="bottom-right"&&{right:12,transform:"none"},...r==="bottom-left"&&{left:12,transform:"none"},"@keyframes slideIn":{"0%":{opacity:0,transform:r==="bottom-center"?"translate(-50%, 100%)":r==="bottom-right"?"translateX(100%)":"translateX(-100%)"},"100%":{opacity:1,transform:r==="bottom-center"?"translate(-50%, 0)":"translateX(0)"}}})),l=styled("img")({cursor:"pointer"});var c=forwardRef(({message:o="Something went wrong",onRetry:r,position:f="bottom-center",id:e,className:T,sx:y,...g},x)=>jsxs(i,{ref:x,...g,className:Hb(t.root,T),sx:y,id:e,"data-testid":e??"ErrorToast",toastPosition:f,children:[jsx(j,{component:"p",textVariant:"body.small.medium",noWrap:true,className:t.message,children:o}),jsx(l,{className:t.icon,onClick:b=>r?.(b),src:kf,alt:"toast-icon"})]}));c.displayName="ErrorToast";var N=memo(c);export{t as a,N as b};
1
+ import {j}from'./chunk-LLM6NHYM.js';import {Hb}from'./chunk-6HNOCQKM.js';import {kf}from'./chunk-VRGBJY4Q.js';import {forwardRef,memo}from'react';import {styled,Box}from'@mui/material';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-ErrorToast",t={root:`${a}-root`,message:`${a}-message`,icon:`${a}-icon`};var i=styled(Box,{shouldForwardProp:o=>o!=="toastPosition"})(({theme:o,toastPosition:r})=>({width:160,position:"absolute",bottom:12,zIndex:1e3,display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:o.v2.palette.background.primary,height:31,gap:o.v2.spacing(8),borderRadius:o.v2.radius(8),borderWidth:1,padding:o.v2.spacing(8),border:`1px solid ${o.v2.palette.border.default}`,boxShadow:"0px 0px 16px 0px #00000014",animation:"slideIn 0.5s ease-out",...r==="bottom-center"&&{left:"50%",transform:"translateX(-50%)"},...r==="bottom-right"&&{right:12,transform:"none"},...r==="bottom-left"&&{left:12,transform:"none"},"@keyframes slideIn":{"0%":{opacity:0,transform:r==="bottom-center"?"translate(-50%, 100%)":r==="bottom-right"?"translateX(100%)":"translateX(-100%)"},"100%":{opacity:1,transform:r==="bottom-center"?"translate(-50%, 0)":"translateX(0)"}}})),l=styled("img")({cursor:"pointer"});var c=forwardRef(({message:o="Something went wrong",onRetry:r,position:f="bottom-center",id:e,className:T,sx:y,...g},x)=>jsxs(i,{ref:x,...g,className:Hb(t.root,T),sx:y,id:e,"data-testid":e??"ErrorToast",toastPosition:f,children:[jsx(j,{component:"p",textVariant:"body.small.medium",noWrap:true,className:t.message,children:o}),jsx(l,{className:t.icon,onClick:b=>r?.(b),src:kf,alt:"toast-icon"})]}));c.displayName="ErrorToast";var N=memo(c);export{t as a,N as b};
@@ -1 +1 @@
1
- import {no}from'./chunk-FI5H6V55.js';import s from'dayjs';import w from'dayjs/plugin/relativeTime';import $ from'dayjs/plugin/timezone';import Y from'dayjs/plugin/utc';import N from'dayjs/plugin/calendar';import z from'dayjs/plugin/isToday';import S from'dayjs/plugin/isYesterday';var C=e=>typeof e=="number"&&!isNaN(e)&&isFinite(e)&&e>0;function F(e){if(!e)return "";let t=e%10,n=e%100;return `${e}${n>9&&n<14?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"}`}var h=Intl.NumberFormat("en-US");function U(e){return h.format(e)}var O=e=>{if(typeof e=="number")return Number.isFinite(e)?e:0;if(e==null)return 0;let t=String(e).trim();if(t==="")return 0;let n=t.includes(",")&&!t.includes(".")?t.replace(/,/g,"."):t.replace(/,/g,""),r=Number(n);return Number.isFinite(r)?r:0},A=e=>O(e),I=(e,t)=>t?e.toFixed(t):e.toString();function u(e,t=2){return e.toString().padStart(t,"0")}var L=e=>`0.${"0".repeat(e)}`;function W(e){let t=e.replace(/,/g,"");if(t==="")return "";let n=t.indexOf("."),r=n!==-1,o=(r?t.slice(0,n):t).replace(/\D/g,""),i=r?t.slice(n+1).replace(/\D/g,""):"";o.length>1&&(o=o.replace(/^0+(?=\d)/,"")),o===""&&r&&(o="0");let a=o.replace(/\B(?=(\d{3})+(?!\d))/g,",");return r?`${a}.${i}`:a}function E(e,t){let n=0,r=0;for(;r<e.length&&n<t;)e[r]!==","&&(n+=1),r+=1;return r}s.extend(z);s.extend(S);s.extend(Y);s.extend($);s.extend(w);s.extend(N);var d=e=>{if(typeof e=="number")return Number.isFinite(e)?e:0;if(!e)return 0;let t=e.trim().match(/^(?:UTC|GMT)?\s*([+-])?(\d{1,2})(?::?(\d{2}))?$/i);if(!t)return 0;let[,n,r,o]=t,i=Number(r)+Number(o??0)/60;return n==="-"?-i:i},K=(e=0)=>{let t=e<0?"-":"+",n=Math.abs(e),r=Math.floor(n),o=Math.round((n-r)*60);return `UTC${t}${u(r)}:${u(o)}`},Z=(e=6)=>{let t=Number.isFinite(e)&&e>=0?e:0,n=s(),r=n.subtract(t,"day").startOf("day"),o=n.endOf("day");return [r.toDate(),o.toDate()]},q=e=>{let t=new Date(e),n=t.getTimezoneOffset(),r=t.getTime()-n*6e4,i=new Date(r).toISOString();return s(i).valueOf()},J=(e,t=no.KW)=>{if(!e)return;let n=new Date(e),r=n.getTimezoneOffset(),i=d(t)*60-r,a=n.getTime()+i*6e4,c=new Date(a).toISOString();return s(c).valueOf()},Q=(e,t=0)=>e?s(e).utc(true).subtract(t,"hour").valueOf():void 0,X=e=>{let t=new Date(e),n=t.getTimezoneOffset(),r=t.getTime()+n*6e4;return new Date(r)},ee=(e,{currentTimezone:t,targetTimezone:n})=>{if(!e)return "";let r=new Date(e);if(Number.isNaN(r.getTime()))return "";if(t==null||n==null||t==null||n==null)return r;let o=d(t),a=d(n)-o,m=r.getTime()+a*6e4*60;return new Date(m)},te=e=>Array.from({length:e??31},(t,n)=>n+1).map(t=>({id:t,label:t})),ne=e=>Array.from({length:e??12},(t,n)=>n+1).map(t=>({id:t,label:t})),x=({length:e=10,startYear:t,direction:n="future"}={})=>{let r=new Date().getFullYear(),o=t!==void 0?r-t+1:e,i=t!==void 0||n==="past"?-1:1;return Array.from({length:o},(a,m)=>{let c=r+i*m;return {id:c,label:c}})},re=(e,t,n,r,o=true)=>{if(e==null||e==="")return "";let i=new Date(e);if(Number.isNaN(i.getTime()))return "";let a=r??n,m=D=>a==null?D:D.utcOffset(Math.round(d(a)*60)),c=m(s(i)),p=m(s()),f=o?", h:mma":"",g=c.isSame(p,"year")?"MMM DD":"MMM DD, YYYY",y={sameDay:`[Today]${f}`,nextDay:`[Tomorrow]${f}`,lastDay:`[Yesterday]${f}`,sameElse:`${g}${f}`,lastWeek:`${g}${f}`,nextWeek:`${g}${f}`};return c.calendar(p,t??y)},oe=(e,t="YYYY-MM-DD")=>{let n=new Date(e);return Number.isNaN(n.getTime())?"":s(e).format(t)},se=e=>s(e).endOf("day").toDate().valueOf();function ie(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return t>0?`${u(t)}:${u(n)}:${u(r)}`:`${u(n)}:${u(r)}`}function T(e,t,n="seconds"){let r={seconds:1,minutes:60,hours:3600,days:86400};return (Date.now()-e)/1e3<t*r[n]}var ae=e=>{let t=Date.now(),n=Math.floor((t-e)/1e3),r=Math.floor(n/60);return T(e,60,"seconds")?"just now":T(e,60,"minutes")?`${r} min${r===1?"":"s"} ago`:"1 hour ago"},ue=e=>s(e).isToday(),me=e=>s(e).isYesterday(),M=1970,ce=()=>x({startYear:M}),fe=(e=10)=>x({length:e,direction:"past"});function le(e,t){if(!e)return null;let n=s(e);if(!n.isValid())return null;try{return new Date(n.tz(t).format("YYYY-MM-DDTHH:mm:ss.SSS"))}catch{return null}}var l=["sun","mon","tue","wed","thur","fri","sat"];function de(e="sun"){let t=l.indexOf(e.toLowerCase());return t===-1?(console.error(`${e} is not a valid day`),l):[...l.slice(t),...l.slice(0,t)]}var ge=e=>{if(e==null)return;let t=s(e);return t.isValid()?t.valueOf():void 0};export{ae as A,ue as B,me as C,ce as D,fe as E,le as F,de as G,ge as H,C as a,F as b,U as c,O as d,A as e,I as f,u as g,L as h,W as i,E as j,d as k,K as l,Z as m,q as n,J as o,Q as p,X as q,ee as r,te as s,ne as t,x as u,re as v,oe as w,se as x,ie as y,T as z};
1
+ import {no}from'./chunk-VRGBJY4Q.js';import s from'dayjs';import w from'dayjs/plugin/relativeTime';import $ from'dayjs/plugin/timezone';import Y from'dayjs/plugin/utc';import N from'dayjs/plugin/calendar';import z from'dayjs/plugin/isToday';import S from'dayjs/plugin/isYesterday';var C=e=>typeof e=="number"&&!isNaN(e)&&isFinite(e)&&e>0;function F(e){if(!e)return "";let t=e%10,n=e%100;return `${e}${n>9&&n<14?"th":t===1?"st":t===2?"nd":t===3?"rd":"th"}`}var h=Intl.NumberFormat("en-US");function U(e){return h.format(e)}var O=e=>{if(typeof e=="number")return Number.isFinite(e)?e:0;if(e==null)return 0;let t=String(e).trim();if(t==="")return 0;let n=t.includes(",")&&!t.includes(".")?t.replace(/,/g,"."):t.replace(/,/g,""),r=Number(n);return Number.isFinite(r)?r:0},A=e=>O(e),I=(e,t)=>t?e.toFixed(t):e.toString();function u(e,t=2){return e.toString().padStart(t,"0")}var L=e=>`0.${"0".repeat(e)}`;function W(e){let t=e.replace(/,/g,"");if(t==="")return "";let n=t.indexOf("."),r=n!==-1,o=(r?t.slice(0,n):t).replace(/\D/g,""),i=r?t.slice(n+1).replace(/\D/g,""):"";o.length>1&&(o=o.replace(/^0+(?=\d)/,"")),o===""&&r&&(o="0");let a=o.replace(/\B(?=(\d{3})+(?!\d))/g,",");return r?`${a}.${i}`:a}function E(e,t){let n=0,r=0;for(;r<e.length&&n<t;)e[r]!==","&&(n+=1),r+=1;return r}s.extend(z);s.extend(S);s.extend(Y);s.extend($);s.extend(w);s.extend(N);var d=e=>{if(typeof e=="number")return Number.isFinite(e)?e:0;if(!e)return 0;let t=e.trim().match(/^(?:UTC|GMT)?\s*([+-])?(\d{1,2})(?::?(\d{2}))?$/i);if(!t)return 0;let[,n,r,o]=t,i=Number(r)+Number(o??0)/60;return n==="-"?-i:i},K=(e=0)=>{let t=e<0?"-":"+",n=Math.abs(e),r=Math.floor(n),o=Math.round((n-r)*60);return `UTC${t}${u(r)}:${u(o)}`},Z=(e=6)=>{let t=Number.isFinite(e)&&e>=0?e:0,n=s(),r=n.subtract(t,"day").startOf("day"),o=n.endOf("day");return [r.toDate(),o.toDate()]},q=e=>{let t=new Date(e),n=t.getTimezoneOffset(),r=t.getTime()-n*6e4,i=new Date(r).toISOString();return s(i).valueOf()},J=(e,t=no.KW)=>{if(!e)return;let n=new Date(e),r=n.getTimezoneOffset(),i=d(t)*60-r,a=n.getTime()+i*6e4,c=new Date(a).toISOString();return s(c).valueOf()},Q=(e,t=0)=>e?s(e).utc(true).subtract(t,"hour").valueOf():void 0,X=e=>{let t=new Date(e),n=t.getTimezoneOffset(),r=t.getTime()+n*6e4;return new Date(r)},ee=(e,{currentTimezone:t,targetTimezone:n})=>{if(!e)return "";let r=new Date(e);if(Number.isNaN(r.getTime()))return "";if(t==null||n==null||t==null||n==null)return r;let o=d(t),a=d(n)-o,m=r.getTime()+a*6e4*60;return new Date(m)},te=e=>Array.from({length:e??31},(t,n)=>n+1).map(t=>({id:t,label:t})),ne=e=>Array.from({length:e??12},(t,n)=>n+1).map(t=>({id:t,label:t})),x=({length:e=10,startYear:t,direction:n="future"}={})=>{let r=new Date().getFullYear(),o=t!==void 0?r-t+1:e,i=t!==void 0||n==="past"?-1:1;return Array.from({length:o},(a,m)=>{let c=r+i*m;return {id:c,label:c}})},re=(e,t,n,r,o=true)=>{if(e==null||e==="")return "";let i=new Date(e);if(Number.isNaN(i.getTime()))return "";let a=r??n,m=D=>a==null?D:D.utcOffset(Math.round(d(a)*60)),c=m(s(i)),p=m(s()),f=o?", h:mma":"",g=c.isSame(p,"year")?"MMM DD":"MMM DD, YYYY",y={sameDay:`[Today]${f}`,nextDay:`[Tomorrow]${f}`,lastDay:`[Yesterday]${f}`,sameElse:`${g}${f}`,lastWeek:`${g}${f}`,nextWeek:`${g}${f}`};return c.calendar(p,t??y)},oe=(e,t="YYYY-MM-DD")=>{let n=new Date(e);return Number.isNaN(n.getTime())?"":s(e).format(t)},se=e=>s(e).endOf("day").toDate().valueOf();function ie(e){let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=Math.floor(e%60);return t>0?`${u(t)}:${u(n)}:${u(r)}`:`${u(n)}:${u(r)}`}function T(e,t,n="seconds"){let r={seconds:1,minutes:60,hours:3600,days:86400};return (Date.now()-e)/1e3<t*r[n]}var ae=e=>{let t=Date.now(),n=Math.floor((t-e)/1e3),r=Math.floor(n/60);return T(e,60,"seconds")?"just now":T(e,60,"minutes")?`${r} min${r===1?"":"s"} ago`:"1 hour ago"},ue=e=>s(e).isToday(),me=e=>s(e).isYesterday(),M=1970,ce=()=>x({startYear:M}),fe=(e=10)=>x({length:e,direction:"past"});function le(e,t){if(!e)return null;let n=s(e);if(!n.isValid())return null;try{return new Date(n.tz(t).format("YYYY-MM-DDTHH:mm:ss.SSS"))}catch{return null}}var l=["sun","mon","tue","wed","thur","fri","sat"];function de(e="sun"){let t=l.indexOf(e.toLowerCase());return t===-1?(console.error(`${e} is not a valid day`),l):[...l.slice(t),...l.slice(0,t)]}var ge=e=>{if(e==null)return;let t=s(e);return t.isValid()?t.valueOf():void 0};export{ae as A,ue as B,me as C,ce as D,fe as E,le as F,de as G,ge as H,C as a,F as b,U as c,O as d,A as e,I as f,u as g,L as h,W as i,E as j,d as k,K as l,Z as m,q as n,J as o,Q as p,X as q,ee as r,te as s,ne as t,x as u,re as v,oe as w,se as x,ie as y,T as z};
@@ -1 +1 @@
1
- import {v as v$1}from'./chunk-DJHXUNB6.js';import {Kn as Kn$1,so as so$1,qo as qo$1,ro as ro$1,po,Fn,Mn,to as to$1,mo as mo$1,lo as lo$1,ko,jo as jo$1,io,ho as ho$1,Un as Un$1,Zn,go as go$1,bo,co,ao as ao$1,eo as eo$1,$n,_n as _n$1,Xn,fo as fo$1,Yn as Yn$1,Vn as Vn$1,do as _do,Wn as Wn$1,Nn,On as On$1,ep,Ye as Ye$1,Fo as Fo$1,Eo as Eo$1,Go}from'./chunk-FI5H6V55.js';import He from'lodash/orderBy';import Se from'lodash/get';import je from'axios';import Ke from'lodash/forOwn';import Le from'color';import nt from'dayjs';import Ue from'lodash/capitalize';import Fe from'lodash/startCase';import {getTimezone,getCountryForTimezone,getCountry}from'countries-and-timezones';import We from'dompurify';function Ft({list:e,sortBy:t,orders:r}){return t?.length&&r?.length?He(e,t,r):e}var Rt=(e=[],t)=>e.length?e.sort((r,n)=>Se(r,t).localeCompare(Se(n,t))):[];function vt(e){return (e||[]).filter(t=>!!t)}var Mt=(e,t)=>[...new Map(e.map(r=>[r[t],r])).values()];var Ee=e=>{let r=e.reduce((n,o)=>{let s=o.entities?.find(i=>i.default);return s&&n.push({entityId:s.id,country:o}),n},[])[0]?.country||e[0];return e.find(n=>n.id===r?.id)};var be=(e,t,r)=>{let n=e.find(a=>a.id===t)??{},o=r.find(a=>a.id===t)??{},s=o.countries.length===1?n.countries.find(a=>a.id===o.countries?.[0].id):Ee(n?.countries),i=s?.entities?.find(a=>a.default);return {...n,defaultCountry:s,defaultEntity:i}},Ge=({merchantsIds:e,options:t})=>!e||!e?.length?{}:{business:{merchant:e,...t}},Ye=e=>["payment_facilitator_14po8231419aIsi1fN7F385"].includes(e),Bt=({segmentCode:e,segmentId:t,segmentTypeCode:r,merchantsIds:n=[],options:o={}})=>{let s="PSP"===r?e:r;return Ye(t)?Ge({merchantsIds:n,options:o}):s==="PAYMENT_TECHNOLOGY"?{payment_provider:{technology:{orchestrator:[t],...o}}}:s==="PAYMENT_GATEWAY"||s==="PAYMENT_GATEWAY_PROVIDER"?{payment_provider:{technology:{gateway:[t],...o}}}:s==="PAYMENT_FACILITATOR"?{payment_provider:{institution:{facilitator:[t],...o}}}:s==="PAYMENT_ACQUIRER"?{payment_provider:{institution:{acquirer:[t],...o}}}:s==="PLATFORM"?{platform:[t],...o}:s==="DEVELOPMENT"?{development_agency:[t],...o}:{}};var _e="Test_Fixed_Secret_Key",S="tap-dashboard-navigation-data",Ae="tap-dashboard-user-data",E="tap-dashboard-user-jwt",b="tap-dashboard-report",_="tap-dashboard-calender-timezone",A="tap-dashboard-calender-timezone-history",w="tap-dashboard-global-table-mode",we="sheetview_columns",D="dock-preview-windows",C="views";function Gt(){localStorage.setItem(_e,Mn);}function De(){return localStorage.getItem(_e)}function Yt(e){localStorage.setItem(S,JSON.stringify(e));}function Kt(){try{let e=localStorage.getItem(S);if(!e)return null;let t=JSON.parse(e);return Ke(t,r=>{r?.forEach(n=>{n.payload&&n.payload.dateRange&&(n.payload.dateRange=n.payload.dateRange.map(o=>new Date(o)));});})}catch{return null}}function Jt(){localStorage.removeItem(S);}var jt=e=>{localStorage.setItem(E,e);},I=()=>localStorage.getItem(E),qt=()=>{localStorage.removeItem(E);},Xt=e=>{localStorage.setItem(Ae,JSON.stringify(e));},O=()=>{let e=localStorage.getItem(Ae);if(!e)return null;try{return JSON.parse(e)}catch{return null}},Zt=()=>{let e=O();return e?be(e?.segments,e?.active_segment_id,e?.active_segments):null},Qt=()=>{let e=O();return e?e?.active_segments.find(t=>t.id===e.active_segment_id):null},Je=()=>{let e=I();if(!e)return true;try{let[,t]=e.split(".");if(!t)return !0;let r=t.replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"="),{exp:o}=JSON.parse(atob(n));return typeof o!="number"?!0:Date.now()>=o*1e3}catch{return true}},er=()=>!Je()&&!!O(),tr=(e,t)=>{localStorage.setItem(`${b}-${e}`,t);},rr=e=>localStorage.getItem(`${b}-${e}`),nr=e=>{localStorage.removeItem(`${b}-${e}`);},or=e=>{localStorage.setItem(_,JSON.stringify(e));},sr=e=>{localStorage.setItem(A,JSON.stringify(e));},ir=()=>{try{let e=localStorage.getItem(_);return e?JSON.parse(e):null}catch{return null}},ar=()=>{try{let e=localStorage.getItem(A);return e?JSON.parse(e):null}catch{return null}},cr=()=>{localStorage.removeItem(_);},lr=()=>{localStorage.removeItem(A);},ur=e=>{localStorage.setItem(w,e);},dr=()=>localStorage.getItem(w)||"default",pr=()=>{localStorage.removeItem(w);},mr=e=>localStorage.setItem(we,JSON.stringify(e)),gr=()=>JSON.parse(localStorage.getItem(we)||"{}"),fr=e=>{try{localStorage.setItem(D,JSON.stringify(e));}catch(t){console.warn("Failed to save preview cache:",t);}},xr=()=>{try{let e=localStorage.getItem(D);return e?JSON.parse(e):[]}catch{return []}},yr=()=>{try{localStorage.removeItem(D);}catch(e){console.warn("Failed to remove preview storage:",e);}},Tr=(e,t,r)=>{try{return JSON.parse(localStorage.getItem(C)??"{}")?.[e]?.[t]?.[r]?.selectedViewId??null}catch{return null}},hr=(e,t,r,n)=>{try{let o=JSON.parse(localStorage.getItem(C)??"{}");localStorage.setItem(C,JSON.stringify({...o,[e]:{...o[e],[t]:{...o[e]?.[t],[r]:{...o[e]?.[t]?.[r],selectedViewId:n}}}}));}catch{return null}},Ie=()=>{localStorage.clear();};var qe={headers:{"Content-Type":"application/json",Accept:"application/json"}},L=je.create({baseURL:Kn$1,headers:{...qe}}),Xe=["users/switch-segment","users/update-segment"];L.interceptors.request.use(e=>new Promise(t=>{let r=false;if(Xe.includes(e.url??"")){t(e);return}let n=s=>{let i=s.data;if(i==="network_request_waiting"){r=true;return}i==="resume_network_request"&&(r=false);};window.addEventListener("message",n);let o=setInterval(()=>{r||(t(e),clearInterval(o),window.removeEventListener("message",n));},0);}));L.interceptors.request.use(e=>{e.headers.Authorization=I();let t=De();return t&&!e.headers["x-test-secret"]&&(e.headers["x-test-secret"]=t),e});L.interceptors.response.use(e=>e,e=>(e.response?.data?.force_logout&&(Ie(),window.location.href="/login"),Promise.reject(e)));function Ar(e){let{sandboxMode:t,fixedSecretKey:r,applicationId:n,serviceId:o,functionId:s,userFunctionId:i,segmentId:a,...l}=e??{};return {...l,live_mode:t?"false":"true",...!!r&&{"x-test-secret":r},...!!n&&{application_id:n},...!!o&&{service_id:o},...!!s&&{function_id:s},...!!i&&{user_function_id:i}}}function Dr(e){let r=(e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"")).toLowerCase();if(r.includes("edg"))return "edge";if(r.includes("opr")||r.includes("opera"))return "opera";if(r.includes("chrome")&&!r.includes("edg")&&!r.includes("opr"))return "chrome";if(r.includes("safari")&&!r.includes("chrome"))return "safari";if(r.includes("firefox"))return "firefox";if(r.includes("msie")||r.includes("trident"))return "ie";if(r.includes("tor"))return "tor";if(r.includes("uc"))return "uc";if(r.includes("yandex"))return "yandex"}var Ir=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Or=e=>{let t=e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"");if(!t)return;let r=t.toLowerCase();if(/ipad|tablet|playbook|silk|(android(?!.*mobile))/.test(r))return "TABLET";if(/mobile|iphone|ipod|android.*mobile|blackberry|iemobile|opera mini|windows phone/.test(r))return "MOBILE";if(/desktop|laptop|macintosh|windows|linux|unix|freebsd|openbsd|netbsd|chromeos|solaris|beos|os/.test(r))return "DESKTOP"};function Fr(){let e=["#D6D6D6","#BFF192","#E4EE92","#FDFCAB","#FFE78E","#FFCE6B","#FFBC8C","#FF947C","#C88FA3","#B988C9","#9A8BBB","#89B6FF","#ACD4E1","#ADBABE","#C0DAAA","#D5DA91","#EAE7A2","#DFCE9C","#C9A997","#858585","#000000"];return e[Math.trunc(Math.random()*e.length)]}function Rr(){let e=["linear-gradient(135deg, #31D5C8 0%, #1186C5 100%)","linear-gradient(135deg, #A2E9BD 0%, #44BB74 100%)","linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%), linear-gradient(135deg, #6BF6EB 0%, #32D6C9 100%)","linear-gradient(135deg, #61AFC9 0%, #7FBFD4 100%)","linear-gradient(135deg, #9DB7A4 0%, #7FBFD4 100%)","linear-gradient(135deg, #D7B38C 0%, #FFE09F 100%)","linear-gradient(135deg, #ADD6A2 0%, #FFDDB2 100%)"];return e[Math.trunc(Math.random()*e.length)]}var Oe={r:0,g:0,b:0,alpha:1},vr=e=>{try{let t=Le(e).rgb(),{r,g:n,b:o,alpha:s=1}=t.object();return {value:{r,g:n,b:o,alpha:s},stringified:`rgba(${r},${n},${o},${s})`}}catch(t){console.error(t),console.warn(`Invalid hex color: "${e}". Falling back to black.`);let{r,g:n,b:o,alpha:s}=Oe;return {value:Oe,stringified:`rgba(${r},${n},${o},${s})`}}},Mr=e=>Le(e).hexa();var $r={fx:"Foreign Exchange",dcc:"Dynamic Currency Conversion"},Ne={BHD:3,KWD:3,JOD:3,OMR:3},N=new Map,Br=(e,t)=>{if(Number.isNaN(e))return "0";try{return N.has(t)||N.set(t,new Intl.NumberFormat("en-US",{currency:t,minimumFractionDigits:Ne[t]?3:2})),N.get(t).format(e)}catch(r){return console.error(r),"0"}},Ze=e=>e%1===0,Qe=e=>e%.1===0,et=e=>Math.abs(e*10%1)===.1,Wr=(e,t)=>{let r=Ne[t],n=e.toString();return Number.isInteger(e)&&Ze(e)?n=e.toFixed(r?3:2):et(e)?n=`${n}${r?"00":"0"}`:Qe(e)&&(n=`${n}${r?"00":"0"}`),n};function tt(e,t=2){let r=parseFloat(e.toString());if(isNaN(r)){let[a,l]=0 .toFixed(t).split("."),u=`${a}.${l}`;return {integerAmount:a,decimalAmount:l,fullAmount:u}}let n=r.toFixed(t),[o,s]=n.split("."),i=parseInt(o).toLocaleString();return {integerAmount:i,decimalAmount:s,fullAmount:`${i}.${s}`}}function Vr(e=0,t=""){return tt(e,to$1[t]?.decimals??2)}function Hr(e){let t=e.request.currency,r=e.select.currency,n=e.merchant.currency,o=r!==n&&r===t&&t&&n&&r,s=r!==t&&t&&n&&r,i=o?"fx":void 0;i=s?"dcc":i;let a=o?e.merchant:void 0;return a=s?e.request:a,{type:i,shownAmount:a}}var Gr=e=>typeof e=="number"?e:Number(e.replace(/,/g,""));var rt=new Intl.DisplayNames(["en"],{type:"region"});function Pe(e){try{return rt.of(e)}catch(t){console.error(t?.response?.data?.error?.message);}}function Kr(e){return e==="SA"}function Jr(e){return e==="OM"}var y=e=>v$1(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD",lastWeek:"MMM DD",nextWeek:"MMM DD"}),Zr=(e,t)=>{if(!e)return "";let r=new Date,n=nt(e).isSame(r,"year");return t?v$1(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow at] h:mm A",lastDay:"[Yesterday at] h:mm A",sameElse:"[on] MMM DD [at] h:mm A",lastWeek:"[on] MMM DD [at] h:mm A",nextWeek:"[on] MMM DD [at] h:mm A"}):n?v$1(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD",lastWeek:"[on] MMM DD",nextWeek:"[on] MMM DD"}):v$1(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD, YYYY",lastWeek:"[on] MMM DD, YYYY",nextWeek:"[on] MMM DD, YYYY"})},Qr=e=>{let t=e?.payout,r=e?.settlement;if(!e)return {tooltip:[],status:void 0};if(!["PAID_OUT","SETTLED"].includes(e?.status||""))return {tooltip:[...r?.scheduled?[{left:"settlement_scheduled",right:`${y(r?.scheduled)}`}]:[],...t?.scheduled?[{left:"payment_scheduled",right:`${y(t?.scheduled)}`}]:[]],status:"PENDING"};if(e?.status==="PAID_OUT"){let n=t?.activities.find(o=>o.status==="PAID_OUT");return {tooltip:[{left:"paidOut",right:`${y(n?.date)}`}],status:"PAID_OUT"}}if(e?.status==="SETTLED"){let n=r?.activities.find(o=>o.status==="SETTLED");return {tooltip:[{left:"settled",right:`${y(n?.date)}`},...t?.scheduled?[{left:"payment_scheduled",right:`${y(t?.scheduled)}`}]:[]],status:"SETTLED"}}};var rn=(e,t)=>{let{isFirst:r,isLast:n}=t||{};return `${(e+0)/898*100}%`},nn=({table:e,cellID:t,tableMode:r})=>{switch(e){case "charge":return Wn$1[t][r];case "refund":return _do[t][r];case "authorization":return Vn$1[t][r];case "intents":return Yn$1[t][r];case "topups":return fo$1[t][r];case "destinations":return Xn[t][r];case "leads":return _n$1[t][r];case "orders":return $n[t][r];case "tokens":return eo$1[t][r];case "payouts":return ao$1[t][r];case "protectCharges":return co[t][r];case "protectAuthorizations":return bo[t][r];case "wallet":return go$1[t][r];case "invoices":return Zn[t][r];case "authentications":return Un$1[t][r];case "walletDetails":return ho$1[t][r];case "walletStatement":return io[t][r];case "merchants":return jo$1[t][r];case "terminals":return ko[t][r];case "orchestrationTerminals":return lo$1[t][r];case "orchestrationRouting":return mo$1[t][r];default:return "100px"}},on=(e,t)=>{let r,n=window.innerHeight-24-264;return e?r=window.innerHeight/1.7:t?r=n-100:r=n-20,Math.floor(r/(e||t?52:70))},ot=()=>{let e=window.innerHeight*.82/1.24-57;return Math.floor(e/70)},sn=e=>{let t=ot();return e<t+1},an=e=>e==="default",cn=e=>e==="sheet",ln=()=>({charge:{prefixes:["chg_","payout_","settlement_","terminal_"],accessor:e=>[e.id,e.capture?.charge?.map(t=>t.id),e.charge?.id,e.transactions?.map(t=>t.id),e.charge_id],label:"Charge",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.charges.code,icon:"capture"},authorize:{prefixes:["auth_"],keys:["id","authorize.id","source.id","charge.source.id"],label:"Authorization",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.authorization.code,icon:"capture"},intents:{prefixes:["intent_"],keys:[],label:"Intents",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.intents.code,icon:"capture"},refunds:{prefixes:["re_","payout_"],accessor:e=>[e?.refunds?.refund?.map(t=>t.id),e?.id,...e?.refunds?.length?[e?.refunds?.map(t=>t.id)]:[]],label:"Refunds",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.refunds.code,icon:"refund"},authentication:{prefixes:["auth_payer_"],keys:["authentication.id"],label:"Authentication",appCode:Fn.authentication.code,serviceCode:Fn.authentication.services.authentication.code,icon:"capture"},order:{prefixes:["order_","ord_"],keys:["order.id"],label:"Order",appCode:Fn.order.code,serviceCode:Fn.order.services.orders.code,icon:"capture"},chargeFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:Fn.protect.code,serviceCode:Fn.protect.services.chargesFlags.code,icon:"flag"},authorizationFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:Fn.protect.code,serviceCode:Fn.protect.services.authorizationsFlags.code,icon:"flag"},token:{prefixes:["tok_"],keys:["source.id"],label:"Token",appCode:Fn.tokens.code,serviceCode:Fn.tokens.services.tokens.code,icon:"capture"},destination:{prefixes:["trf_","payout_"],accessor:e=>[e?.destinations?.destination?.map(t=>t?.transfer?.id),e?.id],label:"Destination",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.destinations.code,icon:"destination"},payout:{prefixes:["payout_"],keys:["balance.payout.id"],label:"Payout",appCode:Fn.payouts.code,serviceCode:Fn.payouts.services.payouts.code,icon:"capture"},settlement:{prefixes:["settlement_"],keys:["settlement.id"],label:"Settlement",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.settlements.code,icon:"capture"},intent:{prefixes:["intent_"],keys:["intent.id"],label:"Intent",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.intents.code,icon:"capture"},topup:{prefixes:["topup_"],keys:["topup.id"],label:"Topup",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.topups.code,icon:"capture"}});var mn=e=>typeof e=="string"&&e.trim().length>0,F=(e,t)=>{if(!t)return e;let r=e.indexOf(t);return e.substring(r+t.length)},P=new Map,R=(e,t)=>(P.has(t)||P.set(t,new RegExp(t,"gi")),e.match(P.get(t))?.length??0),gn=e=>e.reduce((t,r)=>(t.push(r[0]),t),[]),fn=()=>crypto?.randomUUID?.()||Math.random().toString(36).substring(2,15),xn=e=>{if(navigator.clipboard)navigator.clipboard.writeText(e);else {let t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove();}},yn=e=>typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1),Tn=e=>{let[t]=e.split("%");return parseFloat(t)||0},hn=e=>`\u2022\u2022\u2022 ${e.slice(-4)}`,Cn=(e,t=/_/g,r=" ")=>{let n=e.replace(t,r);return Fe(n)},Sn=e=>Ue(Fe(e));var bn=(e,t)=>!e?.last_four||!t?"":`${t?.toLowerCase()} - ${e?.last_four}`,_n=(e,t)=>!t||!e?"":`${e?.toLowerCase()||"ID"} \u2022 ${t?.slice(-4)}`;function wn({unCapturedCode:e,unCapturedMessage:t,acquirerCode:r,acquirerMessage:n,gatewayCode:o,gatewayMessage:s}){let i=e&&t&&`${e} - ${t}`,a=r&&n&&`${r} - ${n}`,l=o&&s&&`${o} - ${s}`;return {unCapturedTooltip:i,acquirerTooltip:a,gatewayTooltip:l}}function In(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}var v=e=>e==null||e==="";function On(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>Array.isArray(t)?t.length>0&&t?.some(r=>!v(r)):typeof t=="object"?Object.values(t||{}).some(r=>!v(r)):!v(t)))}var Pn=()=>Nn===On$1.TAPSTERS_FRONTEND;var Rn=e=>e.replace(/[^0-9]/g,"");function Un({rowData:e,prefixes:t,keys:r=[],accessor:n}){let o=!!n;return (o?n?.(e):r)?.filter(Boolean)?.reduce((a,l)=>{let u=o?l:Se(e,l);return typeof u=="string"&&t?.some(p=>u.includes(p)&&R(F(u,p),"_")===0)&&a.push(u),Array.isArray(u)&&u.length>0&&u.every(p=>typeof p=="string"&&t?.some(m=>p.includes(m)&&R(F(p,m),"_")===0))&&a.push(...u),a},[])}var Bn=450,Wn=600;var Vn=3;var zn=20,at=(r=>(r.Index="index",r.Date="date",r))(at||{}),Hn={name:"index",label:"",selected:true,menuItems:void 0,order:0,pinned:"start",isDefaultPinned:true,pinnable:true},Gn={name:"date",label:"Date",selected:true,menuItems:void 0,order:1,pinned:"start",isDefaultPinned:true,pinnable:true},Yn={date:"Date",index:"Index"},Kn={sheet:["sheet"],default:["advanced","default"],text:["text"]},Jn={sheet:"Advanced",default:"Sheet",text:"text"},ct={id:"default",label:"Default"},jn={id:"custom",label:"Custom view"},qn=[ct];function eo(e,t,r){return e.filter(n=>{let o=n?.id?.toString(),s=t.find(m=>{let Ve=m.code?.toLowerCase()===o?.toLowerCase(),ze=m.name?.toLowerCase()===o?.toLowerCase();return (Ve||ze)&&m.selected}),i=!!n.tableViewId&&(s?.menuItems?.length||0)>0,a=s?.menuItems?.find(m=>m.name?.toLowerCase()===n.tableViewId?.toString()?.toLowerCase())?.selected,l=!!s&&(a||!i),p=["actions","action_icon",...r?["index","date"]:[]].includes(o?.toLowerCase()??"");return !!(l||p)})}function to(e,t){if(t.toLowerCase()==="index")return 0;let r=e.findIndex(o=>o.code?.toLowerCase()===t?.toLowerCase()),n=e[r];return r>=0?n?.sort_order??r:999}function ro(e,t,r){return e?.find(n=>{let o=n.code?.toLowerCase()===t.toLowerCase(),s=n.name?.toLowerCase()===t.toLowerCase();return o||s})?.menuItems?.find(n=>n.name?.toLowerCase()===r.toLowerCase()&&n.selected)?.selected||false}function no(e,t){return e?.filter(r=>!!r.name?.[0]?.text)?.map(r=>({code:r.code,label:f(r.name,t),name:f(r.name,t)||"",selected:r?.selected!==false,sort_order:r.sort_order,menuItems:r.fields?.map(n=>n.parameters?.filter(o=>!!o.code)?.map(o=>({code:o.code,label:Fe(o.code),name:`${o.code}`,selected:o?.selected!==false})))?.flat()?.filter(n=>!!n.name)}))||[]}function oo(e){return e.map(t=>({...t.code?{code:t.code}:{},name:[{text:t.name,lang:"en"}],selected:t.selected,sort_order:1,sorting:"descending",fields:t.menuItems?.map(r=>({code:r.name,type:"single",parameters:[{parameter:r.name,code:r.name,selected:r.selected}]}))||[]}))}var so=({columnsView:e,columnsIds:t,selected:r})=>{let n=new Set(t.map(s=>s?.toLowerCase())),o=s=>({...s,selected:r,fields:s.fields?.map(i=>({...i,parameters:i.parameters?.map(a=>({...a,selected:r}))??[]}))});return e.map(s=>n.has(s.code?.toLowerCase()??"")||n.has(s.name?.[0]?.text?.toLowerCase()??"")?o(s):s)};function ao(e){return {fullPhone:e?.number?`${e?.country_code||""} ${e?.number}`:"",code:e?.country_code||"",number:e?.number||""}}var Re=(e,t)=>{let r=e.type==="url"?e.url:window.URL.createObjectURL(new Blob([e.content])),n=document.createElement("a");n.href=r,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),e.type==="content"&&window.URL.revokeObjectURL(r);},lo=(e,t)=>Re({type:"content",content:e},t),uo=(e,t)=>Re({type:"url",url:e},t);var ut=e=>!!(e?.isAxiosError&&!e?.response),mo=(e,t="")=>e?.response?.data?.error?.message?.trim()||t,go=e=>!!e,dt=e=>(e?.code==="ECONNABORTED"||e?.message?.toLowerCase().includes("timeout"))??false,fo=e=>!!(e?.response?.status===404||e?.response?.status===400&&e?.response?.data?.error?.message?.toLowerCase().includes("not found")),T=({code:e,message:t})=>e?`${t} - ${e}`:t,xo=({error:e,fallbackMessage:t})=>{if(ut(e)){let n=t??"networkError";return {code:null,message:n,formatted:T({code:null,message:n})}}if(dt(e)){let n=t??"yourRequestOutPleaseTryAgain";return {code:null,message:n,formatted:T({code:null,message:n})}}if(e?.response&&typeof e.response.data=="object"&&"error"in e.response.data){let{code:n,message:o}=e.response.data.error;return {code:n,message:o,formatted:T({code:n,message:o})}}let r=t??"somethingWentWrong";return {code:null,message:r,formatted:T({code:null,message:r})}};var ho=()=>["passport","national_id","iqamah","civil_id"].map(e=>({id:e,label:Fe(e)}));function So(e,t=2){let n=e??0;if(!n)return "0 kb";let o=n/1024;return o>1024?`${(o/1024).toFixed(t)} mb`:`${o.toFixed(t)} kb`}function mt(e){return e?.file?.size!==void 0&&e?.file?.name!==void 0}function gt(e,t){return e.name===t.name&&e.size===t.size}function Eo(e,t){return t?.length?t.some(r=>mt(r)?gt(r.file,e):r.name===e.name):false}var Ao=e=>{let t=e?.split(".").pop()?.toLowerCase()??"";return ep[t]??Ye$1},wo=(e,t,r)=>`${e}-${t}-${r}`;var Io=e=>e?/[\u0600-\u06FF]/g.test(e):false;function Oo(e,t="en"){return (e||[]).find(r=>(r?.lang||r?.locale)===t)||e?.[0]}var f=(e,t="en")=>(e||[]).find(r=>r?.lang===t)?.text,Lo=(e,t="en")=>(e||[]).find(r=>r?.lang===t);var Po=e=>{let t=e?.wallet==="SV Wallet"?"walletStoredValue":"walletPassThru";return e?.type==="Wallet"?t:e?.type},ft={AMERICAN_EXPRESS:"AMEX"},ve=e=>ft[e.toUpperCase()]??e.toUpperCase(),Fo=(e,t)=>!!e&&!!t&&ve(e)===ve(t);var vo=e=>({Local:e.success.light,Regional:e.info.light,Global:e.warning.light});var Uo=(e,t)=>{if(t==null)return "";let r=Fo$1[e];return e===Eo$1.COUNT?t===1?r:`${r}s`:r};var d={primary:"#1F88D0",background:"white",border:"#F2F2F2",transparent:"transparent"},g={thin:"0.5px",thick:"1px",none:"0px"},Me={minHeight:"28px",fullHeight:"100%"},Bo=({isSelected:e,isCellSelected:t,isColumnSelected:r,isRowSelected:n,isLastRow:o})=>e?n?xt():t&&!r?yt():r?Tt(o):{}:{},xt=()=>({backgroundColor:d.background,color:d.primary}),yt=()=>({border:`${g.thin} solid ${d.primary}`,backgroundColor:d.background,color:d.primary,borderRadius:"2px"}),Tt=e=>{let t=ht(),r=Ct(e);return {borderWidth:t,borderStyle:"solid",borderColor:d.primary,borderBottom:r,height:Me.fullHeight,minHeight:Me.minHeight,display:"flex",alignItems:"center"}},ht=()=>{let{none:e,thin:t}=g;return `${e} ${t} ${t} ${t}`},Ct=e=>e?`${g.thick} solid ${d.primary}`:`${g.thin} solid ${d.border}`,Wo=({effectiveFirst:e,isPinnedStart:t,isPinnedEnd:r})=>({borderTop:`${g.thin} solid ${d.primary}`,borderBottom:`${g.thin} solid ${d.primary}`,borderRight:`${g.thin} solid ${r?d.primary:"none"}`,borderLeft:`${g.thin} solid ${t&&e?d.primary:"transparent"}`}),Vo={left:"flex-start",center:"center",right:"flex-end"};function zo(e,t){return t==null?e:[e,...Array.isArray(t)?t:[t]]}function Ho(...e){return e.filter(Boolean).join(" ")||void 0}var M=k(po,ro$1,qo$1);function k(e,t,r){let n=getTimezone(r);return n?{countryCode:e,label:`(GMT${n.utcOffsetStr}) ${Pe(e)??t}`,timezone:r,offset:n.utcOffset/so$1}:M}var bt=e=>{let t=getCountry(e),r=t?.timezones[0];if(!(!t||!r))return k(e,t.name,r)},jo=e=>bt(e)??M,qo=e=>{let t=getCountryForTimezone(e),r=getTimezone(e);return !t||!r?M:k(t.id,t.name,e)};function rs(e){return {name:"Payment Methods",type:"payment_methods",options:e?.map(t=>({name:Ue(Fe(f(t?.name))),type:t?.code,icon:Go[t.code]??Go.CARD,options:t.payment_methods?.map(r=>({name:f(r.name),type:r.code}))}))}}function ns(e=[]){return {name:"Payment Schemes",type:"payment_scheme",options:e.filter(t=>t.code).map(t=>({name:Ue(Fe(f(t?.name))),type:t?.code}))}}var Be=["120px","180px","100px","150px","200px","140px","160px","110px","190px","130px"],_t={id:"index",header:"",width:"34px",order:0,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},At={id:"date",header:"",width:"120px",order:1,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},wt={id:"action_icon",header:"",width:"36px",order:Be.length+3,hidden:false,sortable:false,pinned:"end",pinnable:true,isDefaultPinned:true},Dt=(e=Be)=>{let t=e.map((r,n)=>({id:`skeleton-col-${n}`,header:"",width:r,order:n+2,hidden:false,sortable:false,pinnable:false}));return [_t,At,...t,wt]},ss=(e,t,r)=>r&&t?Dt():[...e];var as=(e,t)=>e.map(r=>{let n=Object.entries(t);if(!r.default||!r.layout?.length||!n.length)return r;let o=new Map(n.map(([i,a])=>[i.toLowerCase(),a])),s=r.layout.map(i=>({...i,columns:i.columns?.map(a=>{let l=a.code?.toLowerCase();if(!l||!o.has(l))return a;let u=o.get(l)??false;return {...a,default:u,fields:a.fields?.map(p=>({...p,default:u}))}})}));return {...r,layout:s}});var us=(e,t)=>t.some(r=>!!e[r]),ds=(e,t,r)=>t?e:e.map(n=>{if(r.hiddenFilterColumnIds.includes(n.id)){let{filter:s,...i}=n,a=n.id,l=typeof i.header=="function"?Fe(a):i.header;return {...i,header:l}}let{hiddenFilterOptionKeys:o}=r;if(o&&n.filter&&"options"in n.filter&&n.filter.options){let s=n.filter.options,i=s.filter(a=>!a.apiKey||!o.includes(a.apiKey));if(i.length!==s.length)return {...n,filter:{...n.filter,options:i}}}return n});typeof window<"u"&&We.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer");});var Ot={USE_PROFILES:{html:true},ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|[^a-z]|[-a-z.+]+(?:[^-a-z.+:]|$))/i,WHOLE_DOCUMENT:true},gs=e=>typeof window>"u"?"":String(We.sanitize(e||"",Ot));var xs=e=>window?.__TAPOS_NEWRELIC_TRACKING_EVENTS__?.trackFeatureEvent?.(e),ys=e=>e.toISOString();function hs(e,t){let r=e.replace(/:/g,"");return t?`${t}-${r}`:r}function Lt(e){return e!=null&&e!==""}function Ss(e,t){let r=e!=null,n=t&&"message"in t?t.message:e?.message,o=Lt(n);return {isProvided:r,isVisible:o,type:o?e?.type:void 0}}export{Br as $,ro as $a,sr as A,hn as Aa,vo as Ab,ir as B,Cn as Ba,Uo as Bb,ar as C,Sn as Ca,d as Cb,cr as D,bn as Da,Bo as Db,lr as E,_n as Ea,Wo as Eb,ur as F,wn as Fa,Vo as Fb,dr as G,In as Ga,zo as Gb,pr as H,v as Ha,Ho as Hb,mr as I,On as Ia,jo as Ib,gr as J,Pn as Ja,qo as Jb,fr as K,Rn as Ka,rs as Kb,xr as L,Un as La,ns as Lb,yr as M,Bn as Ma,Be as Mb,Tr as N,Wn as Na,Dt as Nb,hr as O,Vn as Oa,ss as Ob,Ie as P,zn as Pa,as as Pb,L as Q,at as Qa,us as Qb,Ar as R,Hn as Ra,ds as Rb,Dr as S,Gn as Sa,gs as Sb,Ir as T,Yn as Ta,xs as Tb,Or as U,Kn as Ua,ys as Ub,Fr as V,Jn as Va,hs as Vb,Rr as W,ct as Wa,Lt as Wb,vr as X,jn as Xa,Ss as Xb,Mr as Y,qn as Ya,$r as Z,eo as Za,Ne as _,to as _a,Ft as a,Wr as aa,no as ab,Rt as b,tt as ba,oo as bb,vt as c,Vr as ca,so as cb,Mt as d,Hr as da,ao as db,be as e,Gr as ea,Re as eb,Ge as f,Pe as fa,lo as fb,Ye as g,Kr as ga,uo as gb,Bt as h,Jr as ha,ut as hb,Gt as i,y as ia,mo as ib,De as j,Zr as ja,go as jb,Yt as k,Qr as ka,dt as kb,Kt as l,rn as la,fo as lb,Jt as m,nn as ma,xo as mb,jt as n,on as na,ho as nb,I as o,sn as oa,So as ob,qt as p,an as pa,mt as pb,Xt as q,cn as qa,gt as qb,O as r,ln as ra,Eo as rb,Zt as s,mn as sa,Ao as sb,Qt as t,F as ta,wo as tb,Je as u,R as ua,Io as ub,er as v,gn as va,Oo as vb,tr as w,fn as wa,f as wb,rr as x,xn as xa,Lo as xb,nr as y,yn as ya,Po as yb,or as z,Tn as za,Fo as zb};
1
+ import {v as v$1}from'./chunk-53X3U5WT.js';import {Kn as Kn$1,so as so$1,qo as qo$1,ro as ro$1,po,Fn,Mn,to as to$1,mo as mo$1,lo as lo$1,ko,jo as jo$1,io,ho as ho$1,Un as Un$1,Zn,go as go$1,bo,co,ao as ao$1,eo as eo$1,$n,_n as _n$1,Xn,fo as fo$1,Yn as Yn$1,Vn as Vn$1,do as _do,Wn as Wn$1,Nn,On as On$1,ep,Ye as Ye$1,Fo as Fo$1,Eo as Eo$1,Go}from'./chunk-VRGBJY4Q.js';import He from'lodash/orderBy';import Se from'lodash/get';import je from'axios';import Ke from'lodash/forOwn';import Le from'color';import nt from'dayjs';import Ue from'lodash/capitalize';import Fe from'lodash/startCase';import {getTimezone,getCountryForTimezone,getCountry}from'countries-and-timezones';import We from'dompurify';function Ft({list:e,sortBy:t,orders:r}){return t?.length&&r?.length?He(e,t,r):e}var Rt=(e=[],t)=>e.length?e.sort((r,n)=>Se(r,t).localeCompare(Se(n,t))):[];function vt(e){return (e||[]).filter(t=>!!t)}var Mt=(e,t)=>[...new Map(e.map(r=>[r[t],r])).values()];var Ee=e=>{let r=e.reduce((n,o)=>{let s=o.entities?.find(i=>i.default);return s&&n.push({entityId:s.id,country:o}),n},[])[0]?.country||e[0];return e.find(n=>n.id===r?.id)};var be=(e,t,r)=>{let n=e.find(a=>a.id===t)??{},o=r.find(a=>a.id===t)??{},s=o.countries.length===1?n.countries.find(a=>a.id===o.countries?.[0].id):Ee(n?.countries),i=s?.entities?.find(a=>a.default);return {...n,defaultCountry:s,defaultEntity:i}},Ge=({merchantsIds:e,options:t})=>!e||!e?.length?{}:{business:{merchant:e,...t}},Ye=e=>["payment_facilitator_14po8231419aIsi1fN7F385"].includes(e),Bt=({segmentCode:e,segmentId:t,segmentTypeCode:r,merchantsIds:n=[],options:o={}})=>{let s="PSP"===r?e:r;return Ye(t)?Ge({merchantsIds:n,options:o}):s==="PAYMENT_TECHNOLOGY"?{payment_provider:{technology:{orchestrator:[t],...o}}}:s==="PAYMENT_GATEWAY"||s==="PAYMENT_GATEWAY_PROVIDER"?{payment_provider:{technology:{gateway:[t],...o}}}:s==="PAYMENT_FACILITATOR"?{payment_provider:{institution:{facilitator:[t],...o}}}:s==="PAYMENT_ACQUIRER"?{payment_provider:{institution:{acquirer:[t],...o}}}:s==="PLATFORM"?{platform:[t],...o}:s==="DEVELOPMENT"?{development_agency:[t],...o}:{}};var _e="Test_Fixed_Secret_Key",S="tap-dashboard-navigation-data",Ae="tap-dashboard-user-data",E="tap-dashboard-user-jwt",b="tap-dashboard-report",_="tap-dashboard-calender-timezone",A="tap-dashboard-calender-timezone-history",w="tap-dashboard-global-table-mode",we="sheetview_columns",D="dock-preview-windows",C="views";function Gt(){localStorage.setItem(_e,Mn);}function De(){return localStorage.getItem(_e)}function Yt(e){localStorage.setItem(S,JSON.stringify(e));}function Kt(){try{let e=localStorage.getItem(S);if(!e)return null;let t=JSON.parse(e);return Ke(t,r=>{r?.forEach(n=>{n.payload&&n.payload.dateRange&&(n.payload.dateRange=n.payload.dateRange.map(o=>new Date(o)));});})}catch{return null}}function Jt(){localStorage.removeItem(S);}var jt=e=>{localStorage.setItem(E,e);},I=()=>localStorage.getItem(E),qt=()=>{localStorage.removeItem(E);},Xt=e=>{localStorage.setItem(Ae,JSON.stringify(e));},O=()=>{let e=localStorage.getItem(Ae);if(!e)return null;try{return JSON.parse(e)}catch{return null}},Zt=()=>{let e=O();return e?be(e?.segments,e?.active_segment_id,e?.active_segments):null},Qt=()=>{let e=O();return e?e?.active_segments.find(t=>t.id===e.active_segment_id):null},Je=()=>{let e=I();if(!e)return true;try{let[,t]=e.split(".");if(!t)return !0;let r=t.replace(/-/g,"+").replace(/_/g,"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"="),{exp:o}=JSON.parse(atob(n));return typeof o!="number"?!0:Date.now()>=o*1e3}catch{return true}},er=()=>!Je()&&!!O(),tr=(e,t)=>{localStorage.setItem(`${b}-${e}`,t);},rr=e=>localStorage.getItem(`${b}-${e}`),nr=e=>{localStorage.removeItem(`${b}-${e}`);},or=e=>{localStorage.setItem(_,JSON.stringify(e));},sr=e=>{localStorage.setItem(A,JSON.stringify(e));},ir=()=>{try{let e=localStorage.getItem(_);return e?JSON.parse(e):null}catch{return null}},ar=()=>{try{let e=localStorage.getItem(A);return e?JSON.parse(e):null}catch{return null}},cr=()=>{localStorage.removeItem(_);},lr=()=>{localStorage.removeItem(A);},ur=e=>{localStorage.setItem(w,e);},dr=()=>localStorage.getItem(w)||"default",pr=()=>{localStorage.removeItem(w);},mr=e=>localStorage.setItem(we,JSON.stringify(e)),gr=()=>JSON.parse(localStorage.getItem(we)||"{}"),fr=e=>{try{localStorage.setItem(D,JSON.stringify(e));}catch(t){console.warn("Failed to save preview cache:",t);}},xr=()=>{try{let e=localStorage.getItem(D);return e?JSON.parse(e):[]}catch{return []}},yr=()=>{try{localStorage.removeItem(D);}catch(e){console.warn("Failed to remove preview storage:",e);}},Tr=(e,t,r)=>{try{return JSON.parse(localStorage.getItem(C)??"{}")?.[e]?.[t]?.[r]?.selectedViewId??null}catch{return null}},hr=(e,t,r,n)=>{try{let o=JSON.parse(localStorage.getItem(C)??"{}");localStorage.setItem(C,JSON.stringify({...o,[e]:{...o[e],[t]:{...o[e]?.[t],[r]:{...o[e]?.[t]?.[r],selectedViewId:n}}}}));}catch{return null}},Ie=()=>{localStorage.clear();};var qe={headers:{"Content-Type":"application/json",Accept:"application/json"}},L=je.create({baseURL:Kn$1,headers:{...qe}}),Xe=["users/switch-segment","users/update-segment"];L.interceptors.request.use(e=>new Promise(t=>{let r=false;if(Xe.includes(e.url??"")){t(e);return}let n=s=>{let i=s.data;if(i==="network_request_waiting"){r=true;return}i==="resume_network_request"&&(r=false);};window.addEventListener("message",n);let o=setInterval(()=>{r||(t(e),clearInterval(o),window.removeEventListener("message",n));},0);}));L.interceptors.request.use(e=>{e.headers.Authorization=I();let t=De();return t&&!e.headers["x-test-secret"]&&(e.headers["x-test-secret"]=t),e});L.interceptors.response.use(e=>e,e=>(e.response?.data?.force_logout&&(Ie(),window.location.href="/login"),Promise.reject(e)));function Ar(e){let{sandboxMode:t,fixedSecretKey:r,applicationId:n,serviceId:o,functionId:s,userFunctionId:i,segmentId:a,...l}=e??{};return {...l,live_mode:t?"false":"true",...!!r&&{"x-test-secret":r},...!!n&&{application_id:n},...!!o&&{service_id:o},...!!s&&{function_id:s},...!!i&&{user_function_id:i}}}function Dr(e){let r=(e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"")).toLowerCase();if(r.includes("edg"))return "edge";if(r.includes("opr")||r.includes("opera"))return "opera";if(r.includes("chrome")&&!r.includes("edg")&&!r.includes("opr"))return "chrome";if(r.includes("safari")&&!r.includes("chrome"))return "safari";if(r.includes("firefox"))return "firefox";if(r.includes("msie")||r.includes("trident"))return "ie";if(r.includes("tor"))return "tor";if(r.includes("uc"))return "uc";if(r.includes("yandex"))return "yandex"}var Ir=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Or=e=>{let t=e??(typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"");if(!t)return;let r=t.toLowerCase();if(/ipad|tablet|playbook|silk|(android(?!.*mobile))/.test(r))return "TABLET";if(/mobile|iphone|ipod|android.*mobile|blackberry|iemobile|opera mini|windows phone/.test(r))return "MOBILE";if(/desktop|laptop|macintosh|windows|linux|unix|freebsd|openbsd|netbsd|chromeos|solaris|beos|os/.test(r))return "DESKTOP"};function Fr(){let e=["#D6D6D6","#BFF192","#E4EE92","#FDFCAB","#FFE78E","#FFCE6B","#FFBC8C","#FF947C","#C88FA3","#B988C9","#9A8BBB","#89B6FF","#ACD4E1","#ADBABE","#C0DAAA","#D5DA91","#EAE7A2","#DFCE9C","#C9A997","#858585","#000000"];return e[Math.trunc(Math.random()*e.length)]}function Rr(){let e=["linear-gradient(135deg, #31D5C8 0%, #1186C5 100%)","linear-gradient(135deg, #A2E9BD 0%, #44BB74 100%)","linear-gradient(0deg, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.10) 100%), linear-gradient(135deg, #6BF6EB 0%, #32D6C9 100%)","linear-gradient(135deg, #61AFC9 0%, #7FBFD4 100%)","linear-gradient(135deg, #9DB7A4 0%, #7FBFD4 100%)","linear-gradient(135deg, #D7B38C 0%, #FFE09F 100%)","linear-gradient(135deg, #ADD6A2 0%, #FFDDB2 100%)"];return e[Math.trunc(Math.random()*e.length)]}var Oe={r:0,g:0,b:0,alpha:1},vr=e=>{try{let t=Le(e).rgb(),{r,g:n,b:o,alpha:s=1}=t.object();return {value:{r,g:n,b:o,alpha:s},stringified:`rgba(${r},${n},${o},${s})`}}catch(t){console.error(t),console.warn(`Invalid hex color: "${e}". Falling back to black.`);let{r,g:n,b:o,alpha:s}=Oe;return {value:Oe,stringified:`rgba(${r},${n},${o},${s})`}}},Mr=e=>Le(e).hexa();var $r={fx:"Foreign Exchange",dcc:"Dynamic Currency Conversion"},Ne={BHD:3,KWD:3,JOD:3,OMR:3},N=new Map,Br=(e,t)=>{if(Number.isNaN(e))return "0";try{return N.has(t)||N.set(t,new Intl.NumberFormat("en-US",{currency:t,minimumFractionDigits:Ne[t]?3:2})),N.get(t).format(e)}catch(r){return console.error(r),"0"}},Ze=e=>e%1===0,Qe=e=>e%.1===0,et=e=>Math.abs(e*10%1)===.1,Wr=(e,t)=>{let r=Ne[t],n=e.toString();return Number.isInteger(e)&&Ze(e)?n=e.toFixed(r?3:2):et(e)?n=`${n}${r?"00":"0"}`:Qe(e)&&(n=`${n}${r?"00":"0"}`),n};function tt(e,t=2){let r=parseFloat(e.toString());if(isNaN(r)){let[a,l]=0 .toFixed(t).split("."),u=`${a}.${l}`;return {integerAmount:a,decimalAmount:l,fullAmount:u}}let n=r.toFixed(t),[o,s]=n.split("."),i=parseInt(o).toLocaleString();return {integerAmount:i,decimalAmount:s,fullAmount:`${i}.${s}`}}function Vr(e=0,t=""){return tt(e,to$1[t]?.decimals??2)}function Hr(e){let t=e.request.currency,r=e.select.currency,n=e.merchant.currency,o=r!==n&&r===t&&t&&n&&r,s=r!==t&&t&&n&&r,i=o?"fx":void 0;i=s?"dcc":i;let a=o?e.merchant:void 0;return a=s?e.request:a,{type:i,shownAmount:a}}var Gr=e=>typeof e=="number"?e:Number(e.replace(/,/g,""));var rt=new Intl.DisplayNames(["en"],{type:"region"});function Pe(e){try{return rt.of(e)}catch(t){console.error(t?.response?.data?.error?.message);}}function Kr(e){return e==="SA"}function Jr(e){return e==="OM"}var y=e=>v$1(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"MMM DD",lastWeek:"MMM DD",nextWeek:"MMM DD"}),Zr=(e,t)=>{if(!e)return "";let r=new Date,n=nt(e).isSame(r,"year");return t?v$1(e,{sameDay:"[Today at] h:mm A",nextDay:"[Tomorrow at] h:mm A",lastDay:"[Yesterday at] h:mm A",sameElse:"[on] MMM DD [at] h:mm A",lastWeek:"[on] MMM DD [at] h:mm A",nextWeek:"[on] MMM DD [at] h:mm A"}):n?v$1(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD",lastWeek:"[on] MMM DD",nextWeek:"[on] MMM DD"}):v$1(e,{sameDay:"[Today]",nextDay:"[Tomorrow]",lastDay:"[Yesterday]",sameElse:"[on] MMM DD, YYYY",lastWeek:"[on] MMM DD, YYYY",nextWeek:"[on] MMM DD, YYYY"})},Qr=e=>{let t=e?.payout,r=e?.settlement;if(!e)return {tooltip:[],status:void 0};if(!["PAID_OUT","SETTLED"].includes(e?.status||""))return {tooltip:[...r?.scheduled?[{left:"settlement_scheduled",right:`${y(r?.scheduled)}`}]:[],...t?.scheduled?[{left:"payment_scheduled",right:`${y(t?.scheduled)}`}]:[]],status:"PENDING"};if(e?.status==="PAID_OUT"){let n=t?.activities.find(o=>o.status==="PAID_OUT");return {tooltip:[{left:"paidOut",right:`${y(n?.date)}`}],status:"PAID_OUT"}}if(e?.status==="SETTLED"){let n=r?.activities.find(o=>o.status==="SETTLED");return {tooltip:[{left:"settled",right:`${y(n?.date)}`},...t?.scheduled?[{left:"payment_scheduled",right:`${y(t?.scheduled)}`}]:[]],status:"SETTLED"}}};var rn=(e,t)=>{let{isFirst:r,isLast:n}=t||{};return `${(e+0)/898*100}%`},nn=({table:e,cellID:t,tableMode:r})=>{switch(e){case "charge":return Wn$1[t][r];case "refund":return _do[t][r];case "authorization":return Vn$1[t][r];case "intents":return Yn$1[t][r];case "topups":return fo$1[t][r];case "destinations":return Xn[t][r];case "leads":return _n$1[t][r];case "orders":return $n[t][r];case "tokens":return eo$1[t][r];case "payouts":return ao$1[t][r];case "protectCharges":return co[t][r];case "protectAuthorizations":return bo[t][r];case "wallet":return go$1[t][r];case "invoices":return Zn[t][r];case "authentications":return Un$1[t][r];case "walletDetails":return ho$1[t][r];case "walletStatement":return io[t][r];case "merchants":return jo$1[t][r];case "terminals":return ko[t][r];case "orchestrationTerminals":return lo$1[t][r];case "orchestrationRouting":return mo$1[t][r];default:return "100px"}},on=(e,t)=>{let r,n=window.innerHeight-24-264;return e?r=window.innerHeight/1.7:t?r=n-100:r=n-20,Math.floor(r/(e||t?52:70))},ot=()=>{let e=window.innerHeight*.82/1.24-57;return Math.floor(e/70)},sn=e=>{let t=ot();return e<t+1},an=e=>e==="default",cn=e=>e==="sheet",ln=()=>({charge:{prefixes:["chg_","payout_","settlement_","terminal_"],accessor:e=>[e.id,e.capture?.charge?.map(t=>t.id),e.charge?.id,e.transactions?.map(t=>t.id),e.charge_id],label:"Charge",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.charges.code,icon:"capture"},authorize:{prefixes:["auth_"],keys:["id","authorize.id","source.id","charge.source.id"],label:"Authorization",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.authorization.code,icon:"capture"},intents:{prefixes:["intent_"],keys:[],label:"Intents",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.intents.code,icon:"capture"},refunds:{prefixes:["re_","payout_"],accessor:e=>[e?.refunds?.refund?.map(t=>t.id),e?.id,...e?.refunds?.length?[e?.refunds?.map(t=>t.id)]:[]],label:"Refunds",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.refunds.code,icon:"refund"},authentication:{prefixes:["auth_payer_"],keys:["authentication.id"],label:"Authentication",appCode:Fn.authentication.code,serviceCode:Fn.authentication.services.authentication.code,icon:"capture"},order:{prefixes:["order_","ord_"],keys:["order.id"],label:"Order",appCode:Fn.order.code,serviceCode:Fn.order.services.orders.code,icon:"capture"},chargeFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:Fn.protect.code,serviceCode:Fn.protect.services.chargesFlags.code,icon:"flag"},authorizationFlags:{prefixes:["flag_"],accessor:e=>e?.flags?.flag?.map(t=>t.id),label:"Flags",appCode:Fn.protect.code,serviceCode:Fn.protect.services.authorizationsFlags.code,icon:"flag"},token:{prefixes:["tok_"],keys:["source.id"],label:"Token",appCode:Fn.tokens.code,serviceCode:Fn.tokens.services.tokens.code,icon:"capture"},destination:{prefixes:["trf_","payout_"],accessor:e=>[e?.destinations?.destination?.map(t=>t?.transfer?.id),e?.id],label:"Destination",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.destinations.code,icon:"destination"},payout:{prefixes:["payout_"],keys:["balance.payout.id"],label:"Payout",appCode:Fn.payouts.code,serviceCode:Fn.payouts.services.payouts.code,icon:"capture"},settlement:{prefixes:["settlement_"],keys:["settlement.id"],label:"Settlement",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.settlements.code,icon:"capture"},intent:{prefixes:["intent_"],keys:["intent.id"],label:"Intent",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.intents.code,icon:"capture"},topup:{prefixes:["topup_"],keys:["topup.id"],label:"Topup",appCode:Fn.acceptance.code,serviceCode:Fn.acceptance.services.topups.code,icon:"capture"}});var mn=e=>typeof e=="string"&&e.trim().length>0,F=(e,t)=>{if(!t)return e;let r=e.indexOf(t);return e.substring(r+t.length)},P=new Map,R=(e,t)=>(P.has(t)||P.set(t,new RegExp(t,"gi")),e.match(P.get(t))?.length??0),gn=e=>e.reduce((t,r)=>(t.push(r[0]),t),[]),fn=()=>crypto?.randomUUID?.()||Math.random().toString(36).substring(2,15),xn=e=>{if(navigator.clipboard)navigator.clipboard.writeText(e);else {let t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove();}},yn=e=>typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1),Tn=e=>{let[t]=e.split("%");return parseFloat(t)||0},hn=e=>`\u2022\u2022\u2022 ${e.slice(-4)}`,Cn=(e,t=/_/g,r=" ")=>{let n=e.replace(t,r);return Fe(n)},Sn=e=>Ue(Fe(e));var bn=(e,t)=>!e?.last_four||!t?"":`${t?.toLowerCase()} - ${e?.last_four}`,_n=(e,t)=>!t||!e?"":`${e?.toLowerCase()||"ID"} \u2022 ${t?.slice(-4)}`;function wn({unCapturedCode:e,unCapturedMessage:t,acquirerCode:r,acquirerMessage:n,gatewayCode:o,gatewayMessage:s}){let i=e&&t&&`${e} - ${t}`,a=r&&n&&`${r} - ${n}`,l=o&&s&&`${o} - ${s}`;return {unCapturedTooltip:i,acquirerTooltip:a,gatewayTooltip:l}}function In(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}var v=e=>e==null||e==="";function On(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>Array.isArray(t)?t.length>0&&t?.some(r=>!v(r)):typeof t=="object"?Object.values(t||{}).some(r=>!v(r)):!v(t)))}var Pn=()=>Nn===On$1.TAPSTERS_FRONTEND;var Rn=e=>e.replace(/[^0-9]/g,"");function Un({rowData:e,prefixes:t,keys:r=[],accessor:n}){let o=!!n;return (o?n?.(e):r)?.filter(Boolean)?.reduce((a,l)=>{let u=o?l:Se(e,l);return typeof u=="string"&&t?.some(p=>u.includes(p)&&R(F(u,p),"_")===0)&&a.push(u),Array.isArray(u)&&u.length>0&&u.every(p=>typeof p=="string"&&t?.some(m=>p.includes(m)&&R(F(p,m),"_")===0))&&a.push(...u),a},[])}var Bn=450,Wn=600;var Vn=3;var zn=20,at=(r=>(r.Index="index",r.Date="date",r))(at||{}),Hn={name:"index",label:"",selected:true,menuItems:void 0,order:0,pinned:"start",isDefaultPinned:true,pinnable:true},Gn={name:"date",label:"Date",selected:true,menuItems:void 0,order:1,pinned:"start",isDefaultPinned:true,pinnable:true},Yn={date:"Date",index:"Index"},Kn={sheet:["sheet"],default:["advanced","default"],text:["text"]},Jn={sheet:"Advanced",default:"Sheet",text:"text"},ct={id:"default",label:"Default"},jn={id:"custom",label:"Custom view"},qn=[ct];function eo(e,t,r){return e.filter(n=>{let o=n?.id?.toString(),s=t.find(m=>{let Ve=m.code?.toLowerCase()===o?.toLowerCase(),ze=m.name?.toLowerCase()===o?.toLowerCase();return (Ve||ze)&&m.selected}),i=!!n.tableViewId&&(s?.menuItems?.length||0)>0,a=s?.menuItems?.find(m=>m.name?.toLowerCase()===n.tableViewId?.toString()?.toLowerCase())?.selected,l=!!s&&(a||!i),p=["actions","action_icon",...r?["index","date"]:[]].includes(o?.toLowerCase()??"");return !!(l||p)})}function to(e,t){if(t.toLowerCase()==="index")return 0;let r=e.findIndex(o=>o.code?.toLowerCase()===t?.toLowerCase()),n=e[r];return r>=0?n?.sort_order??r:999}function ro(e,t,r){return e?.find(n=>{let o=n.code?.toLowerCase()===t.toLowerCase(),s=n.name?.toLowerCase()===t.toLowerCase();return o||s})?.menuItems?.find(n=>n.name?.toLowerCase()===r.toLowerCase()&&n.selected)?.selected||false}function no(e,t){return e?.filter(r=>!!r.name?.[0]?.text)?.map(r=>({code:r.code,label:f(r.name,t),name:f(r.name,t)||"",selected:r?.selected!==false,sort_order:r.sort_order,menuItems:r.fields?.map(n=>n.parameters?.filter(o=>!!o.code)?.map(o=>({code:o.code,label:Fe(o.code),name:`${o.code}`,selected:o?.selected!==false})))?.flat()?.filter(n=>!!n.name)}))||[]}function oo(e){return e.map(t=>({...t.code?{code:t.code}:{},name:[{text:t.name,lang:"en"}],selected:t.selected,sort_order:1,sorting:"descending",fields:t.menuItems?.map(r=>({code:r.name,type:"single",parameters:[{parameter:r.name,code:r.name,selected:r.selected}]}))||[]}))}var so=({columnsView:e,columnsIds:t,selected:r})=>{let n=new Set(t.map(s=>s?.toLowerCase())),o=s=>({...s,selected:r,fields:s.fields?.map(i=>({...i,parameters:i.parameters?.map(a=>({...a,selected:r}))??[]}))});return e.map(s=>n.has(s.code?.toLowerCase()??"")||n.has(s.name?.[0]?.text?.toLowerCase()??"")?o(s):s)};function ao(e){return {fullPhone:e?.number?`${e?.country_code||""} ${e?.number}`:"",code:e?.country_code||"",number:e?.number||""}}var Re=(e,t)=>{let r=e.type==="url"?e.url:window.URL.createObjectURL(new Blob([e.content])),n=document.createElement("a");n.href=r,n.setAttribute("download",t),document.body.appendChild(n),n.click(),n.remove(),e.type==="content"&&window.URL.revokeObjectURL(r);},lo=(e,t)=>Re({type:"content",content:e},t),uo=(e,t)=>Re({type:"url",url:e},t);var ut=e=>!!(e?.isAxiosError&&!e?.response),mo=(e,t="")=>e?.response?.data?.error?.message?.trim()||t,go=e=>!!e,dt=e=>(e?.code==="ECONNABORTED"||e?.message?.toLowerCase().includes("timeout"))??false,fo=e=>!!(e?.response?.status===404||e?.response?.status===400&&e?.response?.data?.error?.message?.toLowerCase().includes("not found")),T=({code:e,message:t})=>e?`${t} - ${e}`:t,xo=({error:e,fallbackMessage:t})=>{if(ut(e)){let n=t??"networkError";return {code:null,message:n,formatted:T({code:null,message:n})}}if(dt(e)){let n=t??"yourRequestOutPleaseTryAgain";return {code:null,message:n,formatted:T({code:null,message:n})}}if(e?.response&&typeof e.response.data=="object"&&"error"in e.response.data){let{code:n,message:o}=e.response.data.error;return {code:n,message:o,formatted:T({code:n,message:o})}}let r=t??"somethingWentWrong";return {code:null,message:r,formatted:T({code:null,message:r})}};var ho=()=>["passport","national_id","iqamah","civil_id"].map(e=>({id:e,label:Fe(e)}));function So(e,t=2){let n=e??0;if(!n)return "0 kb";let o=n/1024;return o>1024?`${(o/1024).toFixed(t)} mb`:`${o.toFixed(t)} kb`}function mt(e){return e?.file?.size!==void 0&&e?.file?.name!==void 0}function gt(e,t){return e.name===t.name&&e.size===t.size}function Eo(e,t){return t?.length?t.some(r=>mt(r)?gt(r.file,e):r.name===e.name):false}var Ao=e=>{let t=e?.split(".").pop()?.toLowerCase()??"";return ep[t]??Ye$1},wo=(e,t,r)=>`${e}-${t}-${r}`;var Io=e=>e?/[\u0600-\u06FF]/g.test(e):false;function Oo(e,t="en"){return (e||[]).find(r=>(r?.lang||r?.locale)===t)||e?.[0]}var f=(e,t="en")=>(e||[]).find(r=>r?.lang===t)?.text,Lo=(e,t="en")=>(e||[]).find(r=>r?.lang===t);var Po=e=>{let t=e?.wallet==="SV Wallet"?"walletStoredValue":"walletPassThru";return e?.type==="Wallet"?t:e?.type},ft={AMERICAN_EXPRESS:"AMEX"},ve=e=>ft[e.toUpperCase()]??e.toUpperCase(),Fo=(e,t)=>!!e&&!!t&&ve(e)===ve(t);var vo=e=>({Local:e.success.light,Regional:e.info.light,Global:e.warning.light});var Uo=(e,t)=>{if(t==null)return "";let r=Fo$1[e];return e===Eo$1.COUNT?t===1?r:`${r}s`:r};var d={primary:"#1F88D0",background:"white",border:"#F2F2F2",transparent:"transparent"},g={thin:"0.5px",thick:"1px",none:"0px"},Me={minHeight:"28px",fullHeight:"100%"},Bo=({isSelected:e,isCellSelected:t,isColumnSelected:r,isRowSelected:n,isLastRow:o})=>e?n?xt():t&&!r?yt():r?Tt(o):{}:{},xt=()=>({backgroundColor:d.background,color:d.primary}),yt=()=>({border:`${g.thin} solid ${d.primary}`,backgroundColor:d.background,color:d.primary,borderRadius:"2px"}),Tt=e=>{let t=ht(),r=Ct(e);return {borderWidth:t,borderStyle:"solid",borderColor:d.primary,borderBottom:r,height:Me.fullHeight,minHeight:Me.minHeight,display:"flex",alignItems:"center"}},ht=()=>{let{none:e,thin:t}=g;return `${e} ${t} ${t} ${t}`},Ct=e=>e?`${g.thick} solid ${d.primary}`:`${g.thin} solid ${d.border}`,Wo=({effectiveFirst:e,isPinnedStart:t,isPinnedEnd:r})=>({borderTop:`${g.thin} solid ${d.primary}`,borderBottom:`${g.thin} solid ${d.primary}`,borderRight:`${g.thin} solid ${r?d.primary:"none"}`,borderLeft:`${g.thin} solid ${t&&e?d.primary:"transparent"}`}),Vo={left:"flex-start",center:"center",right:"flex-end"};function zo(e,t){return t==null?e:[e,...Array.isArray(t)?t:[t]]}function Ho(...e){return e.filter(Boolean).join(" ")||void 0}var M=k(po,ro$1,qo$1);function k(e,t,r){let n=getTimezone(r);return n?{countryCode:e,label:`(GMT${n.utcOffsetStr}) ${Pe(e)??t}`,timezone:r,offset:n.utcOffset/so$1}:M}var bt=e=>{let t=getCountry(e),r=t?.timezones[0];if(!(!t||!r))return k(e,t.name,r)},jo=e=>bt(e)??M,qo=e=>{let t=getCountryForTimezone(e),r=getTimezone(e);return !t||!r?M:k(t.id,t.name,e)};function rs(e){return {name:"Payment Methods",type:"payment_methods",options:e?.map(t=>({name:Ue(Fe(f(t?.name))),type:t?.code,icon:Go[t.code]??Go.CARD,options:t.payment_methods?.map(r=>({name:f(r.name),type:r.code}))}))}}function ns(e=[]){return {name:"Payment Schemes",type:"payment_scheme",options:e.filter(t=>t.code).map(t=>({name:Ue(Fe(f(t?.name))),type:t?.code}))}}var Be=["120px","180px","100px","150px","200px","140px","160px","110px","190px","130px"],_t={id:"index",header:"",width:"34px",order:0,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},At={id:"date",header:"",width:"120px",order:1,hidden:false,sortable:false,pinned:"start",isDefaultPinned:true,pinnable:true},wt={id:"action_icon",header:"",width:"36px",order:Be.length+3,hidden:false,sortable:false,pinned:"end",pinnable:true,isDefaultPinned:true},Dt=(e=Be)=>{let t=e.map((r,n)=>({id:`skeleton-col-${n}`,header:"",width:r,order:n+2,hidden:false,sortable:false,pinnable:false}));return [_t,At,...t,wt]},ss=(e,t,r)=>r&&t?Dt():[...e];var as=(e,t)=>e.map(r=>{let n=Object.entries(t);if(!r.default||!r.layout?.length||!n.length)return r;let o=new Map(n.map(([i,a])=>[i.toLowerCase(),a])),s=r.layout.map(i=>({...i,columns:i.columns?.map(a=>{let l=a.code?.toLowerCase();if(!l||!o.has(l))return a;let u=o.get(l)??false;return {...a,default:u,fields:a.fields?.map(p=>({...p,default:u}))}})}));return {...r,layout:s}});var us=(e,t)=>t.some(r=>!!e[r]),ds=(e,t,r)=>t?e:e.map(n=>{if(r.hiddenFilterColumnIds.includes(n.id)){let{filter:s,...i}=n,a=n.id,l=typeof i.header=="function"?Fe(a):i.header;return {...i,header:l}}let{hiddenFilterOptionKeys:o}=r;if(o&&n.filter&&"options"in n.filter&&n.filter.options){let s=n.filter.options,i=s.filter(a=>!a.apiKey||!o.includes(a.apiKey));if(i.length!==s.length)return {...n,filter:{...n.filter,options:i}}}return n});typeof window<"u"&&We.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener noreferrer");});var Ot={USE_PROFILES:{html:true},ALLOWED_URI_REGEXP:/^(?:(?:https?|mailto|tel|blob):|[^a-z]|[-a-z.+]+(?:[^-a-z.+:]|$))/i,WHOLE_DOCUMENT:true},gs=e=>typeof window>"u"?"":String(We.sanitize(e||"",Ot));var xs=e=>window?.__TAPOS_NEWRELIC_TRACKING_EVENTS__?.trackFeatureEvent?.(e),ys=e=>e.toISOString();function hs(e,t){let r=e.replace(/:/g,"");return t?`${t}-${r}`:r}function Lt(e){return e!=null&&e!==""}function Ss(e,t){let r=e!=null,n=t&&"message"in t?t.message:e?.message,o=Lt(n);return {isProvided:r,isVisible:o,type:o?e?.type:void 0}}export{Br as $,ro as $a,sr as A,hn as Aa,vo as Ab,ir as B,Cn as Ba,Uo as Bb,ar as C,Sn as Ca,d as Cb,cr as D,bn as Da,Bo as Db,lr as E,_n as Ea,Wo as Eb,ur as F,wn as Fa,Vo as Fb,dr as G,In as Ga,zo as Gb,pr as H,v as Ha,Ho as Hb,mr as I,On as Ia,jo as Ib,gr as J,Pn as Ja,qo as Jb,fr as K,Rn as Ka,rs as Kb,xr as L,Un as La,ns as Lb,yr as M,Bn as Ma,Be as Mb,Tr as N,Wn as Na,Dt as Nb,hr as O,Vn as Oa,ss as Ob,Ie as P,zn as Pa,as as Pb,L as Q,at as Qa,us as Qb,Ar as R,Hn as Ra,ds as Rb,Dr as S,Gn as Sa,gs as Sb,Ir as T,Yn as Ta,xs as Tb,Or as U,Kn as Ua,ys as Ub,Fr as V,Jn as Va,hs as Vb,Rr as W,ct as Wa,Lt as Wb,vr as X,jn as Xa,Ss as Xb,Mr as Y,qn as Ya,$r as Z,eo as Za,Ne as _,to as _a,Ft as a,Wr as aa,no as ab,Rt as b,tt as ba,oo as bb,vt as c,Vr as ca,so as cb,Mt as d,Hr as da,ao as db,be as e,Gr as ea,Re as eb,Ge as f,Pe as fa,lo as fb,Ye as g,Kr as ga,uo as gb,Bt as h,Jr as ha,ut as hb,Gt as i,y as ia,mo as ib,De as j,Zr as ja,go as jb,Yt as k,Qr as ka,dt as kb,Kt as l,rn as la,fo as lb,Jt as m,nn as ma,xo as mb,jt as n,on as na,ho as nb,I as o,sn as oa,So as ob,qt as p,an as pa,mt as pb,Xt as q,cn as qa,gt as qb,O as r,ln as ra,Eo as rb,Zt as s,mn as sa,Ao as sb,Qt as t,F as ta,wo as tb,Je as u,R as ua,Io as ub,er as v,gn as va,Oo as vb,tr as w,fn as wa,f as wb,rr as x,xn as xa,Lo as xb,nr as y,yn as ya,Po as yb,or as z,Tn as za,Fo as zb};
@@ -1 +1 @@
1
- import {j}from'./chunk-3LLAL7SZ.js';import {Hb}from'./chunk-2V7P76GA.js';import {forwardRef,memo}from'react';import C from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var p="os-shared-Card",o={root:`${p}-root`,header:`${p}-header`,title:`${p}-title`},n=233,f=39;var c=styled(C)(({theme:r})=>{let{grey:e}=r.v2.palette;return {display:"flex",flexDirection:"column",height:n,border:`1px solid ${e[100]}`,borderRadius:r.v2.radius(8),backgroundColor:"#FBFBFB",fontSize:r.v2.typography.textVariants.body.small.regular.fontSize,transform:"scale(1)"}}),y=styled(C,{shouldForwardProp:r=>r!=="$hasStartAdornment"})(({theme:r,$hasStartAdornment:e})=>({display:"flex",alignItems:"center",...e&&{gap:r.v2.spacing(8)},height:f,flexShrink:0,overflow:"visible",padding:`${r.v2.spacing(8)} ${r.v2.spacing(12)}`,borderBottom:`1px solid ${r.v2.palette.grey[100]}`})),x=styled(j)(({theme:r})=>({flexGrow:1,minWidth:0,color:r.v2.palette.grey[900],textTransform:"capitalize"}));var H=forwardRef(({id:r,className:e,sx:d,children:s,...a},l)=>jsx(c,{ref:l,component:"article",id:r,"data-testid":r??"Card",...a,className:Hb(o.root,e),sx:d,children:s}));H.displayName="Card";var v=memo(H);var g=forwardRef(({id:r,className:e,sx:d,children:s,startAdornment:a,endAdornment:l,...S},N)=>jsxs(y,{ref:N,component:"header",id:r,"data-testid":r??"CardHeader",...S,$hasStartAdornment:a!=null,className:Hb(o.header,e),sx:d,children:[a,jsx(x,{component:"div",textVariant:"body.small.semibold",className:o.title,children:s}),l]}));g.displayName="CardHeader";var T=memo(g);export{o as a,v as b,T as c};
1
+ import {j}from'./chunk-LLM6NHYM.js';import {Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,memo}from'react';import C from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var p="os-shared-Card",o={root:`${p}-root`,header:`${p}-header`,title:`${p}-title`},n=233,f=39;var c=styled(C)(({theme:r})=>{let{grey:e}=r.v2.palette;return {display:"flex",flexDirection:"column",height:n,border:`1px solid ${e[100]}`,borderRadius:r.v2.radius(8),backgroundColor:"#FBFBFB",fontSize:r.v2.typography.textVariants.body.small.regular.fontSize,transform:"scale(1)"}}),y=styled(C,{shouldForwardProp:r=>r!=="$hasStartAdornment"})(({theme:r,$hasStartAdornment:e})=>({display:"flex",alignItems:"center",...e&&{gap:r.v2.spacing(8)},height:f,flexShrink:0,overflow:"visible",padding:`${r.v2.spacing(8)} ${r.v2.spacing(12)}`,borderBottom:`1px solid ${r.v2.palette.grey[100]}`})),x=styled(j)(({theme:r})=>({flexGrow:1,minWidth:0,color:r.v2.palette.grey[900],textTransform:"capitalize"}));var H=forwardRef(({id:r,className:e,sx:d,children:s,...a},l)=>jsx(c,{ref:l,component:"article",id:r,"data-testid":r??"Card",...a,className:Hb(o.root,e),sx:d,children:s}));H.displayName="Card";var v=memo(H);var g=forwardRef(({id:r,className:e,sx:d,children:s,startAdornment:a,endAdornment:l,...S},N)=>jsxs(y,{ref:N,component:"header",id:r,"data-testid":r??"CardHeader",...S,$hasStartAdornment:a!=null,className:Hb(o.header,e),sx:d,children:[a,jsx(x,{component:"div",textVariant:"body.small.semibold",className:o.title,children:s}),l]}));g.displayName="CardHeader";var T=memo(g);export{o as a,v as b,T as c};
@@ -1 +1 @@
1
- import {j,k,d,l}from'./chunk-3LLAL7SZ.js';import {Hb}from'./chunk-2V7P76GA.js';import {forwardRef,memo}from'react';import B from'@mui/material/FormControl';import j$1 from'@mui/material/FormControlLabel';import q from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-RadioGroup",t={root:`${i}-root`,title:`${i}-title`,group:`${i}-group`,item:`${i}-item`,label:`${i}-label`,icon:`${i}-icon`},V=["sm","md","lg"],W=["vertical","horizontal"],u="sm",S="vertical",I=0,A={sm:[7.5,16,7.5,8],md:[9,16,9,10],lg:[11,16,11,12]},T={sm:35,md:40,lg:45},U={sm:o=>({...o.v2.typography.textVariants.body.small.medium}),md:o=>({...o.v2.typography.textVariants.body.medium.medium}),lg:o=>({...o.v2.typography.textVariants.body.large.semibold,fontWeight:o.v2.typography.fontWeightMedium})};function J(o,r){let[e,a,s,d]=A[r];return `${o.v2.spacing(e)} ${o.v2.spacing(a)} ${o.v2.spacing(s)} ${o.v2.spacing(d)}`}var D=styled(B)({display:"flex",flexDirection:"column",width:"100%",minWidth:0}),C=styled(j)(({theme:o})=>({color:o.v2.palette.grey[700],marginBottom:o.v2.spacing(4)})),N=styled(q,{shouldForwardProp:o=>o!=="$layout"&&o!=="$spacing"})(({theme:o,$layout:r,$spacing:e})=>({display:"flex",flexDirection:r==="horizontal"?"row":"column",gap:o.v2.spacing(e),...r==="horizontal"&&{[`& .${t.item}`]:{width:"auto",flexShrink:0}}})),v=styled(j$1,{shouldForwardProp:o=>o!=="$size"})(({theme:o,$size:r})=>{let{brand:e,grey:a}=o.v2.palette;return {margin:0,width:"100%",cursor:"pointer",padding:J(o,r),maxHeight:o.v2.spacing(T[r]),"& .MuiFormControlLabel-label":{...U[r](o),color:a[900],display:"block",width:"100%",cursor:"pointer"},[`& .${k.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:e[500]}}}}),E=styled("span")(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:o.v2.spacing(8),width:"100%",minWidth:0})),$=styled(d)({flexShrink:0,display:"block",marginLeft:"auto"});var z=forwardRef(({option:o,size:r=u,customLabelRenderer:e,labelPosition:a="end",customRadioProps:s,labelSx:d,className:R,sx:y,...G},f)=>{let m=e?e(o):o.label,{src:l$1,...g}=o.icon??{};return jsx(v,{ref:f,value:o.value,control:jsx(l,{...s,...o.customProps}),label:jsxs(E,{className:t.label,sx:d,children:[m,l$1?jsx($,{...g,src:l$1,className:Hb(t.icon,o.icon?.className)}):null]}),disabled:o.disabled,labelPlacement:a,$size:r,className:Hb(t.item,R),sx:y,...G})});z.displayName="RadioItem";var F=memo(z);var w=forwardRef(({options:o,onOptionChange:r,size:e=u,customLabelRenderer:a,layout:s=S,spacing:d=I,labelPosition:R="end",customRadioProps:y,labelSx:G,onChange:f,title:m,id:l,className:g,sx:M,"data-testid":k,...H},Z)=>{let Y=(c,b)=>{r?.(b),f?.(c,b);};return jsxs(D,{ref:Z,id:l,"data-testid":k??l??"RadioGroup",className:Hb(t.root,g),sx:M,children:[typeof m=="string"?jsx(C,{component:"span",textVariant:"body.small.medium",className:t.title,children:m}):m,jsx(N,{className:t.group,$layout:s,$spacing:d,onChange:Y,...H,children:o.map(c=>jsx(F,{option:c,size:e,customLabelRenderer:a,labelPosition:R,customRadioProps:y,labelSx:G},c.value))})]})});w.displayName="RadioGroup";var to=memo(w);export{t as a,V as b,W as c,u as d,S as e,I as f,to as g};
1
+ import {j,k,d,l}from'./chunk-LLM6NHYM.js';import {Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,memo}from'react';import B from'@mui/material/FormControl';import j$1 from'@mui/material/FormControlLabel';import q from'@mui/material/RadioGroup';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var i="os-shared-RadioGroup",t={root:`${i}-root`,title:`${i}-title`,group:`${i}-group`,item:`${i}-item`,label:`${i}-label`,icon:`${i}-icon`},V=["sm","md","lg"],W=["vertical","horizontal"],u="sm",S="vertical",I=0,A={sm:[7.5,16,7.5,8],md:[9,16,9,10],lg:[11,16,11,12]},T={sm:35,md:40,lg:45},U={sm:o=>({...o.v2.typography.textVariants.body.small.medium}),md:o=>({...o.v2.typography.textVariants.body.medium.medium}),lg:o=>({...o.v2.typography.textVariants.body.large.semibold,fontWeight:o.v2.typography.fontWeightMedium})};function J(o,r){let[e,a,s,d]=A[r];return `${o.v2.spacing(e)} ${o.v2.spacing(a)} ${o.v2.spacing(s)} ${o.v2.spacing(d)}`}var D=styled(B)({display:"flex",flexDirection:"column",width:"100%",minWidth:0}),C=styled(j)(({theme:o})=>({color:o.v2.palette.grey[700],marginBottom:o.v2.spacing(4)})),N=styled(q,{shouldForwardProp:o=>o!=="$layout"&&o!=="$spacing"})(({theme:o,$layout:r,$spacing:e})=>({display:"flex",flexDirection:r==="horizontal"?"row":"column",gap:o.v2.spacing(e),...r==="horizontal"&&{[`& .${t.item}`]:{width:"auto",flexShrink:0}}})),v=styled(j$1,{shouldForwardProp:o=>o!=="$size"})(({theme:o,$size:r})=>{let{brand:e,grey:a}=o.v2.palette;return {margin:0,width:"100%",cursor:"pointer",padding:J(o,r),maxHeight:o.v2.spacing(T[r]),"& .MuiFormControlLabel-label":{...U[r](o),color:a[900],display:"block",width:"100%",cursor:"pointer"},[`& .${k.root}`]:{cursor:"pointer",color:"#8C9196","&.Mui-checked":{color:e[500]}}}}),E=styled("span")(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"space-between",gap:o.v2.spacing(8),width:"100%",minWidth:0})),$=styled(d)({flexShrink:0,display:"block",marginLeft:"auto"});var z=forwardRef(({option:o,size:r=u,customLabelRenderer:e,labelPosition:a="end",customRadioProps:s,labelSx:d,className:R,sx:y,...G},f)=>{let m=e?e(o):o.label,{src:l$1,...g}=o.icon??{};return jsx(v,{ref:f,value:o.value,control:jsx(l,{...s,...o.customProps}),label:jsxs(E,{className:t.label,sx:d,children:[m,l$1?jsx($,{...g,src:l$1,className:Hb(t.icon,o.icon?.className)}):null]}),disabled:o.disabled,labelPlacement:a,$size:r,className:Hb(t.item,R),sx:y,...G})});z.displayName="RadioItem";var F=memo(z);var w=forwardRef(({options:o,onOptionChange:r,size:e=u,customLabelRenderer:a,layout:s=S,spacing:d=I,labelPosition:R="end",customRadioProps:y,labelSx:G,onChange:f,title:m,id:l,className:g,sx:M,"data-testid":k,...H},Z)=>{let Y=(c,b)=>{r?.(b),f?.(c,b);};return jsxs(D,{ref:Z,id:l,"data-testid":k??l??"RadioGroup",className:Hb(t.root,g),sx:M,children:[typeof m=="string"?jsx(C,{component:"span",textVariant:"body.small.medium",className:t.title,children:m}):m,jsx(N,{className:t.group,$layout:s,$spacing:d,onChange:Y,...H,children:o.map(c=>jsx(F,{option:c,size:e,customLabelRenderer:a,labelPosition:R,customRadioProps:y,labelSx:G},c.value))})]})});w.displayName="RadioGroup";var to=memo(w);export{t as a,V as b,W as c,u as d,S as e,I as f,to as g};
@@ -1 +1 @@
1
- import {v}from'./chunk-3LLAL7SZ.js';import {Hb,X as X$1,Y as Y$1}from'./chunk-2V7P76GA.js';import {Gb,Yc}from'./chunk-FI5H6V55.js';import {forwardRef,useState,useRef,useCallback,memo,useEffect,useMemo}from'react';import H from'@mui/material/Box';import ko from'@mui/material/ClickAwayListener';import Po from'@mui/material/Popper';import go from'@mui/material/Stack';import ro from'@mui/material/Typography';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import eo from'@mui/material/MenuItem';import {styled,alpha}from'@mui/material/styles';import K from'@mui/material/Button';import Co from'@mui/material/TextField';import ho from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import v$1 from'color';import no from'@mui/material/InputAdornment';var m="os-shared-ColorPicker",n={root:`${m}-root`,controls:`${m}-controls`,swatch:`${m}-swatch`,actions:`${m}-actions`,valueLabel:`${m}-valueLabel`,editButton:`${m}-editButton`,resetButton:`${m}-resetButton`,panel:`${m}-panel`,panelFields:`${m}-panelFields`,panelFooter:`${m}-panelFooter`,panelCancel:`${m}-panelCancel`,panelConfirm:`${m}-panelConfirm`,schemeTrigger:`${m}-schemeTrigger`,schemeList:`${m}-schemeList`,channelInput:`${m}-channelInput`},F={hideReset:false,disableAlpha:false},I={cancel:"Cancel",confirm:"Okay"},w="Edit";var V=styled(go)(({theme:o})=>({backgroundColor:o.palette.grey[400],borderRadius:"4px",padding:o.spacing(.5),paddingRight:o.spacing(1.5)})),X=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),Z=styled(H)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:o.palette.common.white,padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),j=styled(H)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),q=styled("button")(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,fontFamily:"inherit","&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none",cursor:"not-allowed"},"&:hover:not(:disabled)":{textDecoration:"none"}})),J=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),Q=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Y=styled("button",{shouldForwardProp:o=>o!=="active"})(({theme:o,active:a})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...a&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),oo=styled(ho)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),b=styled(Co)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var yo=({scheme:o,setScheme:a})=>{let[l,t]=useState(null),u=!!l,i=useCallback(c=>{t(l?null:c.currentTarget);},[l]),s=useCallback(()=>{t(null);},[]),d=useCallback(c=>{s(),a(c);},[s,a]);return jsxs(Fragment,{children:[jsxs(Y,{type:"button",active:u,onClick:i,className:n.schemeTrigger,children:[o,jsx(H,{component:"img",sx:{transform:u?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Yc,alt:""})]}),jsx(Po,{anchorEl:l,open:u,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(ko,{onClickAway:c=>{l?.contains(c.target)||s();},children:jsxs(oo,{className:n.schemeList,children:[jsx(eo,{onClick:()=>d("RGB"),children:"RGB"}),jsx(eo,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},to=yo;function B(o,a){return Number.isNaN(o)||o<0?0:o>a?a:o}var Ao=({value:o,onChange:a,disableAlpha:l=false})=>{let t=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[u,i]=useState(t),s=Math.round(o.a*100);useEffect(()=>{let e=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");i(e);},[o.r,o.g,o.b]);let d=e=>{let r=e.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();r.length>6&&(r=r.slice(0,6)),i(r);},c=()=>{let e=u;if(e.length===3&&(e=e.split("").map(r=>r+r).join(""),i(e)),e.length===6)try{let r=v$1(`#${e}`).alpha(o.a);a({r:r.red(),g:r.green(),b:r.blue(),a:r.alpha()});}catch{i(t);}else i(t);},C=e=>{let r=B(parseInt(e.target.value,10),100);a({...o,a:r/100});},f=n.channelInput;return jsxs(go,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(b,{className:f,value:u,onChange:d,onBlur:c,placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(no,{position:"start",sx:{m:0},children:jsx(ro,{component:"span",color:e=>alpha(e.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!l&&jsx(b,{className:f,type:"number",value:s,onChange:C,inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},ao=Ao;var _o=({value:o,onChange:a,disableAlpha:l=false})=>{let[t,u]=useState(o),{r:i,g:s,b:d,a:c}=t;useEffect(()=>{u(o);},[o]);let C=useCallback((r,x)=>p=>{u({...t,[r]:B(+p.target.value,x)});},[t]),f=useCallback((r,x)=>{a({...t,[r]:B(t[r],x)});},[a,t]),e=n.channelInput;return jsxs(go,{direction:"row",spacing:1,...l&&{flex:1},children:[jsx(b,{className:e,type:"number",value:i,onBlur:()=>f("r",255),onChange:C("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:s,onBlur:()=>f("g",255),onChange:C("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:d,onBlur:()=>f("b",255),onChange:C("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),!l&&jsx(b,{className:e,type:"number",value:c,onBlur:()=>f("a",100),onChange:C("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},io=_o;var zo=({initialValue:o="#ffffff",onCancel:a,onConfirm:l,disableAlpha:t=false})=>{let[u,i]=useState("RGB"),[s,d]=useState(()=>{let{alpha:p,...k}=X$1(o).value;return {...k,a:p}}),c=useCallback(()=>{let{alpha:p,...k}=X$1(o).value;d({...k,a:p}),a();},[o,a]),C=useCallback(()=>{let{a:p,...k}=s;l(Y$1({...k,alpha:t?1:p}));},[s,l,t]),f=useCallback(p=>{d(t?{...p,a:1}:p);},[t]),e=useCallback(p=>{d({...p,a:p.a/100});},[]),r=useCallback(p=>{d({...p,a:p.a});},[]),x=t?RgbColorPicker:RgbaColorPicker;return jsxs(Z,{className:n.panel,children:[jsx(x,{color:s,onChange:f}),jsxs(go,{mt:2,spacing:1,direction:"row",className:n.panelFields,children:[jsx(to,{scheme:u,setScheme:i}),u==="RGB"?jsx(io,{value:{...s,a:Math.round(s.a*100)},onChange:e,disableAlpha:t}):jsx(ao,{value:{...s,a:s.a},onChange:r,disableAlpha:t})]}),jsx(v,{sx:{my:"12px"}}),jsxs(j,{className:n.panelFooter,children:[jsx(Q,{className:n.panelCancel,onClick:c,children:I.cancel}),jsx(J,{className:n.panelConfirm,onClick:C,children:I.confirm})]})]})},po=zo;var co=forwardRef(({value:o="#ffffff",onChange:a,onReset:l,sx:t,options:u,disabled:i=false,id:s,className:d},c)=>{let[C,f]=useState(null),{disableAlpha:e,hideReset:r}={...F,...u},x=useRef(null),p=useCallback(y=>{x.current=y,typeof c=="function"?c(y):c&&(c.current=y);},[c]),k=useCallback(()=>{i||f(x.current);},[i]),mo=useCallback(()=>{i||f(null);},[i]),uo=useCallback(y=>{a(e?y.substring(0,7):y),f(null);},[a,e]);return jsx(ko,{onClickAway:()=>f(null),children:jsxs(V,{ref:p,id:s,"data-testid":s??"ColorPicker",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:Hb(n.root,d),sx:t,children:[jsxs(go,{direction:"row",spacing:1,alignItems:"center",className:n.controls,children:[jsx(H,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:n.swatch}),jsxs(H,{className:n.actions,children:[jsx(ro,{className:n.valueLabel,fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(q,{className:n.editButton,type:"button",onClick:k,disabled:i,children:w})]})]}),r?jsx("div",{}):jsx(X,{className:n.resetButton,type:"button",disabled:i,onClick:l,children:jsx(H,{component:"img",src:Gb,width:10,height:10,alt:""})}),jsx(Po,{anchorEl:C,open:!!C,placement:"top",children:jsx(po,{initialValue:o,onCancel:mo,onConfirm:uo,disableAlpha:e})})]})})});co.displayName="ColorPicker";var qo=memo(co);export{m as a,n as b,F as c,I as d,w as e,qo as f};
1
+ import {v}from'./chunk-LLM6NHYM.js';import {Hb,X as X$1,Y as Y$1}from'./chunk-6HNOCQKM.js';import {Gb,Yc}from'./chunk-VRGBJY4Q.js';import {forwardRef,useState,useRef,useCallback,memo,useEffect,useMemo}from'react';import H from'@mui/material/Box';import ko from'@mui/material/ClickAwayListener';import Po from'@mui/material/Popper';import go from'@mui/material/Stack';import ro from'@mui/material/Typography';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import eo from'@mui/material/MenuItem';import {styled,alpha}from'@mui/material/styles';import K from'@mui/material/Button';import Co from'@mui/material/TextField';import ho from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import v$1 from'color';import no from'@mui/material/InputAdornment';var m="os-shared-ColorPicker",n={root:`${m}-root`,controls:`${m}-controls`,swatch:`${m}-swatch`,actions:`${m}-actions`,valueLabel:`${m}-valueLabel`,editButton:`${m}-editButton`,resetButton:`${m}-resetButton`,panel:`${m}-panel`,panelFields:`${m}-panelFields`,panelFooter:`${m}-panelFooter`,panelCancel:`${m}-panelCancel`,panelConfirm:`${m}-panelConfirm`,schemeTrigger:`${m}-schemeTrigger`,schemeList:`${m}-schemeList`,channelInput:`${m}-channelInput`},F={hideReset:false,disableAlpha:false},I={cancel:"Cancel",confirm:"Okay"},w="Edit";var V=styled(go)(({theme:o})=>({backgroundColor:o.palette.grey[400],borderRadius:"4px",padding:o.spacing(.5),paddingRight:o.spacing(1.5)})),X=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),Z=styled(H)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:o.palette.common.white,padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),j=styled(H)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),q=styled("button")(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,fontFamily:"inherit","&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none",cursor:"not-allowed"},"&:hover:not(:disabled)":{textDecoration:"none"}})),J=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),Q=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Y=styled("button",{shouldForwardProp:o=>o!=="active"})(({theme:o,active:a})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...a&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),oo=styled(ho)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),b=styled(Co)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var yo=({scheme:o,setScheme:a})=>{let[l,t]=useState(null),u=!!l,i=useCallback(c=>{t(l?null:c.currentTarget);},[l]),s=useCallback(()=>{t(null);},[]),d=useCallback(c=>{s(),a(c);},[s,a]);return jsxs(Fragment,{children:[jsxs(Y,{type:"button",active:u,onClick:i,className:n.schemeTrigger,children:[o,jsx(H,{component:"img",sx:{transform:u?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Yc,alt:""})]}),jsx(Po,{anchorEl:l,open:u,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(ko,{onClickAway:c=>{l?.contains(c.target)||s();},children:jsxs(oo,{className:n.schemeList,children:[jsx(eo,{onClick:()=>d("RGB"),children:"RGB"}),jsx(eo,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},to=yo;function B(o,a){return Number.isNaN(o)||o<0?0:o>a?a:o}var Ao=({value:o,onChange:a,disableAlpha:l=false})=>{let t=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[u,i]=useState(t),s=Math.round(o.a*100);useEffect(()=>{let e=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");i(e);},[o.r,o.g,o.b]);let d=e=>{let r=e.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();r.length>6&&(r=r.slice(0,6)),i(r);},c=()=>{let e=u;if(e.length===3&&(e=e.split("").map(r=>r+r).join(""),i(e)),e.length===6)try{let r=v$1(`#${e}`).alpha(o.a);a({r:r.red(),g:r.green(),b:r.blue(),a:r.alpha()});}catch{i(t);}else i(t);},C=e=>{let r=B(parseInt(e.target.value,10),100);a({...o,a:r/100});},f=n.channelInput;return jsxs(go,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(b,{className:f,value:u,onChange:d,onBlur:c,placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(no,{position:"start",sx:{m:0},children:jsx(ro,{component:"span",color:e=>alpha(e.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!l&&jsx(b,{className:f,type:"number",value:s,onChange:C,inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},ao=Ao;var _o=({value:o,onChange:a,disableAlpha:l=false})=>{let[t,u]=useState(o),{r:i,g:s,b:d,a:c}=t;useEffect(()=>{u(o);},[o]);let C=useCallback((r,x)=>p=>{u({...t,[r]:B(+p.target.value,x)});},[t]),f=useCallback((r,x)=>{a({...t,[r]:B(t[r],x)});},[a,t]),e=n.channelInput;return jsxs(go,{direction:"row",spacing:1,...l&&{flex:1},children:[jsx(b,{className:e,type:"number",value:i,onBlur:()=>f("r",255),onChange:C("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:s,onBlur:()=>f("g",255),onChange:C("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:d,onBlur:()=>f("b",255),onChange:C("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),!l&&jsx(b,{className:e,type:"number",value:c,onBlur:()=>f("a",100),onChange:C("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},io=_o;var zo=({initialValue:o="#ffffff",onCancel:a,onConfirm:l,disableAlpha:t=false})=>{let[u,i]=useState("RGB"),[s,d]=useState(()=>{let{alpha:p,...k}=X$1(o).value;return {...k,a:p}}),c=useCallback(()=>{let{alpha:p,...k}=X$1(o).value;d({...k,a:p}),a();},[o,a]),C=useCallback(()=>{let{a:p,...k}=s;l(Y$1({...k,alpha:t?1:p}));},[s,l,t]),f=useCallback(p=>{d(t?{...p,a:1}:p);},[t]),e=useCallback(p=>{d({...p,a:p.a/100});},[]),r=useCallback(p=>{d({...p,a:p.a});},[]),x=t?RgbColorPicker:RgbaColorPicker;return jsxs(Z,{className:n.panel,children:[jsx(x,{color:s,onChange:f}),jsxs(go,{mt:2,spacing:1,direction:"row",className:n.panelFields,children:[jsx(to,{scheme:u,setScheme:i}),u==="RGB"?jsx(io,{value:{...s,a:Math.round(s.a*100)},onChange:e,disableAlpha:t}):jsx(ao,{value:{...s,a:s.a},onChange:r,disableAlpha:t})]}),jsx(v,{sx:{my:"12px"}}),jsxs(j,{className:n.panelFooter,children:[jsx(Q,{className:n.panelCancel,onClick:c,children:I.cancel}),jsx(J,{className:n.panelConfirm,onClick:C,children:I.confirm})]})]})},po=zo;var co=forwardRef(({value:o="#ffffff",onChange:a,onReset:l,sx:t,options:u,disabled:i=false,id:s,className:d},c)=>{let[C,f]=useState(null),{disableAlpha:e,hideReset:r}={...F,...u},x=useRef(null),p=useCallback(y=>{x.current=y,typeof c=="function"?c(y):c&&(c.current=y);},[c]),k=useCallback(()=>{i||f(x.current);},[i]),mo=useCallback(()=>{i||f(null);},[i]),uo=useCallback(y=>{a(e?y.substring(0,7):y),f(null);},[a,e]);return jsx(ko,{onClickAway:()=>f(null),children:jsxs(V,{ref:p,id:s,"data-testid":s??"ColorPicker",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:Hb(n.root,d),sx:t,children:[jsxs(go,{direction:"row",spacing:1,alignItems:"center",className:n.controls,children:[jsx(H,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:n.swatch}),jsxs(H,{className:n.actions,children:[jsx(ro,{className:n.valueLabel,fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(q,{className:n.editButton,type:"button",onClick:k,disabled:i,children:w})]})]}),r?jsx("div",{}):jsx(X,{className:n.resetButton,type:"button",disabled:i,onClick:l,children:jsx(H,{component:"img",src:Gb,width:10,height:10,alt:""})}),jsx(Po,{anchorEl:C,open:!!C,placement:"top",children:jsx(po,{initialValue:o,onCancel:mo,onConfirm:uo,disableAlpha:e})})]})})});co.displayName="ColorPicker";var qo=memo(co);export{m as a,n as b,F as c,I as d,w as e,qo as f};
@@ -1,4 +1,4 @@
1
- import {b,a}from'./chunk-F5H3U3NJ.js';import {y,x,B as B$1,$}from'./chunk-UKV3UR3X.js';import {aa,ba}from'./chunk-3LLAL7SZ.js';import {Xb,Hb,Gb}from'./chunk-2V7P76GA.js';import {Sc,A}from'./chunk-FI5H6V55.js';import {memo,useCallback,useMemo}from'react';import No,{autocompleteClasses}from'@mui/material/Autocomplete';import W from'@mui/material/Box';import ko from'@mui/material/Popper';import wo from'@mui/material/TextField';import {keyframes,styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var m="os-shared-Autocomplete",u={root:`${m}-root`,input:`${m}-input`,popper:`${m}-popper`,option:`${m}-option`,clear:`${m}-clear`,popupIndicator:`${m}-popupIndicator`,feedback:`${m}-feedback`},k={bottom:"bottom",top:"top"},ye=k.bottom,V=false,Pe="No results found",Se="Loading\u2026",B="",Ce=8,z=4,w=24,Me=4,Ae=4,So=8,Co={disableRipple:true},Mo={elevation:0},Ao={name:"offset",options:{offset:[0,So]}};function Io(e){return {name:"flip",enabled:e!==k.top,options:{fallbackPlacements:["top-start"]}}}function Oo(e){return e===k.top?"top-start":"bottom-start"}function Ie(e){let{menuDirection:o,slotProps:n,popperClassName:r}=e;return {...n,clearIndicator:{...Co,...n?.clearIndicator},paper:{...Mo,...n?.paper},popper:{...n?.popper,placement:n?.popper?.placement??Oo(o),modifiers:[Ao,Io(o),...n?.popper?.modifiers??[]],className:r}}}var ke=e=>({[`& .${autocompleteClasses.clearIndicator}`]:{visibility:"visible",padding:0,width:12,height:12,margin:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}),To=keyframes`
1
+ import {b,a}from'./chunk-YZFTHJHW.js';import {y,x,B as B$1,$}from'./chunk-XGCSZNS4.js';import {aa,ba}from'./chunk-LLM6NHYM.js';import {Xb,Hb,Gb}from'./chunk-6HNOCQKM.js';import {Sc,A}from'./chunk-VRGBJY4Q.js';import {memo,useCallback,useMemo}from'react';import No,{autocompleteClasses}from'@mui/material/Autocomplete';import W from'@mui/material/Box';import ko from'@mui/material/Popper';import wo from'@mui/material/TextField';import {keyframes,styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var m="os-shared-Autocomplete",u={root:`${m}-root`,input:`${m}-input`,popper:`${m}-popper`,option:`${m}-option`,clear:`${m}-clear`,popupIndicator:`${m}-popupIndicator`,feedback:`${m}-feedback`},k={bottom:"bottom",top:"top"},ye=k.bottom,V=false,Pe="No results found",Se="Loading\u2026",B="",Ce=8,z=4,w=24,Me=4,Ae=4,So=8,Co={disableRipple:true},Mo={elevation:0},Ao={name:"offset",options:{offset:[0,So]}};function Io(e){return {name:"flip",enabled:e!==k.top,options:{fallbackPlacements:["top-start"]}}}function Oo(e){return e===k.top?"top-start":"bottom-start"}function Ie(e){let{menuDirection:o,slotProps:n,popperClassName:r}=e;return {...n,clearIndicator:{...Co,...n?.clearIndicator},paper:{...Mo,...n?.paper},popper:{...n?.popper,placement:n?.popper?.placement??Oo(o),modifiers:[Ao,Io(o),...n?.popper?.modifiers??[]],className:r}}}var ke=e=>({[`& .${autocompleteClasses.clearIndicator}`]:{visibility:"visible",padding:0,width:12,height:12,margin:0,backgroundColor:"transparent",color:e.v2.palette.base.black,"&:hover":{backgroundColor:"transparent",color:e.v2.palette.base.black},"& svg":{width:8,height:8,fontSize:8,display:"block"}}}),To=keyframes`
2
2
  0% {
3
3
  transform: rotate(-90deg);
4
4
  }
@@ -1 +1 @@
1
- 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-NBVOXBIW.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-HI2JOLXL.js';import {d,c as c$1}from'./chunk-PVUGMA6R.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Gb,Hb}from'./chunk-2V7P76GA.js';import'./chunk-FI5H6V55.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:Hb(d,o.className),"data-testid":i,...l,sx:Gb({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:Hb(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:Hb(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:Gb({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:Hb(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:Gb({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?Gb(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 {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-GZT6TVCH.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-YUT3GEP2.js';import {d,c as c$1}from'./chunk-MXFH4OXG.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Gb,Hb}from'./chunk-6HNOCQKM.js';import'./chunk-VRGBJY4Q.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:Hb(d,o.className),"data-testid":i,...l,sx:Gb({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:Hb(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:Hb(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:Gb({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:Hb(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:Gb({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?Gb(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 +1 @@
1
- import {Hb}from'./chunk-2V7P76GA.js';import {forwardRef,memo,useMemo,useState,useRef,useCallback,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useReducedMotion,useMotionValue,animate}from'framer-motion';import $e from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var B="os-shared-ExpandableChip",x={root:`${B}-root`,mainGroup:`${B}-mainGroup`,main:`${B}-main`,adornment:`${B}-adornment`,item:`${B}-item`,peek:`${B}-peek`},p=24,ee=3,te=6,v=5,se=.2,de=.18,pe=1e3,le="default",j={default:{duration:.25,stagger:.04,ease:"easeOut",closeDelay:120,chipPaddingX:8},stacked:{duration:.18,stagger:0,ease:"easeOut",closeDelay:120,chipPaddingX:6}},ce={duration:0,stagger:0};function Ee(e,t,n){let a=j[e],o=t||{},r={duration:o.duration??a.duration,stagger:o.stagger??a.stagger,ease:o.ease??a.ease,closeDelay:o.closeDelay??a.closeDelay};return t===false||n?{...r,...ce}:r}function ue(e,t){return e===t?true:e.length!==t.length?false:e.every((n,a)=>n===t[a])}function xe(e,t){return e.mainWidth===t.mainWidth&&e.startAdornmentWidth===t.startAdornmentWidth&&e.endAdornmentWidth===t.endAdornmentWidth&&ue(e.startWidths,t.startWidths)&&ue(e.endWidths,t.endWidths)}function Ce(e,t){return Math.max(p,Math.ceil(e+t*2+2))}function he(e){let t=[],n=0;for(let a of e)n+=a+ee,t.push(n);return t}function me(e,t){return e==="stacked"?te*t:0}function We({expandFrom:e,variant:t,measurements:n,startSpan:a,endSpan:o}){let{startWidths:r,endWidths:c,startAdornmentWidth:S,endAdornmentWidth:I}=n;return e==="start"?S+a-me(t,r.length):e==="end"?me(t,c.length)-I-o:0}function be({expandFrom:e,variant:t,measurements:n}){let{mainWidth:a,startWidths:o,endWidths:r,startAdornmentWidth:c,endAdornmentWidth:S}=n,I=p,M=te,b=ee,X=t==="stacked",u=he(o),f=he(r),W=u[u.length-1]??0,D=f[f.length-1]??0,i=We({expandFrom:e,variant:t,measurements:n,startSpan:W,endSpan:D}),s=i-c,y=i+a+S,h=o.map((m,l)=>({closedX:X?-M*(l+1):0,openX:s-u[l],width:m,zIndex:o.length-l})),A=r.map((m,l)=>({closedX:X?a+M*(l+1)-I:a-m,openX:y+b+(f[l]-m-b),width:m,zIndex:r.length-l})),H=Math.min(s-W,0),P=Math.max(y+D,a);return {start:h,end:A,mainShiftX:i,openSpan:{left:H-b,width:P-H+b*2}}}var Oe={mainWidth:p,startWidths:[],endWidths:[],startAdornmentWidth:0,endAdornmentWidth:0};function ge({main:e,startItems:t=[],endItems:n=[],startAdornment:a,endAdornment:o,expandFrom:r,variant:c=le,transition:S,open:I,defaultOpen:M=false,onOpenChange:b}){let X=useReducedMotion()??false,u=useMemo(()=>Ee(c,S,X),[c,S,X]),f=j[c],[W,D]=useState(M),i=I!==void 0,s=i?I:W,y=useRef(null),h=useCallback(()=>{y.current&&clearTimeout(y.current),y.current=null;},[]),A=useCallback(d=>{i||D(d),b?.(d);},[i,b]),H=useCallback(()=>{h(),s||A(true);},[h,s,A]),P=useCallback(()=>{h(),y.current=setTimeout(()=>A(false),u.closeDelay);},[h,u.closeDelay,A]);useEffect(()=>h,[h]);let m=useRef(null),l=useRef([]),F=useRef([]),z=useRef(null),U=useRef(null),[N,J]=useState(Oe),g=useCallback(()=>{let d=(L,k)=>Array.from({length:k},(G,_)=>Ce(L[_]?.offsetWidth??0,f.chipPaddingX)),T={mainWidth:m.current?.offsetWidth??p,startWidths:d(l.current,t.length),endWidths:d(F.current,n.length),startAdornmentWidth:a?z.current?.scrollWidth??0:0,endAdornmentWidth:o?U.current?.scrollWidth??0:0};J(L=>xe(L,T)?L:T);},[f.chipPaddingX,t.length,n.length,a,o]);useLayoutEffect(()=>{g();},[g,e,t,n,a,o]),useEffect(()=>{if(typeof ResizeObserver>"u")return;let d=null,T=new ResizeObserver(()=>{d&&cancelAnimationFrame(d),d=requestAnimationFrame(g);});return [m.current,z.current,U.current,...l.current,...F.current].forEach(k=>k&&T.observe(k)),()=>{d&&cancelAnimationFrame(d),T.disconnect();}},[g,t.length,n.length]);let Q=useMemo(()=>be({expandFrom:r,variant:c,measurements:N}),[r,c,N]),O=useMotionValue(0),$=useMotionValue(0),R=u.duration===0?0:se;return useEffect(()=>{let d=animate(O,s?N.startAdornmentWidth:0,{duration:R,ease:"easeOut"});return ()=>d.stop()},[s,N.startAdornmentWidth,O,R]),useEffect(()=>{let d=animate($,s?N.endAdornmentWidth:0,{duration:R,ease:"easeOut"});return ()=>d.stop()},[s,N.endAdornmentWidth,$,R]),{isOpen:s,motion:u,variant:c,chipPaddingX:f.chipPaddingX,handleOpen:H,handleClose:P,layout:Q,mainRef:m,startContentRefs:l,endContentRefs:F,startAdornmentRef:z,endAdornmentRef:U,startAdornmentWidth:O,endAdornmentWidth:$}}var V=e=>typeof e=="string"&&!e.startsWith("$")&&e!=="sx"&&e!=="theme"&&e!=="ownerState"&&e!=="as";function Y(e){let{base:t,border:n,foreground:a}=e.v2.palette;return {boxSizing:"border-box",height:e.v2.spacing(p),minWidth:e.v2.spacing(p),display:"inline-flex",alignItems:"center",justifyContent:"center",border:`${e.v2.spacing(1)} solid ${n.default}`,borderRadius:e.v2.radius(p/2),backgroundColor:t.white,color:a.primary,...e.v2.typography.textVariants.body.medium.regular,lineHeight:1,whiteSpace:"nowrap"}}var _e=styled($e,{shouldForwardProp:V})(({$isOpen:e})=>({position:"relative",display:"flex",alignItems:"center",overflow:"visible",zIndex:e?pe:void 0})),Se=styled("div")({position:"relative",display:"inline-flex",alignItems:"center",height:p}),Ie=styled(motion.div)({position:"absolute",top:0,bottom:0,background:"transparent"}),Ne=styled(motion.div)({position:"relative",display:"inline-flex",alignItems:"center"}),Xe=styled("div",{shouldForwardProp:V})(({theme:e,$paddingX:t,$fuseStart:n,$fuseEnd:a,$zIndex:o})=>{let r=e.v2.radius(p/2);return {...Y(e),position:"relative",zIndex:o,flex:"0 0 auto",paddingInline:e.v2.spacing(t),overflow:"hidden",borderTopLeftRadius:n?0:r,borderBottomLeftRadius:n?0:r,borderTopRightRadius:a?0:r,borderBottomRightRadius:a?0:r,...n&&{borderLeftColor:"transparent"},...a&&{borderRightColor:"transparent"}}}),ne=styled(motion.span,{shouldForwardProp:V})(({theme:e,$side:t})=>{let n=e.v2.radius(p/2),a=t==="start";return {...Y(e),position:"absolute",top:0,zIndex:1,minWidth:0,justifyContent:"flex-start",overflow:"hidden",willChange:"width",...a?{right:"100%",borderRight:"none",borderRadius:`${n} 0 0 ${n}`}:{left:"100%",borderLeft:"none",borderRadius:`0 ${n} ${n} 0`}}}),ae=styled("span")({display:"inline-flex",alignItems:"center",height:"100%",whiteSpace:"nowrap"}),ie=styled(motion.div,{shouldForwardProp:V})(({theme:e,$side:t})=>({...Y(e),position:"absolute",top:0,zIndex:0,pointerEvents:"none",...t==="start"?{left:0}:{right:0}})),Re=styled(motion.div,{shouldForwardProp:V})(({theme:e,$paddingX:t})=>({...Y(e),position:"absolute",top:0,left:0,justifyContent:"flex-start",paddingInline:e.v2.spacing(t),overflow:"hidden"})),Te=styled("span",{shouldForwardProp:V})(({$isHidden:e})=>({display:"inline-flex",alignItems:"center",flex:"none",whiteSpace:"nowrap",visibility:e?"hidden":"visible"}));var Ve=forwardRef(function({main:t,startItems:n=[],endItems:a=[],startAdornment:o,endAdornment:r,variant:c,expandFrom:S="center",transition:I,open:M,defaultOpen:b,onOpenChange:X,id:u,className:f,sx:W},D){let{isOpen:i,motion:s,variant:y,chipPaddingX:h,handleOpen:A,handleClose:H,layout:P,mainRef:m,startContentRefs:l,endContentRefs:F,startAdornmentRef:z,endAdornmentRef:U,startAdornmentWidth:N,endAdornmentWidth:J}=ge({main:t,startItems:n,endItems:a,startAdornment:o,endAdornment:r,variant:c,expandFrom:S,transition:I,open:M,defaultOpen:b,onOpenChange:X}),g=y==="stacked",Q=Math.max(n.length,a.length)+2,O={duration:s.duration===0?0:de,ease:"easeOut"},$=(R,d,T,L)=>d.map((k,G)=>{let _=T[G];if(!_)return null;let Le=g?{x:_.closedX,width:p,opacity:1}:{x:_.closedX,opacity:0},ve=g?{x:_.openX,width:_.width,opacity:1}:{x:_.openX,opacity:1};return jsx(Re,{className:x.item,"data-side":R,$paddingX:h,initial:false,animate:i?ve:Le,transition:{duration:s.duration===0?0:s.duration+G*s.stagger,ease:s.ease},style:{zIndex:_.zIndex,pointerEvents:i?"auto":"none"},children:jsx(Te,{ref:Me=>{L.current[G]=Me;},$isHidden:g&&!i,children:k})},`${R}-${G}`)});return jsx(_e,{ref:D,id:u,"data-testid":u??"ExpandableChip","data-open":i,className:Hb(x.root,f),sx:W,$isOpen:i,onMouseLeave:H,children:jsxs(Se,{children:[i&&jsx(Ie,{onMouseEnter:A,style:{left:P.openSpan.left,width:P.openSpan.width}}),jsxs(Ne,{className:x.mainGroup,initial:false,animate:{x:i?P.mainShiftX:0},transition:{duration:s.duration,ease:s.ease},style:{zIndex:Q},children:[!g&&jsxs(AnimatePresence,{initial:false,children:[n.length>0&&jsx(ie,{className:x.peek,$side:"start",initial:{opacity:0,scale:.95,x:-v+1},animate:i?{opacity:0,scale:.9,x:-v-1}:{opacity:1,scale:1,x:-v},exit:{opacity:0,scale:.95},transition:O},"peek-start"),a.length>0&&jsx(ie,{className:x.peek,$side:"end",initial:{opacity:0,scale:.95,x:v-1},animate:i?{opacity:0,scale:.9,x:v+1}:{opacity:1,scale:1,x:v},exit:{opacity:0,scale:.95},transition:O},"peek-end")]}),o&&jsx(ne,{className:x.adornment,"data-side":"start",$side:"start",initial:false,animate:{opacity:i?1:0},transition:{duration:0},style:{width:N,pointerEvents:i?"auto":"none"},children:jsx(ae,{ref:z,children:o})}),jsx(Xe,{ref:m,className:x.main,$paddingX:h,$fuseStart:i&&!!o,$fuseEnd:i&&!!r,$zIndex:2,onMouseEnter:A,children:t}),r&&jsx(ne,{className:x.adornment,"data-side":"end",$side:"end",initial:false,animate:{opacity:i?1:0},transition:{duration:0},style:{width:J,pointerEvents:i?"auto":"none"},children:jsx(ae,{ref:U,children:r})})]}),$("start",n,P.start,l),$("end",a,P.end,F)]})})}),Fe=memo(Ve);export{x as a,Fe as b};
1
+ import {Hb}from'./chunk-6HNOCQKM.js';import {forwardRef,memo,useMemo,useState,useRef,useCallback,useEffect,useLayoutEffect}from'react';import {motion,AnimatePresence,useReducedMotion,useMotionValue,animate}from'framer-motion';import $e from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var B="os-shared-ExpandableChip",x={root:`${B}-root`,mainGroup:`${B}-mainGroup`,main:`${B}-main`,adornment:`${B}-adornment`,item:`${B}-item`,peek:`${B}-peek`},p=24,ee=3,te=6,v=5,se=.2,de=.18,pe=1e3,le="default",j={default:{duration:.25,stagger:.04,ease:"easeOut",closeDelay:120,chipPaddingX:8},stacked:{duration:.18,stagger:0,ease:"easeOut",closeDelay:120,chipPaddingX:6}},ce={duration:0,stagger:0};function Ee(e,t,n){let a=j[e],o=t||{},r={duration:o.duration??a.duration,stagger:o.stagger??a.stagger,ease:o.ease??a.ease,closeDelay:o.closeDelay??a.closeDelay};return t===false||n?{...r,...ce}:r}function ue(e,t){return e===t?true:e.length!==t.length?false:e.every((n,a)=>n===t[a])}function xe(e,t){return e.mainWidth===t.mainWidth&&e.startAdornmentWidth===t.startAdornmentWidth&&e.endAdornmentWidth===t.endAdornmentWidth&&ue(e.startWidths,t.startWidths)&&ue(e.endWidths,t.endWidths)}function Ce(e,t){return Math.max(p,Math.ceil(e+t*2+2))}function he(e){let t=[],n=0;for(let a of e)n+=a+ee,t.push(n);return t}function me(e,t){return e==="stacked"?te*t:0}function We({expandFrom:e,variant:t,measurements:n,startSpan:a,endSpan:o}){let{startWidths:r,endWidths:c,startAdornmentWidth:S,endAdornmentWidth:I}=n;return e==="start"?S+a-me(t,r.length):e==="end"?me(t,c.length)-I-o:0}function be({expandFrom:e,variant:t,measurements:n}){let{mainWidth:a,startWidths:o,endWidths:r,startAdornmentWidth:c,endAdornmentWidth:S}=n,I=p,M=te,b=ee,X=t==="stacked",u=he(o),f=he(r),W=u[u.length-1]??0,D=f[f.length-1]??0,i=We({expandFrom:e,variant:t,measurements:n,startSpan:W,endSpan:D}),s=i-c,y=i+a+S,h=o.map((m,l)=>({closedX:X?-M*(l+1):0,openX:s-u[l],width:m,zIndex:o.length-l})),A=r.map((m,l)=>({closedX:X?a+M*(l+1)-I:a-m,openX:y+b+(f[l]-m-b),width:m,zIndex:r.length-l})),H=Math.min(s-W,0),P=Math.max(y+D,a);return {start:h,end:A,mainShiftX:i,openSpan:{left:H-b,width:P-H+b*2}}}var Oe={mainWidth:p,startWidths:[],endWidths:[],startAdornmentWidth:0,endAdornmentWidth:0};function ge({main:e,startItems:t=[],endItems:n=[],startAdornment:a,endAdornment:o,expandFrom:r,variant:c=le,transition:S,open:I,defaultOpen:M=false,onOpenChange:b}){let X=useReducedMotion()??false,u=useMemo(()=>Ee(c,S,X),[c,S,X]),f=j[c],[W,D]=useState(M),i=I!==void 0,s=i?I:W,y=useRef(null),h=useCallback(()=>{y.current&&clearTimeout(y.current),y.current=null;},[]),A=useCallback(d=>{i||D(d),b?.(d);},[i,b]),H=useCallback(()=>{h(),s||A(true);},[h,s,A]),P=useCallback(()=>{h(),y.current=setTimeout(()=>A(false),u.closeDelay);},[h,u.closeDelay,A]);useEffect(()=>h,[h]);let m=useRef(null),l=useRef([]),F=useRef([]),z=useRef(null),U=useRef(null),[N,J]=useState(Oe),g=useCallback(()=>{let d=(L,k)=>Array.from({length:k},(G,_)=>Ce(L[_]?.offsetWidth??0,f.chipPaddingX)),T={mainWidth:m.current?.offsetWidth??p,startWidths:d(l.current,t.length),endWidths:d(F.current,n.length),startAdornmentWidth:a?z.current?.scrollWidth??0:0,endAdornmentWidth:o?U.current?.scrollWidth??0:0};J(L=>xe(L,T)?L:T);},[f.chipPaddingX,t.length,n.length,a,o]);useLayoutEffect(()=>{g();},[g,e,t,n,a,o]),useEffect(()=>{if(typeof ResizeObserver>"u")return;let d=null,T=new ResizeObserver(()=>{d&&cancelAnimationFrame(d),d=requestAnimationFrame(g);});return [m.current,z.current,U.current,...l.current,...F.current].forEach(k=>k&&T.observe(k)),()=>{d&&cancelAnimationFrame(d),T.disconnect();}},[g,t.length,n.length]);let Q=useMemo(()=>be({expandFrom:r,variant:c,measurements:N}),[r,c,N]),O=useMotionValue(0),$=useMotionValue(0),R=u.duration===0?0:se;return useEffect(()=>{let d=animate(O,s?N.startAdornmentWidth:0,{duration:R,ease:"easeOut"});return ()=>d.stop()},[s,N.startAdornmentWidth,O,R]),useEffect(()=>{let d=animate($,s?N.endAdornmentWidth:0,{duration:R,ease:"easeOut"});return ()=>d.stop()},[s,N.endAdornmentWidth,$,R]),{isOpen:s,motion:u,variant:c,chipPaddingX:f.chipPaddingX,handleOpen:H,handleClose:P,layout:Q,mainRef:m,startContentRefs:l,endContentRefs:F,startAdornmentRef:z,endAdornmentRef:U,startAdornmentWidth:O,endAdornmentWidth:$}}var V=e=>typeof e=="string"&&!e.startsWith("$")&&e!=="sx"&&e!=="theme"&&e!=="ownerState"&&e!=="as";function Y(e){let{base:t,border:n,foreground:a}=e.v2.palette;return {boxSizing:"border-box",height:e.v2.spacing(p),minWidth:e.v2.spacing(p),display:"inline-flex",alignItems:"center",justifyContent:"center",border:`${e.v2.spacing(1)} solid ${n.default}`,borderRadius:e.v2.radius(p/2),backgroundColor:t.white,color:a.primary,...e.v2.typography.textVariants.body.medium.regular,lineHeight:1,whiteSpace:"nowrap"}}var _e=styled($e,{shouldForwardProp:V})(({$isOpen:e})=>({position:"relative",display:"flex",alignItems:"center",overflow:"visible",zIndex:e?pe:void 0})),Se=styled("div")({position:"relative",display:"inline-flex",alignItems:"center",height:p}),Ie=styled(motion.div)({position:"absolute",top:0,bottom:0,background:"transparent"}),Ne=styled(motion.div)({position:"relative",display:"inline-flex",alignItems:"center"}),Xe=styled("div",{shouldForwardProp:V})(({theme:e,$paddingX:t,$fuseStart:n,$fuseEnd:a,$zIndex:o})=>{let r=e.v2.radius(p/2);return {...Y(e),position:"relative",zIndex:o,flex:"0 0 auto",paddingInline:e.v2.spacing(t),overflow:"hidden",borderTopLeftRadius:n?0:r,borderBottomLeftRadius:n?0:r,borderTopRightRadius:a?0:r,borderBottomRightRadius:a?0:r,...n&&{borderLeftColor:"transparent"},...a&&{borderRightColor:"transparent"}}}),ne=styled(motion.span,{shouldForwardProp:V})(({theme:e,$side:t})=>{let n=e.v2.radius(p/2),a=t==="start";return {...Y(e),position:"absolute",top:0,zIndex:1,minWidth:0,justifyContent:"flex-start",overflow:"hidden",willChange:"width",...a?{right:"100%",borderRight:"none",borderRadius:`${n} 0 0 ${n}`}:{left:"100%",borderLeft:"none",borderRadius:`0 ${n} ${n} 0`}}}),ae=styled("span")({display:"inline-flex",alignItems:"center",height:"100%",whiteSpace:"nowrap"}),ie=styled(motion.div,{shouldForwardProp:V})(({theme:e,$side:t})=>({...Y(e),position:"absolute",top:0,zIndex:0,pointerEvents:"none",...t==="start"?{left:0}:{right:0}})),Re=styled(motion.div,{shouldForwardProp:V})(({theme:e,$paddingX:t})=>({...Y(e),position:"absolute",top:0,left:0,justifyContent:"flex-start",paddingInline:e.v2.spacing(t),overflow:"hidden"})),Te=styled("span",{shouldForwardProp:V})(({$isHidden:e})=>({display:"inline-flex",alignItems:"center",flex:"none",whiteSpace:"nowrap",visibility:e?"hidden":"visible"}));var Ve=forwardRef(function({main:t,startItems:n=[],endItems:a=[],startAdornment:o,endAdornment:r,variant:c,expandFrom:S="center",transition:I,open:M,defaultOpen:b,onOpenChange:X,id:u,className:f,sx:W},D){let{isOpen:i,motion:s,variant:y,chipPaddingX:h,handleOpen:A,handleClose:H,layout:P,mainRef:m,startContentRefs:l,endContentRefs:F,startAdornmentRef:z,endAdornmentRef:U,startAdornmentWidth:N,endAdornmentWidth:J}=ge({main:t,startItems:n,endItems:a,startAdornment:o,endAdornment:r,variant:c,expandFrom:S,transition:I,open:M,defaultOpen:b,onOpenChange:X}),g=y==="stacked",Q=Math.max(n.length,a.length)+2,O={duration:s.duration===0?0:de,ease:"easeOut"},$=(R,d,T,L)=>d.map((k,G)=>{let _=T[G];if(!_)return null;let Le=g?{x:_.closedX,width:p,opacity:1}:{x:_.closedX,opacity:0},ve=g?{x:_.openX,width:_.width,opacity:1}:{x:_.openX,opacity:1};return jsx(Re,{className:x.item,"data-side":R,$paddingX:h,initial:false,animate:i?ve:Le,transition:{duration:s.duration===0?0:s.duration+G*s.stagger,ease:s.ease},style:{zIndex:_.zIndex,pointerEvents:i?"auto":"none"},children:jsx(Te,{ref:Me=>{L.current[G]=Me;},$isHidden:g&&!i,children:k})},`${R}-${G}`)});return jsx(_e,{ref:D,id:u,"data-testid":u??"ExpandableChip","data-open":i,className:Hb(x.root,f),sx:W,$isOpen:i,onMouseLeave:H,children:jsxs(Se,{children:[i&&jsx(Ie,{onMouseEnter:A,style:{left:P.openSpan.left,width:P.openSpan.width}}),jsxs(Ne,{className:x.mainGroup,initial:false,animate:{x:i?P.mainShiftX:0},transition:{duration:s.duration,ease:s.ease},style:{zIndex:Q},children:[!g&&jsxs(AnimatePresence,{initial:false,children:[n.length>0&&jsx(ie,{className:x.peek,$side:"start",initial:{opacity:0,scale:.95,x:-v+1},animate:i?{opacity:0,scale:.9,x:-v-1}:{opacity:1,scale:1,x:-v},exit:{opacity:0,scale:.95},transition:O},"peek-start"),a.length>0&&jsx(ie,{className:x.peek,$side:"end",initial:{opacity:0,scale:.95,x:v-1},animate:i?{opacity:0,scale:.9,x:v+1}:{opacity:1,scale:1,x:v},exit:{opacity:0,scale:.95},transition:O},"peek-end")]}),o&&jsx(ne,{className:x.adornment,"data-side":"start",$side:"start",initial:false,animate:{opacity:i?1:0},transition:{duration:0},style:{width:N,pointerEvents:i?"auto":"none"},children:jsx(ae,{ref:z,children:o})}),jsx(Xe,{ref:m,className:x.main,$paddingX:h,$fuseStart:i&&!!o,$fuseEnd:i&&!!r,$zIndex:2,onMouseEnter:A,children:t}),r&&jsx(ne,{className:x.adornment,"data-side":"end",$side:"end",initial:false,animate:{opacity:i?1:0},transition:{duration:0},style:{width:J,pointerEvents:i?"auto":"none"},children:jsx(ae,{ref:U,children:r})})]}),$("start",n,P.start,l),$("end",a,P.end,F)]})})}),Fe=memo(Ve);export{x as a,Fe as b};
@@ -1 +1 @@
1
- import {j as j$1,L,R as R$1}from'./chunk-3LLAL7SZ.js';import {Vb,ea}from'./chunk-2V7P76GA.js';import {el,fl}from'./chunk-FI5H6V55.js';import {useId,useState,useEffect}from'react';import te from'@mui/material/ClickAwayListener';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var S=styled(g)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),z=styled(j$1,{shouldForwardProp:r=>r!=="open"&&r!=="size"})(({theme:r,open:o,size:i})=>{let{base:u,grey:p,brand:b}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:u.white,border:`1px solid ${p[100]}`,borderRadius:"19px",height:i==="large"?32:24,width:i==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:b[500]}}}),x=styled(g)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),F=styled(j$1,{shouldForwardProp:r=>r!=="selected"})(({theme:r,selected:o})=>{let{base:i,grey:u,brand:p}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:i.white,border:`1px solid ${u[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:p[500],backgroundColor:alpha(p[500],.1)}}}),$=styled(g)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),j=styled(g)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),k=styled(g)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),I=styled(L)(()=>({flexGrow:1,maxWidth:"100%",".MuiInput-input":{fontWeight:"500",fontSize:"11px",textAlign:"center"},".MuiInput-root":{paddingInline:"8px"},height:32,width:32}));var _=r=>r===0?12:r<=12?r:r-12,ae=r=>r>=12?"PM":"AM",R=()=>new Date().getMinutes(),N=()=>{let r=new Date().getHours();return _(r)},ce=(r,o)=>o==="AM"&&r===12?0:o==="PM"&&r!==12?r+12:r;var G=["AM","PM"],f=12,h=59;function O({onChange:r,defaultTime:o,enableRealTimeChange:i,size:u="large"}){let p=Vb(useId(),"time-picker"),[b,H]=useState(null),[a,U]=useState(o?.period??(new Date().getHours()>=12?"PM":"AM")),[c,y]=useState(o?.hour??N()),[l,C]=useState(o?.minute??R()),v=!!b;useEffect(()=>{i&&r?.({hour:c,minute:l,period:a});},[c,l,a,i]);let q=e=>{H(e.currentTarget);},J=()=>{H(null),r?.({hour:c,minute:l,period:a});},K=e=>{U(e);},s=e=>e<10?`0${e}`:e.toString(),Q=e=>{let m=ea(s(Number(e.target.value)));if(m>12){e.preventDefault();return}y(m);},D=()=>{y(e=>e===12?1:e+1);},E=()=>{y(e=>e===1?12:e-1);},V=e=>{let m=ea(s(Number(e.target.value)));if(m>59){e.preventDefault();return}C(m);},X=()=>{C(e=>e===59?(D(),0):e+1);},Y=()=>{C(e=>e===0?(E(),59):e-1);};return jsx(te,{onClickAway:J,children:jsxs(g,{id:p,"data-testid":"TimePicker",children:[jsx(z,{size:u,open:v,onClick:q,children:`${s(c)}:${s(l)}${a.toLowerCase()}`}),jsx(R$1,{open:v,anchorEl:b,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(S,{children:[jsxs(j,{children:[jsxs(k,{children:[jsx(x,{onClick:D,children:jsx("img",{src:el,alt:"arrow"})}),jsx(I,{type:"number",hideArrows:true,disableFocusRing:true,value:s(c),onChange:Q}),jsx(x,{onClick:E,children:jsx("img",{src:fl,alt:"arrow"})})]}),jsx(j$1,{children:":"}),jsxs(k,{children:[jsx(x,{onClick:X,children:jsx("img",{src:el,alt:"arrow"})}),jsx(I,{type:"number",hideArrows:true,disableFocusRing:true,value:s(l),onChange:V}),jsx(x,{onClick:Y,children:jsx("img",{src:fl,alt:"arrow"})})]})]}),jsx($,{children:G.map(e=>jsx(F,{onClick:()=>{K(e);},selected:a===e,children:e},e))})]})})]})})}var ve=O;export{_ as a,ae as b,R as c,N as d,ce as e,G as f,f as g,h,O as i,ve as j};
1
+ import {j as j$1,L,R as R$1}from'./chunk-LLM6NHYM.js';import {Vb,ea}from'./chunk-6HNOCQKM.js';import {el,fl}from'./chunk-VRGBJY4Q.js';import {useId,useState,useEffect}from'react';import te from'@mui/material/ClickAwayListener';import g from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var S=styled(g)(()=>({width:157,padding:"16px",display:"flex",alignItems:"center",justifyContent:"center",gap:"16px"})),z=styled(j$1,{shouldForwardProp:r=>r!=="open"&&r!=="size"})(({theme:r,open:o,size:i})=>{let{base:u,grey:p,brand:b}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:u.white,border:`1px solid ${p[100]}`,borderRadius:"19px",height:i==="large"?32:24,width:i==="large"?74:58,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{boxShadow:"0px 0px 4px 0px #1F88D080",borderColor:b[500]}}}),x=styled(g)(()=>({textAlign:"center",cursor:"pointer",userSelect:"none"})),F=styled(j$1,{shouldForwardProp:r=>r!=="selected"})(({theme:r,selected:o})=>{let{base:i,grey:u,brand:p}=r.v2.palette;return {fontSize:"11px",fontWeight:500,background:i.white,border:`1px solid ${u[100]}`,borderRadius:"4px",height:24,width:33,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",...o&&{borderColor:"transparent",color:p[500],backgroundColor:alpha(p[500],.1)}}}),$=styled(g)(()=>({display:"flex",flexDirection:"column",gap:"4px"})),j=styled(g)(()=>({display:"flex",alignItems:"center",justifyContent:"center",gap:"4px"})),k=styled(g)(()=>({display:"flex",flexDirection:"column",justifyContent:"center",gap:"6px"})),I=styled(L)(()=>({flexGrow:1,maxWidth:"100%",".MuiInput-input":{fontWeight:"500",fontSize:"11px",textAlign:"center"},".MuiInput-root":{paddingInline:"8px"},height:32,width:32}));var _=r=>r===0?12:r<=12?r:r-12,ae=r=>r>=12?"PM":"AM",R=()=>new Date().getMinutes(),N=()=>{let r=new Date().getHours();return _(r)},ce=(r,o)=>o==="AM"&&r===12?0:o==="PM"&&r!==12?r+12:r;var G=["AM","PM"],f=12,h=59;function O({onChange:r,defaultTime:o,enableRealTimeChange:i,size:u="large"}){let p=Vb(useId(),"time-picker"),[b,H]=useState(null),[a,U]=useState(o?.period??(new Date().getHours()>=12?"PM":"AM")),[c,y]=useState(o?.hour??N()),[l,C]=useState(o?.minute??R()),v=!!b;useEffect(()=>{i&&r?.({hour:c,minute:l,period:a});},[c,l,a,i]);let q=e=>{H(e.currentTarget);},J=()=>{H(null),r?.({hour:c,minute:l,period:a});},K=e=>{U(e);},s=e=>e<10?`0${e}`:e.toString(),Q=e=>{let m=ea(s(Number(e.target.value)));if(m>12){e.preventDefault();return}y(m);},D=()=>{y(e=>e===12?1:e+1);},E=()=>{y(e=>e===1?12:e-1);},V=e=>{let m=ea(s(Number(e.target.value)));if(m>59){e.preventDefault();return}C(m);},X=()=>{C(e=>e===59?(D(),0):e+1);},Y=()=>{C(e=>e===0?(E(),59):e-1);};return jsx(te,{onClickAway:J,children:jsxs(g,{id:p,"data-testid":"TimePicker",children:[jsx(z,{size:u,open:v,onClick:q,children:`${s(c)}:${s(l)}${a.toLowerCase()}`}),jsx(R$1,{open:v,anchorEl:b,placement:"top-start",sx:{marginTop:"8px",marginBottom:"8px"},children:jsxs(S,{children:[jsxs(j,{children:[jsxs(k,{children:[jsx(x,{onClick:D,children:jsx("img",{src:el,alt:"arrow"})}),jsx(I,{type:"number",hideArrows:true,disableFocusRing:true,value:s(c),onChange:Q}),jsx(x,{onClick:E,children:jsx("img",{src:fl,alt:"arrow"})})]}),jsx(j$1,{children:":"}),jsxs(k,{children:[jsx(x,{onClick:X,children:jsx("img",{src:el,alt:"arrow"})}),jsx(I,{type:"number",hideArrows:true,disableFocusRing:true,value:s(l),onChange:V}),jsx(x,{onClick:Y,children:jsx("img",{src:fl,alt:"arrow"})})]})]}),jsx($,{children:G.map(e=>jsx(F,{onClick:()=>{K(e);},selected:a===e,children:e},e))})]})})]})})}var ve=O;export{_ as a,ae as b,R as c,N as d,ce as e,G as f,f as g,h,O as i,ve as j};