@tap-payments/os-micro-frontend-shared 0.3.287 → 0.3.289-test.1794846477

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 (191) hide show
  1. package/build/_chunks/{chunk-2IOTEGXO.js → chunk-2M6UER6N.js} +1 -1
  2. package/build/_chunks/{chunk-XYMZXP5A.js → chunk-47BHPSSP.js} +1 -1
  3. package/build/_chunks/{chunk-6GZFEPN6.js → chunk-4NLQZJVN.js} +1 -1
  4. package/build/_chunks/{chunk-VBB5WMVK.js → chunk-5KGT5D5O.js} +1 -1
  5. package/build/_chunks/{chunk-CZZIV6U2.js → chunk-64OLTOQM.js} +1 -1
  6. package/build/_chunks/{chunk-NNMPGGZY.js → chunk-6WI5CW2I.js} +1 -1
  7. package/build/_chunks/{chunk-OR22XGAD.js → chunk-6YAUL2OM.js} +1 -1
  8. package/build/_chunks/{chunk-7LVGFAVY.js → chunk-72FD3NW2.js} +1 -1
  9. package/build/_chunks/{chunk-RI3HCTED.js → chunk-7GJ5PPIY.js} +1 -1
  10. package/build/_chunks/{chunk-N2WU3HEH.js → chunk-7UCD3KUZ.js} +1 -1
  11. package/build/_chunks/{chunk-DO5LOF3O.js → chunk-7VUU5WEU.js} +1 -1
  12. package/build/_chunks/{chunk-YHRFQZCJ.js → chunk-A2SC5BOB.js} +1 -1
  13. package/build/_chunks/{chunk-RSIJKVO6.js → chunk-AE4JYS7U.js} +1 -1
  14. package/build/_chunks/{chunk-NQGK2Q5L.js → chunk-AMOFAS7L.js} +1 -1
  15. package/build/_chunks/{chunk-FYZLPKZJ.js → chunk-AXJZMO7Q.js} +1 -1
  16. package/build/_chunks/{chunk-3HYMTOAJ.js → chunk-BQ46OLDY.js} +1 -1
  17. package/build/_chunks/{chunk-J5Y23R6K.js → chunk-C2RHW4FN.js} +1 -1
  18. package/build/_chunks/{chunk-ZERM22LM.js → chunk-CIB4WTBC.js} +1 -1
  19. package/build/_chunks/{chunk-B7SIZBZ4.js → chunk-CNYQ4OI5.js} +1 -1
  20. package/build/_chunks/{chunk-PPHYI47H.js → chunk-D52IZHFQ.js} +1 -1
  21. package/build/_chunks/{chunk-JK5C4QAJ.js → chunk-DKBPLNEE.js} +1 -1
  22. package/build/_chunks/{chunk-AI4TRR5F.js → chunk-DN33IHNY.js} +1 -1
  23. package/build/_chunks/chunk-EP5VELEJ.js +1 -0
  24. package/build/_chunks/{chunk-MZBS2I4P.js → chunk-GVXTYXRO.js} +1 -1
  25. package/build/_chunks/{chunk-U2D7PCC4.js → chunk-HPDPFVUQ.js} +1 -1
  26. package/build/_chunks/{chunk-2SZKMLBQ.js → chunk-HRQGL7NO.js} +1 -1
  27. package/build/_chunks/{chunk-D7SCPBNH.js → chunk-HZYY6NMO.js} +1 -1
  28. package/build/_chunks/{chunk-LDCRZFUN.js → chunk-JMPFZOV3.js} +1 -1
  29. package/build/_chunks/{chunk-LR6FBC7S.js → chunk-JUEXC7Z2.js} +1 -1
  30. package/build/_chunks/{chunk-UY75PFQ7.js → chunk-KFBXVUQ5.js} +1 -1
  31. package/build/_chunks/{chunk-JRADYN3S.js → chunk-L42ISYQY.js} +1 -1
  32. package/build/_chunks/{chunk-3M7YAX7A.js → chunk-LECTWR74.js} +1 -1
  33. package/build/_chunks/{chunk-UENR5XJD.js → chunk-MLZ63M2D.js} +1 -1
  34. package/build/_chunks/{chunk-JDSJDVQK.js → chunk-MSEBSRXG.js} +1 -1
  35. package/build/_chunks/{chunk-YI5J4DCB.js → chunk-MTACYUU3.js} +1 -1
  36. package/build/_chunks/{chunk-IBVECU2A.js → chunk-NDRHRXAO.js} +2 -2
  37. package/build/_chunks/{chunk-4UPB4XII.js → chunk-NHAXRGPW.js} +1 -1
  38. package/build/_chunks/{chunk-WRJLCKDU.js → chunk-OCHPXIEK.js} +1 -1
  39. package/build/_chunks/{chunk-MLJHEMAE.js → chunk-OHN7F4WA.js} +1 -1
  40. package/build/_chunks/{chunk-JKW2LY7R.js → chunk-OSXKJYUX.js} +1 -1
  41. package/build/_chunks/{chunk-XYGYT5QV.js → chunk-PL5M3LK2.js} +1 -1
  42. package/build/_chunks/{chunk-MGKZHRIG.js → chunk-PNRVZNL7.js} +1 -1
  43. package/build/_chunks/{chunk-7K7NRYXI.js → chunk-PUI6B7OY.js} +1 -1
  44. package/build/_chunks/chunk-PYE5IO3O.js +1 -0
  45. package/build/_chunks/{chunk-ONSPUGYN.js → chunk-RFA33XQQ.js} +1 -1
  46. package/build/_chunks/chunk-RK4UGNRY.js +1 -0
  47. package/build/_chunks/{chunk-ARPUXMV4.js → chunk-RTKA6K5L.js} +1 -1
  48. package/build/_chunks/{chunk-XSMIOEMD.js → chunk-RYHHS7S3.js} +1 -1
  49. package/build/_chunks/{chunk-IPYIRN2R.js → chunk-SO6E7CJM.js} +1 -1
  50. package/build/_chunks/{chunk-S6DUWS2C.js → chunk-TCI6NIBC.js} +1 -1
  51. package/build/_chunks/{chunk-PG6JHNLH.js → chunk-TQIWHM5B.js} +1 -1
  52. package/build/_chunks/{chunk-KZIIULI3.js → chunk-TXLFAI3O.js} +1 -1
  53. package/build/_chunks/{chunk-HFZFV3IA.js → chunk-U5M6TIFS.js} +1 -1
  54. package/build/_chunks/{chunk-32GIDLTK.js → chunk-UGX2ZY27.js} +1 -1
  55. package/build/_chunks/{chunk-VIBNNV7I.js → chunk-UVU4YIMS.js} +1 -1
  56. package/build/_chunks/{chunk-R367WWTC.js → chunk-V5NBU5TE.js} +1 -1
  57. package/build/_chunks/{chunk-6PCVGKSW.js → chunk-W3DEOBBE.js} +1 -1
  58. package/build/_chunks/{chunk-OL4HUADY.js → chunk-WNQ3ONG2.js} +1 -1
  59. package/build/_chunks/{chunk-BT4FYCLB.js → chunk-XEYCTDD3.js} +1 -1
  60. package/build/_chunks/{chunk-ZYP2H2JO.js → chunk-XHFDGV2F.js} +1 -1
  61. package/build/_chunks/chunk-XL3OK5YJ.js +2 -0
  62. package/build/_chunks/{chunk-QVH3AVGY.js → chunk-XLFVCH5I.js} +1 -1
  63. package/build/_chunks/chunk-XTJZTHR6.js +2 -0
  64. package/build/_chunks/{chunk-2DZTKOWC.js → chunk-ZGY3RIKJ.js} +1 -1
  65. package/build/components/ActionMenu/ActionMenu.d.ts +4 -0
  66. package/build/components/ActionMenu/ActionMenuFlyoutRow.d.ts +4 -0
  67. package/build/components/ActionMenu/ActionMenuLeafRow.d.ts +10 -0
  68. package/build/components/ActionMenu/ActionMenuPanelContext.d.ts +4 -0
  69. package/build/components/ActionMenu/ActionMenuRow.d.ts +7 -0
  70. package/build/components/ActionMenu/ActionMenuRowLeading.d.ts +4 -0
  71. package/build/components/ActionMenu/ActionMenuRowTrailing.d.ts +6 -0
  72. package/build/components/ActionMenu/constants.d.ts +47 -0
  73. package/build/components/ActionMenu/index.d.ts +4 -0
  74. package/build/components/ActionMenu/index.js +1 -0
  75. package/build/components/ActionMenu/style.d.ts +48 -0
  76. package/build/components/ActionMenu/type.d.ts +141 -0
  77. package/build/components/ActionMenu/utils.d.ts +27 -0
  78. package/build/components/Alert/index.js +1 -1
  79. package/build/components/AreaChart/index.js +1 -1
  80. package/build/components/Autocomplete/index.js +1 -1
  81. package/build/components/AvatarStack/index.js +1 -1
  82. package/build/components/Calender/index.js +1 -1
  83. package/build/components/Card/index.js +1 -1
  84. package/build/components/CardList/index.js +1 -1
  85. package/build/components/ColorPicker/index.js +1 -1
  86. package/build/components/ColumnViews/index.js +1 -1
  87. package/build/components/ConfirmDialog/index.js +1 -1
  88. package/build/components/CountryFilter/index.js +1 -1
  89. package/build/components/CountryFlag/index.js +1 -1
  90. package/build/components/CurrenciesMenu/index.js +1 -1
  91. package/build/components/CurrencyAmount/index.js +1 -1
  92. package/build/components/CurrencyAmountInput/index.js +1 -1
  93. package/build/components/CurrencySymbol/index.js +1 -1
  94. package/build/components/DateFilter/index.js +1 -1
  95. package/build/components/DateInput/index.js +1 -1
  96. package/build/components/DeviceIcon/index.js +1 -1
  97. package/build/components/EmptyState/index.js +1 -1
  98. package/build/components/ErrorToast/index.js +1 -1
  99. package/build/components/ExpandableChip/index.js +1 -1
  100. package/build/components/ExportReportButton/ExportReportButton.d.ts +4 -0
  101. package/build/components/ExportReportButton/ReportFileRow.d.ts +10 -0
  102. package/build/components/ExportReportButton/ReportLoadingRow.d.ts +8 -0
  103. package/build/components/ExportReportButton/ReportRequestRow.d.ts +11 -0
  104. package/build/components/ExportReportButton/constants.d.ts +51 -0
  105. package/build/components/ExportReportButton/hooks/useReportDownload.d.ts +21 -0
  106. package/build/components/ExportReportButton/index.d.ts +6 -0
  107. package/build/components/ExportReportButton/index.js +1 -0
  108. package/build/components/ExportReportButton/style.d.ts +67 -0
  109. package/build/components/ExportReportButton/type.d.ts +147 -0
  110. package/build/components/ExportReportButton/utils.d.ts +10 -0
  111. package/build/components/FileDropbox/index.js +1 -1
  112. package/build/components/FilePreview/index.js +1 -1
  113. package/build/components/FileUploader/index.js +1 -1
  114. package/build/components/FilterBar/index.js +1 -1
  115. package/build/components/FilterChip/index.js +1 -1
  116. package/build/components/FilterDropdown/index.js +1 -1
  117. package/build/components/Filters/index.js +1 -1
  118. package/build/components/FlipCard/index.js +1 -1
  119. package/build/components/GroupedSelect/index.js +1 -1
  120. package/build/components/HeatMap/index.js +1 -1
  121. package/build/components/ListColumnFilter/index.js +1 -1
  122. package/build/components/ListHeader/index.js +1 -1
  123. package/build/components/ListLayout/index.js +1 -1
  124. package/build/components/Loader/index.js +1 -1
  125. package/build/components/Logo/index.js +1 -1
  126. package/build/components/MaskedText/index.js +1 -1
  127. package/build/components/MultiLevelMenu/index.js +1 -1
  128. package/build/components/MultiLevelSelect/index.js +1 -1
  129. package/build/components/PhoneFilter/index.js +1 -1
  130. package/build/components/PhoneInput/index.js +1 -1
  131. package/build/components/ProgressRing/index.js +1 -1
  132. package/build/components/RadioGroup/index.js +1 -1
  133. package/build/components/RangeCalender/index.js +1 -1
  134. package/build/components/RatingCount/index.js +1 -1
  135. package/build/components/SearchButton/index.js +1 -1
  136. package/build/components/SearchInput/index.js +1 -1
  137. package/build/components/Select/index.js +1 -1
  138. package/build/components/SheetViewChip/index.js +1 -1
  139. package/build/components/Sidebar/index.js +1 -1
  140. package/build/components/StatusFilter/index.js +1 -1
  141. package/build/components/StatusIcons/index.js +1 -1
  142. package/build/components/TableCells/index.js +1 -1
  143. package/build/components/TextInput/index.js +1 -1
  144. package/build/components/Timeline/index.js +1 -1
  145. package/build/components/Timepicker/index.js +1 -1
  146. package/build/components/VerificationIcon/index.js +1 -1
  147. package/build/components/VirtualTables/index.js +1 -1
  148. package/build/components/Window/index.js +1 -1
  149. package/build/components/WindowServices/index.js +1 -1
  150. package/build/components/WindowToolbar/index.js +1 -1
  151. package/build/components/index.d.ts +2 -3
  152. package/build/components/index.js +1 -1
  153. package/build/components/modules/JSONViewWindow/index.js +1 -1
  154. package/build/components/modules/RangeCalender/index.js +1 -1
  155. package/build/components/modules/VirtualTables/index.js +1 -1
  156. package/build/components/modules/WindowShell/index.js +1 -1
  157. package/build/components/modules/index.js +1 -1
  158. package/build/components/primitives/index.js +1 -1
  159. package/build/constants/assets.d.ts +1 -0
  160. package/build/constants/index.js +1 -1
  161. package/build/datetime/components/index.js +1 -1
  162. package/build/hooks/index.js +1 -1
  163. package/build/index.js +1 -1
  164. package/build/utils/index.js +1 -1
  165. package/package.json +1 -1
  166. package/build/_chunks/chunk-3M2GZVQW.js +0 -2
  167. package/build/_chunks/chunk-7EIZDPRX.js +0 -1
  168. package/build/_chunks/chunk-AYDZ5BY7.js +0 -1
  169. package/build/_chunks/chunk-QT55YVEL.js +0 -2
  170. package/build/_chunks/chunk-Z2DUFVI5.js +0 -1
  171. package/build/components/ActionsDropdownMenu/ActionsDropdownMenu.d.ts +0 -3
  172. package/build/components/ActionsDropdownMenu/AppMenuItem.d.ts +0 -15
  173. package/build/components/ActionsDropdownMenu/constants.d.ts +0 -1
  174. package/build/components/ActionsDropdownMenu/index.d.ts +0 -3
  175. package/build/components/ActionsDropdownMenu/index.js +0 -1
  176. package/build/components/ActionsDropdownMenu/style.d.ts +0 -16
  177. package/build/components/ActionsDropdownMenu/types.d.ts +0 -42
  178. package/build/components/TableReports/DownloadIconButton.d.ts +0 -7
  179. package/build/components/TableReports/Downloads.d.ts +0 -10
  180. package/build/components/TableReports/RecordLoading.d.ts +0 -2
  181. package/build/components/TableReports/TableReports.d.ts +0 -5
  182. package/build/components/TableReports/components/DownloadButton/DownloadButton.d.ts +0 -8
  183. package/build/components/TableReports/components/DownloadButton/index.d.ts +0 -2
  184. package/build/components/TableReports/components/DownloadButton/style.d.ts +0 -263
  185. package/build/components/TableReports/hooks/index.d.ts +0 -1
  186. package/build/components/TableReports/hooks/useDownloadReport.d.ts +0 -11
  187. package/build/components/TableReports/index.d.ts +0 -7
  188. package/build/components/TableReports/index.js +0 -1
  189. package/build/components/TableReports/style.d.ts +0 -324
  190. package/build/components/TableReports/type.d.ts +0 -37
  191. package/build/components/TableReports/utils.d.ts +0 -2
@@ -1 +1 @@
1
- import {b as b$1,a}from'./chunk-6GZFEPN6.js';import {nc}from'./chunk-Z2DUFVI5.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:nc(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:nc(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-4NLQZJVN.js';import {nc}from'./chunk-EP5VELEJ.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:nc(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:nc(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 {d}from'./chunk-6GZFEPN6.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import {Oj,j,m}from'./chunk-3M2GZVQW.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)||Oj,alt:u??o??t??"flag",loading:"lazy",onError:d=>{d.currentTarget.src=Oj;},className:nc(a.root,F),sx:mc({width:y,height:i},C)}));f.displayName="CountryFlag";var P=memo(f);export{a,P as b};
1
+ import {d}from'./chunk-4NLQZJVN.js';import {mc,nc}from'./chunk-EP5VELEJ.js';import {Pj,j,m}from'./chunk-XTJZTHR6.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:nc(a.root,F),sx:mc({width:y,height:i},C)}));f.displayName="CountryFlag";var P=memo(f);export{a,P as b};
@@ -1 +1 @@
1
- import {d,j}from'./chunk-6GZFEPN6.js';import {Zb,Wb,nc}from'./chunk-Z2DUFVI5.js';import {Kj,Qe,Gb}from'./chunk-3M2GZVQW.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)Zb(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 Wb(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:nc(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?Kj:Qe,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-4NLQZJVN.js';import {Zb,Wb,nc}from'./chunk-EP5VELEJ.js';import {Lj,Re,Gb}from'./chunk-XTJZTHR6.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)Zb(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 Wb(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:nc(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 {L,K,j}from'./chunk-6GZFEPN6.js';import {za,Ka,l,nc}from'./chunk-Z2DUFVI5.js';import {forwardRef,useState,useMemo,memo}from'react';import V from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmountInput",t={root:`${r}-root`,field:`${r}-field`,display:`${r}-display`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var N=styled(V)(({theme:e})=>({color:e.v2.palette.foreground.primary,border:`1px solid ${e.v2.palette.border.default}`,padding:e.v2.spacing(8),borderRadius:e.v2.radius(4),display:"flex",alignItems:"center",justifyContent:"flex-end",width:93,height:32,textAlign:"right",input:{fontSize:"11px",border:"none",color:e.v2.palette.foreground.primary,height:30,padding:0,textAlign:"right"}})),I=styled(L)(({theme:e})=>({flexGrow:1,maxWidth:"100%",padding:0,border:"none",backgroundColor:"transparent",borderRadius:"none",height:24,[`& .${K.input}`]:{padding:0},input:{textAlign:"right",width:"100%",fontWeight:e.v2.typography.fontWeightRegular}})),b=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),v=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var q=za(),D=forwardRef(({amount:e,setAmount:u,maxAmount:l$1,isError:R,placeholder:E,selectedCurrency:p,id:o,className:k,sx:P,...B},M)=>{let[W,m]=useState(false),[c,S]=useState(e||""),{integerAmount:F,decimalAmount:d}=Ka(e,p?.code?.english),K=useMemo(()=>l(p?.decimals),[p]),T=n=>{let i=Number(n.target.value)||0;if(l$1&&i>l$1)return false;S(i),u(i);},H=()=>{m(false),u(Number(c));},L=n=>{q&&isNaN(Number(n.key))&&n.key!=="Backspace"&&n.key!=="."&&n.preventDefault();};return jsx(N,{id:o,"data-testid":o??"CurrencyAmountInput",className:nc(t.root,k),sx:P,...B,children:W?jsx(I,{ref:M,id:o,className:t.field,type:"number",placeholder:E??K,value:c,onChange:T,onBlur:H,onKeyDown:L,error:!!R,inputProps:{step:"0.01"},hideArrows:true,autoFocus:true,disableFocusRing:true}):jsxs(b,{id:o?`${o}-display`:void 0,"data-testid":o?`${o}-display`:"CurrencyAmount",className:t.display,component:"span",onClick:()=>{m(true);},children:[jsx("span",{className:t.integer,children:F}),d?jsxs(Fragment,{children:[jsx("span",{className:t.separator,children:"."}),jsx(v,{className:t.decimal,children:d})]}):null]})})});D.displayName="CurrencyAmountInput";var J=memo(D);export{t as a,J as b};
1
+ import {L,K,j}from'./chunk-4NLQZJVN.js';import {za,Ka,l,nc}from'./chunk-EP5VELEJ.js';import {forwardRef,useState,useMemo,memo}from'react';import V from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmountInput",t={root:`${r}-root`,field:`${r}-field`,display:`${r}-display`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var N=styled(V)(({theme:e})=>({color:e.v2.palette.foreground.primary,border:`1px solid ${e.v2.palette.border.default}`,padding:e.v2.spacing(8),borderRadius:e.v2.radius(4),display:"flex",alignItems:"center",justifyContent:"flex-end",width:93,height:32,textAlign:"right",input:{fontSize:"11px",border:"none",color:e.v2.palette.foreground.primary,height:30,padding:0,textAlign:"right"}})),I=styled(L)(({theme:e})=>({flexGrow:1,maxWidth:"100%",padding:0,border:"none",backgroundColor:"transparent",borderRadius:"none",height:24,[`& .${K.input}`]:{padding:0},input:{textAlign:"right",width:"100%",fontWeight:e.v2.typography.fontWeightRegular}})),b=styled(j)(({theme:e})=>({...e.v2.typography.textVariants.body.small.bold,display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"})),v=styled("span")(({theme:e})=>({fontWeight:e.v2.typography.fontWeightRegular}));var q=za(),D=forwardRef(({amount:e,setAmount:u,maxAmount:l$1,isError:R,placeholder:E,selectedCurrency:p,id:o,className:k,sx:P,...B},M)=>{let[W,m]=useState(false),[c,S]=useState(e||""),{integerAmount:F,decimalAmount:d}=Ka(e,p?.code?.english),K=useMemo(()=>l(p?.decimals),[p]),T=n=>{let i=Number(n.target.value)||0;if(l$1&&i>l$1)return false;S(i),u(i);},H=()=>{m(false),u(Number(c));},L=n=>{q&&isNaN(Number(n.key))&&n.key!=="Backspace"&&n.key!=="."&&n.preventDefault();};return jsx(N,{id:o,"data-testid":o??"CurrencyAmountInput",className:nc(t.root,k),sx:P,...B,children:W?jsx(I,{ref:M,id:o,className:t.field,type:"number",placeholder:E??K,value:c,onChange:T,onBlur:H,onKeyDown:L,error:!!R,inputProps:{step:"0.01"},hideArrows:true,autoFocus:true,disableFocusRing:true}):jsxs(b,{id:o?`${o}-display`:void 0,"data-testid":o?`${o}-display`:"CurrencyAmount",className:t.display,component:"span",onClick:()=>{m(true);},children:[jsx("span",{className:t.integer,children:F}),d?jsxs(Fragment,{children:[jsx("span",{className:t.separator,children:"."}),jsx(v,{className:t.decimal,children:d})]}):null]})})});D.displayName="CurrencyAmountInput";var J=memo(D);export{t as a,J as b};
@@ -1 +1 @@
1
- import {j}from'./chunk-6GZFEPN6.js';import {Ka,nc}from'./chunk-Z2DUFVI5.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",e={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var l=styled(j)(({theme:t})=>{let{fontSize:n,fontWeight:o}=t.v2.typography.textVariants.body.small.bold;return {fontSize:n,fontWeight:o,fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"}}),u=styled("span")(({theme:t})=>({fontWeight:t.v2.typography.fontWeightRegular}));var f=forwardRef(({amount:t,currency:n,id:o,className:C,sx:A,...d},g)=>{let{integerAmount:h,decimalAmount:s}=Ka(t,n??"");return jsxs(l,{ref:g,component:"span",id:o,"data-testid":o??"CurrencyAmount",className:nc(e.root,C),sx:A,...d,children:[jsx("span",{className:e.integer,children:h}),s?jsxs(Fragment,{children:[jsx("span",{className:e.separator,children:"."}),jsx(u,{className:e.decimal,children:s})]}):null]})});f.displayName="CurrencyAmount";var S=memo(f);export{e as a,S as b};
1
+ import {j}from'./chunk-4NLQZJVN.js';import {Ka,nc}from'./chunk-EP5VELEJ.js';import {forwardRef,memo}from'react';import {styled}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var r="os-shared-CurrencyAmount",e={root:`${r}-root`,integer:`${r}-integer`,separator:`${r}-separator`,decimal:`${r}-decimal`};var l=styled(j)(({theme:t})=>{let{fontSize:n,fontWeight:o}=t.v2.typography.textVariants.body.small.bold;return {fontSize:n,fontWeight:o,fontFamily:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:"inherit",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",overflow:"auto"}}),u=styled("span")(({theme:t})=>({fontWeight:t.v2.typography.fontWeightRegular}));var f=forwardRef(({amount:t,currency:n,id:o,className:C,sx:A,...d},g)=>{let{integerAmount:h,decimalAmount:s}=Ka(t,n??"");return jsxs(l,{ref:g,component:"span",id:o,"data-testid":o??"CurrencyAmount",className:nc(e.root,C),sx:A,...d,children:[jsx("span",{className:e.integer,children:h}),s?jsxs(Fragment,{children:[jsx("span",{className:e.separator,children:"."}),jsx(u,{className:e.decimal,children:s})]}):null]})});f.displayName="CurrencyAmount";var S=memo(f);export{e as a,S as b};
@@ -1,9 +1,9 @@
1
- import {b,a}from'./chunk-4UPB4XII.js';import {y,x,B as B$1,$}from'./chunk-OL4HUADY.js';import {aa,ba}from'./chunk-6GZFEPN6.js';import {Dc,nc,mc}from'./chunk-Z2DUFVI5.js';import {Rc,A}from'./chunk-3M2GZVQW.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-NHAXRGPW.js';import {y,x,B as B$1,$}from'./chunk-WNQ3ONG2.js';import {aa,ba}from'./chunk-4NLQZJVN.js';import {Dc,nc,mc}from'./chunk-EP5VELEJ.js';import {Sc,A}from'./chunk-XTJZTHR6.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
  }
5
5
  100% {
6
6
  transform: rotate(270deg);
7
7
  }
8
- `,we=styled(W)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${To} 2s linear infinite`}),ve=styled(wo,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:n,hasFeedback:r,hasLabel:l})=>{let{borderColor:x$1}=n?aa(e,n):{borderColor:void 0},T=r?"4px 4px 0 0":"4px",d=o?`1px solid ${e.palette.error.main}`:n&&x$1?`1px solid ${x$1}`:"1px solid transparent";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:T,borderBottomLeftRadius:r?0:"4px",borderBottomRightRadius:r?0:"4px",backgroundColor:e.palette.grey[400],border:d,borderBottom:r?"none":d,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400],border:r?`1px solid ${n?x$1:"transparent"}`:o?d:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:r?"none":void 0,boxShadow:r||o?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:l?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:`${B$1}px`,top:"50%",transform:"translateY(-50%)",right:x},"& .MuiAutocomplete-popupIndicator":{transform:"none",width:y,minWidth:y,height:y,padding:0,marginRight:0,marginLeft:0,display:"inline-flex",alignItems:"center",justifyContent:"center"},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:0,width:12,height:12,marginRight:0,marginLeft: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"}}}}),Te=styled(W,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:o})=>({display:"flex",alignItems:"stretch",flexDirection:"column",width:"100%",borderRadius:4,overflow:"visible",textAlign:"start",...o&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}})),Ro=e=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:4,padding:`${Me}px 8px`,minHeight:w,height:w,maxHeight:w,boxSizing:"border-box",width:"auto",margin:Ae,borderRadius:z,fontSize:"10px",fontWeight:500,lineHeight:"12px",cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:e.v2.palette.grey[500]}),G="#F8F8F8",Lo=e=>({fontSize:"12px",fontWeight:500,lineHeight:"14px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,height:"auto",flexShrink:0,flexGrow:0,padding:8,boxSizing:"border-box",borderRadius:z,backgroundColor:e.palette.common.white,'&.Mui-focused, &[aria-selected="true"], &.Mui-focusVisible, &[aria-selected="true"].Mui-focused':{backgroundColor:G},'&[aria-disabled="true"]':{opacity:.38,pointerEvents:"none"}}),Fo={padding:8,maxHeight:320,minHeight:0,display:"flex",flexDirection:"column",gap:4,overflowY:"auto"},Re=styled(ko,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$hideEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:n,$hideEmptyMenuSurface:r})=>({"& .MuiPaper-root":{borderRadius:Ce,overflow:"hidden",boxShadow:e.shadows[8],border:`1px solid ${e.v2.palette.grey[100]}`,backgroundColor:e.palette.common.white,...r&&{display:"none"}},[`& .${autocompleteClasses.listbox}`]:Fo,[`& .${autocompleteClasses.option}`]:Lo(e),[`& .${autocompleteClasses.noOptions}, & .${autocompleteClasses.loading}`]:Ro(e),[`& .${autocompleteClasses.loading} .MuiCircularProgress-root`]:{width:12,height:12},...n?{[`& .${autocompleteClasses.noOptions}`]:{display:"none !important"}}:{},...o===false?{[`& .${autocompleteClasses.loading}`]:{display:"none"}}:{}}));styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.v2.palette.grey[500]}));var Le=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:n})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,padding:8,boxSizing:"border-box",borderRadius:4,backgroundColor:o?G:e.palette.common.white,"&.Mui-focused":{backgroundColor:G},...n&&{opacity:.38,pointerEvents:"none"}})),Fe=styled("span")({flex:1,minWidth:0}),$e=styled("img")({width:10,height:7.5,flexShrink:0}),De=styled(W)({position:"relative",width:14,height:14,transform:"rotate(0deg)",display:"flex",alignItems:"center",justifyContent:"center","& img, & svg":{width:14,height:14,display:"block"}});styled("ul")({listStyle:"none",margin:0,padding:0});var Ne=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));var He=$;function Ve(){return jsx(De,{children:jsx(W,{component:"img",src:A,alt:"",sx:{width:14,height:14,display:"block"}})})}function Be(){return jsx($e,{src:Rc,alt:""})}function ze(e){return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("path",{d:"M6.66683 12.8333C3.26058 12.8333 0.500163 10.0729 0.500163 6.66667C0.500163 3.26042 3.26058 0.5 6.66683 0.5C10.0731 0.5 12.8335 3.26042 12.8335 6.66667C12.8335 10.0729 10.0731 12.8333 6.66683 12.8333Z",stroke:"url(#paint0_linear_1010_1334)",strokeMiterlimit:"10"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_1010_1334",x1:"12.8335",y1:"6.66667",x2:"0.500163",y2:"6.66667",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopOpacity:"0.619608"}),jsx("stop",{offset:"1",stopOpacity:"0"})]})})]})}function j(e){return e===null||e===""}function S(e){if(e==null||typeof e!="object"||!("value"in e)||!("label"in e))return false;let o=e.value;return typeof o=="string"||typeof o=="number"}function v(e){if(e==null)return "";if(typeof e=="string"||typeof e=="number")return String(e);if(S(e))return b(e);if(typeof e=="object"&&"label"in e){let o=e.label;if(typeof o=="string"||typeof o=="number")return String(o);let n=a(o).trim();if(n)return n}return ""}function Ge(e,o){return S(e)&&S(o)?e.value===o.value||String(e.value)===String(o.value):e===o}function We(e){return !!e?.disabled}function je(e){if(S(e))return String(e.value);if(e!=null&&typeof e=="object"&&"id"in e){let o=e.id;if(o!=null)return String(o)}return v(e)}function qe(e){return S(e)?e.label:typeof e=="string"||typeof e=="number"?String(e):e!=null&&typeof e=="object"&&"label"in e?e.label:v(e)}function Ue(e){let{options:o,value:n,onChange:r,label:l,placeholder:x,renderInput:T,slotProps:d,textFieldProps:C,loading:Ye,isLoading:Ze,popupIcon:Je,error:Qe=false,helperText:R,feedback:q,required:K,disabled:Xe,id:_="Autocomplete",className:eo,autocompleteClassNames:M,PopperComponent:U,hasClearIcon:oo=true,hasSelectedCheckmark:Y=false,ClearIconComponent:to,onClear:no,disableClearable:po,clearIcon:ro,menuDirection:Z=ye,openOnFocus:L=V,getOptionLabel:F,renderOption:lo,isOptionEqualToValue:$,getOptionDisabled:D,getOptionKey:N,noOptionsText:J,loadingText:Q,sx:ao,...io}=e,E=!!(Ze||Ye),b=j(Q),so=j(J),X=b&&E,ee=E&&!b,A=so||X,oe=o.length===0&&(X||!ee&&A),uo=b?B:Q??Se,co=A?B:J??Pe,{isProvided:te,isVisible:I,type:ne}=Dc(q),pe=Qe&&!I,re=l!=null&&l!=="",mo=to??He,fo=useCallback(t=>F?F(t):v(t),[F]),xo=useCallback((t,p)=>$?$(t,p):Ge(t,p),[$]),H=useCallback(t=>D?D(t):We(t),[D]),go=useCallback(t=>N?N(t):je(t),[N]),bo=useCallback((t,p,s)=>{let{key:h,...y}=t;return jsxs(Le,{...y,className:nc(u.option,y.className),$selected:s.selected,$optionDisabled:H(p),children:[jsx(Fe,{children:qe(p)}),Y&&s.selected?jsx(Be,{}):null]},h)},[H,Y]),ho=useMemo(()=>{let t=U;return t||function(s){return jsx(Re,{...s,$menuHasLoadingText:!b,$suppressAutocompleteNoOptions:A,$hideEmptyMenuSurface:oe})}},[U,b,A,oe]),le=nc(u.popper,M?.popper,d?.popper?.className),yo=useMemo(()=>Ie({menuDirection:Z,slotProps:d,popperClassName:le}),[Z,d,le]),Po=useCallback(t=>{let p=typeof C=="function"?C(t):C,s=t.inputProps?.onMouseDown,h=p?.inputProps?.onMouseDown;return jsx(ve,{...t,...p,variant:"filled",fullWidth:true,label:l??void 0,placeholder:x??p?.placeholder??void 0,required:K,error:pe,helperText:null,feedbackType:ne,hasFeedback:I,hasLabel:re,className:nc(u.input,M?.input,p?.className),InputProps:{...t.InputProps,...p?.InputProps,disableUnderline:true},inputProps:{...t.inputProps,...p?.inputProps,onMouseDown:y=>{h?.(y),L&&s?.(y);}}})},[C,l,x,K,pe,ne,I,re,M?.input,L]),ae=jsx(No,{...io,id:_,"data-testid":_??"Autocomplete",fullWidth:true,className:nc(u.root,M?.root,eo),options:o,value:n,disabled:!!Xe,onChange:(t,p,s,h)=>{r?.(t,p,s,h),s==="clear"&&no?.();},loading:ee,forcePopupIcon:true,popupIcon:E?jsx(we,{"aria-hidden":true,children:jsx(ze,{})}):Je??jsx(Ve,{}),getOptionLabel:fo,isOptionEqualToValue:xo,getOptionDisabled:H,getOptionKey:go,renderOption:lo??bo,renderInput:T||Po,PopperComponent:ho,openOnFocus:L,noOptionsText:co,loadingText:uo,disableClearable:po??!oo,clearIcon:ro??jsx(mo,{className:u.clear}),sx:mc(ke,ao),slotProps:yo});return !te&&(R==null||R==="")?ae:jsxs(Te,{$hasFeedback:I,children:[ae,te?jsx(ba,{className:u.feedback,...q}):jsx(Ne,{children:R})]})}Ue.displayName="Autocomplete";var Eo=memo(Ue);
8
+ `,we=styled(W)({width:12,height:12,display:"flex",alignItems:"center",justifyContent:"center","& svg":{width:"100%",height:"100%",display:"block"},animation:`${To} 2s linear infinite`}),ve=styled(wo,{shouldForwardProp:e=>!["feedbackType","hasFeedback","hasLabel"].includes(e)})(({theme:e,error:o,feedbackType:n,hasFeedback:r,hasLabel:l})=>{let{borderColor:x$1}=n?aa(e,n):{borderColor:void 0},T=r?"4px 4px 0 0":"4px",d=o?`1px solid ${e.palette.error.main}`:n&&x$1?`1px solid ${x$1}`:"1px solid transparent";return {width:"100%","& .MuiInputLabel-root":{fontSize:"10px",fontStyle:"normal",fontWeight:500,lineHeight:"100%",transform:"translate(8px, 15px) scale(1)",color:`${e.palette.grey[700]} !important`},"& .MuiInputLabel-root.MuiInputLabel-shrink":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiInputLabel-root.Mui-focused":{transform:"translate(8px, 8px) scale(0.75)"},"& .MuiFilledInput-root":{height:"40px",maxHeight:"40px",overflow:"hidden",borderRadius:T,borderBottomLeftRadius:r?0:"4px",borderBottomRightRadius:r?0:"4px",backgroundColor:e.palette.grey[400],border:d,borderBottom:r?"none":d,paddingTop:l?"11px":"0px",paddingBottom:l?"4px":"0px",paddingLeft:"8px",boxSizing:"border-box",display:"inline-flex",alignItems:l?"stretch":"center",transition:e.transitions.create(["border-color","box-shadow"],{duration:e.transitions.duration.shorter}),"&:before, &:after":{display:"none"},"&:hover":{backgroundColor:e.palette.grey[400]},"&.Mui-focused":{backgroundColor:e.palette.grey[400],border:r?`1px solid ${n?x$1:"transparent"}`:o?d:`1px solid ${e.v2.palette.brand[500]}`,borderBottom:r?"none":void 0,boxShadow:r||o?"none":`0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`},"&.Mui-disabled":{backgroundColor:e.palette.grey[400],boxShadow:"none",borderColor:"transparent"}},"& .MuiFilledInput-input":{padding:"0 !important",minHeight:0,height:"auto",boxSizing:"border-box",display:"flex",alignItems:l?"flex-end":"center",alignSelf:l?"flex-end":"center",fontSize:"11px",lineHeight:"11px",color:e.palette.common.black,paddingBottom:l?"1px !important":"0 !important"},"& .MuiFilledInput-root.MuiInputBase-adornedEnd .MuiAutocomplete-input":{flex:"1 1 0%",minWidth:30,width:0,maxWidth:"100%"},"& .MuiAutocomplete-endAdornment":{display:"flex",alignItems:"center",gap:`${B$1}px`,top:"50%",transform:"translateY(-50%)",right:x},"& .MuiAutocomplete-popupIndicator":{transform:"none",width:y,minWidth:y,height:y,padding:0,marginRight:0,marginLeft:0,display:"inline-flex",alignItems:"center",justifyContent:"center"},"& .MuiAutocomplete-popupIndicator.MuiAutocomplete-popupIndicatorOpen":{transform:"none"},"& .MuiAutocomplete-clearIndicator":{visibility:"visible",padding:0,width:12,height:12,marginRight:0,marginLeft: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"}}}}),Te=styled(W,{shouldForwardProp:e=>e!=="$hasFeedback"})(({theme:e,$hasFeedback:o})=>({display:"flex",alignItems:"stretch",flexDirection:"column",width:"100%",borderRadius:4,overflow:"visible",textAlign:"start",...o&&{"&:has(.MuiInputBase-root.Mui-focused)":{boxShadow:`0px 0px 0px 1px ${e.v2.palette.brand[500]}, 0px 0px 4px 0px ${alpha(e.v2.palette.brand[500],.5)}`}}})),Ro=e=>({display:"flex",alignItems:"center",justifyContent:"flex-start",gap:4,padding:`${Me}px 8px`,minHeight:w,height:w,maxHeight:w,boxSizing:"border-box",width:"auto",margin:Ae,borderRadius:z,fontSize:"10px",fontWeight:500,lineHeight:"12px",cursor:"default",pointerEvents:"none",backgroundColor:e.palette.common.white,color:e.v2.palette.grey[500]}),G="#F8F8F8",Lo=e=>({fontSize:"12px",fontWeight:500,lineHeight:"14px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,height:"auto",flexShrink:0,flexGrow:0,padding:8,boxSizing:"border-box",borderRadius:z,backgroundColor:e.palette.common.white,'&.Mui-focused, &[aria-selected="true"], &.Mui-focusVisible, &[aria-selected="true"].Mui-focused':{backgroundColor:G},'&[aria-disabled="true"]':{opacity:.38,pointerEvents:"none"}}),Fo={padding:8,maxHeight:320,minHeight:0,display:"flex",flexDirection:"column",gap:4,overflowY:"auto"},Re=styled(ko,{shouldForwardProp:e=>!["$menuHasLoadingText","$suppressAutocompleteNoOptions","$hideEmptyMenuSurface"].includes(e)})(({theme:e,$menuHasLoadingText:o,$suppressAutocompleteNoOptions:n,$hideEmptyMenuSurface:r})=>({"& .MuiPaper-root":{borderRadius:Ce,overflow:"hidden",boxShadow:e.shadows[8],border:`1px solid ${e.v2.palette.grey[100]}`,backgroundColor:e.palette.common.white,...r&&{display:"none"}},[`& .${autocompleteClasses.listbox}`]:Fo,[`& .${autocompleteClasses.option}`]:Lo(e),[`& .${autocompleteClasses.noOptions}, & .${autocompleteClasses.loading}`]:Ro(e),[`& .${autocompleteClasses.loading} .MuiCircularProgress-root`]:{width:12,height:12},...n?{[`& .${autocompleteClasses.noOptions}`]:{display:"none !important"}}:{},...o===false?{[`& .${autocompleteClasses.loading}`]:{display:"none"}}:{}}));styled("span")(({theme:e})=>({fontSize:"10px",fontWeight:500,color:e.v2.palette.grey[500]}));var Le=styled("li",{shouldForwardProp:e=>!["$selected","$optionDisabled"].includes(String(e))})(({theme:e,$selected:o,$optionDisabled:n})=>({fontSize:"12px",display:"flex",justifyContent:"space-between",alignItems:"center",gap:e.spacing(1),minHeight:40,padding:8,boxSizing:"border-box",borderRadius:4,backgroundColor:o?G:e.palette.common.white,"&.Mui-focused":{backgroundColor:G},...n&&{opacity:.38,pointerEvents:"none"}})),Fe=styled("span")({flex:1,minWidth:0}),$e=styled("img")({width:10,height:7.5,flexShrink:0}),De=styled(W)({position:"relative",width:14,height:14,transform:"rotate(0deg)",display:"flex",alignItems:"center",justifyContent:"center","& img, & svg":{width:14,height:14,display:"block"}});styled("ul")({listStyle:"none",margin:0,padding:0});var Ne=styled("small")(({theme:e})=>({color:e.palette.error.main,fontSize:"10px",lineHeight:"10px",marginTop:"4px",display:"block",width:"100%",textAlign:"start"}));var He=$;function Ve(){return jsx(De,{children:jsx(W,{component:"img",src:A,alt:"",sx:{width:14,height:14,display:"block"}})})}function Be(){return jsx($e,{src:Sc,alt:""})}function ze(e){return jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[jsx("path",{d:"M6.66683 12.8333C3.26058 12.8333 0.500163 10.0729 0.500163 6.66667C0.500163 3.26042 3.26058 0.5 6.66683 0.5C10.0731 0.5 12.8335 3.26042 12.8335 6.66667C12.8335 10.0729 10.0731 12.8333 6.66683 12.8333Z",stroke:"url(#paint0_linear_1010_1334)",strokeMiterlimit:"10"}),jsx("defs",{children:jsxs("linearGradient",{id:"paint0_linear_1010_1334",x1:"12.8335",y1:"6.66667",x2:"0.500163",y2:"6.66667",gradientUnits:"userSpaceOnUse",children:[jsx("stop",{stopOpacity:"0.619608"}),jsx("stop",{offset:"1",stopOpacity:"0"})]})})]})}function j(e){return e===null||e===""}function S(e){if(e==null||typeof e!="object"||!("value"in e)||!("label"in e))return false;let o=e.value;return typeof o=="string"||typeof o=="number"}function v(e){if(e==null)return "";if(typeof e=="string"||typeof e=="number")return String(e);if(S(e))return b(e);if(typeof e=="object"&&"label"in e){let o=e.label;if(typeof o=="string"||typeof o=="number")return String(o);let n=a(o).trim();if(n)return n}return ""}function Ge(e,o){return S(e)&&S(o)?e.value===o.value||String(e.value)===String(o.value):e===o}function We(e){return !!e?.disabled}function je(e){if(S(e))return String(e.value);if(e!=null&&typeof e=="object"&&"id"in e){let o=e.id;if(o!=null)return String(o)}return v(e)}function qe(e){return S(e)?e.label:typeof e=="string"||typeof e=="number"?String(e):e!=null&&typeof e=="object"&&"label"in e?e.label:v(e)}function Ue(e){let{options:o,value:n,onChange:r,label:l,placeholder:x,renderInput:T,slotProps:d,textFieldProps:C,loading:Ye,isLoading:Ze,popupIcon:Je,error:Qe=false,helperText:R,feedback:q,required:K,disabled:Xe,id:_="Autocomplete",className:eo,autocompleteClassNames:M,PopperComponent:U,hasClearIcon:oo=true,hasSelectedCheckmark:Y=false,ClearIconComponent:to,onClear:no,disableClearable:po,clearIcon:ro,menuDirection:Z=ye,openOnFocus:L=V,getOptionLabel:F,renderOption:lo,isOptionEqualToValue:$,getOptionDisabled:D,getOptionKey:N,noOptionsText:J,loadingText:Q,sx:ao,...io}=e,E=!!(Ze||Ye),b=j(Q),so=j(J),X=b&&E,ee=E&&!b,A=so||X,oe=o.length===0&&(X||!ee&&A),uo=b?B:Q??Se,co=A?B:J??Pe,{isProvided:te,isVisible:I,type:ne}=Dc(q),pe=Qe&&!I,re=l!=null&&l!=="",mo=to??He,fo=useCallback(t=>F?F(t):v(t),[F]),xo=useCallback((t,p)=>$?$(t,p):Ge(t,p),[$]),H=useCallback(t=>D?D(t):We(t),[D]),go=useCallback(t=>N?N(t):je(t),[N]),bo=useCallback((t,p,s)=>{let{key:h,...y}=t;return jsxs(Le,{...y,className:nc(u.option,y.className),$selected:s.selected,$optionDisabled:H(p),children:[jsx(Fe,{children:qe(p)}),Y&&s.selected?jsx(Be,{}):null]},h)},[H,Y]),ho=useMemo(()=>{let t=U;return t||function(s){return jsx(Re,{...s,$menuHasLoadingText:!b,$suppressAutocompleteNoOptions:A,$hideEmptyMenuSurface:oe})}},[U,b,A,oe]),le=nc(u.popper,M?.popper,d?.popper?.className),yo=useMemo(()=>Ie({menuDirection:Z,slotProps:d,popperClassName:le}),[Z,d,le]),Po=useCallback(t=>{let p=typeof C=="function"?C(t):C,s=t.inputProps?.onMouseDown,h=p?.inputProps?.onMouseDown;return jsx(ve,{...t,...p,variant:"filled",fullWidth:true,label:l??void 0,placeholder:x??p?.placeholder??void 0,required:K,error:pe,helperText:null,feedbackType:ne,hasFeedback:I,hasLabel:re,className:nc(u.input,M?.input,p?.className),InputProps:{...t.InputProps,...p?.InputProps,disableUnderline:true},inputProps:{...t.inputProps,...p?.inputProps,onMouseDown:y=>{h?.(y),L&&s?.(y);}}})},[C,l,x,K,pe,ne,I,re,M?.input,L]),ae=jsx(No,{...io,id:_,"data-testid":_??"Autocomplete",fullWidth:true,className:nc(u.root,M?.root,eo),options:o,value:n,disabled:!!Xe,onChange:(t,p,s,h)=>{r?.(t,p,s,h),s==="clear"&&no?.();},loading:ee,forcePopupIcon:true,popupIcon:E?jsx(we,{"aria-hidden":true,children:jsx(ze,{})}):Je??jsx(Ve,{}),getOptionLabel:fo,isOptionEqualToValue:xo,getOptionDisabled:H,getOptionKey:go,renderOption:lo??bo,renderInput:T||Po,PopperComponent:ho,openOnFocus:L,noOptionsText:co,loadingText:uo,disableClearable:po??!oo,clearIcon:ro??jsx(mo,{className:u.clear}),sx:mc(ke,ao),slotProps:yo});return !te&&(R==null||R==="")?ae:jsxs(Te,{$hasFeedback:I,children:[ae,te?jsx(ba,{className:u.feedback,...q}):jsx(Ne,{children:R})]})}Ue.displayName="Autocomplete";var Eo=memo(Ue);
9
9
  export{u as a,k as b,V as c,Eo as d};
@@ -1 +1 @@
1
- import {h,g,f,j,c,d,i,E as E$1,a,e}from'./chunk-OL4HUADY.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';function s(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(s).join(""):typeof e=="object"&&"props"in e?s(e.props.children):""}function E(e){return typeof e.label=="string"||typeof e.label=="number"?String(e.label):s(e.label).trim()||(e.value!=null?String(e.value):"")}function w(e){let t=e?.currentTarget??e?.target;return t instanceof Element?(t.closest(".MuiInputBase-root")??t).getBoundingClientRect():null}function N(e,t,n){let r=e?.PaperProps?.style?.maxHeight;if(typeof r=="number"&&Number.isFinite(r))return r;if(typeof r=="string"){let o=Number.parseFloat(r);if(Number.isFinite(o))return o}return t&&n?h:t?g:f}function F({preferred:e,anchorRect:t,menuMaxHeight:n,gapPx:r}){if(e===j.top||t==null)return e;let o=window.innerHeight-t.bottom-r,c=t.top-r;return o>=n?j.bottom:c>o?j.top:j.bottom}function I(e$1,t,n){let r=e$1?.PaperProps,o=t===j.top,p={marginTop:`${o?-c:c}px`,marginBottom:0},f$1=n!=null&&Number.isFinite(n)&&n>0,h=f$1?{width:n,minWidth:n,maxWidth:n}:{};return {...e$1,autoFocus:false,disableAutoFocus:true,disableAutoFocusItem:true,disableEnforceFocus:true,variant:"menu",marginThreshold:0,anchorOrigin:{vertical:o?"top":"bottom",horizontal:"left"},transformOrigin:{vertical:o?"bottom":"top",horizontal:"left"},MenuListProps:{...e$1?.MenuListProps,autoFocus:false,autoFocusItem:false,sx:mc({padding:0,display:"flex",flexDirection:"column",gap:`${e}px`,flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto"},e$1?.MenuListProps?.sx??{})},PaperProps:{...r,className:nc(a.menu,r?.className),style:{...r?.style,...p,...h,maxHeight:r?.style?.maxHeight??f},sx:mc({...p,...E$1,borderRadius:`${i}px`,boxSizing:"border-box",display:"flex",flexDirection:"column",padding:`${d}px`,overflow:"hidden",overflowX:"hidden",overflowY:"hidden",...f$1&&{width:`${n}px`,minWidth:`${n}px`,maxWidth:`${n}px`,boxSizing:"border-box"}},r?.sx??{})}}}function R(e){e.stopPropagation();}function T(e){return e.map(t=>({...t,id:String(t.value)}))}function H(e,t){return t==null?null:e.find(n=>n.value===t||String(n.value)===String(t))??null}function D(e){return e==null?"":String(e.value)}function k(e){let t=e?.target;return t instanceof Element&&t.closest("[data-select-menu-search], [data-select-menu-keep-open]")!=null}function A(e){if(e==null||typeof e!="object")return false;let t=e;if(t.key==="Escape"||t.type==="keydown")return false;let n=t.target;return n instanceof Element&&n.closest('[role="option"], .MuiMenuItem-root')!=null}function $(e){let t=e?.target;return t instanceof Element&&t.closest(".Select-clearIconButton, [data-select-clear]")!=null}function B(e){return e==null?false:Array.isArray(e)?e.length>0:typeof e=="object"?String(e.value??"")!=="":String(e)!==""}export{s as a,E as b,w as c,N as d,F as e,I as f,R as g,T as h,H as i,D as j,k,A as l,$ as m,B as n};
1
+ import {h,g,f,j,c,d,i,E as E$1,a,e}from'./chunk-WNQ3ONG2.js';import {mc,nc}from'./chunk-EP5VELEJ.js';function s(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(s).join(""):typeof e=="object"&&"props"in e?s(e.props.children):""}function E(e){return typeof e.label=="string"||typeof e.label=="number"?String(e.label):s(e.label).trim()||(e.value!=null?String(e.value):"")}function w(e){let t=e?.currentTarget??e?.target;return t instanceof Element?(t.closest(".MuiInputBase-root")??t).getBoundingClientRect():null}function N(e,t,n){let r=e?.PaperProps?.style?.maxHeight;if(typeof r=="number"&&Number.isFinite(r))return r;if(typeof r=="string"){let o=Number.parseFloat(r);if(Number.isFinite(o))return o}return t&&n?h:t?g:f}function F({preferred:e,anchorRect:t,menuMaxHeight:n,gapPx:r}){if(e===j.top||t==null)return e;let o=window.innerHeight-t.bottom-r,c=t.top-r;return o>=n?j.bottom:c>o?j.top:j.bottom}function I(e$1,t,n){let r=e$1?.PaperProps,o=t===j.top,p={marginTop:`${o?-c:c}px`,marginBottom:0},f$1=n!=null&&Number.isFinite(n)&&n>0,h=f$1?{width:n,minWidth:n,maxWidth:n}:{};return {...e$1,autoFocus:false,disableAutoFocus:true,disableAutoFocusItem:true,disableEnforceFocus:true,variant:"menu",marginThreshold:0,anchorOrigin:{vertical:o?"top":"bottom",horizontal:"left"},transformOrigin:{vertical:o?"bottom":"top",horizontal:"left"},MenuListProps:{...e$1?.MenuListProps,autoFocus:false,autoFocusItem:false,sx:mc({padding:0,display:"flex",flexDirection:"column",gap:`${e}px`,flex:1,minHeight:0,overflowX:"hidden",overflowY:"auto"},e$1?.MenuListProps?.sx??{})},PaperProps:{...r,className:nc(a.menu,r?.className),style:{...r?.style,...p,...h,maxHeight:r?.style?.maxHeight??f},sx:mc({...p,...E$1,borderRadius:`${i}px`,boxSizing:"border-box",display:"flex",flexDirection:"column",padding:`${d}px`,overflow:"hidden",overflowX:"hidden",overflowY:"hidden",...f$1&&{width:`${n}px`,minWidth:`${n}px`,maxWidth:`${n}px`,boxSizing:"border-box"}},r?.sx??{})}}}function R(e){e.stopPropagation();}function T(e){return e.map(t=>({...t,id:String(t.value)}))}function H(e,t){return t==null?null:e.find(n=>n.value===t||String(n.value)===String(t))??null}function D(e){return e==null?"":String(e.value)}function k(e){let t=e?.target;return t instanceof Element&&t.closest("[data-select-menu-search], [data-select-menu-keep-open]")!=null}function A(e){if(e==null||typeof e!="object")return false;let t=e;if(t.key==="Escape"||t.type==="keydown")return false;let n=t.target;return n instanceof Element&&n.closest('[role="option"], .MuiMenuItem-root')!=null}function $(e){let t=e?.target;return t instanceof Element&&t.closest(".Select-clearIconButton, [data-select-clear]")!=null}function B(e){return e==null?false:Array.isArray(e)?e.length>0:typeof e=="object"?String(e.value??"")!=="":String(e)!==""}export{s as a,E as b,w as c,N as d,F as e,I as f,R as g,T as h,H as i,D as j,k,A as l,$ as m,B as n};
@@ -1 +1 @@
1
- import {k as k$1,j as j$1,g}from'./chunk-ISC5KT5E.js';import {j as j$2}from'./chunk-6GZFEPN6.js';import {nc}from'./chunk-Z2DUFVI5.js';import {Ta,Be,bb,Ra,Sa,Se}from'./chunk-3M2GZVQW.js';import {forwardRef,useState,useCallback,memo}from'react';import m from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var d="os-shared-WindowToolbar",e={root:`${d}-root`,start:`${d}-start`,end:`${d}-end`,title:`${d}-title`,titleIcon:`${d}-titleIcon`,icon:`${d}-icon`,expand:`${d}-expand`,expandIcon:`${d}-expandIcon`,expandText:`${d}-expandText`};var P=styled(m,{shouldForwardProp:o=>o!=="$isDragging"})(({theme:o,$isDragging:t=false})=>({margin:0,position:"sticky",top:0,left:0,right:0,cursor:t?"move":"default",flexShrink:0,height:32,display:"flex",width:"100%",justifyContent:"safe center",backgroundColor:j$1,backdropFilter:k$1,transition:"background-color 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),'[data-window-maximized="true"] & .action-box':{visibility:"hidden"},'[data-window-maximized="true"] &:hover .action-box':{visibility:"visible"},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1},[`.${e.expandText}`]:{opacity:1},[`.${e.expandIcon}`]:{backgroundColor:`${o.palette.success.main} !important`}},"&:focus-within":{[`.${e.expandText}`]:{opacity:1}}})),D=styled(m)(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:"1 1 0px",minWidth:0,gap:o.spacing(1),zIndex:1})),$=styled(m)(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",flex:"1 1 0px",minWidth:0,gap:o.spacing(1)})),v=styled("div")(()=>({display:"flex",justifyContent:"center",alignItems:"center",position:"relative",textAlign:"center",flex:"1 1 0px",minWidth:0,maxWidth:"100%",overflow:"hidden"})),z=styled("img")(()=>({width:14,height:14,verticalAlign:"center"})),A=styled(j$2)(({theme:o})=>({fontSize:"10px",color:"rgba(32, 35, 43, 0.5)",opacity:.7,textAlign:"left",fontWeight:o.v2.typography.fontWeightBold,lineHeight:"14px",userSelect:"none",paddingLeft:"0.175rem",textTransform:"capitalize",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"})),p=styled(m)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}})),k=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.error.main}})),M=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.warning.main}})),E=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.info.dark}})),R=styled(p,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t})=>({...t&&{backgroundColor:`${o.palette.common.orange} !important`,"& img":{filter:"brightness(0) invert(1)",opacity:1}},"&&.header-icon:hover":{backgroundColor:o.palette.common.orange,"& img":{filter:"brightness(0) invert(1)"}}})),F=styled(m)(()=>({alignItems:"center",justifyContent:"center",display:"flex",height:12,gap:"5px",cursor:"pointer","&:hover":{"& .sandbox-text":{display:"block"}}})),L=styled(j$2,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t})=>({fontSize:"10px",fontWeight:600,color:o.palette.common.orange,whiteSpace:"nowrap",display:t?"block":"none"})),j=styled(p,{shouldForwardProp:o=>o!=="$direction"})(({theme:o,$direction:t="right"})=>({"&.header-icon:hover":{backgroundColor:o.palette.success.main},"& img":{transform:t==="left"?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out, opacity 0.2s ease-in-out"}})),B=styled(m,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t=false})=>({alignItems:"center",justifyContent:"center",display:"flex",height:12,gap:"5px",marginInlineStart:"10px",...t&&{"& .header-icon":{backgroundColor:`${o.palette.success.main} !important`},"& .header-icon img":{opacity:1},[`.${e.expandText}`]:{opacity:1}},"&:hover":{"& .request-text":{opacity:1},"& .header-icon":{backgroundColor:`${o.palette.success.main} !important`}},cursor:"pointer"})),O=styled(j$2)(()=>({fontFamily:"Tap Sans, sans-serif",fontWeight:600,fontSize:"10px",lineHeight:"100%",letterSpacing:"0%",textBoxTrim:"trim-start",textBoxEdge:"cap alphabetic",color:"rgba(42, 206, 0, 1)",opacity:0,transition:"opacity 0.2s ease-in-out"}));var _=forwardRef(function({children:t,id:r,className:a,sx:l,"data-testid":s,"data-id":x},X){let[Y,w]=useState(false),Z=useCallback(()=>{w(true);},[]),T=useCallback(()=>{w(false);},[]);return jsx(P,{ref:X,id:r,"data-testid":s??r??"WindowToolbar",...(x??r)!=null?{"data-id":x??r}:null,className:nc(e.root,g,a),sx:l,$isDragging:Y,onPointerDown:Z,onPointerUp:T,onPointerCancel:T,children:t})});_.displayName="WindowToolbar";var ro=memo(_);function ao({className:o,id:t,...r}){return jsx(k,{...r,id:t,"data-testid":t??"CloseIcon",className:nc(e.icon,"header-icon",o),children:jsx("img",{src:Ta,alt:"close"})})}var lo=memo(ao);function po({direction:o,active:t=false,children:r,className:a,id:l,...s}){return jsxs(B,{...s,id:l,"data-testid":l??"DirectionIcon",className:nc(e.expand,a),$active:t,children:[jsx(j,{className:nc(e.expandIcon,"header-icon"),$direction:o,children:jsx(m,{component:"img",src:Be,alt:"arrow"})}),jsx(O,{className:nc(e.expandText,"request-text"),children:r})]})}var co=memo(po);function xo({isMaximized:o=false,className:t,id:r,...a}){return jsx(E,{...a,id:r,"data-testid":r??"MaximizeIcon",className:nc(e.icon,"header-icon",t),children:jsx("img",{src:o?bb:Ra,alt:"maximize"})})}var wo=memo(xo);function yo({className:o,id:t,...r}){return jsx(M,{...r,id:t,"data-testid":t??"MinimizeIcon",className:nc(e.icon,"header-icon",o),children:jsx("img",{src:Sa,alt:"minimize"})})}var go=memo(yo);function uo({active:o=false,label:t="Sandbox mode",className:r,id:a,...l}){return jsxs(F,{...l,id:a,"data-testid":a??"SandboxIcon",className:r,children:[jsx(L,{$active:o,className:"sandbox-text",children:t}),jsx(R,{$active:o,className:nc(e.icon,"header-icon"),children:jsx("img",{src:Se,alt:"sandbox"})})]})}var So=memo(uo);var G=forwardRef(function({children:t,id:r,className:a,sx:l},s){return jsx(D,{ref:s,id:r,"data-testid":r??"WindowToolbarStartAdornment",className:nc(e.start,"action-box",a),sx:l,children:t})});G.displayName="WindowToolbarStartAdornment";var No=memo(G);var J=forwardRef(function({children:t,id:r,className:a,sx:l},s){return jsx($,{ref:s,id:r,"data-testid":r??"WindowToolbarEndAdornment",className:nc(e.end,a),sx:l,children:t})});J.displayName="WindowToolbarEndAdornment";var vo=memo(J);function V({title:o,icon:t,className:r}){return jsxs(v,{className:nc("action-box",r),children:[t?jsx(z,{src:t,alt:"icon",className:nc(e.titleIcon)}):null,o?jsx(A,{className:nc(e.title),children:o}):null]})}V.displayName="WindowToolbarTitle";var ko=memo(V);export{e as a,ro as b,lo as c,co as d,wo as e,go as f,So as g,No as h,vo as i,ko as j};
1
+ import {k as k$1,j as j$1,g}from'./chunk-ISC5KT5E.js';import {j as j$2}from'./chunk-4NLQZJVN.js';import {nc}from'./chunk-EP5VELEJ.js';import {Ta,Ce,bb,Ra,Sa,Te}from'./chunk-XTJZTHR6.js';import {forwardRef,useState,useCallback,memo}from'react';import m from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var d="os-shared-WindowToolbar",e={root:`${d}-root`,start:`${d}-start`,end:`${d}-end`,title:`${d}-title`,titleIcon:`${d}-titleIcon`,icon:`${d}-icon`,expand:`${d}-expand`,expandIcon:`${d}-expandIcon`,expandText:`${d}-expandText`};var P=styled(m,{shouldForwardProp:o=>o!=="$isDragging"})(({theme:o,$isDragging:t=false})=>({margin:0,position:"sticky",top:0,left:0,right:0,cursor:t?"move":"default",flexShrink:0,height:32,display:"flex",width:"100%",justifyContent:"safe center",backgroundColor:j$1,backdropFilter:k$1,transition:"background-color 0.5s ease-in-out",borderTopLeftRadius:"12px",borderTopRightRadius:"12px",paddingLeft:o.spacing(1.25),paddingRight:o.spacing(1.25),'[data-window-maximized="true"] & .action-box':{visibility:"hidden"},'[data-window-maximized="true"] &:hover .action-box':{visibility:"visible"},":hover":{".header-icon":{backgroundColor:`${o.palette.grey[200]}40`},".header-icon img":{opacity:1},[`.${e.expandText}`]:{opacity:1},[`.${e.expandIcon}`]:{backgroundColor:`${o.palette.success.main} !important`}},"&:focus-within":{[`.${e.expandText}`]:{opacity:1}}})),D=styled(m)(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-start",flex:"1 1 0px",minWidth:0,gap:o.spacing(1),zIndex:1})),$=styled(m)(({theme:o})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",flex:"1 1 0px",minWidth:0,gap:o.spacing(1)})),v=styled("div")(()=>({display:"flex",justifyContent:"center",alignItems:"center",position:"relative",textAlign:"center",flex:"1 1 0px",minWidth:0,maxWidth:"100%",overflow:"hidden"})),z=styled("img")(()=>({width:14,height:14,verticalAlign:"center"})),A=styled(j$2)(({theme:o})=>({fontSize:"10px",color:"rgba(32, 35, 43, 0.5)",opacity:.7,textAlign:"left",fontWeight:o.v2.typography.fontWeightBold,lineHeight:"14px",userSelect:"none",paddingLeft:"0.175rem",textTransform:"capitalize",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"})),p=styled(m)(({theme:o})=>({width:12,height:12,borderRadius:"50%",cursor:"pointer",backgroundColor:`${o.palette.grey[200]}14`,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",img:{opacity:"0",transition:"all 0.2s ease-in-out"},"&:active":{backgroundColor:`${o.palette.grey[200]} !important`}})),k=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.error.main}})),M=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.warning.main}})),E=styled(p)(({theme:o})=>({"&&.header-icon:hover":{backgroundColor:o.palette.info.dark}})),R=styled(p,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t})=>({...t&&{backgroundColor:`${o.palette.common.orange} !important`,"& img":{filter:"brightness(0) invert(1)",opacity:1}},"&&.header-icon:hover":{backgroundColor:o.palette.common.orange,"& img":{filter:"brightness(0) invert(1)"}}})),F=styled(m)(()=>({alignItems:"center",justifyContent:"center",display:"flex",height:12,gap:"5px",cursor:"pointer","&:hover":{"& .sandbox-text":{display:"block"}}})),L=styled(j$2,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t})=>({fontSize:"10px",fontWeight:600,color:o.palette.common.orange,whiteSpace:"nowrap",display:t?"block":"none"})),j=styled(p,{shouldForwardProp:o=>o!=="$direction"})(({theme:o,$direction:t="right"})=>({"&.header-icon:hover":{backgroundColor:o.palette.success.main},"& img":{transform:t==="left"?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.3s ease-in-out, opacity 0.2s ease-in-out"}})),B=styled(m,{shouldForwardProp:o=>o!=="$active"})(({theme:o,$active:t=false})=>({alignItems:"center",justifyContent:"center",display:"flex",height:12,gap:"5px",marginInlineStart:"10px",...t&&{"& .header-icon":{backgroundColor:`${o.palette.success.main} !important`},"& .header-icon img":{opacity:1},[`.${e.expandText}`]:{opacity:1}},"&:hover":{"& .request-text":{opacity:1},"& .header-icon":{backgroundColor:`${o.palette.success.main} !important`}},cursor:"pointer"})),O=styled(j$2)(()=>({fontFamily:"Tap Sans, sans-serif",fontWeight:600,fontSize:"10px",lineHeight:"100%",letterSpacing:"0%",textBoxTrim:"trim-start",textBoxEdge:"cap alphabetic",color:"rgba(42, 206, 0, 1)",opacity:0,transition:"opacity 0.2s ease-in-out"}));var _=forwardRef(function({children:t,id:r,className:a,sx:l,"data-testid":s,"data-id":x},X){let[Y,w]=useState(false),Z=useCallback(()=>{w(true);},[]),T=useCallback(()=>{w(false);},[]);return jsx(P,{ref:X,id:r,"data-testid":s??r??"WindowToolbar",...(x??r)!=null?{"data-id":x??r}:null,className:nc(e.root,g,a),sx:l,$isDragging:Y,onPointerDown:Z,onPointerUp:T,onPointerCancel:T,children:t})});_.displayName="WindowToolbar";var ro=memo(_);function ao({className:o,id:t,...r}){return jsx(k,{...r,id:t,"data-testid":t??"CloseIcon",className:nc(e.icon,"header-icon",o),children:jsx("img",{src:Ta,alt:"close"})})}var lo=memo(ao);function po({direction:o,active:t=false,children:r,className:a,id:l,...s}){return jsxs(B,{...s,id:l,"data-testid":l??"DirectionIcon",className:nc(e.expand,a),$active:t,children:[jsx(j,{className:nc(e.expandIcon,"header-icon"),$direction:o,children:jsx(m,{component:"img",src:Ce,alt:"arrow"})}),jsx(O,{className:nc(e.expandText,"request-text"),children:r})]})}var co=memo(po);function xo({isMaximized:o=false,className:t,id:r,...a}){return jsx(E,{...a,id:r,"data-testid":r??"MaximizeIcon",className:nc(e.icon,"header-icon",t),children:jsx("img",{src:o?bb:Ra,alt:"maximize"})})}var wo=memo(xo);function yo({className:o,id:t,...r}){return jsx(M,{...r,id:t,"data-testid":t??"MinimizeIcon",className:nc(e.icon,"header-icon",o),children:jsx("img",{src:Sa,alt:"minimize"})})}var go=memo(yo);function uo({active:o=false,label:t="Sandbox mode",className:r,id:a,...l}){return jsxs(F,{...l,id:a,"data-testid":a??"SandboxIcon",className:r,children:[jsx(L,{$active:o,className:"sandbox-text",children:t}),jsx(R,{$active:o,className:nc(e.icon,"header-icon"),children:jsx("img",{src:Te,alt:"sandbox"})})]})}var So=memo(uo);var G=forwardRef(function({children:t,id:r,className:a,sx:l},s){return jsx(D,{ref:s,id:r,"data-testid":r??"WindowToolbarStartAdornment",className:nc(e.start,"action-box",a),sx:l,children:t})});G.displayName="WindowToolbarStartAdornment";var No=memo(G);var J=forwardRef(function({children:t,id:r,className:a,sx:l},s){return jsx($,{ref:s,id:r,"data-testid":r??"WindowToolbarEndAdornment",className:nc(e.end,a),sx:l,children:t})});J.displayName="WindowToolbarEndAdornment";var vo=memo(J);function V({title:o,icon:t,className:r}){return jsxs(v,{className:nc("action-box",r),children:[t?jsx(z,{src:t,alt:"icon",className:nc(e.titleIcon)}):null,o?jsx(A,{className:nc(e.title),children:o}):null]})}V.displayName="WindowToolbarTitle";var ko=memo(V);export{e as a,ro as b,lo as c,co as d,wo as e,go as f,So as g,No as h,vo as i,ko as j};
@@ -1,2 +1,2 @@
1
- import {P as P$1,O}from'./chunk-6GZFEPN6.js';import {nc}from'./chunk-Z2DUFVI5.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:"100%",position:"sticky",padding:`${r.v2.spacing(8)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",gap:r.v2.spacing(8)}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),F=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),V=styled(P$1)(({theme:r})=>({"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),D=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),j=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),M=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function T(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>T(r,n),[r,n]),[O,W]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:nc(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(F,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=O[t.id]??t.id===A;return jsx(V,{className:e.group,expanded:I,onChange:i=>W(Z=>({...Z,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:nc(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(D,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(j,{className:e.groupContent,children:t.sections?.map(i=>jsxs(M,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
1
+ import {P as P$1,O}from'./chunk-4NLQZJVN.js';import {nc}from'./chunk-EP5VELEJ.js';import {forwardRef,useMemo,useState,memo}from'react';import {styled,alpha,useTheme}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var a="os-shared-Sidebar",e={root:`${a}-root`,header:`${a}-header`,content:`${a}-content`,footer:`${a}-footer`,link:`${a}-link`,group:`${a}-group`,groupSummary:`${a}-groupSummary`,groupSummaryActive:`${a}-groupSummaryActive`,groupSummaryExpanded:`${a}-groupSummaryExpanded`,groupHeader:`${a}-groupHeader`,groupContent:`${a}-groupContent`,groupItem:`${a}-groupItem`,startAdornment:`${a}-startAdornment`,endAdornment:`${a}-endAdornment`};var G=r=>{let{palette:n}=useTheme();return jsx("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...r,children:jsx("path",{d:"M9.97437 5.23633C10.0426 5.23465 10.1087 5.25507 10.1648 5.29395C10.2207 5.33278 10.264 5.3876 10.2888 5.45117C10.3136 5.51487 10.3195 5.5852 10.3064 5.65234C10.2934 5.71873 10.2614 5.77954 10.2146 5.82813L7.23608 9.01172C7.17462 9.07723 7.08968 9.11518 6.99976 9.11523C6.90985 9.11523 6.82492 9.07717 6.76343 9.01172L3.78394 5.8291L3.78491 5.82812C3.73877 5.77985 3.70612 5.71999 3.69312 5.6543C3.68007 5.58802 3.68575 5.51818 3.70972 5.45508C3.7337 5.39201 3.77618 5.33717 3.83081 5.29785C3.88553 5.25857 3.95095 5.23732 4.01831 5.2373C4.0635 5.23736 4.10797 5.24702 4.14917 5.26562C4.18997 5.28407 4.2263 5.31071 4.25659 5.34375L6.99878 8.27246L9.74194 5.34375C9.80179 5.27779 9.88521 5.23858 9.97437 5.23633Z",fill:n.text.textSecondary,stroke:n.text.textSecondary,strokeWidth:"0.204167"})})};var E="linear-gradient(270deg, #147DC5 0.67%, #3DA6E1 98.91%)",H=styled("div")(({theme:r})=>{let{base:n}=r.v2.palette;return {backgroundColor:alpha(n.white,.7),backdropFilter:r.v2.blur[16],width:"100%",position:"sticky",padding:`${r.v2.spacing(8)} ${r.v2.spacing(8)}`,height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",gap:r.v2.spacing(8)}}),L=styled("div")({flexShrink:0}),R=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),flex:1,minHeight:0,overflow:"auto"})),P=styled("div")({flexShrink:0}),C={border:"none",width:"100%",textAlign:"left",font:"inherit",cursor:"pointer"},f=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0}),x=styled("span")({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,marginLeft:"auto"}),F=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}}),V=styled(P$1)(({theme:r})=>({"&&":{background:"transparent",boxShadow:"none"},border:"none !important",borderRadius:"4px !important",[`& .${O.summary}`]:{padding:0,paddingRight:8,minHeight:"24px",height:"24px","&.Mui-expanded":{minHeight:"24px",height:"24px"},borderRadius:"4px !important",background:"transparent",transition:"none"},[`& .${O.summary}.${e.groupSummaryActive}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.summary}.${e.groupSummaryExpanded}`]:{backgroundColor:r.v2.palette.base.white},[`& .${O.content}`]:{borderTop:"none",padding:0},[`& .${O.labelContent}`]:{flexGrow:1,minWidth:0}})),D=styled("span",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?o.white:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4),width:"100%",cursor:"pointer"}}),j=styled("div")(({theme:r})=>({display:"flex",flexDirection:"column",gap:r.v2.spacing(4),paddingTop:r.v2.spacing(4)})),M=styled("button",{shouldForwardProp:r=>r!=="$isActive"})(({theme:r,$isActive:n=false})=>{let{base:o,foreground:d}=r.v2.palette;return {...C,...r.v2.typography.textVariants.body.small.regular,background:n?E:"transparent",borderRadius:r.v2.radius(4),padding:`${r.v2.spacing(4)} ${r.v2.spacing(8)}`,color:n?o.white:d.primary,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:r.v2.spacing(4)}});var $=r=>!!r.sections?.length;function T(r,n){let o=n??r?.[0]?.sections?.[0]?.id??r?.[0]?.id,d=r?.find(c=>c.id===o),u=!d||!$(d),l=u?r?.find(c=>c.sections?.some(y=>y.id===o)):d,g=l?.id??d?.id??o,b=l?u?o:l.sections?.[0]?.id:void 0;return {activeId:o,activeGroupId:g,activeLeafId:b}}var B=forwardRef(({sections:r,activeSectionId:n,onSelect:o,defaultExpandedIds:d,header:u,footer:l,id:g,className:b,sx:c},y)=>{let{activeId:h,activeGroupId:A,activeLeafId:k}=useMemo(()=>T(r,n),[r,n]),[O,W]=useState(()=>Object.fromEntries((d??[]).map(t=>[t,true])));return jsxs(H,{ref:y,id:g,"data-testid":g??"Sidebar",className:nc(e.root,b),sx:c,children:[u?jsx(L,{className:e.header,children:u}):null,jsx(R,{className:e.content,children:r?.map(t=>{if(!$(t))return jsxs(F,{type:"button",$isActive:h===t.id,"aria-current":h===t.id?"true":void 0,onClick:()=>o?.(t,void 0,[t]),className:e.link,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]},t.id);let I=O[t.id]??t.id===A;return jsx(V,{className:e.group,expanded:I,onChange:i=>W(Z=>({...Z,[t.id]:i})),expandIcon:jsx(G,{}),slotProps:{root:{component:"section"},summary:{className:nc(e.groupSummary,A===t.id&&e.groupSummaryActive,I&&e.groupSummaryExpanded)}},label:jsxs(D,{$isActive:A===t.id,className:e.groupHeader,children:[t.startAdornment?jsx(f,{className:e.startAdornment,children:t.startAdornment}):null,t.title,t.endAdornment?jsx(x,{className:e.endAdornment,children:t.endAdornment}):null]}),content:jsx(j,{className:e.groupContent,children:t.sections?.map(i=>jsxs(M,{type:"button",$isActive:k===i.id,"aria-current":k===i.id?"true":void 0,onClick:()=>o?.(i,t,[t,i]),className:e.groupItem,children:[i.startAdornment?jsx(f,{className:e.startAdornment,children:i.startAdornment}):null,i.title,i.endAdornment?jsx(x,{className:e.endAdornment,children:i.endAdornment}):null]},`${t.id}-${i.id}`))})},t.id)})}),l?jsx(P,{className:e.footer,children:l}):null]})});B.displayName="Sidebar";var X=memo(B);
2
2
  export{e as a,X as b};
@@ -1 +1 @@
1
- import {Hb,C,wc,xc}from'./chunk-Z2DUFVI5.js';import {useState,useEffect,useCallback,useRef,useMemo,useLayoutEffect}from'react';import {useTheme}from'@mui/material/styles';function O(){let{innerWidth:e,innerHeight:n}=window;return {width:e,height:n}}function de(){let[e,n]=useState(O);return useEffect(()=>{let t;function o(){cancelAnimationFrame(t),t=requestAnimationFrame(()=>{n(O());});}return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),cancelAnimationFrame(t);}},[]),e}function ve({value:e,delay:n}){let[t,o]=useState(e);return useEffect(()=>{let r;return e?o(e):r=setTimeout(()=>{o(e);},n),()=>{clearTimeout(r);}},[e]),t}function be(e,n){let[t,o]=useState({});return useEffect(()=>{e&&o(s=>({...s,[e]:n||0}));},[n,e]),{getBadgeCount:useCallback(s=>{if(s)return t[s]},[t])}}function Ce(e){return {isParameterSelected:(o,r)=>r?.map(s=>Hb(e,o,s)),getColumnOrder:o=>{let r=e.findIndex(s=>s.name?.toLowerCase()===o?.toLowerCase());return r===-1?100:r}}}var ke=e=>{let[n,t]=useState(false);return useEffect(()=>{let o=e?.current;if(!o)return;let r=new IntersectionObserver(([s])=>{t(!s.isIntersecting);});return r.observe(o),()=>r.disconnect()},[e]),{showShadow:n}};var Oe=()=>{let e=useTheme(),n=e.palette.mode==="dark",t=e.palette.mode==="light";return {isDark:n,isLight:t}};function ze(){let[e,n]=useState(0),t=useRef(null),o=C(e),r=()=>{t.current&&(clearInterval(t.current),t.current=null);},s=()=>{r(),n(0);},i=c=>{c<=0||(t.current&&r(),n(c),t.current=setInterval(()=>{n(a=>{let u=a-1;return u<=0&&r(),u});},1e3));};return useEffect(()=>()=>{r();},[]),{timer:e,formattedTime:o,startTimer:i,stopTimer:r,resetTimer:s}}var De=e=>{let n=useMemo(()=>new Map(e.map(i=>[i.code.toLowerCase(),i])),[e]),t=useCallback(i=>n.get(i.toLowerCase()),[n]),o=useCallback(({appCode:i,serviceCode:c})=>t(i)?.app_services.find(({code:a})=>a.toLowerCase()===c.toLowerCase()),[t]),r=useCallback(({appCode:i,serviceCode:c})=>o({appCode:i,serviceCode:c})?.functions??[],[o]),s=useCallback(({appCode:i,serviceCode:c,functionCode:a})=>r({appCode:i,serviceCode:c}).find(({code:u})=>u?.toLowerCase()===a.toLowerCase()),[r]);return {getAppInfo:t,getServiceInfo:o,getServiceFunctions:r,getFunctionInfo:s}};function A(e){return useCallback((...n)=>{let t=new CustomEvent(e,{detail:n});window.dispatchEvent(t);},[e])}function _e(e,n){let t=useRef(n);t.current=n,useEffect(()=>{let o=r=>{let s=r;t.current(...s.detail||[]);};return window.addEventListener(e,o),()=>{window.removeEventListener(e,o);}},[e]);}var Ne=(e,n)=>{let{selectedEntity:t,selectedMerchant:o,displayName:r}=useMemo(()=>{let s=n?.entities.find(a=>a.id===e?.entityId),i=s?.merchants?.find(a=>a.id===e?.merchantId),c=i?.display_name??i?.legacy_id??"Select";return {selectedEntity:s,selectedMerchant:i,displayName:c}},[n,e?.entityId,e?.merchantId]);return {selectedBrand:n,selectedEntity:t,selectedMerchant:o,displayName:r}};var te=()=>crypto.randomUUID();function $e(){let e=A("on-toast"),n=useCallback(t=>(o,r)=>{let s=r?.id??te();return e({action:"show",variant:t,message:o,options:{...r,id:s}}),s},[e]);return useMemo(()=>{let t=n("default");return t.success=n("success"),t.error=n("error"),t.loading=n("loading"),t.custom=n("custom"),t.dismiss=o=>{e({action:"dismiss",variant:"dismiss",toastId:o});},t.remove=o=>{e({action:"remove",variant:"remove",toastId:o});},t},[n,e])}var oe=10;function Ye({threshold:e=oe,containerRef:n}={}){let[t,o]=useState(true),[r,s]=useState(false),[i,c]=useState(false),a=useCallback(l=>{let{scrollTop:m,scrollHeight:p,clientHeight:f}=l;c(p>f+e),o(m<=e),s(p-(m+f)<=e);},[e]),u=useCallback(l=>{if(l){if("currentTarget"in l){a(l.currentTarget);return}a(l);}},[a]);return useEffect(()=>{if(!n?.current)return;let l=n.current;u(l);let m=new ResizeObserver(()=>{u(l);});return m.observe(l),()=>{m.disconnect();}},[n,u]),{handleScroll:u,scrolledToTop:t,scrolledToBottom:r,scrollable:i}}var tt=(e={})=>{let{checkUrl:n="/status",checkIntervalMs:t=3e4,debounceMs:o=800,timeoutMs:r=5e3}=e,s=typeof window<"u"&&typeof navigator<"u",[i,c]=useState(s?navigator.onLine:true),[a,u]=useState(false),[l,m]=useState(null),p=useRef(null),f=useRef(null),g=useCallback(d=>{p.current!==null&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{c(d),p.current=null;},o);},[o]);return useEffect(()=>{if(!s)return;let d=null,w=()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null);},v=async()=>{u(true),m(null),d?.abort(),d=new AbortController;try{let C=window.setTimeout(()=>{d?.abort();},r),M=await fetch(n,{method:"GET",cache:"no-store",signal:d.signal});window.clearTimeout(C);let x=M.ok;g(x),x?w():m(`Health check failed with status ${M.status}`);}catch{g(false),m("Unable to reach network");}finally{u(false);}},E=()=>{w(),g(true);},S=()=>{g(false),w(),v(),f.current=window.setInterval(v,t);};return window.addEventListener("online",E),window.addEventListener("offline",S),navigator.onLine||(v(),f.current=window.setInterval(v,t)),()=>{window.removeEventListener("online",E),window.removeEventListener("offline",S),p.current!==null&&window.clearTimeout(p.current),w(),d?.abort();}},[s,n,t,o,r,g]),s?{isOnline:i,isChecking:a,error:l}:{isOnline:false,isChecking:false,error:"Online status is only available in a browser environment."}};var st=(e={},n,t)=>{let o=wc(e,t.requiredFilterKeys);return {columns:useMemo(()=>xc(n,o,t),[n,o])}};function lt(e,n){return useCallback(t=>{t.key==="Enter"?(t.preventDefault(),e(),n(t)):t.key==="Escape"&&n(t);},[e,n])}function dt(){let[e,n]=useState(true);return {onScrollHandler:useCallback(o=>{let{scrollTop:r,scrollHeight:s,clientHeight:i}=o.currentTarget,c=r===0||i<s-r-1;n(a=>a===c?a:c);},[]),showShadow:e}}var pe={width:0,height:0};function vt(){let[e,n]=useState(null),[t,o]=useState(pe),r=useCallback(s=>{n(s);},[]);return useLayoutEffect(()=>{if(!e)return;let s=new ResizeObserver(i=>{for(let c of i){let a=c.target.getBoundingClientRect();o({width:c.borderBoxSize?.[0]?.inlineSize??a.width,height:c.borderBoxSize?.[0]?.blockSize??a.height});}});return s.observe(e),()=>s.disconnect()},[e]),[r,t]}export{de as a,ve as b,be as c,Ce as d,ke as e,Oe as f,ze as g,De as h,A as i,_e as j,Ne as k,$e as l,Ye as m,tt as n,st as o,lt as p,dt as q,vt as r};
1
+ import {Hb,C,wc,xc}from'./chunk-EP5VELEJ.js';import {useState,useEffect,useCallback,useRef,useMemo,useLayoutEffect}from'react';import {useTheme}from'@mui/material/styles';function O(){let{innerWidth:e,innerHeight:n}=window;return {width:e,height:n}}function de(){let[e,n]=useState(O);return useEffect(()=>{let t;function o(){cancelAnimationFrame(t),t=requestAnimationFrame(()=>{n(O());});}return window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o),cancelAnimationFrame(t);}},[]),e}function ve({value:e,delay:n}){let[t,o]=useState(e);return useEffect(()=>{let r;return e?o(e):r=setTimeout(()=>{o(e);},n),()=>{clearTimeout(r);}},[e]),t}function be(e,n){let[t,o]=useState({});return useEffect(()=>{e&&o(s=>({...s,[e]:n||0}));},[n,e]),{getBadgeCount:useCallback(s=>{if(s)return t[s]},[t])}}function Ce(e){return {isParameterSelected:(o,r)=>r?.map(s=>Hb(e,o,s)),getColumnOrder:o=>{let r=e.findIndex(s=>s.name?.toLowerCase()===o?.toLowerCase());return r===-1?100:r}}}var ke=e=>{let[n,t]=useState(false);return useEffect(()=>{let o=e?.current;if(!o)return;let r=new IntersectionObserver(([s])=>{t(!s.isIntersecting);});return r.observe(o),()=>r.disconnect()},[e]),{showShadow:n}};var Oe=()=>{let e=useTheme(),n=e.palette.mode==="dark",t=e.palette.mode==="light";return {isDark:n,isLight:t}};function ze(){let[e,n]=useState(0),t=useRef(null),o=C(e),r=()=>{t.current&&(clearInterval(t.current),t.current=null);},s=()=>{r(),n(0);},i=c=>{c<=0||(t.current&&r(),n(c),t.current=setInterval(()=>{n(a=>{let u=a-1;return u<=0&&r(),u});},1e3));};return useEffect(()=>()=>{r();},[]),{timer:e,formattedTime:o,startTimer:i,stopTimer:r,resetTimer:s}}var De=e=>{let n=useMemo(()=>new Map(e.map(i=>[i.code.toLowerCase(),i])),[e]),t=useCallback(i=>n.get(i.toLowerCase()),[n]),o=useCallback(({appCode:i,serviceCode:c})=>t(i)?.app_services.find(({code:a})=>a.toLowerCase()===c.toLowerCase()),[t]),r=useCallback(({appCode:i,serviceCode:c})=>o({appCode:i,serviceCode:c})?.functions??[],[o]),s=useCallback(({appCode:i,serviceCode:c,functionCode:a})=>r({appCode:i,serviceCode:c}).find(({code:u})=>u?.toLowerCase()===a.toLowerCase()),[r]);return {getAppInfo:t,getServiceInfo:o,getServiceFunctions:r,getFunctionInfo:s}};function A(e){return useCallback((...n)=>{let t=new CustomEvent(e,{detail:n});window.dispatchEvent(t);},[e])}function _e(e,n){let t=useRef(n);t.current=n,useEffect(()=>{let o=r=>{let s=r;t.current(...s.detail||[]);};return window.addEventListener(e,o),()=>{window.removeEventListener(e,o);}},[e]);}var Ne=(e,n)=>{let{selectedEntity:t,selectedMerchant:o,displayName:r}=useMemo(()=>{let s=n?.entities.find(a=>a.id===e?.entityId),i=s?.merchants?.find(a=>a.id===e?.merchantId),c=i?.display_name??i?.legacy_id??"Select";return {selectedEntity:s,selectedMerchant:i,displayName:c}},[n,e?.entityId,e?.merchantId]);return {selectedBrand:n,selectedEntity:t,selectedMerchant:o,displayName:r}};var te=()=>crypto.randomUUID();function $e(){let e=A("on-toast"),n=useCallback(t=>(o,r)=>{let s=r?.id??te();return e({action:"show",variant:t,message:o,options:{...r,id:s}}),s},[e]);return useMemo(()=>{let t=n("default");return t.success=n("success"),t.error=n("error"),t.loading=n("loading"),t.custom=n("custom"),t.dismiss=o=>{e({action:"dismiss",variant:"dismiss",toastId:o});},t.remove=o=>{e({action:"remove",variant:"remove",toastId:o});},t},[n,e])}var oe=10;function Ye({threshold:e=oe,containerRef:n}={}){let[t,o]=useState(true),[r,s]=useState(false),[i,c]=useState(false),a=useCallback(l=>{let{scrollTop:m,scrollHeight:p,clientHeight:f}=l;c(p>f+e),o(m<=e),s(p-(m+f)<=e);},[e]),u=useCallback(l=>{if(l){if("currentTarget"in l){a(l.currentTarget);return}a(l);}},[a]);return useEffect(()=>{if(!n?.current)return;let l=n.current;u(l);let m=new ResizeObserver(()=>{u(l);});return m.observe(l),()=>{m.disconnect();}},[n,u]),{handleScroll:u,scrolledToTop:t,scrolledToBottom:r,scrollable:i}}var tt=(e={})=>{let{checkUrl:n="/status",checkIntervalMs:t=3e4,debounceMs:o=800,timeoutMs:r=5e3}=e,s=typeof window<"u"&&typeof navigator<"u",[i,c]=useState(s?navigator.onLine:true),[a,u]=useState(false),[l,m]=useState(null),p=useRef(null),f=useRef(null),g=useCallback(d=>{p.current!==null&&window.clearTimeout(p.current),p.current=window.setTimeout(()=>{c(d),p.current=null;},o);},[o]);return useEffect(()=>{if(!s)return;let d=null,w=()=>{f.current!==null&&(window.clearInterval(f.current),f.current=null);},v=async()=>{u(true),m(null),d?.abort(),d=new AbortController;try{let C=window.setTimeout(()=>{d?.abort();},r),M=await fetch(n,{method:"GET",cache:"no-store",signal:d.signal});window.clearTimeout(C);let x=M.ok;g(x),x?w():m(`Health check failed with status ${M.status}`);}catch{g(false),m("Unable to reach network");}finally{u(false);}},E=()=>{w(),g(true);},S=()=>{g(false),w(),v(),f.current=window.setInterval(v,t);};return window.addEventListener("online",E),window.addEventListener("offline",S),navigator.onLine||(v(),f.current=window.setInterval(v,t)),()=>{window.removeEventListener("online",E),window.removeEventListener("offline",S),p.current!==null&&window.clearTimeout(p.current),w(),d?.abort();}},[s,n,t,o,r,g]),s?{isOnline:i,isChecking:a,error:l}:{isOnline:false,isChecking:false,error:"Online status is only available in a browser environment."}};var st=(e={},n,t)=>{let o=wc(e,t.requiredFilterKeys);return {columns:useMemo(()=>xc(n,o,t),[n,o])}};function lt(e,n){return useCallback(t=>{t.key==="Enter"?(t.preventDefault(),e(),n(t)):t.key==="Escape"&&n(t);},[e,n])}function dt(){let[e,n]=useState(true);return {onScrollHandler:useCallback(o=>{let{scrollTop:r,scrollHeight:s,clientHeight:i}=o.currentTarget,c=r===0||i<s-r-1;n(a=>a===c?a:c);},[]),showShadow:e}}var pe={width:0,height:0};function vt(){let[e,n]=useState(null),[t,o]=useState(pe),r=useCallback(s=>{n(s);},[]);return useLayoutEffect(()=>{if(!e)return;let s=new ResizeObserver(i=>{for(let c of i){let a=c.target.getBoundingClientRect();o({width:c.borderBoxSize?.[0]?.inlineSize??a.width,height:c.borderBoxSize?.[0]?.blockSize??a.height});}});return s.observe(e),()=>s.disconnect()},[e]),[r,t]}export{de as a,ve as b,be as c,Ce as d,ke as e,Oe as f,ze as g,De as h,A as i,_e as j,Ne as k,$e as l,Ye as m,tt as n,st as o,lt as p,dt as q,vt as r};
@@ -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-WRJLCKDU.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-KZIIULI3.js';import {d,c as c$1}from'./chunk-VBB5WMVK.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import'./chunk-3M2GZVQW.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:nc(d,o.className),"data-testid":i,...l,sx:mc({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:nc(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:nc(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:mc({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:nc(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:mc({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?mc(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-OCHPXIEK.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-TXLFAI3O.js';import {d,c as c$1}from'./chunk-5KGT5D5O.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {mc,nc}from'./chunk-EP5VELEJ.js';import'./chunk-XTJZTHR6.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:nc(d,o.className),"data-testid":i,...l,sx:mc({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:nc(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:nc(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:mc({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:nc(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:mc({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?mc(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 {j}from'./chunk-6GZFEPN6.js';import {nc}from'./chunk-Z2DUFVI5.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:nc(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:nc(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-4NLQZJVN.js';import {nc}from'./chunk-EP5VELEJ.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:nc(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:nc(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 {nc}from'./chunk-Z2DUFVI5.js';import {forwardRef,useState,useCallback,memo}from'react';import m from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-FlipCard",t={root:`${o}-root`,container:`${o}-container`,inner:`${o}-inner`,front:`${o}-front`,back:`${o}-back`,faceContent:`${o}-faceContent`},h=.3;var D=styled(m,{shouldForwardProp:e=>e!=="$interactive"})(({$interactive:e})=>({width:"100%",height:"100%",cursor:e?"pointer":void 0})),I=styled(m)(()=>({width:"inherit",height:"inherit",perspective:"1000px"})),b=styled(motion.div)(()=>({width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"})),u=styled(m,{shouldForwardProp:e=>e!=="$side"&&e!=="$direction"})(({$side:e,$direction:y})=>({position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",...e==="back"&&{transform:y==="vertical"?"rotateX(180deg)":"rotateY(180deg)"}})),v=styled(m)(()=>({width:"100%",height:"100%"}));var T=forwardRef(function({front:y,back:w,isFlipped:S,defaultFlipped:L=false,onFlip:N,direction:s="horizontal",trigger:P,duration:A=h,disabled:a=false,id:k,className:R,sx:l,"data-testid":M,...c},U){let p=S!==void 0,r=P??(p?void 0:"click"),[_,K]=useState(L),C=p?S:_,f=useCallback(i=>{a||(p||K(i),N?.(i));},[a,p,N]),$=useCallback(()=>{f(!C);},[C,f]),O=()=>{r==="click"&&$();},H=()=>{r==="hover"&&f(true);},X=()=>{r==="hover"&&f(false);},F=!a&&r==="click",Y=i=>{F&&(i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),$()));},g=C?180:0,j=s==="vertical"?{rotateX:g}:{rotateY:g},z=!a&&(r==="click"||r==="hover"),B=a?[{pointerEvents:"none",opacity:.6},...Array.isArray(l)?l:l?[l]:[]]:l;return jsx(D,{...c,ref:U,id:k,"data-testid":M??k??"FlipCard","data-direction":s,className:nc(t.root,R),$interactive:z,role:F?"button":c.role,tabIndex:F?a?-1:0:c.tabIndex,"aria-pressed":F?C:c["aria-pressed"],onClick:O,onKeyDown:Y,onMouseEnter:r==="hover"?H:void 0,onMouseLeave:r==="hover"?X:void 0,sx:B,children:jsx(I,{className:t.container,children:jsxs(b,{className:t.inner,animate:j,transition:{duration:A},children:[jsx(u,{className:t.front,$side:"front",$direction:s,children:jsx(v,{className:t.faceContent,children:y})}),jsx(u,{className:t.back,$side:"back",$direction:s,children:jsx(v,{className:t.faceContent,children:w})})]})})})});T.displayName="FlipCard";var Q=memo(T);export{o as a,t as b,h as c,Q as d};
1
+ import {nc}from'./chunk-EP5VELEJ.js';import {forwardRef,useState,useCallback,memo}from'react';import m from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-FlipCard",t={root:`${o}-root`,container:`${o}-container`,inner:`${o}-inner`,front:`${o}-front`,back:`${o}-back`,faceContent:`${o}-faceContent`},h=.3;var D=styled(m,{shouldForwardProp:e=>e!=="$interactive"})(({$interactive:e})=>({width:"100%",height:"100%",cursor:e?"pointer":void 0})),I=styled(m)(()=>({width:"inherit",height:"inherit",perspective:"1000px"})),b=styled(motion.div)(()=>({width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"})),u=styled(m,{shouldForwardProp:e=>e!=="$side"&&e!=="$direction"})(({$side:e,$direction:y})=>({position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",...e==="back"&&{transform:y==="vertical"?"rotateX(180deg)":"rotateY(180deg)"}})),v=styled(m)(()=>({width:"100%",height:"100%"}));var T=forwardRef(function({front:y,back:w,isFlipped:S,defaultFlipped:L=false,onFlip:N,direction:s="horizontal",trigger:P,duration:A=h,disabled:a=false,id:k,className:R,sx:l,"data-testid":M,...c},U){let p=S!==void 0,r=P??(p?void 0:"click"),[_,K]=useState(L),C=p?S:_,f=useCallback(i=>{a||(p||K(i),N?.(i));},[a,p,N]),$=useCallback(()=>{f(!C);},[C,f]),O=()=>{r==="click"&&$();},H=()=>{r==="hover"&&f(true);},X=()=>{r==="hover"&&f(false);},F=!a&&r==="click",Y=i=>{F&&(i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),$()));},g=C?180:0,j=s==="vertical"?{rotateX:g}:{rotateY:g},z=!a&&(r==="click"||r==="hover"),B=a?[{pointerEvents:"none",opacity:.6},...Array.isArray(l)?l:l?[l]:[]]:l;return jsx(D,{...c,ref:U,id:k,"data-testid":M??k??"FlipCard","data-direction":s,className:nc(t.root,R),$interactive:z,role:F?"button":c.role,tabIndex:F?a?-1:0:c.tabIndex,"aria-pressed":F?C:c["aria-pressed"],onClick:O,onKeyDown:Y,onMouseEnter:r==="hover"?H:void 0,onMouseLeave:r==="hover"?X:void 0,sx:B,children:jsx(I,{className:t.container,children:jsxs(b,{className:t.inner,animate:j,transition:{duration:A},children:[jsx(u,{className:t.front,$side:"front",$direction:s,children:jsx(v,{className:t.faceContent,children:y})}),jsx(u,{className:t.back,$side:"back",$direction:s,children:jsx(v,{className:t.faceContent,children:w})})]})})})});T.displayName="FlipCard";var Q=memo(T);export{o as a,t as b,h as c,Q as d};
@@ -0,0 +1 @@
1
+ import {B as B$1,p as p$1}from'./chunk-4NLQZJVN.js';import {nc,cc}from'./chunk-EP5VELEJ.js';import {xb,Ei,Ak,ja,Xd,Vj,E,ol}from'./chunk-XTJZTHR6.js';import {createContext,forwardRef,useMemo,Fragment,memo,useState,useCallback,useContext,createElement}from'react';import m from'@mui/material/Box';import ue from'@mui/material/Popper';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var D=createContext({});function te(){return useContext(D)}var l="os-shared-ActionMenu",o={root:`${l}-root`,popper:`${l}-popper`,panel:`${l}-panel`,sectionHeader:`${l}-sectionHeader`,sectionDivider:`${l}-sectionDivider`,item:`${l}-item`,itemContent:`${l}-itemContent`,itemLabel:`${l}-itemLabel`,itemIcon:`${l}-itemIcon`,startAdornment:`${l}-startAdornment`,rowEnd:`${l}-rowEnd`,endAdornment:`${l}-endAdornment`,arrow:`${l}-arrow`,trailingDot:`${l}-trailingDot`,flyoutHost:`${l}-flyoutHost`,flyoutPopper:`${l}-flyoutPopper`},Be={refund:ol,flag:E,viewReceipt:Vj,viewApi:Xd,capture:ja,void:Ak,clipboard:Ei},U=360,k=280,oe=148,ie=32,re=27,le=8,p=16,F=12,W=5,ae="#D9D9D9",se="drop-shadow(0px 8px 30px rgba(0, 0, 0, 0.16))",ce=1e3,de=1301;var pe={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},me=styled(m)({display:"contents"}),Ae=styled(ue)({zIndex:ce}),fe=styled(ue)({zIndex:de}),C=styled(m,{shouldForwardProp:e=>e!=="$flyout"&&e!=="$maxWidth"&&e!=="$maxHeight"})(({theme:e,$flyout:n=false,$maxWidth:t,$maxHeight:i})=>({background:e.v2.palette.base.white,borderRadius:e.v2.radius(4),filter:se,minWidth:oe,maxWidth:t??k,maxHeight:i??U,width:"max-content",marginTop:n?0:e.v2.spacing(le),overflowY:"auto",overflowX:"hidden"})),T=styled(m,{shouldForwardProp:e=>e!=="$open"&&e!=="$disabled"})(({theme:e,$open:n=false,$disabled:t=false})=>{let{foreground:i}=e.v2.palette,c={boxShadow:e.v2.elevation[200],zIndex:1};return {...e.v2.typography.textVariants.body.small.medium,position:"relative",display:"flex",alignItems:"center",justifyContent:"space-between",height:ie,padding:`${e.v2.spacing(8)} ${e.v2.spacing(8)} ${e.v2.spacing(8)} ${e.v2.spacing(12)}`,cursor:t?"default":"pointer",color:t?i.disabled:i.primary,...!t&&{"&:hover":c},...n&&!t&&c}}),R=styled(m)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),flex:1,minWidth:0,overflow:"hidden"})),w=styled("span")({minWidth:0,...pe}),Me=styled(m)(({theme:e})=>({...e.v2.typography.textVariants.body.small.medium,...pe,height:re,display:"flex",alignItems:"center",padding:`0 ${e.v2.spacing(12)}`,lineHeight:"100%",color:e.v2.palette.foreground.secondary,pointerEvents:"none",userSelect:"none",flexShrink:0,minWidth:0})),Ne=styled(m)(({theme:e})=>({borderTop:`1px solid ${e.v2.palette.border.default}`})),Ie=styled(m)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(6),flexShrink:0})),ye=styled("span")({display:"inline-flex",lineHeight:0}),ge=styled(m,{shouldForwardProp:e=>e!=="$color"})(({$color:e})=>({width:W,height:W,borderRadius:"50%",backgroundColor:e,flexShrink:0,cursor:"default"})),Se={filter:"grayscale(1)",opacity:.4},_e=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,"& img, & svg":{display:"block",maxWidth:p,maxHeight:p},[`& .${o.itemIcon}`]:{width:p,height:p,objectFit:"contain"},...e&&Se})),xe=styled("span",{shouldForwardProp:e=>e!=="$disabled"})(({$disabled:e=false})=>({display:"inline-flex",alignItems:"center",flexShrink:0,...e&&Se})),Ee=styled("img")({width:F,height:F,display:"block"});function b({startAdornment:e,disabled:n=false}){return e==null||e===false?null:jsx(_e,{className:o.startAdornment,$disabled:n,children:e})}function v(){return jsx(Ee,{className:o.arrow,src:xb,alt:""})}function h({trailingHint:e,endAdornment:n,disabled:t=false}){let i=n!=null&&n!==false;return !e&&!i?null:jsxs(Ie,{className:o.rowEnd,children:[e&&jsx(p$1,{title:e.tooltip,placement:"top",children:jsx(ye,{children:jsx(ge,{className:o.trailingDot,$color:e.color??ae})})}),i&&jsx(xe,{className:o.endAdornment,$disabled:t,children:n})]})}function Ce(e,n=false){return n||!!e.trailingHint}function B(e){return createElement("img",{src:e,alt:"",width:p,height:p,className:o.itemIcon})}function O(e,n){return e===void 0?n:e}function Te(e){return e.isVisible!==false}function P(e){return e?.length?e.filter(Te):[]}function ze(e){return e.isVisible!==false}function Ve(e){return e?.length?e.filter(ze).map(n=>({label:n.label,startAdornment:n.icon?B(n.icon):void 0,disabled:n.disabled,trailingHint:n.trailingHint,onClick:n.onClick?t=>{n.onClick?.(t);}:void 0,onRightClick:n.onContextMenu?t=>{t.preventDefault(),n.onContextMenu?.(t);}:void 0})):[]}function Ye(e,n){let t=Ve(e.menuItems);if(!t.length)return;let i=n(e.appCode),c=i?.iconUrl??e.appIcon;return {label:cc(i?.name)??e.appName??e.appCode,startAdornment:c?B(c):void 0,items:t}}function Re(e){return e.map(n=>({...n,items:n.items.filter(Te)})).filter(n=>n.items.length>0)}function we(...e){return e.filter(n=>n===false||n==null?false:n.items.length>0)}function be(e){if(e.length)return {items:e}}function ve(e,n,t){if(n.length)return {title:e,dividerBefore:t?.dividerBefore??false,linked:t?.linked??false,items:n}}function qe(e,n,t){return we(be(e),ve(t,n,{dividerBefore:e.length>0,linked:true}))}function Oe({item:e,onClose:n}){let{label:t,startAdornment:i,endAdornment:c,items:A,trailingHint:y,disabled:r=false}=e,{panelMaxWidth:f,panelMaxHeight:d}=te(),[g,u]=useState(null),M=!!g&&!r,_=useCallback(x=>{r||u(x.currentTarget.firstElementChild);},[r]),s=useCallback(()=>{u(null);},[]),S=useMemo(()=>P(A),[A]);return S.length?jsxs(m,{className:o.flyoutHost,onMouseEnter:_,onMouseLeave:s,children:[jsxs(T,{role:"menuitem","aria-haspopup":"menu","aria-expanded":M,"aria-disabled":r||void 0,className:o.item,$open:M,$disabled:r,children:[jsxs(R,{className:o.itemContent,children:[jsx(b,{startAdornment:i,disabled:r}),jsx(w,{className:o.itemLabel,children:t})]}),jsx(h,{trailingHint:y,endAdornment:O(c,r?null:jsx(v,{})),disabled:r})]}),jsx(fe,{className:o.flyoutPopper,open:M,anchorEl:g,placement:"left-start",children:jsx(C,{role:"menu",$flyout:true,className:o.panel,$maxWidth:f,$maxHeight:d,children:S.map((x,$)=>jsx(H,{item:x,nested:true,onClose:n},`flyout-${$}`))})})]}):null}function He({item:e,linked:n=false,nested:t=false,onClose:i}){let{label:c,startAdornment:A,endAdornment:y,disabled:r=false,onClick:f,onRightClick:d,trailingHint:g}=e,u=!t&&Ce(e,n),M=s=>{r||(s.stopPropagation(),f?.(s),u&&i());},_=r||!d?void 0:s=>{s.preventDefault(),d(s);};return jsxs(T,{role:"menuitem","aria-disabled":r||void 0,className:o.item,$disabled:r,onClick:M,onContextMenu:_,children:[jsxs(R,{className:o.itemContent,children:[jsx(b,{startAdornment:A,disabled:r}),jsx(w,{className:o.itemLabel,children:c})]}),jsx(h,{trailingHint:g,endAdornment:O(y,u?jsx(v,{}):null),disabled:r})]})}function H({item:e,linked:n=false,nested:t=false,onClose:i}){return e.items!==void 0?P(e.items).length?jsx(Oe,{item:e,onClose:i}):null:jsx(He,{item:e,linked:n,nested:t,onClose:i})}var Ue=forwardRef(({id:e,className:n,sx:t,popperSx:i,anchorEl:c,onClose:A,sections:y,placement:r="bottom-end",panelMaxWidth:f,panelMaxHeight:d},g)=>{let u=!!c,M=useMemo(()=>Re(y),[y]),_=useMemo(()=>({panelMaxWidth:f,panelMaxHeight:d}),[f,d]);return u?jsx(D.Provider,{value:_,children:jsxs(me,{className:o.root,children:[jsx(B$1,{onClick:A}),jsx(Ae,{open:u,anchorEl:c,placement:r,className:o.popper,sx:i,children:jsx(C,{ref:g,id:e,role:"menu",className:nc(o.panel,n),sx:t,"data-testid":e??"ActionMenu",$maxWidth:f,$maxHeight:d,children:M.map((s,S)=>jsxs(Fragment,{children:[s.dividerBefore&&S>0?jsx(Ne,{role:"separator",className:o.sectionDivider}):null,s.title?jsx(Me,{role:"presentation",className:o.sectionHeader,children:s.title}):null,s.items.map((x,$)=>jsx(H,{item:x,linked:s.linked,onClose:A},`${S}-${$}`))]},`section-${S}`))})})]})}):null});Ue.displayName="ActionMenu";var ke=memo(Ue);export{o as a,Be as b,U as c,k as d,B as e,Ye as f,we as g,be as h,ve as i,qe as j,ke as k};
@@ -1 +1 @@
1
- import {d,r}from'./chunk-6GZFEPN6.js';import {mc,nc}from'./chunk-Z2DUFVI5.js';import {Td,Ye}from'./chunk-3M2GZVQW.js';import {forwardRef,useState,useMemo,useCallback,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var S="os-shared-Logo",n={root:`${S}-root`,skeleton:`${S}-skeleton`},C="logo";var R=styled(d)(({theme:s})=>({borderRadius:"50%",backgroundColor:s.palette.common.white}));var I=forwardRef(({className:s,sx:f,id:a,src:o,width:g=24,height:d=24,isError:E,isLoading:P,fallback:e,onError:u,alt:U=C},v)=>{let[w,H]=useState(),m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),t=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),r$1=E||!!t&&w===t,M=useMemo(()=>r$1||!o?typeof e=="string"&&e?e:Td:m?Ye:t,[o,e,r$1,m,t]),h=useCallback(j=>{H(t),u?.(j);},[t,u]);return P?jsx(r,{variant:"circular",className:n.skeleton,sx:mc({width:g,height:d,flexShrink:0},f),"data-testid":a??"Logo"}):(r$1||!o)&&e!==void 0&&typeof e!="string"?jsx(Fragment,{children:e}):jsx(R,{ref:v,id:a,"data-testid":a??"Logo",alt:U,src:M,onError:h,className:nc(n.root,s),sx:mc({width:g,height:d,objectFit:m&&o&&!r$1?"none":"contain"},f)})});I.displayName="Logo";var $=memo(I);export{n as a,$ as b};
1
+ import {d,r}from'./chunk-4NLQZJVN.js';import {mc,nc}from'./chunk-EP5VELEJ.js';import {Ud,Ze}from'./chunk-XTJZTHR6.js';import {forwardRef,useState,useMemo,useCallback,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var S="os-shared-Logo",n={root:`${S}-root`,skeleton:`${S}-skeleton`},C="logo";var R=styled(d)(({theme:s})=>({borderRadius:"50%",backgroundColor:s.palette.common.white}));var I=forwardRef(({className:s,sx:f,id:a,src:o,width:g=24,height:d=24,isError:E,isLoading:P,fallback:e,onError:u,alt:U=C},v)=>{let[w,H]=useState(),m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),t=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),r$1=E||!!t&&w===t,M=useMemo(()=>r$1||!o?typeof e=="string"&&e?e:Ud:m?Ze:t,[o,e,r$1,m,t]),h=useCallback(j=>{H(t),u?.(j);},[t,u]);return P?jsx(r,{variant:"circular",className:n.skeleton,sx:mc({width:g,height:d,flexShrink:0},f),"data-testid":a??"Logo"}):(r$1||!o)&&e!==void 0&&typeof e!="string"?jsx(Fragment,{children:e}):jsx(R,{ref:v,id:a,"data-testid":a??"Logo",alt:U,src:M,onError:h,className:nc(n.root,s),sx:mc({width:g,height:d,objectFit:m&&o&&!r$1?"none":"contain"},f)})});I.displayName="Logo";var $=memo(I);export{n as a,$ as b};
@@ -0,0 +1 @@
1
+ import {b,E,d,j,n as n$1,F,p,B,R as R$1,r}from'./chunk-4NLQZJVN.js';import {nc,_b,Mb}from'./chunk-EP5VELEJ.js';import {$e,af,Lj,_e}from'./chunk-XTJZTHR6.js';import {memo,forwardRef,useState,useCallback,useMemo,useReducer,useEffect}from'react';import $ from'dayjs';import Je from'dayjs/plugin/relativeTime';import R from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var n="os-shared-ExportReportButton",t={root:`${n}-root`,trigger:`${n}-trigger`,triggerIcon:`${n}-triggerIcon`,triggerLabel:`${n}-triggerLabel`,triggerProgress:`${n}-triggerProgress`,requestRow:`${n}-requestRow`,requestRowIcon:`${n}-requestRowIcon`,requestRowLabel:`${n}-requestRowLabel`,fileList:`${n}-fileList`,fileRow:`${n}-fileRow`,fileRowIcon:`${n}-fileRowIcon`,fileRowInfo:`${n}-fileRowInfo`,fileRowName:`${n}-fileRowName`,fileRowTime:`${n}-fileRowTime`,fileRowAction:`${n}-fileRowAction`,menuFooter:`${n}-menuFooter`,loadingRow:`${n}-loadingRow`},f={trigger:$e,ready:af,failed:Lj,download:_e};$.extend(Je);var oe=e=>{let o=$(e);return o.isValid()?$().diff(o,"day")<1?o.fromNow():o.format(o.isSame($(),"year")?"DD MMM":"DD MMM, YYYY"):""},Ze=/\.(xlx|xlsx|csv|txt|doc|docx|pdf|jpg|png|gif|zip|rar)$/i,te=(e,o)=>{let p=o??`file_${new Date().toISOString().split("T")[0]}`,d=Ze.exec(e)?.[0]??".csv";return `${p}${d}`};var re={state:"idle"},ro=(e,o)=>{switch(o.type){case "LOADING":return {state:"loading"};case "SUCCESS":return {state:"success"};case "ERROR":return {state:"error"};case "RESET":return re;default:return e}},q=({onDownload:e,onError:o,fileNameFallback:p})=>{let[d,c]=useReducer(ro,re),{state:i}=d;useEffect(()=>{if(i!=="success"&&i!=="error")return;let l=setTimeout(()=>c({type:"RESET"}),3e3);return ()=>clearTimeout(l)},[i]);let m=useCallback(()=>{!e||i==="loading"||(c({type:"LOADING"}),e().then(l=>{c({type:"SUCCESS"}),Mb({type:"url",url:l.url},te(l.fileName,l.downloadName??p));}).catch(l=>{c({type:"ERROR"}),o?.(l);}));},[e,o,p,i]);return {state:i,handleDownload:m}};var ie=e=>typeof e=="string"&&!e.startsWith("$")&&e!=="sx"&&e!=="theme"&&e!=="ownerState"&&e!=="as",le=styled(R)(()=>({position:"relative",display:"inline-block"})),se=styled(b,{shouldForwardProp:ie})(({theme:e,$status:o,$badge:p})=>{let{base:d,border:c,brand:i,error:m,grey:l,success:S}=e.v2.palette;return {position:"relative",height:32,minWidth:0,padding:`0 ${e.v2.spacing(8)}`,border:`1px solid ${c.default}`,borderRadius:e.v2.radius(4),backgroundColor:d.white,color:l[900],fontSize:"11px",fontWeight:500,overflow:"hidden",cursor:"pointer",...o!=="idle"&&{borderBottomColor:"transparent"},...o!=="idle"&&{borderBottomLeftRadius:0,borderBottomRightRadius:0},"&.Mui-disabled":{opacity:1,border:`1px solid ${c.default}`,backgroundColor:d.white,color:l[900]},...p&&{"&:after":{content:'""',width:7,height:7,borderRadius:"50%",position:"absolute",top:5,right:6,border:`1px solid ${d.white}`,backgroundColor:p==="failed"?m[500]:S[700]}},'&[aria-expanded="true"]':{borderColor:i[500],boxShadow:`0px 0px 4px 0px ${alpha(i[500],.5)}`}}}),P=styled(R,{shouldForwardProp:ie})(({theme:e,$status:o})=>({position:"absolute",bottom:0,right:0,left:0,overflow:"hidden",lineHeight:0,[`& .${E.root}`]:{height:2,minHeight:2,minWidth:0,padding:0,borderRadius:0,background:"transparent",display:"block"},[`& .${E.fill}`]:{height:2,minHeight:2,minWidth:0,maxWidth:"none",padding:0,borderRadius:0,display:"block",backgroundColor:o==="ready"?e.v2.palette.success[700]:o==="failed"?e.v2.palette.error[500]:e.v2.palette.brand[500]},[`& .${E.text}`]:{display:"none"}})),ae=styled(R)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),height:32,padding:`${e.v2.spacing(4)} ${e.v2.spacing(8)}`,borderBottom:`1px solid ${e.v2.palette.border.default}`,cursor:"pointer","&:hover":{boxShadow:e.v2.elevation[200]}})),pe=styled(d)(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),de=styled(j)(()=>({fontSize:"11px",fontWeight:400,lineHeight:1.1,textTransform:"uppercase"})),ce=styled(R)(({theme:e})=>({borderTop:`2px solid ${e.v2.palette.border.default}`})),ue=styled(R)(({theme:e})=>({display:"flex",alignItems:"center",gap:e.v2.spacing(8),padding:"5.5px 8px",minHeight:48,height:"auto",borderBottom:`1px solid ${e.v2.palette.border.default}`,cursor:"pointer","&:hover":{boxShadow:e.v2.elevation[200]}})),Re=styled(d)(()=>({width:16,height:16,objectFit:"contain",flexShrink:0,display:"block"})),me=styled(R)(()=>({display:"flex",flexDirection:"column",gap:"2px",minWidth:0,flex:1})),fe=styled(j)(({theme:e})=>({fontSize:"11px",fontWeight:500,lineHeight:1.2,color:e.v2.palette.grey[900],wordBreak:"break-all",paddingInlineEnd:e.v2.spacing(8)})),ge=styled(j)(({theme:e})=>({fontSize:"9px",fontWeight:600,lineHeight:1.2,color:e.v2.palette.grey[500]})),xe=styled(R)(()=>({display:"flex",alignItems:"center",flexShrink:0})),we=styled(R)(({theme:e})=>({backgroundColor:alpha(e.v2.palette.grey[100],.5),backdropFilter:e.v2.blur[2],color:e.v2.palette.grey[900],fontSize:"11px",fontWeight:500,height:31,textAlign:"center",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",overflow:"hidden",borderBottomLeftRadius:e.v2.radius(4),borderBottomRightRadius:e.v2.radius(4)})),ye=styled(R)(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",gap:e.v2.spacing(8),padding:e.v2.spacing(8)}));function io({item:e,onDownloadReport:o,onDownloadError:p,renderIcon:d$1,formatDate:c}){let{state:i,handleDownload:m}=q({onDownload:o?()=>o(e.id):void 0,onError:p,fileNameFallback:e.id}),l=i==="loading"?jsx(n$1,{size:14}):i==="success"?jsx(d,{src:f.ready,alt:"downloaded"}):i==="error"?jsx(d,{src:f.failed,alt:"download failed"}):jsx(d,{src:f.download,alt:"download report",onClick:m});return jsxs(ue,{className:t.fileRow,children:[d$1?d$1(e):jsx(Re,{src:e.fileIconSrc??_b(e.fileName),alt:"report file",className:t.fileRowIcon}),jsxs(me,{className:t.fileRowInfo,children:[jsx(fe,{className:t.fileRowName,children:e.fileName}),jsx(ge,{className:t.fileRowTime,children:(c??oe)(e.createdAt)})]}),jsx(xe,{className:t.fileRowAction,children:l})]})}var he=memo(io);function so(){return jsxs(ye,{className:t.loadingRow,children:[jsx(r,{width:"16px",height:"16px",variant:"rectangular"}),jsx(r,{width:"100%",variant:"text"}),jsx(r,{width:"12px",height:"12px",variant:"circular"})]})}var A=memo(so);function co({row:e,onSelect:o}){let p=e.icon===void 0?jsx(pe,{src:_b(`file.${e.id}`),alt:`${e.id} file`,className:t.requestRowIcon}):e.icon;return jsxs(ae,{onClick:o,className:t.requestRow,children:[p,jsx(de,{className:t.requestRowLabel,children:e.label})]})}var be=memo(co);var go=[{id:"csv",label:"CSV"}],ve=forwardRef(({status:e="idle",progress:o=0,badge:p$1=null,reports:d$1,isLoadingReports:c=false,triggerIcon:i,loadingLabel:m,readyLabel:l,failedLabel:S,requestRows:Ne,renderMenuHeader:O,onDownloadReport:Fe,onDownloadError:Ie,renderReportIcon:Ce,formatReportDate:$e,footer:h,menuPlacement:Pe="bottom-end",menuProps:De,onMenuOpen:W,tooltipTitle:k,id:H,className:Te,sx:ke,...Le},qe)=>{let[z,U]=useState(null),E=!!z,Me=useCallback(s=>{e==="loading"||e==="ready"||(W?.(),U(s.currentTarget));},[e,W]),x=useCallback(()=>{U(null);},[]),Ae=useCallback(s=>{x(),s.onSelect?.();},[x]),Oe=useCallback(s=>{s.stopPropagation(),h?.onClick?.(),x();},[x,h]),{placement:We,sx:b,modifiers:y,...He}=De??{},ze=We??Pe,Ue=useMemo(()=>[{width:208,boxShadow:"0px 8px 30px 0px rgba(0, 0, 0, 0.16)"},...Array.isArray(b)?b:[b]],[b]),_e=useMemo(()=>{let s=[{name:"offset",options:{offset:[0,8]}}];if(!y)return s;let L=Array.isArray(y)?y:[y];return L.some(Qe=>Qe?.name==="offset")?L:[...s,...L]},[y]),Ge=Math.min(100,Math.max(0,o)),Ye=i===void 0?jsx(d,{src:f.trigger,alt:"reports"}):i,Ve=Ne??go,je=e==="loading"?jsxs(Fragment,{children:[jsx(n$1,{size:14}),m!=null?jsx("span",{className:t.triggerLabel,children:m}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:Ge})})]}):e==="ready"?jsxs(Fragment,{children:[jsx(d,{src:f.ready,alt:"ready"}),l!=null?jsx("span",{className:t.triggerLabel,children:l}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:100})})]}):e==="failed"?jsxs(Fragment,{children:[jsx(d,{src:f.failed,alt:"failed"}),S!=null?jsx("span",{className:t.triggerLabel,children:S}):null,jsx(P,{$status:e,className:t.triggerProgress,children:jsx(F,{value:100})})]}):Ye,_=jsx(se,{variant:"secondary",onClick:Me,"aria-haspopup":"menu","aria-expanded":E,$status:e,$badge:e==="idle"?p$1:void 0,className:t.trigger,children:je}),Xe=k!=null&&k!==false?jsx(p,{title:k,...E?{open:false}:{},children:_}):_,Ke=c||(d$1?.length??0)>0;return jsxs(le,{ref:qe,id:H,"data-testid":H??"ExportReportButton",className:nc(t.root,Te),sx:ke,...Le,children:[Xe,E&&jsx(B,{onClose:x}),jsxs(R$1,{open:E,anchorEl:z,placement:ze,sx:Ue,modifiers:_e,...He,children:[O?O({closeMenu:x}):Ve.map(s=>jsx(be,{row:s,onSelect:()=>Ae(s)},s.id)),Ke?jsx(ce,{className:t.fileList,children:c?jsxs(Fragment,{children:[jsx(A,{}),jsx(A,{})]}):d$1?.map(s=>jsx(he,{item:s,onDownloadReport:Fe,onDownloadError:Ie,renderIcon:Ce,formatDate:$e},s.id))}):null,h!=null?jsx(we,{onClick:Oe,className:t.menuFooter,children:h.label}):null]})]})});ve.displayName="ExportReportButton";var xo=memo(ve);export{t as a,q as b,xo as c};
@@ -1 +1 @@
1
- import {a,d,b,c,j as j$1,e}from'./chunk-32GIDLTK.js';import {Bc}from'./chunk-Z2DUFVI5.js';import {fc,gc}from'./chunk-3M2GZVQW.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=Bc(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?fc:gc:t?gc:fc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};
1
+ import {a,d,b,c,j as j$1,e}from'./chunk-UGX2ZY27.js';import {Bc}from'./chunk-EP5VELEJ.js';import {fc,gc}from'./chunk-XTJZTHR6.js';import {memo,useId,useState}from'react';import ee from'@mui/material/ClickAwayListener';import te from'@mui/material/Popper';import {useTranslation}from'react-i18next';import {DateObject,Calendar}from'react-multi-date-picker';import i from'@mui/material/Box';import l from'@mui/material/Button';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var O=styled(l)(()=>({minWidth:"auto",padding:0,"& > img":{cursor:"pointer"}})),z=styled(i)(()=>({position:"relative"})),H=styled(i,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({display:t?"flex":"none",flexDirection:"column",background:e.palette.common.white,boxShadow:e.shadows[9],borderRadius:e.spacing(1),top:37,color:e.palette.text.primary,fontSize:"11px",margin:"8px 0",".rmdp-calendar":{padding:"8px 16px 16px"},".rmdp-rtl *":{fontFamily:"Tajawal"},".rmdp-rtl .sd":{paddingTop:"4px"},".rmdp-wrapper":{position:"relative",borderRadius:"8px",boxShadow:"none"},".rmdp-day span":{fontSize:"11px",fontWeight:500},".rmdp-day, .rmdp-week-day":{width:40,height:40,marginBottom:"2px",padding:"4px",fontSize:"11px",color:e.palette.grey[900]},".rmdp-day-picker":{padding:0},".rmdp-day.rmdp-today span":{backgroundColor:"transparent !important",color:e.palette.info.dark},".rmdp-day.rmdp-today.end span, .rmdp-day.rmdp-today.end span":{color:e.palette.common.white},".rmdp-range, .rmdp-day:not(.rmdp-disabled):not(.rmdp-day-hidden) span:hover":{background:e.palette.info.light,boxShadow:"none",color:e.palette.grey[900]},".rmdp-range-hover.start, .rmdp-range.start, .rmdp-range-hover.end, .rmdp-range.end, .rmdp-rtl .rmdp-range-hover.start, .rmdp-rtl .rmdp-range.start, .rmdp-rtl .rmdp-range-hover.end, .rmdp-rtl .rmdp-range.end":{borderRadius:"50%",background:e.palette.background.gradient.darkShadedBlue,color:e.palette.common.white},".rmdp-range.start:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",right:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.start:after":{right:"unset",left:0},".rmdp-range.end:after":{content:'""',position:"absolute",background:e.palette.info.light,height:"100%",width:"50%",left:0,top:0,zIndex:-1},".rmdp-rtl .rmdp-range.end:after":{left:"unset",right:0},".rmdp-week-day":{color:e.palette.grey[700],marginBottom:"4px",fontSize:"11px",padding:"4px"},".rmdp-header-values":{color:e.palette.grey[900],fontSize:"12px",fontWeight:500,lineHeight:"20px",letterSpacing:"0.1px"},".rmdp-header-values span:nth-of-type(2)":{display:"none"},".rmdp-header":{padding:"4px 0",margin:0,fontSize:"12px"},".rmdp-top-class":{display:"block !important"},".rmdp-day.rmdp-selected span:not(.highlight)":{background:e.palette.info.dark},".rmdp-day.start.end":{overflow:"hidden"}})),j=styled(l,{shouldForwardProp:t=>t!=="open"})(({open:t,theme:e})=>({color:e.palette.text.primary,fontSize:"11px",fontWeight:500,padding:e.spacing(1),borderRadius:"4px",border:"1px solid",borderColor:e.palette.divider,background:e.palette.common.white,textTransform:"none",height:32,...t&&{border:"1px solid",borderColor:e.palette.info.dark,boxShadow:e.shadows[7]}})),A=styled(i)(({theme:t})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:8,padding:"16px",borderTop:`1px solid ${t.palette.divider}`})),E=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",background:"transparent",color:t.palette.text.primary,border:"1px solid",borderColor:t.palette.divider,fontWeight:500,borderRadius:"4px","&:hover":{background:"transparent",color:t.palette.text.primary}})),Y=styled(l)(({theme:t})=>({textTransform:"capitalize",padding:"8px 24px",width:75,height:32,fontSize:"11px",borderRadius:"4px",fontWeight:700,background:t.palette.info.dark,"&:hover":{background:t.palette.info.dark}})),F=styled(i)(()=>({display:"flex",gap:"8px"}));var ne=["Su","Mo","Tu","We","Th","Fr","Sa"];function ae({isAr:t=false,value:e$1,setValue:y,enableTimePicker:p,placement:L,sx:R,...N}){let V=Bc(useId(),"calender"),[w,k]=useState(null),[C,$]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),[D,g]=useState(e$1?new DateObject(new Date(e$1.toLocaleString())):new DateObject(new Date)),q=e$1?.hour?a(e$1.hour):d(),G=e$1?.hour?b(e$1.hour):b(new Date().getHours()),[a$1,J]=useState({hour:q,minute:e$1?.minute??c(),period:G}),{t:B}=useTranslation(),u=!!w,K=r=>r==="right"?t?fc:gc:t?gc:fc,Q=r=>{k(r.currentTarget);},f=()=>{k(null);},U=()=>{let r=a$1.hour;p&&(r=e(a$1.hour,a$1.period||"AM"));let d=p?D.setHour(r).setMinute(a$1.minute):D;$(d),y&&y(d),f();},X=r=>{J(r);};return jsx(ee,{onClickAway:f,children:jsxs(z,{sx:{...R},id:V,"data-testid":"Calender",children:[jsx(j,{onClick:Q,open:u,className:"date-button",children:C.format("MMM D, YYYY")}),jsx(te,{open:u,anchorEl:w,placement:L,children:jsxs(H,{className:"calender-content",open:u,children:[jsx(Calendar,{numberOfMonths:1,format:"MMM DD YYYY",monthYearSeparator:" ",renderButton:(r,d)=>jsx(O,{onClick:d,children:jsx("img",{src:K(r),alt:"arrow"})}),onMonthChange:r=>{g(r);},onYearChange:r=>{g(r);},onChange:r=>{g(r);},weekDays:t?void 0:ne,minDate:new Date,value:C,...N}),jsxs(A,{sx:{...p&&{justifyContent:"space-between"}},children:[p&&jsx(j$1,{enableRealTimeChange:true,onChange:X,defaultTime:a$1}),jsxs(F,{children:[jsx(E,{variant:"contained",onClick:f,children:B("cancel")}),jsx(Y,{variant:"contained",onClick:U,children:B("okay")})]})]})]})})]})})}var I=memo(ae);var Te=I;export{Te as a};
@@ -1 +1 @@
1
- import {j,d,n}from'./chunk-6GZFEPN6.js';import {Wb,nc}from'./chunk-Z2DUFVI5.js';import {Dj,Kj,Qe}from'./chunk-3M2GZVQW.js';import {forwardRef,useState,useCallback,useImperativeHandle,useEffect,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var i="os-shared-FileDropbox",e={root:`${i}-root`,header:`${i}-header`,title:`${i}-title`,format:`${i}-format`,zone:`${i}-zone`,content:`${i}-content`,textWrapper:`${i}-textWrapper`,maximum:`${i}-maximum`,upload:`${i}-upload`,uploadAgain:`${i}-uploadAgain`};var y=styled("div")(({theme:o})=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:o.v2.spacing(32)})),f=styled("div")(()=>({paddingInline:"40px"})),s=styled(j,{shouldForwardProp:o=>o!=="$isError"})(({theme:o,$isError:l})=>{let{base:n,error:b}=o.v2.palette;return {color:l?b[500]:n.black,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:o.v2.spacing(8)}});styled(j)(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}});var u=styled("div",{shouldForwardProp:o=>o!=="$width"})(({theme:o,$width:l})=>{let{grey:n}=o.v2.palette;return {width:l||431,minHeight:176,border:"1px dashed #DDDDDD",borderRadius:o.v2.radius(8),padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n[50]}}),g=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(24),color:"inherit",fontSize:"14px",lineHeight:"20px",cursor:"default"})),I=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(8),color:"inherit"})),w=styled("div")(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}}),O=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),Q=styled("button")(({theme:o})=>{let{base:l,grey:n}=o.v2.palette;return {color:l.black,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:o.v2.radius(4),border:`1px solid ${n[100]}`,backgroundColor:l.white,cursor:"pointer"}});var _=forwardRef(function({accept:l,footer:n$1,options:b,isLoading:S,progress:ee,error:P,errorHint:oe,subtitle:h,isSuccess:T,action:te,title:a,width:N,progressVariant:re,className:C,sx:$,id:d$1,invalidFileTypeText:R="Invalid file type",fileTooLargePrefix:j="File is larger than",uploadingText:le="Uploading...",waitText:ae="Please wait",uploadBulkFileText:ie="Upload bulk file",uploadAgainText:pe="Upload again",clickToUploadText:ne="Click to upload",orDragAndDropText:se="or drag and drop",maximumFileSizePrefix:de="Maximum file size",supportedFormatsPrefix:A="Supported formats"},xe){let[x,M]=useState([]),{getRootProps:ce,getInputProps:me,open:D,acceptedFiles:Z,isDragReject:E,fileRejections:m}=useDropzone(b),B=useCallback(()=>{M([]);},[]);useImperativeHandle(xe,()=>({open:D,clear:B}),[D,B]),useEffect(()=>{M(Z);},[Z]);let v=Wb(b?.maxSize||0,0).toUpperCase(),c=useMemo(()=>{let be=m.length>0&&m[0].errors.some(W=>W.code==="file-invalid-type"),De=m.length>0&&m[0].errors.some(W=>W.code==="file-too-large");return E||be?R:De?`${j} ${v}`:P},[E,P,m,v,R,j]),z=useMemo(()=>x.length?jsxs(I,{className:e.textWrapper,children:[jsx("span",{children:x[0].name}),jsx(w,{className:e.maximum,children:Wb(x[0].size)})]}):null,[x]);return T&&x.length&&!S?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:"File uploaded"}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[T&&jsx(d,{src:Dj,alt:"Upload complete",sx:{width:56,height:56}}),z]})}),n$1]}):S&&x.length?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[a&&typeof a!="string"?a:jsxs(Fragment,{children:[jsx(s,{className:e.title,children:typeof a=="string"?a:le}),jsx("span",{className:e.format,children:ae})]}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[S&&jsx(n,{size:56,value:ee,variant:re??"determinate"}),z]})}),n$1]}):jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[c?jsx(s,{$isError:true,className:e.title,children:c}):typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:ie}),h||!!c&&jsx("span",{className:e.format,children:`${A}: xls, xlsx`})]}),jsxs(u,{className:e.zone,$width:N,...ce(),children:[jsx("input",{...me()}),jsxs(g,{"data-slot":"content",className:e.content,children:[jsx(d,{src:c?Kj:Qe,alt:c?"Upload error":"Upload file",sx:{width:56,height:56}}),oe,z,te??jsx(Fragment,{children:c?jsx(Q,{type:"button",className:e.uploadAgain,onClick:D,children:pe}):jsxs(I,{className:e.textWrapper,children:[jsxs("span",{children:[jsx(O,{className:e.upload,onClick:D,children:ne})," ",se]}),jsxs(w,{className:e.maximum,children:[de," ",v]}),l&&jsxs("span",{className:e.format,children:[A," ",l]})]})})]})]}),n$1]})});_.displayName="FileDropbox";var L=memo(_);export{e as a,L as b};
1
+ import {j,d,n}from'./chunk-4NLQZJVN.js';import {Wb,nc}from'./chunk-EP5VELEJ.js';import {Ej,Lj,Re}from'./chunk-XTJZTHR6.js';import {forwardRef,useState,useCallback,useImperativeHandle,useEffect,useMemo,memo}from'react';import {useDropzone}from'react-dropzone';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var i="os-shared-FileDropbox",e={root:`${i}-root`,header:`${i}-header`,title:`${i}-title`,format:`${i}-format`,zone:`${i}-zone`,content:`${i}-content`,textWrapper:`${i}-textWrapper`,maximum:`${i}-maximum`,upload:`${i}-upload`,uploadAgain:`${i}-uploadAgain`};var y=styled("div")(({theme:o})=>({textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",gap:o.v2.spacing(32)})),f=styled("div")(()=>({paddingInline:"40px"})),s=styled(j,{shouldForwardProp:o=>o!=="$isError"})(({theme:o,$isError:l})=>{let{base:n,error:b}=o.v2.palette;return {color:l?b[500]:n.black,fontSize:"18px",fontWeight:600,lineHeight:"20px",marginBottom:o.v2.spacing(8)}});styled(j)(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}});var u=styled("div",{shouldForwardProp:o=>o!=="$width"})(({theme:o,$width:l})=>{let{grey:n}=o.v2.palette;return {width:l||431,minHeight:176,border:"1px dashed #DDDDDD",borderRadius:o.v2.radius(8),padding:"24px 0",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n[50]}}),g=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(24),color:"inherit",fontSize:"14px",lineHeight:"20px",cursor:"default"})),I=styled("div")(({theme:o})=>({display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:o.v2.spacing(8),color:"inherit"})),w=styled("div")(({theme:o})=>{let{base:l}=o.v2.palette;return {color:alpha(l.black,.7),fontSize:"12px",fontWeight:500,lineHeight:"20px"}}),O=styled("span")(()=>({fontWeight:600,textDecorationLine:"underline",cursor:"pointer"})),Q=styled("button")(({theme:o})=>{let{base:l,grey:n}=o.v2.palette;return {color:l.black,fontSize:"12px",fontWeight:500,lineHeight:"20px",padding:"4px 12px",borderRadius:o.v2.radius(4),border:`1px solid ${n[100]}`,backgroundColor:l.white,cursor:"pointer"}});var _=forwardRef(function({accept:l,footer:n$1,options:b,isLoading:S,progress:ee,error:P,errorHint:oe,subtitle:h,isSuccess:T,action:te,title:a,width:N,progressVariant:re,className:C,sx:$,id:d$1,invalidFileTypeText:R="Invalid file type",fileTooLargePrefix:j="File is larger than",uploadingText:le="Uploading...",waitText:ae="Please wait",uploadBulkFileText:ie="Upload bulk file",uploadAgainText:pe="Upload again",clickToUploadText:ne="Click to upload",orDragAndDropText:se="or drag and drop",maximumFileSizePrefix:de="Maximum file size",supportedFormatsPrefix:A="Supported formats"},xe){let[x,M]=useState([]),{getRootProps:ce,getInputProps:me,open:D,acceptedFiles:Z,isDragReject:E,fileRejections:m}=useDropzone(b),B=useCallback(()=>{M([]);},[]);useImperativeHandle(xe,()=>({open:D,clear:B}),[D,B]),useEffect(()=>{M(Z);},[Z]);let v=Wb(b?.maxSize||0,0).toUpperCase(),c=useMemo(()=>{let be=m.length>0&&m[0].errors.some(W=>W.code==="file-invalid-type"),De=m.length>0&&m[0].errors.some(W=>W.code==="file-too-large");return E||be?R:De?`${j} ${v}`:P},[E,P,m,v,R,j]),z=useMemo(()=>x.length?jsxs(I,{className:e.textWrapper,children:[jsx("span",{children:x[0].name}),jsx(w,{className:e.maximum,children:Wb(x[0].size)})]}):null,[x]);return T&&x.length&&!S?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:"File uploaded"}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[T&&jsx(d,{src:Ej,alt:"Upload complete",sx:{width:56,height:56}}),z]})}),n$1]}):S&&x.length?jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[a&&typeof a!="string"?a:jsxs(Fragment,{children:[jsx(s,{className:e.title,children:typeof a=="string"?a:le}),jsx("span",{className:e.format,children:ae})]}),h]}),jsx(u,{className:e.zone,$width:N,children:jsxs(g,{"data-slot":"content",className:e.content,children:[S&&jsx(n,{size:56,value:ee,variant:re??"determinate"}),z]})}),n$1]}):jsxs(y,{id:d$1,"data-testid":d$1??"FileDropbox",className:nc(e.root,C),sx:$,children:[jsxs(f,{className:e.header,children:[c?jsx(s,{$isError:true,className:e.title,children:c}):typeof a=="string"?jsx(s,{className:e.title,children:a}):a??jsx(s,{className:e.title,children:ie}),h||!!c&&jsx("span",{className:e.format,children:`${A}: xls, xlsx`})]}),jsxs(u,{className:e.zone,$width:N,...ce(),children:[jsx("input",{...me()}),jsxs(g,{"data-slot":"content",className:e.content,children:[jsx(d,{src:c?Lj:Re,alt:c?"Upload error":"Upload file",sx:{width:56,height:56}}),oe,z,te??jsx(Fragment,{children:c?jsx(Q,{type:"button",className:e.uploadAgain,onClick:D,children:pe}):jsxs(I,{className:e.textWrapper,children:[jsxs("span",{children:[jsx(O,{className:e.upload,onClick:D,children:ne})," ",se]}),jsxs(w,{className:e.maximum,children:[de," ",v]}),l&&jsxs("span",{className:e.format,children:[A," ",l]})]})})]})]}),n$1]})});_.displayName="FileDropbox";var L=memo(_);export{e as a,L as b};
@@ -1 +1 @@
1
- import {p as p$1}from'./chunk-6GZFEPN6.js';import {Bc,f}from'./chunk-Z2DUFVI5.js';import {ob}from'./chunk-3M2GZVQW.js';import {useId}from'react';import {useTranslation}from'react-i18next';import {styled}from'@mui/material';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var p=t=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}}),s=styled(motion.span)(({order:t})=>({zIndex:(t||0)+1}));var g=({children:t})=>jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2px"},children:t});function x({value:t,index:o}){let m=Bc(useId(),"rating-count"),{t:d}=useTranslation();return jsx(p$1,{title:d("totalPaymentCount",{amount:f(t)}),wrapperProps:{display:"inline-flex"},children:jsx(s,{id:m,order:o,variants:p(o),"data-testid":"RatingCount",children:jsxs(g,{children:[jsx("img",{src:ob,alt:"star",style:{width:"10px",height:"10px"}})," ",(t||0)>1&&jsx("span",{style:{fontSize:"9.782px"},children:t})]})})})}export{x as a};
1
+ import {p as p$1}from'./chunk-4NLQZJVN.js';import {Bc,f}from'./chunk-EP5VELEJ.js';import {ob}from'./chunk-XTJZTHR6.js';import {useId}from'react';import {useTranslation}from'react-i18next';import {styled}from'@mui/material';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var p=t=>({start:{x:t*6,transition:{duration:.3,type:"tween",ease:"easeIn"}},animate:{x:t*39,transition:{duration:.3,type:"tween",ease:"easeOut"}}}),s=styled(motion.span)(({order:t})=>({zIndex:(t||0)+1}));var g=({children:t})=>jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:"2px"},children:t});function x({value:t,index:o}){let m=Bc(useId(),"rating-count"),{t:d}=useTranslation();return jsx(p$1,{title:d("totalPaymentCount",{amount:f(t)}),wrapperProps:{display:"inline-flex"},children:jsx(s,{id:m,order:o,variants:p(o),"data-testid":"RatingCount",children:jsxs(g,{children:[jsx("img",{src:ob,alt:"star",style:{width:"10px",height:"10px"}})," ",(t||0)>1&&jsx("span",{style:{fontSize:"9.782px"},children:t})]})})})}export{x as a};
@@ -1 +1 @@
1
- import {j}from'./chunk-6GZFEPN6.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-4NLQZJVN.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};