@abtnode/webapp 1.17.2-beta-20251113-233643-ab2254af → 1.17.2-beta-20251114-122922-4319f1ac

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 (187) hide show
  1. package/blocklet.js +1 -1
  2. package/blocklet.yml +1 -1
  3. package/dist/assets/{AdapterDayjs-DQsJKRTd.js → AdapterDayjs-D0cLXAfS.js} +1 -1
  4. package/dist/assets/{Add-C2S1tD4f.js → Add-B3d7_zzZ.js} +1 -1
  5. package/dist/assets/ArrowDropDown-zJW31gau.js +1 -0
  6. package/dist/assets/{Autocomplete-DnmRh5SU.js → Autocomplete-0I-N74lH.js} +1 -1
  7. package/dist/assets/{Breadcrumbs-DtvdoZN2.js → Breadcrumbs-D5zIxo4Z.js} +1 -1
  8. package/dist/assets/{ButtonGroup-8TrbqvjP.js → ButtonGroup-D9IPG5yn.js} +1 -1
  9. package/dist/assets/{CSSTransition-DVV9iF5-.js → CSSTransition-CCwAGfFQ.js} +1 -1
  10. package/dist/assets/{CallMerge-CNfyLnqE.js → CallMerge-CHTwLv_7.js} +1 -1
  11. package/dist/assets/{CardContent-D_djaPAt.js → CardContent-BZ0pvDsU.js} +1 -1
  12. package/dist/assets/{ChevronLeft-ChcOz9av.js → ChevronLeft-6ufSrKPV.js} +1 -1
  13. package/dist/assets/{ChevronRight-omU8k6vy.js → ChevronRight-CGaNHLdw.js} +1 -1
  14. package/dist/assets/{Clear-Ytt0D6Zf.js → Clear-Dt0hyqhf.js} +1 -1
  15. package/dist/assets/{DeleteOutline-JJiiSSnE.js → DeleteOutline-0R63bFW8.js} +1 -1
  16. package/dist/assets/{Done-9vfJAIad.js → Done-ClGofsEn.js} +1 -1
  17. package/dist/assets/{Edit-orm27D3o.js → Edit-YSP2IAxH.js} +1 -1
  18. package/dist/assets/{ErrorOutline-JOpSFuo5.js → ErrorOutline-B1PWzaTM.js} +1 -1
  19. package/dist/assets/{FilterList-BTymfTsJ.js → FilterList-B3p8Dk3n.js} +1 -1
  20. package/dist/assets/{Google-f1kn3WZC.js → Google-DMcTfqhq.js} +1 -1
  21. package/dist/assets/{HelpOutline-B2l8QmSS.js → HelpOutline-DfIJeCej.js} +1 -1
  22. package/dist/assets/{KeyboardArrowDown-BxUwan0-.js → KeyboardArrowDown-DfyHLTf0.js} +1 -1
  23. package/dist/assets/{Launch-DH6gQb8O.js → Launch-DEN7yCJR.js} +1 -1
  24. package/dist/assets/{Link-CwsNTZex.js → Link-1T8-nPwV.js} +1 -1
  25. package/dist/assets/{ListItemButton-Bu7kjkSw.js → ListItemButton-BfGrck0H.js} +1 -1
  26. package/dist/assets/{ListSubheader-B5GkjVYh.js → ListSubheader-xLMEOWZA.js} +1 -1
  27. package/dist/assets/{LoadingButton-B7Bb65VL.js → LoadingButton-BiHJtKfE.js} +1 -1
  28. package/dist/assets/{MoreVert-B35eVFHe.js → MoreVert-CwwnSp8i.js} +1 -1
  29. package/dist/assets/{OpenInNew-hfB_sW59.js → OpenInNew-DaO5kXbV.js} +1 -1
  30. package/dist/assets/{Refresh-B5DSbncu.js → Refresh-CGb4dm1q.js} +1 -1
  31. package/dist/assets/{Search-RYd18IR_.js → Search-Bi-YajvD.js} +1 -1
  32. package/dist/assets/{Stepper-DLLX6774.js → Stepper-B41BaX9a.js} +1 -1
  33. package/dist/assets/{Switch-a2y_6MhM.js → Switch-C0Dt_Fvl.js} +1 -1
  34. package/dist/assets/{TableSearch-evrlUlGg.js → TableSearch-9LdRBcNX.js} +1 -1
  35. package/dist/assets/{ToggleButtonGroup-Ca35BI7a.js → ToggleButtonGroup-5F0k2zsa.js} +1 -1
  36. package/dist/assets/{UnfoldMore-BbsHRL_Z.js → UnfoldMore-DtaCJX0L.js} +1 -1
  37. package/dist/assets/{Verified-COBKUjb3.js → Verified-J_T0jmwe.js} +1 -1
  38. package/dist/assets/{VerifiedUser-CxIHcIGY.js → VerifiedUser-CH1-kUM_.js} +1 -1
  39. package/dist/assets/{ViewList-rR2vk8He.js → ViewList-BrhCMDap.js} +1 -1
  40. package/dist/assets/{_createAggregator-BEXGgJQ6.js → _createAggregator-DOp4AOdo.js} +1 -1
  41. package/dist/assets/{actions-DSRLa5As.js → actions-DJXYvOHa.js} +1 -1
  42. package/dist/assets/{actions-YIixnDsn.js → actions-Ga2fzCsK.js} +1 -1
  43. package/dist/assets/{agreement-BtUpbeW_.js → agreement-D3mtLrzi.js} +1 -1
  44. package/dist/assets/api-Ci9MtLEy.js +1 -0
  45. package/dist/assets/{appearance-C4V8xzr9.js → appearance-Cq-wXBob.js} +1 -1
  46. package/dist/assets/{audit-logs-Boa9SwSE.js → audit-logs-MjFk3o6E.js} +1 -1
  47. package/dist/assets/{base-chart-BjkdsChl.js → base-chart-DMmncGBc.js} +1 -1
  48. package/dist/assets/{blocklet-BXVjEyPJ.js → blocklet-DVSLRqIf.js} +1 -1
  49. package/dist/assets/{chain-oDiP3GSd.js → chain-BRLqhFrQ.js} +1 -1
  50. package/dist/assets/{click-to-copy-DeMkY9bE.js → click-to-copy-DWF7UuYq.js} +1 -1
  51. package/dist/assets/cloneDeep-OdVwGc4t.js +1 -0
  52. package/dist/assets/{collapse-ypqWv-nT.js → collapse-BEN1vMis.js} +1 -1
  53. package/dist/assets/{config-navigation-Buhw_AXT.js → config-navigation-vpkuaLnP.js} +30 -30
  54. package/dist/assets/{connect-to-N_DVfr0G.js → connect-to-CuWOOvAx.js} +2 -2
  55. package/dist/assets/{cssMode-C0Aoeqyv.js → cssMode-BwSnIhwg.js} +1 -1
  56. package/dist/assets/{delete-confirm-Bj9YOLOi.js → delete-confirm-CaMVVeBm.js} +1 -1
  57. package/dist/assets/{depsEqual-XzMty67o.js → depsEqual-_xQRTFyO.js} +1 -1
  58. package/dist/assets/{detail-NjQDNean.js → detail-D8Bq-62X.js} +3 -3
  59. package/dist/assets/{domains-VvXrKVCr.js → domains-PrGBCnzX.js} +1 -1
  60. package/dist/assets/{download-CpUsigy2.js → download-DoLqMdD-.js} +1 -1
  61. package/dist/assets/{edit.svg-BTHe2w-A.js → edit.svg-CG7XSZQC.js} +1 -1
  62. package/dist/assets/emotion-cache.browser.esm-CKuFWOIj.js +1 -0
  63. package/dist/assets/engine-PslAw48s.js +1 -0
  64. package/dist/assets/{freemarker2-C5D3ahmR.js → freemarker2-BElYlETw.js} +1 -1
  65. package/dist/assets/{get-safe-url-0QzE8yuB.js → get-safe-url-Dgrm96lK.js} +1 -1
  66. package/dist/assets/getValidReactChildren-BJNb29cM.js +1 -0
  67. package/dist/assets/{graphqlMode-DfVSu0eo.js → graphqlMode-DCN4FmlG.js} +2 -2
  68. package/dist/assets/{handlebars-DKZLDsH9.js → handlebars-BEP-oddQ.js} +1 -1
  69. package/dist/assets/{html-CFPB7lt0.js → html-C3rnO0S-.js} +1 -1
  70. package/dist/assets/{html-title-D1fKy5js.js → html-title-DHS4olpg.js} +1 -1
  71. package/dist/assets/{htmlMode-Dql3ZF5b.js → htmlMode-Czvf-Uhy.js} +1 -1
  72. package/dist/assets/{iframe-DT83cbIK.js → iframe-B9O5EPZl.js} +1 -1
  73. package/dist/assets/{index-iIXAQKfX.js → index-8D7w8U3u.js} +1 -1
  74. package/dist/assets/{index-BU2mX_wB.js → index-B-2MWuUJ.js} +1 -1
  75. package/dist/assets/{index-yzuP1lcr.js → index-B-XlJyJf.js} +55 -55
  76. package/dist/assets/{index-Dkzomygn.js → index-B1qnUzij.js} +1 -1
  77. package/dist/assets/{index-BuNajQmZ.js → index-B9S0mVRa.js} +1 -1
  78. package/dist/assets/{index-880QSaqg.js → index-B9VC7-LR.js} +1 -1
  79. package/dist/assets/{index-DZ-pQrDG.js → index-BE8BvDvC.js} +1 -1
  80. package/dist/assets/{index-43gui-m-.js → index-BKz7TNe3.js} +1 -1
  81. package/dist/assets/{index-_kFvQXqG.js → index-BPaxAeoj.js} +1 -1
  82. package/dist/assets/{index-DbdAcpOK.js → index-BTr-kmj2.js} +1 -1
  83. package/dist/assets/{index-CwoqiLWj.js → index-BcE_7nF_.js} +1 -1
  84. package/dist/assets/{index-B57lTY3n.js → index-BclvvolB.js} +9 -9
  85. package/dist/assets/{index-DAQKjLH3.js → index-BnaKcKGB.js} +1 -1
  86. package/dist/assets/{index-CwUysL4G.js → index-Bt_5CBkZ.js} +3 -3
  87. package/dist/assets/index-Bx9hvZ2j.js +1 -0
  88. package/dist/assets/{index-CfhKV_Zu.js → index-BxfuJl9z.js} +1 -1
  89. package/dist/assets/{index-e6yDUbm3.js → index-C3n0A7Wo.js} +1 -1
  90. package/dist/assets/{index-pnHN6dbB.js → index-C5GU1sOn.js} +1 -1
  91. package/dist/assets/{index-Bjp9Wb1C.js → index-C5O1HTvk.js} +1 -1
  92. package/dist/assets/{index-B8nklI_1.js → index-CK4h16Ng.js} +1 -1
  93. package/dist/assets/{index-By3PJdbl.js → index-CLRhW0KY.js} +1 -1
  94. package/dist/assets/{index-a3L7dRi2.js → index-CXV4_C7z.js} +1 -1
  95. package/dist/assets/{index-hDNojNfK.js → index-CdpQ8sIS.js} +1 -1
  96. package/dist/assets/{index-DXQl9sdd.js → index-CjIbdUHf.js} +1 -1
  97. package/dist/assets/{index-DA1xQ6aT.js → index-CnxUDTHr.js} +1 -1
  98. package/dist/assets/{index-Ds0pI2MN.js → index-Cq1JH1Y4.js} +1 -1
  99. package/dist/assets/{index-CE4NVT8S.js → index-CuHnxOLh.js} +1 -1
  100. package/dist/assets/{index-BwPlvUbF.js → index-CwANo9eb.js} +1 -1
  101. package/dist/assets/{index-DLWYKOa1.js → index-Cx-nJXbQ.js} +1 -1
  102. package/dist/assets/{index-DZBBfslm.js → index-D0J6_BcM.js} +3 -3
  103. package/dist/assets/{index-DVZDDKuE.js → index-DEcX5t7S.js} +1 -1
  104. package/dist/assets/{index-BYKTh3eH.js → index-DN6IKqgo.js} +1 -1
  105. package/dist/assets/{index-DY-qXgg4.js → index-DSJksWWO.js} +2 -2
  106. package/dist/assets/{index-BdMeVTpA.js → index-DZVutCI3.js} +1 -1
  107. package/dist/assets/{index-Dk_tfBqj.js → index-DcLmyb-h.js} +1 -1
  108. package/dist/assets/{index-DiMrHVHN.js → index-DpTAGAPn.js} +1 -1
  109. package/dist/assets/{index-CZUxUeSB.js → index-DrXXeW3X.js} +1 -1
  110. package/dist/assets/{index-C6mEftvT.js → index-DrubGabU.js} +1 -1
  111. package/dist/assets/{index-RR_mab9N.js → index-EU5x0IAZ.js} +1 -1
  112. package/dist/assets/{index-CvjvDKy3.js → index-WLf_2v7n.js} +1 -1
  113. package/dist/assets/{index-WiW9LwVi.js → index-WNsZsBTS.js} +3 -3
  114. package/dist/assets/{index-C22R5wN8.js → index-Xt6hlkCI.js} +3 -3
  115. package/dist/assets/{index-rEfSjDK2.js → index-bpG0pZjZ.js} +1 -1
  116. package/dist/assets/{index-B1_o35DF.js → index-gdVod9Z3.js} +1 -1
  117. package/dist/assets/{index-CdfV_u3p.js → index-r2pjeedy.js} +1 -1
  118. package/dist/assets/{index-aBYVnSTR.js → index-yswwzF5j.js} +73 -73
  119. package/dist/assets/{index.esm-C-nndHoP.js → index.esm-BoYu4gmv.js} +1 -1
  120. package/dist/assets/{install-from-url-sGiBW9Yd.js → install-from-url-BDMdSWzJ.js} +1 -1
  121. package/dist/assets/{invitation-CHznZcgk.js → invitation-BdXUGKdX.js} +1 -1
  122. package/dist/assets/{is-path-prefix-equal-D6DOsMW2.js → is-path-prefix-equal-B1WnAsgG.js} +1 -1
  123. package/dist/assets/{item-CR3hoH8K.js → item-VbrNpj7t.js} +1 -1
  124. package/dist/assets/{javascript-BAgsa74w.js → javascript-D9xn7kxU.js} +1 -1
  125. package/dist/assets/{jsonMode-Ca-a4-xT.js → jsonMode-B4Apz4XP.js} +1 -1
  126. package/dist/assets/{liquid-DJweRGJM.js → liquid-DlI4PyMT.js} +1 -1
  127. package/dist/assets/{list-header-BSY6upcK.js → list-header-BFjz06wX.js} +1 -1
  128. package/dist/assets/{lock.svg-sdmYxyfy.js → lock.svg-ChZIphaY.js} +1 -1
  129. package/dist/assets/{log-CVncFejl.js → log-DAkNpV9O.js} +1 -1
  130. package/dist/assets/{lottie-react.esm-BqnYaosc.js → lottie-react.esm-pkCt4R1C.js} +1 -1
  131. package/dist/assets/{mdx-DAWD9b44.js → mdx-Ca-HUAez.js} +1 -1
  132. package/dist/assets/{memory-BqbHRT9O.js → memory-CYXbJqaR.js} +1 -1
  133. package/dist/assets/{metric-DqCTJGft.js → metric-BAhgGFRF.js} +1 -1
  134. package/dist/assets/omit-ipJjNEcK.js +1 -0
  135. package/dist/assets/{overview-xsNpyamP.js → overview-DXqbO70Q.js} +1 -1
  136. package/dist/assets/{permission-DmTi5mXJ.js → permission-BgQoDLVn.js} +1 -1
  137. package/dist/assets/{preference-BcvkIXHx.js → preference-Dqyoh-a7.js} +3 -3
  138. package/dist/assets/{python-45sE_R-k.js → python-CWaxrDkb.js} +1 -1
  139. package/dist/assets/{raf-schd.esm-It72qtsD.js → raf-schd.esm-Dp4wpXfJ.js} +1 -1
  140. package/dist/assets/{razor-DSc0mwXv.js → razor-8og5qUho.js} +1 -1
  141. package/dist/assets/{rotate-session-key-CS2ykNao.js → rotate-session-key-gvt7LsWM.js} +1 -1
  142. package/dist/assets/{runtime-CQnL9CfB.js → runtime-D639z2CO.js} +1 -1
  143. package/dist/assets/schema-L4m59WPk.js +1 -0
  144. package/dist/assets/sdk-C8XgFCDF.js +1 -0
  145. package/dist/assets/{service-CbLbnYOe.js → service-DLV0T515.js} +1 -1
  146. package/dist/assets/{shorten-label-ulXVKXIN.js → shorten-label-B5mMaxtE.js} +1 -1
  147. package/dist/assets/{simple-select-CFuzpVge.js → simple-select-D4JrbjxX.js} +1 -1
  148. package/dist/assets/{spaces-BoQFbvco.js → spaces-B8l4WuO1.js} +1 -1
  149. package/dist/assets/{status-vNfTBkWJ.js → status-4oIdRCAM.js} +1 -1
  150. package/dist/assets/{status-BwtVqzI0.js → status-Cjy8ZJ51.js} +1 -1
  151. package/dist/assets/{switch-control-D0uB-xSQ.js → switch-control-3Hqb_lxC.js} +1 -1
  152. package/dist/assets/{table-icons-D8N5X8JR.js → table-icons-hlEFhm7I.js} +1 -1
  153. package/dist/assets/{team-Bajd4c5N.js → team-C313mivA.js} +1 -1
  154. package/dist/assets/{toLower-BDjIHXoL.js → toLower-BxEt1Cd_.js} +1 -1
  155. package/dist/assets/toUpper-CzuWgeyR.js +1 -0
  156. package/dist/assets/{traffic-Cb7-9lQ_.js → traffic-Ddp7SazS.js} +1 -1
  157. package/dist/assets/{tsMode-BEGU8m1Z.js → tsMode-D4tIq4nC.js} +1 -1
  158. package/dist/assets/{typescript-C9o0Vlke.js → typescript-B74Z45Qd.js} +1 -1
  159. package/dist/assets/{url-evaluation-B6pt_9tS.js → url-evaluation-f0Hob2_O.js} +1 -1
  160. package/dist/assets/{url-join-DEpgB4Oz.js → url-join-CiVdPmGT.js} +1 -1
  161. package/dist/assets/{use-mobile-DnFiqY3y.js → use-mobile-C3ui16GK.js} +1 -1
  162. package/dist/assets/{use-mobile-BXkW8fC_.js → use-mobile-XcY2Cyny.js} +1 -1
  163. package/dist/assets/{useAsync-93NQ2xVM.js → useAsync-Cwoo89lE.js} +1 -1
  164. package/dist/assets/{useAsyncRetry-D42TQZsC.js → useAsyncRetry-BrW7OCwI.js} +1 -1
  165. package/dist/assets/{useLocalStorage-BgTHbrT5.js → useLocalStorage-Dc1mtSxM.js} +1 -1
  166. package/dist/assets/{useThemeProps-DICENq6K.js → useThemeProps-DMwbfVFK.js} +1 -1
  167. package/dist/assets/{util-DHXWJiNu.js → util-DobtyPIt.js} +1 -1
  168. package/dist/assets/{wait-container-But1WHRx.js → wait-container-BK6lr2Xl.js} +1 -1
  169. package/dist/assets/{without-wallet-B0Rd6kEC.js → without-wallet-YcFaGIrj.js} +1 -1
  170. package/dist/assets/wrap-locale-uQWlJ9sO.js +1 -0
  171. package/dist/assets/{xml-CgzKx_nq.js → xml-BTUS5OzI.js} +1 -1
  172. package/dist/assets/{yaml-CmGYljQA.js → yaml-DbqORtuw.js} +1 -1
  173. package/dist/index.html +1 -1
  174. package/dist/service-worker.js +1 -1
  175. package/package.json +1 -1
  176. package/dist/assets/ArrowDropDown-CXosw3OJ.js +0 -1
  177. package/dist/assets/api-B2ybwV2-.js +0 -1
  178. package/dist/assets/cloneDeep-B89EP80q.js +0 -1
  179. package/dist/assets/emotion-cache.browser.esm-CpMdll1P.js +0 -1
  180. package/dist/assets/engine-x18TLIwJ.js +0 -1
  181. package/dist/assets/getValidReactChildren-QJgSTr2_.js +0 -1
  182. package/dist/assets/index-C6ri9SGq.js +0 -1
  183. package/dist/assets/omit-C9IXUJNU.js +0 -1
  184. package/dist/assets/schema-BP1Cgvoi.js +0 -1
  185. package/dist/assets/sdk-Bz8gm39t.js +0 -1
  186. package/dist/assets/toUpper-cJHcCh9w.js +0 -1
  187. package/dist/assets/wrap-locale-1csSF2mo.js +0 -1
@@ -1 +1 @@
1
- import{b_ as bt,b$ as pt,r as u,c0 as ft,c2 as W,j as p,b8 as N,cf as At,c3 as ht,bX as Ft,bY as St,d7 as ho,d8 as Ot,d9 as Dt,da as Xt,db as So,dc as vo,c1 as lt,f as mo,dd as dt,ce as D,de as xo,br as yo,u as go,bC as Co,df as wo,dg as Bo}from"./index-aBYVnSTR.js";function To(o){return pt("MuiTab",o)}const x=bt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),Io=o=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:i,selected:b,disabled:f}=o,v={root:["root",a&&i&&"labelIcon",`textColor${At(l)}`,s&&"fullWidth",n&&"wrapped",b&&"selected",f&&"disabled"],icon:["iconWrapper","icon"]};return ht(v,To,t)},Mo=N(Ft,{name:"MuiTab",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${At(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${x.iconWrapper}`]:t.iconWrapper},{[`& .${x.icon}`]:t.icon}]}})(St(({theme:o})=>({...o.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="top",style:{[`& > .${x.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="bottom",style:{[`& > .${x.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="start",style:{[`& > .${x.icon}`]:{marginRight:o.spacing(1)}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="end",style:{[`& > .${x.icon}`]:{marginLeft:o.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${x.selected}`]:{opacity:1},[`&.${x.disabled}`]:{opacity:(o.vars||o).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.primary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.secondary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:o.typography.pxToRem(12)}}]}))),vt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:i=!1,fullWidth:b,icon:f,iconPosition:v="top",indicator:C,label:m,onChange:S,onClick:w,onFocus:j,selected:B,selectionFollowsFocus:y,textColor:_="inherit",value:M,wrapped:rt=!1,...E}=s,A={...s,disabled:a,disableFocusRipple:i,selected:B,icon:!!f,iconPosition:v,label:!!m,fullWidth:b,textColor:_,wrapped:rt},K=Io(A),Y=f&&m&&u.isValidElement(f)?u.cloneElement(f,{className:W(K.icon,f.props.className)}):f,J=P=>{!B&&S&&S(P,M),w&&w(P)},F=P=>{y&&!B&&S&&S(P,M),j&&j(P)};return p.jsxs(Mo,{focusRipple:!i,className:W(K.root,n),ref:l,role:"tab","aria-selected":B,disabled:a,onClick:J,onFocus:F,ownerState:A,tabIndex:B?0:-1,...E,children:[v==="top"||v==="start"?p.jsxs(u.Fragment,{children:[Y,m]}):p.jsxs(u.Fragment,{children:[m,Y]}),C]})});function Eo(o){return(1+Math.sin(Math.PI*o-Math.PI/2))/2}function Po(o,t,l,s={},n=()=>{}){const{ease:a=Eo,duration:i=300}=s;let b=null;const f=t[o];let v=!1;const C=()=>{v=!0},m=S=>{if(v){n(new Error("Animation cancelled"));return}b===null&&(b=S);const w=Math.min(1,(S-b)/i);if(t[o]=a(w)*(l-f)+f,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(m)};return f===l?(n(new Error("Element already at target position")),C):(requestAnimationFrame(m),C)}const Ro={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ko(o){const{onChange:t,...l}=o,s=u.useRef(),n=u.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return ho(()=>{const i=Ot(()=>{const f=s.current;a(),f!==s.current&&t(s.current)}),b=Dt(n.current);return b.addEventListener("resize",i),()=>{i.clear(),b.removeEventListener("resize",i)}},[t]),u.useEffect(()=>{a(),t(s.current)},[t]),p.jsx("div",{style:Ro,...l,ref:n})}function zo(o){return pt("MuiTabScrollButton",o)}const Wo=bt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),jo=o=>{const{classes:t,orientation:l,disabled:s}=o;return ht({root:["root",l,s&&"disabled"]},zo,t)},Ho=N(Ft,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.orientation&&t[l.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Wo.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),$o=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabScrollButton"}),{className:n,slots:a={},slotProps:i={},direction:b,orientation:f,disabled:v,...C}=s,m=Xt(),S={isRtl:m,...s},w=jo(S),j=a.StartScrollButtonIcon??So,B=a.EndScrollButtonIcon??vo,y=lt({elementType:j,externalSlotProps:i.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S}),_=lt({elementType:B,externalSlotProps:i.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S});return p.jsx(Ho,{component:"div",className:W(w.root,n),ref:l,role:null,ownerState:S,tabIndex:null,...C,style:{...C.style,...f==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:b==="left"?p.jsx(j,{...y}):p.jsx(B,{..._})})});function Lo(o){return pt("MuiTabs",o)}const ut=bt("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ht=(o,t)=>o===t?o.firstChild:t&&t.nextElementSibling?t.nextElementSibling:o.firstChild,$t=(o,t)=>o===t?o.lastChild:t&&t.previousElementSibling?t.previousElementSibling:o.lastChild,et=(o,t,l)=>{let s=!1,n=l(o,t);for(;n;){if(n===o.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(o,n);else{n.focus();return}}},No=o=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:i,scrollButtonsHideMobile:b,classes:f}=o;return ht({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",b&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Lo,f)},Ao=N("div",{name:"MuiTabs",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[{[`& .${ut.scrollButtons}`]:t.scrollButtons},{[`& .${ut.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(St(({theme:o})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${ut.scrollButtons}`]:{[o.breakpoints.down("sm")]:{display:"none"}}}}]}))),Fo=N("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:o})=>o.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:o})=>o.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:o})=>o.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:o})=>o.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Oo=N("div",{name:"MuiTabs",slot:"List",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.list,t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:o})=>o.vertical,style:{flexDirection:"column"}},{props:({ownerState:o})=>o.centered,style:{justifyContent:"center"}}]}),Do=N("span",{name:"MuiTabs",slot:"Indicator"})(St(({theme:o})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:o.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(o.vars||o).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(o.vars||o).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),Xo=N(ko)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},mt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabs"}),n=mo(),a=Xt(),{"aria-label":i,"aria-labelledby":b,action:f,centered:v=!1,children:C,className:m,component:S="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:B,orientation:y="horizontal",ScrollButtonComponent:_,scrollButtons:M="auto",selectionFollowsFocus:rt,slots:E={},slotProps:A={},TabIndicatorProps:K={},TabScrollButtonProps:Y={},textColor:J="primary",value:F,variant:P="standard",visibleScrollbar:nt=!1,...Kt}=s,T=P==="scrollable",g=y==="vertical",U=g?"scrollTop":"scrollLeft",Q=g?"top":"left",Z=g?"bottom":"right",st=g?"clientHeight":"clientWidth",V=g?"height":"width",R={...s,component:S,allowScrollButtonsMobile:w,indicatorColor:j,orientation:y,vertical:g,scrollButtons:M,textColor:J,variant:P,visibleScrollbar:nt,fixed:!T,hideScrollbar:T&&!nt,scrollableX:T&&!g,scrollableY:T&&g,centered:v&&!T,scrollButtonsHideMobile:!w},z=No(R),Yt=lt({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:R}),Ut=lt({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:R}),[xt,Vt]=u.useState(!1),[H,yt]=u.useState(Lt),[gt,qt]=u.useState(!1),[Ct,Gt]=u.useState(!1),[wt,_t]=u.useState(!1),[Bt,Jt]=u.useState({overflow:"hidden",scrollbarWidth:0}),Tt=new Map,k=u.useRef(null),$=u.useRef(null),O={slots:E,slotProps:{indicator:K,scrollButton:Y,...A}},It=()=>{const e=k.current;let r;if(e){const c=e.getBoundingClientRect();r={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:c.top,bottom:c.bottom,left:c.left,right:c.right}}let d;if(e&&F!==!1){const c=$.current.children;if(c.length>0){const h=c[Tt.get(F)];d=h?h.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:d}},q=dt(()=>{const{tabsMeta:e,tabMeta:r}=It();let d=0,c;g?(c="top",r&&e&&(d=r.top-e.top+e.scrollTop)):(c=a?"right":"left",r&&e&&(d=(a?-1:1)*(r[c]-e[c]+e.scrollLeft)));const h={[c]:d,[V]:r?r[V]:0};if(typeof H[c]!="number"||typeof H[V]!="number")yt(h);else{const I=Math.abs(H[c]-h[c]),L=Math.abs(H[V]-h[V]);(I>=1||L>=1)&&yt(h)}}),at=(e,{animation:r=!0}={})=>{r?Po(U,k.current,e,{duration:n.transitions.duration.standard}):k.current[U]=e},Mt=e=>{let r=k.current[U];g?r+=e:r+=e*(a?-1:1),at(r)},Et=()=>{const e=k.current[st];let r=0;const d=Array.from($.current.children);for(let c=0;c<d.length;c+=1){const h=d[c];if(r+h[st]>e){c===0&&(r=e);break}r+=h[st]}return r},Qt=()=>{Mt(-1*Et())},Zt=()=>{Mt(Et())},[to,{onChange:Pt,...oo}]=D("scrollbar",{className:W(z.scrollableX,z.hideScrollbar),elementType:Xo,shouldForwardComponentProp:!0,externalForwardedProps:O,ownerState:R}),eo=u.useCallback(e=>{Pt?.(e),Jt({overflow:null,scrollbarWidth:e})},[Pt]),[Rt,kt]=D("scrollButtons",{className:W(z.scrollButtons,Y.className),elementType:$o,externalForwardedProps:O,ownerState:R,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:E.startScrollButtonIcon||E.StartScrollButtonIcon,EndScrollButtonIcon:E.endScrollButtonIcon||E.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Yt,endScrollButtonIcon:Ut}}}),lo=()=>{const e={};e.scrollbarSizeListener=T?p.jsx(to,{...oo,onChange:eo}):null;const d=T&&(M==="auto"&&(gt||Ct)||M===!0);return e.scrollButtonStart=d?p.jsx(Rt,{direction:a?"right":"left",onClick:Qt,disabled:!gt,...kt}):null,e.scrollButtonEnd=d?p.jsx(Rt,{direction:a?"left":"right",onClick:Zt,disabled:!Ct,...kt}):null,e},zt=dt(e=>{const{tabsMeta:r,tabMeta:d}=It();if(!(!d||!r)){if(d[Q]<r[Q]){const c=r[U]+(d[Q]-r[Q]);at(c,{animation:e})}else if(d[Z]>r[Z]){const c=r[U]+(d[Z]-r[Z]);at(c,{animation:e})}}}),tt=dt(()=>{T&&M!==!1&&_t(!wt)});u.useEffect(()=>{const e=Ot(()=>{k.current&&q()});let r;const d=I=>{I.forEach(L=>{L.removedNodes.forEach(G=>{r?.unobserve(G)}),L.addedNodes.forEach(G=>{r?.observe(G)})}),e(),tt()},c=Dt(k.current);c.addEventListener("resize",e);let h;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(e),Array.from($.current.children).forEach(I=>{r.observe(I)})),typeof MutationObserver<"u"&&(h=new MutationObserver(d),h.observe($.current,{childList:!0})),()=>{e.clear(),c.removeEventListener("resize",e),h?.disconnect(),r?.disconnect()}},[q,tt]),u.useEffect(()=>{const e=Array.from($.current.children),r=e.length;if(typeof IntersectionObserver<"u"&&r>0&&T&&M!==!1){const d=e[0],c=e[r-1],h={root:k.current,threshold:.99},I=ct=>{qt(!ct[0].isIntersecting)},L=new IntersectionObserver(I,h);L.observe(d);const G=ct=>{Gt(!ct[0].isIntersecting)},jt=new IntersectionObserver(G,h);return jt.observe(c),()=>{L.disconnect(),jt.disconnect()}}},[T,M,wt,C?.length]),u.useEffect(()=>{Vt(!0)},[]),u.useEffect(()=>{q()}),u.useEffect(()=>{zt(Lt!==H)},[zt,H]),u.useImperativeHandle(f,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const[ro,no]=D("indicator",{className:W(z.indicator,K.className),elementType:Do,externalForwardedProps:O,ownerState:R,additionalProps:{style:H}}),Wt=p.jsx(ro,{...no});let ot=0;const so=u.Children.map(C,e=>{if(!u.isValidElement(e))return null;const r=e.props.value===void 0?ot:e.props.value;Tt.set(r,ot);const d=r===F;return ot+=1,u.cloneElement(e,{fullWidth:P==="fullWidth",indicator:d&&!xt&&Wt,selected:d,selectionFollowsFocus:rt,onChange:B,textColor:J,value:r,...ot===1&&F===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),ao=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const r=$.current,d=xo(r).activeElement;if(d.getAttribute("role")!=="tab")return;let h=y==="horizontal"?"ArrowLeft":"ArrowUp",I=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&a&&(h="ArrowRight",I="ArrowLeft"),e.key){case h:e.preventDefault(),et(r,d,$t);break;case I:e.preventDefault(),et(r,d,Ht);break;case"Home":e.preventDefault(),et(r,null,Ht);break;case"End":e.preventDefault(),et(r,null,$t);break}},it=lo(),[io,co]=D("root",{ref:l,className:W(z.root,m),elementType:Ao,externalForwardedProps:{...O,...Kt,component:S},ownerState:R}),[uo,bo]=D("scroller",{ref:k,className:z.scroller,elementType:Fo,externalForwardedProps:O,ownerState:R,additionalProps:{style:{overflow:Bt.overflow,[g?`margin${a?"Left":"Right"}`:"marginBottom"]:nt?void 0:-Bt.scrollbarWidth}}}),[po,fo]=D("list",{ref:$,className:W(z.list,z.flexContainer),elementType:Oo,externalForwardedProps:O,ownerState:R,getSlotProps:e=>({...e,onKeyDown:r=>{ao(r),e.onKeyDown?.(r)}})});return p.jsxs(io,{...co,children:[it.scrollButtonStart,it.scrollbarSizeListener,p.jsxs(uo,{...bo,children:[p.jsx(po,{"aria-label":i,"aria-labelledby":b,"aria-orientation":y==="vertical"?"vertical":null,role:"tablist",...fo,children:so}),xt&&Wt]}),it.scrollButtonEnd]})}),Nt="index",X={tabs:`${Nt}-tabs`,tab:`${Nt}-tab`},Ko=yo(mt)(({theme:o})=>({[`& .${X.tabs}`]:{},[`& .${X.tab}`]:{fontSize:"0.875rem",[o.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Yo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:"grey.100",padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:"text.secondary",fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"action.selected",borderColor:"grey.100",color:"grey.A700"}},".MuiTabs-indicator":{display:"none"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function Uo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":a.orientation!=="vertical"?{"&::after":{content:'""',display:"block",position:"sticky",left:0,zIndex:-1,width:"100%",height:"1px",backgroundColor:"grey.300"}}:{},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:"text.secondary",fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:"primary.main"}},".MuiTabs-indicator":{height:"1px",backgroundColor:"primary.main"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function qo({tabs:o,current:t,onChange:l,variant:s=void 0,iconPosition:n=void 0,enableTabClick:a=!1,...i}){return s==="card"?p.jsx(Yo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):s==="line"?p.jsx(Uo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):p.jsx(Ko,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(b,f)=>!a&&l(f),indicatorColor:"primary",...i,className:[X.tabs,i.className||""].join(" "),children:o.map(b=>p.jsx(vt,{className:X.tab,value:b.value,label:b.label,icon:b.icon,iconPosition:n,onClick:()=>a&&l(b.value)},b.value))})}function Go(o,t=""){const{info:l}=go(),s=Co(()=>{const n=o?.breadcrumbsLabel||o?.label||"";return wo(n,t,l)},[o,t,l]);return s?p.jsx(Bo,{children:p.jsx("title",{children:s})}):null}export{qo as T,vt as a,mt as b,ut as t,Go as u};
1
+ import{b_ as bt,b$ as pt,r as u,c0 as ft,c2 as W,j as p,b8 as N,cf as At,c3 as ht,bX as Ft,bY as St,d7 as ho,d8 as Ot,d9 as Dt,da as Xt,db as So,dc as vo,c1 as lt,f as mo,dd as dt,ce as D,de as xo,br as yo,u as go,bC as Co,df as wo,dg as Bo}from"./index-yswwzF5j.js";function To(o){return pt("MuiTab",o)}const x=bt("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),Io=o=>{const{classes:t,textColor:l,fullWidth:s,wrapped:n,icon:a,label:i,selected:b,disabled:f}=o,v={root:["root",a&&i&&"labelIcon",`textColor${At(l)}`,s&&"fullWidth",n&&"wrapped",b&&"selected",f&&"disabled"],icon:["iconWrapper","icon"]};return ht(v,To,t)},Mo=N(Ft,{name:"MuiTab",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.label&&l.icon&&t.labelIcon,t[`textColor${At(l.textColor)}`],l.fullWidth&&t.fullWidth,l.wrapped&&t.wrapped,{[`& .${x.iconWrapper}`]:t.iconWrapper},{[`& .${x.icon}`]:t.icon}]}})(St(({theme:o})=>({...o.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="top",style:{[`& > .${x.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="bottom",style:{[`& > .${x.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="start",style:{[`& > .${x.icon}`]:{marginRight:o.spacing(1)}}},{props:({ownerState:t,iconPosition:l})=>t.icon&&t.label&&l==="end",style:{[`& > .${x.icon}`]:{marginLeft:o.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${x.selected}`]:{opacity:1},[`&.${x.disabled}`]:{opacity:(o.vars||o).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.primary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(o.vars||o).palette.text.secondary,[`&.${x.selected}`]:{color:(o.vars||o).palette.secondary.main},[`&.${x.disabled}`]:{color:(o.vars||o).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:o.typography.pxToRem(12)}}]}))),vt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTab"}),{className:n,disabled:a=!1,disableFocusRipple:i=!1,fullWidth:b,icon:f,iconPosition:v="top",indicator:C,label:m,onChange:S,onClick:w,onFocus:j,selected:B,selectionFollowsFocus:y,textColor:_="inherit",value:M,wrapped:rt=!1,...E}=s,A={...s,disabled:a,disableFocusRipple:i,selected:B,icon:!!f,iconPosition:v,label:!!m,fullWidth:b,textColor:_,wrapped:rt},K=Io(A),Y=f&&m&&u.isValidElement(f)?u.cloneElement(f,{className:W(K.icon,f.props.className)}):f,J=P=>{!B&&S&&S(P,M),w&&w(P)},F=P=>{y&&!B&&S&&S(P,M),j&&j(P)};return p.jsxs(Mo,{focusRipple:!i,className:W(K.root,n),ref:l,role:"tab","aria-selected":B,disabled:a,onClick:J,onFocus:F,ownerState:A,tabIndex:B?0:-1,...E,children:[v==="top"||v==="start"?p.jsxs(u.Fragment,{children:[Y,m]}):p.jsxs(u.Fragment,{children:[m,Y]}),C]})});function Eo(o){return(1+Math.sin(Math.PI*o-Math.PI/2))/2}function Po(o,t,l,s={},n=()=>{}){const{ease:a=Eo,duration:i=300}=s;let b=null;const f=t[o];let v=!1;const C=()=>{v=!0},m=S=>{if(v){n(new Error("Animation cancelled"));return}b===null&&(b=S);const w=Math.min(1,(S-b)/i);if(t[o]=a(w)*(l-f)+f,w>=1){requestAnimationFrame(()=>{n(null)});return}requestAnimationFrame(m)};return f===l?(n(new Error("Element already at target position")),C):(requestAnimationFrame(m),C)}const Ro={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ko(o){const{onChange:t,...l}=o,s=u.useRef(),n=u.useRef(null),a=()=>{s.current=n.current.offsetHeight-n.current.clientHeight};return ho(()=>{const i=Ot(()=>{const f=s.current;a(),f!==s.current&&t(s.current)}),b=Dt(n.current);return b.addEventListener("resize",i),()=>{i.clear(),b.removeEventListener("resize",i)}},[t]),u.useEffect(()=>{a(),t(s.current)},[t]),p.jsx("div",{style:Ro,...l,ref:n})}function zo(o){return pt("MuiTabScrollButton",o)}const Wo=bt("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),jo=o=>{const{classes:t,orientation:l,disabled:s}=o;return ht({root:["root",l,s&&"disabled"]},zo,t)},Ho=N(Ft,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.root,l.orientation&&t[l.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Wo.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),$o=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabScrollButton"}),{className:n,slots:a={},slotProps:i={},direction:b,orientation:f,disabled:v,...C}=s,m=Xt(),S={isRtl:m,...s},w=jo(S),j=a.StartScrollButtonIcon??So,B=a.EndScrollButtonIcon??vo,y=lt({elementType:j,externalSlotProps:i.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S}),_=lt({elementType:B,externalSlotProps:i.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:S});return p.jsx(Ho,{component:"div",className:W(w.root,n),ref:l,role:null,ownerState:S,tabIndex:null,...C,style:{...C.style,...f==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${m?-90:90}deg)`}},children:b==="left"?p.jsx(j,{...y}):p.jsx(B,{..._})})});function Lo(o){return pt("MuiTabs",o)}const ut=bt("MuiTabs",["root","vertical","list","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Ht=(o,t)=>o===t?o.firstChild:t&&t.nextElementSibling?t.nextElementSibling:o.firstChild,$t=(o,t)=>o===t?o.lastChild:t&&t.previousElementSibling?t.previousElementSibling:o.lastChild,et=(o,t,l)=>{let s=!1,n=l(o,t);for(;n;){if(n===o.firstChild){if(s)return;s=!0}const a=n.disabled||n.getAttribute("aria-disabled")==="true";if(!n.hasAttribute("tabindex")||a)n=l(o,n);else{n.focus();return}}},No=o=>{const{vertical:t,fixed:l,hideScrollbar:s,scrollableX:n,scrollableY:a,centered:i,scrollButtonsHideMobile:b,classes:f}=o;return ht({root:["root",t&&"vertical"],scroller:["scroller",l&&"fixed",s&&"hideScrollbar",n&&"scrollableX",a&&"scrollableY"],list:["list","flexContainer",t&&"flexContainerVertical",t&&"vertical",i&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",b&&"scrollButtonsHideMobile"],scrollableX:[n&&"scrollableX"],hideScrollbar:[s&&"hideScrollbar"]},Lo,f)},Ao=N("div",{name:"MuiTabs",slot:"Root",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[{[`& .${ut.scrollButtons}`]:t.scrollButtons},{[`& .${ut.scrollButtons}`]:l.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,l.vertical&&t.vertical]}})(St(({theme:o})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${ut.scrollButtons}`]:{[o.breakpoints.down("sm")]:{display:"none"}}}}]}))),Fo=N("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.scroller,l.fixed&&t.fixed,l.hideScrollbar&&t.hideScrollbar,l.scrollableX&&t.scrollableX,l.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:o})=>o.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:o})=>o.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:o})=>o.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:o})=>o.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),Oo=N("div",{name:"MuiTabs",slot:"List",overridesResolver:(o,t)=>{const{ownerState:l}=o;return[t.list,t.flexContainer,l.vertical&&t.flexContainerVertical,l.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:o})=>o.vertical,style:{flexDirection:"column"}},{props:({ownerState:o})=>o.centered,style:{justifyContent:"center"}}]}),Do=N("span",{name:"MuiTabs",slot:"Indicator"})(St(({theme:o})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:o.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(o.vars||o).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(o.vars||o).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),Xo=N(ko)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Lt={},mt=u.forwardRef(function(t,l){const s=ft({props:t,name:"MuiTabs"}),n=mo(),a=Xt(),{"aria-label":i,"aria-labelledby":b,action:f,centered:v=!1,children:C,className:m,component:S="div",allowScrollButtonsMobile:w=!1,indicatorColor:j="primary",onChange:B,orientation:y="horizontal",ScrollButtonComponent:_,scrollButtons:M="auto",selectionFollowsFocus:rt,slots:E={},slotProps:A={},TabIndicatorProps:K={},TabScrollButtonProps:Y={},textColor:J="primary",value:F,variant:P="standard",visibleScrollbar:nt=!1,...Kt}=s,T=P==="scrollable",g=y==="vertical",U=g?"scrollTop":"scrollLeft",Q=g?"top":"left",Z=g?"bottom":"right",st=g?"clientHeight":"clientWidth",V=g?"height":"width",R={...s,component:S,allowScrollButtonsMobile:w,indicatorColor:j,orientation:y,vertical:g,scrollButtons:M,textColor:J,variant:P,visibleScrollbar:nt,fixed:!T,hideScrollbar:T&&!nt,scrollableX:T&&!g,scrollableY:T&&g,centered:v&&!T,scrollButtonsHideMobile:!w},z=No(R),Yt=lt({elementType:E.StartScrollButtonIcon,externalSlotProps:A.startScrollButtonIcon,ownerState:R}),Ut=lt({elementType:E.EndScrollButtonIcon,externalSlotProps:A.endScrollButtonIcon,ownerState:R}),[xt,Vt]=u.useState(!1),[H,yt]=u.useState(Lt),[gt,qt]=u.useState(!1),[Ct,Gt]=u.useState(!1),[wt,_t]=u.useState(!1),[Bt,Jt]=u.useState({overflow:"hidden",scrollbarWidth:0}),Tt=new Map,k=u.useRef(null),$=u.useRef(null),O={slots:E,slotProps:{indicator:K,scrollButton:Y,...A}},It=()=>{const e=k.current;let r;if(e){const c=e.getBoundingClientRect();r={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:c.top,bottom:c.bottom,left:c.left,right:c.right}}let d;if(e&&F!==!1){const c=$.current.children;if(c.length>0){const h=c[Tt.get(F)];d=h?h.getBoundingClientRect():null}}return{tabsMeta:r,tabMeta:d}},q=dt(()=>{const{tabsMeta:e,tabMeta:r}=It();let d=0,c;g?(c="top",r&&e&&(d=r.top-e.top+e.scrollTop)):(c=a?"right":"left",r&&e&&(d=(a?-1:1)*(r[c]-e[c]+e.scrollLeft)));const h={[c]:d,[V]:r?r[V]:0};if(typeof H[c]!="number"||typeof H[V]!="number")yt(h);else{const I=Math.abs(H[c]-h[c]),L=Math.abs(H[V]-h[V]);(I>=1||L>=1)&&yt(h)}}),at=(e,{animation:r=!0}={})=>{r?Po(U,k.current,e,{duration:n.transitions.duration.standard}):k.current[U]=e},Mt=e=>{let r=k.current[U];g?r+=e:r+=e*(a?-1:1),at(r)},Et=()=>{const e=k.current[st];let r=0;const d=Array.from($.current.children);for(let c=0;c<d.length;c+=1){const h=d[c];if(r+h[st]>e){c===0&&(r=e);break}r+=h[st]}return r},Qt=()=>{Mt(-1*Et())},Zt=()=>{Mt(Et())},[to,{onChange:Pt,...oo}]=D("scrollbar",{className:W(z.scrollableX,z.hideScrollbar),elementType:Xo,shouldForwardComponentProp:!0,externalForwardedProps:O,ownerState:R}),eo=u.useCallback(e=>{Pt?.(e),Jt({overflow:null,scrollbarWidth:e})},[Pt]),[Rt,kt]=D("scrollButtons",{className:W(z.scrollButtons,Y.className),elementType:$o,externalForwardedProps:O,ownerState:R,additionalProps:{orientation:y,slots:{StartScrollButtonIcon:E.startScrollButtonIcon||E.StartScrollButtonIcon,EndScrollButtonIcon:E.endScrollButtonIcon||E.EndScrollButtonIcon},slotProps:{startScrollButtonIcon:Yt,endScrollButtonIcon:Ut}}}),lo=()=>{const e={};e.scrollbarSizeListener=T?p.jsx(to,{...oo,onChange:eo}):null;const d=T&&(M==="auto"&&(gt||Ct)||M===!0);return e.scrollButtonStart=d?p.jsx(Rt,{direction:a?"right":"left",onClick:Qt,disabled:!gt,...kt}):null,e.scrollButtonEnd=d?p.jsx(Rt,{direction:a?"left":"right",onClick:Zt,disabled:!Ct,...kt}):null,e},zt=dt(e=>{const{tabsMeta:r,tabMeta:d}=It();if(!(!d||!r)){if(d[Q]<r[Q]){const c=r[U]+(d[Q]-r[Q]);at(c,{animation:e})}else if(d[Z]>r[Z]){const c=r[U]+(d[Z]-r[Z]);at(c,{animation:e})}}}),tt=dt(()=>{T&&M!==!1&&_t(!wt)});u.useEffect(()=>{const e=Ot(()=>{k.current&&q()});let r;const d=I=>{I.forEach(L=>{L.removedNodes.forEach(G=>{r?.unobserve(G)}),L.addedNodes.forEach(G=>{r?.observe(G)})}),e(),tt()},c=Dt(k.current);c.addEventListener("resize",e);let h;return typeof ResizeObserver<"u"&&(r=new ResizeObserver(e),Array.from($.current.children).forEach(I=>{r.observe(I)})),typeof MutationObserver<"u"&&(h=new MutationObserver(d),h.observe($.current,{childList:!0})),()=>{e.clear(),c.removeEventListener("resize",e),h?.disconnect(),r?.disconnect()}},[q,tt]),u.useEffect(()=>{const e=Array.from($.current.children),r=e.length;if(typeof IntersectionObserver<"u"&&r>0&&T&&M!==!1){const d=e[0],c=e[r-1],h={root:k.current,threshold:.99},I=ct=>{qt(!ct[0].isIntersecting)},L=new IntersectionObserver(I,h);L.observe(d);const G=ct=>{Gt(!ct[0].isIntersecting)},jt=new IntersectionObserver(G,h);return jt.observe(c),()=>{L.disconnect(),jt.disconnect()}}},[T,M,wt,C?.length]),u.useEffect(()=>{Vt(!0)},[]),u.useEffect(()=>{q()}),u.useEffect(()=>{zt(Lt!==H)},[zt,H]),u.useImperativeHandle(f,()=>({updateIndicator:q,updateScrollButtons:tt}),[q,tt]);const[ro,no]=D("indicator",{className:W(z.indicator,K.className),elementType:Do,externalForwardedProps:O,ownerState:R,additionalProps:{style:H}}),Wt=p.jsx(ro,{...no});let ot=0;const so=u.Children.map(C,e=>{if(!u.isValidElement(e))return null;const r=e.props.value===void 0?ot:e.props.value;Tt.set(r,ot);const d=r===F;return ot+=1,u.cloneElement(e,{fullWidth:P==="fullWidth",indicator:d&&!xt&&Wt,selected:d,selectionFollowsFocus:rt,onChange:B,textColor:J,value:r,...ot===1&&F===!1&&!e.props.tabIndex?{tabIndex:0}:{}})}),ao=e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;const r=$.current,d=xo(r).activeElement;if(d.getAttribute("role")!=="tab")return;let h=y==="horizontal"?"ArrowLeft":"ArrowUp",I=y==="horizontal"?"ArrowRight":"ArrowDown";switch(y==="horizontal"&&a&&(h="ArrowRight",I="ArrowLeft"),e.key){case h:e.preventDefault(),et(r,d,$t);break;case I:e.preventDefault(),et(r,d,Ht);break;case"Home":e.preventDefault(),et(r,null,Ht);break;case"End":e.preventDefault(),et(r,null,$t);break}},it=lo(),[io,co]=D("root",{ref:l,className:W(z.root,m),elementType:Ao,externalForwardedProps:{...O,...Kt,component:S},ownerState:R}),[uo,bo]=D("scroller",{ref:k,className:z.scroller,elementType:Fo,externalForwardedProps:O,ownerState:R,additionalProps:{style:{overflow:Bt.overflow,[g?`margin${a?"Left":"Right"}`:"marginBottom"]:nt?void 0:-Bt.scrollbarWidth}}}),[po,fo]=D("list",{ref:$,className:W(z.list,z.flexContainer),elementType:Oo,externalForwardedProps:O,ownerState:R,getSlotProps:e=>({...e,onKeyDown:r=>{ao(r),e.onKeyDown?.(r)}})});return p.jsxs(io,{...co,children:[it.scrollButtonStart,it.scrollbarSizeListener,p.jsxs(uo,{...bo,children:[p.jsx(po,{"aria-label":i,"aria-labelledby":b,"aria-orientation":y==="vertical"?"vertical":null,role:"tablist",...fo,children:so}),xt&&Wt]}),it.scrollButtonEnd]})}),Nt="index",X={tabs:`${Nt}-tabs`,tab:`${Nt}-tab`},Ko=yo(mt)(({theme:o})=>({[`& .${X.tabs}`]:{},[`& .${X.tab}`]:{fontSize:"0.875rem",[o.breakpoints.up("md")]:{fontSize:"1rem"}}}));function Yo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":{borderRadius:"100vw"},".MuiTabs-flexContainer":{borderRadius:"100vw",backgroundColor:"grey.100",padding:.5,display:"inline-flex",columnGap:.25,maxWidth:"100%",overflowX:"auto"},".MuiTab-root":{borderRadius:"100vw",border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,color:"text.secondary",fontSize:"13px",fontWeight:"normal",textTransform:"capitalize",transition:"background-color 0.2s ease","&.Mui-selected, &:hover":{backgroundColor:"action.selected",borderColor:"grey.100",color:"grey.A700"}},".MuiTabs-indicator":{display:"none"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function Uo({tabs:o,current:t,onChange:l,iconPosition:s=void 0,enableTabClick:n=!1,...a}){return p.jsx(mt,{scrollButtons:"auto",value:t,onChange:(i,b)=>!n&&l(b),...a,variant:"scrollable",sx:{minHeight:"auto",".MuiTabs-scrollButtons.Mui-disabled":{opacity:.3,cursor:"not-allowed",pointerEvents:"auto"},".MuiTabs-scroller":a.orientation!=="vertical"?{"&::after":{content:'""',display:"block",position:"sticky",left:0,zIndex:-1,width:"100%",height:"1px",backgroundColor:"grey.300"}}:{},".MuiTabs-flexContainer":{display:"inline-flex",columnGap:2.5,px:0,pb:.5},".MuiTab-root":{border:"1px solid transparent",minHeight:"auto",lineHeight:1,py:1,px:0,color:"text.secondary",fontSize:"14px",fontWeight:500,textTransform:"capitalize",minWidth:"auto","&.Mui-selected, &:hover":{color:"primary.main"}},".MuiTabs-indicator":{height:"1px",backgroundColor:"primary.main"},...a.sx},children:o.map(i=>p.jsx(vt,{className:X.tab,value:i.value,label:i.label,icon:i.icon,iconPosition:s,onClick:()=>n&&l(i.value)},i.value))})}function qo({tabs:o,current:t,onChange:l,variant:s=void 0,iconPosition:n=void 0,enableTabClick:a=!1,...i}){return s==="card"?p.jsx(Yo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):s==="line"?p.jsx(Uo,{...i,tabs:o,current:t,enableTabClick:a,onChange:l,iconPosition:n}):p.jsx(Ko,{scrollButtons:"auto",variant:"scrollable",value:t,onChange:(b,f)=>!a&&l(f),indicatorColor:"primary",...i,className:[X.tabs,i.className||""].join(" "),children:o.map(b=>p.jsx(vt,{className:X.tab,value:b.value,label:b.label,icon:b.icon,iconPosition:n,onClick:()=>a&&l(b.value)},b.value))})}function Go(o,t=""){const{info:l}=go(),s=Co(()=>{const n=o?.breadcrumbsLabel||o?.label||"";return wo(n,t,l)},[o,t,l]);return s?p.jsx(Bo,{children:p.jsx("title",{children:s})}):null}export{qo as T,vt as a,mt as b,ut as t,Go as u};
@@ -1,4 +1,4 @@
1
- import{m as lt}from"./index-B57lTY3n.js";import"./index-aBYVnSTR.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
1
+ import{m as lt}from"./index-BclvvolB.js";import"./index-yswwzF5j.js";import"./decode-DPztD6kB.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1 +1 @@
1
- import{gZ as E,be as L}from"./index-aBYVnSTR.js";const U=({url:r,allowFullScreen:o,position:a,display:u,height:i,width:y,overflow:c,styles:f,onLoad:p,onMouseOver:b,onMouseOut:w,scrolling:d,id:m,frameBorder:t,ariaHidden:O,sandbox:s,allow:j,className:g,title:h,ariaLabel:k,ariaLabelledby:P,name:v,target:A,loading:F,importance:I,referrerpolicy:M,allowpaymentrequest:S,src:q,key:x})=>{const n=E({src:q||r,target:A||null,style:{position:a||null,display:u||"initial",overflow:c||null},scrolling:d||null,allowpaymentrequest:S||null,importance:I||null,sandbox:s&&[...s].join(" ")||null,loading:F||null,styles:f||null,name:v||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:M||null,title:h||null,allow:j||null,id:m||null,"aria-labelledby":P||null,"aria-hidden":O||null,"aria-label":k||null,width:y||null,height:i||null,onLoad:p||null,onMouseOver:b||null,onMouseOut:w||null,key:x||"iframe"});let l=Object.create(null);for(let e of Object.keys(n))n[e]!=null&&(l[e]=n[e]);for(let e of Object.keys(l.style))l.style[e]==null&&delete l.style[e];if(l.styles)for(let e of Object.keys(l.styles))l.styles.hasOwnProperty(e)&&(l.style[e]=l.styles[e]),Object.keys(l.styles).pop()==e&&delete l.styles;if(o)if("allow"in l){const e=l.allow.replace("fullscreen","");l.allow=`fullscreen ${e.trim()}`.trim()}else l.allow="fullscreen";return t>=0&&(l.style.hasOwnProperty("border")||(l.style.border=t)),L.createElement("iframe",Object.assign({},l))};export{U as I};
1
+ import{gZ as E,be as L}from"./index-yswwzF5j.js";const U=({url:r,allowFullScreen:o,position:a,display:u,height:i,width:y,overflow:c,styles:f,onLoad:p,onMouseOver:b,onMouseOut:w,scrolling:d,id:m,frameBorder:t,ariaHidden:O,sandbox:s,allow:j,className:g,title:h,ariaLabel:k,ariaLabelledby:P,name:v,target:A,loading:F,importance:I,referrerpolicy:M,allowpaymentrequest:S,src:q,key:x})=>{const n=E({src:q||r,target:A||null,style:{position:a||null,display:u||"initial",overflow:c||null},scrolling:d||null,allowpaymentrequest:S||null,importance:I||null,sandbox:s&&[...s].join(" ")||null,loading:F||null,styles:f||null,name:v||null,className:g||null,allowFullScreen:"allowFullScreen",referrerpolicy:M||null,title:h||null,allow:j||null,id:m||null,"aria-labelledby":P||null,"aria-hidden":O||null,"aria-label":k||null,width:y||null,height:i||null,onLoad:p||null,onMouseOver:b||null,onMouseOut:w||null,key:x||"iframe"});let l=Object.create(null);for(let e of Object.keys(n))n[e]!=null&&(l[e]=n[e]);for(let e of Object.keys(l.style))l.style[e]==null&&delete l.style[e];if(l.styles)for(let e of Object.keys(l.styles))l.styles.hasOwnProperty(e)&&(l.style[e]=l.styles[e]),Object.keys(l.styles).pop()==e&&delete l.styles;if(o)if("allow"in l){const e=l.allow.replace("fullscreen","");l.allow=`fullscreen ${e.trim()}`.trim()}else l.allow="fullscreen";return t>=0&&(l.style.hasOwnProperty("border")||(l.style.border=t)),L.createElement("iframe",Object.assign({},l))};export{U as I};
@@ -1,4 +1,4 @@
1
- import{aF as Ge,j as e,bn as gt,r as g,bC as Q,bf as H,H as q,aH as D,g as xt,o as d,h as ee,at as bt,ay as jt,K as C,T as U,V as X,eO as Fe,O as Pe,ik as Ye,bj as Te,aU as Ie,R as Ee,dI as Ne,b3 as qe,b1 as Ae,C as Qe,f as Xe,f0 as Je,aP as De,W as yt,as as Ze,il as et,v as Oe,f2 as tt,bq as je,fI as st,dC as St,s as ie,af as pe,G as Ue,au as vt,im as Ct,io as Nt,$ as nt,ip as wt,iq as Rt,ir as Tt,is as It,N as Et,bx as it,E as At,J as Dt,P as Ot,S as Lt,Q as $e,it as kt,a3 as Ft}from"./index-aBYVnSTR.js";import{d as Pt,H as at,g as _t}from"./index-DiMrHVHN.js";import{R as _e,S as Bt}from"./actions-YIixnDsn.js";import{B as zt}from"./index-rEfSjDK2.js";import{S as me}from"./shorten-label-ulXVKXIN.js";import{v as ot}from"./index-DAQKjLH3.js";import{T as Wt}from"./html-title-D1fKy5js.js";import{R as Mt}from"./Refresh-B5DSbncu.js";import{D as Kt,g as Ht}from"./traffic-Cb7-9lQ_.js";import{u as qt}from"./use-mobile-BXkW8fC_.js";import"./FilterList-BTymfTsJ.js";import"./CSSTransition-DVV9iF5-.js";import"./emotion-cache.browser.esm-CpMdll1P.js";import"./index-e6yDUbm3.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-XzMty67o.js";import"./index-DVZDDKuE.js";import"./TableSearch-evrlUlGg.js";import"./Search-RYd18IR_.js";import"./Clear-Ytt0D6Zf.js";import"./MoreVert-B35eVFHe.js";import"./useLocalStorage-BgTHbrT5.js";import"./url-evaluation-B6pt_9tS.js";import"./get-safe-url-0QzE8yuB.js";import"./ButtonGroup-8TrbqvjP.js";import"./getValidReactChildren-QJgSTr2_.js";import"./permission-DmTi5mXJ.js";import"./index.esm-C-nndHoP.js";import"./collapse-ypqWv-nT.js";import"./blocklet-BXVjEyPJ.js";import"./Switch-a2y_6MhM.js";import"./iframe-DT83cbIK.js";import"./ChevronLeft-ChcOz9av.js";import"./ChevronRight-omU8k6vy.js";import"./index-DBii9-f-.js";import"./base-chart-BjkdsChl.js";import"./index-pnHN6dbB.js";import"./AdapterDayjs-DQsJKRTd.js";import"./useThemeProps-DICENq6K.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),$t=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:Vt,Consumer:on}=rt;function Gt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=gt(),[l,x]=g.useState([]),[f,y]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),h=Q(()=>s.meta?.did,[s]),[b,S]=g.useState([]),[B,_]=g.useState({}),R=Q(()=>l.length?new Set(l.map(m=>m.id)):new Set,[l]),$=async({page:m=1,pageSize:N=20,...O}={})=>{if(!h)return[];try{const A={paging:{page:m,pageSize:N},...O,teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0},{dids:w,...L}=A;let P="";w&&w.includes("system")&&(P="system");const ae=w?w.filter(oe=>oe!=="system"):[],se={...L,source:P,componentDids:ae},Z=await n.getNotificationSendLog({input:se});return _(se),x(Z.list),y(Z.paging),Z.list}catch(A){return q.error(A.message),[]}},M=async()=>{const m=await n.getNotificationComponents({input:{teamDid:h}});S(m.componentDids)},k=g.useCallback(m=>{const N=s.children.find(O=>O.meta?.did===m);if(N)return N.ancestors=[s],N},[s]),F=async({notificationId:m,receivers:N,channels:O,...A})=>{await n.resendNotification({input:{teamDid:h,notificationId:m,receivers:N,channels:O.map(w=>w==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:w==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:w),...A}})},V=g.useCallback(async m=>(await n.getUser({input:{teamDid:h,user:{did:m},options:{enableConnectedAccount:!0}}})).user,[n,h]),G=g.useCallback(async({page:m=1,pageSize:N=20,...O}={})=>{try{const A={paging:{page:m,pageSize:N},...O,userName:O.searchText||"",teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:A})}catch(A){throw q.error(A.message),A}},[n,h]);g.useEffect(()=>{h&&M()},[h]),o(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,m=>{R.has(m.notificationId)&&$(B)},[R,B]),o(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,m=>{R.has(m.id)||$(B)},[R,B]);const J={fetch:$,data:l,paging:f,blocklet:s,getComponent:k,resendNotification:F,getUser:V,componentDids:b,getReceivers:G,inService:r,teamDid:h};return e.jsx(Vt,{value:{notificationRecords:J},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Yt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Yt[t],children:t})}const Qt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:o,reason:l="",channel:x="wallet"}=n,f=o?t("notification.sendStatus.sentTime",{date:bt(o,s)}):"",y=Qt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=ee(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Jt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Zt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),es=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ts=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],be=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ss=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=ee(t,l,[]);return be(x)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return be(l)}const o={};return ke.forEach(l=>{const x=`${l}SendRecord`,f=ee(t,x,[]),y=be(f);o[l]=y}),r.length>0&&r.forEach(l=>{const x=n[l]??[],f=be(x);o[l]=f}),o},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Se=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ns=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:o,title:l="",sentTime:x="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(C,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[o]}}),e.jsx(C,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[o]}})]}),e.jsx(U,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ve({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:o}=X();return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(l=>{const x=lt(r,o,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:f=>n(f,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:o,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:o.map(f=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(f.value??f)>-1,onChange:y=>{const h=[...t];y.target.checked?h[n]=[...h[n],f.value??f]:h[n]=h[n].filter(b=>b!==(f.value??f)),s(h[n],n,r)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(f)})},f.value??f))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:o}){const{t:l,locale:x}=X(),f=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(Ne,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:o,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=X(),r=H().toDate(),[o,l]=g.useState(null),x=g.useCallback(h=>{l(o?null:h.currentTarget)},[o]),f=!!o,y=g.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(H(h.startDate).isAfter(h.endDate)||!H(h.startDate).isValid()||!H(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(U,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ne,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:f,anchorEl:o,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Kt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:y})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=X();return!s?.filterList?.filter(o=>o.length).length?null:e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Pt.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...o&&l?{onDelete:o}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const is=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=X(),[o,l]=g.useState(is),[x,f]=g.useState(!0),y=(b,S)=>{S.checked=b.target.checked;const B=o.map(_=>({..._,checked:_.value===S.value?S.checked:_.checked}));l(B)},h=b=>{b.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(U,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:o.map(b=>e.jsx(Ie,{control:e.jsx(Ee,{checked:b.checked,onChange:S=>y(S,b),name:b.value}),label:b.label},b.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:b=>f(b.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ne,{onClick:b=>{b.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ne,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Qe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:o}=X(),l=Xe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:f,inService:y,teamDid:h,getUser:b,blocklet:S}=Be(),[B,_]=g.useState(!1),[R,$]=g.useState([]),M=De({anchorEl:null,position:null}),k=De({anchorEl:null,position:null}),[F,V]=g.useState(null),[G,J]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,N]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[O,A]=g.useState([]),w=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],L=async()=>{if(!B&&t)try{_(!0);const i=await f({notificationId:t,...m}),a=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,y)}}));$(a),J(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{L()},[m]);const P=i=>{i.stopPropagation();const a=i.currentTarget;k.anchorEl=a;const c=a.getBoundingClientRect();k.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:P,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:G.page-1,rowsPerPage:G.pageSize,count:G.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:O,onRowSelectionChange:(i,a)=>{A(a.map(c=>c.dataIndex))},customToolbarSelect:ae},Z=({page:i,rowsPerPage:a,searchText:c,filterList:v})=>{const[,z=[],Y=[],K=[]]=v;m.pageSize!==a?N(W=>({...W,pageSize:a,page:1})):m.page!==i+1?N(W=>({...W,page:i+1})):m.searchText!==c?N(W=>({...W,searchText:c,page:1})):pe(z,m.walletSendStatus)?pe(Y,m.pushKitSendStatus)?pe(K,m.emailSendStatus)||N(W=>({...W,emailSendStatus:K,page:1})):N(W=>({...W,pushKitSendStatus:Y,page:1})):N(W=>({...W,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,a)=>{if(!a)return!1;const c=await b(a);return c?i==="wallet"?Zt(c):i==="email"?Xt(S,c):i==="pushKit"?Jt(S,c):i==="webhook"?es(c):!0:!1},[b,S]),we=g.useCallback(i=>ts(r,i),[r]),ne=()=>{M.anchorEl=null,M.position=null,V(null)},re=()=>{k.anchorEl=null,k.position=null},ge=async(i,a,c=!0,v="")=>{if(!(!a.length||!i.length))try{s(i,a,c,v),k.anchorEl||(await xe(.5),ne())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:a})=>{const c=O.map(v=>R[v].receiver);await ge(i,c,a),await xe(.5),re(),A([])},u=async(i,a=[],c=!0)=>{try{await ge(["webhook"],[i.receiver],c,a)}catch(v){q.error(v.response?v.response.statusText:v.message)}},j=async(i,a,c,v=[],z=!0)=>{if(i.stopPropagation(),ss(a,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await u(a,v,z);return}if(i){const K=i.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}V({channel:c});try{const K=await oe(c,a.receiver);await xe(1),V({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[a.receiver],z),k.anchorEl||(await xe(.5),ne()))}catch(K){q.error(K.message)}},I=i=>{N(a=>({...a,dateRange:i,page:1}))},E=(i,a,c,v)=>{i.stopPropagation();const z=c.filter(Y=>Y!==a);N(Y=>({...Y,[v]:z,page:1}))},T=Q(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:a,receiver:c}=R[i];return a?e.jsxs(C,{"data-cy":`member-name-${a.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${a.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:a.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Wallet",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:a,index:c,column:v,filterValues:w})},customBodyRenderLite:i=>{const{walletSendStatus:a,walletSendAt:c,walletSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"wallet",onResend:z=>j(z,R[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:a,pushKitSendAt:c,pushKitSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"pushkit",onResend:z=>j(z,R[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Push Kit",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:a,emailSendAt:c,emailSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"email",onResend:z=>j(z,R[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Email",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Email",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:a}=R[i];if(!a)return null;const c=Object.entries(a)[0];if(!c)return null;const[v,z]=c,Y=z[0];return e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(C,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:v},v),e.jsx(ce,{status:Y.status,updatedAt:Y.sendAt,reason:Y.failedReason,channel:"webhook",onResend:K=>j(K,R[i],"webhook",[v],!1)})]},v)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:a}=R[i];return e.jsx(et,{value:a,locale:o,shouldUpdate:!0})}}}],[R,o,m,r]),le=[e.jsx(We,{value:m.dateRange,onChange:I},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Mt,{}),onClick:()=>L(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(os,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:o,loading:B,columns:T,data:R,onChange:Z,options:se,customButtons:le,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:a=>e.jsx(Ke,{...a,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ae,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:ne,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rs,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[F?.channel," Checking"]}),e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:we(F?.channel).map(i=>{const{type:a,pass:c,fail:v}=i;return!F?.result||F?.result?.[a]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:F?.result?.[a]?je.success.main:"inherit"},children:[F?.result?e.jsx($t,{}):e.jsx(Qe,{size:12,sx:{color:je.primary.main}}),e.jsx("span",{children:c})]},a):e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:je.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:v})]},a)})})]})}),k.anchorEl&&e.jsx(Ae,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:re,onConfirm:p})})]})})})}const as=g.memo(ft),os=ie.div`
1
+ import{aF as Ge,j as e,bn as gt,r as g,bC as Q,bf as H,H as q,aH as D,g as xt,o as d,h as ee,at as bt,ay as jt,K as C,T as U,V as X,eO as Fe,O as Pe,ik as Ye,bj as Te,aU as Ie,R as Ee,dI as Ne,b3 as qe,b1 as Ae,C as Qe,f as Xe,f0 as Je,aP as De,W as yt,as as Ze,il as et,v as Oe,f2 as tt,bq as je,fI as st,dC as St,s as ie,af as pe,G as Ue,au as vt,im as Ct,io as Nt,$ as nt,ip as wt,iq as Rt,ir as Tt,is as It,N as Et,bx as it,E as At,J as Dt,P as Ot,S as Lt,Q as $e,it as kt,a3 as Ft}from"./index-yswwzF5j.js";import{d as Pt,H as at,g as _t}from"./index-DpTAGAPn.js";import{R as _e,S as Bt}from"./actions-Ga2fzCsK.js";import{B as zt}from"./index-bpG0pZjZ.js";import{S as me}from"./shorten-label-B5mMaxtE.js";import{v as ot}from"./index-BnaKcKGB.js";import{T as Wt}from"./html-title-DHS4olpg.js";import{R as Mt}from"./Refresh-CGb4dm1q.js";import{D as Kt,g as Ht}from"./traffic-Ddp7SazS.js";import{u as qt}from"./use-mobile-XcY2Cyny.js";import"./FilterList-B3p8Dk3n.js";import"./CSSTransition-CCwAGfFQ.js";import"./emotion-cache.browser.esm-CKuFWOIj.js";import"./index-C3n0A7Wo.js";import"./redux-DfszZyTl.js";import"./typeof-QjJsDpFa.js";import"./depsEqual-_xQRTFyO.js";import"./index-DEcX5t7S.js";import"./TableSearch-9LdRBcNX.js";import"./Search-Bi-YajvD.js";import"./Clear-Dt0hyqhf.js";import"./MoreVert-CwwnSp8i.js";import"./useLocalStorage-Dc1mtSxM.js";import"./url-evaluation-f0Hob2_O.js";import"./get-safe-url-Dgrm96lK.js";import"./ButtonGroup-D9IPG5yn.js";import"./getValidReactChildren-BJNb29cM.js";import"./permission-BgQoDLVn.js";import"./index.esm-BoYu4gmv.js";import"./collapse-BEN1vMis.js";import"./blocklet-DVSLRqIf.js";import"./Switch-C0Dt_Fvl.js";import"./iframe-B9O5EPZl.js";import"./ChevronLeft-6ufSrKPV.js";import"./ChevronRight-CGaNHLdw.js";import"./index-DBii9-f-.js";import"./base-chart-DMmncGBc.js";import"./index-C5GU1sOn.js";import"./AdapterDayjs-D0cLXAfS.js";import"./useThemeProps-DMwbfVFK.js";import"./visuallyHidden-Dan1xhjv.js";const Ut=Ge(e.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2M4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12m8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8"})),$t=Ge(e.jsx("path",{d:"M16.59 7.58 10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"})),rt=g.createContext({}),{Provider:Vt,Consumer:on}=rt;function Gt({children:t,blocklet:s=""}){const{api:n,inService:r,ws:{useSubscription:o}}=gt(),[l,x]=g.useState([]),[f,y]=g.useState({total:0,pageSize:20,pageCount:0,page:1}),h=Q(()=>s.meta?.did,[s]),[b,S]=g.useState([]),[B,_]=g.useState({}),R=Q(()=>l.length?new Set(l.map(m=>m.id)):new Set,[l]),$=async({page:m=1,pageSize:N=20,...O}={})=>{if(!h)return[];try{const A={paging:{page:m,pageSize:N},...O,teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0},{dids:w,...L}=A;let P="";w&&w.includes("system")&&(P="system");const ae=w?w.filter(oe=>oe!=="system"):[],se={...L,source:P,componentDids:ae},Z=await n.getNotificationSendLog({input:se});return _(se),x(Z.list),y(Z.paging),Z.list}catch(A){return q.error(A.message),[]}},M=async()=>{const m=await n.getNotificationComponents({input:{teamDid:h}});S(m.componentDids)},k=g.useCallback(m=>{const N=s.children.find(O=>O.meta?.did===m);if(N)return N.ancestors=[s],N},[s]),F=async({notificationId:m,receivers:N,channels:O,...A})=>{await n.resendNotification({input:{teamDid:h,notificationId:m,receivers:N,channels:O.map(w=>w==="wallet"?D.NOTIFICATION_SEND_CHANNEL.WALLET:w==="pushKit"?D.NOTIFICATION_SEND_CHANNEL.PUSH:w),...A}})},V=g.useCallback(async m=>(await n.getUser({input:{teamDid:h,user:{did:m},options:{enableConnectedAccount:!0}}})).user,[n,h]),G=g.useCallback(async({page:m=1,pageSize:N=20,...O}={})=>{try{const A={paging:{page:m,pageSize:N},...O,userName:O.searchText||"",teamDid:h,dateRange:O.dateRange?[H(O.dateRange[0]).toISOString(),H(O.dateRange[1]).toISOString()]:void 0};return await n.getReceivers({input:A})}catch(A){throw q.error(A.message),A}},[n,h]);g.useEffect(()=>{h&&M()},[h]),o(D.EVENTS.NOTIFICATION_BLOCKLET_UPDATE,m=>{R.has(m.notificationId)&&$(B)},[R,B]),o(D.EVENTS.NOTIFICATION_BLOCKLET_CREATE,m=>{R.has(m.id)||$(B)},[R,B]);const J={fetch:$,data:l,paging:f,blocklet:s,getComponent:k,resendNotification:F,getUser:V,componentDids:b,getReceivers:G,inService:r,teamDid:h};return e.jsx(Vt,{value:{notificationRecords:J},children:t})}function Be(){const{notificationRecords:t}=g.useContext(rt);return t}he.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const Yt={info:"primary",success:"success",error:"error",warning:"warning"};function he({severity:t="info"}){return e.jsx(xt,{type:Yt[t],children:t})}const Qt=(t,s,n="")=>{if(!n||!s)return"";switch(n){case D.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:s});case D.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return n}};function lt(t,s,n={}){const{status:r,updatedAt:o,reason:l="",channel:x="wallet"}=n,f=o?t("notification.sendStatus.sentTime",{date:bt(o,s)}):"",y=Qt(t,x,l);return r===D.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:r===D.NOTIFICATION_SEND_STATUS.SENT?{status:"success",title:t("notification.sendStatus.success"),sentTime:f}:{status:"pending",title:t("notification.sendStatus.pending"),reason:y,sentTime:f}}const Le={pending:"#aaaaaa",success:"#34BE74",failed:"#D0021B"},ke=["wallet","pushKit","email"],Ve=["info","success","error","warning"],ct=t=>{const{settings:s}=t;return s?.notification?.email?.enabled},dt=t=>{const{settings:s}=t;return s?.notification?.pushKit?.enabled},Xt=(t,s)=>{const n=ee(s,"extra.notifications.email",!0);return{available:ct(t),enabled:n}},Jt=(t,s)=>{const n=ee(s,"extra.notifications.push",!0);return{available:dt(t),enabled:n}},Zt=t=>({enabled:ee(t,"extra.notifications.wallet",!0)}),es=t=>({enabled:ee(t,"extra.webhooks",[]).length>0}),xe=(t=3)=>new Promise(s=>{setTimeout(()=>{s()},t*1e3)}),ts=(t,s)=>s==="wallet"||s==="webhook"?[{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:s==="pushKit"||s==="email"?[{channel:s,type:"available",pass:t("notification.sendStatus.reason.available",{channel:s}),fail:t("notification.sendStatus.reason.unavailable",{channel:s})},{channel:s,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:s}),fail:t("notification.sendStatus.reason.disabled",{channel:s})}]:[],be=(t=[])=>{const s=H().startOf("day");return t.filter(n=>H(n.sendAt).isSame(s,"day")).length},ss=(t,s="")=>{if(s&&ke.includes(s)){const l=`${s}SendRecord`,x=ee(t,l,[]);return be(x)}const n=ee(t,"webhook",{}),r=Object.keys(n??{})??[];if(s&&r.includes(s)){const l=n[s]??[];return be(l)}const o={};return ke.forEach(l=>{const x=`${l}SendRecord`,f=ee(t,x,[]),y=be(f);o[l]=y}),r.length>0&&r.forEach(l=>{const x=n[l]??[],f=be(x);o[l]=f}),o},ye=(t,s,n)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[n].splice(s,1),t},Se=(t,s)=>{if(!Array.isArray(s))throw new Error("filters must be an array");return s.length?!s.includes(t):!1},ns=t=>{switch(t){case D.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case D.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case D.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case D.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ut=()=>({components:{MUIDataTableFilter:{styleOverrides:{header:{marginBottom:0,p:{margin:0}},root:{"& .MuiGrid-container":{marginTop:0,"& .MuiGrid-item":{paddingTop:0}}}}},MuiPopover:{styleOverrides:{root:{"&.MuiPopover-root":{"& .MuiPaper-root:has(.filter-container)":{width:"420px"}}}}}}});function te({config:t,enableTooltip:s=!0,showTitle:n=!1,children:r=null}){const{status:o,title:l="",sentTime:x="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:s?e.jsxs(e.Fragment,{children:[e.jsx(U,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:x})]}):null,arrow:!0,placement:"top",children:e.jsxs(C,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(C,{sx:{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center"},children:[e.jsx(C,{style:{opacity:.15},sx:{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[o]}}),e.jsx(C,{sx:{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[o]}})]}),e.jsx(U,{color:"inherit",sx:{fontSize:12},children:n?l:r})]})})}te.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};ve.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};function ve({list:t,label:s,onDelete:n=()=>{}}){const{t:r,locale:o}=X();return e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsxs(U,{children:[s,": "]}),t.map(l=>{const x=lt(r,o,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(C,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:e.jsx(te,{config:x,enableTooltip:!1,children:x.title})}),onDelete:f=>n(f,l)},l)})]})}ze.propTypes={filterList:d.array.isRequired,onChange:d.func.isRequired,index:d.number.isRequired,column:d.object.isRequired,filterValues:d.array.isRequired,label:d.string.isRequired,renderLabel:d.func.isRequired};function ze({filterList:t,onChange:s,index:n,column:r,filterValues:o,label:l,renderLabel:x}){return e.jsxs(Pe,{className:"filter-container",children:[e.jsx(Ye,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:o.map(f=>e.jsx(Ie,{control:e.jsx(Ee,{checked:t[n].indexOf(f.value??f)>-1,onChange:y=>{const h=[...t];y.target.checked?h[n]=[...h[n],f.value??f]:h[n]=h[n].filter(b=>b!==(f.value??f)),s(h[n],n,r)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:x(f)})},f.value??f))})]})}function Re(t){return e.jsx(ze,{...t,renderLabel:s=>e.jsx(te,{enableTooltip:!1,config:{status:s.status},children:s.label})})}ce.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function ce({status:t,updatedAt:s,reason:n="",channel:r="wallet",onResend:o}){const{t:l,locale:x}=X(),f=lt(l,x,{status:t,updatedAt:s,reason:n,channel:r});return e.jsxs(C,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(te,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(Ne,{className:"resend-btn",size:"small",startIcon:e.jsx(_e,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:o,children:l("notification.resend")})]})}We.propTypes={value:d.array.isRequired,onChange:d.func};function We({value:t,onChange:s}){const{locale:n}=X(),r=H().toDate(),[o,l]=g.useState(null),x=g.useCallback(h=>{l(o?null:h.currentTarget)},[o]),f=!!o,y=g.useCallback(h=>{if(!h.startDate||!h.endDate){q.error("Please select a date range");return}if(H(h.startDate).isAfter(h.endDate)||!H(h.startDate).isValid()||!H(h.endDate).isValid()){q.error("Invalid date range");return}s([h.startDate,h.endDate]),l(null)},[s]);return e.jsxs("div",{children:[e.jsx(U,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},sx:{mb:0},children:e.jsxs(Ne,{onClick:x,variant:"outlined",size:"small",color:"inherit",children:[qe(t[0],n)," - ",qe(t[1],n)]})}),e.jsx(Ae,{open:f,anchorEl:o,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(Kt,{open:!0,maxDate:r,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:x,definedRanges:Ht(r),onChange:y})})]})}Me.propTypes={itemComponent:d.elementType.isRequired};function Me({itemComponent:t,...s}){const{t:n}=X();return!s?.filterList?.filter(o=>o.length).length?null:e.jsxs(C,{sx:{display:"flex",gap:1,alignItems:"center"},children:[e.jsx("div",{className:"toolbar-filter-title",children:n("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(Pt.TableFilterList,{...s,ItemComponent:t})})]})}function Ke({label:t,onDelete:s,canDelete:n=()=>!0,...r}){const o=s&&typeof s=="function"?s:void 0;let l=!0;return n&&typeof n=="function"&&(l=n({label:t,...r})),e.jsx(Fe,{label:t,variant:"outlined",...o&&l?{onDelete:o}:{}})}Ke.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};const is=[{label:"Wallet",value:"app",checked:!0},{label:"Email",value:"email",checked:!0},{label:"Push Kit",value:"push",checked:!0},{label:"Webhook",value:"webhook",checked:!0}];pt.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};function pt({loading:t=!1,onCancel:s=()=>{},onConfirm:n=()=>{}}){const{t:r}=X(),[o,l]=g.useState(is),[x,f]=g.useState(!0),y=(b,S)=>{S.checked=b.target.checked;const B=o.map(_=>({..._,checked:_.value===S.value?S.checked:_.checked}));l(B)},h=b=>{b.stopPropagation(),n({channels:o.filter(S=>S.checked).map(S=>S.value),isResendFailedOnly:x})};return e.jsxs(C,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(U,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:r("notification.config")}),e.jsx(C,{className:"choose-channel",children:e.jsxs(Pe,{component:"fieldset",variant:"standard",children:[e.jsx(Ye,{component:"legend",children:r("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:o.map(b=>e.jsx(Ie,{control:e.jsx(Ee,{checked:b.checked,onChange:S=>y(S,b),name:b.value}),label:b.label},b.value))})]})}),e.jsx(C,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(Ee,{checked:x,onChange:b=>f(b.target.checked)}),label:r("notification.resendFailedOnly")})})}),e.jsxs(C,{className:"resend-config-footer-tip",sx:{display:"flex",justifyContent:"flex-end",gap:1},children:[e.jsx(Ne,{onClick:b=>{b.stopPropagation(),s()},color:"inherit",children:r("common.cancel")}),e.jsxs(Ne,{onClick:h,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(Qe,{size:16}),r("common.confirm")]})]})]})}ft.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function ft({notificationId:t,handleResend:s,resending:n=!1}){const{t:r,locale:o}=X(),l=Xe(),x=g.useMemo(()=>Je(l,ut()),[l]),{getReceivers:f,inService:y,teamDid:h,getUser:b,blocklet:S}=Be(),[B,_]=g.useState(!1),[R,$]=g.useState([]),M=De({anchorEl:null,position:null}),k=De({anchorEl:null,position:null}),[F,V]=g.useState(null),[G,J]=g.useState({total:0,pageSize:10,pageCount:0,page:1}),[m,N]=g.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[O,A]=g.useState([]),w=[{label:r("notification.sendStatus.pending"),value:0,status:"pending"},{label:r("notification.sendStatus.success"),value:1,status:"success"},{label:r("notification.sendStatus.failed"),value:2,status:"failed"}],L=async()=>{if(!B&&t)try{_(!0);const i=await f({notificationId:t,...m}),a=i.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:st(c.receiverUser.avatar,h,y)}}));$(a),J(i.paging),_(!1)}catch(i){q.error(i.message),_(!1)}};g.useEffect(()=>{L()},[m]);const P=i=>{i.stopPropagation();const a=i.currentTarget;k.anchorEl=a;const c=a.getBoundingClientRect();k.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ae=i=>i.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Oe,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(_e,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:P,children:r("notification.resend")})}):null,se={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:r("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:G.page-1,rowsPerPage:G.pageSize,count:G.total,searchText:m.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:O,onRowSelectionChange:(i,a)=>{A(a.map(c=>c.dataIndex))},customToolbarSelect:ae},Z=({page:i,rowsPerPage:a,searchText:c,filterList:v})=>{const[,z=[],Y=[],K=[]]=v;m.pageSize!==a?N(W=>({...W,pageSize:a,page:1})):m.page!==i+1?N(W=>({...W,page:i+1})):m.searchText!==c?N(W=>({...W,searchText:c,page:1})):pe(z,m.walletSendStatus)?pe(Y,m.pushKitSendStatus)?pe(K,m.emailSendStatus)||N(W=>({...W,emailSendStatus:K,page:1})):N(W=>({...W,pushKitSendStatus:Y,page:1})):N(W=>({...W,walletSendStatus:z,page:1}))},oe=g.useCallback(async(i,a)=>{if(!a)return!1;const c=await b(a);return c?i==="wallet"?Zt(c):i==="email"?Xt(S,c):i==="pushKit"?Jt(S,c):i==="webhook"?es(c):!0:!1},[b,S]),we=g.useCallback(i=>ts(r,i),[r]),ne=()=>{M.anchorEl=null,M.position=null,V(null)},re=()=>{k.anchorEl=null,k.position=null},ge=async(i,a,c=!0,v="")=>{if(!(!a.length||!i.length))try{s(i,a,c,v),k.anchorEl||(await xe(.5),ne())}catch(z){console.error("handleResend error",{error:z})}},p=async({channels:i,isResendFailedOnly:a})=>{const c=O.map(v=>R[v].receiver);await ge(i,c,a),await xe(.5),re(),A([])},u=async(i,a=[],c=!0)=>{try{await ge(["webhook"],[i.receiver],c,a)}catch(v){q.error(v.response?v.response.statusText:v.message)}},j=async(i,a,c,v=[],z=!0)=>{if(i.stopPropagation(),ss(a,c)>=4){q.warning(r("notification.resendLimit"));return}if(!ke.includes(c)){await u(a,v,z);return}if(i){const K=i.currentTarget,W=K.getBoundingClientRect();M.anchorEl=K,M.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}V({channel:c});try{const K=await oe(c,a.receiver);await xe(1),V({channel:c,result:K}),(typeof K=="boolean"&&K||St(K)&&Object.values(K).every(W=>!!W))&&(await s([c],[a.receiver],z),k.anchorEl||(await xe(.5),ne()))}catch(K){q.error(K.message)}},I=i=>{N(a=>({...a,dateRange:i,page:1}))},E=(i,a,c,v)=>{i.stopPropagation();const z=c.filter(Y=>Y!==a);N(Y=>({...Y,[v]:z,page:1}))},T=Q(()=>[{label:r("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:i=>{const{receiverUser:a,receiver:c}=R[i];return a?e.jsxs(C,{"data-cy":`member-name-${a.fullName}`,sx:{display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start"},children:[e.jsx(Ze,{src:`${a.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(me,{children:a.fullName})]},c):e.jsx(yt,{size:14,responsive:!1,compact:!0,copyable:!1,did:c})}}},{label:"Wallet",name:"walletSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),filter:!0,filterType:"custom",filterList:m.walletSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Wallet",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[1].options.filterList,"walletSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Wallet",filterList:i,onChange:a,index:c,column:v,filterValues:w})},customBodyRenderLite:i=>{const{walletSendStatus:a,walletSendAt:c,walletSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"wallet",onResend:z=>j(z,R[i],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{pushKitSendStatus:a,pushKitSendAt:c,pushKitSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"pushkit",onResend:z=>j(z,R[i],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:m.pushKitSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Push Kit",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[2].options.filterList,"pushKitSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Push Kit",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{emailSendStatus:a,emailSendAt:c,emailSendFailedReason:v}=R[i];return e.jsx(ce,{status:a,updatedAt:c,reason:v,channel:"email",onResend:z=>j(z,R[i],"email",[],!1)})},filter:!0,filterType:"custom",filterList:m.emailSendStatus??[],customFilterListOptions:{render:i=>e.jsx(ve,{list:i,label:"Email",onDelete:(a,c)=>{a.stopPropagation(),E(a,c,T[3].options.filterList,"emailSendStatus")}}),update:ye},filterOptions:{names:w,fullWidth:!0,logic:Se,display:(i,a,c,v)=>e.jsx(Re,{label:"Email",filterList:i,onChange:a,index:c,column:v,filterValues:w})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:i=>{const{webhook:a}=R[i];if(!a)return null;const c=Object.entries(a)[0];if(!c)return null;const[v,z]=c,Y=z[0];return e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:1},children:e.jsxs(C,{className:"webhook-item",sx:{fontSize:12},children:[e.jsx(me,{maxLength:30,children:v},v),e.jsx(ce,{status:Y.status,updatedAt:Y.sendAt,reason:Y.failedReason,channel:"webhook",onResend:K=>j(K,R[i],"webhook",[v],!1)})]},v)})}}},{label:r("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:i=>{const{createdAt:a}=R[i];return e.jsx(et,{value:a,locale:o,shouldUpdate:!0})}}}],[R,o,m,r]),le=[e.jsx(We,{value:m.dateRange,onChange:I},"date-picker"),e.jsx(Oe,{variant:"contained",size:"small",color:"primary",loading:B,startIcon:e.jsx(Mt,{}),onClick:()=>L(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:r("common.refresh")},"refresh")];return e.jsx(C,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(os,{children:e.jsxs(tt,{theme:x,children:[e.jsx(at,{className:"receivers-table",locale:o,loading:B,columns:T,data:R,onChange:Z,options:se,customButtons:le,components:{TableFilterList:i=>e.jsx(Me,{...i,itemComponent:a=>e.jsx(Ke,{...a,canDelete:()=>!1})})}}),M.anchorEl&&e.jsx(Ae,{open:!!M.anchorEl,anchorReference:"anchorPosition",anchorPosition:M.position,onClose:ne,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rs,{children:[e.jsxs(U,{variant:"body1",component:"div",className:"check-title",children:[F?.channel," Checking"]}),e.jsx(C,{sx:{display:"flex",flexDirection:"column",gap:"4px"},children:we(F?.channel).map(i=>{const{type:a,pass:c,fail:v}=i;return!F?.result||F?.result?.[a]?e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:F?.result?.[a]?je.success.main:"inherit"},children:[F?.result?e.jsx($t,{}):e.jsx(Qe,{size:12,sx:{color:je.primary.main}}),e.jsx("span",{children:c})]},a):e.jsxs(U,{variant:"body1",component:"div",className:"check-item",sx:{display:"flex",alignItems:"center",gap:"4px",color:je.error.main},children:[e.jsx(Ut,{}),e.jsx("span",{children:v})]},a)})})]})}),k.anchorEl&&e.jsx(Ae,{open:!!k.anchorEl,anchorReference:"anchorPosition",anchorPosition:k.position,onClose:re,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(pt,{loading:n,onCancel:re,onConfirm:p})})]})})})}const as=g.memo(ft),os=ie.div`
2
2
  td.MuiTableCell-footer {
3
3
  border: none !important;
4
4
  }
@@ -1 +1 @@
1
- import{u as f,j as s,C as d,A as w,ax as v,cu as C,cv as u,ae as j,aH as I,K as P,bA as S}from"./index-aBYVnSTR.js";import{I as E}from"./invitation-CHznZcgk.js";import{g as R}from"./get-safe-url-0QzE8yuB.js";import"./index-Ds0pI2MN.js";import"./index-a3L7dRi2.js";import"./emotion-cache.browser.esm-CpMdll1P.js";import"./sdk-Bz8gm39t.js";import"./wrap-locale-1csSF2mo.js";import"./index-43gui-m-.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function _(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{_ as default};
1
+ import{u as f,j as s,C as d,A as w,ax as v,cu as C,cv as u,ae as j,aH as I,K as P,bA as S}from"./index-yswwzF5j.js";import{I as E}from"./invitation-BdXUGKdX.js";import{g as R}from"./get-safe-url-Dgrm96lK.js";import"./index-Cq1JH1Y4.js";import"./index-CXV4_C7z.js";import"./emotion-cache.browser.esm-CKuFWOIj.js";import"./sdk-C8XgFCDF.js";import"./wrap-locale-uQWlJ9sO.js";import"./index-BKz7TNe3.js";function T(n){const{searchParams:a}=new URL(window.location.href),g=w(),{api:i,session:r}=v(),{info:l}=f(),c=a.get("redirect"),p=a.get("id"),o=C(async()=>{if(!p)return null;const{data:t}=await i.get("/api/invitation",{params:{inviteId:p,mode:"issue-passport"}});return t}),m=u(()=>{if(o.error)throw o.error;return o?.data}),x=u(async(t,h=e=>e)=>{t&&(t.sessionToken&&j(h(t.sessionToken)),await r.refresh()),setTimeout(()=>{if(c){const e=decodeURIComponent(c);e.startsWith(I.WELLKNOWN_SERVICE_PATH_PREFIX)?g(e,{replace:!0}):window.location.href=R(e)}else window.location.href=window.env.pathPrefix||"/"},50)});return o.loading?s.jsx(d,{}):s.jsx(P,{className:"page-invite",sx:{width:"100vw",height:"100%",minHeight:"100vh",display:"flex",justifyContent:"center",alignItems:"center",backgroundColor:"#f6f8fa",overflow:"auto",padding:"20px"},children:s.jsx(E,{...n,action:"issue-passport",getDataFn:m,createPassportSvg:t=>S(t,l),checkFn:i.get,onLoginSuccess:x,passportColor:"default",onLogin:r.login})})}function _(){return f().loading?s.jsx(d,{}):s.jsx(T,{})}export{_ as default};