@abtnode/blocklet-services 1.16.40-beta-20250310-113951-17556f90 → 1.16.40-beta-20250311-152346-f596c9a6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/routes/env.js +6 -1
- package/dist/assets/{ArrowDropDown-Cm4c8BlY.js → ArrowDropDown-DheqHCCF.js} +1 -1
- package/dist/assets/{CheckCircle-sJN5S1iC.js → CheckCircle-icyGVeS3.js} +1 -1
- package/dist/assets/{ChevronLeft-BeX0eKuU.js → ChevronLeft-bdr0IWyY.js} +1 -1
- package/dist/assets/{ChevronRight-BWxZ0GT9.js → ChevronRight-B6l1CEz4.js} +1 -1
- package/dist/assets/{DeleteOutline-DnZa0RcQ.js → DeleteOutline-L2iWFlT2.js} +1 -1
- package/dist/assets/{Done-CUONuiq7.js → Done-X-4W5E4Z.js} +1 -1
- package/dist/assets/{Download-BymJGiyd.js → Download-KssoHqH-.js} +1 -1
- package/dist/assets/{Error-B8-wyPeq.js → Error-DMPWKbSE.js} +1 -1
- package/dist/assets/{ExpandLess-1p_uqVHy.js → ExpandLess-AXYDWRn3.js} +1 -1
- package/dist/assets/{Google-CtwTVSPC.js → Google-CJwVSjNE.js} +1 -1
- package/dist/assets/{InfoOutlined-aPcuFKow.js → InfoOutlined-Ov0NeUHF.js} +1 -1
- package/dist/assets/{Launch-CNY19G4F.js → Launch-DUM2L1rB.js} +1 -1
- package/dist/assets/{LaunchOutlined-CBLNAogt.js → LaunchOutlined-BnDQc5Sb.js} +1 -1
- package/dist/assets/{MoreHoriz-BTnTEmyW.js → MoreHoriz-CP4-d2O8.js} +1 -1
- package/dist/assets/{PlayArrow-BWaTV7IU.js → PlayArrow-CetrL8A8.js} +1 -1
- package/dist/assets/{ViewList-gKXyJK1z.js → ViewList-DrzfpKe8.js} +1 -1
- package/dist/assets/{access-control-CRSnnV6w.js → access-control-BgkIaXxY.js} +1 -1
- package/dist/assets/{actions-D8Lw3xe3.js → actions-DZEOmM8C.js} +1 -1
- package/dist/assets/{add-component-core-BzFnxw8D.js → add-component-core-DmpERZx5.js} +1 -1
- package/dist/assets/{add-resource-C5MQEh_d.js → add-resource-RtUldQQB.js} +1 -1
- package/dist/assets/{addon-DThNrUvh.js → addon-CC_VQs_t.js} +1 -1
- package/dist/assets/{analytics-BEGoboDQ.js → analytics-CW4F70VX.js} +24 -24
- package/dist/assets/{audit-logs-BP-xi6Ls.js → audit-logs-C-zRLanq.js} +1 -1
- package/dist/assets/{base32-CkPppFg3.js → base32-CZKGH0iY.js} +1 -1
- package/dist/assets/{branding-D1FesAUj.js → branding-v20lJZ2s.js} +2 -2
- package/dist/assets/{bundle-avatar-Ne6xQFVO.js → bundle-avatar-BlPK_xIf.js} +1 -1
- package/dist/assets/{button-Bzt1WONY.js → button-C2RSw3-I.js} +1 -1
- package/dist/assets/{click-to-copy-Ds1jMEk3.js → click-to-copy-VzwunQar.js} +1 -1
- package/dist/assets/{complete-Cw_4hnLS.js → complete-gCWwSeJ8.js} +1 -1
- package/dist/assets/{component-InzHICwc.js → component-0u03MiuP.js} +1 -1
- package/dist/assets/{config-Chl1wmCe.js → config-Bk4gLExD.js} +1 -1
- package/dist/assets/{config-Dneb0aPp.js → config-T5SAjJgd.js} +1 -1
- package/dist/assets/{config-navigation-pBPU0Hd1.js → config-navigation-ChmAH362.js} +3 -3
- package/dist/assets/{config-space-DAxx03my.js → config-space-rNFeeNC_.js} +1 -1
- package/dist/assets/{confirm-twAiL-Pg.js → confirm-D0n5z1n8.js} +1 -1
- package/dist/assets/{connect-CcqhkXJt.js → connect-DCY4Jb8T.js} +1 -1
- package/dist/assets/{connect-CCL_tilR.js → connect-DEXuSIPd.js} +1 -1
- package/dist/assets/{connect-to-CdxZm7ze.js → connect-to-W1IhVAJI.js} +1 -1
- package/dist/assets/{dashboard-j9G-KyD0.js → dashboard-2_ANBDid.js} +3 -3
- package/dist/assets/{delete-confirm-B7RqZZsx.js → delete-confirm-BMxPgiOj.js} +1 -1
- package/dist/assets/{did-address-aMjKReYC.js → did-address-BZkQh8hP.js} +1 -1
- package/dist/assets/{domain-BoBqD6my.js → domain-BQKAtptg.js} +1 -1
- package/dist/assets/{domain-action-card-BK6VL21y.js → domain-action-card-CA7v5edx.js} +1 -1
- package/dist/assets/domains-BJrThc7T.js +1 -0
- package/dist/assets/{email-D62rIr3r.js → email-BqJ9_T6C.js} +1 -1
- package/dist/assets/{exchange-passport-C6QFYPcO.js → exchange-passport-B0wrsnl3.js} +1 -1
- package/dist/assets/{form-text-input-BeH6diu_.js → form-text-input-CWW9B7Sr.js} +1 -1
- package/dist/assets/{fuel-D-BDqeNn.js → fuel-iz1fZnmu.js} +1 -1
- package/dist/assets/{fullpage-CaydfTeK.js → fullpage-D5QTe_lH.js} +1 -1
- package/dist/assets/{get-safe-url-DmtG3OsE.js → get-safe-url-CH0HGyks.js} +1 -1
- package/dist/assets/{get-safe-url-DpCrXjD2.js → get-safe-url-kaD2Thuv.js} +1 -1
- package/dist/assets/{home-Cuc7_BZ5.js → home-DRHHxS-r.js} +1 -1
- package/dist/assets/{iframe-BDXgtf3V.js → iframe-Cgdpmo47.js} +1 -1
- package/dist/assets/{index-CVOcFexA.js → index-B5ybA0YM.js} +1 -1
- package/dist/assets/{index-HAqfkqId.js → index-BF3-XDCZ.js} +1 -1
- package/dist/assets/{index-BxEJpAM1.js → index-BK-dUwZM.js} +1 -1
- package/dist/assets/{index-CTjSo_AM.js → index-BzTnWASB.js} +1 -1
- package/dist/assets/{index-KCwqCBtZ.js → index-CW52563O.js} +1 -1
- package/dist/assets/{index-BJbC-Qjr.js → index-CXwy6oRm.js} +14 -14
- package/dist/assets/{index-Bcdz6ivm.js → index-CZUmIG8F.js} +1 -1
- package/dist/assets/{index--Cpu5zj7.js → index-C_FtwO8G.js} +1 -1
- package/dist/assets/{index-C0wrMJu_.js → index-CnmX1vWr.js} +1 -1
- package/dist/assets/{index-B17pt9EP.js → index-CoKtbLLl.js} +3 -3
- package/dist/assets/{index-CUYPBPCk.js → index-D4gpYyLc.js} +1 -1
- package/dist/assets/{index-CXzEtZ8-.js → index-DXBIUU3d.js} +1 -1
- package/dist/assets/{index-Y2eFnQMq.js → index-DtxIeDEh.js} +1 -1
- package/dist/assets/{index-DloKVD7k.js → index-HmJ9QMds.js} +1 -1
- package/dist/assets/{index-C1klzBZN.js → index-WMPymUEC.js} +1 -1
- package/dist/assets/{index-BkVeJ_e6.js → index-krul9I6i.js} +4 -4
- package/dist/assets/{invitation-CZiw6z3M.js → invitation-BNQvoyTR.js} +1 -1
- package/dist/assets/{invite-Dsc4lS8l.js → invite-B6hmysnT.js} +1 -1
- package/dist/assets/{issue-passport-RgE7dNyX.js → issue-passport-B7Yw5a4t.js} +1 -1
- package/dist/assets/{item-zC83d6Jc.js → item-DFGLmzrP.js} +1 -1
- package/dist/assets/{layout--BSYMlCG.js → layout-DyxhTYbC.js} +1 -1
- package/dist/assets/{list-DTzzPxLP.js → list-DsNBlXE-.js} +1 -1
- package/dist/assets/{list-header-Cb3sYAQH.js → list-header-IsGBJzos.js} +1 -1
- package/dist/assets/{localization-DFOGQYul.js → localization-DNaC8oQT.js} +1 -1
- package/dist/assets/{log-DyxPA0PM.js → log-C6JOSl-5.js} +1 -1
- package/dist/assets/{login-DPEenGU7.js → login-TRHawCKd.js} +1 -1
- package/dist/assets/{login-oauth-callback-B4CoyqBw.js → login-oauth-callback-D7oAD1At.js} +1 -1
- package/dist/assets/{logo-uploader-G4QDSsmU.js → logo-uploader-DDJYY3pX.js} +3 -3
- package/dist/assets/{lost-passport-CfqCVhZZ.js → lost-passport-lwSTGoh1.js} +1 -1
- package/dist/assets/{open-window-Ctz49LJV.js → open-window-Cho8q-Xo.js} +1 -1
- package/dist/assets/{overview-B32B6ff2.js → overview-Cwp7nCaA.js} +1 -1
- package/dist/assets/{page-header-CmCHR1mk.js → page-header-Cf3DzOs1.js} +1 -1
- package/dist/assets/{permission-BPUMaZy_.js → permission-CXzHZ1xb.js} +1 -1
- package/dist/assets/{preferences-BJxsqezy.js → preferences-C_k8X-gu.js} +1 -1
- package/dist/assets/{publish-resource-DosFKyd_.js → publish-resource-4aMbXQtM.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-BxnrNcYv.js → react-beautiful-dnd.esm-CGraSbOx.js} +1 -1
- package/dist/assets/{relative-time-BPP0lNWq.js → relative-time-CWG4feBZ.js} +1 -1
- package/dist/assets/sdk-B9_oaj3c.js +1 -0
- package/dist/assets/{session-BpknZId5.js → session-D4d96gMA.js} +1 -1
- package/dist/assets/{setup-B50yc7wk.js → setup-5xi9HrWL.js} +3 -3
- package/dist/assets/{start-N83AUhRn.js → start-EuZUsPa9.js} +1 -1
- package/dist/assets/{status-DCrcVds4.js → status-B9KX2z2U.js} +1 -1
- package/dist/assets/{step-actions-CQeRAM0V.js → step-actions-CecLll6l.js} +1 -1
- package/dist/assets/{studio-BKW7u_X7.js → studio-BpfS_Vne.js} +1 -1
- package/dist/assets/{switch-control-BF9Q5dT3.js → switch-control-CQ0cKV4J.js} +1 -1
- package/dist/assets/{traffic-DIZGb0Wa.js → traffic-CNWuNYq6.js} +1 -1
- package/dist/assets/{transfer-13oWu-Fn.js → transfer-DWIc8Xld.js} +1 -1
- package/dist/assets/{unsubscribe-BcN3c7Ba.js → unsubscribe-CsrOVT6b.js} +1 -1
- package/dist/assets/{useLocalStorage-BmgSZ9f3.js → useLocalStorage-BLFh8HxW.js} +1 -1
- package/dist/assets/{user-center-CI8PKX42.js → user-center-Bz87cfKZ.js} +1 -1
- package/dist/assets/{util-CmPA8v8L.js → util-CUMvan5P.js} +1 -1
- package/dist/assets/{util-LJfbsxXq.js → util-CWRewt_A.js} +1 -1
- package/dist/assets/{vendor-arcblock-BSReIGUe.js → vendor-arcblock-DAGgKol-.js} +51 -51
- package/dist/assets/{vendor-ux-did-connect-yBp5D51w.js → vendor-ux-did-connect-BzpeuxHd.js} +1 -1
- package/dist/assets/{wrap-locale-DyYbMONP.js → wrap-locale-BdiYwXFU.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/service-worker.js +1 -1
- package/package.json +29 -29
- package/dist/assets/domains-CzuWJAXa.js +0 -1
- package/dist/assets/sdk-DT6U58At.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as K,j as e,E as f,a9 as Ze,T as v,a2 as b,bm as He,a3 as C,a4 as Ve,cF as Ke,aj as Q,b0 as z,b1 as Z,x as Ge,b2 as Xe,ad as $,bd as H,s as Ye}from"./vendor-mui-core-BGkzVIkr.js";import{l as We,i as qe,f as ce}from"./vendor-hooks-B7GuuzU5.js";import{r as A,f as _e}from"./vendor-react-DoD83n6N.js";import{C as U,z as J,h as O,a0 as $e,ac as et,ax as tt,G as _}from"./index-BJbC-Qjr.js";import{r as G,Q as B,u as k,aU as st,p as T,aY as oe,a0 as nt,be as ot,B as ae,ak as at,C as Ce,ao as it}from"./vendor-ux-did-connect-yBp5D51w.js";import{u as Ie}from"./use-mobile-DAiUO9Qj.js";import{y as ee,d as rt,aC as ct,F as lt,C as Ee,x as le}from"./vendor-utils-DDG_VdF0.js";import{k as dt,s as pt,J as ie,h as ut}from"./vendor-arcblock-BSReIGUe.js";import"./api-Dia2_ulr.js";import{u as ke,C as ht,D as mt,a as ft}from"./connect-to-CdxZm7ze.js";import{g as gt,a as xt,b as St,i as jt,c as de,d as At,e as Bt,h as yt,C as vt,u as Ct}from"./config-space-DAxx03my.js";import{f as te}from"./format-error-LAoTjvJe.js";import{I as It}from"./index-C1klzBZN.js";import{d as Et}from"./MoreHoriz-BTnTEmyW.js";import{c as kt}from"./dashboard-j9G-KyD0.js";import{d as Dt}from"./DeleteOutline-DnZa0RcQ.js";import{g as ve}from"./get-safe-url-DmtG3OsE.js";import{S as Rt}from"./switch-control-BF9Q5dT3.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-BmgSZ9f3.js";import"./confirm-twAiL-Pg.js";import"./PlayArrow-BWaTV7IU.js";import"./index-KCwqCBtZ.js";import"./session-BpknZId5.js";import"./useAsyncRetry-Cbcg1dvJ.js";import"./useAsync-DOwDXG5n.js";import"./InfoOutlined-aPcuFKow.js";import"./useSetState-BL3ktMon.js";var pe={},Tt=K;Object.defineProperty(pe,"__esModule",{value:!0});var De=pe.default=void 0,Ot=Tt(G()),bt=e;De=pe.default=(0,Ot.default)((0,bt.jsx)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9"}),"SettingsBackupRestoreOutlined");var ue={},Ut=K;Object.defineProperty(ue,"__esModule",{value:!0});var Re=ue.default=void 0,Lt=Ut(G()),wt=e;Re=ue.default=(0,Lt.default)((0,wt.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"StorageOutlined");async function Mt({blockletDid:t,nodeApi:s,spaceGateways:o}){let n=!1;const r=await Promise.all(o.map(async i=>{let{name:a}=i;const l=await gt(i.endpoint);return!ee(l)&&l!==a&&(a=l,n=!0),{...i,name:a}}));return n&&await Promise.all(r.filter(i=>i.did).map(i=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:i.did},spaceGateway:{...i}}}))),r}function Ft({refresh:t}={}){var r;const{blocklet:s}=U(),o=(r=s==null?void 0:s.meta)==null?void 0:r.did,{api:n}=J();return We(async()=>{if(!o)return[];const{spaceGateways:i}=await n.getBlockletSpaceGateways({input:{did:o}});return await Mt({blockletDid:o,nodeApi:n,spaceGateways:i})??[]},{refreshDeps:[o,t],onError(i){var a;(a=i==null?void 0:i.message)!=null&&a.includes("not logged")?console.warn(i):(console.error(i),B.error(te(i)))}})}function Te({deps:t,setLoading:s}={deps:[],setLoading:()=>{}}){var l;const{blocklet:o}=U(),[n,r]=A.useState([]),{api:i}=J(),a=rt(async()=>{try{if(s(!0),!o){r([]);return}const{backups:p}=await i.getBlockletBackups({input:{did:o.meta.did}});r(p??[])}catch(p){console.error(p),B.error(te(p))}finally{s(!1)}},2e3);return qe(async()=>{a()},[(l=o==null?void 0:o.meta)==null?void 0:l.did].concat(t)),{backups:n}}function Pt({appDid:t}){const{backups:s}=Te(),[o,n]=A.useState({message:"",progress:0,completed:!1}),r=J(),{ws:{useSubscription:i}}=r;return i(O.BlockletEvents.backupProgress,a=>{t===(a==null?void 0:a.appDid)&&n(()=>({...a}))},[t]),A.useEffect(()=>{var a;if(s!=null&&s.length&&ct((a=s[0])==null?void 0:a.status)){const[l]=s;n(()=>({message:l.message,progress:l.progress,completed:l.progress>=100}))}},[s]),o}const Oe=A.createContext({}),{Provider:Nt,Consumer:Rs}=Oe;function he({children:t}){var Y;const{t:s}=k(),{api:o}=J(),{blocklet:n}=U(),[r,i]=A.useState(!1),{data:a,loading:l,mutate:p}=Ft({refresh:r}),m=lt(a),x=Pt({appDid:n==null?void 0:n.appDid}),d=A.useMemo(()=>xt(n==null?void 0:n.environments),[n==null?void 0:n.environments]),[g,S]=A.useState(!1),{backups:I}=Te({deps:[x],setLoading:S}),[y,u]=A.useState(a==null?void 0:a.find(h=>h.endpoint===d)),c=(Y=n==null?void 0:n.settings)==null?void 0:Y.autoBackup,w=()=>{i(h=>!h)},X=async h=>{await o.updateAutoBackup({input:{did:n.meta.did,autoBackup:h}})},M=async()=>{await o.abortBlockletBackup({input:{appPid:n.meta.did}})},F=async(h,D)=>{p(R=>{const W=[...R];return W.push({...h,loading:!0}),W}),await Promise.all([o.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:h}}),d!==D&&o.configBlocklet({input:{did:[n.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:D}]}})]),u(h),w()},E=async h=>{h&&(h.endpoint===d&&(await o.configBlocklet({input:{did:[n.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),c!=null&&c.enabled&&await X({enabled:!1})),await o.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:h==null?void 0:h.did}}),p(D=>{const R=[...D];return R.splice(R.indexOf(h),1),R}),u(h),w())},P=async h=>{await Promise.all([o.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:h.did},spaceGateway:h}}),d!==h.endpoint&&o.configBlocklet({input:{did:[n.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:h.endpoint}]}})]),B.success(s("storage.spaces.connectedWithName",{name:(h==null?void 0:h.name)??"DID Spaces"})),w()},se=h=>(h==null?void 0:h.endpoint)===d;return e.jsx(Nt,{value:{spaceGateways:a||[],selectedSpaceGateway:y,addSpaceGateway:F,deleteSpaceGateway:E,updateSpaceGateway:P,refreshSpaceGateways:w,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:m,spaceGatewayIsSelected:se,updateAutoBackup:X,abortBlockletBackup:M,backupEndpoint:d,backupProgress:x,backups:I,backupsLoading:g,autoBackup:c},children:t})}he.propTypes={children:f.any.isRequired};he.defaultProps={};function L(){return A.useContext(Oe)}function V({...t}){const{blocklet:s}=U(),{info:o}=J(),{t:n}=k(),r=ke({blocklet:s}),i=$e(o),{spaceGateways:a,addSpaceGateway:l}=L(),p={checkFn:Ee.create({baseURL:le(window.location.origin,et())}).get,webWalletUrl:i,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:o.did}},m=async({endpoint:d,name:g,did:S})=>{const I=await St(d);if(!await jt(I)){B.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(a.some(c=>c.endpoint===d)){B.error(n("storage.spaces.gateway.add.duplicate",{name:g}));return}const u={name:g,did:S,url:I,endpoint:d};await l(u,d),B.success(n("storage.spaces.connectedWithName",{name:(u==null?void 0:u.name)??"DID Spaces"}))},x=async({spaceGateway:d})=>{try{await m(d)}catch(g){console.error(g),B.error(te(g))}};return e.jsx(dt,{...t,options:p,onSuccess:x})}V.propTypes={};V.defaultProps={};function be({...t}){const{t:s}=A.useContext(st),{blocklet:o,loadingDiskInfo:n,actions:r}=U();if(A.useEffect(()=>{r==null||r.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),o.diskInfo){const i=(p,m,x)=>e.jsxs(v,{children:[p," ",e.jsx("strong",{children:m?tt(m):"empty"})]}),a=o.environments.reduce((p,m)=>(p[m.key]=m.value,p),{}),l=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:i(a.BLOCKLET_APP_DIR,o.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:i(a.BLOCKLET_DATA_DIR,o.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:i(a.BLOCKLET_LOG_DIR,o.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:i(a.BLOCKLET_CACHE_DIR,o.diskInfo.cache)}];return e.jsx(Jt,{component:"div",...t,children:l.map(p=>e.jsx(It,{valueComponent:"div",nameWidth:120,name:p.name,children:p.value},p.key))})}return n?e.jsx(b,{}):e.jsx(v,{children:s("blocklet.diskInfo.empty")})}const Jt=Ze(v)``;function me({...t}){const{t:s,locale:o}=k(),{spaceGateways:n,backups:r}=L(),i=[{label:"DID Space",name:"target",options:{customBodyRenderLite:a=>{var I;const{targetUrl:l,targetName:p,status:m,createdAt:x}=r[a],d=m===T.BACKUPS.STATUS.PROGRESS&&_().diff(x,"hours")>=T.BACKUPS.TIMEOUT_HOURS,g=m===T.BACKUPS.STATUS.SUCCEEDED&&!d,S=p||((I=n.find(y=>l==null?void 0:l.includes(de(y==null?void 0:y.endpoint))))==null?void 0:I.name)||"Unknown DID Space";return g?e.jsx(He,{fontSize:"16px",href:l,target:"_blank",children:S}):e.jsx(v,{variant:"body1",fontSize:"16px",children:S})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:a=>{const l=s(a===0?"common.auto":"common.manual");return e.jsx(oe,{children:l})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:a=>_(a).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:a=>ee(a)?"":_(a).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:a=>{const{status:l,message:p,createdAt:m}=(r==null?void 0:r[a])??{},x=l===T.BACKUPS.STATUS.PROGRESS&&_().diff(m,"hours")>=T.BACKUPS.TIMEOUT_HOURS,d=x&&s("common.timeoutError"),g=l===T.BACKUPS.STATUS.PROGRESS&&!x,S=l===T.BACKUPS.STATUS.SUCCEEDED&&!x;return g?e.jsxs(v,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(b,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):S?e.jsx(oe,{type:"success",children:s("common.succeeded")}):e.jsxs(C,{display:"inline-flex",alignItems:"center",children:[e.jsx(oe,{type:"error",children:s("common.failed")})," ",e.jsx(Ve,{style:{display:"flex",alignItems:"center",flexShrink:0},title:p||d,children:e.jsx(Ke,{children:e.jsx(pt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return e.jsx(C,{...t,children:r!=null&&r.length?e.jsx(nt,{title:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:r,columns:i,emptyNode:s("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1}}):e.jsxs(e.Fragment,{children:[e.jsx(C,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),e.jsx(C,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})})}me.propTypes={};var Ue=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAj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cwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Ue.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Le(){const{t}=k();return e.jsxs(C,{children:[e.jsxs(C,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Ue,{style:{width:250,height:250}}),e.jsx(v,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(V,{})]}),e.jsx(me,{sx:{marginTop:"24px"}}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2,children:t("common.dataStorage")}),e.jsx(be,{})]})}Le.propTypes={};var fe={},Qt=K;Object.defineProperty(fe,"__esModule",{value:!0});var we=fe.default=void 0,zt=Qt(G()),Zt=e;we=fe.default=(0,zt.default)((0,Zt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var ge={},Ht=K;Object.defineProperty(ge,"__esModule",{value:!0});var Me=ge.default=void 0,Vt=Ht(G()),Kt=e;Me=ge.default=(0,Vt.default)((0,Kt.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var xe={},Gt=K;Object.defineProperty(xe,"__esModule",{value:!0});var Fe=xe.default=void 0,Xt=Gt(G()),Yt=e;Fe=xe.default=(0,Xt.default)((0,Yt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function Se({spaceGateway:t,onConfirm:s,onCancel:o}){const{t:n}=k(),[r,i]=A.useState(!1),[a,l]=A.useState(!1),p=(d,g)=>{d==null||d.preventDefault(),d==null||d.stopPropagation(),i(g)},m=async d=>{try{d==null||d.stopPropagation(),l(!0),await(s==null?void 0:s(t)),i(!1)}catch(g){console.error(g),B.error(`${n("storage.space.gateway.delete.failed")}: ${te(g)}`)}finally{i(!1),l(!1)}},x=d=>{p(d,!1),o==null||o(d)};return e.jsxs(e.Fragment,{children:[e.jsxs(Q,{color:"red",onClick:d=>p(d,!0),children:[e.jsx(z,{style:{minWidth:24,color:"red"},children:e.jsx(Dt,{fontSize:"small"})}),e.jsx(Z,{style:{color:"red"},children:n("common.delete")})]}),e.jsx(ot,{title:n("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:n("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:a}},cancelButton:{text:n("common.cancel"),props:{size:"small",variant:"outlined",disabled:a}},onConfirm:m,onCancel:x,children:e.jsx(v,{sx:{wordWrap:"break-word"},children:n("storage.spaces.gateway.delete.descForBackup",{name:`${t==null?void 0:t.name}`})})})]})}Se.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired,onConfirm:f.func,onCancel:f.func};Se.defaultProps={onConfirm:()=>{},onCancel:()=>{}};function je({spaceGateway:t,selected:s,onDelete:o,onConnect:n,enableSwitchToSpace:r,backupInProgress:i,...a}){const{abortBlockletBackup:l}=L(),[p,m]=A.useState(null),{t:x}=k(),[d,g]=A.useState(!1),S=(u,c)=>{u.stopPropagation(),u.preventDefault(),m(c&&u.currentTarget)},I=async u=>{try{g(!0),S(u,!1),await n(t)}catch(c){console.error(c),B.error(c.message)}finally{g(!1)}},y=async u=>{try{g(!0),S(u,!1),await l()}catch(c){console.error(c),B.error(c.message)}finally{g(!1)}};return e.jsxs(e.Fragment,{children:[d||t!=null&&t.loading?e.jsx(b,{sx:{ml:1},size:"24px"}):e.jsx(Ge,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:u=>S(u,!0),...a,children:e.jsx(Et,{})}),e.jsxs(Xe,{id:"simple-menu",anchorEl:p,keepMounted:!0,open:!!p,onClose:u=>S(u,!1),children:[e.jsxs(Q,{onClick:u=>{S(u,!1),window.open(ve(t.endpoint?At(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(we,{fontSize:"small"})}),e.jsx(Z,{children:x("common.open")})]}),e.jsxs(Q,{onClick:u=>{S(u,!1),window.open(ve(Bt(t.endpoint),{allowDomains:null}))},children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(Fe,{fontSize:"small"})}),e.jsx(Z,{children:x("storage.spaces.strategy.viewBackupFiles")})]}),!s&&r&&e.jsxs(Q,{onClick:I,children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(Me,{fontSize:"small"})}),e.jsx(Z,{children:x("storage.spaces.connect.switchToSpace")})]}),i&&e.jsxs(Q,{onClick:y,children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(kt,{fontSize:"small"})}),e.jsx(Z,{children:x("storage.spaces.connect.abortBlockletBackup")})]}),!i&&e.jsx(Se,{spaceGateway:t,onConfirm:async()=>{m(null),await(o==null?void 0:o(t))},onCancel:()=>m(null)})]})]})}je.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,selected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};je.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};function Ae({spaceGateway:t,spaceStatus:s,selected:o,onConnected:n,onDeleted:r,onBackedUp:i}){const{t:a,locale:l}=k(),{blocklet:p}=U(),{api:m,info:{did:x}}=J(),{appDid:d,appName:g,appDescription:S,scopes:I,appUrl:y,referrer:u}=ke({blocklet:p}),{backupProgress:c,updateSpaceGateway:w,deleteSpaceGateway:X}=L(),[M,F]=A.useState(!1),[E,P]=A.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:a("storage.spaces.authorize.title",{appName:g},l),scan:a("storage.spaces.authorize.scan",{appName:g},l),confirm:"",success:e.jsx(v,{gutterBottom:!0,children:a("storage.spaces.authorize.success")})},onClose:()=>{P(j=>({...j,open:!1}))}}),se=o&&!M&&s===ie.DISCONNECTED,Y=o&&!M&&!t.loading&&s===ie.CONNECTED,h=o&&M&&s===ie.CONNECTED&&(c==null?void 0:c.progress)>=0,D=async()=>{try{if(await yt(t==null?void 0:t.endpoint)){await m.configBlocklet({input:{did:[p.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(a("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),n==null||n(null,t);return}}catch(j){console.error(j),n==null||n(j,t);return}P(j=>({...j,open:!0,prefix:le(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:Ee.create({baseURL:le(t.url,"space")}).get,extraParams:{appDid:d,appName:g,appDescription:S,scopes:I,appUrl:y,referrer:u,nodeDid:x,spaceDid:t.did}}))},R=async(j,Be)=>{const ne=Be(j.endpoint),Qe=de(ne),N=j.space?Be(j.space):{};if(t.did&&Qe!==t.did){P(ze=>({...ze,open:!1}));const q=a("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""});B.error(q),n==null||n(new Error(q),t);return}const ye={...t,name:N.name??"DID Space",did:N.did??de(ne),endpoint:ne};await w(ye),P(q=>({...q,open:!1})),n==null||n(null,ye)},W=async()=>{try{if(M)return;F(!0),await m.backupBlocklet({input:{appDid:p.appDid,to:"spaces"}})}catch(j){console.error(j),B.error(j.message),i==null||i(j,t)}finally{F(!0)}},Je=async()=>{try{await X(t),B.success(a("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r==null||r(null,t)}catch(j){console.error(j),r==null||r(j,t)}};return A.useEffect(()=>{c!=null&&c.completed?(o&&((c==null?void 0:c.progress)===100?(B.success(a("storage.spaces.backupSuccessfully")),i==null||i(null,t)):c.message&&(i==null||i(new Error(c==null?void 0:c.message),t)),c.progress=0,c.message=""),F(!1)):c.progress&&F(!0)},[c]),e.jsxs(e.Fragment,{children:[e.jsxs(C,{sx:{".action-btn":{borderRadius:1,marginLeft:1}},display:"flex",alignItems:"center",children:[Y&&e.jsx(ae,{className:"action-btn",variant:"outlined",size:"small",onClick:W,children:a("storage.spaces.strategy.backupNow")}),se&&e.jsx(ae,{className:"action-btn",variant:"outlined",size:"small",onClick:D,children:a("storage.spaces.disconnected.reconnectNow")}),h&&e.jsxs(ae,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(b,{variant:"determinate",value:c==null?void 0:c.progress,size:14,sx:{mr:1}}),c==null?void 0:c.progress,"%"]}),e.jsx(at,{forceConnected:!1,saveConnect:!1,prefix:E.prefix,open:E.open,popup:!0,action:E.action,baseUrl:E.baseUrl,checkFn:E.checkFn,onSuccess:R,onClose:E.onClose,checkTimeout:E.checkTimeout,extraParams:E.extraParams,messages:E.messages,locale:l},"get-endpoint")]}),e.jsx(je,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:o,onDelete:Je,onConnect:D,enableSwitchToSpace:(c==null?void 0:c.completed)||ee(c==null?void 0:c.message),backupInProgress:h})]})}Ae.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,spaceStatus:f.string.isRequired,selected:f.bool.isRequired,onConnected:f.func,onDeleted:f.func,onBackedUp:f.func};Ae.defaultProps={onConnected:()=>{},onDeleted:()=>{},onBackedUp:()=>{}};function Pe({...t}){const{t:s}=k(),{autoBackup:o,updateAutoBackup:n}=L(),r=async()=>{try{const i=!(o!=null&&o.enabled);await n({enabled:i}),B.success(s(i?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(i){B.error(i.message)}};return e.jsx(Rt,{checked:!!(o!=null&&o.enabled),onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(v,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Pe.propTypes={};function Wt(){const{t}=k(),s=Ie(),{spaceGateways:o,spaceGatewaysLoading:n,spaceGatewayIsSelected:r}=L(),i=n&&!(o!=null&&o.length),a=({spaceGateway:l,spaceStatus:p,selected:m,refresh:x})=>e.jsx(Ae,{spaceGateway:l,spaceStatus:p,selected:m,onConnected:()=>x(),onBackedUp:d=>d&&x()});return e.jsxs(C,{display:"flex",flexDirection:"column",children:[e.jsxs($,{spacing:s?1:4,direction:s?"column":"row",alignItems:s?"space-between":"center",justifyContent:s?"center":"space-between",marginBottom:"12px",children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(Pe,{}),s?e.jsx(V,{sx:{width:"100%","& button:first-of-type":{width:"100%"}}}):e.jsx(V,{})]}),e.jsx(C,{children:i?e.jsx(C,{display:"flex",justifyContent:"center",children:e.jsx(b,{})}):e.jsx(H,{container:!0,spacing:1,children:e.jsx(e.Fragment,{children:o.map(l=>e.jsx(H,{item:!0,xs:12,md:6,children:e.jsx(ut,{sx:{marginTop:"12px"},endpoint:l.endpoint,selected:r(l),action:a},l.endpoint)}))})})}),e.jsx(me,{sx:{marginTop:"24px"}}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(be,{})]})}function qt(){const{spaceGatewaysFirstLoading:t,spaceGateways:s}=L();return t?e.jsx(Ce,{relative:"parent",children:e.jsx(b,{})}):ee(s)?e.jsx(Le,{}):e.jsx(Wt,{})}function _t(){return e.jsx(he,{children:e.jsx(qt,{})})}function $t(){const{spaceGateway:t,settingStorageEndpoint:s,updateSpaceGateway:o,hasStorageEndpoint:n,loading:r,storageEndpoint:i}=Ct(),a=ce(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ce,{relative:"parent",children:e.jsx(b,{})}):e.jsxs(C,{sx:{maxWidth:"md",position:"relative"},children:[n?e.jsx(ht,{spaceGateway:t,settingStorageEndpoint:s}):e.jsx(mt,{}),e.jsx(C,{sx:a,children:e.jsx(ft,{onConnect:o,storageEndpoint:i})})]})}function es(){const{t}=k();return e.jsxs(vt,{children:[e.jsxs($,{spacing:1,marginBottom:2,children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.appLevel.title")}),e.jsx(v,{color:"text.secondary",children:t("storage.appLevel.description")})]}),e.jsx($t,{})]})}function Ne({navOrientation:t,...s}){const{t:o,locale:n}=k(),{blocklet:r}=U(),i=Ie({key:"md"}),[a,l]=_e(),p=a.get("tab")||"backup",m=i?"horizontal":t,x=ce(()=>{var c;const y=[{label:e.jsxs($,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(De,{}),e.jsx("span",{children:o("common.backup")})]}),value:"backup"}],u=(c=r==null?void 0:r.capabilities)==null?void 0:c.didSpace;return(u===O.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||u===O.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&y.push({label:e.jsxs($,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(Re,{}),e.jsx("span",{children:o("common.storage")})]}),value:"storage"}),y},[n,m]),g=ce(()=>({backup:e.jsx(_t,{}),storage:e.jsx(es,{})}))[p],S=y=>{l(u=>(y==="backup"?u.delete("tab"):u.set("tab",y),u))};if(x.length<=1)return e.jsx(re,{children:g});const I=e.jsx(it,{tabs:x,current:p,orientation:m,onChange:S,sx:[{borderRight:1,height:"100%",borderColor:"divider"},m==="horizontal"&&{borderRight:0}]});if(m==="vertical")return e.jsx(C,{...s,children:e.jsxs(H,{container:!0,columnSpacing:4,columns:24,sx:{mt:-1},children:[e.jsx(H,{item:!0,md:5,lg:4,children:I}),e.jsx(H,{item:!0,md:19,lg:20,children:e.jsx(re,{sx:{mt:1},children:g})})]})});if(m==="horizontal")return e.jsxs(C,{...s,children:[I,e.jsx(re,{sx:{mt:2},children:g})]})}Ne.propTypes={navOrientation:f.oneOf(["vertical","horizontal"])};Ne.defaultProps={navOrientation:"vertical"};const re=Ye(C)`
|
|
1
|
+
import{a1 as K,j as e,E as f,a9 as Ze,T as v,a2 as b,bm as He,a3 as C,a4 as Ve,cF as Ke,aj as Q,b0 as z,b1 as Z,x as Ge,b2 as Xe,ad as $,bd as H,s as Ye}from"./vendor-mui-core-BGkzVIkr.js";import{l as We,i as qe,f as ce}from"./vendor-hooks-B7GuuzU5.js";import{r as A,f as _e}from"./vendor-react-DoD83n6N.js";import{C as U,z as J,h as O,a0 as $e,ac as et,ax as tt,G as _}from"./index-CXwy6oRm.js";import{r as G,Q as B,u as k,aU as st,p as T,aY as oe,a0 as nt,be as ot,B as ae,ak as at,C as Ce,ao as it}from"./vendor-ux-did-connect-BzpeuxHd.js";import{u as Ie}from"./use-mobile-DAiUO9Qj.js";import{y as ee,d as rt,aC as ct,F as lt,C as Ee,x as le}from"./vendor-utils-DDG_VdF0.js";import{k as dt,s as pt,J as ie,h as ut}from"./vendor-arcblock-DAGgKol-.js";import"./api-Dia2_ulr.js";import{u as ke,C as ht,D as mt,a as ft}from"./connect-to-W1IhVAJI.js";import{g as gt,a as xt,b as St,i as jt,c as de,d as At,e as Bt,h as yt,C as vt,u as Ct}from"./config-space-rNFeeNC_.js";import{f as te}from"./format-error-LAoTjvJe.js";import{I as It}from"./index-WMPymUEC.js";import{d as Et}from"./MoreHoriz-CP4-d2O8.js";import{c as kt}from"./dashboard-2_ANBDid.js";import{d as Dt}from"./DeleteOutline-L2iWFlT2.js";import{g as ve}from"./get-safe-url-CH0HGyks.js";import{S as Rt}from"./switch-control-CQ0cKV4J.js";import"./lottie-web-B6s7dDoL.js";import"./useLocalStorage-BLFh8HxW.js";import"./confirm-D0n5z1n8.js";import"./PlayArrow-CetrL8A8.js";import"./index-CW52563O.js";import"./session-D4d96gMA.js";import"./useAsyncRetry-Cbcg1dvJ.js";import"./useAsync-DOwDXG5n.js";import"./InfoOutlined-Ov0NeUHF.js";import"./useSetState-BL3ktMon.js";var pe={},Tt=K;Object.defineProperty(pe,"__esModule",{value:!0});var De=pe.default=void 0,Ot=Tt(G()),bt=e;De=pe.default=(0,Ot.default)((0,bt.jsx)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2m-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9"}),"SettingsBackupRestoreOutlined");var ue={},Ut=K;Object.defineProperty(ue,"__esModule",{value:!0});var Re=ue.default=void 0,Lt=Ut(G()),wt=e;Re=ue.default=(0,Lt.default)((0,wt.jsx)("path",{d:"M2 20h20v-4H2zm2-3h2v2H4zM2 4v4h20V4zm4 3H4V5h2zm-4 7h20v-4H2zm2-3h2v2H4z"}),"StorageOutlined");async function Mt({blockletDid:t,nodeApi:s,spaceGateways:o}){let n=!1;const r=await Promise.all(o.map(async i=>{let{name:a}=i;const l=await gt(i.endpoint);return!ee(l)&&l!==a&&(a=l,n=!0),{...i,name:a}}));return n&&await Promise.all(r.filter(i=>i.did).map(i=>s.updateBlockletSpaceGateway({input:{did:t,where:{did:i.did},spaceGateway:{...i}}}))),r}function Ft({refresh:t}={}){var r;const{blocklet:s}=U(),o=(r=s==null?void 0:s.meta)==null?void 0:r.did,{api:n}=J();return We(async()=>{if(!o)return[];const{spaceGateways:i}=await n.getBlockletSpaceGateways({input:{did:o}});return await Mt({blockletDid:o,nodeApi:n,spaceGateways:i})??[]},{refreshDeps:[o,t],onError(i){var a;(a=i==null?void 0:i.message)!=null&&a.includes("not logged")?console.warn(i):(console.error(i),B.error(te(i)))}})}function Te({deps:t,setLoading:s}={deps:[],setLoading:()=>{}}){var l;const{blocklet:o}=U(),[n,r]=A.useState([]),{api:i}=J(),a=rt(async()=>{try{if(s(!0),!o){r([]);return}const{backups:p}=await i.getBlockletBackups({input:{did:o.meta.did}});r(p??[])}catch(p){console.error(p),B.error(te(p))}finally{s(!1)}},2e3);return qe(async()=>{a()},[(l=o==null?void 0:o.meta)==null?void 0:l.did].concat(t)),{backups:n}}function Pt({appDid:t}){const{backups:s}=Te(),[o,n]=A.useState({message:"",progress:0,completed:!1}),r=J(),{ws:{useSubscription:i}}=r;return i(O.BlockletEvents.backupProgress,a=>{t===(a==null?void 0:a.appDid)&&n(()=>({...a}))},[t]),A.useEffect(()=>{var a;if(s!=null&&s.length&&ct((a=s[0])==null?void 0:a.status)){const[l]=s;n(()=>({message:l.message,progress:l.progress,completed:l.progress>=100}))}},[s]),o}const Oe=A.createContext({}),{Provider:Nt,Consumer:Rs}=Oe;function he({children:t}){var Y;const{t:s}=k(),{api:o}=J(),{blocklet:n}=U(),[r,i]=A.useState(!1),{data:a,loading:l,mutate:p}=Ft({refresh:r}),m=lt(a),x=Pt({appDid:n==null?void 0:n.appDid}),d=A.useMemo(()=>xt(n==null?void 0:n.environments),[n==null?void 0:n.environments]),[g,S]=A.useState(!1),{backups:I}=Te({deps:[x],setLoading:S}),[y,u]=A.useState(a==null?void 0:a.find(h=>h.endpoint===d)),c=(Y=n==null?void 0:n.settings)==null?void 0:Y.autoBackup,w=()=>{i(h=>!h)},X=async h=>{await o.updateAutoBackup({input:{did:n.meta.did,autoBackup:h}})},M=async()=>{await o.abortBlockletBackup({input:{appPid:n.meta.did}})},F=async(h,D)=>{p(R=>{const W=[...R];return W.push({...h,loading:!0}),W}),await Promise.all([o.addBlockletSpaceGateway({input:{did:n.meta.did,spaceGateway:h}}),d!==D&&o.configBlocklet({input:{did:[n.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:D}]}})]),u(h),w()},E=async h=>{h&&(h.endpoint===d&&(await o.configBlocklet({input:{did:[n.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:""}]}}),c!=null&&c.enabled&&await X({enabled:!1})),await o.deleteBlockletSpaceGateway({input:{did:n.meta.did,spaceGatewayDid:h==null?void 0:h.did}}),p(D=>{const R=[...D];return R.splice(R.indexOf(h),1),R}),u(h),w())},P=async h=>{await Promise.all([o.updateBlockletSpaceGateway({input:{did:n.meta.did,where:{did:h.did},spaceGateway:h}}),d!==h.endpoint&&o.configBlocklet({input:{did:[n.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:h.endpoint}]}})]),B.success(s("storage.spaces.connectedWithName",{name:(h==null?void 0:h.name)??"DID Spaces"})),w()},se=h=>(h==null?void 0:h.endpoint)===d;return e.jsx(Nt,{value:{spaceGateways:a||[],selectedSpaceGateway:y,addSpaceGateway:F,deleteSpaceGateway:E,updateSpaceGateway:P,refreshSpaceGateways:w,spaceGatewaysLoading:l,spaceGatewaysFirstLoading:m,spaceGatewayIsSelected:se,updateAutoBackup:X,abortBlockletBackup:M,backupEndpoint:d,backupProgress:x,backups:I,backupsLoading:g,autoBackup:c},children:t})}he.propTypes={children:f.any.isRequired};he.defaultProps={};function L(){return A.useContext(Oe)}function V({...t}){const{blocklet:s}=U(),{info:o}=J(),{t:n}=k(),r=ke({blocklet:s}),i=$e(o),{spaceGateways:a,addSpaceGateway:l}=L(),p={checkFn:Ee.create({baseURL:le(window.location.origin,et())}).get,webWalletUrl:i,extraParams:{appPid:s.appPid,appDid:r.appDid,appName:r.appName,appDescription:r.appDescription,appUrl:r.appUrl,referrer:r.referrer,scopes:r.scopes,nodeDid:o.did}},m=async({endpoint:d,name:g,did:S})=>{const I=await St(d);if(!await jt(I)){B.error(n("storage.spaces.gateway.add.invalidUrl"));return}if(a.some(c=>c.endpoint===d)){B.error(n("storage.spaces.gateway.add.duplicate",{name:g}));return}const u={name:g,did:S,url:I,endpoint:d};await l(u,d),B.success(n("storage.spaces.connectedWithName",{name:(u==null?void 0:u.name)??"DID Spaces"}))},x=async({spaceGateway:d})=>{try{await m(d)}catch(g){console.error(g),B.error(te(g))}};return e.jsx(dt,{...t,options:p,onSuccess:x})}V.propTypes={};V.defaultProps={};function be({...t}){const{t:s}=A.useContext(st),{blocklet:o,loadingDiskInfo:n,actions:r}=U();if(A.useEffect(()=>{r==null||r.refreshBlocklet({showError:!1,attachDiskInfo:!0})},[]),o.diskInfo){const i=(p,m,x)=>e.jsxs(v,{children:[p," ",e.jsx("strong",{children:m?tt(m):"empty"})]}),a=o.environments.reduce((p,m)=>(p[m.key]=m.value,p),{}),l=[{key:"appDir",name:s("blocklet.diskInfo.appDir"),value:i(a.BLOCKLET_APP_DIR,o.diskInfo.app)},{key:"dataDir",name:s("blocklet.diskInfo.dataDir"),value:i(a.BLOCKLET_DATA_DIR,o.diskInfo.data)},{key:"logDir",name:s("blocklet.diskInfo.logDir"),value:i(a.BLOCKLET_LOG_DIR,o.diskInfo.log)},{key:"cacheDir",name:s("blocklet.diskInfo.cacheDir"),value:i(a.BLOCKLET_CACHE_DIR,o.diskInfo.cache)}];return e.jsx(Jt,{component:"div",...t,children:l.map(p=>e.jsx(It,{valueComponent:"div",nameWidth:120,name:p.name,children:p.value},p.key))})}return n?e.jsx(b,{}):e.jsx(v,{children:s("blocklet.diskInfo.empty")})}const Jt=Ze(v)``;function me({...t}){const{t:s,locale:o}=k(),{spaceGateways:n,backups:r}=L(),i=[{label:"DID Space",name:"target",options:{customBodyRenderLite:a=>{var I;const{targetUrl:l,targetName:p,status:m,createdAt:x}=r[a],d=m===T.BACKUPS.STATUS.PROGRESS&&_().diff(x,"hours")>=T.BACKUPS.TIMEOUT_HOURS,g=m===T.BACKUPS.STATUS.SUCCEEDED&&!d,S=p||((I=n.find(y=>l==null?void 0:l.includes(de(y==null?void 0:y.endpoint))))==null?void 0:I.name)||"Unknown DID Space";return g?e.jsx(He,{fontSize:"16px",href:l,target:"_blank",children:S}):e.jsx(v,{variant:"body1",fontSize:"16px",children:S})}}},{label:s("common.strategy"),name:"strategy",options:{customBodyRender:a=>{const l=s(a===0?"common.auto":"common.manual");return e.jsx(oe,{children:l})}}},{label:s("common.startTime"),name:"createdAt",options:{customBodyRender:a=>_(a).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.endTime"),name:"updatedAt",options:{customBodyRender:a=>ee(a)?"":_(a).format("YYYY-MM-DD HH:mm:ss")}},{label:s("common.status"),name:"status",options:{customBodyRenderLite:a=>{const{status:l,message:p,createdAt:m}=(r==null?void 0:r[a])??{},x=l===T.BACKUPS.STATUS.PROGRESS&&_().diff(m,"hours")>=T.BACKUPS.TIMEOUT_HOURS,d=x&&s("common.timeoutError"),g=l===T.BACKUPS.STATUS.PROGRESS&&!x,S=l===T.BACKUPS.STATUS.SUCCEEDED&&!x;return g?e.jsxs(v,{display:"inline-flex",alignItems:"center",fontSize:"14px",children:[e.jsx(b,{sx:{marginRight:"4px"},size:"12px"}),s("common.progress")]}):S?e.jsx(oe,{type:"success",children:s("common.succeeded")}):e.jsxs(C,{display:"inline-flex",alignItems:"center",children:[e.jsx(oe,{type:"error",children:s("common.failed")})," ",e.jsx(Ve,{style:{display:"flex",alignItems:"center",flexShrink:0},title:p||d,children:e.jsx(Ke,{children:e.jsx(pt,{style:{width:"24px",height:"24px"},color:"error"})})})]})}}}];return e.jsx(C,{...t,children:r!=null&&r.length?e.jsx(nt,{title:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")}),data:r,columns:i,emptyNode:s("storage.spaces.record.emptyData",o),options:{download:!1,filter:!1,print:!1}}):e.jsxs(e.Fragment,{children:[e.jsx(C,{display:"flex",height:"56px",lineHeight:"56px",alignItems:"center",children:e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:s("storage.spaces.backup.records")})}),e.jsx(C,{color:"#9397A1",marginTop:"16px",marginBottom:"24px",children:s("storage.spaces.record.emptyData")})]})})}me.propTypes={};var Ue=function(s){return e.jsxs("svg",{...s,children:[e.jsxs("g",{filter:"url(#a)",children:[e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#DDD"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m49.192 6.222-40.97 40.97A11 11 0 0 0 5 54.971V240c0 6.075 4.925 11 11 11h196c6.075 0 11-4.925 11-11V14c0-6.075-4.925-11-11-11H56.97a11 11 0 0 0-7.778 3.222Zm-.707-.707A12 12 0 0 1 56.971 2H212c6.627 0 12 5.373 12 12v226c0 6.627-5.373 12-12 12H16c-6.627 0-12-5.373-12-12V54.97a12 12 0 0 1 3.515-8.485l40.97-40.97Z",fill:"#000",fillOpacity:".08"}),e.jsx("mask",{id:"b",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"4",y:"2",width:"220",height:"250",children:e.jsx("path",{d:"M56.97 2a12 12 0 0 0-8.485 3.515l-40.97 40.97A12 12 0 0 0 4 54.971V240c0 6.627 5.373 12 12 12h196c6.627 0 12-5.373 12-12V14c0-6.627-5.373-12-12-12H56.97Z",fill:"#D9D9D9"})}),e.jsxs("g",{mask:"url(#b)",children:[e.jsx("path",{opacity:".5",fill:"url(#c)",d:"M4 2h220v128H4z"}),e.jsx("path",{opacity:".1",fill:"url(#d)",d:"M4 130h220v122H4z"}),e.jsx("path",{d:"M33.045 169h-3.767v-11.636h3.887c1.14 0 2.12.233 2.937.698a4.61 4.61 0 0 1 1.881 1.995c.44.863.659 1.899.659 3.108 0 1.212-.222 2.254-.665 3.125a4.668 4.668 0 0 1-1.909 2.011c-.833.466-1.84.699-3.023.699Zm-2.01-1.534h1.914c.886 0 1.623-.167 2.21-.5a3.152 3.152 0 0 0 1.318-1.46c.292-.64.438-1.421.438-2.341 0-.913-.146-1.688-.438-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm11.546-10.102V169h-1.756v-11.636h1.756ZM48.905 169h-3.767v-11.636h3.886c1.14 0 2.12.233 2.938.698a4.609 4.609 0 0 1 1.88 1.995c.44.863.66 1.899.66 3.108 0 1.212-.222 2.254-.665 3.125a4.667 4.667 0 0 1-1.91 2.011c-.833.466-1.84.699-3.022.699Zm-2.011-1.534h1.914c.887 0 1.623-.167 2.21-.5a3.151 3.151 0 0 0 1.319-1.46c.291-.64.437-1.421.437-2.341 0-.913-.146-1.688-.437-2.324a3.095 3.095 0 0 0-1.29-1.449c-.572-.33-1.282-.494-2.13-.494h-2.023v8.568Zm20.372-7.046a1.662 1.662 0 0 0-.75-1.25c-.44-.299-.993-.448-1.66-.448-.477 0-.89.075-1.238.227a1.91 1.91 0 0 0-.813.613c-.189.258-.284.552-.284.881 0 .277.065.515.194.716.132.201.304.369.516.506.216.132.447.244.694.335.246.087.483.159.71.216l1.136.295c.371.091.752.214 1.142.37.39.155.752.36 1.086.613.333.254.602.568.806.944.209.374.313.823.313 1.346 0 .659-.17 1.244-.511 1.756-.338.511-.828.915-1.472 1.21-.64.295-1.415.443-2.324.443-.871 0-1.625-.138-2.261-.415-.637-.276-1.135-.668-1.495-1.176-.36-.511-.558-1.117-.596-1.818h1.761c.034.421.17.771.41 1.051.242.277.55.483.925.62.38.132.794.198 1.245.198.496 0 .937-.077 1.324-.233.39-.159.697-.378.92-.659a1.56 1.56 0 0 0 .335-.994c0-.345-.098-.627-.295-.847a2.191 2.191 0 0 0-.79-.545 7.725 7.725 0 0 0-1.12-.381l-1.374-.375c-.932-.253-1.67-.627-2.216-1.119-.542-.492-.813-1.144-.813-1.955 0-.67.182-1.255.546-1.755.363-.5.856-.888 1.477-1.165.621-.28 1.322-.42 2.102-.42.788 0 1.483.138 2.085.414.607.277 1.084.658 1.432 1.142.349.481.53 1.034.546 1.659h-1.693Zm3.813 11.853v-12h1.66v1.415h.142c.098-.182.24-.393.426-.631.185-.239.443-.447.772-.625.33-.182.766-.273 1.307-.273.705 0 1.334.178 1.887.534.553.356.987.869 1.3 1.54.319.67.478 1.477.478 2.42 0 .944-.157 1.752-.472 2.427-.314.67-.746 1.187-1.295 1.551-.55.36-1.176.539-1.88.539-.53 0-.965-.089-1.302-.267a2.457 2.457 0 0 1-.784-.625 4.667 4.667 0 0 1-.437-.636h-.103v4.631H71.08Zm1.665-7.637c0 .614.09 1.152.267 1.614.178.462.436.824.773 1.085.337.258.75.387 1.239.387.507 0 .931-.135 1.273-.404.34-.273.598-.642.772-1.108.178-.466.267-.99.267-1.574 0-.575-.087-1.092-.261-1.551-.17-.458-.428-.82-.773-1.085-.34-.265-.767-.398-1.278-.398-.493 0-.91.127-1.25.381-.337.254-.593.608-.767 1.062-.175.455-.262.985-.262 1.591Zm10.75 4.557a3.557 3.557 0 0 1-1.5-.307 2.523 2.523 0 0 1-1.062-.903c-.258-.394-.386-.877-.386-1.449 0-.492.094-.898.283-1.216.19-.318.446-.57.768-.756a4.036 4.036 0 0 1 1.08-.42c.397-.095.802-.167 1.215-.216l1.273-.148c.325-.041.562-.108.71-.198.148-.091.222-.239.222-.444v-.039c0-.497-.14-.881-.42-1.154-.277-.273-.69-.409-1.24-.409-.572 0-1.022.127-1.352.381-.325.25-.55.528-.676.835l-1.597-.364c.19-.53.466-.958.83-1.284.368-.329.79-.568 1.267-.716.477-.151.98-.227 1.506-.227.348 0 .718.042 1.108.125.394.08.761.227 1.102.443.345.216.627.525.847.926.22.398.33.915.33 1.552V169h-1.66v-1.193h-.068c-.11.22-.275.435-.495.648-.22.212-.501.388-.846.528s-.758.21-1.239.21Zm.37-1.363c.47 0 .87-.093 1.204-.279.337-.185.593-.428.767-.727.178-.303.267-.627.267-.972v-1.125c-.06.061-.178.118-.352.171-.17.049-.365.093-.585.13-.22.034-.434.067-.642.097l-.523.068c-.33.042-.63.112-.903.21a1.553 1.553 0 0 0-.648.427c-.16.181-.239.424-.239.727 0 .42.156.738.466.954.31.212.707.319 1.188.319Zm9.876 1.346c-.845 0-1.572-.191-2.182-.574a3.796 3.796 0 0 1-1.398-1.596c-.325-.678-.488-1.455-.488-2.33 0-.886.166-1.668.5-2.346a3.832 3.832 0 0 1 1.409-1.597c.606-.383 1.32-.574 2.142-.574.663 0 1.254.123 1.773.369.519.243.937.584 1.255 1.023.322.44.514.953.574 1.54h-1.653c-.091-.409-.3-.761-.625-1.057-.322-.295-.754-.443-1.296-.443a2.11 2.11 0 0 0-1.244.375c-.352.246-.627.598-.824 1.057-.197.454-.295.992-.295 1.613 0 .637.096 1.186.29 1.648.193.462.466.82.818 1.074.356.254.774.381 1.255.381.322 0 .614-.059.875-.177.266-.121.487-.293.665-.517.182-.223.309-.492.38-.806h1.654a3.211 3.211 0 0 1-.55 1.511 3.165 3.165 0 0 1-1.234 1.045c-.511.254-1.111.381-1.8.381Zm9.163 0c-.859 0-1.6-.184-2.221-.551a3.732 3.732 0 0 1-1.432-1.563c-.333-.674-.5-1.464-.5-2.369 0-.894.167-1.682.5-2.363a3.887 3.887 0 0 1 1.409-1.597c.606-.383 1.314-.574 2.125-.574.493 0 .97.082 1.432.244.462.163.877.419 1.244.767.368.349.657.802.87 1.358.212.553.318 1.226.318 2.017v.603H99.71v-1.273h5.273c0-.447-.091-.843-.273-1.187a2.052 2.052 0 0 0-.767-.824c-.326-.201-.708-.302-1.148-.302a2.22 2.22 0 0 0-1.25.353 2.364 2.364 0 0 0-.818.909 2.626 2.626 0 0 0-.284 1.21v.994c0 .584.102 1.08.307 1.489.208.409.498.722.869.938.372.212.805.318 1.301.318a2.7 2.7 0 0 0 .881-.137c.265-.094.494-.234.688-.42.193-.186.341-.415.443-.688l1.608.29c-.129.474-.36.888-.693 1.244-.33.353-.745.627-1.245.824-.496.194-1.062.29-1.699.29Z",fill:"#fff"}),e.jsx("path",{d:"M117.604 47.263 121.523 45h14.267v41.862h-14.267l-15.335-8.854V53.854l1.818-1.05 3.2 1.848-1.818 1.05V76.16l12.993 7.502h10.209V48.2h-10.209l-1.577.91-3.2-1.847Z",fill:"url(#e)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M119.402 76.16V55.701L106.409 48.2H96.2v35.462h10.209l1.582-.913 3.2 1.847-3.924 2.266H93V45h14.267l15.335 8.854v24.154l-1.813 1.046-3.2-1.847 1.813-1.047Z",fill:"url(#f)"}),e.jsxs("g",{clipPath:"url(#g)",fillRule:"evenodd",clipRule:"evenodd",fill:"#fff",children:[e.jsx("path",{d:"m50.928 216.089 1.034 2.852h-2.503l1.028-2.842a4.95 4.95 0 0 0 .107-.338 7.17 7.17 0 0 0 .111-.409c.075.297.15.542.223.737Zm2.28 5.591h.796l-2.775-7.352h-1.043l-2.774 7.352h.795a.338.338 0 0 0 .223-.077.425.425 0 0 0 .127-.179l.615-1.705h3.07l.617 1.705a.399.399 0 0 0 .126.184.339.339 0 0 0 .223.072Zm4.823-.963a2.023 2.023 0 0 1-.67.098h-1.455v-2.453h1.456c.5 0 .871.106 1.11.318.24.208.36.495.36.86 0 .184-.028.355-.083.512a1.005 1.005 0 0 1-.262.399 1.2 1.2 0 0 1-.456.266Zm-2.125-3.128v-2.406h1.237c.498 0 .865.095 1.101.286.236.192.355.497.355.917 0 .369-.125.662-.374.881-.246.215-.623.322-1.13.322h-1.189Zm2.358-3.128a4.106 4.106 0 0 0-1.12-.133h-2.27v7.352h2.507c.391 0 .74-.051 1.048-.154.307-.102.566-.247.776-.435.21-.188.37-.409.48-.665.11-.26.165-.547.165-.861 0-.904-.506-1.462-1.518-1.674.22-.075.41-.169.572-.281a1.79 1.79 0 0 0 .403-.379c.106-.144.186-.297.237-.461.052-.164.078-.335.078-.512a2.1 2.1 0 0 0-.146-.804 1.49 1.49 0 0 0-.441-.609 2.073 2.073 0 0 0-.771-.384Zm7.535.778h-2.212v6.441h-1.028v-6.441h-2.222v-.911H65.8v.911Zm2.439.564h-1.13v1.193h1.13v-1.193Zm-1.13 2.983h1.13v1.193h-1.13v-1.193Z",fillOpacity:".8"}),e.jsx("path",{d:"M28.247 221.771V214h3.894c.99.072 1.765.944 1.765 1.998v3.77c0 1.106-.85 2.003-1.897 2.003h-3.762ZM36.355 214h-1.011v7.783h1.01V214Zm-7.097 6.704v-5.642h2.751c.49 0 .886.419.886.936v3.77c0 .517-.396.936-.886.936h-2.75ZM37.775 214v7.771h3.762c1.047 0 1.897-.897 1.897-2.003v-3.77c0-1.054-.774-1.926-1.765-1.998h-3.894Zm6.946 1.803h1.13v1.193h-1.13v-1.193Zm1.13 2.983h-1.13v1.193h1.13v-1.193Zm-7.065-3.724v5.642h2.75c.49 0 .887-.419.887-.936v-3.77c0-.517-.397-.936-.886-.936h-2.751Z"})]}),e.jsx("circle",{cx:"191.32",cy:"218",r:"10",fill:"url(#h)"}),e.jsx("path",{d:"m192.064 213.333.976-.564h3.554v10.427h-3.286a1 1 0 0 1-.5-.134l-3.588-2.071v-6.016l.453-.262.797.46-.453.262v5.096l3.237 1.868h2.543v-8.833h-2.543l-.393.227-.797-.46Z",fill:"#fff"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M192.512 220.531v-5.096l-3.237-1.869h-2.543v8.833h2.543l.394-.227.797.46-.977.564h-3.554v-10.427h3.554l3.82 2.206v6.016l-.452.261-.797-.461.452-.26Z",fill:"#fff"})]})]}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"d",x1:"114",y1:"130",x2:"114",y2:"252",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#101010"}),e.jsx("stop",{offset:"1",stopColor:"#272727"})]}),e.jsxs("linearGradient",{id:"e",x1:"120.989",y1:"45",x2:"120.989",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff",stopOpacity:".4"}),e.jsx("stop",{offset:"1",stopColor:"#fff"})]}),e.jsxs("linearGradient",{id:"f",x1:"107.801",y1:"45",x2:"107.801",y2:"86.862",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#fff"}),e.jsx("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})]}),e.jsxs("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(17 -8.76924 6.97565 13.52294 183.166 221)",children:[e.jsx("stop",{stopColor:"#016BED"}),e.jsx("stop",{offset:".699",stopColor:"#4498FB"}),e.jsx("stop",{offset:"1",stopColor:"#9DFFE8"})]}),e.jsx("clipPath",{id:"g",children:e.jsx("path",{fill:"#fff",transform:"translate(28 214)",d:"M0 0h40.32v8H0z"})}),e.jsx("pattern",{id:"c",patternContentUnits:"objectBoundingBox",width:"1",height:"1",children:e.jsx("use",{xlinkHref:"#i",transform:"scale(.00455 .00781)"})}),e.jsxs("filter",{id:"a",x:"0",y:"0",width:"228",height:"258",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[e.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),e.jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),e.jsx("feOffset",{dy:"2"}),e.jsx("feGaussianBlur",{stdDeviation:"2"}),e.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),e.jsx("feColorMatrix",{values:"0 0 0 0 0.0631944 0 0 0 0 0.242785 0 0 0 0 0.403472 0 0 0 0.2 0"}),e.jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_1410_22507"}),e.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_1410_22507",result:"shape"})]}),e.jsx("image",{id:"i",width:"220",height:"128",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANwAAACABAMAAACSOBo+AAAAG1BMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACUUeIgAAAACXRSTlMSFhkOHAsfCCOMH5MiAAAjjElEQVRo3hTQO3sjRRBG4a+qWzJhVfdIJqzuGXsJe2bkJe0e2UA4shdIJS2X1LBcUpbL/wae5yQnfVHGjp2+V08yKR7OwBDYte8pi5Aq9DObSBouqN9cidZyusonzWtGJO13phLebEn6xKEnlYyXe5hnySc53Ym9Abn7crTse8r7BMeIB8yBOVZK0trMjxT5S/cgc9G63BQqZoF3xSYZYeRk2hoIvEBFA7XMtaaF8TdY1GjiDDqgEswRDlWnRtmYzl5zRUq3sx3I+JL7sBJKXchDGJY9D+SfHAIoA+TuHCyYYYFjkhNB8tO5hhju0ANjdCITLx4/JDL+yyP0ErZR+m3M322bY8OKHzoOcAXLQMBHiIh+X59pv6udCJ7MAV9HARPtTEuFSdAzNVn7uPmkk3TpBGHb8DJZ3p36ScsuJVFQP6CUBXimN3BABZJUiEwBOMsHUisZiXU8k3bVSTrPcHsKEEg8gV/vP7U26vRWhl2UnfEbX3VlVbRHgSwmcy2tWTjsxmIb4YjgbAkmpyEOINs1gCtSC4YsjwnY9l1MJYRz1NMk5NAC3MffnLwiHnNH7IoyER5VEI6S4Um++uKyho0BwmD+1rA90yarpO4ZpjLgs8+BTUfU9w+gkwEi6ftxqyB9Wt6IBstE0E8kxJLeKaVhNA/uEwI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BKOoydII6+sDlhy8xYI1vchhF6qZnM0/oZSUzcd5By2cDzUtH3ng8PHIzAKL25wuSv+gDBsggYWWkvLT27f2dhwRULpny5D5yKI7vD/4iAW9KWHB7JsEZeCE1E/mdgVHZTOci8X+YIanJt7+aBd2k8f2RL45Z2puefelcXjUWbKdMSYwr58dAPaHymSU0o9/zjFt7/VoGmNAwCyvrKe2L1hYJqtd5gh6FGiCAGzqFk6on9pQdSAQzkctDTtXGbDih5iRPVIk9TwCJGwP3tpATkHsNwloUilnNMFce7twgDgrgWhsE8jWW+EBLlTDMn9pmtJOefTJc6Cxld039TN4XiwL4pMtU+8tXJ4g/LghG5APdF7/e3FSi4v8vnEBiIEm+5LlZtsk2LbbbY5hN9JkkJkd5BjQFPoUcwjJdTm0mx0024NmOvVgxASvU9TonFxUqG8cUTy3m5s3i7BqLbFkKcfxLQYhAXfjam0yFFd3PZE9wlXWfHYKlg2cFlTcnwRH6z8DpSfQHidMhElmCMb07li9ceHQHFknk/98f4KJRLpX6xQEXVAnJxlr8Aw6/qb0wu9SNolstScB0izxmMC5DiytBJd9Rcm3RGf42aiddmUTM4d4dgdjiT+vMPX0/RzfZdLoZ4aQqPzhx9plNI3QyvsMZHn2j2wOECoTtkfJt89O+eYUnXB/gFxHxPmOeL9ogAAAABJRU5ErkJggg=="})]})]})};Ue.defaultProps={width:"228",height:"258",fill:"none",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"};function Le(){const{t}=k();return e.jsxs(C,{children:[e.jsxs(C,{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",alignContent:"center",children:[e.jsx(Ue,{style:{width:250,height:250}}),e.jsx(v,{marginTop:"24px",marginBottom:"24px",children:t("storage.spaces.connect.provider")}),e.jsx(V,{})]}),e.jsx(me,{sx:{marginTop:"24px"}}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,mt:2,children:t("common.dataStorage")}),e.jsx(be,{})]})}Le.propTypes={};var fe={},Qt=K;Object.defineProperty(fe,"__esModule",{value:!0});var we=fe.default=void 0,zt=Qt(G()),Zt=e;we=fe.default=(0,zt.default)((0,Zt.jsx)("path",{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"}),"ArrowOutward");var ge={},Ht=K;Object.defineProperty(ge,"__esModule",{value:!0});var Me=ge.default=void 0,Vt=Ht(G()),Kt=e;Me=ge.default=(0,Vt.default)((0,Kt.jsx)("path",{d:"M14.69 2.21 4.33 11.49c-.64.58-.28 1.65.58 1.73L13 14l-4.85 6.76c-.22.31-.19.74.08 1.01.3.3.77.31 1.08.02l10.36-9.28c.64-.58.28-1.65-.58-1.73L11 10l4.85-6.76c.22-.31.19-.74-.08-1.01-.3-.3-.77-.31-1.08-.02"}),"ElectricBoltOutlined");var xe={},Gt=K;Object.defineProperty(xe,"__esModule",{value:!0});var Fe=xe.default=void 0,Xt=Gt(G()),Yt=e;Fe=xe.default=(0,Xt.default)((0,Yt.jsx)("path",{d:"m9.17 6 2 2H20v10H4V6zM10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"}),"FolderOutlined");function Se({spaceGateway:t,onConfirm:s,onCancel:o}){const{t:n}=k(),[r,i]=A.useState(!1),[a,l]=A.useState(!1),p=(d,g)=>{d==null||d.preventDefault(),d==null||d.stopPropagation(),i(g)},m=async d=>{try{d==null||d.stopPropagation(),l(!0),await(s==null?void 0:s(t)),i(!1)}catch(g){console.error(g),B.error(`${n("storage.space.gateway.delete.failed")}: ${te(g)}`)}finally{i(!1),l(!1)}},x=d=>{p(d,!1),o==null||o(d)};return e.jsxs(e.Fragment,{children:[e.jsxs(Q,{color:"red",onClick:d=>p(d,!0),children:[e.jsx(z,{style:{minWidth:24,color:"red"},children:e.jsx(Dt,{fontSize:"small"})}),e.jsx(Z,{style:{color:"red"},children:n("common.delete")})]}),e.jsx(ot,{title:n("storage.spaces.gateway.delete.title"),open:r,confirmButton:{text:n("common.confirm"),props:{size:"small",variant:"contained",color:"error",loading:a}},cancelButton:{text:n("common.cancel"),props:{size:"small",variant:"outlined",disabled:a}},onConfirm:m,onCancel:x,children:e.jsx(v,{sx:{wordWrap:"break-word"},children:n("storage.spaces.gateway.delete.descForBackup",{name:`${t==null?void 0:t.name}`})})})]})}Se.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool}).isRequired,onConfirm:f.func,onCancel:f.func};Se.defaultProps={onConfirm:()=>{},onCancel:()=>{}};function je({spaceGateway:t,selected:s,onDelete:o,onConnect:n,enableSwitchToSpace:r,backupInProgress:i,...a}){const{abortBlockletBackup:l}=L(),[p,m]=A.useState(null),{t:x}=k(),[d,g]=A.useState(!1),S=(u,c)=>{u.stopPropagation(),u.preventDefault(),m(c&&u.currentTarget)},I=async u=>{try{g(!0),S(u,!1),await n(t)}catch(c){console.error(c),B.error(c.message)}finally{g(!1)}},y=async u=>{try{g(!0),S(u,!1),await l()}catch(c){console.error(c),B.error(c.message)}finally{g(!1)}};return e.jsxs(e.Fragment,{children:[d||t!=null&&t.loading?e.jsx(b,{sx:{ml:1},size:"24px"}):e.jsx(Ge,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions",variant:"outlined",size:"small",onClick:u=>S(u,!0),...a,children:e.jsx(Et,{})}),e.jsxs(Xe,{id:"simple-menu",anchorEl:p,keepMounted:!0,open:!!p,onClose:u=>S(u,!1),children:[e.jsxs(Q,{onClick:u=>{S(u,!1),window.open(ve(t.endpoint?At(t.endpoint):t.url,{allowDomains:null}))},children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(we,{fontSize:"small"})}),e.jsx(Z,{children:x("common.open")})]}),e.jsxs(Q,{onClick:u=>{S(u,!1),window.open(ve(Bt(t.endpoint),{allowDomains:null}))},children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(Fe,{fontSize:"small"})}),e.jsx(Z,{children:x("storage.spaces.strategy.viewBackupFiles")})]}),!s&&r&&e.jsxs(Q,{onClick:I,children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(Me,{fontSize:"small"})}),e.jsx(Z,{children:x("storage.spaces.connect.switchToSpace")})]}),i&&e.jsxs(Q,{onClick:y,children:[e.jsx(z,{style:{minWidth:24},children:e.jsx(kt,{fontSize:"small"})}),e.jsx(Z,{children:x("storage.spaces.connect.abortBlockletBackup")})]}),!i&&e.jsx(Se,{spaceGateway:t,onConfirm:async()=>{m(null),await(o==null?void 0:o(t))},onCancel:()=>m(null)})]})]})}je.propTypes={spaceGateway:f.shape({name:f.string.isRequired,url:f.string.isRequired,protected:f.bool,endpoint:f.string.isRequired,loading:f.bool}).isRequired,selected:f.bool.isRequired,enableSwitchToSpace:f.bool,onDelete:f.func,onConnect:f.func,backupInProgress:f.bool};je.defaultProps={onDelete:()=>{},onConnect:()=>{},enableSwitchToSpace:!0,backupInProgress:!1};function Ae({spaceGateway:t,spaceStatus:s,selected:o,onConnected:n,onDeleted:r,onBackedUp:i}){const{t:a,locale:l}=k(),{blocklet:p}=U(),{api:m,info:{did:x}}=J(),{appDid:d,appName:g,appDescription:S,scopes:I,appUrl:y,referrer:u}=ke({blocklet:p}),{backupProgress:c,updateSpaceGateway:w,deleteSpaceGateway:X}=L(),[M,F]=A.useState(!1),[E,P]=A.useState({open:!1,action:"one-click-authorization",checkTimeout:1e3*300,messages:{title:a("storage.spaces.authorize.title",{appName:g},l),scan:a("storage.spaces.authorize.scan",{appName:g},l),confirm:"",success:e.jsx(v,{gutterBottom:!0,children:a("storage.spaces.authorize.success")})},onClose:()=>{P(j=>({...j,open:!1}))}}),se=o&&!M&&s===ie.DISCONNECTED,Y=o&&!M&&!t.loading&&s===ie.CONNECTED,h=o&&M&&s===ie.CONNECTED&&(c==null?void 0:c.progress)>=0,D=async()=>{try{if(await yt(t==null?void 0:t.endpoint)){await m.configBlocklet({input:{did:[p.meta.did],configs:[{key:O.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_BACKUP_ENDPOINT,value:t.endpoint}]}}),B.success(a("storage.spaces.connect.switchToSpaceSucceeded",{name:t.name?`(${t.name})`:""})),n==null||n(null,t);return}}catch(j){console.error(j),n==null||n(j,t);return}P(j=>({...j,open:!0,prefix:le(t.url,"space/api/did"),baseUrl:new URL(t.url).origin,checkFn:Ee.create({baseURL:le(t.url,"space")}).get,extraParams:{appDid:d,appName:g,appDescription:S,scopes:I,appUrl:y,referrer:u,nodeDid:x,spaceDid:t.did}}))},R=async(j,Be)=>{const ne=Be(j.endpoint),Qe=de(ne),N=j.space?Be(j.space):{};if(t.did&&Qe!==t.did){P(ze=>({...ze,open:!1}));const q=a("storage.spaces.gateway.switch.failedForMismatchSpace",{name:N!=null&&N.name?N.name:""});B.error(q),n==null||n(new Error(q),t);return}const ye={...t,name:N.name??"DID Space",did:N.did??de(ne),endpoint:ne};await w(ye),P(q=>({...q,open:!1})),n==null||n(null,ye)},W=async()=>{try{if(M)return;F(!0),await m.backupBlocklet({input:{appDid:p.appDid,to:"spaces"}})}catch(j){console.error(j),B.error(j.message),i==null||i(j,t)}finally{F(!0)}},Je=async()=>{try{await X(t),B.success(a("storage.spaces.gateway.delete.succeeded",{name:t.name?`(${t.name})`:""})),r==null||r(null,t)}catch(j){console.error(j),r==null||r(j,t)}};return A.useEffect(()=>{c!=null&&c.completed?(o&&((c==null?void 0:c.progress)===100?(B.success(a("storage.spaces.backupSuccessfully")),i==null||i(null,t)):c.message&&(i==null||i(new Error(c==null?void 0:c.message),t)),c.progress=0,c.message=""),F(!1)):c.progress&&F(!0)},[c]),e.jsxs(e.Fragment,{children:[e.jsxs(C,{sx:{".action-btn":{borderRadius:1,marginLeft:1}},display:"flex",alignItems:"center",children:[Y&&e.jsx(ae,{className:"action-btn",variant:"outlined",size:"small",onClick:W,children:a("storage.spaces.strategy.backupNow")}),se&&e.jsx(ae,{className:"action-btn",variant:"outlined",size:"small",onClick:D,children:a("storage.spaces.disconnected.reconnectNow")}),h&&e.jsxs(ae,{className:"action-btn",variant:"outlined",size:"small",sx:{minWidth:70},children:[e.jsx(b,{variant:"determinate",value:c==null?void 0:c.progress,size:14,sx:{mr:1}}),c==null?void 0:c.progress,"%"]}),e.jsx(at,{forceConnected:!1,saveConnect:!1,prefix:E.prefix,open:E.open,popup:!0,action:E.action,baseUrl:E.baseUrl,checkFn:E.checkFn,onSuccess:R,onClose:E.onClose,checkTimeout:E.checkTimeout,extraParams:E.extraParams,messages:E.messages,locale:l},"get-endpoint")]}),e.jsx(je,{sx:{minWidth:32,padding:"2px 4px",ml:1},spaceGateway:t,selected:o,onDelete:Je,onConnect:D,enableSwitchToSpace:(c==null?void 0:c.completed)||ee(c==null?void 0:c.message),backupInProgress:h})]})}Ae.propTypes={spaceGateway:f.shape({did:f.string.isRequired,name:f.string.isRequired,url:f.string.isRequired,endpoint:f.string.isRequired,protected:f.bool,loading:f.bool}).isRequired,spaceStatus:f.string.isRequired,selected:f.bool.isRequired,onConnected:f.func,onDeleted:f.func,onBackedUp:f.func};Ae.defaultProps={onConnected:()=>{},onDeleted:()=>{},onBackedUp:()=>{}};function Pe({...t}){const{t:s}=k(),{autoBackup:o,updateAutoBackup:n}=L(),r=async()=>{try{const i=!(o!=null&&o.enabled);await n({enabled:i}),B.success(s(i?"storage.spaces.autoBackup.enabled":"storage.spaces.autoBackup.disabled"))}catch(i){B.error(i.message)}};return e.jsx(Rt,{checked:!!(o!=null&&o.enabled),onChange:r,name:"enableWelcomePage",labelProps:{label:e.jsx(v,{marginRight:"8px",children:e.jsx("span",{children:s("storage.spaces.autoBackup.title")})})},style:{...t.style}})}Pe.propTypes={};function Wt(){const{t}=k(),s=Ie(),{spaceGateways:o,spaceGatewaysLoading:n,spaceGatewayIsSelected:r}=L(),i=n&&!(o!=null&&o.length),a=({spaceGateway:l,spaceStatus:p,selected:m,refresh:x})=>e.jsx(Ae,{spaceGateway:l,spaceStatus:p,selected:m,onConnected:()=>x(),onBackedUp:d=>d&&x()});return e.jsxs(C,{display:"flex",flexDirection:"column",children:[e.jsxs($,{spacing:s?1:4,direction:s?"column":"row",alignItems:s?"space-between":"center",justifyContent:s?"center":"space-between",marginBottom:"12px",children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",flexGrow:1,children:t("storage.spaces.connected.title")}),e.jsx(Pe,{}),s?e.jsx(V,{sx:{width:"100%","& button:first-of-type":{width:"100%"}}}):e.jsx(V,{})]}),e.jsx(C,{children:i?e.jsx(C,{display:"flex",justifyContent:"center",children:e.jsx(b,{})}):e.jsx(H,{container:!0,spacing:1,children:e.jsx(e.Fragment,{children:o.map(l=>e.jsx(H,{item:!0,xs:12,md:6,children:e.jsx(ut,{sx:{marginTop:"12px"},endpoint:l.endpoint,selected:r(l),action:a},l.endpoint)}))})})}),e.jsx(me,{sx:{marginTop:"24px"}}),e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",mb:2,children:t("common.dataStorage")}),e.jsx(be,{})]})}function qt(){const{spaceGatewaysFirstLoading:t,spaceGateways:s}=L();return t?e.jsx(Ce,{relative:"parent",children:e.jsx(b,{})}):ee(s)?e.jsx(Le,{}):e.jsx(Wt,{})}function _t(){return e.jsx(he,{children:e.jsx(qt,{})})}function $t(){const{spaceGateway:t,settingStorageEndpoint:s,updateSpaceGateway:o,hasStorageEndpoint:n,loading:r,storageEndpoint:i}=Ct(),a=ce(()=>({display:"flex",alignItems:"center",justifyContent:"center",paddingTop:"16px"}));return r?e.jsx(Ce,{relative:"parent",children:e.jsx(b,{})}):e.jsxs(C,{sx:{maxWidth:"md",position:"relative"},children:[n?e.jsx(ht,{spaceGateway:t,settingStorageEndpoint:s}):e.jsx(mt,{}),e.jsx(C,{sx:a,children:e.jsx(ft,{onConnect:o,storageEndpoint:i})})]})}function es(){const{t}=k();return e.jsxs(vt,{children:[e.jsxs($,{spacing:1,marginBottom:2,children:[e.jsx(v,{fontSize:"1.2rem",fontWeight:"bold",children:t("storage.appLevel.title")}),e.jsx(v,{color:"text.secondary",children:t("storage.appLevel.description")})]}),e.jsx($t,{})]})}function Ne({navOrientation:t,...s}){const{t:o,locale:n}=k(),{blocklet:r}=U(),i=Ie({key:"md"}),[a,l]=_e(),p=a.get("tab")||"backup",m=i?"horizontal":t,x=ce(()=>{var c;const y=[{label:e.jsxs($,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(De,{}),e.jsx("span",{children:o("common.backup")})]}),value:"backup"}],u=(c=r==null?void 0:r.capabilities)==null?void 0:c.didSpace;return(u===O.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||u===O.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP)&&y.push({label:e.jsxs($,{direction:"row",alignItems:"center",alignSelf:"flex-start",spacing:2,children:[e.jsx(Re,{}),e.jsx("span",{children:o("common.storage")})]}),value:"storage"}),y},[n,m]),g=ce(()=>({backup:e.jsx(_t,{}),storage:e.jsx(es,{})}))[p],S=y=>{l(u=>(y==="backup"?u.delete("tab"):u.set("tab",y),u))};if(x.length<=1)return e.jsx(re,{children:g});const I=e.jsx(it,{tabs:x,current:p,orientation:m,onChange:S,sx:[{borderRight:1,height:"100%",borderColor:"divider"},m==="horizontal"&&{borderRight:0}]});if(m==="vertical")return e.jsx(C,{...s,children:e.jsxs(H,{container:!0,columnSpacing:4,columns:24,sx:{mt:-1},children:[e.jsx(H,{item:!0,md:5,lg:4,children:I}),e.jsx(H,{item:!0,md:19,lg:20,children:e.jsx(re,{sx:{mt:1},children:g})})]})});if(m==="horizontal")return e.jsxs(C,{...s,children:[I,e.jsx(re,{sx:{mt:2},children:g})]})}Ne.propTypes={navOrientation:f.oneOf(["vertical","horizontal"])};Ne.defaultProps={navOrientation:"vertical"};const re=Ye(C)`
|
|
2
2
|
position: relative;
|
|
3
3
|
min-height: 66vh;
|
|
4
4
|
overflow: hidden;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as b}from"./vendor-react-DoD83n6N.js";import{j as e,E as d,a1 as Pe,R as bt,a4 as jt,T as G,a3 as R,A as Fe,bi as _e,co as et,cn as Te,bk as Ie,bM as De,x as ye,a$ as Ee,a2 as tt,a9 as ae,V as nt,bd as Xe,bY as vt,bj as yt,aj as Je,cp as St}from"./vendor-mui-core-BGkzVIkr.js";import{b as Z,at as re,z as Ct}from"./vendor-utils-DDG_VdF0.js";import{Q as V,p as L,aY as Nt,r as Be,u as X,bJ as wt,P as st,B as Ae,a0 as at,ba as be,ai as Rt,ao as Tt,by as It}from"./vendor-ux-did-connect-yBp5D51w.js";import{z as Dt,G as H,m as Et,I as Qe}from"./index-BJbC-Qjr.js";import{f as pe,a as Oe}from"./vendor-hooks-B7GuuzU5.js";import{S as ue}from"./shorten-label-dPKLJRIw.js";import{I as it}from"./index-C1klzBZN.js";import{S as At,a as Ot}from"./list-DTzzPxLP.js";import{R as ze}from"./relative-time-BPP0lNWq.js";import{b as We}from"./dashboard-j9G-KyD0.js";import{W as Lt}from"./did-address-aMjKReYC.js";import{p as ot}from"./util-LJfbsxXq.js";import{D as kt,g as Pt}from"./traffic-DIZGb0Wa.js";import{B as rt}from"./bundle-avatar-Ne6xQFVO.js";import{B as Ft}from"./index-KCwqCBtZ.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-BSReIGUe.js";import"./index-uoDarD9I.js";import"./InfoOutlined-aPcuFKow.js";import"./useLocalStorage-BmgSZ9f3.js";import"./confirm-twAiL-Pg.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-BWaTV7IU.js";import"./get-safe-url-DmtG3OsE.js";import"./session-BpknZId5.js";import"./useAsyncRetry-Cbcg1dvJ.js";import"./useAsync-DOwDXG5n.js";import"./useSetState-BL3ktMon.js";import"./base32-CkPppFg3.js";import"./iframe-BDXgtf3V.js";import"./LaunchOutlined-CBLNAogt.js";import"./ChevronLeft-BeX0eKuU.js";import"./ChevronRight-BWxZ0GT9.js";import"./index-DC8p-aHz.js";import"./vendor-mui-x-ZeS-_tC0.js";const lt=b.createContext({}),{Provider:_t,Consumer:es}=lt;function Bt({children:t,blocklet:n=""}){const{api:s,inService:i}=Dt(),[a,l]=b.useState([]),[p,f]=b.useState({total:0,pageSize:20,pageCount:0,page:1}),y=pe(()=>{var j;return(j=n.meta)==null?void 0:j.did},[n]),[S,T]=b.useState([]),N=async({page:j=1,pageSize:v=20,...x}={})=>{if(!y)return[];try{const w={paging:{page:j,pageSize:v},...x,teamDid:y,dateRange:x.dateRange?[H(x.dateRange[0]).toISOString(),H(x.dateRange[1]).toISOString()]:void 0},{dids:M,...B}=w;let K="";M.includes("system")&&(K="system");const _=M.filter(ee=>ee!=="system"),Q=await s.getNotificationSendLog({input:{...B,source:K,componentDids:_}});return l(Q.list),f(Q.paging),Q.list}catch(w){return V.error(w.message),[]}},A=async()=>{const j=await s.getNotificationComponents({input:{teamDid:y}});T(j.componentDids)},P=b.useCallback(j=>{const v=n.children.find(x=>{var w;return((w=x.meta)==null?void 0:w.did)===j});if(v)return v.ancestors=[n],v},[n]),O=async({notificationId:j,receivers:v,channels:x,...w})=>{await s.resendNotification({input:{teamDid:y,notificationId:j,receivers:v,channels:x.map(M=>M==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:M==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:M),...w}})},F=b.useCallback(async j=>(await s.getUser({input:{teamDid:y,user:{did:j}}})).user,[s,y]),I=b.useCallback(async({page:j=1,pageSize:v=20,...x}={})=>{try{const w={paging:{page:j,pageSize:v},...x,userName:x.searchText||"",teamDid:y,dateRange:x.dateRange?[H(x.dateRange[0]).toISOString(),H(x.dateRange[1]).toISOString()]:void 0};return await s.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[s,y]);b.useEffect(()=>{y&&A()},[y]);const U={fetch:N,data:a,paging:p,blocklet:n,getComponent:P,resendNotification:O,getUser:F,componentDids:S,getReceivers:I,inService:i,teamDid:y};return e.jsx(_t,{value:{notificationRecords:U},children:t})}function Me(){const{notificationRecords:t}=b.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const zt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(Nt,{type:zt[t],children:t})}var qe={},Wt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var ct=qe.default=void 0,Mt=Wt(Be()),qt=e;ct=qe.default=(0,Mt.default)((0,qt.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"}),"CheckCircleOutline");var Ke={},Kt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var dt=Ke.default=void 0,$t=Kt(Be()),Ht=e;dt=Ke.default=(0,$t.default)((0,Ht.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"}),"Block");var $e={},Ut=Pe;Object.defineProperty($e,"__esModule",{value:!0});var ut=$e.default=void 0,Vt=Ut(Be()),Gt=e;ut=$e.default=(0,Vt.default)((0,Gt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Yt=(t,n,s="")=>{if(!s||!n)return"";switch(s){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return s}};function pt(t,n,s={}){const{status:i,updatedAt:a,reason:l="",channel:p="wallet"}=s,f=a?t("notification.sendStatus.sentTime",{date:Et(a,n)}):"",y=Yt(t,p,l);return i===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:i===L.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"],Ze=["info","success","error","warning"],ft=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.email)==null?void 0:i.enabled},mt=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.pushKit)==null?void 0:i.enabled},Xt=(t,n)=>{const s=Z(n,"extra.notifications.email",!0);return{available:ft(t),enabled:s}},Jt=(t,n)=>{const s=Z(n,"extra.notifications.push",!0);return{available:mt(t),enabled:s}},Qt=t=>({enabled:Z(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:Z(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(n=>{setTimeout(()=>{n()},t*1e3)}),en=(t,n)=>n==="wallet"||n==="webhook"?[{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:n==="pushKit"||n==="email"?[{channel:n,type:"available",pass:t("notification.sendStatus.reason.available",{channel:n}),fail:t("notification.sendStatus.reason.unavailable",{channel:n})},{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:[],xe=(t=[])=>{const n=H().startOf("day");return t.filter(s=>H(s.sendAt).isSame(n,"day")).length},tn=(t,n="")=>{if(n&&ke.includes(n)){const l=`${n}SendRecord`,p=Z(t,l,[]);return xe(p)}const s=Z(t,"webhook",{}),i=Object.keys(s??{})??[];if(n&&i.includes(n)){const l=s[n]??[];return xe(l)}const a={};return ke.forEach(l=>{const p=`${l}SendRecord`,f=Z(t,p,[]),y=xe(f);a[l]=y}),i.length>0&&i.forEach(l=>{const p=s[l]??[],f=xe(p);a[l]=f}),a},je=(t,n,s)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[s].splice(n,1),t},ve=(t,n)=>{if(!Array.isArray(n))throw new Error("filters must be an array");return n.length?!n.includes(t):!1},nn=t=>{switch(t){case L.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case L.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case L.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case L.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>bt({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"}},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 J({config:t,enableTooltip:n=!0,showTitle:s=!1,children:i}){const{status:a,title:l="",sentTime:p="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:n?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:p})]}):null,arrow:!0,placement:"top",children:e.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(R,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(R,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a],style:{opacity:.15}}),e.jsx(R,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:s?l:i})]})})}J.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};J.defaultProps={enableTooltip:!0,showTitle:!1,children:null};le.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};le.defaultProps={onDelete:()=>{}};function le({list:t,label:n,onDelete:s}){const{t:i,locale:a}=X();return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(l=>{const p=pt(i,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(J,{config:p,enableTooltip:!1,children:p.title})}),onDelete:f=>s(f,l)},l)})]})}He.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 He({filterList:t,onChange:n,index:s,column:i,filterValues:a,label:l,renderLabel:p}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(f=>e.jsx(Ie,{control:e.jsx(De,{checked:t[s].indexOf(f.value??f)>-1,onChange:y=>{const S=[...t];y.target.checked?S[s]=[...S[s],f.value??f]:S[s]=S[s].filter(T=>T!==(f.value??f)),n(S[s],s,i)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:p(f)})},f.value??f))})]})}function Re(t){return e.jsx(He,{...t,renderLabel:n=>e.jsx(J,{enableTooltip:!1,config:{status:n.status},children:n.label})})}oe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function oe({status:t,updatedAt:n,reason:s="",channel:i="wallet",onResend:a}){const{t:l,locale:p}=X(),f=pt(l,p,{status:t,updatedAt:n,reason:s,channel:i});return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(J,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(ye,{className:"resend-btn",size:"small",startIcon:e.jsx(We,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:n}){const{locale:s}=X(),i=H().toDate(),[a,l]=b.useState(null),p=b.useCallback(S=>{l(a?null:S.currentTarget)},[a]),f=!!a,y=b.useCallback(S=>{if(!S.startDate||!S.endDate){V.error("Please select a date range");return}if(H(S.startDate).isAfter(S.endDate)||!H(S.startDate).isValid()||!H(S.endDate).isValid()){V.error("Invalid date range");return}n([S.startDate,S.endDate]),l(null)},[n]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(ye,{onClick:p,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],s)," - ",Qe(t[1],s)]})}),e.jsx(Ee,{open:f,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(kt,{open:!0,maxDate:i,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:p,definedRanges:Pt(i),onChange:y})})]})}Ve.propTypes={itemComponent:d.elementType.isRequired};function Ve({itemComponent:t,...n}){var a;const{t:s}=X();return!((a=n==null?void 0:n.filterList)!=null&&a.filter(l=>l.length).length)?null:e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:s("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(wt.TableFilterList,{...n,ItemComponent:t})})]})}function Se({label:t,onDelete:n,canDelete:s=()=>!0,...i}){const a=n&&typeof n=="function"?n:void 0;let l=!0;return s&&typeof s=="function"&&(l=s({label:t,...i})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Se.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Se.defaultProps={canDelete:()=>!0};const sn=[{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}];Ge.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ge.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ge({loading:t=!1,onCancel:n,onConfirm:s}){const{t:i}=X(),[a,l]=b.useState(sn),[p,f]=b.useState(!0),y=(T,N)=>{N.checked=T.target.checked;const A=a.map(P=>({...P,checked:P.value===N.value?N.checked:P.checked}));l(A)},S=T=>{T.stopPropagation(),s({channels:a.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:p})};return e.jsxs(R,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:i("notification.config")}),e.jsx(R,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:i("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(T=>e.jsx(Ie,{control:e.jsx(De,{checked:T.checked,onChange:N=>y(N,T),name:T.value}),label:T.label},T.value))})]})}),e.jsx(R,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(De,{checked:p,onChange:T=>f(T.target.checked)}),label:i("notification.resendFailedOnly")})})}),e.jsxs(R,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(ye,{onClick:T=>{T.stopPropagation(),n()},color:"inherit",children:i("common.cancel")}),e.jsxs(ye,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),i("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:n,resending:s=!1}){const{t:i,locale:a}=X(),{getReceivers:l,inService:p,teamDid:f,getUser:y,blocklet:S}=Me(),[T,N]=b.useState(!1),[A,P]=b.useState([]),O=Oe({anchorEl:null,position:null}),F=Oe({anchorEl:null,position:null}),[I,U]=b.useState(null),[j,v]=b.useState({total:0,pageSize:10,pageCount:0,page:1}),[x,w]=b.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[M,B]=b.useState([]),K=[{label:i("notification.sendStatus.pending"),value:0,status:"pending"},{label:i("notification.sendStatus.success"),value:1,status:"success"},{label:i("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!T&&t)try{N(!0);const o=await l({notificationId:t,...x}),r=o.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,f,p)}}));P(r),v(o.paging),N(!1)}catch(o){V.error(o.message),N(!1)}};b.useEffect(()=>{_()},[x]);const Q=o=>{o.stopPropagation();const r=o.currentTarget;F.anchorEl=r;const c=r.getBoundingClientRect();F.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ee=o=>o.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(We,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Q,children:i("notification.resend")})}):null,Ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:i("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:j.page-1,rowsPerPage:j.pageSize,count:j.total,searchText:x.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:M,onRowSelectionChange:(o,r)=>{B(r.map(c=>c.dataIndex))},customToolbarSelect:ee},we=({page:o,rowsPerPage:r,searchText:c,filterList:C})=>{const[,k=[],$=[],q=[]]=C;x.pageSize!==r?w(W=>({...W,pageSize:r,page:1})):x.page!==o+1?w(W=>({...W,page:o+1})):x.searchText!==c?w(W=>({...W,searchText:c,page:1})):re(k,x.walletSendStatus)?re($,x.pushKitSendStatus)?re(q,x.emailSendStatus)||w(W=>({...W,emailSendStatus:q,page:1})):w(W=>({...W,pushKitSendStatus:$,page:1})):w(W=>({...W,walletSendStatus:k,page:1}))},me=b.useCallback(async(o,r)=>{if(!r)return!1;const c=await y(r);return c?o==="wallet"?Qt(c):o==="email"?Xt(S,c):o==="pushKit"?Jt(S,c):o==="webhook"?Zt(c):!0:!1},[y,S]),h=b.useCallback(o=>en(i,o),[i]),u=()=>{O.anchorEl=null,O.position=null,U(null)},m=()=>{F.anchorEl=null,F.position=null},g=async(o,r,c=!0,C="")=>{if(!(!r.length||!o.length))try{n(o,r,c,C),F.anchorEl||(await ge(.5),u())}catch(k){console.error("handleResend error",{error:k})}},D=async({channels:o,isResendFailedOnly:r})=>{const c=M.map(C=>A[C].receiver);await g(o,c,r),await ge(.5),m(),B([])},E=async(o,r=[],c=!0)=>{try{await g(["webhook"],[o.receiver],c,r)}catch(C){V.error(C.response?C.response.statusText:C.message)}},z=async(o,r,c,C=[],k=!0)=>{if(o.stopPropagation(),tn(r,c)>=4){V.warning(i("notification.resendLimit"));return}if(!ke.includes(c)){await E(r,C,k);return}if(o){const q=o.currentTarget,W=q.getBoundingClientRect();O.anchorEl=q,O.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}U({channel:c});try{const q=await me(c,r.receiver);await ge(1),U({channel:c,result:q}),(typeof q=="boolean"&&q||Ct(q)&&Object.values(q).every(W=>!!W))&&(await n([c],[r.receiver],k),F.anchorEl||(await ge(.5),u()))}catch(q){V.error(q.message)}},Y=o=>{w(r=>({...r,dateRange:o,page:1}))},te=(o,r,c,C)=>{o.stopPropagation();const k=c.filter($=>$!==r);w($=>({...$,[C]:k,page:1}))},ie=pe(()=>[{label:i("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:o=>{const{receiverUser:r,receiver:c}=A[o];return r?e.jsxs(R,{"data-cy":`member-name-${r.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(st,{src:`${r.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(ue,{children:r.fullName})]},c):e.jsx(Lt,{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:x.walletSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Wallet",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[1].options.filterList,"walletSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Wallet",filterList:o,onChange:r,index:c,column:C,filterValues:K})},customBodyRenderLite:o=>{const{walletSendStatus:r,walletSendAt:c,walletSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"wallet",onResend:k=>z(k,A[o],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{pushKitSendStatus:r,pushKitSendAt:c,pushKitSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"pushkit",onResend:k=>z(k,A[o],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:x.pushKitSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Push Kit",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[2].options.filterList,"pushKitSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Push Kit",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{emailSendStatus:r,emailSendAt:c,emailSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"email",onResend:k=>z(k,A[o],"email",[],!1)})},filter:!0,filterType:"custom",filterList:x.emailSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Email",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[3].options.filterList,"emailSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Email",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{webhook:r}=A[o];if(!r)return null;const c=Object.entries(r)[0];if(!c)return null;const[C,k]=c,$=k[0];return e.jsx(R,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(R,{className:"webhook-item",fontSize:12,children:[e.jsx(ue,{maxLength:30,children:C},C),e.jsx(oe,{status:$.status,updatedAt:$.sendAt,reason:$.failedReason,channel:"webhook",onResend:q=>z(q,A[o],"webhook",[C],!1)})]},C)})}}},{label:i("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:o=>{const{createdAt:r}=A[o];return e.jsx(ze,{value:r,locale:a,shouldUpdate:!0})}}}],[A,a,x,i]),he=[e.jsx(Ue,{value:x.dateRange,onChange:Y},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:T,startIcon:e.jsx(ut,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:i("common.refresh")},"refresh")];return e.jsx(R,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(on,{children:e.jsxs(nt,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:a,loading:T,columns:ie,data:A,onChange:we,options:Ne,customButtons:he,components:{TableFilterList:o=>e.jsx(Ve,{...o,itemComponent:r=>e.jsx(Se,{...r,canDelete:()=>!1})})}}),O.anchorEl&&e.jsx(Ee,{open:!!O.anchorEl,anchorReference:"anchorPosition",anchorPosition:O.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rn,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(R,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:h(I==null?void 0:I.channel).map(o=>{var k,$;const{type:r,pass:c,fail:C}=o;return!(I!=null&&I.result)||(k=I==null?void 0:I.result)!=null&&k[r]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:($=I==null?void 0:I.result)!=null&&$[r]?be.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},r):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:be.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:C})]},r)})})]})}),F.anchorEl&&e.jsx(Ee,{open:!!F.anchorEl,anchorReference:"anchorPosition",anchorPosition:F.position,onClose:m,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ge,{loading:s,onCancel:m,onConfirm:D})})]})})})}const an=b.memo(gt),on=ae.div`
|
|
1
|
+
import{r as b}from"./vendor-react-DoD83n6N.js";import{j as e,E as d,a1 as Pe,R as bt,a4 as jt,T as G,a3 as R,A as Fe,bi as _e,co as et,cn as Te,bk as Ie,bM as De,x as ye,a$ as Ee,a2 as tt,a9 as ae,V as nt,bd as Xe,bY as vt,bj as yt,aj as Je,cp as St}from"./vendor-mui-core-BGkzVIkr.js";import{b as Z,at as re,z as Ct}from"./vendor-utils-DDG_VdF0.js";import{Q as V,p as L,aY as Nt,r as Be,u as X,bJ as wt,P as st,B as Ae,a0 as at,ba as be,ai as Rt,ao as Tt,by as It}from"./vendor-ux-did-connect-BzpeuxHd.js";import{z as Dt,G as H,m as Et,I as Qe}from"./index-CXwy6oRm.js";import{f as pe,a as Oe}from"./vendor-hooks-B7GuuzU5.js";import{S as ue}from"./shorten-label-dPKLJRIw.js";import{I as it}from"./index-WMPymUEC.js";import{S as At,a as Ot}from"./list-DsNBlXE-.js";import{R as ze}from"./relative-time-CWG4feBZ.js";import{b as We}from"./dashboard-2_ANBDid.js";import{W as Lt}from"./did-address-BZkQh8hP.js";import{p as ot}from"./util-CWRewt_A.js";import{D as kt,g as Pt}from"./traffic-CNWuNYq6.js";import{B as rt}from"./bundle-avatar-BlPK_xIf.js";import{B as Ft}from"./index-CW52563O.js";import"./lottie-web-B6s7dDoL.js";import"./vendor-arcblock-DAGgKol-.js";import"./index-uoDarD9I.js";import"./InfoOutlined-Ov0NeUHF.js";import"./useLocalStorage-BLFh8HxW.js";import"./confirm-D0n5z1n8.js";import"./format-error-LAoTjvJe.js";import"./PlayArrow-CetrL8A8.js";import"./get-safe-url-CH0HGyks.js";import"./session-D4d96gMA.js";import"./useAsyncRetry-Cbcg1dvJ.js";import"./useAsync-DOwDXG5n.js";import"./useSetState-BL3ktMon.js";import"./base32-CZKGH0iY.js";import"./iframe-Cgdpmo47.js";import"./LaunchOutlined-BnDQc5Sb.js";import"./ChevronLeft-bdr0IWyY.js";import"./ChevronRight-B6l1CEz4.js";import"./index-DC8p-aHz.js";import"./vendor-mui-x-ZeS-_tC0.js";const lt=b.createContext({}),{Provider:_t,Consumer:es}=lt;function Bt({children:t,blocklet:n=""}){const{api:s,inService:i}=Dt(),[a,l]=b.useState([]),[p,f]=b.useState({total:0,pageSize:20,pageCount:0,page:1}),y=pe(()=>{var j;return(j=n.meta)==null?void 0:j.did},[n]),[S,T]=b.useState([]),N=async({page:j=1,pageSize:v=20,...x}={})=>{if(!y)return[];try{const w={paging:{page:j,pageSize:v},...x,teamDid:y,dateRange:x.dateRange?[H(x.dateRange[0]).toISOString(),H(x.dateRange[1]).toISOString()]:void 0},{dids:M,...B}=w;let K="";M.includes("system")&&(K="system");const _=M.filter(ee=>ee!=="system"),Q=await s.getNotificationSendLog({input:{...B,source:K,componentDids:_}});return l(Q.list),f(Q.paging),Q.list}catch(w){return V.error(w.message),[]}},A=async()=>{const j=await s.getNotificationComponents({input:{teamDid:y}});T(j.componentDids)},P=b.useCallback(j=>{const v=n.children.find(x=>{var w;return((w=x.meta)==null?void 0:w.did)===j});if(v)return v.ancestors=[n],v},[n]),O=async({notificationId:j,receivers:v,channels:x,...w})=>{await s.resendNotification({input:{teamDid:y,notificationId:j,receivers:v,channels:x.map(M=>M==="wallet"?L.NOTIFICATION_SEND_CHANNEL.WALLET:M==="pushKit"?L.NOTIFICATION_SEND_CHANNEL.PUSH:M),...w}})},F=b.useCallback(async j=>(await s.getUser({input:{teamDid:y,user:{did:j}}})).user,[s,y]),I=b.useCallback(async({page:j=1,pageSize:v=20,...x}={})=>{try{const w={paging:{page:j,pageSize:v},...x,userName:x.searchText||"",teamDid:y,dateRange:x.dateRange?[H(x.dateRange[0]).toISOString(),H(x.dateRange[1]).toISOString()]:void 0};return await s.getReceivers({input:w})}catch(w){throw V.error(w.message),w}},[s,y]);b.useEffect(()=>{y&&A()},[y]);const U={fetch:N,data:a,paging:p,blocklet:n,getComponent:P,resendNotification:O,getUser:F,componentDids:S,getReceivers:I,inService:i,teamDid:y};return e.jsx(_t,{value:{notificationRecords:U},children:t})}function Me(){const{notificationRecords:t}=b.useContext(lt);return t}fe.propTypes={severity:d.oneOf(Object.values(["info","success","error","warning"])).isRequired};const zt={info:"primary",success:"success",error:"error",warning:"warning"};function fe({severity:t="info"}){return e.jsx(Nt,{type:zt[t],children:t})}var qe={},Wt=Pe;Object.defineProperty(qe,"__esModule",{value:!0});var ct=qe.default=void 0,Mt=Wt(Be()),qt=e;ct=qe.default=(0,Mt.default)((0,qt.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"}),"CheckCircleOutline");var Ke={},Kt=Pe;Object.defineProperty(Ke,"__esModule",{value:!0});var dt=Ke.default=void 0,$t=Kt(Be()),Ht=e;dt=Ke.default=(0,$t.default)((0,Ht.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"}),"Block");var $e={},Ut=Pe;Object.defineProperty($e,"__esModule",{value:!0});var ut=$e.default=void 0,Vt=Ut(Be()),Gt=e;ut=$e.default=(0,Vt.default)((0,Gt.jsx)("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh");const Yt=(t,n,s="")=>{if(!s||!n)return"";switch(s){case L.NOTIFICATION_SEND_FAILED_REASON.USER_DISABLED:return t("notification.sendStatus.reason.disabled",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_UNAVAILABLE:return t("notification.sendStatus.reason.unavailable",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.CHANNEL_DISABLED:return t("notification.sendStatus.reason.notSent",{channel:n});case L.NOTIFICATION_SEND_FAILED_REASON.NOT_ONLINE:return t("notification.sendStatus.reason.offline");default:return s}};function pt(t,n,s={}){const{status:i,updatedAt:a,reason:l="",channel:p="wallet"}=s,f=a?t("notification.sendStatus.sentTime",{date:Et(a,n)}):"",y=Yt(t,p,l);return i===L.NOTIFICATION_SEND_STATUS.FAILED?{status:"failed",title:t("notification.sendStatus.failed"),sentTime:f,reason:y}:i===L.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"],Ze=["info","success","error","warning"],ft=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.email)==null?void 0:i.enabled},mt=t=>{var s,i;const{settings:n}=t;return(i=(s=n==null?void 0:n.notification)==null?void 0:s.pushKit)==null?void 0:i.enabled},Xt=(t,n)=>{const s=Z(n,"extra.notifications.email",!0);return{available:ft(t),enabled:s}},Jt=(t,n)=>{const s=Z(n,"extra.notifications.push",!0);return{available:mt(t),enabled:s}},Qt=t=>({enabled:Z(t,"extra.notifications.wallet",!0)}),Zt=t=>({enabled:Z(t,"extra.webhooks",[]).length>0}),ge=(t=3)=>new Promise(n=>{setTimeout(()=>{n()},t*1e3)}),en=(t,n)=>n==="wallet"||n==="webhook"?[{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:n==="pushKit"||n==="email"?[{channel:n,type:"available",pass:t("notification.sendStatus.reason.available",{channel:n}),fail:t("notification.sendStatus.reason.unavailable",{channel:n})},{channel:n,type:"enabled",pass:t("notification.sendStatus.reason.enabled",{channel:n}),fail:t("notification.sendStatus.reason.disabled",{channel:n})}]:[],xe=(t=[])=>{const n=H().startOf("day");return t.filter(s=>H(s.sendAt).isSame(n,"day")).length},tn=(t,n="")=>{if(n&&ke.includes(n)){const l=`${n}SendRecord`,p=Z(t,l,[]);return xe(p)}const s=Z(t,"webhook",{}),i=Object.keys(s??{})??[];if(n&&i.includes(n)){const l=s[n]??[];return xe(l)}const a={};return ke.forEach(l=>{const p=`${l}SendRecord`,f=Z(t,p,[]),y=xe(f);a[l]=y}),i.length>0&&i.forEach(l=>{const p=s[l]??[],f=xe(p);a[l]=f}),a},je=(t,n,s)=>{if(!Array.isArray(t))throw new Error("Invalid filterList or index");return t[s].splice(n,1),t},ve=(t,n)=>{if(!Array.isArray(n))throw new Error("filters must be an array");return n.length?!n.includes(t):!1},nn=t=>{switch(t){case L.NOTIFICATION_SEND_CHANNEL.WALLET:return"Wallet";case L.NOTIFICATION_SEND_CHANNEL.PUSH:return"Push Kit";case L.NOTIFICATION_SEND_CHANNEL.EMAIL:return"Email";case L.NOTIFICATION_SEND_CHANNEL.WEBHOOK:return"Webhook";default:return""}},ht=()=>bt({typography:{fontSize:14,button:{textTransform:"none"}},palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"}},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 J({config:t,enableTooltip:n=!0,showTitle:s=!1,children:i}){const{status:a,title:l="",sentTime:p="",reason:f=""}=t,y=[l,f].filter(Boolean).join(", ");return e.jsx(jt,{title:n?e.jsxs(e.Fragment,{children:[e.jsx(G,{color:"inherit",sx:{fontSize:12},children:y}),e.jsx("span",{children:p})]}):null,arrow:!0,placement:"top",children:e.jsxs(R,{sx:{display:"flex",flexDirection:"row",alignItems:"center",gap:"4px"},children:[e.jsxs(R,{position:"relative",minHeight:14,minWidth:14,display:"flex",alignItems:"center",justifyContent:"center",children:[e.jsx(R,{position:"absolute",width:"100%",height:"100%",borderRadius:"50%",bgcolor:Le[a],style:{opacity:.15}}),e.jsx(R,{position:"absolute",width:"55%",height:"55%",borderRadius:"50%",bgcolor:Le[a]})]}),e.jsx(G,{color:"inherit",sx:{fontSize:12},children:s?l:i})]})})}J.propTypes={config:d.object.isRequired,enableTooltip:d.bool,showTitle:d.bool,children:d.node};J.defaultProps={enableTooltip:!0,showTitle:!1,children:null};le.propTypes={list:d.array.isRequired,label:d.string.isRequired,onDelete:d.func};le.defaultProps={onDelete:()=>{}};function le({list:t,label:n,onDelete:s}){const{t:i,locale:a}=X();return e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsxs(G,{children:[n,": "]}),t.map(l=>{const p=pt(i,a,{status:l});return e.jsx(Fe,{size:"small",label:e.jsx(R,{display:"flex",alignItems:"center",sx:{gap:"4px"},children:e.jsx(J,{config:p,enableTooltip:!1,children:p.title})}),onDelete:f=>s(f,l)},l)})]})}He.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 He({filterList:t,onChange:n,index:s,column:i,filterValues:a,label:l,renderLabel:p}){return e.jsxs(_e,{className:"filter-container",children:[e.jsx(et,{component:"legend",children:l}),e.jsx(Te,{row:!0,children:a.map(f=>e.jsx(Ie,{control:e.jsx(De,{checked:t[s].indexOf(f.value??f)>-1,onChange:y=>{const S=[...t];y.target.checked?S[s]=[...S[s],f.value??f]:S[s]=S[s].filter(T=>T!==(f.value??f)),n(S[s],s,i)},name:f.value??f}),label:e.jsx("span",{style:{display:"flex",alignItems:"center"},children:p(f)})},f.value??f))})]})}function Re(t){return e.jsx(He,{...t,renderLabel:n=>e.jsx(J,{enableTooltip:!1,config:{status:n.status},children:n.label})})}oe.propTypes={status:d.number.isRequired,updatedAt:d.string.isRequired,reason:d.string,channel:d.string,onResend:d.func};function oe({status:t,updatedAt:n,reason:s="",channel:i="wallet",onResend:a}){const{t:l,locale:p}=X(),f=pt(l,p,{status:t,updatedAt:n,reason:s,channel:i});return e.jsxs(R,{display:"flex",alignItems:"center",gap:1,children:[e.jsx(J,{config:f,showTitle:!0}),f.status!=="success"&&e.jsx(ye,{className:"resend-btn",size:"small",startIcon:e.jsx(We,{}),sx:{fontSize:12,color:"rgba(0, 0, 0, 0.87)",fontWeight:400,".MuiButton-startIcon":{mr:"2px"}},onClick:a,children:l("notification.resend")})]})}Ue.propTypes={value:d.array.isRequired,onChange:d.func};function Ue({value:t,onChange:n}){const{locale:s}=X(),i=H().toDate(),[a,l]=b.useState(null),p=b.useCallback(S=>{l(a?null:S.currentTarget)},[a]),f=!!a,y=b.useCallback(S=>{if(!S.startDate||!S.endDate){V.error("Please select a date range");return}if(H(S.startDate).isAfter(S.endDate)||!H(S.startDate).isValid()||!H(S.endDate).isValid()){V.error("Invalid date range");return}n([S.startDate,S.endDate]),l(null)},[n]);return e.jsxs("div",{children:[e.jsx(G,{component:"div",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:0,children:e.jsxs(ye,{onClick:p,variant:"outlined",size:"small",color:"inherit",children:[Qe(t[0],s)," - ",Qe(t[1],s)]})}),e.jsx(Ee,{open:f,anchorEl:a,onClose:()=>{l(null)},anchorOrigin:{vertical:"bottom",horizontal:"left"},children:e.jsx(kt,{open:!0,maxDate:i,initialDateRange:{startDate:t[0],endDate:t[1]},toggle:p,definedRanges:Pt(i),onChange:y})})]})}Ve.propTypes={itemComponent:d.elementType.isRequired};function Ve({itemComponent:t,...n}){var a;const{t:s}=X();return!((a=n==null?void 0:n.filterList)!=null&&a.filter(l=>l.length).length)?null:e.jsxs(R,{display:"flex",gap:1,alignItems:"center",children:[e.jsx("div",{className:"toolbar-filter-title",children:s("notification.filter")}),e.jsx("div",{className:"toolbar-filter-content",children:e.jsx(wt.TableFilterList,{...n,ItemComponent:t})})]})}function Se({label:t,onDelete:n,canDelete:s=()=>!0,...i}){const a=n&&typeof n=="function"?n:void 0;let l=!0;return s&&typeof s=="function"&&(l=s({label:t,...i})),e.jsx(Fe,{label:t,variant:"outlined",...a&&l?{onDelete:a}:{}})}Se.propTypes={label:d.string.isRequired,onDelete:d.func,canDelete:d.func};Se.defaultProps={canDelete:()=>!0};const sn=[{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}];Ge.propTypes={loading:d.bool,onCancel:d.func,onConfirm:d.func};Ge.defaultProps={loading:!1,onCancel:()=>{},onConfirm:()=>{}};function Ge({loading:t=!1,onCancel:n,onConfirm:s}){const{t:i}=X(),[a,l]=b.useState(sn),[p,f]=b.useState(!0),y=(T,N)=>{N.checked=T.target.checked;const A=a.map(P=>({...P,checked:P.value===N.value?N.checked:P.checked}));l(A)},S=T=>{T.stopPropagation(),s({channels:a.filter(N=>N.checked).map(N=>N.value),isResendFailedOnly:p})};return e.jsxs(R,{className:"resend-config",sx:{padding:"16px 24px"},children:[e.jsx(G,{variant:"body1",component:"div",className:"check-title",sx:{fontWeight:700,mb:1},children:i("notification.config")}),e.jsx(R,{className:"choose-channel",children:e.jsxs(_e,{component:"fieldset",variant:"standard",children:[e.jsx(et,{component:"legend",children:i("notification.selectChannels")}),e.jsx(Te,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap",gap:1},children:a.map(T=>e.jsx(Ie,{control:e.jsx(De,{checked:T.checked,onChange:N=>y(N,T),name:T.value}),label:T.label},T.value))})]})}),e.jsx(R,{className:"resend-config-footer",children:e.jsx(Te,{children:e.jsx(Ie,{control:e.jsx(De,{checked:p,onChange:T=>f(T.target.checked)}),label:i("notification.resendFailedOnly")})})}),e.jsxs(R,{display:"flex",justifyContent:"flex-end",gap:1,className:"resend-config-footer-tip",children:[e.jsx(ye,{onClick:T=>{T.stopPropagation(),n()},color:"inherit",children:i("common.cancel")}),e.jsxs(ye,{onClick:S,color:"primary",disabled:t,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[t&&e.jsx(tt,{size:16}),i("common.confirm")]})]})]})}gt.propTypes={notificationId:d.string.isRequired,handleResend:d.func,resending:d.bool};function gt({notificationId:t,handleResend:n,resending:s=!1}){const{t:i,locale:a}=X(),{getReceivers:l,inService:p,teamDid:f,getUser:y,blocklet:S}=Me(),[T,N]=b.useState(!1),[A,P]=b.useState([]),O=Oe({anchorEl:null,position:null}),F=Oe({anchorEl:null,position:null}),[I,U]=b.useState(null),[j,v]=b.useState({total:0,pageSize:10,pageCount:0,page:1}),[x,w]=b.useState({searchText:"",page:1,pageSize:10,walletSendStatus:[],pushKitSendStatus:[],emailSendStatus:[],dateRange:[H().subtract(1,"month").startOf("day").toDate(),H().endOf("day").toDate()]}),[M,B]=b.useState([]),K=[{label:i("notification.sendStatus.pending"),value:0,status:"pending"},{label:i("notification.sendStatus.success"),value:1,status:"success"},{label:i("notification.sendStatus.failed"),value:2,status:"failed"}],_=async()=>{if(!T&&t)try{N(!0);const o=await l({notificationId:t,...x}),r=o.list.map(c=>({...c,receiverUser:{...c.receiverUser,avatar:ot(c.receiverUser.avatar,f,p)}}));P(r),v(o.paging),N(!1)}catch(o){V.error(o.message),N(!1)}};b.useEffect(()=>{_()},[x]);const Q=o=>{o.stopPropagation();const r=o.currentTarget;F.anchorEl=r;const c=r.getBoundingClientRect();F.position={top:c.top+window.scrollY,left:c.left+window.scrollX}},ee=o=>o.data.length?e.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px"},children:e.jsx(Ae,{className:"resend-btn",size:"small",color:"primary",variant:"contained",startIcon:e.jsx(We,{}),sx:{".MuiButton-startIcon":{mr:"2px"}},onClick:Q,children:i("notification.resend")})}):null,Ne={sort:!1,download:!1,print:!1,selectableRows:"multiple",searchPlaceholder:i("common.search"),searchAlwaysOpen:!1,filterType:"checkbox",searchDebounceTime:300,page:j.page-1,rowsPerPage:j.pageSize,count:j.total,searchText:x.searchText,tableBodyMaxHeight:"calc(80vh - 260px)",rowsSelected:M,onRowSelectionChange:(o,r)=>{B(r.map(c=>c.dataIndex))},customToolbarSelect:ee},we=({page:o,rowsPerPage:r,searchText:c,filterList:C})=>{const[,k=[],$=[],q=[]]=C;x.pageSize!==r?w(W=>({...W,pageSize:r,page:1})):x.page!==o+1?w(W=>({...W,page:o+1})):x.searchText!==c?w(W=>({...W,searchText:c,page:1})):re(k,x.walletSendStatus)?re($,x.pushKitSendStatus)?re(q,x.emailSendStatus)||w(W=>({...W,emailSendStatus:q,page:1})):w(W=>({...W,pushKitSendStatus:$,page:1})):w(W=>({...W,walletSendStatus:k,page:1}))},me=b.useCallback(async(o,r)=>{if(!r)return!1;const c=await y(r);return c?o==="wallet"?Qt(c):o==="email"?Xt(S,c):o==="pushKit"?Jt(S,c):o==="webhook"?Zt(c):!0:!1},[y,S]),h=b.useCallback(o=>en(i,o),[i]),u=()=>{O.anchorEl=null,O.position=null,U(null)},m=()=>{F.anchorEl=null,F.position=null},g=async(o,r,c=!0,C="")=>{if(!(!r.length||!o.length))try{n(o,r,c,C),F.anchorEl||(await ge(.5),u())}catch(k){console.error("handleResend error",{error:k})}},D=async({channels:o,isResendFailedOnly:r})=>{const c=M.map(C=>A[C].receiver);await g(o,c,r),await ge(.5),m(),B([])},E=async(o,r=[],c=!0)=>{try{await g(["webhook"],[o.receiver],c,r)}catch(C){V.error(C.response?C.response.statusText:C.message)}},z=async(o,r,c,C=[],k=!0)=>{if(o.stopPropagation(),tn(r,c)>=4){V.warning(i("notification.resendLimit"));return}if(!ke.includes(c)){await E(r,C,k);return}if(o){const q=o.currentTarget,W=q.getBoundingClientRect();O.anchorEl=q,O.position={top:W.top+window.scrollY,left:W.left+window.scrollX}}U({channel:c});try{const q=await me(c,r.receiver);await ge(1),U({channel:c,result:q}),(typeof q=="boolean"&&q||Ct(q)&&Object.values(q).every(W=>!!W))&&(await n([c],[r.receiver],k),F.anchorEl||(await ge(.5),u()))}catch(q){V.error(q.message)}},Y=o=>{w(r=>({...r,dateRange:o,page:1}))},te=(o,r,c,C)=>{o.stopPropagation();const k=c.filter($=>$!==r);w($=>({...$,[C]:k,page:1}))},ie=pe(()=>[{label:i("notification.receiver"),name:"receiver",width:200,options:{filter:!1,customBodyRenderLite:o=>{const{receiverUser:r,receiver:c}=A[o];return r?e.jsxs(R,{"data-cy":`member-name-${r.fullName}`,display:"flex",alignItems:"center",gap:1,justifyContent:"flex-start",children:[e.jsx(st,{src:`${r.avatar}?imageFilter=resize&w=48&h=48`,size:32,did:c,shape:"circle",style:{borderRadius:"100%",overflow:"hidden"}}),e.jsx(ue,{children:r.fullName})]},c):e.jsx(Lt,{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:x.walletSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Wallet",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[1].options.filterList,"walletSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Wallet",filterList:o,onChange:r,index:c,column:C,filterValues:K})},customBodyRenderLite:o=>{const{walletSendStatus:r,walletSendAt:c,walletSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"wallet",onResend:k=>z(k,A[o],"wallet",[],!1)})}}},{label:"Push Kit",name:"pushKitSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{pushKitSendStatus:r,pushKitSendAt:c,pushKitSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"pushkit",onResend:k=>z(k,A[o],"pushKit",[],!1)})},filter:!0,filterType:"custom",filterList:x.pushKitSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Push Kit",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[2].options.filterList,"pushKitSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Push Kit",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Email",name:"emailSendStatus",width:200,options:{setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{emailSendStatus:r,emailSendAt:c,emailSendFailedReason:C}=A[o];return e.jsx(oe,{status:r,updatedAt:c,reason:C,channel:"email",onResend:k=>z(k,A[o],"email",[],!1)})},filter:!0,filterType:"custom",filterList:x.emailSendStatus??[],customFilterListOptions:{render:o=>e.jsx(le,{list:o,label:"Email",onDelete:(r,c)=>{r.stopPropagation(),te(r,c,ie[3].options.filterList,"emailSendStatus")}}),update:je},filterOptions:{names:K,fullWidth:!0,logic:ve,display:(o,r,c,C)=>e.jsx(Re,{label:"Email",filterList:o,onChange:r,index:c,column:C,filterValues:K})}}},{label:"Webhook",name:"webhook",width:200,options:{filter:!1,setCellProps:()=>({className:"sent-status-cell"}),customBodyRenderLite:o=>{const{webhook:r}=A[o];if(!r)return null;const c=Object.entries(r)[0];if(!c)return null;const[C,k]=c,$=k[0];return e.jsx(R,{display:"flex",flexDirection:"column",gap:1,children:e.jsxs(R,{className:"webhook-item",fontSize:12,children:[e.jsx(ue,{maxLength:30,children:C},C),e.jsx(oe,{status:$.status,updatedAt:$.sendAt,reason:$.failedReason,channel:"webhook",onResend:q=>z(q,A[o],"webhook",[C],!1)})]},C)})}}},{label:i("common.createdAt"),name:"createdAt",width:100,options:{filter:!1,customBodyRenderLite:o=>{const{createdAt:r}=A[o];return e.jsx(ze,{value:r,locale:a,shouldUpdate:!0})}}}],[A,a,x,i]),he=[e.jsx(Ue,{value:x.dateRange,onChange:Y},"date-picker"),e.jsx(Ae,{variant:"contained",size:"small",color:"primary",loading:T,startIcon:e.jsx(ut,{}),onClick:()=>_(),sx:{".MuiButton-startIcon":{mr:"2px"}},style:{marginLeft:8},children:i("common.refresh")},"refresh")];return e.jsx(R,{sx:{overflow:"auto",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px",whiteSpace:"nowrap"}},children:e.jsx(on,{children:e.jsxs(nt,{theme:ht(),children:[e.jsx(at,{className:"receivers-table",locale:a,loading:T,columns:ie,data:A,onChange:we,options:Ne,customButtons:he,components:{TableFilterList:o=>e.jsx(Ve,{...o,itemComponent:r=>e.jsx(Se,{...r,canDelete:()=>!1})})}}),O.anchorEl&&e.jsx(Ee,{open:!!O.anchorEl,anchorReference:"anchorPosition",anchorPosition:O.position,onClose:u,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsxs(rn,{children:[e.jsxs(G,{variant:"body1",component:"div",className:"check-title",children:[I==null?void 0:I.channel," Checking"]}),e.jsx(R,{display:"flex",flexDirection:"column",sx:{gap:"4px"},children:h(I==null?void 0:I.channel).map(o=>{var k,$;const{type:r,pass:c,fail:C}=o;return!(I!=null&&I.result)||(k=I==null?void 0:I.result)!=null&&k[r]?e.jsxs(G,{variant:"body1",component:"div",className:"check-item",display:"flex",alignItems:"center",sx:{gap:"4px",color:($=I==null?void 0:I.result)!=null&&$[r]?be.success.main:"inherit"},children:[I!=null&&I.result?e.jsx(ct,{}):e.jsx(tt,{size:12,sx:{color:be.primary.main}}),e.jsx("span",{children:c})]},r):e.jsxs(G,{variant:"body1",component:"div",display:"flex",alignItems:"center",className:"check-item",sx:{gap:"4px",color:be.error.main},children:[e.jsx(dt,{}),e.jsx("span",{children:C})]},r)})})]})}),F.anchorEl&&e.jsx(Ee,{open:!!F.anchorEl,anchorReference:"anchorPosition",anchorPosition:F.position,onClose:m,anchorOrigin:{vertical:"center",horizontal:"right"},transformOrigin:{vertical:"center",horizontal:"left"},children:e.jsx(Ge,{loading:s,onCancel:m,onConfirm:D})})]})})})}const an=b.memo(gt),on=ae.div`
|
|
2
2
|
td.MuiTableCell-footer {
|
|
3
3
|
border: none !important;
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lottie-react.esm-CPHH620R.js","assets/vendor-react-DoD83n6N.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{j as a,a3 as m,bd as y,T as V,M as N,bw as L,bk as _,bx as U,c0 as j,x as v,a9 as D,aa as w,cM as J,dh as W,di as q,I as H,dj as X,e as K,bR as Y}from"./vendor-mui-core-BGkzVIkr.js";import{r as u}from"./vendor-react-DoD83n6N.js";import{G as Q,a as M,e as Z,i as a0,b as i0}from"./vendor-hooks-B7GuuzU5.js";import{T as r0,bg as x0}from"./vendor-ux-did-connect-
|
|
2
|
+
import{j as a,a3 as m,bd as y,T as V,M as N,bw as L,bk as _,bx as U,c0 as j,x as v,a9 as D,aa as w,cM as J,dh as W,di as q,I as H,dj as X,e as K,bR as Y}from"./vendor-mui-core-BGkzVIkr.js";import{r as u}from"./vendor-react-DoD83n6N.js";import{G as Q,a as M,e as Z,i as a0,b as i0}from"./vendor-hooks-B7GuuzU5.js";import{T as r0,bg as x0}from"./vendor-ux-did-connect-BzpeuxHd.js";import{_ as t0}from"./vendor-arcblock-DAGgKol-.js";import{aF as k0}from"./vendor-utils-DDG_VdF0.js";import{getAIKitComponent as s0}from"./index-CoKtbLLl.js";import"./lottie-web-B6s7dDoL.js";import"./index-NOMtolNQ.js";import"./index-CXwy6oRm.js";import"./index-tUQxVYYQ.js";const O=u.createContext({}),I=()=>u.useContext(O);function m0({children:i,restrictions:n,i18n:s,theme:r}){const[e,h]=Q({loading:!1}),l=x=>h(f=>({...f,loading:x})),c=u.useMemo(()=>({...e,onLoading:l,restrictions:n,i18n:s}),[e]);return a.jsx(r0,{theme:r,children:a.jsx(O.Provider,{value:c,children:i})})}const e0=["1024x1024","1024x1792","1792x1024"],o0=["256x256","512x512","1024x1024"],n0=[{label:"DALL·E 3",value:"dall-e-3"},{label:"DALL·E 2",value:"dall-e-2"}];function l0({onSubmit:i}){const{loading:n,i18n:s}=I(),r=M({model:"dall-e-3",prompt:"",size:"1024x1024",number:1}),e=()=>{const x=JSON.parse(JSON.stringify(r));Object.values(r).every(G=>!!G)&&i(x)},{run:h}=Z(e,{wait:500}),l={width:"100%",pl:"12px",pr:"16px"},c=r.model==="dall-e-2"?o0:e0;return a.jsxs(p0,{onSubmit:x=>x.preventDefault(),children:[a.jsx(m,{sx:{flex:1,overflowY:"auto",overflowX:"hidden",m:2,mb:0},children:a.jsxs(y,{container:!0,gap:2.5,children:[a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:s("aiImagePrompt")}),a.jsx(N,{sx:{width:1,mt:1},size:"small",type:"text",required:!0,placeholder:s("aiImagePromptTip"),multiline:!0,minRows:5,maxRows:6,value:r.prompt??"",onChange:x=>{x.stopPropagation(),r.prompt=x.target.value},inputProps:{maxLength:1e3}})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageModel")}`}),a.jsx(L,{row:!0,sx:{".MuiFormControlLabel-label":{fontSize:"12px"}},value:r.model,onChange:x=>{r.number=1,r.size="1024x1024",r.model=x.target.value},children:n0.map(x=>a.jsx(_,{value:x.value,control:a.jsx(U,{size:"small"}),label:x.label},x.label))})]}),a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageSize")}: ${r.size}`}),a.jsx(y,{container:!0,sx:{gap:2.5,pt:1},children:a.jsx(m,{flex:1,children:a.jsx(m,{...l,children:a.jsx(j,{size:"small",min:0,max:c.length-1,step:1,value:c.findIndex(x=>x==r.size),onChange:(x,f)=>{r.size=c[f]}})})})})]}),r.model==="dall-e-2"&&a.jsxs(y,{item:!0,xs:12,children:[a.jsx(V,{gutterBottom:!0,className:"title label",children:`${s("aiImageNumber")}: ${r.number}`}),a.jsx(m,{...l,children:a.jsx(j,{size:"small",defaultValue:1,valueLabelDisplay:"auto",step:1,min:1,max:10,value:r.number,onChange:(x,f)=>{x.stopPropagation(),r.number=Number(f)}})})]})]})}),a.jsx(v,{sx:{m:2,transition:"all 0.3s"},className:"submit-ai",variant:"contained",onClick:h,disabled:n,children:s(n?"aiImageGenerating":"aiImageGenerate")},n?"loading-submit":"submit")]})}const p0=D(m)`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
height: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,T as i}from"./vendor-mui-core-BGkzVIkr.js";import{W as p,af as x}from"./vendor-utils-DDG_VdF0.js";import{s as c}from"./vendor-ux-did-connect-
|
|
1
|
+
import{j as r,T as i}from"./vendor-mui-core-BGkzVIkr.js";import{W as p,af as x}from"./vendor-utils-DDG_VdF0.js";import{s as c}from"./vendor-ux-did-connect-BzpeuxHd.js";function h({name:t,nameFormatter:a=o=>typeof o=="string"?o.split(" ").map(m=>p(x(m))).join(" "):o,layout:n="horizontal",children:e,valueComponent:l="div",nameWidth:s=90,...f}){return r.jsxs(u,{layout:n,width:s,...f,children:[r.jsx(i,{color:"textSecondary",className:"info-row__name",children:a(t)}),e&&r.jsx(i,{color:"textPrimary",component:l,className:"info-row__value",children:e})]})}const u=c("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: ${t=>t.layout==="vertical"?"column":"row"};
|
|
4
4
|
justify-content: flex-start;
|