@abtnode/webapp 1.16.29-beta-db5c4ed6 → 1.16.29-beta-a076832b
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/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-DQn3cqMW.js → Add-BhAOgw8n.js} +1 -1
- package/dist/assets/{ArrowDropDown-DgSq2iBW.js → ArrowDropDown-BhDZI_jd.js} +1 -1
- package/dist/assets/{Autocomplete-D45bpyUt.js → Autocomplete-chf9WG4F.js} +1 -1
- package/dist/assets/{Breadcrumbs-vXPlhiXQ.js → Breadcrumbs-Un40qFmK.js} +1 -1
- package/dist/assets/{ButtonGroup-BJxZnIfi.js → ButtonGroup-BE_QoGeC.js} +1 -1
- package/dist/assets/{CheckCircle-CSrK3P5m.js → CheckCircle-B2UAY6EW.js} +1 -1
- package/dist/assets/{ChevronLeft-Cka_f59Q.js → ChevronLeft-LgQFTPg9.js} +1 -1
- package/dist/assets/{ChevronRight-BGYzd2RP.js → ChevronRight-R1AD6T8t.js} +1 -1
- package/dist/assets/{Close-CwmvmaYY.js → Close-BA4_6LGT.js} +1 -1
- package/dist/assets/{Delete-DD7mLtbV.js → Delete-BuQlLthh.js} +1 -1
- package/dist/assets/DeleteOutline-BuR7k_j3.js +1 -0
- package/dist/assets/DeleteOutline-CfWsbc1a.js +1 -0
- package/dist/assets/{Done-DwujAils.js → Done-CbG1n7TV.js} +1 -1
- package/dist/assets/{Edit-C50TQSDX.js → Edit-D2R20RFt.js} +1 -1
- package/dist/assets/{EditIcon-kalr65uP.js → EditIcon-DWIVTczi.js} +1 -1
- package/dist/assets/{FilterList-DQ4qv4dK.js → FilterList-gGx11q-p.js} +1 -1
- package/dist/assets/{Google-3BfCV8G_.js → Google-CpcA0NCN.js} +1 -1
- package/dist/assets/{Https-BmyDNa7Y.js → Https-YbDZUE--.js} +1 -1
- package/dist/assets/{InputAdornment-Ca2Af6jh.js → InputAdornment-BPwm2dnh.js} +1 -1
- package/dist/assets/{InputLabel-D4R09Jce.js → InputLabel-CfRvg3E0.js} +1 -1
- package/dist/assets/{LastPage-GxCoDWrp.js → LastPage-BkIsmfi2.js} +1 -1
- package/dist/assets/{Launch-CgKKCuVE.js → Launch-BFRTKCgX.js} +1 -1
- package/dist/assets/{Link-DRvMIooJ.js → Link-BZodiBIz.js} +1 -1
- package/dist/assets/{LoadingButton-BkYiSDzb.js → LoadingButton-DQ3wXyLh.js} +1 -1
- package/dist/assets/{LockIcon-CF3-It7s.js → LockIcon-CF3Yl9tf.js} +1 -1
- package/dist/assets/{Loop-z2LWMmIN.js → Loop-DJX-NWYU.js} +1 -1
- package/dist/assets/{MoreVert-DUbpisWb.js → MoreVert-Cw5JqD-n.js} +1 -1
- package/dist/assets/{Pagination-R49NcVMS.js → Pagination-Dw6rLiDa.js} +1 -1
- package/dist/assets/{Public-Bsj8SC7o.js → Public-4ZipZDUd.js} +1 -1
- package/dist/assets/{SchemaReference.es-iQvrSN65.js → SchemaReference.es-C2JY9xEh.js} +1 -1
- package/dist/assets/{Search-BJQlC2tf.js → Search-Co3tOmY1.js} +1 -1
- package/dist/assets/{Select-Dir7Eleh.js → Select-BHyxLJXO.js} +1 -1
- package/dist/assets/{Skeleton-C1foIJDy.js → Skeleton-FWWrVymY.js} +1 -1
- package/dist/assets/{Slider-DUhMdZ8E.js → Slider-CTrqzFQ0.js} +1 -1
- package/dist/assets/{Stepper-BmHFaVU-.js → Stepper-BYinN7qr.js} +1 -1
- package/dist/assets/{TextField-DrpVwtbW.js → TextField-DsYRZFfL.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-B-GBbZiA.js → ToggleButtonGroup-LuLWYYav.js} +1 -1
- package/dist/assets/{ViewList-Du_jkxCT.js → ViewList-IW1QaH_L.js} +1 -1
- package/dist/assets/{actions-C3sU2Ddh.js → actions-DCJ-sSPn.js} +1 -1
- package/dist/assets/{actions-aBeGAWlf.js → actions-DkgRiPBw.js} +1 -1
- package/dist/assets/{agreement-CZNFuXRD.js → agreement-DByQv9ZX.js} +1 -1
- package/dist/assets/api-Bm6QocBj.js +1 -0
- package/dist/assets/{app-avatar-C8eXlLv7.js → app-avatar-Cx6kCeuS.js} +1 -1
- package/dist/assets/{audit-logs-MEDvpc7h.js → audit-logs-XHAxITYC.js} +1 -1
- package/dist/assets/blocklet-sVlwX65X.js +1 -0
- package/dist/assets/{brace-fold.es-B9fSdEU8.js → brace-fold.es-LH9Jpy3f.js} +1 -1
- package/dist/assets/{bundle-avatar-OSJKvWqT.js → bundle-avatar-D3srwykJ.js} +1 -1
- package/dist/assets/{chart-CH8M9EVl.js → chart-CwUcOCm9.js} +1 -1
- package/dist/assets/{click-to-copy-DXvKjv09.js → click-to-copy-CPgkX4m2.js} +1 -1
- package/dist/assets/{closebrackets.es-BXZB1Qr2.js → closebrackets.es-CZSR_3xe.js} +1 -1
- package/dist/assets/{codemirror.es-eOhYWqBu.js → codemirror.es-CDBPSM3n.js} +1 -1
- package/dist/assets/{comment.es-kwvrJJEn.js → comment.es-DGH4itKk.js} +1 -1
- package/dist/assets/{config-navigation-Ctjl7Q09.js → config-navigation-NRSeF0zB.js} +1 -1
- package/dist/assets/{delete-confirm-BQlN8F7p.js → delete-confirm-DGNC6LoB.js} +1 -1
- package/dist/assets/{detail-DF7saIlF.js → detail-gUZ7dE3r.js} +3 -3
- package/dist/assets/{dialog.es-nrprHWg2.js → dialog.es-BCpHrEUI.js} +1 -1
- package/dist/assets/{download-CJFZXJUK.js → download-cKQNB8IS.js} +1 -1
- package/dist/assets/{foldgutter.es-DarIv8r7.js → foldgutter.es-B4z5FPpx.js} +1 -1
- package/dist/assets/getValidReactChildren-CYcUTCCR.js +1 -0
- package/dist/assets/{hint.es-BRl3gS64.js → hint.es-CjtvhU7v.js} +1 -1
- package/dist/assets/{hint.es2-C6RN76yx.js → hint.es2-C3fkpJdT.js} +1 -1
- package/dist/assets/{iframe-Cay9rSYx.js → iframe-a4uHsJw3.js} +1 -1
- package/dist/assets/{index-Btn4YKyJ.js → index-223JGPy0.js} +1 -1
- package/dist/assets/{index-BNQ7lPMP.js → index-7DZ48QpY.js} +1 -1
- package/dist/assets/{index-BHUo4xfz.js → index-987rzvE8.js} +1 -1
- package/dist/assets/{index--HL1x2Ao.js → index-9D4yHZMO.js} +1 -1
- package/dist/assets/{index-BcHL3W7d.js → index-Asa_0R8u.js} +1 -1
- package/dist/assets/{index-CFSUHZ6I.js → index-B6yK_bzX.js} +3 -3
- package/dist/assets/{index-BpbNBF5W.js → index-BH5Du5OK.js} +3 -3
- package/dist/assets/{index-DroD8EXA.js → index-BPGGylov.js} +1 -1
- package/dist/assets/{index-mn6_lk6h.js → index-BS3cETry.js} +5 -5
- package/dist/assets/{index-qMPXnPuV.js → index-BdXc-VnA.js} +1 -1
- package/dist/assets/{index-DIE6fYSQ.js → index-Bl4RVAyg.js} +1 -1
- package/dist/assets/{index-NuGKx8L8.js → index-BooGyAWJ.js} +1 -1
- package/dist/assets/{index-CW48XZK8.js → index-BsnWcB_C.js} +1 -1
- package/dist/assets/{index-Wzigi2fg.js → index-ByUD-X5g.js} +1 -1
- package/dist/assets/{index-DIXftOyc.js → index-Byw0qEee.js} +1 -1
- package/dist/assets/index-C32jjYE0.js +54 -0
- package/dist/assets/{index-Bq7tYdVD.js → index-C4vYMHes.js} +1 -1
- package/dist/assets/{index-tEOo6QqD.js → index-C7XdmdZm.js} +1 -1
- package/dist/assets/{index-C30eBcf3.js → index-CaILkSHA.js} +2 -2
- package/dist/assets/{index-CrL1aK9F.js → index-CbVpP-kP.js} +1 -1
- package/dist/assets/{index-BFaWpopy.js → index-CiHdSPzG.js} +1 -1
- package/dist/assets/{index-CMfXUntK.js → index-CmnxH5_7.js} +1 -1
- package/dist/assets/{index-CFGfdRbL.js → index-CuDSWVTP.js} +1 -1
- package/dist/assets/{index-k_fGqveR.js → index-CuQoWTSG.js} +1 -1
- package/dist/assets/{index-DlOF8Gqo.js → index-D21hPRpg.js} +1 -1
- package/dist/assets/{index-DT2_9fGF.js → index-D2bnoRiO.js} +1 -1
- package/dist/assets/{index-CABSlD6A.js → index-D3BiJZx7.js} +1 -1
- package/dist/assets/{index-DaJYuGOJ.js → index-D858U3Qw.js} +1 -1
- package/dist/assets/{index-CFKgBVg-.js → index-DCdEnHXm.js} +1 -1
- package/dist/assets/index-DECoPT7p.js +21 -0
- package/dist/assets/{index-Dyq4IyeC.js → index-DGMii6rV.js} +1 -1
- package/dist/assets/{index-D2i4ZR4J.js → index-DLXcR0K0.js} +1 -1
- package/dist/assets/{index-S4EMvNri.js → index-DesqGCgv.js} +1 -1
- package/dist/assets/{index-BO13G4BO.js → index-DlnomLD1.js} +1 -1
- package/dist/assets/{index-Cd6JqFfP.js → index-Do9FcEok.js} +1 -1
- package/dist/assets/{index-DSMNya_x.js → index-Dp7ygnu_.js} +1 -1
- package/dist/assets/{index-2z9-wC0z.js → index-DtSAlyAb.js} +2 -2
- package/dist/assets/{index-r7R5IelG.js → index-QpveLXno.js} +1 -1
- package/dist/assets/{index-B-D5pRTJ.js → index-ZT9QeB3O.js} +1 -1
- package/dist/assets/{index-D-Vuoioo.js → index-dI-5DMUE.js} +1 -1
- package/dist/assets/{index-Gy1QJcJ2.js → index-erVE_nO9.js} +10 -10
- package/dist/assets/{index-C6_9iL4I.js → index-iAyUVxpq.js} +1 -1
- package/dist/assets/{index-CcrJJ2au.js → index-ltfZ8gtL.js} +1 -1
- package/dist/assets/{index-qqXmVMwc.js → index-rDmYbmrh.js} +1 -1
- package/dist/assets/{index.es-D1C7OtmS.js → index.es-D7AXw11H.js} +1 -1
- package/dist/assets/{index.esm-BUiTPKrv.js → index.esm-UKhIq9Zf.js} +1 -1
- package/dist/assets/{info-addon.es-C6yRBU5l.js → info-addon.es-BOBKDmMJ.js} +1 -1
- package/dist/assets/{info.es-DN_l0kaO.js → info.es-TxCSWnxL.js} +1 -1
- package/dist/assets/{install-from-url-MsescETE.js → install-from-url-C2MMBwn8.js} +1 -1
- package/dist/assets/{invitation-C2gEFjl6.js → invitation-fKgtV8Zz.js} +1 -1
- package/dist/assets/{is-path-prefix-equal-Du3BuD2Q.js → is-path-prefix-equal-DSWbb6Lw.js} +1 -1
- package/dist/assets/{isEqual-iiwY4iir.js → isEqual-j-zS_8Gf.js} +1 -1
- package/dist/assets/{item-BRRPCHyk.js → item-DafV54vj.js} +1 -1
- package/dist/assets/{javascript.es-mbpWdj5A.js → javascript.es-Bs8LWftY.js} +1 -1
- package/dist/assets/{jump-to-line.es-DFRr7i_x.js → jump-to-line.es-D-yW_11z.js} +1 -1
- package/dist/assets/{jump.es-BvCvZeFx.js → jump.es-BOkuipP6.js} +1 -1
- package/dist/assets/{line-DVrvRbGP.js → line-BT-CqrvO.js} +3 -3
- package/dist/assets/{lint.es-DMdq-Y-g.js → lint.es-Bnw9EvpL.js} +1 -1
- package/dist/assets/{lint.es2-Dqt3569F.js → lint.es2-ClUYPmWE.js} +1 -1
- package/dist/assets/{lint.es3-D3U2VWsd.js → lint.es3-Wt4762FH.js} +1 -1
- package/dist/assets/{list-header-BDxctf6E.js → list-header-D8gIqGsc.js} +1 -1
- package/dist/assets/{log-CSpSWkjX.js → log-B4RGVLfQ.js} +1 -1
- package/dist/assets/{lottie-CbqhvmtY.js → lottie-DPC4uwjn.js} +1 -1
- package/dist/assets/{matchbrackets.es-BPOu4LMM.js → matchbrackets.es-B_DBzsmq.js} +1 -1
- package/dist/assets/{memory-BISFPxDW.js → memory-BkPehB2B.js} +1 -1
- package/dist/assets/{mode.es-Z1DAbN8t.js → mode.es-Rcfl9bQx.js} +1 -1
- package/dist/assets/{mode.es2-CHQiAyxP.js → mode.es2-q3QJyvaG.js} +1 -1
- package/dist/assets/{mode.es3-Cj_KuR6d.js → mode.es3-BFNoOjTH.js} +1 -1
- package/dist/assets/{onlineParser.es-B9MCqAnq.js → onlineParser.es-Co9RB_dz.js} +1 -1
- package/dist/assets/{overview-C6LgKKEI.js → overview-B0Vrv3iN.js} +1 -1
- package/dist/assets/{react-WuDSAoir.js → react-DspsQPdu.js} +3 -3
- package/dist/assets/{redux-CD2ncFeP.js → redux-CW-2wISG.js} +1 -1
- package/dist/assets/{resource-dialog-BQqHx66M.js → resource-dialog-B2JtbLNW.js} +1 -1
- package/dist/assets/{runtime-CpSf_4mO.js → runtime-Cdoj20eA.js} +1 -1
- package/dist/assets/{search.es-D1a1zW9L.js → search.es-CZGl1gJE.js} +1 -1
- package/dist/assets/{searchcursor.es-Ch8qmAsh.js → searchcursor.es-CV5CjRq7.js} +1 -1
- package/dist/assets/service-DM6evFxx.js +1 -0
- package/dist/assets/{shorten-label-C4kZR0n4.js → shorten-label-MNOvw9uc.js} +1 -1
- package/dist/assets/{show-hint.es-u6p2CZ_T.js → show-hint.es-Dv8MKhoo.js} +1 -1
- package/dist/assets/{slicedToArray-CbnyPXnm.js → slicedToArray-BjdTUeMu.js} +1 -1
- package/dist/assets/{spaces-BiapvYKU.js → spaces-CJAn8A_O.js} +1 -1
- package/dist/assets/{sublime.es-U_aIS_89.js → sublime.es-CeJNrSLR.js} +1 -1
- package/dist/assets/{switch-control-DkswRhHo.js → switch-control-DRGFY74g.js} +1 -1
- package/dist/assets/{table-icons-B2SKzxW9.js → table-icons-BL8xSB3P.js} +2 -2
- package/dist/assets/{tag-BfKVgkWM.js → tag-BcsNyCIC.js} +1 -1
- package/dist/assets/{team-D-J7HAOY.js → team-BwAkC099.js} +1 -1
- package/dist/assets/{toUpper-DVlFUiz7.js → toUpper-Cc1D9AuZ.js} +1 -1
- package/dist/assets/{traffic-Uf5GnmE4.js → traffic-D8r3k_ae.js} +1 -1
- package/dist/assets/{url-evaluation-Db5FZwb_.js → url-evaluation-Ddzyc50Z.js} +1 -1
- package/dist/assets/{url-join-Du3smYaq.js → url-join-BdHqt1dS.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-DH0VryKJ.js → use-blocklet-info-for-connect-did-spaces-ByiBXoYS.js} +1 -1
- package/dist/assets/{useLocalStorage-BrzpK517.js → useLocalStorage-xuSREX68.js} +1 -1
- package/dist/assets/{util-BNwGe21a.js → util-BxfggyNA.js} +1 -1
- package/dist/assets/{wait-container-DPHYN0Ie.js → wait-container-Cb5wu-yb.js} +1 -1
- package/dist/assets/{withStyles-DN7-rDVx.js → withStyles-Bix6STf4.js} +1 -1
- package/dist/assets/{wrap-locale-BefWbM-O.js → wrap-locale-C2eTlgXw.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/DeleteOutline-Cb2SX8N_.js +0 -1
- package/dist/assets/api-hFKJ6jO0.js +0 -1
- package/dist/assets/blocklet-DbaWAVgP.js +0 -1
- package/dist/assets/getValidReactChildren-DC9QCktM.js +0 -1
- package/dist/assets/index-5a8_1U30.js +0 -21
- package/dist/assets/index-BQIiWzqe.js +0 -54
- package/dist/assets/service-CGBEuf5u.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cz as P,dD as M,cw as E,cy as g,dE as Y,dF as N,cx as j}from"./index-
|
|
1
|
+
import{cz as P,dD as M,cw as E,cy as g,dE as Y,dF as N,cx as j}from"./index-DtSAlyAb.js";import{a as X}from"./isEqual-j-zS_8Gf.js";var V={},i={},d={},q=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(d,"__esModule",{value:!0});d.toStrictHex=d.toBytes=d.toBits=d.DID_PREFIX=void 0;const K=q(M),H=g,v="did:abt:";d.DID_PREFIX=v;const G=e=>{try{if((0,H.isHexStrict)(e))return E.from((0,H.stripHexPrefix)(e),"hex");let t=(0,H.fromBase58)(e.replace(v,""));for(;t.length<26;)t=E.concat([E.from([0]),t]);return t}catch(t){throw new Error(`Cannot convert DID string to byte array: ${t.message}`)}};d.toBytes=G;const J=(e,t)=>(0,K.default)((0,H.toBN)(e).toString(2),t,"0");d.toBits=J;const z=(e,t)=>{const s=e.replace(/^0x/i,"");return typeof t=="number"&&t%2===0?(0,K.default)(e,t,"0"):s.length%2===0?s:`0${s}`};d.toStrictHex=z;var $=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});i.DidType=i.toChecksumAddress=i.isEthereumDid=i.isEthereumType=i.toTypeInfoStr=i.toTypeInfo=i.fromTypeInfo=i.DID_TYPE_ETHEREUM=i.DID_TYPE_ARCBLOCK=void 0;const m=g,D=$(Y),W=$(X),C=$(N),o=j,T=d,b={pk:"key",address:"encoding"},B={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ED25519,hash:o.types.HashType.SHA3,address:o.types.EncodingType.BASE58};i.DID_TYPE_ARCBLOCK=B;const R={role:o.types.RoleType.ROLE_ACCOUNT,pk:o.types.KeyType.ETHEREUM,hash:o.types.HashType.KECCAK,address:o.types.EncodingType.BASE16};i.DID_TYPE_ETHEREUM=R;const F=e=>{const t=["pk","hash","address"];return(0,W.default)((0,C.default)(e,t),(0,C.default)(R,t))};i.isEthereumType=F;const w=e=>{const t=(0,m.toAddress)(e);return/^(0x)?[0-9a-f]{40}$/i.test(t)?/^(0x|0X)?[0-9a-f]{40}$/.test(t)||/^(0x|0X)?[0-9A-F]{40}$/.test(t)?!0:Q(t):!1};i.isEthereumDid=w;const Q=e=>{const t=e.replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t.toLowerCase()).replace(/^0x/i,"");for(let r=0;r<40;r++)if(parseInt(s[r],16)>7&&t[r].toUpperCase()!==t[r]||parseInt(s[r],16)<=7&&t[r].toLowerCase()!==t[r])return!1;return!0},Z=e=>{if(typeof e>"u")return"";if(!/^(0x)?[0-9a-f]{40}$/i.test(e))throw new Error(`Given address "${e}" is not a valid Ethereum address.`);const t=e.toLowerCase().replace(/^0x/i,""),s=o.Hasher.Keccak.hash256(t).replace(/^0x/i,"");let r="0x";for(let n=0;n<t.length;n++)parseInt(s[n],16)>7?r+=t[n].toUpperCase():r+=t[n];return r};i.toChecksumAddress=Z;function k(e={}){let t={};["default","arcblock"].includes(e)?t=B:["eth","ethereum"].includes(e)?t=R:t={...B,...e};const{role:s,pk:r,hash:n,address:u}=t;Object.keys(t).forEach(l=>{const _=(0,D.default)(`${b[l]||l}Type`);if(Object.values(o.types[_]).includes(t[l])===!1)throw new Error(`Unsupported ${l} type: ${t[l]}`)});const p={role:s,pk:r,hash:n,address:u};return F(p)===!1&&[o.types.RoleType.ROLE_NODE,o.types.RoleType.ROLE_VALIDATOR,o.types.RoleType.ROLE_TETHER,o.types.RoleType.ROLE_SWAP].includes(p.role)&&(p.hash=o.types.HashType.SHA2),p}i.DidType=k;k.toJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=n[u.indexOf(e[s])],t},{});k.fromJSON=e=>Object.keys(e).reduce((t,s)=>{const r=(0,D.default)(`${b[s]||s}Type`),n=Object.keys(o.types[r]),u=Object.values(o.types[r]);return t[s]=u[n.indexOf(e[s])],t},{});const x=e=>{const t=k(e),s=(0,T.toBits)(t.role,6),r=(0,T.toBits)(t.pk,5),n=(0,T.toBits)(t.hash,5),u=`${s}${r}${n}`,p=(0,m.stripHexPrefix)((0,m.numberToHex)(parseInt(u,2)));return(0,T.toStrictHex)(p,4)};i.fromTypeInfo=x;const L=e=>{let t={};try{if(w(e))t=R;else{const r=(0,T.toBytes)(e).slice(0,2),n=(0,T.toStrictHex)(E.from(r).toString("hex")),u=(0,T.toBits)(new m.BN(n,16),16),p=u.slice(0,6),l=u.slice(6,11),_=u.slice(11,16);t={role:parseInt(p,2),pk:parseInt(l,2),hash:parseInt(_,2),address:(0,m.isHex)((0,m.toAddress)(e))?o.types.EncodingType.BASE16:o.types.EncodingType.BASE58}}return Object.keys(t).forEach(s=>{Object.values(o.types[`${(0,D.default)(b[s]||s)}Type`]).includes(t[s])===!1&&delete t[s]}),t}catch{return t}};i.toTypeInfo=L;const ee=e=>{const t=L(e);return Object.keys(t).reduce((s,r)=>{const n=o.types[`${(0,D.default)(b[r]||r)}Type`];return s[r]=Object.keys(n).find(u=>n[u]===t[r]),s},{})};i.toTypeInfoStr=ee;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DID_TYPE_ETHEREUM=e.DID_TYPE_ARCBLOCK=e.DID_PREFIX=e.DidType=e.fromTypeInfo=e.toTypeInfoStr=e.toTypeInfo=e.isEthereumType=e.isEthereumDid=e.isValid=e.isFromPublicKey=e.toDid=e.toAddress=e.fromHash=e.fromPublicKeyHash=e.fromPublicKey=e.fromSecretKey=e.toStrictHex=e.types=void 0;const t=j;Object.defineProperty(e,"types",{enumerable:!0,get:function(){return t.types}});const s=g;Object.defineProperty(e,"toAddress",{enumerable:!0,get:function(){return s.toAddress}}),Object.defineProperty(e,"toDid",{enumerable:!0,get:function(){return s.toDid}});const r=i;Object.defineProperty(e,"DidType",{enumerable:!0,get:function(){return r.DidType}}),Object.defineProperty(e,"DID_TYPE_ARCBLOCK",{enumerable:!0,get:function(){return r.DID_TYPE_ARCBLOCK}}),Object.defineProperty(e,"DID_TYPE_ETHEREUM",{enumerable:!0,get:function(){return r.DID_TYPE_ETHEREUM}}),Object.defineProperty(e,"fromTypeInfo",{enumerable:!0,get:function(){return r.fromTypeInfo}}),Object.defineProperty(e,"isEthereumDid",{enumerable:!0,get:function(){return r.isEthereumDid}}),Object.defineProperty(e,"isEthereumType",{enumerable:!0,get:function(){return r.isEthereumType}}),Object.defineProperty(e,"toTypeInfo",{enumerable:!0,get:function(){return r.toTypeInfo}}),Object.defineProperty(e,"toTypeInfoStr",{enumerable:!0,get:function(){return r.toTypeInfoStr}});const n=d;Object.defineProperty(e,"DID_PREFIX",{enumerable:!0,get:function(){return n.DID_PREFIX}}),Object.defineProperty(e,"toStrictHex",{enumerable:!0,get:function(){return n.toStrictHex}});const u=(y,a)=>{const c=(0,r.DidType)(a),f=(0,t.getSigner)(c.pk).getPublicKey(y);return p(f.indexOf("0x")===0?f:`0x${f}`,c)};e.fromSecretKey=u;const p=(y,a)=>{const c=(0,r.DidType)(a),h=(0,t.getHasher)(c.hash)(y,1);return l(h,c)};e.fromPublicKey=p;const l=(y,a)=>{const c=(0,r.DidType)(a),f=(0,s.stripHexPrefix)(y).slice(0,40),h=(0,t.getHasher)(c.hash),I=(0,r.fromTypeInfo)(c),S=(0,s.stripHexPrefix)(h(`0x${I}${f}`,1)).slice(0,8),O=`0x${I}${f}${S}`;return(0,r.isEthereumType)(c)?(0,r.toChecksumAddress)(`0x${y.slice(-40)}`):c.address===t.types.EncodingType.BASE58?(0,s.toBase58)(O):O};e.fromPublicKeyHash=l;const _=(y,a=t.types.RoleType.ROLE_ACCOUNT)=>{const c=Object.keys(t.types.RoleType),f=Object.values(t.types.RoleType);if(f.indexOf(a)===-1)throw new Error(`Unsupported role type ${a} when gen ddi from hash`);const h=(0,r.DidType)({role:t.types.RoleType[c[f.indexOf(a)]]});return l(y,h)};e.fromHash=_;const U=(y,a)=>{if(A(y)===!1)return!1;const c=(0,r.toTypeInfo)(y),f=p(a,c),h=y.replace(n.DID_PREFIX,"");return f===h};e.isFromPublicKey=U;const A=y=>{if(!y)return!1;const a=(0,s.toAddress)(String(y)),{hash:c}=(0,r.toTypeInfo)(a);if(typeof c>"u")return!1;if((0,r.isEthereumDid)(a))return!0;const f=(0,t.getHasher)(c),h=(0,n.toBytes)(a),I=(0,n.toStrictHex)(E.from(h.slice(0,22)).toString("hex")),S=(0,n.toStrictHex)(E.from(h.slice(22,26)).toString("hex")),O=(0,s.stripHexPrefix)(f(`0x${I}`,1)).slice(0,8);return S===O};e.isValid=A})(V);export{V as l};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-
|
|
1
|
+
import{g as O,_ as F,P as o,s as Q,j as e,I as Y,r as p,u as q,c as X,a as P,b as R,L as J,d as K,e as Z,f as ee,h as ne,W as T,i as te,T as j,k as ae,l as b,m as g,G as v,n as V,p as se,C as re,o as L}from"./index-DtSAlyAb.js";import{f as oe}from"./index-D9k2I5J1.js";import{I as E}from"./index-9D4yHZMO.js";import{C as I}from"./click-to-copy-CPgkX4m2.js";import{w as ie}from"./withStyles-Bix6STf4.js";var le=F,ce=le(function(n,i,r){return n+(r?" ":"")+i.toLowerCase()}),me=ce;const de=O(me);function w({icon:n,value:i,name:r,url:x,animated:c,LinkComponent:l,prefix:d}){const s=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"metric__image",children:e.jsx(Y,{name:n,alt:typeof r=="string"?r:"",size:30,prefix:d,color:"#222222"})}),e.jsxs("div",{children:[e.jsx("div",{className:`metric__number ${c?"metric__number--animated":""}`,dangerouslySetInnerHTML:{__html:i}}),e.jsx("div",{className:"metric__name",children:r})]})]});return e.jsx(ue,{children:x?e.jsx(l,{to:x,children:s}):s})}w.propTypes={icon:o.string.isRequired,value:o.oneOfType([o.string,o.number]).isRequired,name:o.node.isRequired,animated:o.bool,url:o.string,LinkComponent:o.any,prefix:o.string};w.defaultProps={animated:!1,url:"",LinkComponent:null,prefix:"/images"};const ue=Q("div")`
|
|
2
2
|
border-left: 1px solid ${n=>n.theme.typography.color.main};
|
|
3
3
|
padding: 10px 0 10px 16px;
|
|
4
4
|
@media (max-width: ${n=>n.theme.breakpoints.values.sm}px) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,f as n,j as t,n as e}from"./index-
|
|
1
|
+
import{r as o,f as n,j as t,n as e}from"./index-DtSAlyAb.js";import{R as r}from"./index-223JGPy0.js";function i(){const{t:s}=o.useContext(n);return t.jsx(a,{style:{paddingTop:"25vh"},children:t.jsx(r,{status:"404",description:s("noMatch.desc"),style:{backgroundColor:"transparent"}})})}const a=e.main``;export{i as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as B,j as e,g as m3,bk as _,q as X,m as Y,D as Z,B as v,C as k,w as Ae,J as He,K as n3,P as S,bG as w,n as Q,cc as q,dC as z,fE as b3,aW as le,aX as ce,a2 as j,ad as h3,A as R,fF as Ee,O as h,fG as Ie,M as De,b as ue,aK as de,aL as Je,F as k3,S as w3,aN as a3,W as K3,cz as f3,fH as Fe,fI as pe,cx as X3,cw as fe,cy as Z3,fJ as Ge,fK as me,dF as he,fL as ge,fM as ye,fN as Be,v as Ne,ax as d3,T as Te,f as Oe,H as Se,U as M3}from"./index-
|
|
1
|
+
import{r as B,j as e,g as m3,bk as _,q as X,m as Y,D as Z,B as v,C as k,w as Ae,J as He,K as n3,P as S,bG as w,n as Q,cc as q,dC as z,fE as b3,aW as le,aX as ce,a2 as j,ad as h3,A as R,fF as Ee,O as h,fG as Ie,M as De,b as ue,aK as de,aL as Je,F as k3,S as w3,aN as a3,W as K3,cz as f3,fH as Fe,fI as pe,cx as X3,cw as fe,cy as Z3,fJ as Ge,fK as me,dF as he,fL as ge,fM as ye,fN as Be,v as Ne,ax as d3,T as Te,f as Oe,H as Se,U as M3}from"./index-DtSAlyAb.js";import{d as g3}from"./Add-BhAOgw8n.js";import{S as o3}from"./index-BPGGylov.js";import{d as l3}from"./EditIcon-DWIVTczi.js";import{d as Ce}from"./LockIcon-CF3Yl9tf.js";import{L as y3,S as B3,d as xe}from"./list-header-D8gIqGsc.js";import{a as s3}from"./team-BwAkC099.js";import{T as W,F as Pe}from"./TextField-DsYRZFfL.js";import{C as ve}from"./Google-CpcA0NCN.js";import{u as Re}from"./blocklet-sVlwX65X.js";import{E as N3}from"./index-Dp7ygnu_.js";import{l as Q3}from"./index-CbVpP-kP.js";import{j as Me}from"./index-dI-5DMUE.js";import{I as Le}from"./InputAdornment-BPwm2dnh.js";import{I as Ve}from"./InputLabel-CfRvg3E0.js";import{T as _e,a as J3}from"./ToggleButtonGroup-LuLWYYav.js";import{O as We}from"./Select-BHyxLJXO.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";import"./Search-Co3tOmY1.js";import"./isEqual-j-zS_8Gf.js";var T3={};Object.defineProperty(T3,"__esModule",{value:!0});var i3=T3.default=void 0;Ue(B);var L3=e;function Ue(n){return n&&n.__esModule?n:{default:n}}function V3(n,o){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var H=Object.getOwnPropertySymbols(n);o&&(H=H.filter(function(I){return Object.getOwnPropertyDescriptor(n,I).enumerable})),i.push.apply(i,H)}return i}function _3(n){for(var o=1;o<arguments.length;o++){var i=arguments[o]!=null?arguments[o]:{};o%2?V3(Object(i),!0).forEach(function(H){je(n,H,i[H])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):V3(Object(i)).forEach(function(H){Object.defineProperty(n,H,Object.getOwnPropertyDescriptor(i,H))})}return n}function je(n,o,i){return o=be(o),o in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i,n}function be(n){var o=ke(n,"string");return typeof o=="symbol"?o:String(o)}function ke(n,o){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var H=i.call(n,o||"default");if(typeof H!="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(o==="string"?String:Number)(n)}var O3=function(o){return(0,L3.jsx)("svg",_3(_3({},o),{},{children:(0,L3.jsx)("path",{d:"M8.438 4.313H8.25a.188.188 0 0 0 .188-.188v.188h7.124v-.188c0 .103.085.188.188.188h-.188V6h1.688V4.125c0-.827-.673-1.5-1.5-1.5h-7.5c-.827 0-1.5.673-1.5 1.5V6h1.688V4.312zM20.25 6H3.75a.75.75 0 0 0-.75.75v.75c0 .103.084.188.188.188h1.415l.579 12.257c.038.8.698 1.43 1.498 1.43h10.64c.802 0 1.46-.628 1.498-1.43l.579-12.258h1.416A.188.188 0 0 0 21 7.5v-.75a.75.75 0 0 0-.75-.75zm-3.11 13.688H6.86l-.567-12h11.414l-.567 12z"})}))};O3.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};O3.displayName="delete";i3=T3.default=O3;var Y3={exports:{}},q3={exports:{}};(function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o={rotl:function(i,H){return i<<H|i>>>32-H},rotr:function(i,H){return i<<32-H|i>>>H},endian:function(i){if(i.constructor==Number)return o.rotl(i,8)&16711935|o.rotl(i,24)&4278255360;for(var H=0;H<i.length;H++)i[H]=o.endian(i[H]);return i},randomBytes:function(i){for(var H=[];i>0;i--)H.push(Math.floor(Math.random()*256));return H},bytesToWords:function(i){for(var H=[],I=0,c=0;I<i.length;I++,c+=8)H[c>>>5]|=i[I]<<24-c%32;return H},wordsToBytes:function(i){for(var H=[],I=0;I<i.length*32;I+=8)H.push(i[I>>>5]>>>24-I%32&255);return H},bytesToHex:function(i){for(var H=[],I=0;I<i.length;I++)H.push((i[I]>>>4).toString(16)),H.push((i[I]&15).toString(16));return H.join("")},hexToBytes:function(i){for(var H=[],I=0;I<i.length;I+=2)H.push(parseInt(i.substr(I,2),16));return H},bytesToBase64:function(i){for(var H=[],I=0;I<i.length;I+=3)for(var c=i[I]<<16|i[I+1]<<8|i[I+2],u=0;u<4;u++)I*8+u*6<=i.length*8?H.push(n.charAt(c>>>6*(3-u)&63)):H.push("=");return H.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var H=[],I=0,c=0;I<i.length;c=++I%4)c!=0&&H.push((n.indexOf(i.charAt(I-1))&Math.pow(2,-2*c+8)-1)<<c*2|n.indexOf(i.charAt(I))>>>6-c*2);return H}};q3.exports=o})();var we=q3.exports,G3={utf8:{stringToBytes:function(n){return G3.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(G3.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var o=[],i=0;i<n.length;i++)o.push(n.charCodeAt(i)&255);return o},bytesToString:function(n){for(var o=[],i=0;i<n.length;i++)o.push(String.fromCharCode(n[i]));return o.join("")}}},W3=G3;/*!
|
|
2
2
|
* Determine if an object is a Buffer
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aK as S,aL as D,j as e,bk as _,r as p,f as O,m as u,aW as U,aX as E,U as F,cc as V,B as $,C,bc as K,a7 as W,a8 as R,N as X,cd as w,ce as A,cf as L,a9 as I,a6 as P,ax as T,a2 as M,O as G,at as H,n as J,P as i,o as Q,cg as Y}from"./index-
|
|
1
|
+
import{aK as S,aL as D,j as e,bk as _,r as p,f as O,m as u,aW as U,aX as E,U as F,cc as V,B as $,C,bc as K,a7 as W,a8 as R,N as X,cd as w,ce as A,cf as L,a9 as I,a6 as P,ax as T,a2 as M,O as G,at as H,n as J,P as i,o as Q,cg as Y}from"./index-DtSAlyAb.js";import{f as Z}from"./index-D9k2I5J1.js";import{P as ee}from"./Pagination-Dw6rLiDa.js";import"./LastPage-BkIsmfi2.js";var x={},te=D;Object.defineProperty(x,"__esModule",{value:!0});var g=x.default=void 0,ie=te(S()),ae=e;g=x.default=(0,ie.default)((0,ae.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff");function h({api:a,paging:o,loading:c,notifications:s,updateNotifications:r,teamDid:j}){const{inService:d}=_(),[m,q]=p.useState(!0),[y,b]=p.useState(!1),{t:n,locale:N}=p.useContext(O),z=async()=>{b(!0);const t=s.filter(l=>l.read===!1).map(l=>l.id).join(",");d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r(),b(!1)},v=async t=>{d?await a.readBlockletNotifications({input:{id:t,teamDid:j}}):await a.readNotifications({input:{id:t}}),r()},f=m?s:s.filter(t=>t.read===!1),B=s.filter(t=>t.read===!1).length>0,k=t=>e.jsxs("div",{className:"title",children:[t.title," ",e.jsx("span",{className:"time-ago",title:H(t.createdAt,N),children:Z(new Date(t.createdAt),Q(N))})]});return e.jsxs(se,{children:[e.jsxs(u,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:[n("notification.title"),e.jsxs(u,{component:"span",className:"notification-actions",children:[e.jsx(U,{control:e.jsx(E,{checked:m,onChange:()=>q(!m),name:"showRead",color:"primary"}),label:n("notification.showRead")}),e.jsx(F,{permission:d?"":"mutate_notification",role:d?V:[],children:B&&e.jsxs($,{disabled:y,onClick:z,className:"",children:[y&&e.jsx(C,{size:16,style:{marginRight:"1em"}}),n("notification.markAllAsRead")]})})]})]}),e.jsx(K,{}),e.jsxs(W,{className:"notification-list",children:[c&&e.jsx(C,{size:[32,20],style:{opacity:"0.8",zIndex:1e4,position:"fixed",top:30,left:"50%",marginLeft:-16}}),f.length===0&&e.jsx(u,{component:"p",variant:"body1",className:"notification-tip",children:n("notification.empty")}),f.length>0&&f.map(t=>t.action?e.jsxs(R,{component:X,to:t.action,alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:k(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>v(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id):e.jsxs(R,{alignItems:"flex-start",disabled:t.read,children:[e.jsx(w,{className:"list-item-avatar",children:e.jsxs(e.Fragment,{children:[e.jsx(A,{children:t.entityType.substr(0,1).toUpperCase()}),e.jsx(L,{className:"notification-tag",status:t.severity})]})}),e.jsx(I,{className:"list-item-text",classes:{secondary:"list-item-secondary-text"},primary:k(t),secondary:t.description}),t.read===!1&&e.jsx(P,{children:e.jsx(T,{title:n("notification.markAsRead"),children:e.jsx(M,{edge:"end","aria-label":"delete",onClick:()=>v(t.id),size:"large",children:e.jsx(g,{})})})})]},t.id))]}),!!f.length&&o.pageCount>1&&e.jsx(G,{mt:2,display:"flex",justifyContent:"flex-end",children:e.jsx(ee,{disabled:c,count:o.pageCount,page:o.page,onChange:(t,l)=>{r({page:l})}})})]})}const se=J.div`
|
|
2
2
|
min-height: 60vh;
|
|
3
3
|
|
|
4
4
|
.page-header {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cu as b}from"./index-
|
|
1
|
+
import{cu as b}from"./index-DtSAlyAb.js";function c(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,e){for(var r="",i=0,l=-1,t=0,n,f=0;f<=o.length;++f){if(f<o.length)n=o.charCodeAt(f);else{if(n===47)break;n=47}if(n===47){if(!(l===f-1||t===1))if(l!==f-1&&t===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var s=r.lastIndexOf("/");if(s!==r.length-1){s===-1?(r="",i=0):(r=r.slice(0,s),i=r.length-1-r.lastIndexOf("/")),l=f,t=0;continue}}else if(r.length===2||r.length===1){r="",i=0,l=f,t=0;continue}}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+o.slice(l+1,f):r=o.slice(l+1,f),i=f-l-1;l=f,t=0}else n===46&&t!==-1?++t:t=-1}return r}function h(o,e){var r=e.dir||e.root,i=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+i:r+o+i:i}var g={resolve:function(){for(var e="",r=!1,i,l=arguments.length-1;l>=-1&&!r;l--){var t;l>=0?t=arguments[l]:(i===void 0&&(i=b.cwd()),t=i),c(t),t.length!==0&&(e=t+"/"+e,r=t.charCodeAt(0)===47)}return e=A(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(c(e),e.length===0)return".";var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=A(e,!r),e.length===0&&!r&&(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return c(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];c(i),i.length>0&&(e===void 0?e=i:e+="/"+i)}return e===void 0?".":g.normalize(e)},relative:function(e,r){if(c(e),c(r),e===r||(e=g.resolve(e),r=g.resolve(r),e===r))return"";for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var l=e.length,t=l-i,n=1;n<r.length&&r.charCodeAt(n)===47;++n);for(var f=r.length,s=f-n,v=t<s?t:s,u=-1,a=0;a<=v;++a){if(a===v){if(s>v){if(r.charCodeAt(n+a)===47)return r.slice(n+a+1);if(a===0)return r.slice(n+a)}else t>v&&(e.charCodeAt(i+a)===47?u=a:a===0&&(u=0));break}var m=e.charCodeAt(i+a),C=r.charCodeAt(n+a);if(m!==C)break;m===47&&(u=a)}var d="";for(a=i+u+1;a<=l;++a)(a===l||e.charCodeAt(a)===47)&&(d.length===0?d+="..":d+="/..");return d.length>0?d+r.slice(n+u):(n+=u,r.charCodeAt(n)===47&&++n,r.slice(n))},_makeLong:function(e){return e},dirname:function(e){if(c(e),e.length===0)return".";for(var r=e.charCodeAt(0),i=r===47,l=-1,t=!0,n=e.length-1;n>=1;--n)if(r=e.charCodeAt(n),r===47){if(!t){l=n;break}}else t=!1;return l===-1?i?"/":".":i&&l===1?"//":e.slice(0,l)},basename:function(e,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');c(e);var i=0,l=-1,t=!0,n;if(r!==void 0&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var f=r.length-1,s=-1;for(n=e.length-1;n>=0;--n){var v=e.charCodeAt(n);if(v===47){if(!t){i=n+1;break}}else s===-1&&(t=!1,s=n+1),f>=0&&(v===r.charCodeAt(f)?--f===-1&&(l=n):(f=-1,l=s))}return i===l?l=s:l===-1&&(l=e.length),e.slice(i,l)}else{for(n=e.length-1;n>=0;--n)if(e.charCodeAt(n)===47){if(!t){i=n+1;break}}else l===-1&&(t=!1,l=n+1);return l===-1?"":e.slice(i,l)}},extname:function(e){c(e);for(var r=-1,i=0,l=-1,t=!0,n=0,f=e.length-1;f>=0;--f){var s=e.charCodeAt(f);if(s===47){if(!t){i=f+1;break}continue}l===-1&&(t=!1,l=f+1),s===46?r===-1?r=f:n!==1&&(n=1):r!==-1&&(n=-1)}return r===-1||l===-1||n===0||n===1&&r===l-1&&r===i+1?"":e.slice(r,l)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return h("/",e)},parse:function(e){c(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;var i=e.charCodeAt(0),l=i===47,t;l?(r.root="/",t=1):t=0;for(var n=-1,f=0,s=-1,v=!0,u=e.length-1,a=0;u>=t;--u){if(i=e.charCodeAt(u),i===47){if(!v){f=u+1;break}continue}s===-1&&(v=!1,s=u+1),i===46?n===-1?n=u:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||s===-1||a===0||a===1&&n===s-1&&n===f+1?s!==-1&&(f===0&&l?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(f,s)):(f===0&&l?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(f,n),r.base=e.slice(f,s)),r.ext=e.slice(n,s)),f>0?r.dir=e.slice(0,f-1):l&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};g.posix=g;var y=g;export{y as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bQ as $,bR as x,bL as d,bY as e,bX as y,bZ as k,eP as m,eQ as C,r as M,bP as j,bN as l,j as i,bU as z,fj as R,bV as B,s as P,P as T,aW as E}from"./index-
|
|
1
|
+
import{bQ as $,bR as x,bL as d,bY as e,bX as y,bZ as k,eP as m,eQ as C,r as M,bP as j,bN as l,j as i,bU as z,fj as R,bV as B,s as P,P as T,aW as E}from"./index-DtSAlyAb.js";function N(t){return x("MuiSwitch",t)}const o=$("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),O=["className","color","edge","size","sx"],U=R(),_=t=>{const{classes:a,edge:s,size:r,color:p,checked:u,disabled:h}=t,b={root:["root",s&&`edge${e(s)}`,`size${e(r)}`],switchBase:["switchBase",`color${e(p)}`,u&&"checked",h&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},g=B(b,N,a);return l({},a,g)},D=d("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.root,s.edge&&a[`edge${e(s.edge)}`],a[`size${e(s.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${o.thumb}`]:{width:16,height:16},[`& .${o.switchBase}`]:{padding:4,[`&.${o.checked}`]:{transform:"translateX(16px)"}}}}]}),I=d(y,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(t,a)=>{const{ownerState:s}=t;return[a.switchBase,{[`& .${o.input}`]:a.input},s.color!=="default"&&a[`color${e(s.color)}`]]}})(({theme:t})=>({position:"absolute",top:0,left:0,zIndex:1,color:t.vars?t.vars.palette.Switch.defaultColor:`${t.palette.mode==="light"?t.palette.common.white:t.palette.grey[300]}`,transition:t.transitions.create(["left","transform"],{duration:t.transitions.duration.shortest}),[`&.${o.checked}`]:{transform:"translateX(20px)"},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch.defaultDisabledColor:`${t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]}`},[`&.${o.checked} + .${o.track}`]:{opacity:.5},[`&.${o.disabled} + .${o.track}`]:{opacity:t.vars?t.vars.opacity.switchTrackDisabled:`${t.palette.mode==="light"?.12:.2}`},[`& .${o.input}`]:{left:"-100%",width:"300%"}}),({theme:t})=>({"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette.action.activeChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(t.palette).filter(([,a])=>a.main&&a.light).map(([a])=>({props:{color:a},style:{[`&.${o.checked}`]:{color:(t.vars||t).palette[a].main,"&:hover":{backgroundColor:t.vars?`rgba(${t.vars.palette[a].mainChannel} / ${t.vars.palette.action.hoverOpacity})`:k(t.palette[a].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${o.disabled}`]:{color:t.vars?t.vars.palette.Switch[`${a}DisabledColor`]:`${t.palette.mode==="light"?m(t.palette[a].main,.62):C(t.palette[a].main,.55)}`}},[`&.${o.checked} + .${o.track}`]:{backgroundColor:(t.vars||t).palette[a].main}}}))]})),A=d("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(t,a)=>a.track})(({theme:t})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:t.transitions.create(["opacity","background-color"],{duration:t.transitions.duration.shortest}),backgroundColor:t.vars?t.vars.palette.common.onBackground:`${t.palette.mode==="light"?t.palette.common.black:t.palette.common.white}`,opacity:t.vars?t.vars.opacity.switchTrack:`${t.palette.mode==="light"?.38:.3}`})),L=d("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(t,a)=>a.thumb})(({theme:t})=>({boxShadow:(t.vars||t).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"})),V=M.forwardRef(function(a,s){const r=U({props:a,name:"MuiSwitch"}),{className:p,color:u="primary",edge:h=!1,size:b="medium",sx:g}=r,f=j(r,O),c=l({},r,{color:u,edge:h,size:b}),n=_(c),w=i.jsx(L,{className:n.thumb,ownerState:c});return i.jsxs(D,{className:z(n.root,p),sx:g,ownerState:c,children:[i.jsx(I,l({type:"checkbox",icon:w,checkedIcon:w,ref:s,ownerState:c},f,{classes:l({},n,{root:n.switchBase})})),i.jsx(A,{className:n.track,ownerState:c})]})}),X=V,v=P(t=>i.jsx(X,{focusVisibleClassName:".Mui-focusVisible",disableRipple:!0,...t}))(({theme:t})=>({width:42,height:26,padding:0,"& .MuiSwitch-switchBase":{padding:0,margin:2,transitionDuration:"300ms","&.Mui-checked":{transform:"translateX(16px)",color:"#fff","& + .MuiSwitch-track":{backgroundColor:t.palette.mode==="dark"?"#2ECA45":"#65C466",opacity:1,border:0},"&.Mui-disabled + .MuiSwitch-track":{opacity:.5}},"&.Mui-focusVisible .MuiSwitch-thumb":{color:"#33cf4d",border:"6px solid #fff"},"&.Mui-disabled .MuiSwitch-thumb":{color:t.palette.mode==="light"?t.palette.grey[100]:t.palette.grey[600]},"&.Mui-disabled + .MuiSwitch-track":{opacity:t.palette.mode==="light"?.7:.3}},"& .MuiSwitch-thumb":{boxSizing:"border-box",width:22,height:22},"& .MuiSwitch-track":{borderRadius:26/2,backgroundColor:t.palette.mode==="light"?"#E9E9EA":"#39393D",opacity:1,transition:t.transitions.create(["background-color"],{duration:500})}}));function S({labelProps:t,...a}){return t?i.jsx(E,{control:i.jsx(v,{...a}),...t}):i.jsx(v,{...a})}S.propTypes={labelProps:T.object};S.defaultProps={labelProps:null};export{S,X as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cz as m,r as p,g as J}from"./index-
|
|
1
|
+
import{cz as m,r as p,g as J}from"./index-DtSAlyAb.js";var M={},B={},u={},x={},g={};g.__esModule=!0;g.joinClassNames=void 0;g.joinClassNames=function(){for(var s=[],r=0;r<arguments.length;r++)s[r]=arguments[r];return s.filter(function(d){return d}).join(" ")};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.maxHeight,a=n.color,e=n.lineSpacing,l=e===void 0?"0.7em":e,c=n.style,f={maxHeight:t,width:"100%",height:"1em",backgroundColor:a,marginTop:l};return d.createElement("div",{className:i.joinClassNames("text-row",o),style:r(r({},f),c)})};s.default=v})(x);var P={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.style,a=n.color,e={backgroundColor:a,borderRadius:"500rem",width:"100%",height:"100%"};return d.createElement("div",{className:i.joinClassNames("round-shape",o),style:r(r({},e),t)})};s.default=v})(P);var L={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(n){for(var o,t=1,a=arguments.length;t<a;t++){o=arguments[t];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(n[e]=o[e])}return n},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=g,v=function(n){var o=n.className,t=n.style,a=n.color,e={backgroundColor:a,width:"100%",height:"100%",marginRight:10};return d.createElement("div",{className:i.joinClassNames("rect-shape",o),style:r(r({},e),t)})};s.default=v})(L);var k={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(a){for(var e,l=1,c=arguments.length;l<c;l++){e=arguments[l];for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(a[f]=e[f])}return a},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=x,v=g,n={width:"100%"},o=[97,100,94,90,98,95,98,40],t=function(a){var e=a.rows,l=a.lineSpacing,c=a.color,f=a.style,j=a.className,w=a.widths,_=w===void 0?o:w,h=function(R){return{maxHeight:100/(e*2-1)+"%",width:_[(R+_.length)%_.length]+"%"}};return d.createElement("div",{className:v.joinClassNames("text-block",j),style:r(r({},n),f)},Array.apply(null,Array(e)).map(function(R,N){return d.createElement(i.default,{color:c,style:h(N),lineSpacing:N!==0?l:0,key:N})}))};s.default=t})(k);var A={};(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(a){for(var e,l=1,c=arguments.length;l<c;l++){e=arguments[l];for(var f in e)Object.prototype.hasOwnProperty.call(e,f)&&(a[f]=e[f])}return a},r.apply(this,arguments)};s.__esModule=!0;var d=p,i=k,v=P,n=g,o={display:"flex"},t=function(a){var e=a.className,l=a.style,c=a.color,f=a.rows;return d.createElement("div",{className:n.joinClassNames("media-block",e),style:r(r({},o),l)},d.createElement(v.default,{color:c,style:{minHeight:55,width:55,minWidth:55,marginRight:10}}),d.createElement(i.default,{color:c,rows:f}))};s.default=t})(A);u.__esModule=!0;u.media=u.text=u.rect=u.round=u.textRow=u.MediaBlock=u.TextBlock=u.RectShape=u.RoundShape=u.TextRow=void 0;var H=x;u.TextRow=H.default;var D=P;u.RoundShape=D.default;var F=L;u.RectShape=F.default;var W=k;u.TextBlock=W.default;var $=A;u.MediaBlock=$.default;u.textRow=H.default;u.round=D.default;u.rect=F.default;u.text=W.default;u.media=$.default;(function(s){var r=m&&m.__assign||function(){return r=Object.assign||function(t){for(var a,e=1,l=arguments.length;e<l;e++){a=arguments[e];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(t[c]=a[c])}return t},r.apply(this,arguments)},d=m&&m.__rest||function(t,a){var e={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&a.indexOf(l)<0&&(e[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,l=Object.getOwnPropertySymbols(t);c<l.length;c++)a.indexOf(l[c])<0&&Object.prototype.propertyIsEnumerable.call(t,l[c])&&(e[l[c]]=t[l[c]]);return e};s.__esModule=!0;var i=p,v=u,n=g,o=function(t){var a=t.delay,e=a===void 0?0:a,l=t.type,c=l===void 0?"text":l,f=t.color,j=f===void 0?"#CDCDCD":f,w=t.rows,_=w===void 0?3:w,h=t.ready,R=t.firstLaunchOnly,N=t.children,C=t.className,z=t.showLoadingAnimation,y=t.customPlaceholder,G=d(t,["delay","type","color","rows","ready","firstLaunchOnly","children","className","showLoadingAnimation","customPlaceholder"]),E=i.useState(h),O=E[0],S=E[1],b=i.useRef(null),I=function(){var T=z?n.joinClassNames("show-loading-animation",C):C;if(y&&i.isValidElement(y)){var V=n.joinClassNames(y.props.className,T);return i.cloneElement(y,{className:V})}else if(y)return y;var q=v[c];return i.createElement(q,r({},G,{color:j,rows:_,className:T}))};return i.useEffect(function(){!R&&O&&!h?e&&e>0?b.current=window.setTimeout(function(){S(!1)},e):S(!1):h&&(b.current&&window.clearTimeout(b.current),O||S(!0))},[R,O,h,e]),i.useEffect(function(){return function(){b.current&&window.clearTimeout(b.current)}},[]),O?N:I()};s.default=o})(B);(function(s){s.__esModule=!0;var r=B;s.default=r.default})(M);const Q=J(M);export{Q as R};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,ce,fP as ot,fQ as Ut,r as T,cn as Dt,ci as Bt,a2 as Qt,fR as _e,dS as Vt,dQ as Wt,fS as Zt,dP as Gt,d8 as A,a7 as Jt,a8 as Yt,fT as Xt,O as P,fU as Kt,m as en,fV as tn,fW as nn,B as on,fX as rn,fB as rt,q as te,fY as sn,fZ as cn,co as an,f_ as ln,s as M,f$ as st,g0 as un,c8 as it,g1 as fn,aA as ct,bU as de,b3 as dn,ba as pn,cp as at,g2 as hn}from"./index-
|
|
1
|
+
var zt=Object.defineProperty;var Ht=(e,t,n)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var V=(e,t,n)=>(Ht(e,typeof t!="symbol"?t+"":t,n),n);import{P as l,j as d,ce,fP as ot,fQ as Ut,r as T,cn as Dt,ci as Bt,a2 as Qt,fR as _e,dS as Vt,dQ as Wt,fS as Zt,dP as Gt,d8 as A,a7 as Jt,a8 as Yt,fT as Xt,O as P,fU as Kt,m as en,fV as tn,fW as nn,B as on,fX as rn,fB as rt,q as te,fY as sn,fZ as cn,co as an,f_ as ln,s as M,f$ as st,g0 as un,c8 as it,g1 as fn,aA as ct,bU as de,b3 as dn,ba as pn,cp as at,g2 as hn}from"./index-DtSAlyAb.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as z,j as n,r as d,L as X,P as g,f as V,l as b,O as m,m as E,d as Y,V as Z,C as ee,q as te,M as v,a as f,F as T,b as j,c$ as re,G as y,A as L,p as ne,o as oe,z as se,bf as ie,n as ae}from"./index-2z9-wC0z.js";import{T as me}from"./index-Cd6JqFfP.js";import le from"./traffic-Uf5GnmE4.js";import{D as ce}from"./index-BO13G4BO.js";import{B as ue}from"./app-avatar-C8eXlLv7.js";import{B as de}from"./bundle-avatar-OSJKvWqT.js";import{C as pe,M as S}from"./memory-BISFPxDW.js";import{I as fe}from"./chart-CH8M9EVl.js";import{w as ge}from"./withStyles-DN7-rDVx.js";import{_ as he}from"./useLocalStorage-BrzpK517.js";import{T as ve,a as ye}from"./ToggleButtonGroup-B-GBbZiA.js";import"./Delete-DD7mLtbV.js";import"./iframe-Cay9rSYx.js";import"./ChevronLeft-Cka_f59Q.js";import"./ChevronRight-BGYzd2RP.js";import"./Select-Dir7Eleh.js";import"./TextField-DrpVwtbW.js";import"./InputLabel-D4R09Jce.js";import"./InputAdornment-Ca2Af6jh.js";import"./FilterList-DQ4qv4dK.js";import"./LastPage-GxCoDWrp.js";import"./index-BNQ7lPMP.js";import"./redux-CD2ncFeP.js";import"./Search-BJQlC2tf.js";import"./index-DSMNya_x.js";import"./MoreVert-DUbpisWb.js";import"./getValidReactChildren-DC9QCktM.js";function xe(){const{api:e,info:t}=z();return n.jsx(le,{client:e,did:t.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var $=M.default=void 0;je(d);var C=n;function je(e){return e&&e.__esModule?e:{default:e}}function k(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function _(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?k(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,t,i){return t=Ie(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ie(e){var t=Ne(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O=function(t){return(0,C.jsxs)("svg",_(_({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};O.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};O.displayName="server";$=M.default=O;const Pe=ge(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(X);function A(e){const{value:t}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(E,{variant:"body2",color:"textSecondary",children:`${Math.round(t)}%`})})]})}A.propTypes={value:g.number.isRequired};function R({disk:e}){const{t}=d.useContext(V),i=[{id:1,className:"used",title:t("system.used"),metric:b(e.used)},{id:2,className:"free",title:t("system.free"),metric:b(e.free)},{id:3,className:"total",title:t("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${t("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(A,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}R.propTypes={disk:g.shape({used:g.number,free:g.number,total:g.number,device:g.string})};R.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function H({initialBlocklets:e}){const{t,locale:i}=te(),{api:a}=z(),[u,I]=he("runtime-view-interval",6),x=d.useMemo(()=>{const r=[];return r.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),r.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{v.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&r.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:l,name:v.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),r},[]),[p,N]=d.useState(x),[h,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,q]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(T.EVENTS.NODE_RUNTIME_INFO,r=>{r.mem.total=r.mem.total||0,r.mem.used=r.mem.total-(r.mem.available||0),F(r),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...r.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...r.service}}:s))}),f(T.EVENTS.BLOCKLETS_RUNTIME_INFO,r=>{if(!r||!r.length){console.error("incorrect blocklets runtime info format",r);return}N(o=>o.map(s=>{const l=r.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=r=>{N(o=>o.filter(s=>s.groupId!==r.meta.did))},B=async r=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:r.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return v.forEachBlockletSync(o,(c,{id:J,ancestors:Q})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:J,name:v.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:Q})}),l})}catch(o){L.error(o.message)}};f(j.BlockletEvents.removed,w),f(j.BlockletEvents.startFailed,w),f(j.BlockletEvents.statusChange,r=>{if(r.status!=="running"){w(r);return}B(r)}),f(j.BlockletEvents.updated,B),f(j.BlockletEvents.started,B);const G=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(r=>{const o=r.history||[];q({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(r=>{L.error(r.message)})};d.useEffect(()=>{G()},[u]);const W=r=>ne(Number(r||0),{locale:oe(i)}),K=[{label:t("common.group"),name:"groupName",options:{customBodyRenderLite(r){const{type:o,blocklet:s,groupName:l}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:t("common.name"),name:"name",options:{customBodyRenderLite(r){const{type:o,name:s,component:l,ancestors:c}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx($,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return W(o.uptime)}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(E,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:t("analytics.trend")}),n.jsx(ve,{size:"small",exclusive:!0,value:u,onChange:(r,o)=>I(o),children:[1,3,6,12,24].map(r=>n.jsxs(ye,{value:r,children:[r,"H"]},r))})]}),n.jsxs(y,{mb:4,container:!0,spacing:4,children:[n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...h.cpu,history:P.cpu})},"cpu"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{...h.mem,history:P.mem})},"memory"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Daemon)`,used:h.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Service)`,instanceCount:h.service.instanceCount||0,used:h.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),h.disks.map(r=>n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(R,{disk:r})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:t("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}H.propTypes={initialBlocklets:g.array.isRequired};function we(){const{data:e,externalData:t,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...t];return n.jsx(H,{initialBlocklets:a})}function et(){const e=se(),{t}=d.useContext(V),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:t("common.traffic"),value:"traffic"},{label:t("common.runtime"),value:"runtime"}],I={traffic:xe,runtime:we},x=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(E,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(x)?x:n.jsx(x,{})})]})}const Be=ae.main`
|
|
1
|
+
import{u as z,j as n,r as d,L as X,P as g,f as V,l as b,O as m,m as E,d as Y,V as Z,C as ee,q as te,M as v,a as f,F as T,b as j,c$ as re,G as y,A as L,p as ne,o as oe,z as se,bf as ie,n as ae}from"./index-DtSAlyAb.js";import{T as me}from"./index-Do9FcEok.js";import le from"./traffic-D8r3k_ae.js";import{D as ce}from"./index-DlnomLD1.js";import{B as ue}from"./app-avatar-Cx6kCeuS.js";import{B as de}from"./bundle-avatar-D3srwykJ.js";import{C as pe,M as S}from"./memory-BkPehB2B.js";import{I as fe}from"./chart-CwUcOCm9.js";import{w as ge}from"./withStyles-Bix6STf4.js";import{_ as he}from"./useLocalStorage-xuSREX68.js";import{T as ve,a as ye}from"./ToggleButtonGroup-LuLWYYav.js";import"./Delete-BuQlLthh.js";import"./iframe-a4uHsJw3.js";import"./ChevronLeft-LgQFTPg9.js";import"./ChevronRight-R1AD6T8t.js";import"./Select-BHyxLJXO.js";import"./TextField-DsYRZFfL.js";import"./InputLabel-CfRvg3E0.js";import"./InputAdornment-BPwm2dnh.js";import"./FilterList-gGx11q-p.js";import"./LastPage-BkIsmfi2.js";import"./index-7DZ48QpY.js";import"./redux-CW-2wISG.js";import"./Search-Co3tOmY1.js";import"./index-Dp7ygnu_.js";import"./MoreVert-Cw5JqD-n.js";import"./getValidReactChildren-CYcUTCCR.js";function xe(){const{api:e,info:t}=z();return n.jsx(le,{client:e,did:t.did})}var M={};Object.defineProperty(M,"__esModule",{value:!0});var $=M.default=void 0;je(d);var C=n;function je(e){return e&&e.__esModule?e:{default:e}}function k(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),i.push.apply(i,a)}return i}function _(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?k(Object(i),!0).forEach(function(a){be(e,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(i,a))})}return e}function be(e,t,i){return t=Ie(t),t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ie(e){var t=Ne(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var a=i.call(e,t||"default");if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O=function(t){return(0,C.jsxs)("svg",_(_({},t),{},{children:[(0,C.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.083 3.2c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12v10.24a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V3.2zm2.24 1.12v8h23.36v-8H4.323zm-2.24 14.24c0-.619.501-1.12 1.12-1.12h25.6c.619 0 1.12.501 1.12 1.12V28.8a1.12 1.12 0 0 1-1.12 1.12h-25.6a1.12 1.12 0 0 1-1.12-1.12V18.56zm2.24 1.12v8h23.36v-8H4.323z",fill:"currentColor"}),(0,C.jsx)("path",{d:"M8.963 7.04h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64zm5.12-15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64V7.68a.64.64 0 0 0-.64-.64zm0 15.36h-1.28a.64.64 0 0 0-.64.64v1.28a.64.64 0 0 0 .64.64h1.28a.64.64 0 0 0 .64-.64v-1.28a.64.64 0 0 0-.64-.64z",fill:"currentColor"})]}))};O.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"};O.displayName="server";$=M.default=O;const Pe=ge(e=>({root:{height:10},colorPrimary:{backgroundColor:e.palette.grey[e.palette.mode==="light"?200:700]},bar:{backgroundColor:e.palette.secondary.main}}))(X);function A(e){const{value:t}=e;return n.jsxs(m,{display:"flex",alignItems:"center",mt:2,children:[n.jsx(m,{width:"100%",style:{overflow:"hidden"},mr:1,children:n.jsx(Pe,{variant:"determinate",...e})}),n.jsx(m,{minWidth:35,children:n.jsx(E,{variant:"body2",color:"textSecondary",children:`${Math.round(t)}%`})})]})}A.propTypes={value:g.number.isRequired};function R({disk:e}){const{t}=d.useContext(V),i=[{id:1,className:"used",title:t("system.used"),metric:b(e.used)},{id:2,className:"free",title:t("system.free"),metric:b(e.free)},{id:3,className:"total",title:t("system.total"),metric:b(e.total)}];return n.jsx(fe,{title:`${t("common.disk")} (${e.device})`,value:b(e.used),graph:n.jsx(m,{mt:3,children:n.jsx(A,{value:e.used/e.total*100})}),description:i.map((a,u)=>n.jsxs(m,{sx:{marginLeft:u===0?0:2},children:[a.title,": ",a.metric]},a.title))})}R.propTypes={disk:g.shape({used:g.number,free:g.number,total:g.number,device:g.string})};R.defaultProps={disk:{used:0,free:0,total:1,device:""}};const D={uptime:0,pid:-1,cpuUsage:0,memoryUsage:0},U="Blocklet Server";function H({initialBlocklets:e}){const{t,locale:i}=te(),{api:a}=z(),[u,I]=he("runtime-view-interval",6),x=d.useMemo(()=>{const r=[];return r.push({type:"server",groupId:"server",groupName:U,id:"server:daemon",name:"Server (Daemon)",runtimeInfo:D}),r.push({type:"server",groupId:"server",groupName:U,id:"server:service",name:"Server (Service)",runtimeInfo:D}),e.forEach(o=>{v.forEachBlockletSync(o,(s,{id:l,ancestors:c})=>{s.runtimeInfo&&r.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:l,name:v.getDisplayName(s,!0),blocklet:o,component:s,runtimeInfo:s.runtimeInfo,ancestors:c})})}),r},[]),[p,N]=d.useState(x),[h,F]=d.useState({os:{platform:""},mem:{used:0,free:0,total:1},cpu:{cpus:[],currentLoad:1},disks:[],daemon:{},service:{}}),[P,q]=d.useState({cpu:[],mem:[],daemonMem:[],serviceMem:[]});f(T.EVENTS.NODE_RUNTIME_INFO,r=>{r.mem.total=r.mem.total||0,r.mem.used=r.mem.total-(r.mem.available||0),F(r),N(o=>o.map(s=>s.id==="server:daemon"?{...s,runtimeInfo:{...s.runtimeInfo,...r.daemon}}:s.id==="server:service"?{...s,runtimeInfo:{...s.runtimeInfo,...r.service}}:s))}),f(T.EVENTS.BLOCKLETS_RUNTIME_INFO,r=>{if(!r||!r.length){console.error("incorrect blocklets runtime info format",r);return}N(o=>o.map(s=>{const l=r.find(c=>c.componentId===s.id);return l?{...s,runtimeInfo:{...s.runtimeInfo,...l.runtimeInfo}}:s}))});const w=r=>{N(o=>o.filter(s=>s.groupId!==r.meta.did))},B=async r=>{try{const{blocklet:o}=await a.getBlocklet({input:{did:r.meta.did,attachRuntimeInfo:!0}});o.status!=="running"&&w(o),N(s=>{const l=s.filter(c=>c.groupId!==o.meta.did);return v.forEachBlockletSync(o,(c,{id:J,ancestors:Q})=>{c.runtimeInfo&&l.push({type:"blocklet",groupId:o.meta.did,groupName:v.getDisplayName(o),id:J,name:v.getDisplayName(c,!0),blocklet:o,component:c,runtimeInfo:c.runtimeInfo,ancestors:Q})}),l})}catch(o){L.error(o.message)}};f(j.BlockletEvents.removed,w),f(j.BlockletEvents.startFailed,w),f(j.BlockletEvents.statusChange,r=>{if(r.status!=="running"){w(r);return}B(r)}),f(j.BlockletEvents.updated,B),f(j.BlockletEvents.started,B);const G=()=>{a.getNodeRuntimeHistory({input:{hours:u}}).then(r=>{const o=r.history||[];q({cpu:o.map(s=>({date:s.date,value:s.cpu})),mem:o.map(s=>({date:s.date,value:s.mem})),daemonMem:o.map(s=>({date:s.date,value:s.daemonMem})),serviceMem:o.map(s=>({date:s.date,value:s.serviceMem}))})}).catch(r=>{L.error(r.message)})};d.useEffect(()=>{G()},[u]);const W=r=>ne(Number(r||0),{locale:oe(i)}),K=[{label:t("common.group"),name:"groupName",options:{customBodyRenderLite(r){const{type:o,blocklet:s,groupName:l}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(re,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:l})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(ue,{size:14,blocklet:s}),n.jsx(m,{ml:1,children:l})]})}}},{label:t("common.name"),name:"name",options:{customBodyRenderLite(r){const{type:o,name:s,component:l,ancestors:c}=p[r];return o==="server"?n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx($,{width:"14",height:"14"}),n.jsx(m,{ml:1,children:s})]}):n.jsxs(m,{display:"flex",alignItems:"center",children:[n.jsx(de,{size:14,blocklet:l,ancestors:c}),n.jsx(m,{ml:1,children:s})]})}}},{label:t("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return W(o.uptime)}}},{label:t("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return b((o==null?void 0:o.memoryUsage)||0)},sortDirection:"asc"}},{label:t("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(r){const{runtimeInfo:o}=p[r];return`${(o.cpuUsage||0).toFixed(1)}%`}}},{label:t("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid"},{label:t("blocklet.runtimeInfo.port"),name:"runtimeInfo.port"}];return n.jsxs("div",{children:[n.jsxs(m,{display:"flex",justifyContent:"space-between",flexDirection:"row",mb:2,children:[n.jsx(E,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},children:t("analytics.trend")}),n.jsx(ve,{size:"small",exclusive:!0,value:u,onChange:(r,o)=>I(o),children:[1,3,6,12,24].map(r=>n.jsxs(ye,{value:r,children:[r,"H"]},r))})]}),n.jsxs(y,{mb:4,container:!0,spacing:4,children:[n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(pe,{...h.cpu,history:P.cpu})},"cpu"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{...h.mem,history:P.mem})},"memory"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Daemon)`,used:h.daemon.memoryUsage||0,history:P.daemonMem})},"memory-daemon"),n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(S,{title:`${t("common.memory")} (Service)`,instanceCount:h.service.instanceCount||0,used:h.service.memoryUsage||0,history:P.serviceMem})},"memory-service"),h.disks.map(r=>n.jsx(y,{item:!0,lg:3,md:6,sm:6,xs:12,children:n.jsx(R,{disk:r})},"disk"))]}),n.jsx(ce,{className:"runtime-insight-list",title:t("analytics.detail"),locale:i,data:p,columns:K,options:{download:!1,filter:!1,print:!1,pagination:!1,rowsPerPage:100}})]})}H.propTypes={initialBlocklets:g.array.isRequired};function we(){const{data:e,externalData:t,initialized:i}=Y();if(!i)return n.jsx(Z,{relative:"parent",children:n.jsx(ee,{})});const a=[...e,...t];return n.jsx(H,{initialBlocklets:a})}function et(){const e=se(),{t}=d.useContext(V),{tab:i="traffic"}=ie(),a=p=>{e(`/analytics/${p}`)},u=[{label:t("common.traffic"),value:"traffic"},{label:t("common.runtime"),value:"runtime"}],I={traffic:xe,runtime:we},x=I[i]||I.traffic;return n.jsxs(Be,{children:[n.jsx(E,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:t("common.analytics")}),n.jsx(me,{tabs:u,current:i,onChange:a}),n.jsx("div",{className:"page-content",children:d.isValidElement(x)?x:n.jsx(x,{})})]})}const Be=ae.main`
|
|
2
2
|
.page-header {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{aj as X,z as $,r as p,a as Z,b as ee,P as x,q as j,u as P,y as te,au as N,M as _,j as t,x as q,av as se,a1 as S,m as v,D as M,aw as oe,U as O,ax as re,B as W,C as z,ay as ne,A as K,K as V,az as ae,aA as ie,aB as le,F as ce,aC as B,i as ue,n as G,aa as de,a4 as pe,a7 as he,a8 as fe,aD as me,a9 as ge,O as xe}from"./index-DtSAlyAb.js";import{_ as D}from"./useLocalStorage-xuSREX68.js";import{c as be,C as ke,A as ye,D as Se,B as je,S as H,a as Pe,b as we}from"./item-DafV54vj.js";import{d as Re}from"./ArrowDropDown-BhDZI_jd.js";import{B as ve}from"./Breadcrumbs-Un40qFmK.js";import"./index-dI-5DMUE.js";import"./index-Dp7ygnu_.js";import"./Search-Co3tOmY1.js";import"./index-D2bnoRiO.js";import"./Select-BHyxLJXO.js";import"./InputAdornment-BPwm2dnh.js";import"./preact.module-B1z5cdvs.js";import"./Add-BhAOgw8n.js";import"./TextField-DsYRZFfL.js";import"./InputLabel-CfRvg3E0.js";import"./Launch-BFRTKCgX.js";import"./Done-CbG1n7TV.js";import"./DeleteOutline-BuR7k_j3.js";import"./DeleteOutline-CfWsbc1a.js";import"./delete-confirm-DGNC6LoB.js";import"./click-to-copy-CPgkX4m2.js";import"./shorten-label-MNOvw9uc.js";import"./blocklet-sVlwX65X.js";import"./MoreVert-Cw5JqD-n.js";import"./ButtonGroup-BE_QoGeC.js";import"./getValidReactChildren-CYcUTCCR.js";function Ce(e){const n=X(),c=$(),[s,o]=D(`sid:blocklet:purchase:${e}`),[l,u]=p.useState(!1),[h,a]=p.useState(null),d=()=>{const{pathname:r,searchParams:m}=new URL(window.location.href),b=window.env&&window.env.apiPrefix?window.env.apiPrefix:"/";m.get("sid")&&(o(""),c(r.replace(b,"/"),{replace:!0}))},i=!!(n.get("assetDid")&&s&&n.get("sid")===s);return Z(ee.BlockletEvents.purchaseChange,r=>{r.did===e&&(a(r.session),["declined","confirmed","error"].includes(r.session.status)&&(u(!0),setTimeout(d,2e3)))}),p.useEffect(()=>{h&&h.id!==s&&o(h.id)},[h]),{hasCompleted:l,hasPurchased:i,session:h,setSession:a,doRedirect:d}}function E({meta:e,onCancel:n,handlePaySuccess:c,storeUrl:s}){const{t:o}=j(),{info:l}=P(),[u,h]=p.useState("both"),[a,d]=p.useState(1),i=te(l),r=N(e,l,s),m=R=>{R!==u&&h(R)},b=()=>{u&&(d(2),u==="verify"&&(window.location.href=r))},k=(R,L)=>{L!=="backdropClick"&&n()},w=()=>{c(r)},f=_.getDisplayName({meta:e});if(u==="purchase"&&a===2)return t.jsx(q,{open:!0,popup:!0,baseUrl:s,action:"acquire-asset",checkFn:se.create({baseURL:S(s,"/store")}).get,onSuccess:w,onClose:n,checkTimeout:60*5e3,extraParams:{factory:e.nftFactory},webWalletUrl:i,disableClose:!0,saveConnect:!1,showDownload:!1,messages:{title:o("store.purchase.auth.title",{name:f}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:t.jsxs(t.Fragment,{children:[t.jsx(v,{gutterBottom:!0,children:o("store.purchase.auth.success")}),t.jsxs(v,{variant:"subtitle2",children:[" ",o("store.purchase.autoLaunch",{name:f})]})]})}});const g=M;return t.jsx(g,{title:o("store.purchase.title",{name:f}),disableEscapeKeyDown:!0,open:!0,fullWidth:!0,onClose:k,children:t.jsx("div",{style:{marginBottom:16},children:t.jsx(ke,{action:u,onNext:b,onSelect:m})})})}E.propTypes={...be,storeUrl:x.string.isRequired,handlePaySuccess:x.func};E.defaultProps={handlePaySuccess:e=>{setTimeout(()=>{window.location.href=e},1e3)}};function U({meta:e,buttonText:n,storeUrl:c,isResource:s}){const{t:o}=j(),l=$(),{info:u}=P(),{api:h}=oe(),a=_.isFreeBlocklet(e)===!1,[d,i]=p.useState(!1),{hasPurchased:r}=Ce(e.did),[m,b]=p.useState(!1),[k]=D("instant-blocklet-install",!1),[w,f]=p.useState(!1),g=p.useMemo(()=>d?o(a?"blocklet.status.purchasing":"blocklet.status.waiting"):"",[d,o,a]),R=p.useMemo(()=>s?o("blocklet.status.resource"):a?n.purchase:n.launch,[a,n,s]),L=y=>{y.preventDefault(),y.stopPropagation();try{if(i(!0),a){b(!0);return}if(k){f(!0);return}if(!a){const C=N(e,u,c);window.location.href=C}}catch(C){K.error(V(C),{autoHideDuration:5e3}),console.error("Blocklet installed failed",C)}finally{i(!1)}},Q=()=>{i(!1),b(!1)},Y=y=>{i(!1),f(!1),l(`/blocklets/${y.appDid}/components`)},J=()=>{i(!1),f(!1)};return t.jsxs(t.Fragment,{children:[t.jsx(ye,{children:t.jsx(O,{permission:"mutate_blocklets",children:y=>t.jsx(re,{title:s?o("launchBlocklet.error.resourceBlocklet"):"",children:t.jsx(W,{onClick:L,size:"small",sx:{cursor:s?"not-allowed":"pointer"},disabled:!!(g||!y),variant:"outlined",color:"primary","data-cy":"install-blocklet",children:g?t.jsxs(t.Fragment,{children:[t.jsx(z,{size:16,style:{marginRight:3}}),g]}):R},e.did)})})}),(r||m)&&t.jsx(E,{method:"launch",meta:e,mode:"both",onCancel:Q,storeUrl:c}),w&&t.jsx(q,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:Y,extraParams:{title:e.title,blockletMetaUrl:decodeURIComponent(ne(c,e.did).trim())},messages:{title:o("setup.keyPair.title"),scan:o("setup.keyPair.scan"),confirm:o("setup.keyPair.confirm"),success:o("setup.keyPair.success")},onClose:J})]})}U.propTypes={isResource:x.bool,meta:x.object.isRequired,buttonText:x.shape({purchase:x.string.isRequired,launch:x.string.isRequired}).isRequired,storeUrl:x.string.isRequired};U.defaultProps={isResource:!1};const De=(e,n,c)=>{const s=de(n);return S(c,`/blocklets/${e.did}/?server-url=${s}`)},A=({meta:e,attribute:n,value:c})=>e._formatted?e._formatted[n]:c;function T({blocklet:e,endpoint:n}){const{t:c}=j(),s=P();let o=S(s.imgPrefix,"blocklet.png");const l=n;if(l.startsWith("http")&&e.logo)o=S(l,le(e.did,e.logo,e.version));else{let r=(window.env.apiPrefix||"/").replace(/^\/+/,"").replace(/\/+$/,"");r&&(r=`/${r}`),o=S(r,`/blocklet/logo/${e.did}`)}try{const i=new URL(o);i.searchParams.set("v",e.version||+new Date),o=i.href}catch{}const u=(s==null?void 0:s.info.mode)!==ce.NODE_MODES.SERVERLESS,h=i=>i.currentTarget.contains(i.target)?!0:(i.preventDefault(),!1),a={meta:e,buttonText:{purchase:c("common.purchase"),launch:c("common.launch")},storeUrl:l};let d=null;return u&&(d=t.jsx("div",{style:{display:"flex",alignItems:"center"},children:t.jsx(U,{isResource:!(B.hasStartEngine(e)||B.isGatewayBlocklet(e)||B.isPackBlocklet(e)),...a})})),t.jsx(ue,{href:De(e,s.info,n),style:{color:"initial",textDecoration:"none"},onClick:h,target:"_blank",children:t.jsx(Le,{title:A({meta:e,attribute:"title",value:e.title||e.name}),did:e.did,description:A({meta:e,attribute:"description",value:e.description}),cover:e.logo?o:"",version:e.version,button:d})})}T.propTypes={blocklet:x.object.isRequired,endpoint:x.string};T.defaultProps={endpoint:""};function I({storeUrl:e,handleSearchSelect:n,extraFilter:c,...s}){var r;const{locale:o}=j(),l=P(),[u,h]=p.useState({}),a=m=>{h(m)},d=e,i=(r=l==null?void 0:l.info)==null?void 0:r.version;return p.useEffect(()=>{h({})},[d]),t.jsx(ae,{FallbackComponent:ie,resetKeys:[d],children:t.jsx("div",{...s,children:t.jsx(Se,{blockletRender:m=>{const b={...m,endpoint:d};return t.jsx(T,{...b})},baseSearch:!0,endpoint:d,locale:o,onFilterChange:a,onSearchSelect:n,filters:u,extraFilter:c,serverVersion:i})})})}I.propTypes={storeUrl:x.string.isRequired,handleSearchSelect:x.func,extraFilter:x.func};I.defaultProps={handleSearchSelect:null,extraFilter:void 0};const Le=G(je)`
|
|
2
|
+
.ms-highlight {
|
|
3
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
4
|
+
}
|
|
5
|
+
`,Be=pe(()=>({buttonText:{textTransform:"none !important"},iconRoot:{minWidth:24},menuName:{display:"flex",flexDirection:"column",marginRight:"100px","& span":{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}})),F=p.forwardRef(({onChange:e,onDelete:n},c)=>{const{info:s}=P(),{t:o}=j(),[l,u]=p.useState(!1),[h,a]=p.useState(!1),[d,i]=p.useState(-1),r=Be(),[m,b]=D(H),k=Math.max(s.blockletRegistryList.findIndex(f=>f.url===m),0),w=f=>{try{u(!0),i(f);const g=s.blockletRegistryList[f];b(g.url),e(g.url),a(!1)}catch(g){console.error(g),K.error(`${o("store.blockletRegistry.changeFailed")} ${V(g)}`)}finally{u(!1)}};return p.useImperativeHandle(c,()=>({setOpen:a})),t.jsxs(t.Fragment,{children:[t.jsx(O,{permission:"mutate_node",children:f=>t.jsx(W,{disabled:!f,classes:{text:r.buttonText},color:"secondary","data-cy":"store-toggle",onClick:()=>{a(!0)},endIcon:t.jsx(Re,{}),children:t.jsx(v,{color:"secondary",children:s.blockletRegistryList[k].name})})}),t.jsx(M,{title:o("store.blockletRegistry.switchRegistry"),disableEscapeKeyDown:!0,disablePortal:!1,fullWidth:!0,open:h,onClose:()=>a(!1),children:t.jsxs(he,{className:r.tabPanel,children:[s.blockletRegistryList.map((f,g)=>t.jsxs(fe,{button:!0,disabled:l,selected:k===g,"data-cy":"store-switch",onClick:()=>{if(!l){if(g===k){a(!1);return}w(g)}},children:[d===g&&l&&t.jsx(me,{className:r.iconRoot,children:t.jsx(z,{size:16})}),t.jsx(ge,{children:t.jsx(Pe,{teamDid:s.did,store:f,onDelete:()=>n(f.url)})})]},f.url)),t.jsx(we,{disabled:l,onAdd:e,teamDid:s.did,blockletRegistryList:s.blockletRegistryList})]})})]})});F.propTypes={onChange:x.func,onDelete:x.func};F.defaultProps={onChange:()=>{},onDelete:()=>{}};const Ee=F;function nt(){const{t:e}=j(),{info:n}=P(),[c]=D(H),{blockletRegistryList:s}=n,o=s.find(r=>c===r.url)||s[0],[l,u]=p.useState(o.url),h=n.routing.adminPath,a=S(window.location.origin,h),d=({detailUrl:r})=>{const m=new URL(r);m.searchParams.set("server-url",a);const b=document.createElement("a");b.setAttribute("target","_blank"),b.setAttribute("href",m.href),b.click()},i=p.useRef(null);return t.jsxs(Ue,{children:[t.jsxs(ve,{separator:"›","aria-label":"breadcrumb",className:"page-breadcrumb",children:[t.jsx(v,{color:"textPrimary",children:e("common.store")}),t.jsx(Ee,{ref:i,onChange:r=>u(r),onDelete:r=>{var m;l===r&&u((m=n.blockletRegistryList[0])==null?void 0:m.url)}})]}),t.jsx(xe,{className:"store-header",display:"flex",justifyContent:"space-between",p:0,m:0,children:t.jsx(v,{component:"h2",variant:"h4",className:"page-header",color:"textPrimary",children:e("store.headerDescription")})}),t.jsx(I,{className:"blocklet-list",handleSearchSelect:d,storeUrl:l})]})}const Ue=G.main`
|
|
6
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
7
|
+
.store-header {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
margin-bottom: 32px !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.page-header {
|
|
13
|
+
margin-bottom: 16px !important;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
.blocklet-list {
|
|
17
|
+
aside:hover {
|
|
18
|
+
height: calc(100vh - 235px);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;export{nt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h9 as W,r as L,ha as z,cl as R,f4 as N,hb as x,hc as P,cj as j,hd as S}from"./index-
|
|
1
|
+
import{h9 as W,r as L,ha as z,cl as R,f4 as N,hb as x,hc as P,cj as j,hd as S}from"./index-DtSAlyAb.js";var V=function(r,a){return r===void 0&&(r=[]),a===void 0&&(a=[]),W(r,a)},I=function(r,a,n){var e=L.useRef(),i=L.useRef(0);V(a,e.current)||(e.current=a,i.current+=1),z(r,[i.current],n)},J=/(mac|iphone|ipod|ipad)/i.test(typeof navigator<"u"?navigator==null?void 0:navigator.platform:""),B={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,meta:J?[91,93]:[91,92],selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},E={ctrl:function(r){return r.ctrlKey},shift:function(r){return r.shiftKey},alt:function(r){return r.altKey},meta:function(r){return r.type==="keyup"?B.meta.includes(r.keyCode):r.metaKey}};function G(r){return P(r)||j(r)}function Q(r){var a=Object.keys(E).reduce(function(n,e){return E[e](r)?n+1:n},0);return[16,17,18,91,92].includes(r.keyCode)?a:a+1}function T(r,a,n){var e,i;if(!r.key)return!1;if(j(a))return r.keyCode===a?a:!1;var o=a.split("."),s=0;try{for(var c=x(o),l=c.next();!l.done;l=c.next()){var p=l.value,y=E[p],m=B[p.toLowerCase()];(y&&y(r)||m&&m===r.keyCode)&&s++}}catch(b){e={error:b}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(e)throw e.error}}return n?s===o.length&&Q(r)===o.length?a:!1:s===o.length?a:!1}function U(r,a){return S(r)?r:G(r)?function(n){return T(n,r,a)}:Array.isArray(r)?function(n){return r.find(function(e){return T(n,e,a)})}:function(){return!!r}}var X=["keydown"];function Z(r,a,n){var e=n||{},i=e.events,o=i===void 0?X:i,s=e.target,c=e.exactMatch,l=c===void 0?!1:c,p=e.useCapture,y=p===void 0?!1:p,m=R(a),b=R(r);I(function(){var k,C,K,t=N(s,window);if(t){var q=function(u){var v,g=U(b.current,l),f=g(u),d=G(f)?f:u.key;if(f)return(v=m.current)===null||v===void 0?void 0:v.call(m,u,d)};try{for(var w=x(o),h=w.next();!h.done;h=w.next()){var H=h.value;(K=t==null?void 0:t.addEventListener)===null||K===void 0||K.call(t,H,q,y)}}catch(u){k={error:u}}finally{try{h&&!h.done&&(C=w.return)&&C.call(w)}finally{if(k)throw k.error}}return function(){var u,v,g;try{for(var f=x(o),d=f.next();!d.done;d=f.next()){var M=d.value;(g=t==null?void 0:t.removeEventListener)===null||g===void 0||g.call(t,M,q,y)}}catch(O){u={error:O}}finally{try{d&&!d.done&&(v=f.return)&&v.call(f)}finally{if(u)throw u.error}}}}},[o],s)}export{Z as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{u as R,j as o,C,aw as T,cH as U,z as b,q as W,cB as D,r,aR as _,k as d,a1 as x,ak as k,ae as E,x as O,av as $,y as q,bj as z,n as B}from"./index-
|
|
1
|
+
import{u as R,j as o,C,aw as T,cH as U,z as b,q as W,cB as D,r,aR as _,k as d,a1 as x,ak as k,ae as E,x as O,av as $,y as q,bj as z,n as B}from"./index-DtSAlyAb.js";import{I as H}from"./invitation-fKgtV8Zz.js";import"./index-223JGPy0.js";import"./index-DesqGCgv.js";import"./CheckCircle-B2UAY6EW.js";import"./wrap-locale-C2eTlgXw.js";function K(v){const{api:i,session:f}=T(),{info:s}=R(),c=U(),p=b(),{t:l,locale:m}=W(),{encryptKey:P,decrypt:N}=D(),[S,w]=r.useState(!1),h=r.useMemo(()=>new URLSearchParams(c.search).get("inviteId"),[c]),t=_(async()=>{if(!h)return null;let e;const{data:n}=await i.get("/api/invitation",{params:{inviteId:h}}),a=!!d(s,"ownerNft.did")&&n.role.name==="owner";if(a){const u=new URL(window.location.href);u.pathname=x(k(),"/api/did/invite/token"),u.searchParams.set("_ek_",P),u.searchParams.set("inviteId",h);const{data:F}=await i.get(u.href);e=F}return{invitation:n,nextWorkflow:e,needReceiveNFT:a}}),L=r.useCallback(()=>{w(!0)},[]),j=r.useCallback(()=>{if(t.error)throw t.error;return t.value.invitation},[t]),g=r.useCallback(async e=>{e&&E(N(e.sessionToken));const n=new URLSearchParams(c.search);n.delete("inviteId");const a=n.toString();await f.refresh(),p(`/${a&&`?${a}`}`,{replace:!0})},[c,p,f]);if(t.loading)return o.jsx(C,{});const y=()=>{const e=new URL(window.location.href);e.pathname=x(k(),"/api/did/invite/status"),e.searchParams.set("_t_",t.value.nextWorkflow.token),e.searchParams.set("locale",m);const n=setInterval(async()=>{const{data:a}=await i.get(e.href);a.status==="succeed"&&(clearInterval(n),f.updateConnectedInfo(a),g(a))},2e3)},I=()=>{w(!1)};return o.jsxs(M,{className:"page-invite",children:[d(t,"value.needReceiveNFT")&&o.jsx(O,{action:"login",popup:!0,className:"connect",open:S,locale:m,baseUrl:s.launcher.url,checkFn:$.create({baseURL:s.launcher.url}).get,onSuccess:y,onClose:I,checkTimeout:5*60*1e3,webWalletUrl:q(s),extraParams:{nw:d(t,"value.nextWorkflow.url")},messages:{title:l("invite.transferNFTDialog.title",{name:s.name}),scan:l("invite.transferNFTDialog.scan"),confirm:l("invite.transferNFTDialog.confirm"),success:l("invite.transferNFTDialog.success")},prefix:"/.well-known/service/api/did"}),o.jsx(H,{...v,getDataFn:j,createPassportSvg:e=>z(e,s),checkFn:i.get,onLoginSuccess:g,passportColor:"default",onReceive:d(t,"value.needReceiveNFT")?L:null})]})}const M=B.div`
|
|
2
2
|
width: 100vw;
|
|
3
3
|
height: 100%;
|
|
4
4
|
min-height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as s,j as t,B as i,gb as r}from"./index-
|
|
1
|
+
import{P as s,j as t,B as i,gb as r}from"./index-DtSAlyAb.js";function n({children:e,...o}){return t.jsxs(i,{color:"did",variant:"contained",...o,children:[t.jsx("span",{style:{fontWeight:400},children:e||"Continue With"}),t.jsx(r,{style:{width:"auto",height:"1.2em",margin:"0 4px 0 8px"}})]})}n.propTypes={children:s.any};n.defaultProps={children:""};export{n as C};
|