@abtnode/blocklet-services 1.16.43-beta-20250507-124320-c405ab23 → 1.16.43-beta-20250508-132430-79f0da2d
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/emails/_components/activity.js +31 -0
- package/api/emails/_components/content.js +3 -2
- package/api/emails/_templates/activity-notification.js +23 -0
- package/api/libs/email.js +50 -14
- package/api/services/auth/session.js +23 -4
- package/dist/assets/{AdapterDayjs-QizZbjYO.js → AdapterDayjs-DdJ4VT-y.js} +1 -1
- package/dist/assets/{ArrowDropDown-CDVfAOPe.js → ArrowDropDown-eLxSrK0e.js} +1 -1
- package/dist/assets/{CheckCircle-CJmQq3zs.js → CheckCircle-DxRgzKvx.js} +1 -1
- package/dist/assets/{ChevronLeft-BWWdEYiT.js → ChevronLeft-B15pinY6.js} +1 -1
- package/dist/assets/{ChevronRight-tpAiXojW.js → ChevronRight-B2sjje0T.js} +1 -1
- package/dist/assets/{Community-CGFOsRKB.js → Community-HWgwjOzD.js} +1 -1
- package/dist/assets/{DeleteOutline-DqdSj9ec.js → DeleteOutline-DYyAnzFX.js} +1 -1
- package/dist/assets/{Done-DtZ1RTXT.js → Done-CiSqPhhR.js} +1 -1
- package/dist/assets/{Download-CC6n4Puh.js → Download-Zxb7WMKn.js} +1 -1
- package/dist/assets/{Edit-CJyJLpRB.js → Edit-RoUmIPTL.js} +1 -1
- package/dist/assets/{EditIcon-KKx_adUe.js → EditIcon-_JnvyTnF.js} +1 -1
- package/dist/assets/{Email-CXOl4bM_.js → Email-22EBBQEA.js} +1 -1
- package/dist/assets/{Error-BfFrp5Y1.js → Error-C782OBuj.js} +1 -1
- package/dist/assets/{ExpandLess-Ddif_UHH.js → ExpandLess-CJztBroj.js} +1 -1
- package/dist/assets/{Google-DMO1DD8q.js → Google-DwaWO1n0.js} +1 -1
- package/dist/assets/{Holiday-B4FuMZHi.js → Holiday-Lj9LTNQ5.js} +1 -1
- package/dist/assets/{InfoOutlined-CoMCPk7a.js → InfoOutlined-BCqZENBx.js} +1 -1
- package/dist/assets/{Launch-DNHBfbtb.js → Launch-BbLsJvEN.js} +1 -1
- package/dist/assets/{LaunchOutlined-CypNgDc2.js → LaunchOutlined-BdTDYYqz.js} +1 -1
- package/dist/assets/{Location-afhZgOLn.js → Location-R9yMI3QX.js} +1 -1
- package/dist/assets/{LockIcon-BlopdQoN.js → LockIcon-DEqu2BZe.js} +1 -1
- package/dist/assets/{Meeting-Ct6JoGYc.js → Meeting-CYNfXiDR.js} +1 -1
- package/dist/assets/{MoreHoriz-D6Wvugul.js → MoreHoriz-Bp9phGCA.js} +1 -1
- package/dist/assets/{OffSick-CT2gezXK.js → OffSick-BWarRVS4.js} +1 -1
- package/dist/assets/{Phone-alkdVkQC.js → Phone-Df90pdBA.js} +1 -1
- package/dist/assets/{PlayArrow-gSxq4eiM.js → PlayArrow-qTn22j6x.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-DK54eXUx.js → QuestionMarkCircle-DV5837_n.js} +1 -1
- package/dist/assets/{ServerLogo-b4GZ-IpN.js → ServerLogo-7OspbhQZ.js} +1 -1
- package/dist/assets/{Timezone-6KelONy7.js → Timezone-BfjUkoy7.js} +1 -1
- package/dist/assets/{TuneOutlined-D2mm0fk8.js → TuneOutlined-BkH0zJXZ.js} +1 -1
- package/dist/assets/{ViewList-wWyYUeZC.js → ViewList-BBNBkCo1.js} +1 -1
- package/dist/assets/{WorkingRemotely-qYwywlWG.js → WorkingRemotely-C3lk6KRk.js} +1 -1
- package/dist/assets/access-control-DVj3Uudk.js +14 -0
- package/dist/assets/{actions-CHh4ckCh.js → actions-CcV0Tb1p.js} +1 -1
- package/dist/assets/{add-component-core-BxQ8IvTn.js → add-component-core-BxVPX1qJ.js} +13 -13
- package/dist/assets/{add-resource-CyKCNshd.js → add-resource-CR93luK2.js} +1 -1
- package/dist/assets/{addon-CxsW-e44.js → addon-igarTbiO.js} +1 -1
- package/dist/assets/advanced-C22Mc4mt.js +14 -0
- package/dist/assets/api-DPHyou8y.js +1 -0
- package/dist/assets/{appearance-jvoZTz94.js → appearance-CuEL_wAd.js} +1 -1
- package/dist/assets/{audit-logs-Bw0__Kyr.js → audit-logs-DXfN0Akp.js} +2 -2
- package/dist/assets/{authorize-BROUnOQh.js → authorize-DyX7LBCN.js} +1 -1
- package/dist/assets/{base32-M2-tdl6O.js → base32-sa8QWx2s.js} +1 -1
- package/dist/assets/{branding-DFP3MWL7.js → branding-B8w6MlXP.js} +2 -2
- package/dist/assets/{branding-DEzRXw2N.js → branding-CVWmoAus.js} +1 -1
- package/dist/assets/bundle-avatar-DJNl27pn.js +1 -0
- package/dist/assets/button-D0USBc4l.js +1 -0
- package/dist/assets/{click-to-copy-BxPDzy5A.js → click-to-copy-Dhxc_blG.js} +1 -1
- package/dist/assets/cloneDeep-DBPWtvi_.js +1 -0
- package/dist/assets/{complete-BoUxpUyG.js → complete-jXf2IsN1.js} +3 -3
- package/dist/assets/{component-C0TbBOxr.js → component-DFHLfmfe.js} +1 -1
- package/dist/assets/{config-quCUUlRH.js → config-DIa982AP.js} +1 -1
- package/dist/assets/{config-cqUeiJ9T.js → config-E-Dkdpbo.js} +2 -2
- package/dist/assets/{config-navigation-BE8cOsAr.js → config-navigation-BbbAAFTA.js} +3 -3
- package/dist/assets/config-space-B3L4cc62.js +1 -0
- package/dist/assets/confirm-CHZbNj0g.js +7 -0
- package/dist/assets/connect-60F826H5.js +1 -0
- package/dist/assets/connect-to-Do1R8dL3.js +1 -0
- package/dist/assets/connect-xMiXau0y.js +5 -0
- package/dist/assets/{content-layout-qHJyxPYq.js → content-layout-clTZd0qL.js} +1 -1
- package/dist/assets/dashboard-BjhEdRo6.js +280 -0
- package/dist/assets/{delete-confirm-D1Xe3pLh.js → delete-confirm-D-jVITSf.js} +1 -1
- package/dist/assets/did-address-anPrguG7.js +1 -0
- package/dist/assets/domain-CYWI_G__.js +9 -0
- package/dist/assets/{domain-action-card-CkNEkjHm.js → domain-action-card-CDfoYMjV.js} +2 -2
- package/dist/assets/domains-D-YYFzTK.js +1 -0
- package/dist/assets/dot-Bc3KtmUA.js +7 -0
- package/dist/assets/{email-D4hA0NBb.js → email-CQL_CvUV.js} +2 -2
- package/dist/assets/{empty-spinner-Bx6dYuKk.js → empty-spinner-Bm-LVesB.js} +1 -1
- package/dist/assets/exchange-passport-nsHr64lM.js +1 -0
- package/dist/assets/{fuel-DLt1un1y.js → fuel-BEbwZqYG.js} +1 -1
- package/dist/assets/{gen-access-key-B3TK0S95.js → gen-access-key-DsEy5ZlI.js} +1 -1
- package/dist/assets/get-safe-url-CH0a4wzx.js +1 -0
- package/dist/assets/get-safe-url-Cn647BYQ.js +1 -0
- package/dist/assets/{home-CM-H3jsN.js → home-DUvgZ0gR.js} +1 -1
- package/dist/assets/iframe-D7qMCC0L.js +1 -0
- package/dist/assets/{index--MMFwLMX.js → index-0ncGiO4u.js} +1 -1
- package/dist/assets/{index-Cv_RcwHF.js → index-B1yanBlZ.js} +1 -1
- package/dist/assets/{index-Dz5GK-zs.js → index-B6vKQTr4.js} +1 -1
- package/dist/assets/{index-hOO84dse.js → index-BJfBmMvG.js} +1 -1
- package/dist/assets/{index-B9ltKwuq.js → index-BUwaZJ5Y.js} +32 -32
- package/dist/assets/{index-CYBG7pwa.js → index-BmpX2Oqa.js} +2 -2
- package/dist/assets/{index-ChWzsQ7e.js → index-Bpz-SuLt.js} +4 -4
- package/dist/assets/{index-DisBCigl.js → index-CYz41Upz.js} +1 -1
- package/dist/assets/{index-b5IHPDP2.js → index-CZqp_6Zr.js} +14 -14
- package/dist/assets/{index-DODYa3Im.js → index-CiWjpC34.js} +1 -1
- package/dist/assets/index-Ctbrsvlm.js +113 -0
- package/dist/assets/{index-guZXH6v0.js → index-DBajhv2h.js} +18 -18
- package/dist/assets/{index-DF637rKa.js → index-DFkZuM1_.js} +1 -1
- package/dist/assets/{index-DHkSP6Is.js → index-DQncaTCr.js} +9 -9
- package/dist/assets/index-DZ9Jqm_w.js +141 -0
- package/dist/assets/index-DiZbt9Ww.js +161 -0
- package/dist/assets/{index-3mcmABlM.js → index-DyU89GO9.js} +1 -1
- package/dist/assets/index-OVTGvi9j.js +55 -0
- package/dist/assets/index-Pu5My3eU.js +1 -0
- package/dist/assets/{index-MN19wC90.js → index-egCz4jdE.js} +1 -1
- package/dist/assets/{index-D7lbThr3.js → index-hgktawrH.js} +7 -7
- package/dist/assets/{index-DzlQfRxQ.js → index-iTlCZ1FK.js} +2 -2
- package/dist/assets/index-pvu3nbgn.js +10 -0
- package/dist/assets/{index-DY3sJM14.js → index-w68bai-3.js} +1 -1
- package/dist/assets/{invitation-V9dvI_l-.js → invitation-DqKIvv6t.js} +4 -4
- package/dist/assets/invite-uMWH0SpB.js +1 -0
- package/dist/assets/{issue-passport-DHlsRvAU.js → issue-passport-BurnsPQZ.js} +1 -1
- package/dist/assets/item-C69diC1y.js +2 -0
- package/dist/assets/landing-page-CUkHfAZ5.js +1 -0
- package/dist/assets/{launch-result-message-DucKBLPI.js → launch-result-message-CiDoyZ_1.js} +1 -1
- package/dist/assets/{layout-D5xp7LhQ.js → layout-CLOmXrMq.js} +1 -1
- package/dist/assets/list-D69IwVXI.js +236 -0
- package/dist/assets/{list-header-jygAFPJa.js → list-header-D9r1Z68x.js} +1 -1
- package/dist/assets/localization-CAh5vCty.js +1 -0
- package/dist/assets/{log-CXoK__fA.js → log-CskQJ4o-.js} +1 -1
- package/dist/assets/{logger-hgBwjvHi.js → logger-D6jfI5U_.js} +1 -1
- package/dist/assets/login-DWvvPy3b.js +1 -0
- package/dist/assets/{login-oauth-callback-BdgRJj-p.js → login-oauth-callback-gLyMSemT.js} +1 -1
- package/dist/assets/{logo-uploader-50bLEHwJ.js → logo-uploader-D5rcqbIA.js} +3 -3
- package/dist/assets/{lost-passport-BKKp14el.js → lost-passport-BWY_TJIl.js} +2 -2
- package/dist/assets/omit-CM6MPIu5.js +1 -0
- package/dist/assets/{open-window-D__BoNEX.js → open-window-DKiwPBLK.js} +1 -1
- package/dist/assets/{overview-CrfEBdKU.js → overview-DedgPJyh.js} +2 -2
- package/dist/assets/{page-header-Kn6r_XKH.js → page-header-D7vhn9dN.js} +1 -1
- package/dist/assets/{passport-item-B_2v7D20.js → passport-item-B45OGe4c.js} +1 -1
- package/dist/assets/payment-kit-DYSjmihw.png +0 -0
- package/dist/assets/{permission-CC2IdTdZ.js → permission-6aZ4MNgh.js} +1 -1
- package/dist/assets/preferences-DU_A8Q43.js +1 -0
- package/dist/assets/profile-embed-B8hvxRm0.js +1 -0
- package/dist/assets/publish-resource-riTnsr3y.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-djvJS7-9.js → react-beautiful-dnd.esm-DPnGSgvn.js} +1 -1
- package/dist/assets/relative-time-CKENJIpb.js +1 -0
- package/dist/assets/{runtime-C6Oj0Mr3.js → runtime-Dfcxeun4.js} +1 -1
- package/dist/assets/sdk-DUAPwTSQ.js +1 -0
- package/dist/assets/{security-CqxS0KtD.js → security-zb06EOxl.js} +4 -4
- package/dist/assets/session-Ir9UAnhf.js +1 -0
- package/dist/assets/setup-Pi8eih8l.js +30 -0
- package/dist/assets/{shorten-label-BhyIJhRI.js → shorten-label-DTcisg7Q.js} +1 -1
- package/dist/assets/{simple-select-CF7l1q3Q.js → simple-select-DpNtA3N5.js} +1 -1
- package/dist/assets/{slicedToArray-D2u5vDM0.js → slicedToArray-CM_xB2K2.js} +1 -1
- package/dist/assets/{spaces-U3nGmGRa.js → spaces-DfgQftqB.js} +1 -1
- package/dist/assets/start-CnF5I9iM.js +187 -0
- package/dist/assets/{starting-progress-BhqlnMjX.js → starting-progress-CUkPGiLq.js} +1 -1
- package/dist/assets/{status-C2R9Wncp.js → status-w7wNdwd8.js} +1 -1
- package/dist/assets/{step-actions-DTD9vsMp.js → step-actions-CvAYbv4K.js} +1 -1
- package/dist/assets/{studio-DdhbfCKD.js → studio-mvCiDQFy.js} +1 -1
- package/dist/assets/{switch-control-CvOsxpit.js → switch-control-BP0JyiwP.js} +1 -1
- package/dist/assets/{traffic-BppWD3GK.js → traffic-Bo3Bp96o.js} +1 -1
- package/dist/assets/{transfer-BreEw1xj.js → transfer-DsERsnl1.js} +1 -1
- package/dist/assets/unsubscribe-l6QkVxmr.js +1 -0
- package/dist/assets/use-blocklet-logo-BiDCl8v3.js +2 -0
- package/dist/assets/{use-mobile-DbhbAmWG.js → use-mobile-BleYjZfN.js} +1 -1
- package/dist/assets/{use-mobile-fdqINXKQ.js → use-mobile-BnYZ5d8f.js} +1 -1
- package/dist/assets/useAsync-BTtZas5A.js +1 -0
- package/dist/assets/{useLocalStorage-vveKfojd.js → useLocalStorage-C7usthsI.js} +1 -1
- package/dist/assets/user-center-CSjvhqGU.js +76 -0
- package/dist/assets/{util-D5pnqiqz.js → util-CKfiFLd5.js} +1 -1
- package/dist/assets/{util-BXETl5KI.js → util-CRVGSd5f.js} +1 -1
- package/dist/assets/{vendor-arcblock-TgIfa3ko.js → vendor-arcblock-Bi9JkCAO.js} +88 -88
- package/dist/assets/{vendor-hooks-DXGUREV9.js → vendor-hooks-zv9Oe7Yx.js} +1 -1
- package/dist/assets/{vendor-mui-core-BKQDHvL6.js → vendor-mui-core-FzKVVAue.js} +1 -1
- package/dist/assets/{vendor-mui-x-Db_Ss6fv.js → vendor-mui-x-B9zuOzS0.js} +1 -1
- package/dist/assets/vendor-utils-lR6P1BXz.js +208 -0
- package/dist/assets/vendor-ux-did-connect-CaDmrsW1.js +2296 -0
- package/dist/assets/wrap-locale-BmmKAsYR.js +1 -0
- package/dist/index.html +6 -6
- package/dist/service-worker.js +1 -1
- package/package.json +46 -46
- package/dist/assets/access-control-BIwE_lpL.js +0 -14
- package/dist/assets/advanced-5-3CdUNs.js +0 -14
- package/dist/assets/api-Bf1onQOz.js +0 -1
- package/dist/assets/bundle-avatar-N2eRPvA4.js +0 -1
- package/dist/assets/button-CO4tv2XS.js +0 -1
- package/dist/assets/cloneDeep-WT_kDeVd.js +0 -1
- package/dist/assets/config-space-XXX-dnS8.js +0 -1
- package/dist/assets/confirm-C55dFhba.js +0 -7
- package/dist/assets/connect-CxcQRkKB.js +0 -1
- package/dist/assets/connect-Cyda_keb.js +0 -5
- package/dist/assets/connect-to-gwpYimRA.js +0 -1
- package/dist/assets/dashboard-3gdmABlO.js +0 -280
- package/dist/assets/did-address-CaOBKHpX.js +0 -1
- package/dist/assets/domain-BEDI7va7.js +0 -9
- package/dist/assets/domains-BzOFZDiL.js +0 -1
- package/dist/assets/dot-DqINfNl1.js +0 -7
- package/dist/assets/exchange-passport-DYYQAnfj.js +0 -1
- package/dist/assets/get-safe-url-BBjUrzRU.js +0 -1
- package/dist/assets/get-safe-url-zHRp3aBu.js +0 -1
- package/dist/assets/iframe-BuwO7sH1.js +0 -1
- package/dist/assets/index-BLdu7KNf.js +0 -10
- package/dist/assets/index-BY2ztvNA.js +0 -113
- package/dist/assets/index-BktGjdcJ.js +0 -1
- package/dist/assets/index-C6GiJKvt.js +0 -192
- package/dist/assets/index-Cmwh6ZNi.js +0 -141
- package/dist/assets/index-KH-9aJF9.js +0 -55
- package/dist/assets/invite-DZjAPDTn.js +0 -1
- package/dist/assets/item-ChX1dT7k.js +0 -2
- package/dist/assets/landing-page-xXstO1rJ.js +0 -1
- package/dist/assets/list-BuihU737.js +0 -236
- package/dist/assets/localization-DxZ5mhWl.js +0 -1
- package/dist/assets/login-DggkjNzD.js +0 -1
- package/dist/assets/omit-DNeUY6_X.js +0 -1
- package/dist/assets/preferences-yjK1dIpN.js +0 -1
- package/dist/assets/profile-embed-BwWjXkMu.js +0 -1
- package/dist/assets/publish-resource-qPWRQ9Qg.js +0 -1
- package/dist/assets/relative-time-BTKzBWA6.js +0 -1
- package/dist/assets/sdk-CtDt6ZE4.js +0 -1
- package/dist/assets/session-C3Z84LF2.js +0 -1
- package/dist/assets/setup-B4ffVVKP.js +0 -30
- package/dist/assets/start-Cz_Kd33A.js +0 -187
- package/dist/assets/unsubscribe-CqTo6HGm.js +0 -1
- package/dist/assets/use-blocklet-logo-CWUmcmJR.js +0 -1
- package/dist/assets/useAsync-B8Nbc8so.js +0 -1
- package/dist/assets/useAsync-CLWvmBXN.js +0 -1
- package/dist/assets/user-center-DKy5PNdi.js +0 -76
- package/dist/assets/vendor-utils-CjMBJT5V.js +0 -208
- package/dist/assets/vendor-ux-did-connect-Dr2W2Pc9.js +0 -2296
- package/dist/assets/wrap-locale-DAxfLWy4.js +0 -1
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import{r as p}from"./vendor-react-DEoibe3W.js";import{H as i,j as r,be as K,e as z,ap as ne,aa as h,ah as E,T as P,v as W,X as se,bL as ke,ad as Xe,bM as Ke,ar as Ye,ai as Ze,a9 as Ce,m as Je,bZ as et,y as tt,s as rt,I as nt}from"./vendor-mui-core-BKQDHvL6.js";import{f as D,u as ee,l as st}from"./vendor-hooks-DXGUREV9.js";import{a0 as ie,b5 as oe,b9 as it,u as Re,r as Ie,I as Te,n as ot,bl as at}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import{S as lt}from"./index-DF637rKa.js";import{B as ct}from"./bundle-avatar-N2eRPvA4.js";import{a as dt,g as ae,c as B,s as V,H as ut,u as Se,M as Me,b as G,d as pt,m as ht,i as mt}from"./use-blocklet-logo-CWUmcmJR.js";import{R as $e}from"./relative-time-BTKzBWA6.js";import{A as Y,af as ft,b as _,$ as gt,z as xt}from"./vendor-utils-CjMBJT5V.js";import{u as Pe,p as yt,h as Q,f as ze,w as vt}from"./vendor-arcblock-TgIfa3ko.js";import{b as bt}from"./sdk-CtDt6ZE4.js";import{d as jt}from"./InfoOutlined-CoMCPk7a.js";import{d as wt}from"./CheckCircle-CJmQq3zs.js";import{U as kt,C as Ct,I as Rt}from"./index-BLdu7KNf.js";import{p as It}from"./util-BXETl5KI.js";import{z as Tt}from"./index-B9ltKwuq.js";function le({blocklet:e,style:t,size:s,...n}){const o=dt({blocklet:e,square:!0}),{variant:l}=n;return r.jsx(K,{variant:l||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},t),...n,children:r.jsx("img",{src:o,alt:"",style:{width:s}})})}le.propTypes={blocklet:i.object.isRequired,style:i.object,size:i.oneOfType([i.number,i.string])};le.defaultProps={style:{},size:40};function Ae({attachment:e}){const{data:t}=e,s=z();let n="";try{n=new URL(t.url).host}catch{n=t.url}return r.jsxs(ne,{target:"_blank",rel:"noopener noreferrer",href:t.url,className:"link",style:{wordBreak:"break-all"},onClick:o=>{o.customPreventRedirect=!0},children:[!!n&&r.jsx("span",{className:"url",children:n}),!!t.title&&r.jsx(h,{className:"title",style:{whiteSpace:"unset"},children:t.title}),!!t.description&&r.jsx(h,{className:"description",style:{whiteSpace:"unset",color:s.palette.text.secondary},children:t.description}),!!t.image&&r.jsx("img",{src:Pe.getImagePath(t.image),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})]})}Ae.propTypes={attachment:i.object.isRequired};function Ne({attachment:e}){const{data:t}=e;return r.jsx("img",{src:Pe.getImagePath(t.url),alt:t.title||"",height:128,style:{borderRadius:"8px",maxWidth:"256px",objectFit:"cover"}})}Ne.propTypes={attachment:i.object.isRequired};function Le({attachment:e,...t}){var c;const{data:s}=e,n=((c=s.color)==null?void 0:c.toLowerCase())||t.color,o=s.size||t.size,l=s.fontWeight||t.fontWeight||400;let a="14px";return o==="small"?a="12px":o==="normal"?a="14px":o==="big"?a="16px":o==="large"&&(a="18px"),r.jsx(St,{className:"title",style:{fontSize:a,color:n,whiteSpace:"unset",fontWeight:l},children:s.text})}Le.propTypes={attachment:i.object.isRequired};const St=E.span`
|
|
2
|
-
width: 100%;
|
|
3
|
-
display: -webkit-box;
|
|
4
|
-
-webkit-box-orient: vertical;
|
|
5
|
-
-webkit-line-clamp: 2;
|
|
6
|
-
overflow: hidden;
|
|
7
|
-
text-overflow: ellipsis;
|
|
8
|
-
white-space: normal;
|
|
9
|
-
word-break: break-word;
|
|
10
|
-
`,Mt=e=>{let t="rgba(0, 0, 0, 0.12)";return e==="warning"?t="#DE9E37":e==="error"?t="#F16E6E":t="rgba(0, 0, 0, 0.12)",t},$t=e=>e.every(t=>t.type==="text"),Pt=e=>e.every(t=>t.type==="image"),zt=e=>ft(e,2).map(t=>({type:"combined",items:t})).filter(t=>(t.items||[]).every(s=>{var n,o,l;return(l=(o=(n=s==null?void 0:s.data)==null?void 0:n.text)==null?void 0:o.trim)==null?void 0:l.call(o)})),At=e=>{if(!e.length||e.length<=1)return!1;const t=e[0].type;return e.every(s=>s.type===t)},Nt=async(e,t)=>{const s=bt.user;if(s)try{return await s.getUserPublicInfo({did:e})?await s.getProfileUrl({did:e,locale:t}):void 0}catch(n){console.error(n);return}},Lt=(e,t)=>{var n;const s=(n=t==null?void 0:t.componentMountPoints)==null?void 0:n.find(o=>o.did===e);return s==null?void 0:s.mountPoint},Dt=(e,t)=>{var o,l,a;if(!e)return null;if(((o=e.actions)==null?void 0:o.length)===1)return e.actions[0].link||null;const s=ae(e.activity),n=(s==null?void 0:s.metaLink)||(s==null?void 0:s.targetLink);if(n)return Y(t,n);if(((l=e.attachments)==null?void 0:l.length)===1){const c=e.attachments[0];if(c.type==="link")return((a=c.data)==null?void 0:a.url)||null}return null},te=e=>{const{receivers:t=[]}=e;return t.length?t.every(s=>s.read):!0};function Et(e){const t=e.getBoundingClientRect(),s=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,o=t.height,l=t.width;let a=0;t.top>=0&&t.bottom<=n?a=o:t.top<0&&t.bottom>0&&t.bottom<=n?a=t.bottom:t.top>=0&&t.top<n&&t.bottom>n?a=n-t.top:t.top<0&&t.bottom>n&&(a=n);let c=0;return t.left>=0&&t.right<=s?c=l:t.left<0&&t.right>0&&t.right<=s?c=t.right:t.left>=0&&t.left<s&&t.right>s?c=s-t.left:t.left<0&&t.right>s&&(c=s),a*c/(o*l)>=.5}const _t=e=>{if(!e)return[];const t=[],s=5,n=Array.from(e.querySelectorAll(".notification-row")),o=n.length;for(let l=0;l<o;l+=s){const a=n.slice(l,l+s);let c=!0;for(const u of a){const x=u.id;if(Et(u))t.push(x);else{c=!1;break}}if(!c)break}return t},De=e=>{var s;const t=[];return e&&((s=e.items)!=null&&s.length?e.items.forEach(n=>{te(n)||t.push(n)}):te(e)||t.push(e)),t},Ht=(e,t)=>{let s=[];return t.length&&t.forEach(n=>{const o=e.get(n);o&&(s=s.concat(De(o)))}),s},H=(e,t)=>({...e,...t?{filter:"invert(1)"}:{}});ce.propTypes={locale:i.string,data:i.object.isRequired};ce.defaultProps={locale:"en"};function ce({locale:e="en",data:t}){const s={zh:"来自",en:"from"}[e]||"from",n={zh:"接收",en:"Received"}[e]||"Received",l=`https://${B.getUrlHost(t.chainHost)||B.getChainHost(t.chainId)}/explorer/tokens/${t.address}/tx`,a=z(),c=a.palette.mode==="dark";let u=t.amount;t.decimal&&(u=t.amount/10**t.decimal);const x=D(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return r.jsx("a",{href:l,target:"_blank",rel:"noreferrer",onClick:y=>{y.customPreventRedirect=!0},children:r.jsxs(h,{display:"flex",flexDirection:"column",children:[r.jsxs(h,{sx:x,children:[r.jsx(P,{component:"div",sx:{fontWeight:700,color:a.palette.text.primary},children:n}),r.jsxs(P,{component:"div",align:"right",style:H(V.summaryStyle,c),flex:1,children:["+",u," ",t.symbol]})]}),r.jsxs(h,{sx:x,children:[r.jsx(P,{component:"div",style:H({...V.remarkStyle,fontSize:14},c),children:s}),r.jsx(h,{maxWidth:260,fontSize:14,children:r.jsx(ie,{did:t.address,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]})]})})}de.propTypes={locale:i.string,data:i.object.isRequired};de.defaultProps={locale:"en"};function de({locale:e,data:t}){var y,b;const s={zh:"接收",en:"Received"}[e]||"Received",n={zh:"来自",en:"from"}[e]||"from",o=B.getUrlHost(t.chainHost)||B.getChainHost(t.chainId),l=t.did||((b=(y=t==null?void 0:t.credential)==null?void 0:y.issuer)==null?void 0:b.id)||"",a=`https://${o}/explorer/assets/${l}`,u=z().palette.mode==="dark",x=D(()=>({display:"flex",alignItems:"center",rowGap:2,columnGap:4,justifyContent:"space-between",flexWrap:"wrap"}));return r.jsx(h,{sx:{pr:1},children:r.jsx("a",{href:a,target:"_blank",style:{textDecoration:"none",color:"initial",display:"block"},onClick:j=>{j.customPreventRedirect=!0},rel:"noreferrer",children:r.jsxs(h,{display:"flex",flexDirection:"column",children:[r.jsxs(h,{sx:x,children:[r.jsx(P,{component:"div",sx:{fontWeight:700,color:"text.primary"},children:s}),r.jsx(P,{component:"div",align:"right",style:H(V.summaryStyle,u),children:"+1 Asset"})]}),l?r.jsxs(h,{sx:x,children:[r.jsx(P,{component:"div",style:H({...V.remarkStyle,fontSize:14},u),children:n}),r.jsx(h,{maxWidth:260,fontSize:14,children:r.jsx(ie,{did:l,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:e})})]}):null]})})})}Ee.propTypes={data:i.object.isRequired,locale:i.string};function Ee({data:e,locale:t="en"}){const n=z().palette.mode==="dark";return r.jsxs("a",{href:e.url,target:"_blank",style:{display:"flex",textDecoration:"none",color:"initial"},onClick:o=>{o.customPreventRedirect=!0},rel:"noreferrer",children:[r.jsx("img",{className:"image",src:e.logo,width:50,height:50,alt:""}),r.jsxs("div",{style:{flex:1,marginLeft:"10px"},children:[r.jsx("div",{style:H({marginBottom:"6px"},n),children:e.title}),r.jsx(h,{maxWidth:260,fontSize:10,children:r.jsx(ie,{did:e.appDID,showQrcode:!0,copyable:!0,compact:!0,responsive:!0,locale:t})})]})]})}ue.propTypes={locale:i.string,data:i.object.isRequired};ue.defaultProps={locale:"en"};function ue({locale:e,data:t}){const s=B.getChainHost(t.chainId),n=`https://${s}/explorer/txs/${t.hash}`,o={zh:"交易详情",en:"Transaction Details"}[e]||"Transaction Details",l={zh:"交易哈希",en:"Transaction Hash"}[e]||"Transaction Hash",a=z(),c=a.palette.mode==="dark";return r.jsxs("a",{href:n,target:"_blank",style:H({textDecoration:"none",color:"initial",display:"block",fontSize:14},c),onClick:u=>{u.customPreventRedirect=!0},rel:"noreferrer",children:[r.jsx("h6",{style:{color:a.palette.text.secondary,margin:0},children:s}),r.jsx("p",{style:{color:a.palette.warning.main,margin:0},children:o}),r.jsxs("div",{style:{wordBreak:"break-all"},children:[l,": ",t.hash]})]})}function _e({attachment:e,...t}){const{local:s}=p.useContext(oe),n=W(l=>l.breakpoints.down("md")),o=z();return r.jsxs(qt,{...t,isMd:n,children:[e.type==="link"&&r.jsx(Ae,{attachment:e,...t,isMd:n}),e.type==="image"&&r.jsx(Ne,{attachment:e,isMd:n}),e.type==="text"&&r.jsx(Le,{attachment:e,isMd:n}),e.type==="token"&&r.jsx(ce,{data:e.data,local:s,isMd:n}),e.type==="asset"||e.type==="vc"?r.jsx(de,{data:e.data,local:s,isMd:n}):null,e.type==="dapp"&&r.jsx(Ee,{data:e.data,local:s,isMd:n}),e.type==="transaction"&&r.jsx(ue,{data:e.data,local:s,...t,isMd:n}),e.type==="divider"&&r.jsx(se,{sx:{mb:1,mt:1},style:{color:o.palette.divider}})]})}const qt=E.div`
|
|
11
|
-
display: ${({sx:e={}})=>e.display||"flex"};
|
|
12
|
-
flex-direction: ${({sx:e={}})=>e.flexDirection||"column"};
|
|
13
|
-
gap: ${({sx:e={}})=>e.gap||1};
|
|
14
|
-
width: ${({isMd:e=!1})=>e?"100%":"auto"};
|
|
15
|
-
&:last-child {
|
|
16
|
-
margin-bottom: 0;
|
|
17
|
-
}
|
|
18
|
-
`;_e.propTypes={attachment:i.object.isRequired};function He({data:e,...t}){const{items:s}=e;return r.jsx(Wt,{...t,children:s.map(n=>r.jsxs(ke,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128},children:[r.jsxs(h,{display:"flex",alignItems:"center",gap:1,children:[n.icon?r.jsx("img",{src:n.icon,alt:n.title,style:{width:16,height:16}}):null,r.jsxs(h,{className:"metric-name",display:"flex",alignItems:"center",children:[n.title,n.subtitle?r.jsx(Xe,{title:n.subtitle,arrow:!0,placement:"top",children:r.jsx(jt,{fontSize:"small",sx:{fontSize:14,ml:.5}})}):null]})]}),r.jsxs(h,{className:"metric-number",sx:{color:n.content_color||"rgba(3, 7, 18, 1)"},children:[n.content,n.sub_content?r.jsxs("span",{className:"sub-content",style:{color:n.sub_content_color||"rgba(156, 163, 175, 1)"},children:["(",n.sub_content,")"]}):null]})]},n.title))})}const Wt=E(h)`
|
|
19
|
-
display: flex;
|
|
20
|
-
justify-content: flex-start;
|
|
21
|
-
flex-wrap: wrap;
|
|
22
|
-
gap: 16px;
|
|
23
|
-
.metric-number {
|
|
24
|
-
font-size: 18px;
|
|
25
|
-
font-weight: 600;
|
|
26
|
-
.sub-content {
|
|
27
|
-
font-size: 12px;
|
|
28
|
-
font-weight: 400;
|
|
29
|
-
margin-left: 4px;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.metric-name {
|
|
33
|
-
font-size: 14px;
|
|
34
|
-
color: rgba(156, 163, 175, 1);
|
|
35
|
-
}
|
|
36
|
-
`;He.propTypes={data:i.object.isRequired};function qe({data:e}){const{items:t}=e,s=W(a=>a.breakpoints.down("sm")),n=W(a=>a.breakpoints.down("md")),o=W(a=>a.breakpoints.down("lg")),l=()=>s?1:n?3:o?4:6;return r.jsx(Ke,{variant:"quilted",cols:l(),gap:8,rowHeight:128,sx:{margin:0},children:t.map(a=>{const c=a.cover||a.display;return c?r.jsx("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",children:r.jsx(Ye,{children:r.jsx("img",{src:c,alt:a.title||"",style:{borderRadius:"8px"}})})},c):null})})}qe.propTypes={data:i.object.isRequired};function pe({data:e,feedType:t,...s}){return r.jsxs(Bt,{...s,children:[t==="data-tracker"&&e.type==="table"&&r.jsx(He,{data:e}),(t==="graphic"||t==="gallery")&&r.jsx(qe,{data:e})]})}const Bt=E.div`
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
width: 100%;
|
|
40
|
-
margin-bottom: 4px;
|
|
41
|
-
&:last-child {
|
|
42
|
-
margin-bottom: 0;
|
|
43
|
-
}
|
|
44
|
-
`;pe.propTypes={data:i.object.isRequired,feedType:i.string};pe.defaultProps={feedType:"data-tracker"};O.propTypes={data:i.array.isRequired,style:i.object};function O({data:e,style:t={}}){const n=z().palette.mode==="dark";return r.jsx(P,{style:H({color:n&&e.darkModeColor?e.darkModeColor:e.color||"initial",margin:0,whiteSpace:"pre-line!important",...t},n),children:e.text})}function We({data:e}){const t=[];for(let s=0;s<(e==null?void 0:e.length);s+=2){const n=e[s],o=e[s+1];n&&o?t.push(r.jsxs(be,{children:[r.jsx("td",{className:"label-col",children:r.jsx(O,{data:n.data,style:{whiteSpace:"nowrap"}})}),r.jsx("td",{className:"value-col",children:r.jsx(O,{data:o.data,style:{wordBreak:"break-all"}})})]},s)):n&&t.push(r.jsx(be,{children:r.jsx("td",{className:"label-col",children:r.jsx(O,{data:n.data})})},s))}return r.jsx("table",{style:{width:"100%"},children:r.jsx("tbody",{children:t})})}We.propTypes={data:i.array.isRequired};const be=E.tr`
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: row;
|
|
47
|
-
justify-content: flex-start;
|
|
48
|
-
align-items: center;
|
|
49
|
-
gap: ${({theme:e})=>e.spacing(1)};
|
|
50
|
-
.label-col {
|
|
51
|
-
min-width: 130px;
|
|
52
|
-
flex-shrink: 0;
|
|
53
|
-
}
|
|
54
|
-
.value-col {
|
|
55
|
-
flex: 1;
|
|
56
|
-
}
|
|
57
|
-
`;function he({notification:e,severity:t,showSke:s=!0}){const{attachments:n,data:o,...l}=e,a=W(y=>y.breakpoints.down("md"));if((!n||!n.length)&&_(o))return null;const c=Mt(t),u=(y,b=!1)=>{if(!y&&!Array.isArray(y))return null;let j=y,C={},R="horizontal";b&&$t(y)&&(j=zt(y),R="vertical",C={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||j.length===1?"100%":"28%"});const d=At(j);return r.jsx(h,{sx:{width:"100%",display:"flex",gap:1,flexDirection:b?"row":"column",justifyContent:"flex-start",alignItems:b?"center":"unset",flexWrap:"wrap"},children:j.map((g,f)=>g.type==="section"?r.jsx(We,{data:g.fields},f):r.jsxs(p.Fragment,{children:[r.jsx(_e,{attachment:g,style:C,...l}),!(a&&R==="vertical")&&d&&j.length>1&&f!==j.length-1?r.jsx(se,{orientation:R,style:{color:it.dividerColor},sx:R==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},f))})},x=Pt(n);return r.jsx(Ut,{children:r.jsxs("div",{className:"message-in-list",children:[n.length>0&&r.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:x?u(n):r.jsx(ke,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:c},children:u(n)})}),!_(o)&&r.jsx("div",{className:"message-container",children:r.jsx("div",{className:"data-container",children:r.jsx(pe,{data:o,feedType:e.feedType})})}),n.length===0&&_(o)&&s&&r.jsx(Ze,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const Ut=E.div`
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
|
-
.message-in-list {
|
|
61
|
-
padding: 8px 8px 8px 0;
|
|
62
|
-
display: flex;
|
|
63
|
-
border-radius: 8px;
|
|
64
|
-
}
|
|
65
|
-
.message-title {
|
|
66
|
-
color: #25292f;
|
|
67
|
-
font-size: 18px;
|
|
68
|
-
font-weight: bold;
|
|
69
|
-
word-break: break-all;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.attach-ske {
|
|
73
|
-
position: relative;
|
|
74
|
-
margin-left: 10px;
|
|
75
|
-
&::after {
|
|
76
|
-
content: '';
|
|
77
|
-
position: absolute;
|
|
78
|
-
left: -10px;
|
|
79
|
-
top: 0;
|
|
80
|
-
height: 100%;
|
|
81
|
-
width: 4px;
|
|
82
|
-
background-color: ${e=>e.leftLineColor};
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.message-body {
|
|
87
|
-
color: #25292f;
|
|
88
|
-
font-size: 16px;
|
|
89
|
-
word-break: break-all;
|
|
90
|
-
white-space: pre-line;
|
|
91
|
-
}
|
|
92
|
-
.message-container {
|
|
93
|
-
display: flex;
|
|
94
|
-
flex-direction: column;
|
|
95
|
-
justify-content: flex-start;
|
|
96
|
-
.data-container,
|
|
97
|
-
.attachment-container {
|
|
98
|
-
display: flex;
|
|
99
|
-
flex-direction: column;
|
|
100
|
-
width: 100%;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
.actions-container {
|
|
104
|
-
margin-top: 10px;
|
|
105
|
-
.actions-item {
|
|
106
|
-
margin-right: 8px;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
`;he.propTypes={severity:i.string.isRequired,notification:i.object.isRequired,showSke:i.bool};he.defaultProps={showSke:!0};const J=e=>yt.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),Ot=async(e,t)=>{const{type:s,did:n}=e;return ze.isSameAddr(s,"did")?await Nt(n,t)||Q.getLink(e):Q.getLink(e)},Ft=async(e,t,s=!0)=>{const n=Q.toTextList(e);return await Promise.all(n.map(async l=>{if(l instanceof Q.Link){if(s){const a=await Ot(l,t),{type:c,chainId:u,did:x}=l;return ze.isSameAddr(c,"dapp")?`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${u}" data-did="${x}">${l.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${l.text}</a>`:`<em style="font-weight:bold;" data-type="${c}" data-chain-id="${u}" data-did="${x}">${l.text}</em>`}return l.text}return l})).then(l=>l.join(""))};Be.propTypes={notification:i.object,rows:i.number,minimal:i.bool};function Be({notification:e,rows:t=2,minimal:s=!1}){const[n,o]=p.useState(!1),[l,a]=p.useState(""),{t:c,locale:u}=Re(),{palette:x}=z(),y=p.useMemo(()=>{const{attachments:f}=e||{};if(!f)return!1;try{return f.length>0}catch{return!1}},[e]),b=p.useMemo(()=>{const{blocks:f}=e||{};if(!f)return!1;try{return f.length>0}catch{return!1}},[e]),j=p.useMemo(()=>{const{description:f}=e||{};return!!f},[e]),C=p.useMemo(()=>{const{data:f}=e||{};return!_(f)},[e]),R=p.useMemo(()=>y||b||j||C,[y,b,j,C]);if(p.useEffect(()=>{Ft((e==null?void 0:e.description)??"",u).then(f=>{a(f)})},[e==null?void 0:e.description,u]),!R)return null;const d=()=>t===0?"":n?`<span class='toggle-btn' data-name='toggle-expanded'>${c("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${c("common.expand")}</span>`,g=f=>{const{target:I}=f;I.getAttribute("data-name")==="toggle-expanded"&&(o(!n),f.customPreventRedirect=!0)};return r.jsxs(Vt,{color:s?x.primary.contrastText:"",children:[r.jsx(h,{className:"text-container",component:"div",onClick:g,children:l&&(!n&&t>0?r.jsx(ut,{basedOn:"letters",unsafeHTML:J(l),maxLine:t,ellipsisHTML:J(d())}):r.jsx(P,{component:"div",className:`content ${t===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:J(`${l}${d()}`)}}))}),!s&&(y||C)?r.jsx(he,{severity:e.severity,notification:e}):null]})}const Vt=E(h)`
|
|
110
|
-
width: 100%;
|
|
111
|
-
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
112
|
-
.text-container {
|
|
113
|
-
word-wrap: break-word;
|
|
114
|
-
word-break: break-all;
|
|
115
|
-
color: ${e=>e.color?e.color:e.theme.palette.text.secondary};
|
|
116
|
-
.toggle-btn {
|
|
117
|
-
display: inline-block;
|
|
118
|
-
white-space: nowrap;
|
|
119
|
-
cursor: pointer;
|
|
120
|
-
margin-left: 4px;
|
|
121
|
-
color: ${e=>e.theme.palette.secondary.main};
|
|
122
|
-
}
|
|
123
|
-
.content.ellipsis {
|
|
124
|
-
overflow: hidden;
|
|
125
|
-
text-overflow: ellipsis;
|
|
126
|
-
word-break: break-all;
|
|
127
|
-
display: block;
|
|
128
|
-
display: -webkit-box;
|
|
129
|
-
-webkit-box-orient: vertical;
|
|
130
|
-
-webkit-line-clamp: 2;
|
|
131
|
-
line-height: 1.25;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
`,Gt=p.memo(Be);var me={},Qt=Ce;Object.defineProperty(me,"__esModule",{value:!0});var Ue=me.default=void 0,Xt=Qt(Ie()),Kt=r;Ue=me.default=(0,Xt.default)((0,Kt.jsx)("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var fe={},Yt=Ce;Object.defineProperty(fe,"__esModule",{value:!0});var Oe=fe.default=void 0,Zt=Yt(Ie()),Jt=r;Oe=fe.default=(0,Zt.default)((0,Jt.jsx)("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning");const er={error:Ue,warning:Oe,info:vt,success:wt};ge.propTypes={severity:i.oneOf(["error","warning","info","success"]).isRequired,size:i.number};ge.defaultProps={size:32};function ge({severity:e="info",size:t=32}){const s=z(),o=D(()=>({error:s.palette.error.main,warning:s.palette.warning.main,info:s.palette.info.main,success:s.palette.success.main}))[e],l=er[e],a=Je(o,.1);return r.jsx(K,{sx:{width:t,height:t,bgcolor:a,color:o},children:r.jsx(l,{fontSize:"small"})})}const tr={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M5.821 4.91c3.898-2.765 9.469-2.539 13.073.536c3.667 3.127 4.168 8.238 1.152 11.897c-2.842 3.447-7.965 4.583-12.231 2.805l-.232-.101l-4.375.931l-.075.013l-.11.009l-.113-.004l-.044-.005l-.11-.02l-.105-.034l-.1-.044l-.076-.042l-.108-.077l-.081-.074l-.073-.083l-.053-.075l-.065-.115l-.042-.106l-.031-.113l-.013-.075l-.009-.11l.004-.113l.005-.044l.02-.11l.022-.072l1.15-3.451l-.022-.036C.969 12.45 1.97 7.805 5.59 5.079l.23-.168z"/></g>'},rr={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M12 2a5 5 0 1 1-5 5l.005-.217A5 5 0 0 1 12 2zm2 12a5 5 0 0 1 5 5v1a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-1a5 5 0 0 1 5-5h4z"/></g>'},nr={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M17 3.34A10 10 0 1 1 2 12l.005-.324A10 10 0 0 1 17 3.34zM12 6a1 1 0 0 0-1 1a3 3 0 1 0 0 6v2a1.024 1.024 0 0 1-.866-.398l-.068-.101a1 1 0 0 0-1.732.998a3 3 0 0 0 2.505 1.5H11a1 1 0 0 0 .883.994L12 18a1 1 0 0 0 1-1l.176-.005A3 3 0 0 0 13 11V9c.358-.012.671.14.866.398l.068.101a1 1 0 0 0 1.732-.998A3 3 0 0 0 13.161 7H13a1 1 0 0 0-1-1zm1 7a1 1 0 0 1 0 2v-2zm-2-4v2a1 1 0 0 1 0-2z"/></g>'},sr={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M8 12a4 4 0 1 0 8 0a4 4 0 1 0-8 0"/><path d="M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-5.5 8.28"/></g>'},ir={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 10l-4 4l6 6l4-16l-18 7l4 2l2 6l3-4"/>'},je={comment:{icon:tr,bgColor:"rgba(239, 246, 255, 1)",color:"rgba(43, 127, 255, 1)"},like:{icon:"👍",bgColor:"rgba(244, 244, 245, 1)",color:"yellow",renderType:"emoji"},follow:{icon:rr,bgColor:"rgba(238, 242, 255, 1)",color:"rgba(97, 95, 255, 1)"},tips:{icon:nr,bgColor:"rgba(254, 252, 232, 1)",color:"rgba(240, 177, 0, 1)"},mention:{icon:sr,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"},assign:{icon:ir,bgColor:"rgba(244, 244, 245, 1)",color:"rgba(43, 127, 255, 1)"}};xe.propTypes={activity:i.oneOf(["comment","like","follow","tips","mention","assign"]).isRequired,size:i.number};xe.defaultProps={size:32};function xe({activity:e,size:t=32}){const s=je[e]||je.comment,n=s.icon;return r.jsx(K,{sx:{bgcolor:s.bgColor,color:s.color,width:t,height:t},children:s.renderType==="emoji"?r.jsx("span",{style:{fontSize:"14px"},children:n}):r.jsx(Te,{icon:n})})}const re={avatar:i.string,fullName:i.string,did:i.string};function X({actor:e,size:t,teamDid:s,inService:n,showName:o}){const l=D(()=>({...e,avatar:e!=null&&e.avatar?It(e.avatar,s,n):null}),[e,s,n]),a=c=>{e&&(c.stopPropagation(),window.open(xt(Y(ot.WELLKNOWN_SERVICE_PATH_PREFIX,"user"),{did:e.did}),"_blank"),c.customPreventRedirect=!0)};return r.jsxs(h,{display:"flex",alignItems:"center",gap:1,onClick:a,role:"button",style:{cursor:"pointer"},title:(e==null?void 0:e.fullName)||"",children:[l.avatar?r.jsx(kt,{user:l,showDid:!0,cardType:Ct.AvatarOnly,infoType:Rt.Minimal,avatarSize:t,shape:"circle",sx:{width:t,height:t,borderRadius:"100%",overflow:"hidden",transition:"transform 0.2s ease-in-out","&:hover":{transform:"scale(1.1)"}}}):r.jsx(K,{sx:{width:t,height:t}}),o&&r.jsx("span",{children:e==null?void 0:e.fullName})]})}X.propTypes={actor:i.shape(re).isRequired,size:i.number.isRequired,teamDid:i.string,inService:i.bool,showName:i.bool};X.defaultProps={teamDid:"",inService:!1,showName:!1};Z.propTypes={actors:i.oneOfType([i.shape(re),i.arrayOf(i.shape(re))]).isRequired,size:i.number,maxDisplay:i.number,teamDid:i.string,inService:i.bool,showName:i.bool,avatarFallback:i.node};Z.defaultProps={size:32,maxDisplay:9,teamDid:"",inService:!0,showName:!1,avatarFallback:null};function Z({actors:e,size:t=32,maxDisplay:s=9,teamDid:n="",inService:o=!0,showName:l=!1,avatarFallback:a=null}){const c=D(()=>{const u=Array.isArray(e)?e:[e];return gt(u,"did").filter(Boolean)},[e]);return c.length===1||!c.length?r.jsx(X,{actor:c[0],size:t,teamDid:n,inService:o,showName:l}):r.jsx(et,{total:c.length,renderSurplus:u=>u<100?r.jsxs("span",{children:["+",u]}):r.jsx("span",{children:"99+"}),max:s,sx:{justifyContent:"flex-end",height:`${t}px`,".MuiAvatar-root":{width:`${t}px`,height:`${t}px`,fontSize:`${t/2.5}px`,border:0,zIndex:2}},children:c.map((u,x)=>u!=null&&u.avatar?r.jsx(X,{actor:u,size:t,teamDid:n,inService:o},(u==null?void 0:u.did)||x):a)})}const we=3;Ge.propTypes={notification:i.object.isRequired,isMultiple:i.bool,blocklet:i.object,mountPoint:i.string,avatarFallback:i.node};Fe.propTypes={notification:i.object.isRequired,mountPoint:i.string};Ve.propTypes={items:i.array.isRequired,activity:i.object.isRequired,blocklet:i.object,mountPoint:i.string,viewMoreLink:i.string,avatarFallback:i.node};function Fe({notification:e,mountPoint:t=""}){var a;const{activity:s}=e,{type:n,meta:o={}}=s||{},l=Se({activity:s,users:[e==null?void 0:e.actorInfo],actors:[(a=e==null?void 0:e.activity)==null?void 0:a.actor],mountPoint:t});return _(s)||!s.type||!s.actor||_(s.target)?null:r.jsxs(h,{children:[r.jsx(P,{variant:"body1",color:"text.secondary",sx:{mb:.5},children:l}),r.jsx(Me,{meta:o,type:n})]})}function Ve({items:e,activity:t,blocklet:s,mountPoint:n="",viewMoreLink:o="",avatarFallback:l=null}){const a=z(),c=D(()=>{var d;return(s==null?void 0:s.did)||((d=s==null?void 0:s.meta)==null?void 0:d.did)||""},[s]),{locale:u}=p.useContext(oe),x=D(()=>!_(t.meta)&&Object.values(t.meta).some(d=>d!=null),[t]),y=Se({activity:t,users:e.map(d=>d==null?void 0:d.actorInfo),actors:e.map(d=>{var g;return(g=d==null?void 0:d.activity)==null?void 0:g.actor}),mountPoint:n}),b=ee(d=>{if(!d.activity)return null;const g=ae(d.activity);return g!=null&&g.metaLink?Y(n,g.metaLink):null}),j=ee((d,g)=>{if(!g)return;const f=b(g);f&&(window.open(f,"_blank"),d.customPreventRedirect=!0)}),C=e.length>we,R=e.slice(0,we);return r.jsxs(h,{sx:{width:"100%"},children:[r.jsx(P,{variant:"body1",color:"text.secondary",sx:{mb:3},children:y}),x?r.jsxs(h,{className:"sub-content",display:"flex",flexDirection:"column",gap:3,children:[R.map(d=>{var g;return r.jsxs(h,{display:"flex",flexDirection:"column",gap:1,onClick:f=>j(f,d),children:[r.jsxs(h,{display:"flex",alignItems:"center",gap:1,children:[G(d)?r.jsx(Z,{actors:d.actorInfo,size:32,teamDid:c}):l,r.jsx(P,{variant:"subtitle1",color:"text.primary",children:G(d)?(g=d==null?void 0:d.actorInfo)==null?void 0:g.fullName:"System"})," ","·",r.jsx($e,{value:d.createdAt,locale:u,shouldUpdate:!0,style:{color:a.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),r.jsx(h,{pl:5,children:r.jsx(Me,{meta:d.activity.meta,type:d.activity.type})})]},d.id)}),C&&o?r.jsx(h,{mt:1,display:"flex",justifyContent:"center",children:r.jsxs(tt,{size:"large",variant:"text",component:ne,href:o,target:"_blank",rel:"noopener noreferrer",onClick:d=>{d.customPreventRedirect=!0},children:["View More ",r.jsx(Te,{icon:pt,style:{marginLeft:4}})]})}):null]}):null]})}function Ge({notification:e,isMultiple:t=!1,blocklet:s,mountPoint:n="",avatarFallback:o}){const l=D(()=>{if(!e.activity)return null;const a=ae(e.activity);return a!=null&&a.targetLink?Y(n,a.targetLink):null},[e.activity,n]);return t?r.jsx(Ve,{items:e.items,activity:e.activity,blocklet:s,mountPoint:n,viewMoreLink:l,avatarFallback:o}):r.jsx(Fe,{notification:e,mountPoint:n})}const or=rt(h)`
|
|
135
|
-
display: flex;
|
|
136
|
-
justify-content: center;
|
|
137
|
-
align-items: center;
|
|
138
|
-
flex-direction: column;
|
|
139
|
-
height: 100%;
|
|
140
|
-
min-height: 100px;
|
|
141
|
-
color: #999;
|
|
142
|
-
.empty-icon {
|
|
143
|
-
margin: 10px 0;
|
|
144
|
-
}
|
|
145
|
-
`;function ye({color:e,children:t,...s}){const n=Tt();return r.jsxs(or,{...s,children:[r.jsx("img",{src:`${n.imgPrefix}/all-done.png`,alt:"All Done",width:200,height:200,style:{maxHeight:"100%",maxWidth:"100%"},onError:o=>{o.target.style.display="none"}}),r.jsx(h,{className:"empty-content",children:t})]})}ye.propTypes={color:i.string,children:i.any};ye.defaultProps={color:"inherit",children:null};ar.propTypes={data:i.array,blockletMap:i.object,onReadBatch:i.func,inDialog:i.bool,highlightId:i.string,highlight:i.bool,type:i.oneOf(["server","service"])};Qe.propTypes={notification:i.object,blocklet:i.object,onReadBatch:i.func,inDialog:i.bool,highlight:i.bool};F.propTypes={blocklet:i.object,size:i.number,showName:i.bool,hideDot:i.bool};function F({blocklet:e,size:t=40,showName:s=!1,hideDot:n=!1}){var a,c;const o=(e==null?void 0:e.did)||((a=e==null?void 0:e.meta)==null?void 0:a.did)||"",l=((e==null?void 0:e.alsoKnownAs)||[]).concat((e==null?void 0:e.appId)||(e==null?void 0:e.appDid)||(e==null?void 0:e.appPid)||"");return r.jsxs(h,{className:"component-avatar",display:"flex",alignItems:"center",sx:{gap:n?"8px":"4px"},children:[!n&&r.jsx("span",{className:"dot"}),e?r.jsx(h,{children:l.includes(o)?r.jsx(le,{blocklet:e,size:t,style:{borderRadius:8}}):r.jsx(ct,{blocklet:e,ancestors:e.ancestors??[],size:t,style:{borderRadius:8}})}):r.jsx(lt,{width:t,height:t}),s&&r.jsx("span",{className:"component-name",children:(c=e==null?void 0:e.meta)==null?void 0:c.title})]})}function Qe({notification:e,blocklet:t,onReadBatch:s=()=>{},inDialog:n=!1,highlight:o}){const{locale:l}=p.useContext(oe),a=z(),c=W(v=>v.breakpoints.down("md")),u=p.useRef(null),x=p.useMemo(()=>te(e),[e]),y=p.useMemo(()=>mt(e),[e]),b=p.useMemo(()=>G(e),[e]),j=p.useMemo(()=>{const{actions:v,action:T}=e;let w=v??[];return!w.length&&T&&(w=[{name:"Visit",link:T}]),w},[e]),C=p.useMemo(()=>e.items||[],[e]),R=p.useMemo(()=>C.length>0,[C]),d=p.useMemo(()=>y?R?C.map(v=>{var T;return G(v)?v.actorInfo:{did:(T=v.activity)==null?void 0:T.actor}}).filter(Boolean):e.actorInfo??[]:[],[C,e.actorInfo,R,y]),g=p.useMemo(()=>{var v;return(t==null?void 0:t.did)||((v=t==null?void 0:t.meta)==null?void 0:v.did)||""},[t]),f=p.useMemo(()=>Lt(g,window.blocklet),[g]),I=ee((v,T)=>{const w=De(v);if(w.length&&s(w.map(M=>M.id)),T&&!T.customPreventRedirect){const M=Dt(v,f);M&&typeof M=="string"&&window.open(M,"_blank","noopener,noreferrer")}});return r.jsxs(lr,{ref:u,className:"notification-row",id:e.id,isRead:x,inDialog:n,highlight:o,isMd:c,onClick:v=>I(e,v),children:[y?r.jsx(xe,{activity:e.activity.type,size:c?24:32}):r.jsx(ge,{severity:e.severity,size:c?24:32}),r.jsxs(h,{className:"notification",display:"flex",flexDirection:"column",alignItems:"start",children:[r.jsxs(h,{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",gap:1,className:"header",mb:1.5,children:[y&&b?r.jsx(Z,{actors:d,teamDid:g,size:c?24:32,avatarFallback:r.jsx(F,{blocklet:t,hideDot:!0,size:c?24:32})}):r.jsx(F,{blocklet:t,hideDot:!0,size:c?24:32}),r.jsx($e,{value:e.createdAt,locale:l,shouldUpdate:!0,style:{color:a.palette.text.secondary,fontSize:"0.875rem",minWidth:"50px",whiteSpace:"nowrap"}})]}),y?r.jsx(Ge,{notification:e,isMultiple:R,blocklet:t,mountPoint:f,avatarFallback:r.jsx(F,{blocklet:t,hideDot:!0,size:c?24:32})}):r.jsxs(r.Fragment,{children:[r.jsx(P,{variant:"body1",className:"title",color:"rgba(24, 24, 27, 1)",style:{marginTop:0},sx:{mb:.5},children:e.title}),r.jsx(Gt,{notification:e,rows:n?0:2})]}),j.length>0?r.jsx(h,{display:"flex",justifyContent:"start",alignItems:"center",gap:1,mt:1.5,children:j.map((v,T)=>r.jsxs(p.Fragment,{children:[r.jsx(ne,{href:v.link,target:"_blank",className:"link",rel:"noopener noreferrer",sx:{fontSize:"15px"},onClick:w=>{w.customPreventRedirect=!0},children:v.name},v.link),T<j.length-1?r.jsx(se,{orientation:"vertical",sx:{ml:1,mr:1,height:12,borderWidth:"1px"}}):null]},v.link))}):null]}),(e==null?void 0:e.description)&&e.severity==="error"&&r.jsx(h,{className:"copy-button",children:r.jsx(nt,{size:"small",children:r.jsx(at,{sx:{fontSize:22},content:(e==null?void 0:e.description)||""})})})]})}function ar({data:e,blockletMap:t,onReadBatch:s=()=>{},inDialog:n=!1,highlightId:o,highlight:l=!1,type:a="service"}){const{t:c}=Re(),u=p.useRef(null),[x,y]=p.useState(!1),[b,j]=p.useState(!0),[C,R]=p.useState(!1),d=p.useRef(new Set),g=p.useRef(new Set),f=p.useRef(null),I=p.useRef(null),v=p.useRef(!1),T=p.useMemo(()=>n?e==null?void 0:e.slice(0,5):e,[n,e]),w=p.useMemo(()=>ht(T),[T]),M=p.useMemo(()=>{const m=new Map;return w&&w.length&&w.forEach(k=>{m.set(k.id,k)}),m},[w]);p.useEffect(()=>{const m=()=>{j(document.visibilityState==="visible")};return document.addEventListener("visibilitychange",m),()=>{document.removeEventListener("visibilitychange",m)}},[]);const U=p.useCallback(()=>{if(!n&&d.current.size>0){const m=[];d.current.forEach(k=>{if(g.current.has(k))return;const S=M.get(k);if(S){const{receivers:N=[],items:L=[]}=S;if(N.length&&!N[0].read&&(m.push(k),g.current.add(k),L.length>0&&L.forEach($=>{const A=$.id;A&&!g.current.has(A)&&(m.push(A),g.current.add(A))}),I.current)){const $=document.getElementById(k);$&&I.current.unobserve($)}}}),m.length>0&&(s(m),setTimeout(()=>{y(!1)},300)),d.current.clear()}},[n,M,s]),q=p.useCallback(()=>{if(n||!u.current||!b)return;I.current&&I.current.disconnect();const m={root:null,rootMargin:"0px",threshold:.5},k=new IntersectionObserver(N=>{x&&N.forEach(L=>{const $=L.target.id;if(g.current.has($))return;const A=M.get($);if(A){const{receivers:ve=[]}=A;ve.length&&!ve[0].read&&(L.isIntersecting?(d.current.add($),C||U()):d.current.delete($))}})},m);I.current=k,Array.from(u.current.querySelectorAll(".notification-row")).filter(N=>{const L=N.id;if(g.current.has(L))return!1;const $=M.get(L);if($){const{receivers:A=[]}=$;return A.length&&!A[0].read}return!1}).forEach(N=>{k.observe(N)}),v.current=!1},[x,n,C,b,M,U]);return p.useEffect(()=>{n||(v.current=!0,I.current&&b&&x&&setTimeout(()=>{q()},0))},[T,x,b,q,n]),p.useEffect(()=>{if(n||!u.current||!b)return;let m=window;if(a==="server"&&(m=document.getElementById("arc__dashboard-main")),!m){const S=document.getElementsByClassName("dashboard-main")[0];S&&(m=S)}if(!m)return;const k=S=>{S.isTrusted&&(x||y(!0),R(!0),f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{R(!1),U(),v.current&&q()},300))};return m.addEventListener("scroll",k,{passive:!0}),()=>{m.removeEventListener("scroll",k),f.current&&clearTimeout(f.current)}},[n,x,b,U,q,a]),p.useEffect(()=>(n||q(),()=>{I.current&&I.current.disconnect()}),[q,n]),st(()=>{setTimeout(()=>{const m=_t(u.current),k=Ht(M,m);s(k.map(S=>S.id))},2e3)}),w!=null&&w.length?r.jsx(h,{ref:u,display:"flex",flexDirection:"column",sx:{...n?{maxHeight:"calc(-200px + 100vh)",overflow:"auto"}:{}},children:w==null?void 0:w.map(m=>{var S;const k=m.source==="system"?t.get(m.entityId||m.sender):t.get(m.componentDid||m.sender);return((S=m==null?void 0:m.type)==null?void 0:S.toLowerCase())==="passthrough"?null:r.jsx(Qe,{highlight:l&&o===m.id,inDialog:n,notification:m,blocklet:k,onReadBatch:s},m.id)})}):r.jsx(ye,{children:c("notification.allDone")})}const lr=E("div")`
|
|
146
|
-
@keyframes flash-bg {
|
|
147
|
-
0% {
|
|
148
|
-
background-color: ${e=>e.theme.palette.warning.light};
|
|
149
|
-
}
|
|
150
|
-
100% {
|
|
151
|
-
background-color: unset;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
position: relative;
|
|
155
|
-
display: flex;
|
|
156
|
-
align-items: flex-start;
|
|
157
|
-
gap: ${e=>e.isMd?e.theme.spacing(1):e.theme.spacing(1.5)};
|
|
158
|
-
padding: ${e=>e.isMd?`${e.theme.spacing(2)} 0`:e.theme.spacing(3)};
|
|
159
|
-
cursor: pointer;
|
|
160
|
-
animation: ${e=>e.highlight?"flash-bg 3s ease-out 0s 1 normal none running":"none"};
|
|
161
|
-
background-color: ${e=>e.isRead?"transparent":e.theme.palette.grey[100]};
|
|
162
|
-
border-bottom: 1px solid;
|
|
163
|
-
border-color: ${({theme:e})=>e.palette.grey[200]};
|
|
164
|
-
&:last-child {
|
|
165
|
-
border-bottom: none;
|
|
166
|
-
}
|
|
167
|
-
&:hover {
|
|
168
|
-
background-color: ${e=>e.theme.palette.action.hover};
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
.copy-button {
|
|
172
|
-
position: absolute;
|
|
173
|
-
right: ${e=>e.inDialog?e.theme.spacing(2):"0"};
|
|
174
|
-
top: ${e=>e.inDialog?e.theme.spacing(5):e.theme.spacing(4)};
|
|
175
|
-
display: none;
|
|
176
|
-
background: ${e=>e.theme.palette.action.disabledBackground};
|
|
177
|
-
border-radius: 50%;
|
|
178
|
-
svg {
|
|
179
|
-
width: ${e=>e.theme.spacing(2.25)};
|
|
180
|
-
height: ${e=>e.theme.spacing(2.25)};
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
&:hover {
|
|
184
|
-
.copy-button {
|
|
185
|
-
display: block;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.component-avatar {
|
|
190
|
-
.dot {
|
|
191
|
-
width: ${e=>e.theme.spacing(1)};
|
|
192
|
-
height: ${e=>e.theme.spacing(1)};
|
|
193
|
-
border-radius: 50%;
|
|
194
|
-
background-color: ${e=>e.theme.palette.primary.main};
|
|
195
|
-
visibility: ${e=>e.isRead?"hidden":"visible"};
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.notification {
|
|
200
|
-
width: calc(100% - ${e=>e.theme.spacing(6.25)});
|
|
201
|
-
|
|
202
|
-
> .header {
|
|
203
|
-
width: 100%;
|
|
204
|
-
@media (min-width: 900px) {
|
|
205
|
-
.title {
|
|
206
|
-
max-width: calc(100vw - ${e=>e.theme.spacing(50)});
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
@media (min-width: 1200px) {
|
|
210
|
-
.title {
|
|
211
|
-
max-width: ${e=>e.theme.spacing(102.5)};
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
@media (max-width: 900px) {
|
|
215
|
-
.title {
|
|
216
|
-
max-width: calc(100vw - ${e=>e.theme.spacing(25)});
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.title {
|
|
222
|
-
min-width: 0;
|
|
223
|
-
max-width: 100%;
|
|
224
|
-
overflow: hidden;
|
|
225
|
-
text-overflow: ellipsis;
|
|
226
|
-
white-space: nowrap;
|
|
227
|
-
color: ${e=>e.theme.palette.text.primary};
|
|
228
|
-
font-size: ${e=>e.theme.typography.fontSize*1.15}px;
|
|
229
|
-
}
|
|
230
|
-
.link {
|
|
231
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
232
|
-
font-size: ${e=>e.theme.typography.fontSize}px;
|
|
233
|
-
text-decoration: none;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
`;export{Z as A,le as B,ar as N,F as S,Ge as a,Gt as b,te as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./vendor-mui-core-BKQDHvL6.js";import"./vendor-react-DEoibe3W.js";import{S as t}from"./studio-DdhbfCKD.js";import"./vendor-ux-did-connect-Dr2W2Pc9.js";import"./vendor-utils-CjMBJT5V.js";import"./vendor-hooks-DXGUREV9.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-TgIfa3ko.js";import"./TuneOutlined-D2mm0fk8.js";function d(){return o.jsx(t,{children:"Coming soon..."})}export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{H as a,j as e,aa as p,T as b,ad as V,y as z,ab as de}from"./vendor-mui-core-BKQDHvL6.js";import{d as pe,f as ue,u as fe,l as ge}from"./vendor-hooks-DXGUREV9.js";import{r as ee,f as me}from"./vendor-react-DEoibe3W.js";import{H as X}from"./vendor-arcblock-TgIfa3ko.js";import{A as E,c as R,z as he,I as we}from"./vendor-utils-CjMBJT5V.js";import{a1 as xe,a0 as ye,u as ne,a9 as $,w as Pe,aT as ve,G as Ie,aU as je,n as W,aj as ke,ai as Ce,aV as be,a2 as G,aW as Te,aX as _e,aY as Le,x as J}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import{u as Re}from"./use-passport-id-B-b-_oYF.js";import{g as Y}from"./get-safe-url-zHRp3aBu.js";import{u as We,s as Ae,a as Ee,b as Z}from"./index-B9ltKwuq.js";import{d as A}from"./logger-hgBwjvHi.js";import{d as Se}from"./LaunchOutlined-CypNgDc2.js";import"./lottie-web-jYmAQWuC.js";function S({blocklet:s}){return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between"},children:[e.jsx(xe,{variant:"rounded",shape:"square",did:s.appPid,src:s.appLogo,size:80}),e.jsx(b,{component:"h2",variant:"h6",children:s.appName}),e.jsx(ye,{did:s.appPid})]})}const Ue=ee.memo(S);S.propTypes={blocklet:a.shape({appName:a.string,appLogo:a.string,appPid:a.string})};S.defaultProps={blocklet:window.blocklet};const Ne=()=>{var r,i;const s=(i=(r=window.blocklet)==null?void 0:r.componentMountPoints)==null?void 0:i.find(m=>m.did==="z2qaCNvKMv5GjouKdcDWexv6WqtHbpNPQDnAk");return s==null?void 0:s.mountPoint};function U({children:s,cta:r,...i}){return e.jsxs(p,{...i,children:[s?e.jsx(p,{sx:{maxHeight:"50vh",overflow:"hidden",position:"relative",":after":{content:'""',position:"absolute",left:0,right:0,bottom:0,height:"80%",background:"linear-gradient(transparent, #fff 85%)"}},children:s}):null,r?e.jsx(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",py:4,borderRadius:2},children:r}):null]})}U.propTypes={children:a.node,cta:a.node};U.defaultProps={children:null,cta:null};function N({passports:s,onConnect:r,onClose:i,redirect:m,...T}){const{t:u}=ne(),x=Ne(),v=c=>{const g=c==null?void 0:c.payable;return x&&g?E(x,`/api/redirect/checkout/${g}?redirect=${m}`):null};return e.jsxs(p,{sx:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minHeight:"100vh",maxWidth:"400px",margin:"auto",paddingBottom:{sx:0,md:15}},children:[e.jsx(Ue,{}),e.jsx(U,{...T,cta:e.jsxs(e.Fragment,{children:[e.jsx(b,{variant:"h4",sx:{mx:2,textAlign:"center",fontWeight:"bold",color:"warning.main"},children:u("login.accessLimit.title")}),e.jsx(b,{variant:"body1",sx:{maxWidth:620,mt:2,mx:2,textAlign:"center",color:"gray"},children:u("login.accessLimit.description")}),e.jsx(p,{sx:{display:"flex",flexWrap:"wrap",justifyContent:"center",gap:1,mt:5},children:s==null?void 0:s.map(c=>{const g=v(c);return g?e.jsx(V,{title:u("login.accessLimit.buyPassport"),arrow:!0,placement:"top",children:e.jsx(z,{color:"primary",variant:"contained",endIcon:e.jsx(Se,{}),href:g,target:"_blank",children:c.title||c.name})},c.name):e.jsx(V,{title:u("login.connectWithPassport"),arrow:!0,placement:"top",children:e.jsx(z,{color:"inherit",variant:"contained",onClick:r,children:c.title||c.name})},c.name)})}),e.jsxs(b,{variant:"body1",sx:{mt:2,color:"grey.400"},children:[e.jsx(p,{component:"span",sx:{display:"inline-block",mr:1},children:u("login.accessLimit.alreadyHavePassport")}),e.jsx(p,{component:"span",sx:{textDecoration:"underline",cursor:"pointer",color:"primary.main"},onClick:r,children:u("common.connect")})]})]})})]})}N.propTypes={passports:a.arrayOf(a.shape({name:a.string.isRequired,title:a.string,payable:a.string})),onConnect:a.func,onClose:a.func,redirect:a.string.isRequired};N.defaultProps={passports:[],onConnect:()=>{},onClose:()=>{}};function $e(){const s=ee.useRef(null),{session:r}=We(),{t:i,locale:m}=ne(),{getPassportId:T}=Re(),u=me(),x=$(),v=Pe(),{encryptKey:c,decrypt:g}=ve(),I=pe(r),{searchParams:t}=new URL(window.location.href),h={passportId:T()},D=t.get("componentId"),q=t.get("authenticated"),te=t.get("sessionToken"),oe=t.get("refreshToken"),ie=t.get("requiredRoles"),f=t.get("redirect"),d=t.get("forceConnected"),j=t.get("sourceAppPid"),_=t.get("origin"),H=t.get("autoConnectWebview"),F=t.get("popup"),K=t.get("showQuickConnect");let w=t.get("inviter");if(!w&&f)try{w=(f.startsWith("http")?new URL(f):new URL(f,window.location.origin)).searchParams.get("inviter")}catch{}w=w||localStorage.getItem("inviter"),D&&(h.componentId=D),x&&(h.visitorId=x),w&&(h.inviter=w),we(j)||(j==="null"?h.sourceAppPid=null:j!==null&&(h.sourceAppPid=j));let B=[];try{B=JSON.parse(ie)}catch{}const se=async n=>{const o=t.get("fromWallet");A("login page notifyWallet",{data:n,fromWallet:o,"browser.wallet":v.wallet}),n&&String(o)==="1"&&v.wallet&&await Promise.any([J.asyncCall("arcSetToken",n),Z(3e3)])},L=n=>t.get("encrypted")?g(n):n,M=async n=>{n&&await se(n),setTimeout(()=>{if(f){const o=decodeURIComponent(f);o.startsWith(W.WELLKNOWN_SERVICE_PATH_PREFIX)?u(o,{replace:!0}):window.location.replace(Y(o))}else window.location.replace(window.env.pathPrefix||"/")},50)},re=n=>{const o={did:n.user.did,host:window.location.host,appPid:window.blocklet.appPid,visitorId:$(),sourceAppPid:n.user.sourceAppPid,fullName:n.user.fullName};A("bridge callArc: onLogin",o),J.callArc("onLogin",o)},O=async(n,o)=>{const y=o(n.sessionToken),k=o(n.refreshToken),P=o(n.visitorId);A("login page onLogin",{result:n,decodeSessionToken:y,decodeRefreshToken:k,decodeVisitorId:P}),Ae(y),Ee(k),n.visitorId&&Te(P),await r.refresh(),await Z(100),re(I.current);const l={};t.get("saveConnect")?(l.connected_did=I.current.user.did,l.connected_pk=I.current.user.pk,l.connected_wallet_os=I.current.walletOS,l.connected_app=_e()):(l.connected_did=t.get("connected_did"),l.connected_pk=t.get("connected_pk"),l.connected_app=t.get("connected_app"),l.connected_wallet_os=t.get("connected_wallet_os")),Le(l,!0),M({sessionToken:y,refreshToken:k,visitorId:P})},ae=ue(()=>_==="switch-did"?d&&typeof d=="string"?{title:i("login.switchSpecifiedDid.title"),scan:i("login.switchSpecifiedDid.scan",{did:d}),confirm:i("login.switchSpecifiedDid.confirm"),success:i("login.switchSpecifiedDid.success")}:{title:i("login.switchDid.title"),scan:i("login.switchDid.scan"),confirm:i("login.switchDid.confirm"),success:i("login.switchDid.success")}:{title:i("login.connect.title"),scan:i("login.connect.scan"),confirm:i("login.connect.confirm"),success:i("login.connect.success")},[d,_,i]),Q=fe(()=>{const n=window==null?void 0:window.blocklet,o={className:"connect",popup:!1,action:"login",passkeyBehavior:"both",onSuccess:O,onError:ce,locale:m,messages:ae,extraParams:h,baseUrl:window.location.origin,prefix:E(window.location.origin,W.WELLKNOWN_SERVICE_PATH_PREFIX,je)};d&&(o.forceConnected=d,o.extraParams.enableSwitchApp=!1,o.extraParams.forceConnected=d),o.options||(o.options={}),_==="switch-did"?o.options.showQuickConnect=!0:R(K)||([!1,"false"].includes(K)?o.options.showQuickConnect=!1:o.options.showQuickConnect=!0);const y=ke(),P=Ce()?y.appUrl:window.location.origin,l=E(P,W.WELLKNOWN_SERVICE_PATH_PREFIX,"connect"),C={params:be(encodeURIComponent(JSON.stringify(o))),appPid:n==null?void 0:n.appPid,appName:n==null?void 0:n.appName,locale:m,redirect:window.location.href,_ek_:c};R(H)||(C.autoConnectWebview=H),R(F)||(C.popup=F),C.disableClose=!0,window.location.href=Y(he(l,C),{allowDomains:null})});ge(()=>{if(t.get("sessionToken")){const n=t.get("visitorId");if(!n){G.error("Unexpected login response from server: visitorId is required");return}O({sessionToken:L(te),refreshToken:L(oe),visitorId:L(n)},o=>o)}else!r.user||d&&r.user.did!==d?Q():!q&&!t.get("sessionToken")&&M()});const ce=n=>{G.error(n.message)},le=t.has("popup");if(r.loading||r.user){if(!q||t.get("sessionToken"))return e.jsxs(e.Fragment,{children:[e.jsx(X,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(Ie,{children:le?null:e.jsx(de,{})})]});const n=f?new URL(f,window.location.origin).href:window.location.href;return e.jsx(N,{onConnect:Q,passports:B,redirect:n})}return e.jsxs(e.Fragment,{children:[e.jsx(X,{children:e.jsx("title",{children:i("pageTitle.login")})}),e.jsx(p,{sx:{"box-sizing":"border-box",width:"100%",height:"100vh",position:"relative",display:"flex","flex-direction":"column",".connect":{background:"#fafafa"}},ref:s})]})}export{$e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./vendor-react-DEoibe3W.js";import{ay as r}from"./vendor-utils-CjMBJT5V.js";const o=e(r);export{o as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./vendor-mui-core-BKQDHvL6.js";import{A as t}from"./vendor-utils-CjMBJT5V.js";import{I as s}from"./iframe-BuwO7sH1.js";import{n as e}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import{S as n}from"./studio-DdhbfCKD.js";import"./vendor-react-DEoibe3W.js";import"./vendor-arcblock-TgIfa3ko.js";import"./vendor-hooks-DXGUREV9.js";import"./lottie-web-jYmAQWuC.js";import"./TuneOutlined-D2mm0fk8.js";function P(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const i=`${t(window.location.origin,e.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return o.jsx(n,{children:o.jsx(s,{url:i,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{P as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./vendor-mui-core-BKQDHvL6.js";import{H as t,U as o}from"./vendor-arcblock-TgIfa3ko.js";import"./vendor-react-DEoibe3W.js";import{u as s}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import"./vendor-utils-CjMBJT5V.js";import"./vendor-hooks-DXGUREV9.js";import"./lottie-web-jYmAQWuC.js";function x(){const{t:r}=s();return e.jsxs(e.Fragment,{children:[e.jsx(t,{children:e.jsx("title",{children:r("pageTitle.userCenter")})}),e.jsx(o,{onlyProfile:!0,currentTab:"",disableAutoRedirect:!0})]})}export{x as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as n,j as i,aa as l}from"./vendor-mui-core-BKQDHvL6.js";import{l as d,r as c}from"./vendor-react-DEoibe3W.js";import{u,aq as h}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import g from"./index-ChWzsQ7e.js";import"./vendor-utils-CjMBJT5V.js";import"./vendor-hooks-DXGUREV9.js";import"./lottie-web-jYmAQWuC.js";import"./index-B9ltKwuq.js";import"./vendor-arcblock-TgIfa3ko.js";import"./Error-BfFrp5Y1.js";import"./confirm-C55dFhba.js";import"./format-error-BrmqJs5a.js";import"./session-C3Z84LF2.js";import"./did-address-CaOBKHpX.js";import"./empty-spinner-Bx6dYuKk.js";import"./bundle-avatar-N2eRPvA4.js";import"./shorten-label-BhyIJhRI.js";import"./list-header-jygAFPJa.js";import"./Download-CC6n4Puh.js";import"./click-to-copy-BxPDzy5A.js";import"./QuestionMarkCircle-DK54eXUx.js";import"./useSetState-CWq0AVWn.js";import"./index-DVQCgvFb.js";import"./index-DF637rKa.js";import"./api-Bf1onQOz.js";import"./ChevronRight-tpAiXojW.js";import"./vendor-mui-x-Db_Ss6fv.js";import"./DeleteOutline-DqdSj9ec.js";import"./react-beautiful-dnd.esm-djvJS7-9.js";import"./raf-schd.esm-B3j6BePR.js";import"./item-ChX1dT7k.js";import"./Launch-DNHBfbtb.js";import"./Done-DtZ1RTXT.js";import"./delete-confirm-D1Xe3pLh.js";import"./get-safe-url-BBjUrzRU.js";import"./ArrowDropDown-CDVfAOPe.js";import"./index-3mcmABlM.js";import"./index-hOO84dse.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function to(){const{t:p}=u(),{componentDid:o}=d(),m=n(t=>t.breakpoints.down("md")),a=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:a,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{to as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as d}from"./vendor-react-DEoibe3W.js";import{H as u,j as o,ad as T}from"./vendor-mui-core-BKQDHvL6.js";import{p as h}from"./use-blocklet-logo-CWUmcmJR.js";import{u as w}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import{l as x,H as M}from"./index-B9ltKwuq.js";function y({value:e,shouldUpdate:l=!1,...c}){const{t:i,locale:a}=w(),[I,v]=d.useState(1e3);if(d.useEffect(()=>{let t;if(l){const j=new Date(e).getTime(),p=Date.now(),f=Math.abs(Math.floor((j-p)/1e3)),s=()=>{v(p)};f<60?t=setInterval(s,1e3):f<60*60?t=setInterval(s,6e4):t=setInterval(s,36e5)}return()=>{clearInterval(t)}},[e,I,l]),!e)return"-";const m={locale:M(a),compact:!0},n=new Date(e).getTime(),r=Date.now();if(n>r){const t=h(n-r,m);return o.jsx(T,{title:x(e,a),placement:"top-end",enterTouchDelay:0,children:o.jsx("span",{...c,children:i("common.afterTime",{time:t})})})}const D=h(r-n,m);return o.jsx(T,{title:x(e,a),placement:"top-end",enterTouchDelay:0,children:o.jsx("span",{...c,children:i("common.timeAgo",{time:D})})})}y.propTypes={value:u.any,shouldUpdate:u.bool};y.defaultProps={value:"",shouldUpdate:!1};export{y as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a_ as o}from"./vendor-ux-did-connect-Dr2W2Pc9.js";const e=o();export{e as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o}from"./vendor-react-DEoibe3W.js";import{i as t}from"./vendor-ux-did-connect-Dr2W2Pc9.js";function r(){return o.useContext(t)}export{r as u};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/connect-Cyda_keb.js","assets/vendor-mui-core-BKQDHvL6.js","assets/vendor-react-DEoibe3W.js","assets/vendor-utils-CjMBJT5V.js","assets/useAsync-B8Nbc8so.js","assets/useAsync-CLWvmBXN.js","assets/vendor-hooks-DXGUREV9.js","assets/vendor-ux-did-connect-Dr2W2Pc9.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-DpSGLE7B.css","assets/index-B9ltKwuq.js","assets/vendor-arcblock-TgIfa3ko.js","assets/index-DOq-_YXu.css","assets/config-cqUeiJ9T.js","assets/index-DzlQfRxQ.js","assets/Done-DtZ1RTXT.js","assets/Google-DMO1DD8q.js","assets/cloneDeep-WT_kDeVd.js","assets/logo-uploader-50bLEHwJ.js","assets/index-DVQCgvFb.js","assets/page-header-Kn6r_XKH.js","assets/layout-D5xp7LhQ.js","assets/content-layout-qHJyxPYq.js","assets/step-actions-DTD9vsMp.js","assets/use-mobile-fdqINXKQ.js","assets/button-CO4tv2XS.js","assets/index-Cv_RcwHF.js","assets/config-space-XXX-dnS8.js","assets/spaces-U3nGmGRa.js","assets/api-Bf1onQOz.js","assets/connect-to-gwpYimRA.js","assets/DeleteOutline-DqdSj9ec.js","assets/format-error-BrmqJs5a.js","assets/domain-BEDI7va7.js","assets/domain-action-card-CkNEkjHm.js","assets/ExpandLess-Ddif_UHH.js","assets/permission-CC2IdTdZ.js","assets/session-C3Z84LF2.js","assets/dot-DqINfNl1.js","assets/confirm-C55dFhba.js","assets/actions-CHh4ckCh.js","assets/MoreHoriz-D6Wvugul.js","assets/delete-confirm-D1Xe3pLh.js","assets/click-to-copy-BxPDzy5A.js","assets/util-D5pnqiqz.js","assets/useSetState-CWq0AVWn.js","assets/InfoOutlined-CoMCPk7a.js","assets/index-DisBCigl.js","assets/CheckCircle-CJmQq3zs.js","assets/access-control-BIwE_lpL.js","assets/config-quCUUlRH.js","assets/fuel-DLt1un1y.js","assets/Launch-DNHBfbtb.js","assets/did-address-CaOBKHpX.js","assets/complete-BoUxpUyG.js","assets/launch-result-message-DucKBLPI.js","assets/get-safe-url-zHRp3aBu.js","assets/starting-progress-BhqlnMjX.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{S as z,L as Q,_ as d,c as _}from"./vendor-arcblock-TgIfa3ko.js";import{j as e,ah as T,v as q,e as K,bE as G,aa as X,ab as J,b7 as Y}from"./vendor-mui-core-BKQDHvL6.js";import{h as ee,f as te,r as i,i as se,j as c,k as oe}from"./vendor-react-DEoibe3W.js";import{A as o}from"./vendor-utils-CjMBJT5V.js";import{u as ae,aW as ne,n as A}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import{C as re}from"./config-space-XXX-dnS8.js";import{H as ie}from"./addon-CxsW-e44.js";import{S as le}from"./ServerLogo-b4GZ-IpN.js";import{n as pe,u as ce,o as V,q as de,r as ue,P as k,N as Le,f as he,S as me}from"./index-B9ltKwuq.js";import{g as fe}from"./get-safe-url-zHRp3aBu.js";import"./vendor-hooks-DXGUREV9.js";import"./lottie-web-jYmAQWuC.js";import"./spaces-U3nGmGRa.js";import"./api-Bf1onQOz.js";import"./QuestionMarkCircle-DK54eXUx.js";var E=function(h){return e.jsxs("svg",{...h,children:[e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z",fill:"url(#paint0_linear_615_426)"}),e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z",fill:"url(#paint1_linear_615_426)"}),e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"paint0_linear_615_426",x1:"31.72",y1:"95.7208",x2:"95.488",y2:"34.3249",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#0FA4B7"}),e.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),e.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]}),e.jsxs("linearGradient",{id:"paint1_linear_615_426",x1:"28.4374",y1:"99.2464",x2:"98.7613",y2:"44.9372",gradientUnits:"userSpaceOnUse",children:[e.jsx("stop",{stopColor:"#0FA4B7"}),e.jsx("stop",{offset:"0.494757",stopColor:"#1DC1C7"}),e.jsx("stop",{offset:"1",stopColor:"#2BE0D7"})]})]})]})};E.defaultProps={width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"};E.displayName="server-logo-notext";const xe=E,_e=T.span`
|
|
3
|
-
color: ${h=>h.theme.palette.error.main};
|
|
4
|
-
&::before {
|
|
5
|
-
content: '*';
|
|
6
|
-
}
|
|
7
|
-
`,C=_e,Ce=i.lazy(()=>d(()=>import("./connect-Cyda_keb.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),Ee=i.lazy(()=>d(()=>import("./config-cqUeiJ9T.js"),__vite__mapDeps([13,1,2,3,7,6,8,9,14,15,16,17,10,11,12,18,19,20,21,22,23,24,25]))),ge=i.lazy(()=>d(()=>import("./index-Cv_RcwHF.js"),__vite__mapDeps([26,1,2,7,3,6,8,9,20,10,11,12,27,28,29,30,31,32,23,24,21,22]))),je=i.lazy(()=>d(()=>import("./domain-BEDI7va7.js"),__vite__mapDeps([33,1,2,10,11,7,3,6,8,9,12,34,35,36,37,38,5,39,32,40,41,42,43,44,45,46,4,47,48,20,25,21,22,23,24]))),ye=i.lazy(()=>d(()=>import("./access-control-BIwE_lpL.js"),__vite__mapDeps([49,1,2,7,3,6,8,9,50,20,10,11,12,21,22,23,24,25]))),ve=i.lazy(()=>d(()=>import("./fuel-DLt1un1y.js"),__vite__mapDeps([51,1,2,3,52,7,6,8,9,53,20,10,11,12,21,22,23,24,25]))),Pe=i.lazy(()=>d(()=>import("./complete-BoUxpUyG.js"),__vite__mapDeps([54,1,2,7,3,6,8,9,10,11,12,55,56,25,21,22,57])));function He(){var R,w,I;const h=q(a=>a.breakpoints.down("md")),$=K(),{t,locale:B}=ae(),[g,D]=ee(),m=te(),{meta:u,blocklet:r,actions:l,loading:N}=pe(),O=localStorage.getItem("blocklet-server-url"),{session:j}=ce(),M=V("fromLauncher"),y=V("visitorId");y&&(ne(y),g.delete("visitorId"),D(g)),i.useEffect(()=>{de(),j.user&&(l==null||l.refreshMeta(),l==null||l.refreshBlocklet({showError:!1}))},[j.user]),i.useEffect(()=>{l.refreshFuel({showError:!1})},[(R=r==null?void 0:r.meta)==null?void 0:R.did]);const s=`${A.WELLKNOWN_SERVICE_PATH_PREFIX}/setup`,U=a=>{var f;const n=(f=a==null?void 0:a.capabilities)==null?void 0:f.didSpace;return n?n===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED||n===_.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP?{key:"did-space",name:e.jsxs(e.Fragment,{children:[t("setup.steps.didSpace")," ",e.jsx(C,{})]}),path:o(s,"did-space")}:n===_.BLOCKLET_APP_SPACE_REQUIREMENT.OPTIONAL?{key:"did-space",name:e.jsx(e.Fragment,{children:t("setup.steps.didSpace")}),path:o(s,"did-space")}:(console.warn(`capabilities.didSpace cannot take the value ${n}`),null):null},p=[{key:"access",name:t("setup.steps.access"),path:o(s,"access")},{key:"domain",name:t("setup.domain.title"),path:o(s,"domain")},U(r),{key:"config",name:e.jsxs(e.Fragment,{children:[t("setup.steps.config")," ",ue(u)&&e.jsx(C,{})]}),path:o(s,"config")},(I=(w=u==null?void 0:u.requirements)==null?void 0:w.fuels)!=null&&I.length?{key:"fuel",name:e.jsxs(e.Fragment,{children:[t("setup.steps.fuel")," ",e.jsx(C,{})]}),path:o(s,"fuel")}:null].filter(Boolean),x=p.findIndex(a=>`${k.replace(/\/$/,"")}${s}/${a.key}`===window.location.pathname),F=o(k,A.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${r==null?void 0:r.updatedAt}`),b=async a=>{const{search:n}=new URL(window.location.href);if(!a)p[x+1]?m(`${o(s,p[x+1].key)}${n}`):m(`${o(s,"complete")}${n}`);else{const f=p.findIndex(Z=>Z.key===a);f>-1?m(`${o(s,p[f].key)}${n}`):m(`${o(s,"complete")}${n}`)}await l.refreshBlocklet()},H=()=>{m(-1)};function L(a,n){return e.jsxs(Ce,{children:[!r&&e.jsx(X,{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",children:e.jsx(J,{})}),r&&e.jsx(a,{blocklet:r,...n,onNext:b,onPrevious:H,buttonText:x===p.length-1?t("setup.startNow"):""})]})}const v=()=>{window.open(fe(O,{allowDomains:null}))},W=h?e.jsx(xe,{onClick:v,width:"32",height:"32",style:{cursor:"pointer"}}):e.jsx(le,{onClick:v,width:"128",height:"48",style:{marginTop:-1,cursor:"pointer"}}),P=[{key:"install",name:t("launchBlocklet.steps.installApp"),path:o(s,"install")},{key:"setup",name:t("setup.steps.launchApp"),children:p}];let S=[{key:"agreement",name:t("launchBlocklet.introduction"),path:o(s,"agreement")},...P];return M&&(S=[{key:"purchase-space",name:t("launchBlocklet.steps.purchaseSpace")},{key:"prepare-space",name:t("launchBlocklet.steps.prepareSpace")},...P]),e.jsx(z,{steps:S,children:e.jsx(Le,{children:e.jsxs(re,{children:[e.jsx(G,{styles:Se}),e.jsx(Re,{children:e.jsx(Q,{locale:B,loading:N,blockletMeta:{...u,title:he.getDisplayName({...r,meta:u})},navLogo:W,pcWidth:"80%",style:{height:"100%"},logoUrl:F,useOfSkeleton:!1,headerEndAddons:e.jsx(ie,{SessionContext:me,sessionManagerProps:{disableLogout:!0}}),theme:$,launchingText:t("setup.title"),children:e.jsxs(se,{children:[e.jsx(c,{path:"access",element:L(ye)}),e.jsx(c,{path:"domain",element:L(je)}),e.jsx(c,{path:"did-space",element:L(ge)}),e.jsx(c,{path:"config",element:L(Ee)}),e.jsx(c,{path:"fuel",element:L(ve)}),e.jsx(c,{path:"complete",element:L(Pe)}),e.jsx(c,{path:"*",element:e.jsx(oe,{to:`access${window.location.search}`,replace:!0})})]})})})]})})})}const Se=Y`
|
|
8
|
-
html,
|
|
9
|
-
body,
|
|
10
|
-
#app,
|
|
11
|
-
#app > .wrapper {
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
`,Re=T("div")`
|
|
15
|
-
/* display: flex;
|
|
16
|
-
min-width: 0;
|
|
17
|
-
flex: 1 1 0; */
|
|
18
|
-
height: 100%;
|
|
19
|
-
|
|
20
|
-
& .layout-content {
|
|
21
|
-
min-width: 0;
|
|
22
|
-
flex: 1 1 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
& .ll-header {
|
|
26
|
-
@media (max-width: 960px) {
|
|
27
|
-
padding: 0 12px;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
`;export{He as default};
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import{v as D,j as t,ab as V,bE as G,aa as c,H as u,ap as X,b7 as Q,ah as _,w as J}from"./vendor-mui-core-BKQDHvL6.js";import{r as x,L as W}from"./vendor-react-DEoibe3W.js";import{w as Y,f as j}from"./vendor-hooks-DXGUREV9.js";import{A as Z}from"./vendor-utils-CjMBJT5V.js";import{d as ee}from"./PlayArrow-gSxq4eiM.js";import{d as te}from"./Error-BfFrp5Y1.js";import{u as M,a2 as y,G as oe,n as v,R as ne,a as S,a1 as ie,D as re}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import{W as se}from"./did-address-CaOBKHpX.js";import{b as ae,c as le}from"./vendor-arcblock-TgIfa3ko.js";import{S as ce}from"./ServerLogo-b4GZ-IpN.js";import{d as T,e as U,g as de,f as b,S as pe,h as me,j as he,k as ge,l as A,m as fe}from"./index-B9ltKwuq.js";import{H as ue}from"./addon-CxsW-e44.js";import{g as z}from"./get-safe-url-zHRp3aBu.js";import{p as xe,S as be,P as ke}from"./starting-progress-BhqlnMjX.js";import"./lottie-web-jYmAQWuC.js";import"./QuestionMarkCircle-DK54eXUx.js";function H({appInfo:e,...s}){const[o,r]=x.useState(!1),l=D(d=>d.breakpoints.down("md"))?32:48;return o?t.jsx(ie,{did:e.publisher,size:l}):t.jsx(re,{src:e.icon,alt:e.title,width:l,height:l,...s,onError:()=>r(!0)})}H.propTypes={appInfo:u.object.isRequired};const B=(e,s)=>b.findComponentByIdV2(e,s)||e;function We(){var L,N,R,C,I,P;const{t:e,locale:s}=M(),[o,r]=Y({blocklet:null,component:null,launcherSession:null,loading:!1,starting:!1,manageSubscriptionURL:""}),p=D(n=>n.breakpoints.down("md")),l=new URL(window.location.href),d=l.searchParams.get("componentId"),$=()=>{const n=l.searchParams.get("redirect")||"/";window.location.href=z(decodeURIComponent(n))},E=()=>{const n=setInterval(()=>{T.get("/blocklet/detail?nocache=1").then(({data:i})=>{r(m=>({...m,blocklet:i}));const a=B(i,d);if(a.status==="running"){$();return}a.status!=="starting"&&(r({blocklet:i,starting:!1}),i!==a&&r({component:a}),clearInterval(n))}).catch(i=>{r({loading:!1}),y.error(i.message)})},3e3)};x.useEffect(()=>{r({loading:!0}),T.get("/blocklet/detail?nocache=1").then(({data:n})=>{const i=B(n,d);if(r({blocklet:n,loading:!1}),i.status==="running"){$();return}r({blocklet:n}),n!==i&&r({component:i}),i.status==="starting"&&(r({starting:!0}),E())}).catch(n=>{r({loading:!1}),y.error(n.message)})},[]);const F=x.useCallback(()=>{r({loading:!0,starting:!0});const n=o.blocklet;if(!n)return;const i={did:n==null?void 0:n.meta.did};n.children.length>0&&(i.componentDids=n.children.map(a=>a.meta.did)),U.startBlocklet({input:i}).then(({blocklet:a})=>{r(m=>({...m,blocklet:a})),E()}).catch(a=>{y.error(a.message),r({loading:!1,starting:!1})})},[o.component,o.blocklet]);x.useEffect(()=>{var n;(n=o.blocklet)!=null&&n.controller&&(de({launcherUrl:o.blocklet.controller.launcherUrl,launcherSessionId:o.blocklet.controller.launcherSessionId,locale:s}).then(i=>{r({manageSubscriptionURL:i})}).catch(i=>{console.error("get manage subscription url error",i)}),U.getLauncherSession({input:{launcherSessionId:o.blocklet.controller.launcherSessionId,launcherUrl:o.blocklet.controller.launcherUrl}}).then(i=>{r({launcherSession:i.launcherSession}).catch(a=>{console.error("get launcher session error",a)})}))},[(L=o.blocklet)==null?void 0:L.controller]);const h=j(()=>{var n,i;return(i=(n=o.blocklet)==null?void 0:n.children)==null?void 0:i.length},[o.blocklet]),g=j(()=>{var n,i,a;return((a=(i=(n=o.blocklet)==null?void 0:n.children)==null?void 0:i.filter(m=>m.status==="running"))==null?void 0:a.length)||0},[o.blocklet]),f=j(()=>!h||!g?0:Math.round(g/h*100),[g,h]);if(!o.blocklet)return t.jsx(oe,{children:t.jsx(V,{})});const k={icon:`${v.WELLKNOWN_SERVICE_PATH_PREFIX}/blocklet/logo`,title:b.getDisplayName(o.blocklet),publisher:o.blocklet.appDid},w=localStorage.getItem("blocklet-server-url"),q=()=>{w&&window.open(z(w,{allowDomains:null}))},K=ne(xe,o.starting?{width:`${f}%`,"&::after":{width:`${f}%`},"&::before":{width:`${f}%`,animation:"shimmer 1.5s infinite cubic-bezier(0.4, 0.0, 0.2, 1)","@keyframes shimmer":{"0%":{width:0},"100%":{width:`${f}%`}}}}:{});return t.jsxs(je,{children:[t.jsx(G,{styles:we}),t.jsxs("header",{className:"root-header",children:[!p&&t.jsx("div",{className:"left",children:t.jsx(ce,{width:"128",height:"48",onClick:q,style:{cursor:w?"pointer":""}})}),t.jsx(ae,{children:t.jsx(ue,{SessionContext:pe})})]}),t.jsxs(ye,{elevation:0,children:[t.jsxs(ve,{children:[t.jsx(H,{appInfo:k}),t.jsxs("div",{className:"app-info_content",children:[t.jsx(c,{className:"app-info_name",children:k.title}),t.jsx(se,{size:14,className:"app-info_did",did:k.publisher})]})]}),((C=(R=(N=o.blocklet)==null?void 0:N.controller)==null?void 0:R.status)==null?void 0:C.value)!==le.BLOCKLET_CONTROLLER_STATUS.suspended&&t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(c,{className:"icon",children:t.jsx(ee,{})}),t.jsx(c,{className:"title",children:e("blocklet.startApplication")})]}),t.jsx(c,{className:"sub-title",children:o.starting?t.jsx(be,{blocklets:((I=o.blocklet)==null?void 0:I.children)??[]}):e("blocklet.startDescription",{name:o.component?b.getDisplayName(o.component,!0):b.getDisplayName(o.blocklet)})}),t.jsx(c,{mt:8,display:"flex",flexDirection:"column",alignItems:"center",gap:1,children:t.jsx(ke,{blocklets:((P=o.blocklet)==null?void 0:P.children)??[],status:o.starting?"starting":"",children:t.jsx(S,{sx:K,disabled:o.loading||o.starting,variant:"contained",color:"primary",size:"large",loading:o.starting,onClick:()=>F(),children:t.jsx("span",{style:{position:"relative",zIndex:2},children:o.starting?`(${g}/${h}) ${e("blocklet.starting")}`:e("blocklet.start")})})})})]}),me(o.blocklet)&&t.jsx(O,{blocklet:o.blocklet,launcherSession:o.launcherSession,manageSubscriptionURL:o.manageSubscriptionURL}),t.jsx(c,{mt:5,children:t.jsx(W,{className:"footer-link",to:`${v.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/overview`,children:e("blocklet.dashboard")})})]})]})}function O({blocklet:e,launcherSession:s,manageSubscriptionURL:o}){const{t:r,locale:p}=M();if(!e||!s)return"";const l=he(e,s),d=ge(e,s);return!l&&!d?"":t.jsxs(t.Fragment,{children:[t.jsxs(c,{className:"title-box",children:[t.jsx(te,{className:"icon-error"}),t.jsxs(c,{className:"title error",children:[l&&r("blocklet.suspended"),d&&r("blocklet.terminated")]})]}),t.jsxs(c,{className:"sub-title",children:[l&&r("blocklet.suspendedCausedByExpired",{deadline:A(s==null?void 0:s.reservedUntil,p)}),d&&r("blocklet.suspendedCausedByTerminated",{canceledAt:A(s==null?void 0:s.terminatedAt,p),deadline:fe(s==null?void 0:s.terminatedAt,p)})]}),t.jsxs(c,{mt:8,children:[l&&t.jsx(S,{component:X,style:{minWidth:200},variant:"contained",color:"primary",size:"large",target:"_blank",href:o||"#",children:r("blocklet.manageSubscription")}),d&&t.jsx(S,{component:W,to:Z(v.WELLKNOWN_SERVICE_PATH_PREFIX,"/admin/did-spaces"),style:{minWidth:200},variant:"contained",color:"primary",size:"large",children:r("common.backup")})]})]})}O.propTypes={blocklet:u.object.isRequired,launcherSession:u.object.isRequired,manageSubscriptionURL:u.string.isRequired};const we=Q`
|
|
2
|
-
html,
|
|
3
|
-
body,
|
|
4
|
-
#app,
|
|
5
|
-
#app > .wrapper {
|
|
6
|
-
height: 100%;
|
|
7
|
-
}
|
|
8
|
-
`,je=_.div`
|
|
9
|
-
width: 100vw;
|
|
10
|
-
height: 100%;
|
|
11
|
-
background: #f6f8fa;
|
|
12
|
-
display: flex;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
align-items: center;
|
|
15
|
-
|
|
16
|
-
.root-header {
|
|
17
|
-
position: fixed;
|
|
18
|
-
z-index: 200;
|
|
19
|
-
top: 0;
|
|
20
|
-
display: flex;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 68px;
|
|
23
|
-
align-items: center;
|
|
24
|
-
justify-content: flex-end;
|
|
25
|
-
padding: 24px;
|
|
26
|
-
max-width: 1245px;
|
|
27
|
-
|
|
28
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
29
|
-
padding: 14px 16px;
|
|
30
|
-
height: 56px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.left {
|
|
34
|
-
margin-top: 4px;
|
|
35
|
-
margin-right: auto;
|
|
36
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
37
|
-
margin-top: 0%;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.right {
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
45
|
-
button,
|
|
46
|
-
a {
|
|
47
|
-
padding-left: 8px;
|
|
48
|
-
padding-right: 8px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
`,ye=_(J)`
|
|
54
|
-
width: 80vw;
|
|
55
|
-
max-width: 1245px;
|
|
56
|
-
height: 80vh;
|
|
57
|
-
box-sizing: border-box;
|
|
58
|
-
padding: 32px;
|
|
59
|
-
&.MuiPaper-rounded {
|
|
60
|
-
border-radius: 8px;
|
|
61
|
-
}
|
|
62
|
-
position: relative;
|
|
63
|
-
display: flex;
|
|
64
|
-
justify-content: center;
|
|
65
|
-
align-items: center;
|
|
66
|
-
flex-direction: column;
|
|
67
|
-
|
|
68
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
69
|
-
width: 100vw;
|
|
70
|
-
height: 100%;
|
|
71
|
-
left: 0;
|
|
72
|
-
top: 0;
|
|
73
|
-
padding: 32px 0;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.MuiIconButton-root {
|
|
77
|
-
svg {
|
|
78
|
-
fill: #888;
|
|
79
|
-
}
|
|
80
|
-
&.Mui-disabled {
|
|
81
|
-
opacity: 0.4;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.title-box {
|
|
86
|
-
display: flex;
|
|
87
|
-
align-items: center;
|
|
88
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
89
|
-
margin-top: 60px;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.icon {
|
|
94
|
-
display: inline-flex;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
align-items: center;
|
|
97
|
-
width: 32px;
|
|
98
|
-
height: 32px;
|
|
99
|
-
border-radius: 100%;
|
|
100
|
-
background-color: ${e=>e.theme.palette.primary.main};
|
|
101
|
-
color: ${e=>e.theme.palette.common.white};
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.icon-error {
|
|
105
|
-
width: 32px;
|
|
106
|
-
height: 32px;
|
|
107
|
-
color: ${e=>e.theme.palette.error.main};
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.title {
|
|
111
|
-
margin-left: 12px;
|
|
112
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
113
|
-
font-size: 24px;
|
|
114
|
-
font-weight: bolder;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.error {
|
|
118
|
-
color: ${e=>e.theme.palette.error.main};
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.sub-title {
|
|
122
|
-
margin-top: 24px;
|
|
123
|
-
color: ${e=>e.theme.palette.grey[700]};
|
|
124
|
-
font-size: 16px;
|
|
125
|
-
max-width: 460px;
|
|
126
|
-
text-align: center;
|
|
127
|
-
word-break: break-word;
|
|
128
|
-
hyphens: auto;
|
|
129
|
-
|
|
130
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
131
|
-
padding: 0 32px;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.footer-link {
|
|
136
|
-
color: ${e=>e.theme.palette.primary.main};
|
|
137
|
-
}
|
|
138
|
-
`,ve=_.div`
|
|
139
|
-
display: flex;
|
|
140
|
-
align-items: center;
|
|
141
|
-
position: absolute;
|
|
142
|
-
left: 24px;
|
|
143
|
-
right: 24px;
|
|
144
|
-
top: 24px;
|
|
145
|
-
font-size: 16px;
|
|
146
|
-
font-weight: 500;
|
|
147
|
-
color: #222;
|
|
148
|
-
|
|
149
|
-
/* 禁止 app icon shrink */
|
|
150
|
-
> *:first-child {
|
|
151
|
-
flex: 0 0 auto;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.app-info_content {
|
|
155
|
-
padding-left: 16px;
|
|
156
|
-
overflow: hidden;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
.app-info_name {
|
|
160
|
-
max-width: 100%;
|
|
161
|
-
padding-right: 32px;
|
|
162
|
-
line-height: 1;
|
|
163
|
-
white-space: nowrap;
|
|
164
|
-
overflow: hidden;
|
|
165
|
-
text-overflow: ellipsis;
|
|
166
|
-
font-weight: bold;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.app-info_did {
|
|
170
|
-
transform: translate(0, 2px);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.app-info_did .did-address__text {
|
|
174
|
-
color: #666;
|
|
175
|
-
font-size: 14px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
${e=>e.theme.breakpoints.down("md")} {
|
|
179
|
-
top: 12px;
|
|
180
|
-
.app-info_did {
|
|
181
|
-
transform: translate(0, 0);
|
|
182
|
-
}
|
|
183
|
-
.app-info_did .did-address__text {
|
|
184
|
-
font-size: 12px;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
`;export{We as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i,aa as t,bL as C,bW as w,bX as k,bY as L,T as E}from"./vendor-mui-core-BKQDHvL6.js";import{u as P,L as R}from"./vendor-react-DEoibe3W.js";import{u as v,a as u,a2 as a,aP as F,n as d}from"./vendor-ux-did-connect-Dr2W2Pc9.js";import{a as T,u as f,l as S}from"./vendor-hooks-DXGUREV9.js";import{A as m}from"./vendor-utils-CjMBJT5V.js";import{u as I}from"./index-B9ltKwuq.js";import"./lottie-web-jYmAQWuC.js";import"./vendor-arcblock-TgIfa3ko.js";function X(){var c,l;const{api:b}=I(),h=P(),{t:n}=v(),r=new URLSearchParams(h.search).get("token"),e=T({error:"",finished:!1,loading:!1}),p=f(()=>{window.close(),window.location.replace("/")}),x=f(async()=>{try{e.loading=!0;const{data:o}=await b.post("/api/user/notification/unsubscribe",{token:r});o.success===!0?(e.finished=!0,a.success(n("notification.unsubscribeSucceed"))):(e.finished=!1,a.error(n("notification.unsubscribeFailed")))}catch(o){e.finished=!1,a.error(o.message||n("notification.unsubscribeFailed"))}finally{e.loading=!1}});S(()=>{if(!r)e.error=n("notification.unsubscribeTokenRequired");else{const o=F(r);if(!o)e.error=n("notification.unsubscribeTokenInvalid");else{const{exp:y}=o;y*1e3<=Date.now()&&(e.error=n("notification.unsubscribeTokenExpired"))}}});const s=(c=window==null?void 0:window.blocklet)==null?void 0:c.copyright,g=(s==null?void 0:s.owner)||((l=window==null?void 0:window.blocklet)==null?void 0:l.appName),j=(s==null?void 0:s.year)||new Date().getFullYear();return i.jsx(t,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",minHeight:"100vh",backgroundColor:"#fafafa"},children:i.jsxs(t,{sx:{width:"450px",maxWidth:"90%"},children:[i.jsx(t,{sx:{width:"100%"},children:i.jsx("img",{style:{height:"40px"},src:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-rect?imageFilter=convert&f=png"),alt:"blocklet logo"})}),i.jsxs(C,{variant:"outlined",sx:{my:1},children:[i.jsx(w,{title:e.finished?n("notification.unsubscribeSucceed"):n("notification.email.unsubscribe")}),i.jsxs(k,{sx:{minHeight:"10em"},children:[e.error?e.error:null,!e.error&&!e.finished?n("notification.email.unsubscribeDescription"):null,!e.error&&e.finished?i.jsxs(i.Fragment,{children:[n("notification.email.subscribeDescription")," ",i.jsx(R,{to:m(d.WELLKNOWN_SERVICE_PATH_PREFIX,"/user/settings"),color:"primary",children:n("notification.email.subscribe")})]}):null]}),i.jsxs(L,{sx:{justifyContent:"end!important"},children:[i.jsx(u,{size:"small",color:e.error?"error":"primary",variant:"outlined",onClick:p,children:n("common.close")}),e.error||e.finished?null:i.jsx(u,{size:"small",color:"primary",variant:"contained",onClick:x,loading:e.loading,children:n("notification.unsubscribe")})]})]}),i.jsxs(E,{variant:"body2",color:"gray",children:["Copyright © ",j," ",g]})]})})}export{X as default};
|