@tap-payments/os-micro-frontend-shared 0.3.185 → 0.3.186

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 (143) hide show
  1. package/build/_chunks/{chunk-4ST6ZJ2C.js → chunk-4EGODHP2.js} +1 -1
  2. package/build/_chunks/{chunk-AT5JDEPQ.js → chunk-4LRR2NPX.js} +1 -1
  3. package/build/_chunks/{chunk-GGS7KQR6.js → chunk-4ZGXC7BM.js} +1 -1
  4. package/build/_chunks/{chunk-V5RDDFF3.js → chunk-52PEBFUR.js} +1 -1
  5. package/build/_chunks/{chunk-KH5VKOHM.js → chunk-5324K2OQ.js} +1 -1
  6. package/build/_chunks/{chunk-V5JV6QVY.js → chunk-53VIAIUR.js} +1 -1
  7. package/build/_chunks/{chunk-Z3B724PV.js → chunk-5DYZGT6I.js} +1 -1
  8. package/build/_chunks/{chunk-5M4VBZLC.js → chunk-6I4UEKWG.js} +1 -1
  9. package/build/_chunks/{chunk-2RDQBQMB.js → chunk-7F562LTH.js} +1 -1
  10. package/build/_chunks/{chunk-6WTDU6NC.js → chunk-A3ABNJCK.js} +1 -1
  11. package/build/_chunks/{chunk-T7QF6JKF.js → chunk-A7HSQT3N.js} +1 -1
  12. package/build/_chunks/{chunk-YDHU7HHG.js → chunk-BSPMYA76.js} +1 -1
  13. package/build/_chunks/{chunk-2KCGCR2L.js → chunk-BSYSM3EM.js} +1 -1
  14. package/build/_chunks/{chunk-FGE44XKB.js → chunk-CIGJVGNL.js} +1 -1
  15. package/build/_chunks/{chunk-GZH5EJQ2.js → chunk-CVC2CTPA.js} +1 -1
  16. package/build/_chunks/{chunk-GP37AYKM.js → chunk-DM4TRJTT.js} +1 -1
  17. package/build/_chunks/{chunk-RK4ILR6E.js → chunk-DS3M3OAQ.js} +1 -1
  18. package/build/_chunks/{chunk-7N7MHNP2.js → chunk-FE3DF2W6.js} +1 -1
  19. package/build/_chunks/{chunk-3INH4GBN.js → chunk-FE7WQDVI.js} +1 -1
  20. package/build/_chunks/{chunk-DOZVZDPP.js → chunk-FTHWIMUV.js} +1 -1
  21. package/build/_chunks/{chunk-CI5H4RIZ.js → chunk-FVY6VCT6.js} +1 -1
  22. package/build/_chunks/{chunk-DWNEP3PD.js → chunk-GUMVHBNF.js} +1 -1
  23. package/build/_chunks/{chunk-DS5DJWRA.js → chunk-GZPG5K7N.js} +1 -1
  24. package/build/_chunks/{chunk-T3R24VTQ.js → chunk-HGHJ6KBD.js} +1 -1
  25. package/build/_chunks/{chunk-IION7RYR.js → chunk-IGWVAC3M.js} +1 -1
  26. package/build/_chunks/{chunk-IT6TVIG5.js → chunk-J5CWFIOG.js} +1 -1
  27. package/build/_chunks/{chunk-C7YKZH5C.js → chunk-JKEM4CW4.js} +1 -1
  28. package/build/_chunks/{chunk-XUX3EKGQ.js → chunk-KTTIOTRB.js} +1 -1
  29. package/build/_chunks/{chunk-5S3CWCOK.js → chunk-LHJBZZWA.js} +1 -1
  30. package/build/_chunks/{chunk-F5NB7ROL.js → chunk-LNCQFUAI.js} +1 -1
  31. package/build/_chunks/{chunk-AIGUD274.js → chunk-MENS7KNR.js} +1 -1
  32. package/build/_chunks/{chunk-BP3HDL2F.js → chunk-MN3K3WSB.js} +1 -1
  33. package/build/_chunks/{chunk-ZUE6GDUX.js → chunk-MSFGEYUK.js} +1 -1
  34. package/build/_chunks/{chunk-3S64MHKR.js → chunk-N6XKJTQM.js} +1 -1
  35. package/build/_chunks/{chunk-GN4XV3KJ.js → chunk-NT53XXH2.js} +1 -1
  36. package/build/_chunks/{chunk-QR6UNTQA.js → chunk-O2EJP3XL.js} +1 -1
  37. package/build/_chunks/{chunk-QGN2O3WR.js → chunk-ODAONPTJ.js} +1 -1
  38. package/build/_chunks/{chunk-BKOLKFWT.js → chunk-QX4JO7AK.js} +1 -1
  39. package/build/_chunks/{chunk-43DWUSBH.js → chunk-RNPTXIIZ.js} +1 -1
  40. package/build/_chunks/{chunk-SASPLR2D.js → chunk-T3FR65ER.js} +1 -1
  41. package/build/_chunks/{chunk-YG6HWIPM.js → chunk-TZA2ZJV3.js} +1 -1
  42. package/build/_chunks/{chunk-TVBE2WOW.js → chunk-UU2S7KEK.js} +1 -1
  43. package/build/_chunks/{chunk-L5EEBRX6.js → chunk-V23KIM4X.js} +1 -1
  44. package/build/_chunks/{chunk-3L4TTGVY.js → chunk-VJCGM47T.js} +1 -1
  45. package/build/_chunks/{chunk-DUST7Q2X.js → chunk-VLFYYVGE.js} +1 -1
  46. package/build/_chunks/{chunk-OPTS7XVW.js → chunk-WFK66UV6.js} +1 -1
  47. package/build/_chunks/{chunk-INCAIGYE.js → chunk-XHRCZTG3.js} +1 -1
  48. package/build/_chunks/{chunk-MLLPGFR2.js → chunk-Y3Q6TLC6.js} +1 -1
  49. package/build/_chunks/{chunk-CPPUEDZS.js → chunk-YDPFLSRM.js} +1 -1
  50. package/build/_chunks/{chunk-HYVBY2OQ.js → chunk-YDVIN2SZ.js} +1 -1
  51. package/build/_chunks/{chunk-7IIVVXTW.js → chunk-ZKNRZIOH.js} +1 -1
  52. package/build/_chunks/{chunk-U76WGJOX.js → chunk-ZSSYCG4H.js} +1 -1
  53. package/build/components/AccountDropdown/index.js +1 -1
  54. package/build/components/ActionMenu/index.js +1 -1
  55. package/build/components/ActiveFilterChip/index.js +1 -1
  56. package/build/components/AmountConversionFilter/index.js +1 -1
  57. package/build/components/AmountInput/index.js +1 -1
  58. package/build/components/AmountSlider/index.js +1 -1
  59. package/build/components/AppServices/index.js +1 -1
  60. package/build/components/AppServicesBar/index.js +1 -1
  61. package/build/components/AppWindowWrapper/index.js +1 -1
  62. package/build/components/BrandLogo/index.js +1 -1
  63. package/build/components/Button/index.js +1 -1
  64. package/build/components/Calender/index.js +1 -1
  65. package/build/components/ChipStack/index.js +1 -1
  66. package/build/components/ColorPicker/index.js +1 -1
  67. package/build/components/ColumnViews/index.js +1 -1
  68. package/build/components/ConfirmDialog/index.js +1 -1
  69. package/build/components/CountryFilter/index.js +1 -1
  70. package/build/components/CurrencyFilter/index.js +1 -1
  71. package/build/components/Customer/index.js +1 -1
  72. package/build/components/DateFilter/index.js +1 -1
  73. package/build/components/DeviceIcon/index.js +1 -1
  74. package/build/components/Discount/index.js +1 -1
  75. package/build/components/Dropdown2/index.js +1 -1
  76. package/build/components/DropdownButton/index.js +1 -1
  77. package/build/components/DropdownMenu/index.js +1 -1
  78. package/build/components/ExpandableSideBar/index.js +1 -1
  79. package/build/components/FileInputPreview/index.js +1 -1
  80. package/build/components/FileUpload/index.js +1 -1
  81. package/build/components/FileUploader/index.js +1 -1
  82. package/build/components/FilterDropdown/index.js +1 -1
  83. package/build/components/Filters/index.js +1 -1
  84. package/build/components/HeatMap/index.js +1 -1
  85. package/build/components/IconWithBadge/index.js +1 -1
  86. package/build/components/InputBase/index.js +1 -1
  87. package/build/components/Inputs/index.js +1 -1
  88. package/build/components/JSONViewer/index.js +1 -1
  89. package/build/components/LanguageDropdown/index.js +1 -1
  90. package/build/components/ListColumnFilter/index.js +1 -1
  91. package/build/components/ListHeader/index.js +1 -1
  92. package/build/components/MerchantCurrencyDropdown/index.js +1 -1
  93. package/build/components/MerchantLogo/index.js +1 -1
  94. package/build/components/MerchantsDropdown/index.js +1 -1
  95. package/build/components/MultiSelectDropdownButton/index.js +1 -1
  96. package/build/components/MultiSelectWithSearch/index.js +1 -1
  97. package/build/components/NestedDropdown/index.js +1 -1
  98. package/build/components/PartnersFilter/index.js +1 -1
  99. package/build/components/PaymentSourceFilter/index.js +1 -1
  100. package/build/components/PhoneFilter/index.js +1 -1
  101. package/build/components/ProgressRing/index.js +1 -1
  102. package/build/components/RFH/index.js +1 -1
  103. package/build/components/RadioGroup/index.js +1 -1
  104. package/build/components/RangeCalender/index.js +1 -1
  105. package/build/components/RatingCount/index.js +1 -1
  106. package/build/components/ReceiptsViewer/index.js +1 -1
  107. package/build/components/ReferenceTypeFilter/index.js +1 -1
  108. package/build/components/SalesChannelFilter/index.js +1 -1
  109. package/build/components/SearchButton/index.js +1 -1
  110. package/build/components/SelectDropdown/index.js +1 -1
  111. package/build/components/SelectWithSearch/index.js +1 -1
  112. package/build/components/StatusBar/index.js +1 -1
  113. package/build/components/StatusButton/index.js +1 -1
  114. package/build/components/StatusFilter/index.js +1 -1
  115. package/build/components/StatusIcons/index.js +1 -1
  116. package/build/components/StatusLabel/index.js +1 -1
  117. package/build/components/TableCells/index.js +1 -1
  118. package/build/components/TableReports/index.js +1 -1
  119. package/build/components/Timepicker/index.js +1 -1
  120. package/build/components/Toolbar/index.js +1 -1
  121. package/build/components/TooltipChip/index.js +1 -1
  122. package/build/components/TreeDropdown/index.js +1 -1
  123. package/build/components/VAT/index.js +1 -1
  124. package/build/components/VerificationIcon/index.js +1 -1
  125. package/build/components/ViewColumnRadioFilter/index.js +1 -1
  126. package/build/components/VirtualTables/index.js +1 -1
  127. package/build/components/Widget/index.js +1 -1
  128. package/build/components/WindowAppIcon/index.js +1 -1
  129. package/build/components/WindowSideBar/index.js +1 -1
  130. package/build/components/index.d.ts +1 -1
  131. package/build/components/index.js +1 -1
  132. package/build/components/primitives/Dialog/style.d.ts +3 -1
  133. package/build/components/primitives/Dialog/type.d.ts +2 -0
  134. package/build/components/primitives/index.js +1 -1
  135. package/build/index.js +1 -1
  136. package/package.json +1 -1
  137. package/build/_chunks/chunk-ME7XV5I2.js +0 -1
  138. package/build/components/Dialog/Dialog.d.ts +0 -14
  139. package/build/components/Dialog/components/DialogToolbar.d.ts +0 -9
  140. package/build/components/Dialog/constant.d.ts +0 -1
  141. package/build/components/Dialog/index.d.ts +0 -4
  142. package/build/components/Dialog/index.js +0 -1
  143. package/build/components/Dialog/style.d.ts +0 -272
@@ -1 +1 @@
1
- import {j as j$1}from'./chunk-BP3HDL2F.js';import {yc}from'./chunk-2SKLD6QR.js';import {Xc,Cb}from'./chunk-OK75VWGZ.js';import {memo,useId}from'react';import n from'@mui/material/Box';import W from'@mui/material/Popover';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var x=styled(n,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:e,disabled:r})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingInlineStart:"8px",paddingInlineEnd:"4px",paddingTop:"6px",paddingBottom:"6px",borderRadius:"4px",background:"#F9F9F9",border:"1px solid #F9F9F9",cursor:"pointer",...e&&{borderColor:o.palette.info.dark,background:o.palette.common.white},...r&&{cursor:"not-allowed"}})),s=styled(n)(()=>({display:"flex",flexDirection:"column",gap:"4px",fontSize:"10px",fontWeight:500,flex:1})),c=styled(n)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:200,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1,{shouldForwardProp:o=>o!=="selected"})(({selected:o})=>({paddingInlineStart:"12px",paddingInlineEnd:"8px",paddingTop:"8px",paddingBottom:"8px",fontSize:"10px",color:"#000",fontWeight:500,lineHeight:"10px",cursor:"pointer",...o&&{backgroundColor:"#F8F8F8"}}));function H({onClose:o,open:e,anchorEl:r,trigger:b,onOpen:f,children:h,disabled:u}){let w=yc(useId(),"account-dropdown");return jsxs(x,{id:w,open:e,onClick:f,"data-testid":"Dropdown",disabled:u,children:[jsx(s,{children:b}),jsx(n,{sx:{width:16,height:16,display:"flex",alignItems:"center"},children:jsx(n,{component:"img",src:e?Xc:Cb,alt:"arrow",sx:{width:16,height:16,...e&&{width:12,height:12,padding:"2px"}}})}),jsx(W,{open:e,anchorEl:r,sx:{width:r?.clientWidth},onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{style:{width:r?.clientWidth,maxWidth:"unset"}}},children:jsx(c,{children:h})})]})}var g=memo(H);var j=g;export{j as a};
1
+ import {j as j$1}from'./chunk-MN3K3WSB.js';import {yc}from'./chunk-2SKLD6QR.js';import {Xc,Cb}from'./chunk-OK75VWGZ.js';import {memo,useId}from'react';import n from'@mui/material/Box';import W from'@mui/material/Popover';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var x=styled(n,{shouldForwardProp:o=>o!=="open"&&o!=="disabled"})(({theme:o,open:e,disabled:r})=>({display:"flex",alignItems:"center",justifyContent:"space-between",paddingInlineStart:"8px",paddingInlineEnd:"4px",paddingTop:"6px",paddingBottom:"6px",borderRadius:"4px",background:"#F9F9F9",border:"1px solid #F9F9F9",cursor:"pointer",...e&&{borderColor:o.palette.info.dark,background:o.palette.common.white},...r&&{cursor:"not-allowed"}})),s=styled(n)(()=>({display:"flex",flexDirection:"column",gap:"4px",fontSize:"10px",fontWeight:500,flex:1})),c=styled(n)(({theme:o})=>({padding:"4px",borderRadius:"4px",boxShadow:"-26px 156px 44px 0px rgba(0, 0, 0, 0.00), -17px 100px 41px 0px rgba(0, 0, 0, 0.01), -9px 56px 34px 0px rgba(0, 0, 0, 0.05), -4px 25px 25px 0px rgba(0, 0, 0, 0.09), -1px 6px 14px 0px rgba(0, 0, 0, 0.10), 0px 0px 0px 0px rgba(0, 0, 0, 0.10)",backgroundColor:o.palette.common.white,maxHeight:200,marginTop:"4px",width:"auto",overflow:"auto"}));styled(j$1,{shouldForwardProp:o=>o!=="selected"})(({selected:o})=>({paddingInlineStart:"12px",paddingInlineEnd:"8px",paddingTop:"8px",paddingBottom:"8px",fontSize:"10px",color:"#000",fontWeight:500,lineHeight:"10px",cursor:"pointer",...o&&{backgroundColor:"#F8F8F8"}}));function H({onClose:o,open:e,anchorEl:r,trigger:b,onOpen:f,children:h,disabled:u}){let w=yc(useId(),"account-dropdown");return jsxs(x,{id:w,open:e,onClick:f,"data-testid":"Dropdown",disabled:u,children:[jsx(s,{children:b}),jsx(n,{sx:{width:16,height:16,display:"flex",alignItems:"center"},children:jsx(n,{component:"img",src:e?Xc:Cb,alt:"arrow",sx:{width:16,height:16,...e&&{width:12,height:12,padding:"2px"}}})}),jsx(W,{open:e,anchorEl:r,sx:{width:r?.clientWidth},onClose:o,anchorOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{style:{width:r?.clientWidth,maxWidth:"unset"}}},children:jsx(c,{children:h})})]})}var g=memo(H);var j=g;export{j as a};
@@ -1 +1 @@
1
- import {r}from'./chunk-BP3HDL2F.js';import {yc,cb}from'./chunk-2SKLD6QR.js';import {useId}from'react';import {motion}from'framer-motion';import {Box,Typography}from'@mui/material';import {styled}from'@mui/material/styles';import I from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(Box)(({size:t})=>({display:"flex",flexDirection:"column",alignItems:"center",width:t,height:t,position:"relative"})),y=styled(Box)({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}),b=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({fontSize:"17px",fontWeight:700,color:t?"#CFD0D2":"#000"})),D=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:t?"#CFD0D2":"#8D8D94",fontSize:"11px",fontWeight:500,letterSpacing:"0%",textAlign:"right",verticalAlign:"middle"}));var C=()=>jsxs(I,{component:"span",sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"6px"},children:[jsx(r,{width:51,height:16}),jsx(r,{width:84,height:8})]});var v=({value:t,label:k,size:o=172,strokeWidth:p=22,isLoading:l=false})=>{let E=yc(useId(),"progress-ring"),m=t==null||t==="",F=cb(t||"0"),s=Math.min(Math.max(F??0,0),100),c=(o-p)/2,n=2*Math.PI*c,r=o/2;return jsxs(u,{id:E,"data-testid":"ProgressRing",size:o,children:[jsxs("svg",{width:o,height:o,viewBox:`0 0 ${o} ${o}`,style:{position:"absolute",top:0,left:0},children:[jsx("defs",{children:jsxs("linearGradient",{id:"progressGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsx("stop",{offset:"0.67%",stopColor:"#3DA6E1"}),jsx("stop",{offset:"98.91%",stopColor:"#147DC5"})]})}),jsx("circle",{cx:r,cy:r,r:c,stroke:"#F3F3F3",strokeWidth:p,fill:"transparent"}),jsx(motion.circle,{cx:r,cy:r,r:c,stroke:"url(#progressGradient)",strokeWidth:p,fill:"transparent",strokeLinecap:"round",strokeDasharray:n,strokeDashoffset:n,transform:`rotate(-90 ${r} ${r})`,animate:{strokeDashoffset:l?n:n-n*s/100},transition:{duration:1,ease:"easeOut"}})]}),jsxs(y,{children:[jsx(b,{isEmpty:m,children:l?jsx(C,{}):m?"----":jsxs(motion.span,{initial:{opacity:0},animate:{opacity:1},transition:{ease:"easeOut",duration:.5},children:[Number.isInteger(s)?s:s.toFixed(1),"%"]})}),!l&&jsx(D,{isEmpty:m,children:k})]})]})},T=v;var U=T;export{U as a};
1
+ import {r}from'./chunk-MN3K3WSB.js';import {yc,cb}from'./chunk-2SKLD6QR.js';import {useId}from'react';import {motion}from'framer-motion';import {Box,Typography}from'@mui/material';import {styled}from'@mui/material/styles';import I from'@mui/material/Box';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(Box)(({size:t})=>({display:"flex",flexDirection:"column",alignItems:"center",width:t,height:t,position:"relative"})),y=styled(Box)({position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"}),b=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({fontSize:"17px",fontWeight:700,color:t?"#CFD0D2":"#000"})),D=styled(Typography,{shouldForwardProp:t=>t!=="isEmpty"})(({isEmpty:t})=>({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:t?"#CFD0D2":"#8D8D94",fontSize:"11px",fontWeight:500,letterSpacing:"0%",textAlign:"right",verticalAlign:"middle"}));var C=()=>jsxs(I,{component:"span",sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"6px"},children:[jsx(r,{width:51,height:16}),jsx(r,{width:84,height:8})]});var v=({value:t,label:k,size:o=172,strokeWidth:p=22,isLoading:l=false})=>{let E=yc(useId(),"progress-ring"),m=t==null||t==="",F=cb(t||"0"),s=Math.min(Math.max(F??0,0),100),c=(o-p)/2,n=2*Math.PI*c,r=o/2;return jsxs(u,{id:E,"data-testid":"ProgressRing",size:o,children:[jsxs("svg",{width:o,height:o,viewBox:`0 0 ${o} ${o}`,style:{position:"absolute",top:0,left:0},children:[jsx("defs",{children:jsxs("linearGradient",{id:"progressGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsx("stop",{offset:"0.67%",stopColor:"#3DA6E1"}),jsx("stop",{offset:"98.91%",stopColor:"#147DC5"})]})}),jsx("circle",{cx:r,cy:r,r:c,stroke:"#F3F3F3",strokeWidth:p,fill:"transparent"}),jsx(motion.circle,{cx:r,cy:r,r:c,stroke:"url(#progressGradient)",strokeWidth:p,fill:"transparent",strokeLinecap:"round",strokeDasharray:n,strokeDashoffset:n,transform:`rotate(-90 ${r} ${r})`,animate:{strokeDashoffset:l?n:n-n*s/100},transition:{duration:1,ease:"easeOut"}})]}),jsxs(y,{children:[jsx(b,{isEmpty:m,children:l?jsx(C,{}):m?"----":jsxs(motion.span,{initial:{opacity:0},animate:{opacity:1},transition:{ease:"easeOut",duration:.5},children:[Number.isInteger(s)?s:s.toFixed(1),"%"]})}),!l&&jsx(D,{isEmpty:m,children:k})]})]})},T=v;var U=T;export{U as a};
@@ -1 +1 @@
1
- import {d as d$1}from'./chunk-HYVBY2OQ.js';import {V}from'./chunk-BP3HDL2F.js';import {yc}from'./chunk-2SKLD6QR.js';import {Eb,A as A$1}from'./chunk-OK75VWGZ.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(V)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(V)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Eb:A$1,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
1
+ import {d as d$1}from'./chunk-YDVIN2SZ.js';import {V}from'./chunk-MN3K3WSB.js';import {yc}from'./chunk-2SKLD6QR.js';import {Eb,A as A$1}from'./chunk-OK75VWGZ.js';import {useId,useMemo,useState}from'react';import d from'@mui/material/Box';import R from'@mui/material/Skeleton';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var b=styled(d)(({theme:e})=>({display:"flex",flexDirection:"column",borderRadius:"8px",border:`1px solid ${e.palette.divider}`,backgroundColor:e.palette.common.white,maxHeight:"232px",overflow:"auto"})),k=styled(d)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),v=styled(d,{shouldForwardProp:e=>e!=="$active"})(({$active:e})=>({display:"flex",alignItems:"center",justifyContent:"center",width:"13px",height:"13px",borderRadius:"50%",...e&&{backgroundColor:"#F2F2F2"}})),y=styled("img",{shouldForwardProp:e=>e!=="$isClear"})(({$isClear:e})=>({...e&&{backgroundColor:"#F2F2F2",borderRadius:"4px",width:"8px",height:"8px"}})),W=styled(d$1,{shouldForwardProp:e=>e!=="$hasSearchValue"})(({$hasSearchValue:e})=>({cursor:e?"pointer":"default",width:"100%",fontSize:"11px",border:"1px solid #F2F2F2",backgroundColor:"#fff","&.Mui-disabled":{backgroundColor:"#F8F8F8"}})),w=styled(V)(({theme:e})=>({backgroundColor:"#F8F8F8",fontSize:"11px",fontWeight:600,padding:"4px 8px",color:e.palette.info.dark,gap:"4px"})),A=styled(V)(()=>({fontSize:"11px",padding:"4px 8px",gap:"4px",fontWeight:400})),L=styled(R)(()=>({width:"100%",height:24}));function M({onSalesChannelChange:e,onSearchChange:h,filteredOptions:a,isLoading:P,initialSalesChannels:m,initialSalesChannelsSearch:V}){let B=yc(useId(),"sales-channel-filter"),o=useMemo(()=>m||[],[m]),[l,u]=useState(V||""),S=t=>o.some(i=>i.id===t),s=useMemo(()=>o?.length===a.length&&a?.length>0,[o,a]),g=useMemo(()=>o?.some(t=>t.id==="blank")&&o?.length===1,[o]),x=useMemo(()=>o?.length===0||g,[g,o?.length]);return jsxs(k,{id:B,"data-testid":"SalesChannelFilter",children:[jsx(W,{$hasSearchValue:!!l,placeholder:"Search",endAdornment:!x&&jsx(v,{$active:!!l,children:jsx(y,{src:l?Eb:A$1,alt:"search",$isClear:!!l,onClick:()=>{u(""),h("");}})}),disabled:x,onChange:t=>{u(t.target.value),h(t.target.value);},value:l,disableUnderline:true}),jsx(b,{children:P?Array.from({length:9}).map((t,i)=>jsx(L,{variant:"rectangular"},i)):jsxs(Fragment,{children:[jsx(w,{isSelected:s,isIndeterminate:!s&&(o?.length||0)>0,onClick:t=>{t.stopPropagation(),e(s?[]:a);},children:s?"Deselect All":"Select All"}),a.map(t=>jsx(A,{isSelected:S(t.id),onClick:i=>{i.stopPropagation();let O=S(t.id)?o?.filter(D=>D.id!==t.id):[...o??[],t];e(O);},children:t?.name?.en},t.id))]})})]})}export{M as a};
@@ -1 +1 @@
1
- import {i}from'./chunk-XUX3EKGQ.js';import {p}from'./chunk-BP3HDL2F.js';import {Aa}from'./chunk-2SKLD6QR.js';import ee,{memo,useMemo,Children,useState,useRef,useEffect,useCallback,useLayoutEffect,isValidElement}from'react';import {motion}from'framer-motion';import P from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=24;var D=.22;var nt=styled(P)(()=>({display:"flex",gap:"8px",overflow:"visible"})),Ut=["trackWidth","minTrackWidth","slotSize","hoverZIndex"],it=styled("div",{shouldForwardProp:t=>!Ut.includes(t)})(({trackWidth:t,minTrackWidth:e,slotSize:r,hoverZIndex:o})=>({position:"relative",overflow:"visible",width:t,minWidth:e,height:r,transition:`width ${.22}s ease-out`,...o!==void 0?{zIndex:o}:{}})),$=styled(P)(()=>({display:"flex",alignItems:"center",paddingRight:"8px","& .chip-stack-overlap-slot":{marginRight:"-8px",position:"relative",zIndex:1},"& .chip-stack-overlap-slot:hover":{zIndex:2}}));function at(t){return {display:"flex",alignItems:"center",justifyContent:"center",width:`var(--chip-stack-slot-size, ${24}px)`,height:`var(--chip-stack-slot-size, ${24}px)`,borderRadius:"50%",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.common.white,flexShrink:0}}var ct=styled(({title:t,className:e,...r})=>t!=null&&t!==""?jsx(p,{title:t,wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{className:e,...r})}):jsx(P,{className:["chip-stack-overlap-slot",e].filter(Boolean).join(" "),...r}))(({theme:t})=>({...at(t),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,"& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),K=styled(({title:t,...e})=>jsx(p,{title:t??"",wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{...e})}))(({theme:t})=>({...at(t),fontSize:`max(${8}px, calc(var(--chip-stack-slot-size, ${24}px) * ${8.5} / ${24}))`,fontWeight:500,color:t.palette.text.disabled}));function st({overflowItems:t,size:e}){let r=`${Math.max(8,8.5*e/24)}px`;return jsxs(P,{sx:{width:e,height:e,borderRadius:"50%",border:o=>`1px solid ${o.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r,fontWeight:600,bgcolor:"action.hover",flexShrink:0},children:["+",t.length]})}var Gt=["faceSize","avatarFill"],pt=styled(i,{shouldForwardProp:t=>!Gt.includes(t)})(({theme:t,faceSize:e,avatarFill:r})=>{let o=`${e}px`,i=`${Math.max(7,8.5*e/24)}px`;return {width:o,height:o,fontSize:i,fontWeight:500,lineHeight:"100%",letterSpacing:"0%",textAlign:"center",color:t.palette.common.white,background:r,backgroundSize:"cover","&.MuiAvatar-colorDefault":{background:r,color:t.palette.common.white},"& .MuiAvatar-img":{objectFit:"cover"}}});function lt(t){return t==="fanout-left"?"left":t==="fanout-center"?"center":"right"}function mt(t,e,r){return t==="static"?e?"static-children":r?"static-items":null:e?"animated-children":r?"animated-items":null}function dt({size:t,stackStep:e,gap:r,minTrackWidth:o}){let i=t??24,n=e??Math.round(i/2),s=r??Math.max(1,Math.round(i*3/24)),a=o??Math.max(60,Math.round(i*60/24));return {size:i,stackStep:n,gap:s,minTrackWidth:a}}function ut(t,e){if(t<=0)return 0;switch(e){case "right":return 0;case "left":return t-1;default:return Math.floor((t-1)/2)}}function ht(t,e){return e!==void 0&&t>e}function M(t,e){return e===void 0||e<1||t.length<e?{visibleItems:t,hiddenItems:[]}:{visibleItems:t.slice(0,e-1),hiddenItems:t.slice(e-1)}}function Yt(t,e){return isValidElement(t)&&t.key!=null&&t.key!==""?String(t.key):`chip-stack-child-${e}`}function B({items:t,maxItems:e,getItemKey:r,renderItem:o,renderOverflow:i,slotSize:n}){let s={slotSize:n};if(t.length===0)return [];let{visibleItems:a,hiddenItems:c}=M(t,e),p=a.map((m,l)=>({key:r(m,l),render:()=>o(m,l,s)}));return c.length>0&&p.push({key:`chip-stack-overflow-${c.length}-${a.length}`,render:()=>i({items:t,overflowItems:c,size:n})}),p}function ft({children:t,maxItems:e,slotSize:r,renderOverflow:o}){let i=Children.toArray(t);return B({items:i,maxItems:e,getItemKey:Yt,renderItem:n=>n,renderOverflow:o,slotSize:r})}function St(t,e){return t.length===e.length&&t.every((r,o)=>r===e[o])}function X(t,e,r){return t[e]??r}function kt(t,e,r,o,i,n){if(t===0)return [];let s=e*i,a=new Array(t);a[e]=s;for(let c=e-1;c>=0;c-=1)a[c]=a[c+1]-X(r,c,n)-o;for(let c=e+1;c<t;c+=1)a[c]=a[c-1]+X(r,c-1,n)+o;return a}function Ct(t,e,r){return t<=0?0:(t-1)*e+r}function xt(t,e,r,o){return Array.from({length:t},(i,n)=>t<=1||!e?0:r[n]-n*o)}function At(t,e,r,o,i){if(t<=0)return 0;let n=e.map((c,p)=>c+X(r,p,i)),s=Math.min(...e),a=Math.max(...n);return Math.max(o,a-s)}function gt(t,e,r){return Array.from({length:t},(o,i)=>{let n=e.current[i];return n?n.offsetWidth:r})}function Z(t,e){return t.id??`${t.first}-${t.last}-${e}`}function yt(t){return [t.first,t.last].map(e=>e?.[0]).filter(e=>e!=null&&e!=="").join("")}function Tt(t){if(t.tooltip!==void 0)return t.tooltip===null?null:t.tooltip;let e=`${t.first||""} ${t.last||""}`.trim();return e!==""?e:null}function Rt({slotCount:t,anchorIndex:e,size:r,stackStep:o,gap:i,fanOutEnabled:n,compact:s}){let[a,c]=useState(false),[p,m]=useState(()=>Array.from({length:t},()=>r)),l=useRef(null),f=useRef([]),C=useRef(null),x=useCallback(()=>{let v=gt(t,f,r);m(g=>St(g,v)?g:v);},[t,r]),d=useCallback(()=>{C.current&&cancelAnimationFrame(C.current),C.current=requestAnimationFrame(x);},[x]),A=useMemo(()=>kt(t,e,p,i,o,r),[t,e,p,i,o,r]),y=useMemo(()=>xt(t,n&&a,A,o),[t,n,a,A,o]),S=useMemo(()=>Ct(t,o,r),[t,o,r]),O=useMemo(()=>At(t,A,p,S,r),[t,A,p,S,r]),k=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),c(true));},[n]),u=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),l.current=setTimeout(()=>c(false),120));},[n]);useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),useEffect(()=>{n||c(false);},[n]),useLayoutEffect(()=>{m(Array.from({length:t},()=>r));},[t,r]),useLayoutEffect(()=>{x();},[t,r,x]),useEffect(()=>(d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d),C.current&&cancelAnimationFrame(C.current);}),[d]);let T=n&&a?O:s?r:S,b=n&&a,F=useMemo(()=>s?Array.from({length:t},(v,g)=>g===e||a?1:0):Array.from({length:t},()=>1),[s,t,e,a]);return {isHovering:a,handleMouseEnter:k,handleMouseLeave:u,slotRefs:f,translateX:y,slotOpacity:F,collapsedStackWidthPx:S,fannedRowWidthPx:O,trackWidth:T,hoverZIndexActive:b}}function H({items:t,children:e,maxItems:r,getItemKey:o,renderItem:i,renderOverflow:n,fanOutDirection:s,compact:a=false,"data-testid":c,sx:p,className:m,slotProps:l}){let f=Children.count(e)>0,{zIndex:C=1e3,size:x,stackStep:d,gap:A,minTrackWidth:y}=l?.layout??{},S=useMemo(()=>f?Children.toArray(e??null).length:t?.length??0,[f,e,t]),k=!(!a&&ht(S,r)),{size:u,stackStep:w,gap:T,minTrackWidth:b}=useMemo(()=>dt({size:x,stackStep:d,gap:A,minTrackWidth:y}),[x,d,A,y]),F=n??st,v=useMemo(()=>f?ft({children:e??null,maxItems:r,slotSize:u,renderOverflow:F}):!t?.length||!o||!i?[]:B({items:t,maxItems:r,getItemKey:o,renderItem:i,slotSize:u,renderOverflow:F}),[f,e,t,r,o,i,F,u]),g=v.length,Nt=useMemo(()=>ut(g,s),[g,s]),{handleMouseEnter:Et,handleMouseLeave:Mt,slotRefs:Wt,translateX:Lt,slotOpacity:tt,collapsedStackWidthPx:Kt,trackWidth:Vt,hoverZIndexActive:zt}=Rt({slotCount:g,anchorIndex:Nt,size:u,stackStep:w,gap:T,fanOutEnabled:k,compact:a});if(g===0)return null;let{sx:L,...Ht}=l?.shell??{},{style:Dt,...$t}=l?.track??{};return jsx(nt,{className:m,...Ht,sx:[{justifyContent:"flex-start",...k||a?{width:"100%"}:{}},...Array.isArray(p)?p:p!=null?[p]:[],...Array.isArray(L)?L:L!=null?[L]:[]],children:jsx(it,{"data-testid":c,...$t,style:Dt,onMouseEnter:k?Et:void 0,onMouseLeave:k?Mt:void 0,trackWidth:Vt,minTrackWidth:a?u:Math.max(b,Kt),slotSize:u,hoverZIndex:zt?C:void 0,children:v.map((et,R)=>jsx(motion.div,{ref:Xt=>{Wt.current[R]=Xt;},initial:false,animate:{x:Lt[R]??0,opacity:tt[R]??1},transition:{duration:.22,ease:"easeOut"},style:{position:"absolute",top:0,left:R*w,zIndex:R,width:u,height:u,pointerEvents:tt[R]===0?"none":"auto"},children:et.render()},et.key))})})}function oe({children:t,maxItems:e,renderOverflow:r,slotSize:o=24,sx:i,...n}){let s=useMemo(()=>ee.Children.toArray(t),[t]),{visibleItems:a,hiddenItems:c}=useMemo(()=>M(s,e),[s,e]),p=c.length>0,m=useMemo(()=>[{"--chip-stack-slot-size":`${o}px`},...Array.isArray(i)?i:i!=null?[i]:[]],[o,i]);if(!p)return jsx($,{"data-testid":"ChipStack",...n,sx:m,children:t});let l=r?.({items:s,overflowItems:c,size:o});return jsxs($,{"data-testid":"ChipStack",...n,sx:m,children:[a,l??jsx(K,{title:`${c.length} more`,children:jsxs("span",{children:["+",c.length]})})]})}var J=memo(oe);function ie(t){return jsx(ct,{"data-testid":"OverlapChip",...t})}var Q=memo(ie);var ce=["static","fanout-right","fanout-left","fanout-center"],Y="static";function pe(t){let{variant:e=Y,maxItems:r,renderOverflow:o,children:i,items:n,getItemKey:s,renderItem:a,compact:c=false,"data-testid":p,slotProps:m,sx:l,className:f}=t,C=Children.count(i??null)>0,x=!C&&(n?.length??0)>0&&s!=null&&a!=null,d=mt(e,C,x);if(d===null)return null;if(d==="static-children"||d==="static-items"){let S=m?.layout?.size??24;if(d==="static-items"&&n&&s&&a){let{visibleItems:O,hiddenItems:k}=M(n,r),u=k.length>0?o?.({items:n,overflowItems:k,size:S})??jsx(K,{title:`${k.length} more`,children:jsxs("span",{children:["+",k.length]})}):null,w=jsxs(Fragment,{children:[O.map((T,b)=>jsx(Q,{children:a(T,b,{slotSize:S})},s(T,b))),u]});return jsx(J,{"data-testid":p,slotSize:S,sx:l,className:f,children:w})}return jsx(J,{"data-testid":p,maxItems:r,renderOverflow:o,slotSize:S,sx:l,className:f,children:i})}let A=lt(e),y={maxItems:r,renderOverflow:o,fanOutDirection:A,compact:c,"data-testid":p??"ChipStack",slotProps:m,sx:l,className:f};return d==="animated-children"?jsx(H,{...y,children:i}):jsx(H,{...y,items:n,getItemKey:s,renderItem:a})}var wt=pe;function he({item:t,sourceIndex:e,slotSize:r}){let[o,i]=useState(false),n=useRef(null);useEffect(()=>{i(false);},[t.logo]);let s=!t.logo||o,a=Z(t,e),c="transparent";s&&(n.current?.key!==a&&(n.current={key:a,fill:Aa()}),c=n.current.fill);let p$1=jsx(pt,{faceSize:r,avatarFill:c,src:s?void 0:t.logo,slotProps:s?void 0:{img:{onError:()=>i(true)}},children:yt(t)}),m=Tt(t);return m!=null&&m!==""?jsx(p,{title:m,children:p$1}):p$1}var fe=he;var dr=wt;export{h as a,D as b,Z as c,Q as d,ce as e,Y as f,wt as g,fe as h,dr as i};
1
+ import {i}from'./chunk-KTTIOTRB.js';import {p}from'./chunk-MN3K3WSB.js';import {Aa}from'./chunk-2SKLD6QR.js';import ee,{memo,useMemo,Children,useState,useRef,useEffect,useCallback,useLayoutEffect,isValidElement}from'react';import {motion}from'framer-motion';import P from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=24;var D=.22;var nt=styled(P)(()=>({display:"flex",gap:"8px",overflow:"visible"})),Ut=["trackWidth","minTrackWidth","slotSize","hoverZIndex"],it=styled("div",{shouldForwardProp:t=>!Ut.includes(t)})(({trackWidth:t,minTrackWidth:e,slotSize:r,hoverZIndex:o})=>({position:"relative",overflow:"visible",width:t,minWidth:e,height:r,transition:`width ${.22}s ease-out`,...o!==void 0?{zIndex:o}:{}})),$=styled(P)(()=>({display:"flex",alignItems:"center",paddingRight:"8px","& .chip-stack-overlap-slot":{marginRight:"-8px",position:"relative",zIndex:1},"& .chip-stack-overlap-slot:hover":{zIndex:2}}));function at(t){return {display:"flex",alignItems:"center",justifyContent:"center",width:`var(--chip-stack-slot-size, ${24}px)`,height:`var(--chip-stack-slot-size, ${24}px)`,borderRadius:"50%",border:`1px solid ${t.palette.divider}`,backgroundColor:t.palette.common.white,flexShrink:0}}var ct=styled(({title:t,className:e,...r})=>t!=null&&t!==""?jsx(p,{title:t,wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{className:e,...r})}):jsx(P,{className:["chip-stack-overlap-slot",e].filter(Boolean).join(" "),...r}))(({theme:t})=>({...at(t),overflow:"hidden",lineHeight:0,boxSizing:"border-box",padding:0,"& > *":{width:"100%",height:"100%",minWidth:0,minHeight:0},"& img":{display:"block",width:"100%",height:"100%",objectFit:"contain"}})),K=styled(({title:t,...e})=>jsx(p,{title:t??"",wrapperProps:{className:"chip-stack-overlap-slot"},children:jsx(P,{...e})}))(({theme:t})=>({...at(t),fontSize:`max(${8}px, calc(var(--chip-stack-slot-size, ${24}px) * ${8.5} / ${24}))`,fontWeight:500,color:t.palette.text.disabled}));function st({overflowItems:t,size:e}){let r=`${Math.max(8,8.5*e/24)}px`;return jsxs(P,{sx:{width:e,height:e,borderRadius:"50%",border:o=>`1px solid ${o.palette.divider}`,display:"flex",alignItems:"center",justifyContent:"center",fontSize:r,fontWeight:600,bgcolor:"action.hover",flexShrink:0},children:["+",t.length]})}var Gt=["faceSize","avatarFill"],pt=styled(i,{shouldForwardProp:t=>!Gt.includes(t)})(({theme:t,faceSize:e,avatarFill:r})=>{let o=`${e}px`,i=`${Math.max(7,8.5*e/24)}px`;return {width:o,height:o,fontSize:i,fontWeight:500,lineHeight:"100%",letterSpacing:"0%",textAlign:"center",color:t.palette.common.white,background:r,backgroundSize:"cover","&.MuiAvatar-colorDefault":{background:r,color:t.palette.common.white},"& .MuiAvatar-img":{objectFit:"cover"}}});function lt(t){return t==="fanout-left"?"left":t==="fanout-center"?"center":"right"}function mt(t,e,r){return t==="static"?e?"static-children":r?"static-items":null:e?"animated-children":r?"animated-items":null}function dt({size:t,stackStep:e,gap:r,minTrackWidth:o}){let i=t??24,n=e??Math.round(i/2),s=r??Math.max(1,Math.round(i*3/24)),a=o??Math.max(60,Math.round(i*60/24));return {size:i,stackStep:n,gap:s,minTrackWidth:a}}function ut(t,e){if(t<=0)return 0;switch(e){case "right":return 0;case "left":return t-1;default:return Math.floor((t-1)/2)}}function ht(t,e){return e!==void 0&&t>e}function M(t,e){return e===void 0||e<1||t.length<e?{visibleItems:t,hiddenItems:[]}:{visibleItems:t.slice(0,e-1),hiddenItems:t.slice(e-1)}}function Yt(t,e){return isValidElement(t)&&t.key!=null&&t.key!==""?String(t.key):`chip-stack-child-${e}`}function B({items:t,maxItems:e,getItemKey:r,renderItem:o,renderOverflow:i,slotSize:n}){let s={slotSize:n};if(t.length===0)return [];let{visibleItems:a,hiddenItems:c}=M(t,e),p=a.map((m,l)=>({key:r(m,l),render:()=>o(m,l,s)}));return c.length>0&&p.push({key:`chip-stack-overflow-${c.length}-${a.length}`,render:()=>i({items:t,overflowItems:c,size:n})}),p}function ft({children:t,maxItems:e,slotSize:r,renderOverflow:o}){let i=Children.toArray(t);return B({items:i,maxItems:e,getItemKey:Yt,renderItem:n=>n,renderOverflow:o,slotSize:r})}function St(t,e){return t.length===e.length&&t.every((r,o)=>r===e[o])}function X(t,e,r){return t[e]??r}function kt(t,e,r,o,i,n){if(t===0)return [];let s=e*i,a=new Array(t);a[e]=s;for(let c=e-1;c>=0;c-=1)a[c]=a[c+1]-X(r,c,n)-o;for(let c=e+1;c<t;c+=1)a[c]=a[c-1]+X(r,c-1,n)+o;return a}function Ct(t,e,r){return t<=0?0:(t-1)*e+r}function xt(t,e,r,o){return Array.from({length:t},(i,n)=>t<=1||!e?0:r[n]-n*o)}function At(t,e,r,o,i){if(t<=0)return 0;let n=e.map((c,p)=>c+X(r,p,i)),s=Math.min(...e),a=Math.max(...n);return Math.max(o,a-s)}function gt(t,e,r){return Array.from({length:t},(o,i)=>{let n=e.current[i];return n?n.offsetWidth:r})}function Z(t,e){return t.id??`${t.first}-${t.last}-${e}`}function yt(t){return [t.first,t.last].map(e=>e?.[0]).filter(e=>e!=null&&e!=="").join("")}function Tt(t){if(t.tooltip!==void 0)return t.tooltip===null?null:t.tooltip;let e=`${t.first||""} ${t.last||""}`.trim();return e!==""?e:null}function Rt({slotCount:t,anchorIndex:e,size:r,stackStep:o,gap:i,fanOutEnabled:n,compact:s}){let[a,c]=useState(false),[p,m]=useState(()=>Array.from({length:t},()=>r)),l=useRef(null),f=useRef([]),C=useRef(null),x=useCallback(()=>{let v=gt(t,f,r);m(g=>St(g,v)?g:v);},[t,r]),d=useCallback(()=>{C.current&&cancelAnimationFrame(C.current),C.current=requestAnimationFrame(x);},[x]),A=useMemo(()=>kt(t,e,p,i,o,r),[t,e,p,i,o,r]),y=useMemo(()=>xt(t,n&&a,A,o),[t,n,a,A,o]),S=useMemo(()=>Ct(t,o,r),[t,o,r]),O=useMemo(()=>At(t,A,p,S,r),[t,A,p,S,r]),k=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),c(true));},[n]),u=useCallback(()=>{n&&(l.current&&clearTimeout(l.current),l.current=setTimeout(()=>c(false),120));},[n]);useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]),useEffect(()=>{n||c(false);},[n]),useLayoutEffect(()=>{m(Array.from({length:t},()=>r));},[t,r]),useLayoutEffect(()=>{x();},[t,r,x]),useEffect(()=>(d(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d),C.current&&cancelAnimationFrame(C.current);}),[d]);let T=n&&a?O:s?r:S,b=n&&a,F=useMemo(()=>s?Array.from({length:t},(v,g)=>g===e||a?1:0):Array.from({length:t},()=>1),[s,t,e,a]);return {isHovering:a,handleMouseEnter:k,handleMouseLeave:u,slotRefs:f,translateX:y,slotOpacity:F,collapsedStackWidthPx:S,fannedRowWidthPx:O,trackWidth:T,hoverZIndexActive:b}}function H({items:t,children:e,maxItems:r,getItemKey:o,renderItem:i,renderOverflow:n,fanOutDirection:s,compact:a=false,"data-testid":c,sx:p,className:m,slotProps:l}){let f=Children.count(e)>0,{zIndex:C=1e3,size:x,stackStep:d,gap:A,minTrackWidth:y}=l?.layout??{},S=useMemo(()=>f?Children.toArray(e??null).length:t?.length??0,[f,e,t]),k=!(!a&&ht(S,r)),{size:u,stackStep:w,gap:T,minTrackWidth:b}=useMemo(()=>dt({size:x,stackStep:d,gap:A,minTrackWidth:y}),[x,d,A,y]),F=n??st,v=useMemo(()=>f?ft({children:e??null,maxItems:r,slotSize:u,renderOverflow:F}):!t?.length||!o||!i?[]:B({items:t,maxItems:r,getItemKey:o,renderItem:i,slotSize:u,renderOverflow:F}),[f,e,t,r,o,i,F,u]),g=v.length,Nt=useMemo(()=>ut(g,s),[g,s]),{handleMouseEnter:Et,handleMouseLeave:Mt,slotRefs:Wt,translateX:Lt,slotOpacity:tt,collapsedStackWidthPx:Kt,trackWidth:Vt,hoverZIndexActive:zt}=Rt({slotCount:g,anchorIndex:Nt,size:u,stackStep:w,gap:T,fanOutEnabled:k,compact:a});if(g===0)return null;let{sx:L,...Ht}=l?.shell??{},{style:Dt,...$t}=l?.track??{};return jsx(nt,{className:m,...Ht,sx:[{justifyContent:"flex-start",...k||a?{width:"100%"}:{}},...Array.isArray(p)?p:p!=null?[p]:[],...Array.isArray(L)?L:L!=null?[L]:[]],children:jsx(it,{"data-testid":c,...$t,style:Dt,onMouseEnter:k?Et:void 0,onMouseLeave:k?Mt:void 0,trackWidth:Vt,minTrackWidth:a?u:Math.max(b,Kt),slotSize:u,hoverZIndex:zt?C:void 0,children:v.map((et,R)=>jsx(motion.div,{ref:Xt=>{Wt.current[R]=Xt;},initial:false,animate:{x:Lt[R]??0,opacity:tt[R]??1},transition:{duration:.22,ease:"easeOut"},style:{position:"absolute",top:0,left:R*w,zIndex:R,width:u,height:u,pointerEvents:tt[R]===0?"none":"auto"},children:et.render()},et.key))})})}function oe({children:t,maxItems:e,renderOverflow:r,slotSize:o=24,sx:i,...n}){let s=useMemo(()=>ee.Children.toArray(t),[t]),{visibleItems:a,hiddenItems:c}=useMemo(()=>M(s,e),[s,e]),p=c.length>0,m=useMemo(()=>[{"--chip-stack-slot-size":`${o}px`},...Array.isArray(i)?i:i!=null?[i]:[]],[o,i]);if(!p)return jsx($,{"data-testid":"ChipStack",...n,sx:m,children:t});let l=r?.({items:s,overflowItems:c,size:o});return jsxs($,{"data-testid":"ChipStack",...n,sx:m,children:[a,l??jsx(K,{title:`${c.length} more`,children:jsxs("span",{children:["+",c.length]})})]})}var J=memo(oe);function ie(t){return jsx(ct,{"data-testid":"OverlapChip",...t})}var Q=memo(ie);var ce=["static","fanout-right","fanout-left","fanout-center"],Y="static";function pe(t){let{variant:e=Y,maxItems:r,renderOverflow:o,children:i,items:n,getItemKey:s,renderItem:a,compact:c=false,"data-testid":p,slotProps:m,sx:l,className:f}=t,C=Children.count(i??null)>0,x=!C&&(n?.length??0)>0&&s!=null&&a!=null,d=mt(e,C,x);if(d===null)return null;if(d==="static-children"||d==="static-items"){let S=m?.layout?.size??24;if(d==="static-items"&&n&&s&&a){let{visibleItems:O,hiddenItems:k}=M(n,r),u=k.length>0?o?.({items:n,overflowItems:k,size:S})??jsx(K,{title:`${k.length} more`,children:jsxs("span",{children:["+",k.length]})}):null,w=jsxs(Fragment,{children:[O.map((T,b)=>jsx(Q,{children:a(T,b,{slotSize:S})},s(T,b))),u]});return jsx(J,{"data-testid":p,slotSize:S,sx:l,className:f,children:w})}return jsx(J,{"data-testid":p,maxItems:r,renderOverflow:o,slotSize:S,sx:l,className:f,children:i})}let A=lt(e),y={maxItems:r,renderOverflow:o,fanOutDirection:A,compact:c,"data-testid":p??"ChipStack",slotProps:m,sx:l,className:f};return d==="animated-children"?jsx(H,{...y,children:i}):jsx(H,{...y,items:n,getItemKey:s,renderItem:a})}var wt=pe;function he({item:t,sourceIndex:e,slotSize:r}){let[o,i]=useState(false),n=useRef(null);useEffect(()=>{i(false);},[t.logo]);let s=!t.logo||o,a=Z(t,e),c="transparent";s&&(n.current?.key!==a&&(n.current={key:a,fill:Aa()}),c=n.current.fill);let p$1=jsx(pt,{faceSize:r,avatarFill:c,src:s?void 0:t.logo,slotProps:s?void 0:{img:{onError:()=>i(true)}},children:yt(t)}),m=Tt(t);return m!=null&&m!==""?jsx(p,{title:m,children:p$1}):p$1}var fe=he;var dr=wt;export{h as a,D as b,Z as c,Q as d,ce as e,Y as f,wt as g,fe as h,dr as i};
@@ -1 +1 @@
1
- import {j}from'./chunk-BP3HDL2F.js';import {g as g$1}from'./chunk-2SKLD6QR.js';import F from'react';import {useTranslation}from'react-i18next';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var T="37px",f=styled(a,{shouldForwardProp:o=>o!=="showBackDrop"&&o!=="areTotalRowsNotFillingHeight"&&o!=="sandboxMode"&&o!=="maximized"})(({theme:o,showBackDrop:i,areTotalRowsNotFillingHeight:r,sandboxMode:p,maximized:n})=>({minHeight:T,...!n&&{borderBottomLeftRadius:o.spacing(1.5),borderBottomRightRadius:o.spacing(1.5)},display:"flex",alignItems:"center",border:"none",justifyContent:"space-between",padding:"6px 32px",background:p?o.palette.common.lightOrange:o.palette.grey[300],backdropFilter:"blur(32px)",boxShadow:i?o.shadows[24]:"none",borderTop:r?`1px outset ${o.palette.grey[800]}`:"none",width:"100%",marginTop:"auto",flexShrink:0,cursor:"move"})),u=styled("div")(({theme:o})=>({position:"absolute",top:0,left:0,right:0,height:"1.5px",backgroundColor:o.palette.grey[300],boxShadow:`inset 0 1px 0 0 ${o.palette.grey[300]}`})),d=styled(a)(({theme:o})=>({borderRadius:"37.5px",border:"0.75px solid rgba(242, 242, 242, 0.70)",backgroundColor:o.palette.common.white,opacity:1,paddingInline:o.spacing(1),display:"flex",alignItems:"center",height:24,gap:"7px",maxWidth:"max-content"})),x=styled(j)(()=>({fontSize:"9px",fontWeight:400,lineHeight:"10.8px"})),g=styled(j)(()=>({fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px"}));styled(a)(()=>({display:"flex",gap:"3px",alignItems:"center"}));styled(a)(()=>({display:"flex",gap:"6px"}));styled("span")(()=>({fontWeight:400}));function R({totalCount:o,showBackDrop:i=false,showSeparator:r,sandboxMode:p,maximized:n,selectedCount:m,...y}){let{t:b}=useTranslation();return jsxs(f,{component:"footer","data-testid":"TableFooter",maximized:n??false,sandboxMode:p,showBackDrop:i,areTotalRowsNotFillingHeight:!!r,...y,children:[r&&jsx(u,{}),m?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("selected")}),jsx(g,{children:g$1(m)})]}):null,o||o===0?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("count")}),jsx(g,{children:g$1(o||0)})]}):null]})}var h=F.memo(R);var M=h;export{T as a,h as b,M as c};
1
+ import {j}from'./chunk-MN3K3WSB.js';import {g as g$1}from'./chunk-2SKLD6QR.js';import F from'react';import {useTranslation}from'react-i18next';import a from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var T="37px",f=styled(a,{shouldForwardProp:o=>o!=="showBackDrop"&&o!=="areTotalRowsNotFillingHeight"&&o!=="sandboxMode"&&o!=="maximized"})(({theme:o,showBackDrop:i,areTotalRowsNotFillingHeight:r,sandboxMode:p,maximized:n})=>({minHeight:T,...!n&&{borderBottomLeftRadius:o.spacing(1.5),borderBottomRightRadius:o.spacing(1.5)},display:"flex",alignItems:"center",border:"none",justifyContent:"space-between",padding:"6px 32px",background:p?o.palette.common.lightOrange:o.palette.grey[300],backdropFilter:"blur(32px)",boxShadow:i?o.shadows[24]:"none",borderTop:r?`1px outset ${o.palette.grey[800]}`:"none",width:"100%",marginTop:"auto",flexShrink:0,cursor:"move"})),u=styled("div")(({theme:o})=>({position:"absolute",top:0,left:0,right:0,height:"1.5px",backgroundColor:o.palette.grey[300],boxShadow:`inset 0 1px 0 0 ${o.palette.grey[300]}`})),d=styled(a)(({theme:o})=>({borderRadius:"37.5px",border:"0.75px solid rgba(242, 242, 242, 0.70)",backgroundColor:o.palette.common.white,opacity:1,paddingInline:o.spacing(1),display:"flex",alignItems:"center",height:24,gap:"7px",maxWidth:"max-content"})),x=styled(j)(()=>({fontSize:"9px",fontWeight:400,lineHeight:"10.8px"})),g=styled(j)(()=>({fontSize:"10.5px",fontWeight:700,lineHeight:"12.6px"}));styled(a)(()=>({display:"flex",gap:"3px",alignItems:"center"}));styled(a)(()=>({display:"flex",gap:"6px"}));styled("span")(()=>({fontWeight:400}));function R({totalCount:o,showBackDrop:i=false,showSeparator:r,sandboxMode:p,maximized:n,selectedCount:m,...y}){let{t:b}=useTranslation();return jsxs(f,{component:"footer","data-testid":"TableFooter",maximized:n??false,sandboxMode:p,showBackDrop:i,areTotalRowsNotFillingHeight:!!r,...y,children:[r&&jsx(u,{}),m?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("selected")}),jsx(g,{children:g$1(m)})]}):null,o||o===0?jsxs(d,{sx:{gap:"6px",cursor:"text"},children:[jsx(x,{children:b("count")}),jsx(g,{children:g$1(o||0)})]}):null]})}var h=F.memo(R);var M=h;export{T as a,h as b,M as c};
@@ -1,3 +1,3 @@
1
- import {p}from'./chunk-BP3HDL2F.js';import {yc}from'./chunk-2SKLD6QR.js';import {Bi}from'./chunk-OK75VWGZ.js';import {useState,useId}from'react';import T from'@mui/material/Skeleton';import i from'@mui/material/Box';import {styled,Box}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:12,border:"1.03px solid"})),c=styled(Box)`
1
+ import {p}from'./chunk-MN3K3WSB.js';import {yc}from'./chunk-2SKLD6QR.js';import {Bi}from'./chunk-OK75VWGZ.js';import {useState,useId}from'react';import T from'@mui/material/Skeleton';import i from'@mui/material/Box';import {styled,Box}from'@mui/material';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var h=styled(Box)(()=>({display:"flex",alignItems:"center",justifyContent:"center",borderRadius:12,border:"1.03px solid"})),c=styled(Box)`
2
2
  position: absolute;
3
3
  `;function d({mainIcon:B,overlayIcon:p$1,mainIconAlt:u="main icon",mainIconSize:t=20,containerSize:a=24,overlayPosition:b={top:10,left:17},borderColor:w="#F2F2F2",label:y="",sx:I,onError:W,containerSx:C}){let[e,s]=useState(true),F=yc(useId(),"icon-with-badge");return jsx(p,{title:y,children:jsx(i,{id:F,"data-testid":"IconWithBadge",display:"flex",alignItems:"center",gap:1,sx:{position:"relative",...C},children:jsxs(h,{style:{borderColor:w,width:a,height:a},children:[t&&e&&jsx(i,{width:t,height:t,children:e&&jsx(T,{variant:"circular",width:`${t}px`,height:`${t}px`})}),jsxs(Fragment,{children:[p$1&&jsx(c,{sx:b,children:p$1}),jsx(i,{width:t,height:t,component:"img",src:B||Bi,alt:u,sx:{borderRadius:"50%",objectFit:"scale-down",opacity:e?0:1,...I},onError:n=>{s(false),n.currentTarget.src=Bi,W?.(n);},onLoad:()=>{s(false);}})]})]})})})}var M=d;export{M as a};
@@ -1 +1 @@
1
- import {p}from'./chunk-BP3HDL2F.js';import {Va,yc,bb}from'./chunk-2SKLD6QR.js';import {Sk,ya,xa,wa,Qj}from'./chunk-OK75VWGZ.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:Va(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Sk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=yc(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${bb((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Qj:Qj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
1
+ import {p}from'./chunk-MN3K3WSB.js';import {Va,yc,bb}from'./chunk-2SKLD6QR.js';import {Sk,ya,xa,wa,Qj}from'./chunk-OK75VWGZ.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:Va(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Sk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=yc(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${bb((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Qj:Qj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
@@ -1 +1 @@
1
- import {j}from'./chunk-BP3HDL2F.js';import {styled,Box,Button}from'@mui/material';var d=styled(j)(({theme:o})=>{let{grey:r}=o.v2.palette;return {fontWeight:o.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:r[500],paddingInlineStart:o.v2.spacing(16),paddingTop:o.v2.spacing(8),paddingBottom:o.v2.spacing(8),paddingInlineEnd:o.v2.spacing(8),borderBottom:`1px solid ${r[100]}`}}),l=styled(Box)(({theme:o})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${o.palette.divider}`})),c=styled(Button)(({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}})),s=styled(Button)(({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"}}));export{d as a,l as b,c,s as d};
1
+ import {j}from'./chunk-MN3K3WSB.js';import {styled,Box,Button}from'@mui/material';var d=styled(j)(({theme:o})=>{let{grey:r}=o.v2.palette;return {fontWeight:o.v2.typography.fontWeightMedium,fontSize:"0.6875rem",color:r[500],paddingInlineStart:o.v2.spacing(16),paddingTop:o.v2.spacing(8),paddingBottom:o.v2.spacing(8),paddingInlineEnd:o.v2.spacing(8),borderBottom:`1px solid ${r[100]}`}}),l=styled(Box)(({theme:o})=>({padding:"8px 16px",display:"flex",gap:"8px",justifyContent:"center",position:"sticky",bottom:0,backgroundColor:"white",zIndex:99999,borderTop:`1px solid ${o.palette.divider}`})),c=styled(Button)(({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}})),s=styled(Button)(({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"}}));export{d as a,l as b,c,s as d};
@@ -1 +1 @@
1
- import {b}from'./chunk-GN4XV3KJ.js';import {yc}from'./chunk-2SKLD6QR.js';import {wi}from'./chunk-OK75VWGZ.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=yc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:wi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
1
+ import {b}from'./chunk-NT53XXH2.js';import {yc}from'./chunk-2SKLD6QR.js';import {wi}from'./chunk-OK75VWGZ.js';import {memo,useId,useState,useRef,useEffect}from'react';import {useTheme}from'@mui/material';import {motion,AnimatePresence}from'framer-motion';import {useTranslation}from'react-i18next';import K from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var h=styled(motion.input)(({theme:t})=>({padding:"8px",paddingRight:"24px",borderRadius:"4px",height:32,color:t.palette.text.primary,fontSize:"11px",outline:0,zIndex:10,background:t.palette.common.white,display:"flex",minWidth:0,flexGrow:1,boxShadow:`0px 0px 4px 0px ${t.palette.info.dark}80`,border:`1px solid ${t.palette.info.dark}`,"::placeholder":{color:"#D5D5D5"}})),x=styled(motion.img)(()=>({position:"absolute",zIndex:11,cursor:"pointer"})),I=styled(b)(()=>({minWidth:"auto",borderRadius:"4px",paddingInline:"8px",position:"relative",zIndex:11})),g=styled(K)(()=>({display:"flex",alignItems:"center",justifyContent:"flex-start",position:"relative",zIndex:3,height:32,gap:8}));function j({onSearchChange:t,placeholder:v,...b}){let w=yc(useId(),"search-button"),[e,p]=useState(false),[C,i]=useState(false),[r,l]=useState(""),c=useRef(null);useEffect(()=>{e&&c.current?.focus();},[e]);let{t:B}=useTranslation(),E=useTheme(),T=()=>{i(true),p(false),t?.(""),l("");},k=()=>{i(false),p(true),P();},P=()=>{r&&t?.(r);},R=a=>{a.key==="Enter"&&t?.(r);},z=a=>{l(a.currentTarget.value);},D={duration:.18,ease:"easeInOut"},W={duration:.05,ease:"easeIn"},A=e||C;return jsxs(g,{id:w,"data-testid":"SearchButton",children:[jsx(AnimatePresence,{initial:false,onExitComplete:()=>i(false),children:e&&jsxs(Fragment,{children:[jsx(h,{ref:c,initial:{width:30},animate:{width:200},exit:{width:30,border:`1px solid ${E.palette.divider}`,boxShadow:"none"},transition:D,style:{willChange:"width"},placeholder:v??(B("search")||""),onKeyDown:R,onChange:z}),jsx(x,{style:{right:48},initial:{opacity:1},exit:{opacity:0},transition:W,src:wi,alt:"close",onClick:T})]})}),jsx(I,{...b,variant:A?"active":"inActive",icon:"search",onClick:k})]})}var y=memo(j);var pt=y;export{pt as a};
@@ -1 +1 @@
1
- import {V,R}from'./chunk-BP3HDL2F.js';import {yc}from'./chunk-2SKLD6QR.js';import {vb}from'./chunk-OK75VWGZ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=yc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:vb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};
1
+ import {V,R}from'./chunk-MN3K3WSB.js';import {yc}from'./chunk-2SKLD6QR.js';import {vb}from'./chunk-OK75VWGZ.js';import {useId,useState,useRef,useMemo}from'react';import T from'@mui/material/Box';import {ClickAwayListener}from'@mui/material';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var h=styled("span")(()=>({fontSize:"11px"})),I=styled(V)(()=>({display:"flex",alignItems:"center",paddingInline:"16px",gap:"4px",borderBlock:"1px solid #F2F2F2",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),M=styled(V)(({theme:e})=>({color:e.palette.info.dark,backgroundColor:"#F4F4F4",fontWeight:600,paddingInline:"16px",fontSize:"11px",gap:"4px"})),k=styled(V)(()=>({gap:"2px",paddingInline:"16px",fontSize:"11px","&:hover":{backgroundColor:"#fff",boxShadow:"0px 0px 16px 0px #00000021"}})),A=styled("img")({marginLeft:"auto",width:16,height:12}),b=styled("img")({borderRadius:"2px",width:16,height:12,flexShrink:0}),w={marginTop:"8px",marginBottom:"8px",maxHeight:"190px",overflow:"auto"},P={zIndex:99999};function s({onCountriesChange:e,sx:L,selectedCountries:r,countriesOptions:i}){let B=yc(useId(),"country-filter"),[a,g]=useState(null),f=useRef(null),y=!!a,E=()=>{if(!y){g(f.current);return}d();},d=()=>{g(null);},z=t=>r?.includes(t)??false,u=t=>{e(t);},H=t=>{let o=r?.includes(t)?r?.filter(m=>m!==t):[...r??[],t];u(o),e(o);},x=useMemo(()=>r?.length===i.length,[r,i]);return jsx(ClickAwayListener,{onClickAway:d,children:jsxs(T,{ref:f,sx:L,id:B,"data-testid":"CountryFilter",children:[jsx(T,{children:jsxs(I,{onMouseEnter:t=>{t.stopPropagation(),E();},startAdornment:null,children:[jsx(h,{children:"Country"}),jsx(A,{src:vb,alt:""})]})}),jsxs(R,{open:y,anchorEl:a,sx:w,placement:"right-start",popperSx:P,children:[jsx(M,{onClick:t=>{t.stopPropagation(),x?(u([]),e([])):(u(i.map(({value:o})=>o)),e(i.map(({value:o})=>o)));},isSelected:x,children:x?"Unselect All":"Select All"}),i.map(({value:t,label:o,icon:m})=>jsxs(k,{isSelected:z(t),onClick:()=>H(t),children:[jsx(b,{src:m,alt:""}),o]},t))]})]})})}var tt=s;export{s as a,tt as b};
@@ -1 +1 @@
1
- import'./chunk-DWNEP3PD.js';import {P,O as O$1}from'./chunk-BP3HDL2F.js';import {yc}from'./chunk-2SKLD6QR.js';import {memo,useId,useState,useEffect}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var f="32px";var g=styled(p,{shouldForwardProp:e=>e!=="isMaximized"})(({theme:e,isMaximized:i})=>({background:alpha(e.palette.common.white,.7),backdropFilter:"blur(8px)",width:183,position:"sticky",padding:"16px 8px",paddingTop:i?f:"16px",height:"100%",overflow:"auto"})),b=styled(p)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),S=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:i?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),h=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"#FFFFFF":"transparent",borderRadius:"4px",padding:"4px 8px",color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),B=styled(P)(({theme:e})=>({background:"transparent",border:"none !important",borderRadius:"4px !important",[`& .${O$1.summary}`]:{padding:0,paddingRight:e.spacing(1),minHeight:"40px",height:"40px","&.Mui-expanded":{minHeight:"40px",height:"40px"},marginBottom:4,borderRadius:"4px !important"},[`& .${O$1.content}`]:{borderTop:"none",padding:0}}));function w({sections:e,isMaximized:i,onClick:m,activeSection:A,activeSubSection:k}){let I=yc(useId(),"expandable-side-bar"),r=A||e?.[0]?.id,F=k||e?.[0]?.subSections?.[0]?.id,[C,c]=useState({});return useEffect(()=>{e?.length&&c(t=>{let o=false,d={...t};for(let x of e)x.id in d||(d[x.id]=r===x.id,o=true);return o?d:t});},[e,r]),useEffect(()=>{r&&c(t=>({...t,[r]:true}));},[r]),jsx(g,{isMaximized:i,id:I,"data-testid":"ExpandableSideBar",children:jsx(b,{children:e?.map(t=>jsx(B,{expanded:C[t.id]??false,onChange:o=>c(d=>({...d,[t.id]:o})),slotProps:{root:{component:"section"}},label:jsx(h,{onClick:()=>{m?.(t.id,t.subSections?.[0]?.id);},isActive:r===t.id,children:t.title}),content:jsx(Fragment,{children:t.subSections?.map(o=>jsx(S,{onClick:()=>{m?.(t.id,o.id);},isActive:F===o.id,children:o.title},`${t.id}-${o.id}`))})},`${t.id}`))})})}var E=memo(w);var O=E;export{O as a};
1
+ import'./chunk-GUMVHBNF.js';import {P,O as O$1}from'./chunk-MN3K3WSB.js';import {yc}from'./chunk-2SKLD6QR.js';import {memo,useId,useState,useEffect}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var f="32px";var g=styled(p,{shouldForwardProp:e=>e!=="isMaximized"})(({theme:e,isMaximized:i})=>({background:alpha(e.palette.common.white,.7),backdropFilter:"blur(8px)",width:183,position:"sticky",padding:"16px 8px",paddingTop:i?f:"16px",height:"100%",overflow:"auto"})),b=styled(p)(()=>({display:"flex",flexDirection:"column",gap:"8px"})),S=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:i?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),h=styled(p,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:i})=>({background:i?"#FFFFFF":"transparent",borderRadius:"4px",padding:"4px 8px",color:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer",fontWeight:600})),B=styled(P)(({theme:e})=>({background:"transparent",border:"none !important",borderRadius:"4px !important",[`& .${O$1.summary}`]:{padding:0,paddingRight:e.spacing(1),minHeight:"40px",height:"40px","&.Mui-expanded":{minHeight:"40px",height:"40px"},marginBottom:4,borderRadius:"4px !important"},[`& .${O$1.content}`]:{borderTop:"none",padding:0}}));function w({sections:e,isMaximized:i,onClick:m,activeSection:A,activeSubSection:k}){let I=yc(useId(),"expandable-side-bar"),r=A||e?.[0]?.id,F=k||e?.[0]?.subSections?.[0]?.id,[C,c]=useState({});return useEffect(()=>{e?.length&&c(t=>{let o=false,d={...t};for(let x of e)x.id in d||(d[x.id]=r===x.id,o=true);return o?d:t});},[e,r]),useEffect(()=>{r&&c(t=>({...t,[r]:true}));},[r]),jsx(g,{isMaximized:i,id:I,"data-testid":"ExpandableSideBar",children:jsx(b,{children:e?.map(t=>jsx(B,{expanded:C[t.id]??false,onChange:o=>c(d=>({...d,[t.id]:o})),slotProps:{root:{component:"section"}},label:jsx(h,{onClick:()=>{m?.(t.id,t.subSections?.[0]?.id);},isActive:r===t.id,children:t.title}),content:jsx(Fragment,{children:t.subSections?.map(o=>jsx(S,{onClick:()=>{m?.(t.id,o.id);},isActive:F===o.id,children:o.title},`${t.id}-${o.id}`))})},`${t.id}`))})})}var E=memo(w);var O=E;export{O as a};
@@ -1 +1 @@
1
- import {c,d}from'./chunk-BKOLKFWT.js';import {a,c as c$1,d as d$1}from'./chunk-LOQ3FEOU.js';import {b,a as a$1}from'./chunk-EDZWCPS2.js';import {yc,xa}from'./chunk-2SKLD6QR.js';import {Gf}from'./chunk-OK75VWGZ.js';import {createContext,memo,useRef,useId,useContext,useMemo,useState,useLayoutEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import pt from'@mui/material/Box';import {Resizable}from're-resizable';import lt from'react-draggable';import {motion}from'framer-motion';var Z=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,viewportWidth:0,viewportHeight:0,resizableRef:{current:null},updateRefSize:()=>{},updateSize:()=>{},containerRef:{current:null}});var he=(e,t)=>t.toLowerCase().includes(e);function we(e,t,i){let n=he("top",t),r=he("left",t);return !n&&!r?null:{x:r?e.x+i.width:e.x,y:n?e.y-i.height:e.y}}var be=e=>{let{viewportWidth:t,viewportHeight:i,viewerDefaultWidth:n,viewerDefaultHeight:r,initialPosition:d,isMaximized:l,containerRef:a}=e,s=!l&&a?.current&&a.current!==document.body?a.current:null,p=s?.getBoundingClientRect(),u=p?.left??0,f=p?.top??0,m=s?.clientWidth||t,c=d?.x??t/2-n/2,o=d?.y??i/2-r/2;return {x:m-(c-u),y:o-f}};var Ue=555,je=545;function te({children:e,isOpen:t,onClose:i,defaultWindowHeight:n,defaultWindowWidth:r,initialPosition:d,minWidth:l,maxWidth:a,minHeight:s,maxHeight:p,containerRef:u,windowZIndex:f=1}){let {height:m,width:c}=a$1(),[o,M]=useState(false),B=o?null:u?.current,A=B?.clientWidth||c,b=B?.clientHeight||m,I=r||Ue,g=n||je;useRef(false);let [k,H]=useState(()=>be({viewportWidth:c,viewportHeight:m,viewerDefaultWidth:I,viewerDefaultHeight:g,initialPosition:d,isMaximized:o,containerRef:u})),[L,_]=useState(false),[F,S]=useState(false),[E,P]=useState(true),x=useRef(),[G,z]=useState({width:r??0,height:n??0}),O=useCallback(W=>{x?.current?.updateSize(W);},[]),V=useCallback(W=>{x.current?.updateSize(W),z(D=>({width:W.width??D.width,height:W.height??D.height}));},[]),ee=useMemo(()=>({position:k,setPosition:H,resizableRef:x,windowZIndex:f,isOpen:t,setIsMaximized:M,setIsSidebarExpanded:P,setIsToolbarAnimationDisabled:S,setIsResized:_,isMaximized:o,isToolbarAnimationDisabled:F,isSidebarExpanded:E,isResized:L,dimensions:G,setNewDimensions:z,viewerDefaultWidth:I,viewerDefaultHeight:g,onClose:i,fullWindowWidth:A,fullWindowHeight:b,viewportWidth:c,viewportHeight:m,updateRefSize:O,updateSize:V,minWidth:l,maxWidth:a,minHeight:s,maxHeight:p,containerRef:u}),[k,H,x,t,M,P,S,_,o,F,E,L,G,z,A,b,c,m,I,g,O,V,i,l,a,s,p,u,f]);return jsx(Z.Provider,{value:ee,children:e})}var R=.5,He=183,ve=287,ye=840,Re=545,oe=35;function Ke({title:e,onClose:t,onMaximize:i,maximized:n=false,id:r,onRequestClick:d$2,isSidebarExpanded:l=false,isHovered:a$1=false,onMouseHover:s,onMouseLeave:p,showSectionsButton:u,rightActions:f,icon:m}){return jsx(c,{id:r,"data-testid":"UserTitleBar",maximized:n||false,children:jsx(d,{onMouseEnter:s,onMouseLeave:p,isMaximized:n,isHovered:a$1,title:e,icon:m||Gf,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:n,onClick:i}),u&&jsx(d$1,{onClick:d$2,isExpanded:!l,isHovered:a$1,children:"Sidebar"})]}),rightActions:f})})}var Ae=memo(Ke);var ie=Ae;function Qe({isMaximized:e,setIsToolbarAnimationDisabled:t,setIsMaximized:i,onClose:n,isSidebarExpanded:r,setIsSidebarExpanded:d,isToolbarAnimationDisabled:l,title:a,showSectionsButton:s,rightActions:p,icon:u}){let{isHovered:f,onMouseEnter:m,onMouseLeave:c}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...l&&{duration:0}},children:jsx(ie,{title:a||"Users",showSectionsButton:s,onClose:n,onMaximize:()=>{i?.(o=>!o),t?.(true),setTimeout(()=>{t?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{t?.(false),d(!r);},isSidebarExpanded:r,isHovered:f,onMouseHover:m,onMouseLeave:c,rightActions:p,icon:u})})}var Se=memo(Qe);var Ee=Se;function ut({children:e,titleBar:t,titleBarText:i,mainAppOrder:n,mainAppIsMinimized:r,showSectionsButton:d=true,rightActions:l,titleBarIcon:a,overflow:s="hidden"}){let p=useRef(null),u=yc(useId(),"app-window"),{dimensions:f,position:m,resizableRef:c,isMaximized:o,isOpen:M,onClose:B,viewerDefaultWidth:A,viewerDefaultHeight:b,windowZIndex:I,setPosition:g,setNewDimensions:Q,isToolbarAnimationDisabled:k,fullWindowWidth:H,fullWindowHeight:L,viewportWidth:_,viewportHeight:F,setIsMaximized:S,setIsResized:E,isResized:P,setIsToolbarAnimationDisabled:x,setIsSidebarExpanded:G,isSidebarExpanded:z,minWidth:O,maxWidth:V,minHeight:ee,maxHeight:W,containerRef:D}=useContext(Z),h=useMemo(()=>document.createElement("div"),[]),[Le,_e]=useState(null);useLayoutEffect(()=>{_e(D?.current??document.body);},[D]);let w=o?document.body:Le;useLayoutEffect(()=>{if(!w)return;let v=w===document.body;return h.style.position=v?"":"absolute",h.style.inset=v?"":"0",h.style.pointerEvents="none",h.style.overflow="visible",w.appendChild(h),()=>{h.parentNode===w&&w.removeChild(h);}},[w,h]);let se=useRef({x:0,y:0}),pe=xa(),Fe=useCallback((v,U,de,Oe)=>{E(true),Q({width:de.offsetWidth,height:de.offsetHeight});let le=we(se.current,U,Oe);le&&g(le);},[Q,E,g]),N=f.width||A;if(!w)return null;let Ge=jsx(lt,{nodeRef:p,disabled:o,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:H/2-N/2,y:L/2-b/2},position:{x:H-m.x,y:m.y},onStop:(v,U)=>{g({x:H-U.x,y:U.y});},...w===document.body&&{bounds:{top:10}},children:jsx(Dialog,{ref:p,sx:{backgroundColor:"transparent",pointerEvents:"none",zIndex:Number(n||0)+I+(o?1:0),...r&&{display:"none"},...w===document.body?!o&&{transform:"translate(180px, 14px)"}:!o&&{position:"absolute"},...!o&&{width:pe?N:"fit-content",height:pe?b:"fit-content"},...o&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)",overflow:"visible","& .MuiDialog-container":{overflow:"visible"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",pointerEvents:"auto",overflow:s,width:P?"fit-content":N,height:P?"fit-content":"100%",...o&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{S(false),x(true),setTimeout(()=>{x(false);},.5*1e3);},open:M,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:h,fullScreen:o,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{bottom:{zIndex:2},bottomLeft:{zIndex:2},bottomRight:{zIndex:2}},size:{width:f.width,height:f.height},maxHeight:W??F-40,maxWidth:V??_,minWidth:o?"100vw":O??A,minHeight:o?"100vh":ee??b,ref:v=>{c.current=v;},onResizeStart:()=>{se.current=m,x(true);},onResizeStop:()=>{x(false);},onResize:Fe,defaultSize:{width:N,height:b},style:{background:"transparent",height:f.height,overflow:s,...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}},children:jsxs(pt,{sx:{height:"100%"},id:u,"data-testid":"AppWindow",children:[t??jsx(Ee,{setIsToolbarAnimationDisabled:x,onClose:B,setIsMaximized:S,isToolbarAnimationDisabled:k,setIsSidebarExpanded:G,isSidebarExpanded:z,title:i,isMaximized:o,showSectionsButton:d,rightActions:l,icon:a}),e]})})})});return createPortal(Ge,h)}var De=memo(ut);var ct=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),xt=styled(Button)(({theme:e,disabled:t})=>({background:t?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),ht=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),wt=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),bt=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var re=De;function gt({children:e,windowProps:t,...i}){return i.isOpen?jsx(te,{...i,children:jsx(re,{...t,children:e})}):null}var Me=gt;function Ht({title:e,maximized:t=false,id:i,isHovered:n=false,onMouseHover:r,onMouseLeave:d$1,leftActions:l,titleIconSrc:a,sx:s,...p}){return jsx(c,{className:"header-wrapper",id:i,maximized:t||false,sx:s,...p,children:jsx(d,{onMouseEnter:r,onMouseLeave:d$1,isMaximized:t,isHovered:n,title:e||"",icon:a,leftActions:l})})}var ae=memo(Ht);function Rt({isMaximized:e,id:t,isToolbarAnimationDisabled:i,title:n,leftActions:r,onClose:d,onMaximize:l,sx:a$1}){let{isHovered:s,onMouseEnter:p,onMouseLeave:u}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...i&&{duration:0}},children:jsx(ae,{title:n,maximized:e,id:t||"draggable-dialog-title",isHovered:s,onMouseHover:p,onMouseLeave:u,leftActions:r||jsxs(Fragment,{children:[jsx(a,{onClick:d}),jsx(c$1,{isMaximized:e,onClick:()=>l?.(!e)})]}),sx:a$1})})}var ke=memo(Rt);var St=ke;var qo=Me;export{Z as a,te as b,R as c,He as d,ve as e,ye as f,Re as g,oe as h,ie as i,ct as j,xt as k,ht as l,wt as m,bt as n,re as o,ae as p,St as q,qo as r};
1
+ import {c,d}from'./chunk-QX4JO7AK.js';import {a,c as c$1,d as d$1}from'./chunk-LOQ3FEOU.js';import {b,a as a$1}from'./chunk-EDZWCPS2.js';import {yc,xa}from'./chunk-2SKLD6QR.js';import {Gf}from'./chunk-OK75VWGZ.js';import {createContext,memo,useRef,useId,useContext,useMemo,useState,useLayoutEffect,useCallback}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {createPortal}from'react-dom';import {styled,Box,Button,alpha,Dialog}from'@mui/material';import pt from'@mui/material/Box';import {Resizable}from're-resizable';import lt from'react-draggable';import {motion}from'framer-motion';var Z=createContext({viewerDefaultWidth:555,viewerDefaultHeight:545,position:{x:0,y:0},setPosition:()=>{},dimensions:{width:0,height:0},windowZIndex:1e4,isOpen:true,setIsMaximized:()=>{},setIsSidebarExpanded:()=>{},setIsToolbarAnimationDisabled:()=>{},setIsResized:()=>{},setNewDimensions:()=>{},isMaximized:false,isToolbarAnimationDisabled:true,isSidebarExpanded:false,isResized:false,onClose:()=>{},fullWindowWidth:0,fullWindowHeight:0,viewportWidth:0,viewportHeight:0,resizableRef:{current:null},updateRefSize:()=>{},updateSize:()=>{},containerRef:{current:null}});var he=(e,t)=>t.toLowerCase().includes(e);function we(e,t,i){let n=he("top",t),r=he("left",t);return !n&&!r?null:{x:r?e.x+i.width:e.x,y:n?e.y-i.height:e.y}}var be=e=>{let{viewportWidth:t,viewportHeight:i,viewerDefaultWidth:n,viewerDefaultHeight:r,initialPosition:d,isMaximized:l,containerRef:a}=e,s=!l&&a?.current&&a.current!==document.body?a.current:null,p=s?.getBoundingClientRect(),u=p?.left??0,f=p?.top??0,m=s?.clientWidth||t,c=d?.x??t/2-n/2,o=d?.y??i/2-r/2;return {x:m-(c-u),y:o-f}};var Ue=555,je=545;function te({children:e,isOpen:t,onClose:i,defaultWindowHeight:n,defaultWindowWidth:r,initialPosition:d,minWidth:l,maxWidth:a,minHeight:s,maxHeight:p,containerRef:u,windowZIndex:f=1}){let {height:m,width:c}=a$1(),[o,M]=useState(false),B=o?null:u?.current,A=B?.clientWidth||c,b=B?.clientHeight||m,I=r||Ue,g=n||je;useRef(false);let [k,H]=useState(()=>be({viewportWidth:c,viewportHeight:m,viewerDefaultWidth:I,viewerDefaultHeight:g,initialPosition:d,isMaximized:o,containerRef:u})),[L,_]=useState(false),[F,S]=useState(false),[E,P]=useState(true),x=useRef(),[G,z]=useState({width:r??0,height:n??0}),O=useCallback(W=>{x?.current?.updateSize(W);},[]),V=useCallback(W=>{x.current?.updateSize(W),z(D=>({width:W.width??D.width,height:W.height??D.height}));},[]),ee=useMemo(()=>({position:k,setPosition:H,resizableRef:x,windowZIndex:f,isOpen:t,setIsMaximized:M,setIsSidebarExpanded:P,setIsToolbarAnimationDisabled:S,setIsResized:_,isMaximized:o,isToolbarAnimationDisabled:F,isSidebarExpanded:E,isResized:L,dimensions:G,setNewDimensions:z,viewerDefaultWidth:I,viewerDefaultHeight:g,onClose:i,fullWindowWidth:A,fullWindowHeight:b,viewportWidth:c,viewportHeight:m,updateRefSize:O,updateSize:V,minWidth:l,maxWidth:a,minHeight:s,maxHeight:p,containerRef:u}),[k,H,x,t,M,P,S,_,o,F,E,L,G,z,A,b,c,m,I,g,O,V,i,l,a,s,p,u,f]);return jsx(Z.Provider,{value:ee,children:e})}var R=.5,He=183,ve=287,ye=840,Re=545,oe=35;function Ke({title:e,onClose:t,onMaximize:i,maximized:n=false,id:r,onRequestClick:d$2,isSidebarExpanded:l=false,isHovered:a$1=false,onMouseHover:s,onMouseLeave:p,showSectionsButton:u,rightActions:f,icon:m}){return jsx(c,{id:r,"data-testid":"UserTitleBar",maximized:n||false,children:jsx(d,{onMouseEnter:s,onMouseLeave:p,isMaximized:n,isHovered:a$1,title:e,icon:m||Gf,leftActions:jsxs(Fragment,{children:[jsx(a,{onClick:t}),jsx(c$1,{isMaximized:n,onClick:i}),u&&jsx(d$1,{onClick:d$2,isExpanded:!l,isHovered:a$1,children:"Sidebar"})]}),rightActions:f})})}var Ae=memo(Ke);var ie=Ae;function Qe({isMaximized:e,setIsToolbarAnimationDisabled:t,setIsMaximized:i,onClose:n,isSidebarExpanded:r,setIsSidebarExpanded:d,isToolbarAnimationDisabled:l,title:a,showSectionsButton:s,rightActions:p,icon:u}){let{isHovered:f,onMouseEnter:m,onMouseLeave:c}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...l&&{duration:0}},children:jsx(ie,{title:a||"Users",showSectionsButton:s,onClose:n,onMaximize:()=>{i?.(o=>!o),t?.(true),setTimeout(()=>{t?.(false);},.5*1e3);},maximized:e,id:"draggable-dialog-title",onRequestClick:()=>{t?.(false),d(!r);},isSidebarExpanded:r,isHovered:f,onMouseHover:m,onMouseLeave:c,rightActions:p,icon:u})})}var Se=memo(Qe);var Ee=Se;function ut({children:e,titleBar:t,titleBarText:i,mainAppOrder:n,mainAppIsMinimized:r,showSectionsButton:d=true,rightActions:l,titleBarIcon:a,overflow:s="hidden"}){let p=useRef(null),u=yc(useId(),"app-window"),{dimensions:f,position:m,resizableRef:c,isMaximized:o,isOpen:M,onClose:B,viewerDefaultWidth:A,viewerDefaultHeight:b,windowZIndex:I,setPosition:g,setNewDimensions:Q,isToolbarAnimationDisabled:k,fullWindowWidth:H,fullWindowHeight:L,viewportWidth:_,viewportHeight:F,setIsMaximized:S,setIsResized:E,isResized:P,setIsToolbarAnimationDisabled:x,setIsSidebarExpanded:G,isSidebarExpanded:z,minWidth:O,maxWidth:V,minHeight:ee,maxHeight:W,containerRef:D}=useContext(Z),h=useMemo(()=>document.createElement("div"),[]),[Le,_e]=useState(null);useLayoutEffect(()=>{_e(D?.current??document.body);},[D]);let w=o?document.body:Le;useLayoutEffect(()=>{if(!w)return;let v=w===document.body;return h.style.position=v?"":"absolute",h.style.inset=v?"":"0",h.style.pointerEvents="none",h.style.overflow="visible",w.appendChild(h),()=>{h.parentNode===w&&w.removeChild(h);}},[w,h]);let se=useRef({x:0,y:0}),pe=xa(),Fe=useCallback((v,U,de,Oe)=>{E(true),Q({width:de.offsetWidth,height:de.offsetHeight});let le=we(se.current,U,Oe);le&&g(le);},[Q,E,g]),N=f.width||A;if(!w)return null;let Ge=jsx(lt,{nodeRef:p,disabled:o,handle:"#draggable-dialog-title",cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",defaultPosition:{x:H/2-N/2,y:L/2-b/2},position:{x:H-m.x,y:m.y},onStop:(v,U)=>{g({x:H-U.x,y:U.y});},...w===document.body&&{bounds:{top:10}},children:jsx(Dialog,{ref:p,sx:{backgroundColor:"transparent",pointerEvents:"none",zIndex:Number(n||0)+I+(o?1:0),...r&&{display:"none"},...w===document.body?!o&&{transform:"translate(180px, 14px)"}:!o&&{position:"absolute"},...!o&&{width:pe?N:"fit-content",height:pe?b:"fit-content"},...o&&{transform:"none !important"},boxShadow:"0px 0px 20px 0px rgba(0, 0, 0, 0.15)",overflow:"visible","& .MuiDialog-container":{overflow:"visible"}},PaperProps:{style:{margin:0,maxHeight:"100%",maxWidth:"none",background:"transparent",pointerEvents:"auto",overflow:s,width:P?"fit-content":N,height:P?"fit-content":"100%",...o&&{width:"100%",height:"100%"},position:"relative"}},onClose:()=>{S(false),x(true),setTimeout(()=>{x(false);},.5*1e3);},open:M,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:h,fullScreen:o,"aria-labelledby":"draggable-dialog-title",disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{bottom:{zIndex:2},bottomLeft:{zIndex:2},bottomRight:{zIndex:2}},size:{width:f.width,height:f.height},maxHeight:W??F-40,maxWidth:V??_,minWidth:o?"100vw":O??A,minHeight:o?"100vh":ee??b,ref:v=>{c.current=v;},onResizeStart:()=>{se.current=m,x(true);},onResizeStop:()=>{x(false);},onResize:Fe,defaultSize:{width:N,height:b},style:{background:"transparent",height:f.height,overflow:s,...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}},children:jsxs(pt,{sx:{height:"100%"},id:u,"data-testid":"AppWindow",children:[t??jsx(Ee,{setIsToolbarAnimationDisabled:x,onClose:B,setIsMaximized:S,isToolbarAnimationDisabled:k,setIsSidebarExpanded:G,isSidebarExpanded:z,title:i,isMaximized:o,showSectionsButton:d,rightActions:l,icon:a}),e]})})})});return createPortal(Ge,h)}var De=memo(ut);var ct=styled(Box,{shouldForwardProp:e=>e!=="isActive"})(({theme:e,isActive:t})=>({background:t?"linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)":"transparent",borderRadius:"4px",padding:"4px 8px",color:t?e.palette.common.white:e.palette.text.primary,fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",cursor:"pointer"})),xt=styled(Button)(({theme:e,disabled:t})=>({background:t?alpha(e.palette.info.dark,.4):e.palette.info.dark,color:e.palette.common.white,padding:"0px 8px",fontSize:"9px",fontWeight:600,height:"24px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"4px",textTransform:"none","&:hover":{background:e.palette.info.dark,opacity:.8},"&.Mui-disabled":{color:e.palette.common.white}})),ht=styled(Box)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"8px",backgroundColor:e.palette.background.paper,padding:"6px",transform:"translateY(calc(-50% - 6px))",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:"4px",height:"36px",transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex})})),wt=styled(Box)(()=>({position:"fixed",height:35,bottom:0,left:0,right:0,padding:"6px 16px",zIndex:1,backgroundColor:"#eaeaea",backdropFilter:"blur(12px)",display:"flex",justifyContent:"flex-end",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px"})),bt=styled(Button)(()=>({padding:"4px 8px",boxShadow:"0px 0px 4px 0px rgba(0, 0, 0, 0.08)",display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",color:"rgba(32, 35, 43, 0.80)",fontWeight:600,fontSize:"9px",textTransform:"none"}));var re=De;function gt({children:e,windowProps:t,...i}){return i.isOpen?jsx(te,{...i,children:jsx(re,{...t,children:e})}):null}var Me=gt;function Ht({title:e,maximized:t=false,id:i,isHovered:n=false,onMouseHover:r,onMouseLeave:d$1,leftActions:l,titleIconSrc:a,sx:s,...p}){return jsx(c,{className:"header-wrapper",id:i,maximized:t||false,sx:s,...p,children:jsx(d,{onMouseEnter:r,onMouseLeave:d$1,isMaximized:t,isHovered:n,title:e||"",icon:a,leftActions:l})})}var ae=memo(Ht);function Rt({isMaximized:e,id:t,isToolbarAnimationDisabled:i,title:n,leftActions:r,onClose:d,onMaximize:l,sx:a$1}){let{isHovered:s,onMouseEnter:p,onMouseLeave:u}=b();return jsx(motion.div,{style:{...e&&{height:0,zIndex:1e3,position:"relative"}},animate:{...e&&{width:"100vw"},...!e&&{transform:"translateX(0px)",width:"100%"}},transition:{duration:.5,...i&&{duration:0}},children:jsx(ae,{title:n,maximized:e,id:t||"draggable-dialog-title",isHovered:s,onMouseHover:p,onMouseLeave:u,leftActions:r||jsxs(Fragment,{children:[jsx(a,{onClick:d}),jsx(c$1,{isMaximized:e,onClick:()=>l?.(!e)})]}),sx:a$1})})}var ke=memo(Rt);var St=ke;var qo=Me;export{Z as a,te as b,R as c,He as d,ve as e,ye as f,Re as g,oe as h,ie as i,ct as j,xt as k,ht as l,wt as m,bt as n,re as o,ae as p,St as q,qo as r};