@abtnode/webapp 1.16.43-beta-20250507-131727-e3e5be46 → 1.16.43-beta-20250509-094134-34c76f98
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/{AdapterDayjs-DN3WVSzh.js → AdapterDayjs-Dd7kIQDg.js} +6 -6
- package/dist/assets/{Add-B5o3lKZ4.js → Add-DyqE7ma4.js} +1 -1
- package/dist/assets/{ArrowDropDown-RVN4Mn-W.js → ArrowDropDown-srvJwv_s.js} +1 -1
- package/dist/assets/{Autocomplete-DHpI8PP1.js → Autocomplete-DgD7oXbC.js} +1 -1
- package/dist/assets/{Breadcrumbs-BO8goWHs.js → Breadcrumbs-BjBCOm__.js} +1 -1
- package/dist/assets/{ButtonGroup-DP9Um2zw.js → ButtonGroup-CETfqQqG.js} +1 -1
- package/dist/assets/{CSSTransition-Ce16mrqT.js → CSSTransition-8GXDrEVI.js} +1 -1
- package/dist/assets/{CallMerge-D9pdEpQ4.js → CallMerge-D1kGN-Yl.js} +1 -1
- package/dist/assets/{CardContent-CV6vnW6h.js → CardContent-BsBNKLwR.js} +1 -1
- package/dist/assets/{ChevronLeft-CVA4N8rQ.js → ChevronLeft-CQJA5jUj.js} +1 -1
- package/dist/assets/{ChevronRight-sZUpX7tH.js → ChevronRight-B3ioYqvf.js} +1 -1
- package/dist/assets/{Clear-C7odY-6_.js → Clear-C23RMA8O.js} +1 -1
- package/dist/assets/{Close-w8eKEJW7.js → Close-CMKp87zW.js} +1 -1
- package/dist/assets/{Community-CIu-cG23.js → Community-B9PcA7bL.js} +1 -1
- package/dist/assets/{Delete-DSB9GjVg.js → Delete-DemQysCs.js} +1 -1
- package/dist/assets/{Delete-DpNbJCJA.js → Delete-X-iZLu8W.js} +1 -1
- package/dist/assets/{DeleteOutline-B4zcgGCZ.js → DeleteOutline-CBtSJ3uj.js} +1 -1
- package/dist/assets/{Done-CasEZEMQ.js → Done-LO8W9lyO.js} +1 -1
- package/dist/assets/{Edit-D9oke1qz.js → Edit-qCwSqHzK.js} +1 -1
- package/dist/assets/{ErrorOutline-cX4XY61i.js → ErrorOutline-CpLJ4ot-.js} +1 -1
- package/dist/assets/{HelpOutline-B-3RVeU3.js → HelpOutline-B7KAkB_W.js} +1 -1
- package/dist/assets/{Holiday-CWWiyhee.js → Holiday-DLF993Gr.js} +1 -1
- package/dist/assets/{Launch-9QmeNFGh.js → Launch-CbHu_JiN.js} +1 -1
- package/dist/assets/{Link-V0zXa94b.js → Link-BJsvTgLA.js} +1 -1
- package/dist/assets/{ListItemButton-Drq6UK1v.js → ListItemButton-DU8Ok_s-.js} +1 -1
- package/dist/assets/{ListSubheader-r9QVg4z3.js → ListSubheader-C2HVg1lq.js} +1 -1
- package/dist/assets/{LoadingButton-CwgQEhJX.js → LoadingButton-JtnEy6x-.js} +1 -1
- package/dist/assets/{LockIcon-AR8ebEzv.js → LockIcon-BeIxsnPz.js} +1 -1
- package/dist/assets/{Meeting-CF-WhmPM.js → Meeting-BL7WF2AJ.js} +1 -1
- package/dist/assets/{MoreHoriz-DuOMe2bn.js → MoreHoriz-_l-lUoyq.js} +1 -1
- package/dist/assets/{MoreVert-UFPlWjze.js → MoreVert-T7jlVzCd.js} +1 -1
- package/dist/assets/{OffSick-CSP2kO-5.js → OffSick-D6JEPSYU.js} +1 -1
- package/dist/assets/{OpenInNew-6pTIeS0r.js → OpenInNew-Bh0ZyNdY.js} +1 -1
- package/dist/assets/{Public-Cm3uAF1d.js → Public-BieGltlg.js} +1 -1
- package/dist/assets/{Refresh-DsQW01Ya.js → Refresh-CtWiwbL8.js} +1 -1
- package/dist/assets/{SchemaReference.es-BPpguI5D.js → SchemaReference.es-CN84fzHD.js} +1 -1
- package/dist/assets/{Search-DnEqCvoa.js → Search-CzTpAOa9.js} +1 -1
- package/dist/assets/{Slider-DRcvOlgL.js → Slider-DNt5jJD4.js} +1 -1
- package/dist/assets/{Stepper-DfLckKIy.js → Stepper-EVvxFm-l.js} +1 -1
- package/dist/assets/{TableRow-BMSWmGPk.js → TableRow-Cr41eTmp.js} +1 -1
- package/dist/assets/{TableSearch-Dobasaj8.js → TableSearch-DBDA-JAl.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-CfjCj__G.js → ToggleButtonGroup-CmondxKP.js} +1 -1
- package/dist/assets/{Verified-oP4ZelZh.js → Verified-BrGKKjLS.js} +1 -1
- package/dist/assets/{VerifiedUser-CzEMJOGM.js → VerifiedUser-T9tFwB9U.js} +1 -1
- package/dist/assets/{ViewColumn-BIPD356c.js → ViewColumn-CQJvMaMH.js} +1 -1
- package/dist/assets/{ViewList-BYQ2Wo2N.js → ViewList-BSeqocMD.js} +1 -1
- package/dist/assets/{WorkingRemotely-B8U5I0AD.js → WorkingRemotely-DSoKGD6u.js} +1 -1
- package/dist/assets/{_createAggregator-BzC5cfxy.js → _createAggregator-CJSDSMg6.js} +1 -1
- package/dist/assets/{actions-C1blhdkh.js → actions-Bv3_VVES.js} +1 -1
- package/dist/assets/{actions-CIvfyQ4N.js → actions-R0k2zQ3B.js} +1 -1
- package/dist/assets/{agreement-BKAba3Bu.js → agreement--xEd5J2_.js} +1 -1
- package/dist/assets/api-DG7in6iX.js +1 -0
- package/dist/assets/{appearance-BT6nflvn.js → appearance-By8P7pS8.js} +1 -1
- package/dist/assets/{audit-logs-CxO1RKPM.js → audit-logs-axk4FVuN.js} +2 -2
- package/dist/assets/{blocklet-DgGtZNCB.js → blocklet-n2QLVVft.js} +1 -1
- package/dist/assets/{brace-fold.es-D7zHyRiF.js → brace-fold.es-CpmacDXy.js} +1 -1
- package/dist/assets/{chain-CMNZiwbz.js → chain-B3UsKW7l.js} +1 -1
- package/dist/assets/click-to-copy-BBx903lR.js +1 -0
- package/dist/assets/cloneDeep-DdAFYsMv.js +1 -0
- package/dist/assets/{closebrackets.es-BY2R-PDl.js → closebrackets.es-BPM7qcyy.js} +1 -1
- package/dist/assets/{codemirror.es-Bj7wxben.js → codemirror.es-rKm7-8so.js} +1 -1
- package/dist/assets/{comment.es-9NAetJeX.js → comment.es-cEEILSJL.js} +1 -1
- package/dist/assets/{config-navigation-BeyhoAYd.js → config-navigation-RVGkWDYS.js} +3 -3
- package/dist/assets/{connect-to-B2UoY2JL.js → connect-to-Cu2hr8Uh.js} +1 -1
- package/dist/assets/{delete-confirm-B0FL8Sx7.js → delete-confirm-C6MdS5sY.js} +1 -1
- package/dist/assets/{detail-Lgl7Opc1.js → detail-C1bo_0g-.js} +3 -3
- package/dist/assets/{dialog.es-CV929pYp.js → dialog.es-B1IFC9u6.js} +1 -1
- package/dist/assets/domains-2uhvPnPP.js +24 -0
- package/dist/assets/{download-IW0OxyHF.js → download-CNUneSlg.js} +1 -1
- package/dist/assets/emotion-react.browser.esm-Dyrm_eeQ.js +1 -0
- package/dist/assets/{foldgutter.es-D3SAnwjU.js → foldgutter.es-C2vuNFxa.js} +1 -1
- package/dist/assets/{get-safe-url-BQ9e1d8R.js → get-safe-url-Bs5i5FpE.js} +1 -1
- package/dist/assets/{get-safe-url-fVLOWjDv.js → get-safe-url-DfM7C7Hf.js} +1 -1
- package/dist/assets/getValidReactChildren-q1n8NmWG.js +1 -0
- package/dist/assets/{hint.es-xqBNEZOH.js → hint.es-DNy1bW-g.js} +1 -1
- package/dist/assets/{hint.es2-jX0Ikd_H.js → hint.es2-i7xguvxM.js} +1 -1
- package/dist/assets/{iframe-B52MZmUp.js → iframe-DWi9MO_j.js} +1 -1
- package/dist/assets/{index-yrfr0MWP.js → index-2OI_OVBD.js} +1 -1
- package/dist/assets/{index-DHqdVKlk.js → index-2rbYz989.js} +1 -1
- package/dist/assets/{index-CUdgGjYV.js → index-64gxJuGR.js} +1 -1
- package/dist/assets/{index-BFMlUu0x.js → index-9yi2bmN6.js} +1 -1
- package/dist/assets/{index-KdOmwCM0.js → index-AJgIDgSg.js} +51 -51
- package/dist/assets/index-B2GgL3-R.js +1 -0
- package/dist/assets/index-B2n80jby.js +1 -0
- package/dist/assets/{index-Bahrm-G8.js → index-BCr5STuV.js} +18 -18
- package/dist/assets/{index-B930dkB6.js → index-BFERjMXy.js} +1 -1
- package/dist/assets/{index-BEgDyH2G.js → index-BHiZELzY.js} +1 -1
- package/dist/assets/{index-Da_gY2p2.js → index-BLYEw0YZ.js} +1 -1
- package/dist/assets/{index-Btu7Neya.js → index-BLslsStt.js} +1 -1
- package/dist/assets/{index-BsoiXoFC.js → index-BMxCOuow.js} +1 -1
- package/dist/assets/{index-B8d6BDWi.js → index-BZL4w7FF.js} +1 -1
- package/dist/assets/{index-iW0yPyzE.js → index-BZOISQEj.js} +2 -2
- package/dist/assets/{index-n3NnSt8H.js → index-BdSP5x7V.js} +4 -4
- package/dist/assets/{index-Bpzwsd3f.js → index-BdlWUpNp.js} +6 -6
- package/dist/assets/{index-BcWvyuw8.js → index-BgnDgaOb.js} +1 -1
- package/dist/assets/{index-C8FhJ0rj.js → index-Bl_QpGg2.js} +1 -1
- package/dist/assets/{index-CiH2SOFi.js → index-BtW4iaLk.js} +3 -3
- package/dist/assets/{index-DPJjuq8y.js → index-C94nEH1q.js} +1 -1
- package/dist/assets/{index-CNElardu.js → index-CAL8SdA5.js} +1 -1
- package/dist/assets/{index-trVfBCte.js → index-CB14HOGE.js} +2 -2
- package/dist/assets/{index-BfvhxdN7.js → index-CEIvGGC0.js} +11 -11
- package/dist/assets/{index-Dzpr3qS7.js → index-CEvL1Y2e.js} +1 -1
- package/dist/assets/{index-BK_iEF6w.js → index-CUwFRYPb.js} +3 -3
- package/dist/assets/{index-DX8DEJlQ.js → index-CXdXz1YC.js} +1 -1
- package/dist/assets/{index-hmtP3oKe.js → index-CZQq2WZl.js} +1 -1
- package/dist/assets/{index-D6sUi9RT.js → index-CeEXyjqX.js} +1 -1
- package/dist/assets/{index-BerfqWKB.js → index-CotXQiFR.js} +1 -1
- package/dist/assets/{index-qxurOC9U.js → index-Cwlwz42P.js} +2 -2
- package/dist/assets/{index-DLm8Ub_j.js → index-Cy-HGAg5.js} +1 -1
- package/dist/assets/{index-BhA9P09u.js → index-D1Twij0A.js} +1 -1
- package/dist/assets/{index-DA7j-cev.js → index-D1Uv4Kgs.js} +1 -1
- package/dist/assets/{index-R7x7W7GB.js → index-D2LXsBcO.js} +5 -5
- package/dist/assets/{index-D6UMpm4p.js → index-D2TTRLM_.js} +1 -1
- package/dist/assets/{index-CZGd5QCZ.js → index-D69xZWqq.js} +8 -8
- package/dist/assets/{index-CFslc24J.js → index-DARRrmly.js} +2 -2
- package/dist/assets/{index-DydT7-LV.js → index-D_gKXPug.js} +1 -1
- package/dist/assets/{index-D_1_RyLT.js → index-DgyX9Ig4.js} +1 -1
- package/dist/assets/{index-D-wNDvqE.js → index-DiB0uZqA.js} +3 -3
- package/dist/assets/{index-DdLMocGE.js → index-DkSWwzPL.js} +1 -1
- package/dist/assets/{index-BNMAXWQI.js → index-Dtjsi5-M.js} +1 -1
- package/dist/assets/{index-DRmGM_hP.js → index-IJaA2JHH.js} +1 -1
- package/dist/assets/{index-CCAZAiY9.js → index-O5b_bdsU.js} +1 -1
- package/dist/assets/{index-Ce_kCGci.js → index-_Gn7XUOL.js} +1 -1
- package/dist/assets/{index-DATTQ5am.js → index-knEewVFB.js} +1 -1
- package/dist/assets/index-kof4JnLV.js +11 -0
- package/dist/assets/{index.esm-BZeAlIeN.js → index.esm-Bx7839pK.js} +1 -1
- package/dist/assets/{info-addon.es-C0ND8uqw.js → info-addon.es-B4Pyoy0-.js} +1 -1
- package/dist/assets/{info.es-B-kYc798.js → info.es-CtjlX5Wt.js} +1 -1
- package/dist/assets/{install-from-url-CV2FomzA.js → install-from-url-C2-00KT9.js} +1 -1
- package/dist/assets/{invitation-DH_bKwmI.js → invitation-D6T6DvBj.js} +6 -6
- package/dist/assets/is-path-prefix-equal-DPt6K58Y.js +1 -0
- package/dist/assets/{item-D5qxr3Lk.js → item-CeGXgGDh.js} +6 -6
- package/dist/assets/{javascript.es-CInOpinR.js → javascript.es-CBOLLNJA.js} +1 -1
- package/dist/assets/{jump-to-line.es-GaOpyMuN.js → jump-to-line.es-o70pn1AS.js} +1 -1
- package/dist/assets/{jump.es-4QMqZ0U2.js → jump.es-uAkOc1x-.js} +1 -1
- package/dist/assets/{lint.es-d-xQpru4.js → lint.es-Bq_aFvHE.js} +1 -1
- package/dist/assets/{lint.es2-r0w3QthM.js → lint.es2-QDUQ_yvH.js} +1 -1
- package/dist/assets/{lint.es3-Duz7LKWy.js → lint.es3-C8hQyDQ6.js} +1 -1
- package/dist/assets/{list-header-Dq6Hm5vy.js → list-header-CahJudHO.js} +1 -1
- package/dist/assets/{log-CTDXV8ap.js → log-B63Vehap.js} +1 -1
- package/dist/assets/{lottie-react.esm-Gf3LaMG1.js → lottie-react.esm-Dyp1pX0s.js} +1 -1
- package/dist/assets/{matchbrackets.es-ub9hnhHy.js → matchbrackets.es-DvsHeRkL.js} +1 -1
- package/dist/assets/{memory-Co7ZVOfU.js → memory-CB6HwuFd.js} +1 -1
- package/dist/assets/{mode.es-CK82ywlP.js → mode.es-BlitFOAg.js} +1 -1
- package/dist/assets/{mode.es2-gzITWIBC.js → mode.es2-D9kTW4A1.js} +1 -1
- package/dist/assets/{mode.es3-CrkiMbzK.js → mode.es3-C7GVv5Sh.js} +1 -1
- package/dist/assets/omit-lJaiB6eZ.js +1 -0
- package/dist/assets/{onlineParser.es-C1qjwyf6.js → onlineParser.es-B9GLO6bL.js} +1 -1
- package/dist/assets/{overview-WpAQD63O.js → overview-DMesSg9s.js} +2 -2
- package/dist/assets/payment-kit-DYSjmihw.png +0 -0
- package/dist/assets/{permission-DR4c0ARF.js → permission-bQJb4Wfm.js} +1 -1
- package/dist/assets/{preference-BJr6poQJ.js → preference-CQ9_K03t.js} +3 -3
- package/dist/assets/{raf-schd.esm-CKlBxZ4m.js → raf-schd.esm-xwaPYuT8.js} +1 -1
- package/dist/assets/refType-Dp49VYzY.js +1 -0
- package/dist/assets/{resource-dialog-CnEGcfR6.js → resource-dialog-CrF5TTZz.js} +30 -30
- package/dist/assets/{runtime-DiZdSvdg.js → runtime-ccgDKRXv.js} +1 -1
- package/dist/assets/{schema-CV3xzp1r.js → schema-BAt_zCax.js} +6 -6
- package/dist/assets/sdk-BmRwENgz.js +1 -0
- package/dist/assets/{search.es-DKqLEqET.js → search.es-BewIGLjB.js} +1 -1
- package/dist/assets/{searchcursor.es-BWMpJtYl.js → searchcursor.es-BWP24T39.js} +1 -1
- package/dist/assets/{service-B4aFqW1U.js → service-C6dR44t5.js} +1 -1
- package/dist/assets/{shorten-label-B1taCLSu.js → shorten-label-C5x3QBkr.js} +1 -1
- package/dist/assets/{show-hint.es-C1eZks_O.js → show-hint.es-DR7gTDpy.js} +1 -1
- package/dist/assets/{simple-select-BwOhhEqT.js → simple-select-Dk5PYcqy.js} +1 -1
- package/dist/assets/{spaces-BHOuJMC0.js → spaces-Qg7EXTlR.js} +1 -1
- package/dist/assets/{status-BVDByjVR.js → status-C6NwHG6t.js} +1 -1
- package/dist/assets/{status-CLTF7DgB.js → status-Dk-wVme-.js} +1 -1
- package/dist/assets/{sublime.es-J7__ylqM.js → sublime.es-Bpk1OuZ2.js} +1 -1
- package/dist/assets/{switch-control-k82I7Ndl.js → switch-control-BzAUWBUn.js} +1 -1
- package/dist/assets/{table-icons-C8h2igEk.js → table-icons-D5Z-kbr9.js} +36 -36
- package/dist/assets/{team-DTa9igye.js → team-CKxs_BXU.js} +1 -1
- package/dist/assets/{toLower-CV1JKc77.js → toLower-DoLsoIUi.js} +1 -1
- package/dist/assets/toUpper-Bsu2hQC1.js +1 -0
- package/dist/assets/{traffic-BZMRS6o_.js → traffic-CmwKqX64.js} +2 -2
- package/dist/assets/{url-evaluation-BMmqZ9Xm.js → url-evaluation-CyY2eIYi.js} +1 -1
- package/dist/assets/{url-join-3G2iekWy.js → url-join-D3UI4kOJ.js} +1 -1
- package/dist/assets/{use-mobile-C-Ki3d1-.js → use-mobile-BO6wzlhh.js} +1 -1
- package/dist/assets/{use-mobile-4pPVTaiA.js → use-mobile-DzTdFIlX.js} +1 -1
- package/dist/assets/{useAsync-W0rAsXlK.js → useAsync-Ch7FfDvD.js} +1 -1
- package/dist/assets/{useLocalStorage-DqX-zdwD.js → useLocalStorage-DErQTCC8.js} +1 -1
- package/dist/assets/{useThemeProps-BT_RONtx.js → useThemeProps-DI7JqlIy.js} +1 -1
- package/dist/assets/{util-CR3vtO32.js → util-CiEXZkzA.js} +1 -1
- package/dist/assets/{wait-container-D3DtxHI5.js → wait-container-DFgs_ycx.js} +1 -1
- package/dist/assets/{withStyles-DQtqSL4M.js → withStyles-D9pc_Gr2.js} +1 -1
- package/dist/assets/wrap-locale-Cw7rRT3-.js +1 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/api-BhAwS4V8.js +0 -1
- package/dist/assets/click-to-copy-mgHOJgOu.js +0 -1
- package/dist/assets/cloneDeep-C8Xz4lYT.js +0 -1
- package/dist/assets/domains-BnwU8REn.js +0 -24
- package/dist/assets/emotion-react.browser.esm-DwA9twTe.js +0 -1
- package/dist/assets/getValidReactChildren-BybUhg_p.js +0 -1
- package/dist/assets/index-B3-cD9IV.js +0 -1
- package/dist/assets/index-DNHgOX2L.js +0 -1
- package/dist/assets/index-DjPLbVUc.js +0 -11
- package/dist/assets/is-path-prefix-equal-Cl2q8kGU.js +0 -1
- package/dist/assets/omit-BE_Bff1I.js +0 -1
- package/dist/assets/refType-BFp6Mdcn.js +0 -1
- package/dist/assets/toUpper-CIse071F.js +0 -1
- package/dist/assets/wrap-locale-DB1j-LK3.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as h}from"./codemirror.es-
|
|
1
|
+
import{C as h}from"./codemirror.es-rKm7-8so.js";import{g as E,a as C,b as N,c as _,d as V,e as x}from"./SchemaReference.es-CN84fzHD.js";import"./info-addon.es-B4Pyoy0-.js";import{Y as A,r as F}from"./index-D2LXsBcO.js";import"./index-AJgIDgSg.js";import"./introspection.es-CPJcz6nz.js";import"./forEachState.es-D8bf0zSr.js";var L=Object.defineProperty,l=(r,e)=>L(r,"name",{value:e,configurable:!0});h.registerHelper("info","graphql",(r,e)=>{if(!e.schema||!r.state)return;const i=r.state,n=i.kind,d=i.step,c=E(e.schema,r.state);if(n==="Field"&&d===0&&c.fieldDef||n==="AliasedField"&&d===2&&c.fieldDef){const a=document.createElement("div");return o(a,c,e),u(a,e,c.fieldDef),a}else if(n==="Directive"&&d===1&&c.directiveDef){const a=document.createElement("div");return f(a,c,e),u(a,e,c.directiveDef),a}else if(n==="Argument"&&d===0&&c.argDef){const a=document.createElement("div");return p(a,c,e),u(a,e,c.argDef),a}else if(n==="EnumValue"&&c.enumValue&&c.enumValue.description){const a=document.createElement("div");return D(a,c,e),u(a,e,c.enumValue),a}else if(n==="NamedType"&&c.type&&c.type.description){const a=document.createElement("div");return m(a,c,e,c.type),u(a,e,c.type),a}});function o(r,e,i){s(r,e,i),v(r,e,i,e.type)}l(o,"renderField");function s(r,e,i){var n;const d=((n=e.fieldDef)===null||n===void 0?void 0:n.name)||"";d.slice(0,2)!=="__"&&(m(r,e,i,e.parentType),t(r,".")),t(r,d,"field-name",i,C(e))}l(s,"renderQualifiedField");function f(r,e,i){var n;const d="@"+(((n=e.directiveDef)===null||n===void 0?void 0:n.name)||"");t(r,d,"directive-name",i,N(e))}l(f,"renderDirective");function p(r,e,i){var n;e.directiveDef?f(r,e,i):e.fieldDef&&s(r,e,i);const d=((n=e.argDef)===null||n===void 0?void 0:n.name)||"";t(r,"("),t(r,d,"arg-name",i,_(e)),v(r,e,i,e.inputType),t(r,")")}l(p,"renderArg");function v(r,e,i,n){t(r,": "),m(r,e,i,n)}l(v,"renderTypeAnnotation");function D(r,e,i){var n;const d=((n=e.enumValue)===null||n===void 0?void 0:n.name)||"";m(r,e,i,e.inputType),t(r,"."),t(r,d,"enum-value",i,V(e))}l(D,"renderEnumValue");function m(r,e,i,n){n instanceof A?(m(r,e,i,n.ofType),t(r,"!")):n instanceof F?(t(r,"["),m(r,e,i,n.ofType),t(r,"]")):t(r,(n==null?void 0:n.name)||"","type-name",i,x(e,n))}l(m,"renderType");function u(r,e,i){const n=i.description;if(n){const d=document.createElement("div");d.className="info-description",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n)),r.appendChild(d)}T(r,e,i)}l(u,"renderDescription");function T(r,e,i){const n=i.deprecationReason;if(n){const d=document.createElement("div");d.className="info-deprecation",e.renderDescription?d.innerHTML=e.renderDescription(n):d.appendChild(document.createTextNode(n));const c=document.createElement("span");c.className="info-deprecation-label",c.appendChild(document.createTextNode("Deprecated: ")),d.insertBefore(c,d.firstChild),r.appendChild(d)}}l(T,"renderDeprecation");function t(r,e,i="",n={onClick:null},d=null){if(i){const c=n.onClick;let a;c?(a=document.createElement("a"),a.href="javascript:void 0",a.addEventListener("click",g=>{c(d,g)})):a=document.createElement("span"),a.className=i,a.appendChild(document.createTextNode(e)),r.appendChild(a)}else r.appendChild(document.createTextNode(e))}l(t,"text");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{P as C,j as u,fb as Gt,d4 as O,fc as qt,b as Ht,N as jt,fd as Kt,a8 as Vt,bh as zt,r as P,ab as Jt,a6 as Yt,ac as Xt,bm as Zt,bs as Qt,o as kt,m as te,J as ee,W as re,k as ie,v as ne,D as se,B as ft,C as pt,t as oe,Y as ae,w as le,bD as ce,Z as he}from"./index-KdOmwCM0.js";import{W as ue}from"./url-evaluation-BMmqZ9Xm.js";import{s as St,n as fe}from"./schema-CV3xzp1r.js";import{r as pe}from"./cloneDeep-C8Xz4lYT.js";import{I as mt}from"./index-yrfr0MWP.js";import{d as me}from"./Delete-DpNbJCJA.js";import{_ as de}from"./useLocalStorage-DqX-zdwD.js";import{A as ge}from"./Autocomplete-DHpI8PP1.js";import{L as ve}from"./ListItemButton-Drq6UK1v.js";import{S as ye,a as be,b as xe}from"./Stepper-DfLckKIy.js";function je({mode:t,...e}){return t==="development"?u.jsx(ue,{type:"primary",...e,children:"DEV"}):null}je.propTypes={mode:C.string.isRequired};var _t={},lt={exports:{}},Et={exports:{}},Y=Et.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+Ct(t)}}},dt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:Ct};Object.keys(Y).forEach(function(t){Object.keys(dt).forEach(function(e){Y[t][e]||(Y[t][e]=dt[e])}),Y[t].protocols_re=RegExp("^("+Y[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function Ct(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var wt=Et.exports,gt=wt,K=Object.assign||function(e,r){if(r===null||typeof r!="object")return e;const i=Object.keys(r);let s=i.length;for(;s--;)e[i[s]]=r[i[s]];return e},Se=E;function E(t,e,r,i,s,a,c){var l=this;l.type=t,Object.keys(gt[t]).forEach(function(d){l[d]=gt[t][d]}),l.user=e,l.auth=r,l.project=i,l.committish=s,l.default=a,l.opts=c||{}}E.prototype.hash=function(){return this.committish?"#"+this.committish:""};E.prototype._fill=function(t,e){if(t){var r=K({},e);r.path=r.path?r.path.replace(/^[/]+/g,""):"",e=K(K({},this.opts),e);var i=this;Object.keys(this).forEach(function(h){i[h]!=null&&r[h]==null&&(r[h]=i[h])});var s=r.auth,a=r.committish,c=r.fragment,l=r.path,d=r.project;Object.keys(r).forEach(function(h){var j=r[h];(h==="path"||h==="project")&&typeof j=="string"?r[h]=j.split("/").map(function(m){return encodeURIComponent(m)}).join("/"):h!=="domain"&&(r[h]=encodeURIComponent(j))}),r["auth@"]=s?s+"@":"",r["#fragment"]=c?"#"+this.hashformat(c):"",r.fragment=r.fragment?r.fragment:"",r["#path"]=l?"#"+this.hashformat(l):"",r["/path"]=r.path?"/"+r.path:"",r.projectPath=d.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(r["#committish"]="",r["/tree/committish"]="",r["/committish"]="",r.committish=""):(r["#committish"]=a?"#"+a:"",r["/tree/committish"]=r.committish?"/"+r.treepath+"/"+r.committish:"",r["/committish"]=r.committish?"/"+r.committish:"",r.committish=r.committish||"master");var y=t;return Object.keys(r).forEach(function(h){y=y.replace(new RegExp("[{]"+h+"[}]","g"),r[h])}),e.noGitPlus?y.replace(/^git[+]/,""):y}};E.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};E.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};E.prototype.browse=function(t,e,r){return typeof t=="string"?(typeof e!="string"&&(r=e,e=null),this._fill(this.browsefiletemplate,K({fragment:e,path:t},r))):this._fill(this.browsetemplate,t)};E.prototype.docs=function(t){return this._fill(this.docstemplate,t)};E.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};E.prototype.https=function(t){return this._fill(this.httpstemplate,t)};E.prototype.git=function(t){return this._fill(this.gittemplate,t)};E.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};E.prototype.path=function(t){return this._fill(this.pathtemplate,t)};E.prototype.tarball=function(t){var e=K({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};E.prototype.file=function(t,e){return this._fill(this.filetemplate,K({path:t},e))};E.prototype.getDefaultRepresentation=function(){return this.default};E.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var it,vt;function _e(){return vt||(vt=1,it=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),it}var Ee=p;p.Node=B;p.create=p;function p(t){var e=this;if(e instanceof p||(e=new p),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}p.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};p.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};p.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};p.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)we(this,arguments[t]);return this.length};p.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Ie(this,arguments[t]);return this.length};p.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};p.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};p.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};p.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};p.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};p.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};p.prototype.map=function(t,e){e=e||this;for(var r=new p,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};p.prototype.mapReverse=function(t,e){e=e||this;for(var r=new p,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};p.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;i!==null;s++)r=t(r,i.value,s),i=i.next;return r};p.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;i!==null;s--)r=t(r,i.value,s),i=i.prev;return r};p.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};p.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};p.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(;s!==null&&i<e;i++,s=s.next)r.push(s.value);return r};p.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,s=this.tail;s!==null&&i>e;i--)s=s.prev;for(;s!==null&&i>t;i--,s=s.prev)r.push(s.value);return r};p.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(var a=[],i=0;s&&i<e;i++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var i=0;i<r.length;i++)s=Ce(this,s,r[i]);return a};p.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function Ce(t,e,r){var i=e===t.head?new B(r,null,e,t):new B(r,e,e.next,t);return i.next===null&&(t.tail=i),i.prev===null&&(t.head=i),t.length++,i}function we(t,e){t.tail=new B(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Ie(t,e){t.head=new B(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function B(t,e,r,i){if(!(this instanceof B))return new B(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{_e()(p)}catch{}const Re=Ee,N=Symbol("max"),L=Symbol("length"),H=Symbol("lengthCalculator"),Z=Symbol("allowStale"),$=Symbol("maxAge"),U=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),S=Symbol("lruList"),R=Symbol("cache"),It=Symbol("updateAgeOnGet"),nt=()=>1;class Ae{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[N]=e.max||1/0;const r=e.length||nt;if(this[H]=typeof r!="function"?nt:r,this[Z]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[$]=e.maxAge||0,this[U]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[It]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[N]=e||1/0,X(this)}get max(){return this[N]}set allowStale(e){this[Z]=!!e}get allowStale(){return this[Z]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[$]=e,X(this)}get maxAge(){return this[$]}set lengthCalculator(e){typeof e!="function"&&(e=nt),e!==this[H]&&(this[H]=e,this[L]=0,this[S].forEach(r=>{r.length=this[H](r.value,r.key),this[L]+=r.length})),X(this)}get lengthCalculator(){return this[H]}get length(){return this[L]}get itemCount(){return this[S].length}rforEach(e,r){r=r||this;for(let i=this[S].tail;i!==null;){const s=i.prev;bt(this,e,i,r),i=s}}forEach(e,r){r=r||this;for(let i=this[S].head;i!==null;){const s=i.next;bt(this,e,i,r),i=s}}keys(){return this[S].toArray().map(e=>e.key)}values(){return this[S].toArray().map(e=>e.value)}reset(){this[U]&&this[S]&&this[S].length&&this[S].forEach(e=>this[U](e.key,e.value)),this[R]=new Map,this[S]=new Re,this[L]=0}dump(){return this[S].map(e=>Q(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[S]}set(e,r,i){if(i=i||this[$],i&&typeof i!="number")throw new TypeError("maxAge must be a number");const s=i?Date.now():0,a=this[H](r,e);if(this[R].has(e)){if(a>this[N])return V(this,this[R].get(e)),!1;const d=this[R].get(e).value;return this[U]&&(this[yt]||this[U](e,d.value)),d.now=s,d.maxAge=i,d.value=r,this[L]+=a-d.length,d.length=a,this.get(e),X(this),!0}const c=new Oe(e,r,a,s,i);return c.length>this[N]?(this[U]&&this[U](e,r),!1):(this[L]+=c.length,this[S].unshift(c),this[R].set(e,this[S].head),X(this),!0)}has(e){if(!this[R].has(e))return!1;const r=this[R].get(e).value;return!Q(this,r)}get(e){return st(this,e,!0)}peek(e){return st(this,e,!1)}pop(){const e=this[S].tail;return e?(V(this,e),e.value):null}del(e){V(this,this[R].get(e))}load(e){this.reset();const r=Date.now();for(let i=e.length-1;i>=0;i--){const s=e[i],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const c=a-r;c>0&&this.set(s.k,s.v,c)}}}prune(){this[R].forEach((e,r)=>st(this,r,!1))}}const st=(t,e,r)=>{const i=t[R].get(e);if(i){const s=i.value;if(Q(t,s)){if(V(t,i),!t[Z])return}else r&&(t[It]&&(i.value.now=Date.now()),t[S].unshiftNode(i));return s.value}},Q=(t,e)=>{if(!e||!e.maxAge&&!t[$])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[$]&&r>t[$]},X=t=>{if(t[L]>t[N])for(let e=t[S].tail;t[L]>t[N]&&e!==null;){const r=e.prev;V(t,e),e=r}},V=(t,e)=>{if(e){const r=e.value;t[U]&&t[U](r.key,r.value),t[L]-=r.length,t[R].delete(r.key),t[S].removeNode(e)}};class Oe{constructor(e,r,i,s,a){this.key=e,this.value=r,this.length=i,this.now=s,this.maxAge=a||0}}const bt=(t,e,r,i)=>{let s=r.value;Q(t,s)&&(V(t,r),t[Z]||(s=void 0)),s&&e.call(i,s.value,s.key,t)};var Pe=Ae,at=Gt,xt=wt,Ue=lt.exports=Se,Le=Pe,ot=new Le({max:1e3}),Te={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function De(t){return Te[t]||t.slice(0,-1)}var Ne={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};lt.exports.fromUrl=function(t,e){if(typeof t=="string"){var r=t+JSON.stringify(e||{});return ot.has(r)||ot.set(r,$e(t,e)),ot.get(r)}};function $e(t,e){if(!(t==null||t==="")){var r=Me(Be(t)?"github:"+t:t),i=Fe(r),s=r.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(c){try{var l=xt[c],d=null;i.auth&&Ne[i.protocol]&&(d=i.auth);var y=i.hash?decodeURIComponent(i.hash.substr(1)):null,h=null,j=null,m=null;if(s&&s[1]===c)h=s[2]&&decodeURIComponent(s[2]),j=decodeURIComponent(s[3].replace(/\.git$/,"")),m="shortcut";else{if(i.host&&i.host!==l.domain&&i.host.replace(/^www[.]/,"")!==l.domain||!l.protocols_re.test(i.protocol)||!i.path)return;var F=l.pathmatch,w=i.path.match(F);if(!w)return;w[1]!==null&&w[1]!==void 0&&(h=decodeURIComponent(w[1].replace(/^:/,""))),j=decodeURIComponent(w[2]),m=De(i.protocol)}return new Ue(c,h,d,j,y,m,e)}catch(I){if(!(I instanceof URIError))throw I}}).filter(function(c){return c});if(a.length===1)return a[0]}}function Be(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Me(t){var e=at.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Fe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var r=at.parse(t);if(r.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var i=new at.URL(s[0]);r.auth=i.username||"",i.password&&(r.auth+=":"+i.password)}}return r}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var We=lt.exports,M={},A={},Ge=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A,"__esModule",{value:!0});A.setService=A.findService=A.getDefaultServiceConfig=A.getServiceConfig=void 0;const qe=Ge(pe),He=St,Rt={},ct=t=>{Rt[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};A.setService=ct;ct({name:"auth",schema:He.authConfigSchema,default:{}});const At=t=>{if(!t)throw new Error("service name should not be empty");const e=Rt[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Ot=(t,e,{validate:r}={})=>{const i=At(t),s=(0,qe.default)(e||{}),{value:a,error:c}=i.validate(s);if(r&&c)throw new Error(`Invalid blocklet service config: ${c.details.map(l=>l.message).join(", ")}`);return a};A.getServiceConfig=Ot;const Pt=t=>{const{defaultConfig:e}=At(t);return e};A.getDefaultServiceConfig=Pt;const Ut=(t,e)=>{const r=[e];return(t||[]).find(i=>r.includes(i.name))};A.findService=Ut;A.default={getServiceConfig:Ot,getDefaultServiceConfig:Pt,findService:Ut,setService:ct};Object.defineProperty(M,"__esModule",{value:!0});M.fixAndValidateService=M.validateMeta=void 0;const Ke=St,Ve=A,ze=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(r=>{r.config=(0,Ve.getServiceConfig)(r.name,r.config,{validate:!0})})}),t);M.fixAndValidateService=ze;const Lt=(t,{ensureFiles:e=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:c={}}={})=>{const l=(0,Ke.createBlockletSchema)(null,{ensureFiles:e,ensureDist:r,ensureComponentStore:i,ensureName:s,skipValidateDidName:a,...c}),{value:d,error:y}=l.validate(t);if(y)throw new Error(`Invalid blocklet meta: ${y.details.map(h=>h.message).join(", ")}`);return d};M.validateMeta=Lt;M.default=Lt;(function(t){var e=O&&O.__createBinding||(Object.create?function(n,o,v,b){b===void 0&&(b=v);var g=Object.getOwnPropertyDescriptor(o,v);(!g||("get"in g?!o.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return o[v]}}),Object.defineProperty(n,b,g)}:function(n,o,v,b){b===void 0&&(b=v),n[b]=o[v]}),r=O&&O.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),i=O&&O.__importStar||function(){var n=function(o){return n=Object.getOwnPropertyNames||function(v){var b=[];for(var g in v)Object.prototype.hasOwnProperty.call(v,g)&&(b[b.length]=g);return b},n(o)};return function(o){if(o&&o.__esModule)return o;var v={};if(o!=null)for(var b=n(o),g=0;g<b.length;g++)b[g]!=="default"&&e(v,o,b[g]);return r(v,o),v}}(),s=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(qt),c=i(We),l=Ht,d=M;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return d.fixAndValidateService}});const y=fe,h=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=l.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=h;const j=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=c.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=j;const m=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=m;const F=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=F;const w=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=w;const I=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(v=>{Array.isArray(n[v])&&(n[v]=n[v].map(o))}),n),W=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",v=n.url||n.web,b=v?` (${v})`:"",g=n.email||n.mail,x=g?` <${g}>`:"";return o+x+b};t.formatPerson=W;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),v=n.match(/\(([^)]+)\)/),b=n.match(/<([^>]+)>/),g={};return o&&o[0].trim()&&(g.name=o[0].trim()),b&&([,g.email]=b),v&&([,g.url]=v),g};t.parsePerson=T;const G=n=>(I(n,W),I(n,T),n);t.fixPerson=G;const _=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(x=>{x.type===l.BLOCKLET_INTERFACE_TYPE_WEB&&(x.protocol="http")}),n;const b=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?l.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",g=({type:x="web",name:k,path:J="/",protocol:tt="http",port:et=l.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:x,name:k,path:J,prefix:b,port:et,protocol:tt})};return[l.BLOCKLET_INTERFACE_PUBLIC].forEach(x=>{n[x]&&g({name:x,path:n[x]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(x=>{g({type:"service",name:x.protocol,protocol:x.protocol,port:{internal:`BLOCKLET_${x.protocol}_PORT`.toUpperCase(),external:x.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=_;const z=n=>{const{did:o}=n;try{(0,y.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:h,fixRepository:j,fixFiles:m,fixKeywords:F,fixPerson:G,fixTags:w,fixName:z,formatPerson:W,parsePerson:T,fixInterfaces:_,fixService:d.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return u.jsxs(jt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?u.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:C.object.isRequired,locale:C.string.isRequired};const Je="install-blocklet-from-URL",Dt=()=>{const[t,e]=de(Je,"[]",{raw:!0}),r=s=>{const a=s.trim(),c=JSON.parse(t),l=c.findIndex(d=>d===a);l!==0&&(l>0&&c.splice(l,1),c.length>=10&&c.splice(9),c.unshift(a),e(JSON.stringify(c)))},i=s=>{if(!s)return;const a=JSON.parse(t),c=s.trim(),l=a.findIndex(d=>d===c);l>-1&&(a.splice(l,1),e(JSON.stringify(a)))};return{urls:t?JSON.parse(t):[],addUrlRecord:r,removeUrlRecord:i}},Ye=Vt(()=>({listItemText:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}));function ht(t){const{value:e,onValueChange:r,children:i,helperText:s}=t,{urls:a,removeUrlRecord:c}=Dt(),l=(y,h)=>{y.preventDefault(),y.stopPropagation(),c(h)},d=Ye();return u.jsxs(jt,{children:[u.jsx(ge,{freeSolo:!0,options:a,inputValue:e,onInputChange:(y,h)=>{r(h)},disableClearable:!0,popupIcon:null,renderInput:y=>zt.cloneElement(i,{...y}),renderOption:(y,h)=>P.createElement(Jt,{...y,key:h,secondaryAction:u.jsx(Yt,{edge:"end","aria-label":"delete",onClick:j=>l(j,h),children:u.jsx(me,{})})},u.jsx(ve,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:u.jsx(Xt,{primary:h,className:d.listItemText})})),ListboxProps:{sx:{maxHeight:300,overflow:"auto"}}}),u.jsx(Zt,{style:{margin:0},children:s})]})}ht.propTypes={onValueChange:C.func,children:C.node,value:C.string,helperText:C.string};ht.defaultProps={onValueChange:()=>{},children:null,value:"",helperText:""};function Nt({defaultUrl:t,onCancel:e,onSuccess:r,onError:i,mode:s,handleText:a}){const{api:c}=Qt(),{api:l}=kt(),[d,y]=P.useState(!1),[h,j]=P.useState(""),{t:m,locale:F}=te(),w={dist:{}},[I,W]=P.useState(t),[T,G]=P.useState(t?1:0),[_,z]=P.useState(w),[n,o]=P.useState(!1),[v,b]=P.useState({}),g=s==="component",x=g?!0:!t,{addUrlRecord:k}=Dt(),J=async()=>{z(w),j(null),y(!0);let f=I.trim();!f.startsWith("https://")&&!f.startsWith("http://")&&!f.startsWith("file://")&&(f=`file://${f}`);try{const q=decodeURIComponent(f);try{new URL(q)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:Ft,registryUrl:Wt}=await c.getBlockletMetaFromUrl({input:{url:q}});z(rt),b({inStore:Ft,registryUrl:Wt,inputUrl:f}),k(f)}catch(q){console.error(q);const rt=`Blocklet Install failed: ${he(q)}`;j(rt),i(q)}finally{y(!1)}},tt=()=>{if(g){r({meta:_,...v}),e();return}y(!0),o(!0)},et=()=>{y(!1),o(!1),r({meta:_,...v}),e()},$t=()=>{y(!1),o(!1)};P.useEffect(()=>{t&&J()},[t]);const Bt=[{name:m("common.name"),value:ee.getDisplayName({meta:_},!0)},{name:m("common.version"),value:_.version},{name:m("common.did"),value:_.did?u.jsx(re,{did:_.did}):null},{name:m("common.author"),value:_.owner?u.jsx(Tt,{owner:_.owner,locale:F}):_t.formatPerson(_.author)},{name:m("blocklet.dist.downloadLink"),value:_.dist.tarball}],Mt=()=>d?u.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:u.jsx(pt,{})}):_.did?u.jsx("div",{style:{paddingLeft:"10%"},children:Bt.map(f=>f.name===m("common.did")?u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,nameFormatter:()=>m("common.did"),children:f.value},f.name):u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,children:f.value},f.name))}):null,ut=[{label:m("blocklet.fromUrl.step0"),body:u.jsx(ie,{component:"div",children:u.jsx(ht,{style:{marginBottom:32},value:I,helperText:m("blocklet.fromUrl.description"),onValueChange:f=>{j(null),W(f)},children:u.jsx(ne,{label:m("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:I,onChange:f=>{j(null),W(f.target.value)},disabled:d,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),J(),G(1))}})})}),cancel:m("common.cancel"),confirm:m("common.next"),onCancel:e,onConfirm:()=>{J(),G(1)}},{label:m("blocklet.fromUrl.step1"),body:Mt(),cancel:m(x?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||m("blocklet.fromUrl.confirm"),onCancel:()=>{x?G(f=>f-1):e()},onConfirm:()=>{tt()}}],D=ut[T];return u.jsxs(u.Fragment,{children:[u.jsxs(se,{title:(a==null?void 0:a.title)||m("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>D.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:u.jsxs(u.Fragment,{children:[D.cancel&&u.jsx(ft,{onClick:f=>{f.stopPropagation(),j(null),D.onCancel()},color:"inherit",children:D.cancel||m("common.cancel")}),u.jsxs(ft,{onClick:f=>{f.stopPropagation(),D.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:d||!I||h,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[d&&T===0&&u.jsx(pt,{size:16}),D.confirm]})]}),children:[x&&u.jsx(ye,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:f})=>u.jsx(be,{children:u.jsx(xe,{children:f})},f))}),u.jsx(oe,{component:"div",style:{marginTop:24},children:D.body}),!!h&&u.jsx(ae,{severity:"error",style:{width:"100%",marginTop:8},children:h})]}),_&&n&&u.jsx(le,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:l.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:_.title,wt:ce(_),blockletMetaUrl:decodeURIComponent(I.trim())},messages:{title:m("setup.keyPair.title"),scan:m("setup.keyPair.scan"),confirm:m("setup.keyPair.confirm"),success:m("setup.keyPair.success")},onClose:$t})]})}Nt.propTypes={defaultUrl:C.string,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,mode:C.oneOf(["install","component"]),handleText:C.object};Nt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{je as B,Nt as I,Tt as a,_t as f};
|
|
1
|
+
import{P as C,j as u,fa as Gt,d3 as O,fb as qt,b as Ht,N as jt,fc as Kt,a8 as Vt,bh as zt,r as P,ab as Jt,a6 as Yt,ac as Xt,bm as Zt,bs as Qt,o as kt,m as te,J as ee,W as re,k as ie,v as ne,D as se,B as ft,C as pt,t as oe,Y as ae,w as le,bD as ce,Z as he}from"./index-AJgIDgSg.js";import{W as ue}from"./url-evaluation-CyY2eIYi.js";import{s as St,n as fe}from"./schema-BAt_zCax.js";import{r as pe}from"./cloneDeep-DdAFYsMv.js";import{I as mt}from"./index-2OI_OVBD.js";import{d as me}from"./Delete-X-iZLu8W.js";import{_ as de}from"./useLocalStorage-DErQTCC8.js";import{A as ge}from"./Autocomplete-DgD7oXbC.js";import{L as ve}from"./ListItemButton-DU8Ok_s-.js";import{S as ye,a as be,b as xe}from"./Stepper-EVvxFm-l.js";function je({mode:t,...e}){return t==="development"?u.jsx(ue,{type:"primary",...e,children:"DEV"}):null}je.propTypes={mode:C.string.isRequired};var _t={},lt={exports:{}},Et={exports:{}},Y=Et.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(t){return"file-"+Ct(t)}}},dt={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:Ct};Object.keys(Y).forEach(function(t){Object.keys(dt).forEach(function(e){Y[t][e]||(Y[t][e]=dt[e])}),Y[t].protocols_re=RegExp("^("+Y[t].protocols.map(function(e){return e.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function Ct(t){return t.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var wt=Et.exports,gt=wt,K=Object.assign||function(e,r){if(r===null||typeof r!="object")return e;const i=Object.keys(r);let s=i.length;for(;s--;)e[i[s]]=r[i[s]];return e},Se=E;function E(t,e,r,i,s,a,c){var l=this;l.type=t,Object.keys(gt[t]).forEach(function(d){l[d]=gt[t][d]}),l.user=e,l.auth=r,l.project=i,l.committish=s,l.default=a,l.opts=c||{}}E.prototype.hash=function(){return this.committish?"#"+this.committish:""};E.prototype._fill=function(t,e){if(t){var r=K({},e);r.path=r.path?r.path.replace(/^[/]+/g,""):"",e=K(K({},this.opts),e);var i=this;Object.keys(this).forEach(function(h){i[h]!=null&&r[h]==null&&(r[h]=i[h])});var s=r.auth,a=r.committish,c=r.fragment,l=r.path,d=r.project;Object.keys(r).forEach(function(h){var j=r[h];(h==="path"||h==="project")&&typeof j=="string"?r[h]=j.split("/").map(function(m){return encodeURIComponent(m)}).join("/"):h!=="domain"&&(r[h]=encodeURIComponent(j))}),r["auth@"]=s?s+"@":"",r["#fragment"]=c?"#"+this.hashformat(c):"",r.fragment=r.fragment?r.fragment:"",r["#path"]=l?"#"+this.hashformat(l):"",r["/path"]=r.path?"/"+r.path:"",r.projectPath=d.split("/").map(encodeURIComponent).join("/"),e.noCommittish?(r["#committish"]="",r["/tree/committish"]="",r["/committish"]="",r.committish=""):(r["#committish"]=a?"#"+a:"",r["/tree/committish"]=r.committish?"/"+r.treepath+"/"+r.committish:"",r["/committish"]=r.committish?"/"+r.committish:"",r.committish=r.committish||"master");var y=t;return Object.keys(r).forEach(function(h){y=y.replace(new RegExp("[{]"+h+"[}]","g"),r[h])}),e.noGitPlus?y.replace(/^git[+]/,""):y}};E.prototype.ssh=function(t){return this._fill(this.sshtemplate,t)};E.prototype.sshurl=function(t){return this._fill(this.sshurltemplate,t)};E.prototype.browse=function(t,e,r){return typeof t=="string"?(typeof e!="string"&&(r=e,e=null),this._fill(this.browsefiletemplate,K({fragment:e,path:t},r))):this._fill(this.browsetemplate,t)};E.prototype.docs=function(t){return this._fill(this.docstemplate,t)};E.prototype.bugs=function(t){return this._fill(this.bugstemplate,t)};E.prototype.https=function(t){return this._fill(this.httpstemplate,t)};E.prototype.git=function(t){return this._fill(this.gittemplate,t)};E.prototype.shortcut=function(t){return this._fill(this.shortcuttemplate,t)};E.prototype.path=function(t){return this._fill(this.pathtemplate,t)};E.prototype.tarball=function(t){var e=K({},t,{noCommittish:!1});return this._fill(this.tarballtemplate,e)};E.prototype.file=function(t,e){return this._fill(this.filetemplate,K({path:t},e))};E.prototype.getDefaultRepresentation=function(){return this.default};E.prototype.toString=function(t){return this.default&&typeof this[this.default]=="function"?this[this.default](t):this.sshurl(t)};var it,vt;function _e(){return vt||(vt=1,it=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}),it}var Ee=p;p.Node=B;p.create=p;function p(t){var e=this;if(e instanceof p||(e=new p),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(s){e.push(s)});else if(arguments.length>0)for(var r=0,i=arguments.length;r<i;r++)e.push(arguments[r]);return e}p.prototype.removeNode=function(t){if(t.list!==this)throw new Error("removing node which does not belong to this list");var e=t.next,r=t.prev;return e&&(e.prev=r),r&&(r.next=e),t===this.head&&(this.head=e),t===this.tail&&(this.tail=r),t.list.length--,t.next=null,t.prev=null,t.list=null,e};p.prototype.unshiftNode=function(t){if(t!==this.head){t.list&&t.list.removeNode(t);var e=this.head;t.list=this,t.next=e,e&&(e.prev=t),this.head=t,this.tail||(this.tail=t),this.length++}};p.prototype.pushNode=function(t){if(t!==this.tail){t.list&&t.list.removeNode(t);var e=this.tail;t.list=this,t.prev=e,e&&(e.next=t),this.tail=t,this.head||(this.head=t),this.length++}};p.prototype.push=function(){for(var t=0,e=arguments.length;t<e;t++)we(this,arguments[t]);return this.length};p.prototype.unshift=function(){for(var t=0,e=arguments.length;t<e;t++)Ie(this,arguments[t]);return this.length};p.prototype.pop=function(){if(this.tail){var t=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,t}};p.prototype.shift=function(){if(this.head){var t=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,t}};p.prototype.forEach=function(t,e){e=e||this;for(var r=this.head,i=0;r!==null;i++)t.call(e,r.value,i,this),r=r.next};p.prototype.forEachReverse=function(t,e){e=e||this;for(var r=this.tail,i=this.length-1;r!==null;i--)t.call(e,r.value,i,this),r=r.prev};p.prototype.get=function(t){for(var e=0,r=this.head;r!==null&&e<t;e++)r=r.next;if(e===t&&r!==null)return r.value};p.prototype.getReverse=function(t){for(var e=0,r=this.tail;r!==null&&e<t;e++)r=r.prev;if(e===t&&r!==null)return r.value};p.prototype.map=function(t,e){e=e||this;for(var r=new p,i=this.head;i!==null;)r.push(t.call(e,i.value,this)),i=i.next;return r};p.prototype.mapReverse=function(t,e){e=e||this;for(var r=new p,i=this.tail;i!==null;)r.push(t.call(e,i.value,this)),i=i.prev;return r};p.prototype.reduce=function(t,e){var r,i=this.head;if(arguments.length>1)r=e;else if(this.head)i=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;i!==null;s++)r=t(r,i.value,s),i=i.next;return r};p.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else if(this.tail)i=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;i!==null;s--)r=t(r,i.value,s),i=i.prev;return r};p.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};p.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};p.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(;s!==null&&i<e;i++,s=s.next)r.push(s.value);return r};p.prototype.sliceReverse=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new p;if(e<t||e<0)return r;t<0&&(t=0),e>this.length&&(e=this.length);for(var i=this.length,s=this.tail;s!==null&&i>e;i--)s=s.prev;for(;s!==null&&i>t;i--,s=s.prev)r.push(s.value);return r};p.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,s=this.head;s!==null&&i<t;i++)s=s.next;for(var a=[],i=0;s&&i<e;i++)a.push(s.value),s=this.removeNode(s);s===null&&(s=this.tail),s!==this.head&&s!==this.tail&&(s=s.prev);for(var i=0;i<r.length;i++)s=Ce(this,s,r[i]);return a};p.prototype.reverse=function(){for(var t=this.head,e=this.tail,r=t;r!==null;r=r.prev){var i=r.prev;r.prev=r.next,r.next=i}return this.head=e,this.tail=t,this};function Ce(t,e,r){var i=e===t.head?new B(r,null,e,t):new B(r,e,e.next,t);return i.next===null&&(t.tail=i),i.prev===null&&(t.head=i),t.length++,i}function we(t,e){t.tail=new B(e,t.tail,null,t),t.head||(t.head=t.tail),t.length++}function Ie(t,e){t.head=new B(e,null,t.head,t),t.tail||(t.tail=t.head),t.length++}function B(t,e,r,i){if(!(this instanceof B))return new B(t,e,r,i);this.list=i,this.value=t,e?(e.next=this,this.prev=e):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}try{_e()(p)}catch{}const Re=Ee,N=Symbol("max"),L=Symbol("length"),H=Symbol("lengthCalculator"),Z=Symbol("allowStale"),$=Symbol("maxAge"),U=Symbol("dispose"),yt=Symbol("noDisposeOnSet"),S=Symbol("lruList"),R=Symbol("cache"),It=Symbol("updateAgeOnGet"),nt=()=>1;class Ae{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");this[N]=e.max||1/0;const r=e.length||nt;if(this[H]=typeof r!="function"?nt:r,this[Z]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[$]=e.maxAge||0,this[U]=e.dispose,this[yt]=e.noDisposeOnSet||!1,this[It]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[N]=e||1/0,X(this)}get max(){return this[N]}set allowStale(e){this[Z]=!!e}get allowStale(){return this[Z]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[$]=e,X(this)}get maxAge(){return this[$]}set lengthCalculator(e){typeof e!="function"&&(e=nt),e!==this[H]&&(this[H]=e,this[L]=0,this[S].forEach(r=>{r.length=this[H](r.value,r.key),this[L]+=r.length})),X(this)}get lengthCalculator(){return this[H]}get length(){return this[L]}get itemCount(){return this[S].length}rforEach(e,r){r=r||this;for(let i=this[S].tail;i!==null;){const s=i.prev;bt(this,e,i,r),i=s}}forEach(e,r){r=r||this;for(let i=this[S].head;i!==null;){const s=i.next;bt(this,e,i,r),i=s}}keys(){return this[S].toArray().map(e=>e.key)}values(){return this[S].toArray().map(e=>e.value)}reset(){this[U]&&this[S]&&this[S].length&&this[S].forEach(e=>this[U](e.key,e.value)),this[R]=new Map,this[S]=new Re,this[L]=0}dump(){return this[S].map(e=>Q(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[S]}set(e,r,i){if(i=i||this[$],i&&typeof i!="number")throw new TypeError("maxAge must be a number");const s=i?Date.now():0,a=this[H](r,e);if(this[R].has(e)){if(a>this[N])return V(this,this[R].get(e)),!1;const d=this[R].get(e).value;return this[U]&&(this[yt]||this[U](e,d.value)),d.now=s,d.maxAge=i,d.value=r,this[L]+=a-d.length,d.length=a,this.get(e),X(this),!0}const c=new Oe(e,r,a,s,i);return c.length>this[N]?(this[U]&&this[U](e,r),!1):(this[L]+=c.length,this[S].unshift(c),this[R].set(e,this[S].head),X(this),!0)}has(e){if(!this[R].has(e))return!1;const r=this[R].get(e).value;return!Q(this,r)}get(e){return st(this,e,!0)}peek(e){return st(this,e,!1)}pop(){const e=this[S].tail;return e?(V(this,e),e.value):null}del(e){V(this,this[R].get(e))}load(e){this.reset();const r=Date.now();for(let i=e.length-1;i>=0;i--){const s=e[i],a=s.e||0;if(a===0)this.set(s.k,s.v);else{const c=a-r;c>0&&this.set(s.k,s.v,c)}}}prune(){this[R].forEach((e,r)=>st(this,r,!1))}}const st=(t,e,r)=>{const i=t[R].get(e);if(i){const s=i.value;if(Q(t,s)){if(V(t,i),!t[Z])return}else r&&(t[It]&&(i.value.now=Date.now()),t[S].unshiftNode(i));return s.value}},Q=(t,e)=>{if(!e||!e.maxAge&&!t[$])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[$]&&r>t[$]},X=t=>{if(t[L]>t[N])for(let e=t[S].tail;t[L]>t[N]&&e!==null;){const r=e.prev;V(t,e),e=r}},V=(t,e)=>{if(e){const r=e.value;t[U]&&t[U](r.key,r.value),t[L]-=r.length,t[R].delete(r.key),t[S].removeNode(e)}};class Oe{constructor(e,r,i,s,a){this.key=e,this.value=r,this.length=i,this.now=s,this.maxAge=a||0}}const bt=(t,e,r,i)=>{let s=r.value;Q(t,s)&&(V(t,r),t[Z]||(s=void 0)),s&&e.call(i,s.value,s.key,t)};var Pe=Ae,at=Gt,xt=wt,Ue=lt.exports=Se,Le=Pe,ot=new Le({max:1e3}),Te={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function De(t){return Te[t]||t.slice(0,-1)}var Ne={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};lt.exports.fromUrl=function(t,e){if(typeof t=="string"){var r=t+JSON.stringify(e||{});return ot.has(r)||ot.set(r,$e(t,e)),ot.get(r)}};function $e(t,e){if(!(t==null||t==="")){var r=Me(Be(t)?"github:"+t:t),i=Fe(r),s=r.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),a=Object.keys(xt).map(function(c){try{var l=xt[c],d=null;i.auth&&Ne[i.protocol]&&(d=i.auth);var y=i.hash?decodeURIComponent(i.hash.substr(1)):null,h=null,j=null,m=null;if(s&&s[1]===c)h=s[2]&&decodeURIComponent(s[2]),j=decodeURIComponent(s[3].replace(/\.git$/,"")),m="shortcut";else{if(i.host&&i.host!==l.domain&&i.host.replace(/^www[.]/,"")!==l.domain||!l.protocols_re.test(i.protocol)||!i.path)return;var F=l.pathmatch,w=i.path.match(F);if(!w)return;w[1]!==null&&w[1]!==void 0&&(h=decodeURIComponent(w[1].replace(/^:/,""))),j=decodeURIComponent(w[2]),m=De(i.protocol)}return new Ue(c,h,d,j,y,m,e)}catch(I){if(!(I instanceof URIError))throw I}}).filter(function(c){return c});if(a.length===1)return a[0]}}function Be(t){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(t)}function Me(t){var e=at.parse(t);return e.protocol==="gist:"&&e.host&&!e.path?e.protocol+"/"+e.host:t}function Fe(t){var e=t.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!e){var r=at.parse(t);if(r.auth){const s=t.match(/[^@]+@[^:/]+/);if(s){var i=new at.URL(s[0]);r.auth=i.username||"",i.password&&(r.auth+=":"+i.password)}}return r}return{protocol:"git+ssh:",slashes:!0,auth:e[1],host:e[2],port:null,hostname:e[2],hash:e[4],search:null,query:null,pathname:"/"+e[3],path:"/"+e[3],href:"git+ssh://"+e[1]+"@"+e[2]+"/"+e[3]+(e[4]||"")}}var We=lt.exports,M={},A={},Ge=O&&O.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(A,"__esModule",{value:!0});A.setService=A.findService=A.getDefaultServiceConfig=A.getServiceConfig=void 0;const qe=Ge(pe),He=St,Rt={},ct=t=>{Rt[t.name]={validate:t.schema.validate.bind(t.schema),defaultConfig:t.default}};A.setService=ct;ct({name:"auth",schema:He.authConfigSchema,default:{}});const At=t=>{if(!t)throw new Error("service name should not be empty");const e=Rt[t];if(!e)throw new Error(`service ${t} does not exist`);return e},Ot=(t,e,{validate:r}={})=>{const i=At(t),s=(0,qe.default)(e||{}),{value:a,error:c}=i.validate(s);if(r&&c)throw new Error(`Invalid blocklet service config: ${c.details.map(l=>l.message).join(", ")}`);return a};A.getServiceConfig=Ot;const Pt=t=>{const{defaultConfig:e}=At(t);return e};A.getDefaultServiceConfig=Pt;const Ut=(t,e)=>{const r=[e];return(t||[]).find(i=>r.includes(i.name))};A.findService=Ut;A.default={getServiceConfig:Ot,getDefaultServiceConfig:Pt,findService:Ut,setService:ct};Object.defineProperty(M,"__esModule",{value:!0});M.fixAndValidateService=M.validateMeta=void 0;const Ke=St,Ve=A,ze=t=>(!t.interfaces||!t.interfaces.length||t.interfaces.forEach(e=>{e.services&&e.services.length&&e.services.forEach(r=>{r.config=(0,Ve.getServiceConfig)(r.name,r.config,{validate:!0})})}),t);M.fixAndValidateService=ze;const Lt=(t,{ensureFiles:e=!1,ensureDist:r=!1,ensureComponentStore:i=!0,ensureName:s=!1,skipValidateDidName:a=!1,schemaOptions:c={}}={})=>{const l=(0,Ke.createBlockletSchema)(null,{ensureFiles:e,ensureDist:r,ensureComponentStore:i,ensureName:s,skipValidateDidName:a,...c}),{value:d,error:y}=l.validate(t);if(y)throw new Error(`Invalid blocklet meta: ${y.details.map(h=>h.message).join(", ")}`);return d};M.validateMeta=Lt;M.default=Lt;(function(t){var e=O&&O.__createBinding||(Object.create?function(n,o,v,b){b===void 0&&(b=v);var g=Object.getOwnPropertyDescriptor(o,v);(!g||("get"in g?!o.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return o[v]}}),Object.defineProperty(n,b,g)}:function(n,o,v,b){b===void 0&&(b=v),n[b]=o[v]}),r=O&&O.__setModuleDefault||(Object.create?function(n,o){Object.defineProperty(n,"default",{enumerable:!0,value:o})}:function(n,o){n.default=o}),i=O&&O.__importStar||function(){var n=function(o){return n=Object.getOwnPropertyNames||function(v){var b=[];for(var g in v)Object.prototype.hasOwnProperty.call(v,g)&&(b[b.length]=g);return b},n(o)};return function(o){if(o&&o.__esModule)return o;var v={};if(o!=null)for(var b=n(o),g=0;g<b.length;g++)b[g]!=="default"&&e(v,o,b[g]);return r(v,o),v}}(),s=O&&O.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.fixService=t.fixInterfaces=t.parsePerson=t.formatPerson=t.fixName=t.fixTags=t.fixPerson=t.fixKeywords=t.fixFiles=t.fixRepository=t.fixRequired=void 0;const a=s(qt),c=i(We),l=Ht,d=M;Object.defineProperty(t,"fixService",{enumerable:!0,get:function(){return d.fixAndValidateService}});const y=fe,h=(n,o)=>{n.description||(n.description=`Blocklet from ${o}`),n.version||(n.version=l.BLOCKLET_DEFAULT_VERSION)};t.fixRequired=h;const j=n=>{if(n.repository&&(typeof n.repository=="string"&&(n.repository={type:"git",url:n.repository}),n.repository.url)){const o=c.fromUrl(n.repository.url);o&&(n.repository.url=o.getDefaultRepresentation()==="shortcut"?o.https():o.toString())}};t.fixRepository=j;const m=n=>{Array.isArray(n.files)?n.files&&(n.files=n.files.filter(o=>!(!o||typeof o!="string"))):delete n.files};t.fixFiles=m;const F=n=>{typeof n.keywords=="string"&&(n.keywords=n.keywords.split(/,\s+/)),n.keywords&&!Array.isArray(n.keywords)?delete n.keywords:n.keywords&&(n.keywords=n.keywords.filter(o=>!(typeof o!="string"||!o)))};t.fixKeywords=F;const w=n=>{typeof n.tags=="string"&&(n.tags=n.tags.split(/,\s+/)),n.tags&&!Array.isArray(n.tags)?delete n.tags:n.tags&&(n.tags=n.tags.filter(o=>!(typeof o!="string"||!o)))};t.fixTags=w;const I=(n,o)=>(n.author&&(n.author=o(n.author)),["maintainers","contributors"].forEach(v=>{Array.isArray(n[v])&&(n[v]=n[v].map(o))}),n),W=n=>{if(!n)return"";if(typeof n=="string")return n;const o=n.name||"",v=n.url||n.web,b=v?` (${v})`:"",g=n.email||n.mail,x=g?` <${g}>`:"";return o+x+b};t.formatPerson=W;const T=n=>{if(typeof n!="string")return n;const o=n.match(/^([^(<]+)/),v=n.match(/\(([^)]+)\)/),b=n.match(/<([^>]+)>/),g={};return o&&o[0].trim()&&(g.name=o[0].trim()),b&&([,g.email]=b),v&&([,g.url]=v),g};t.parsePerson=T;const G=n=>(I(n,W),I(n,T),n);t.fixPerson=G;const _=(n,o=!0)=>{if(Array.isArray(n.interfaces)||(n.interfaces=[]),n.interfaces.length)return n.interfaces.forEach(x=>{x.type===l.BLOCKLET_INTERFACE_TYPE_WEB&&(x.protocol="http")}),n;const b=(0,a.default)(n,"capabilities.dynamicPathPrefix",!0)?l.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",g=({type:x="web",name:k,path:J="/",protocol:tt="http",port:et=l.BLOCKLET_DEFAULT_PORT_NAME})=>{n.interfaces.push({type:x,name:k,path:J,prefix:b,port:et,protocol:tt})};return[l.BLOCKLET_INTERFACE_PUBLIC].forEach(x=>{n[x]&&g({name:x,path:n[x]})}),Array.isArray(n.exposeServices)&&n.exposeServices.forEach(x=>{g({type:"service",name:x.protocol,protocol:x.protocol,port:{internal:`BLOCKLET_${x.protocol}_PORT`.toUpperCase(),external:x.port}})}),o&&(delete n.publicUrl,delete n.adminUrl,delete n.configUrl,delete n.docUrl,delete n.exposeServices,n.capabilities&&delete n.capabilities.dynamicPathPrefix),n};t.fixInterfaces=_;const z=n=>{const{did:o}=n;try{(0,y.validateNewDid)(o),n.name=o}catch{}return n};t.fixName=z,t.default={fixRequired:h,fixRepository:j,fixFiles:m,fixKeywords:F,fixPerson:G,fixTags:w,fixName:z,formatPerson:W,parsePerson:T,fixInterfaces:_,fixService:d.fixAndValidateService}})(_t);function Tt({owner:t,locale:e}){return u.jsxs(jt,{sx:{display:"flex",alignItems:"center",gap:1},children:[t.fullName,t.did?u.jsx(Kt,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:t.did,compact:!0,size:14,locale:e}):null]})}Tt.propTypes={owner:C.object.isRequired,locale:C.string.isRequired};const Je="install-blocklet-from-URL",Dt=()=>{const[t,e]=de(Je,"[]",{raw:!0}),r=s=>{const a=s.trim(),c=JSON.parse(t),l=c.findIndex(d=>d===a);l!==0&&(l>0&&c.splice(l,1),c.length>=10&&c.splice(9),c.unshift(a),e(JSON.stringify(c)))},i=s=>{if(!s)return;const a=JSON.parse(t),c=s.trim(),l=a.findIndex(d=>d===c);l>-1&&(a.splice(l,1),e(JSON.stringify(a)))};return{urls:t?JSON.parse(t):[],addUrlRecord:r,removeUrlRecord:i}},Ye=Vt(()=>({listItemText:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}));function ht(t){const{value:e,onValueChange:r,children:i,helperText:s}=t,{urls:a,removeUrlRecord:c}=Dt(),l=(y,h)=>{y.preventDefault(),y.stopPropagation(),c(h)},d=Ye();return u.jsxs(jt,{children:[u.jsx(ge,{freeSolo:!0,options:a,inputValue:e,onInputChange:(y,h)=>{r(h)},disableClearable:!0,popupIcon:null,renderInput:y=>zt.cloneElement(i,{...y}),renderOption:(y,h)=>P.createElement(Jt,{...y,key:h,secondaryAction:u.jsx(Yt,{edge:"end","aria-label":"delete",onClick:j=>l(j,h),children:u.jsx(me,{})})},u.jsx(ve,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:u.jsx(Xt,{primary:h,className:d.listItemText})})),ListboxProps:{sx:{maxHeight:300,overflow:"auto"}}}),u.jsx(Zt,{style:{margin:0},children:s})]})}ht.propTypes={onValueChange:C.func,children:C.node,value:C.string,helperText:C.string};ht.defaultProps={onValueChange:()=>{},children:null,value:"",helperText:""};function Nt({defaultUrl:t,onCancel:e,onSuccess:r,onError:i,mode:s,handleText:a}){const{api:c}=Qt(),{api:l}=kt(),[d,y]=P.useState(!1),[h,j]=P.useState(""),{t:m,locale:F}=te(),w={dist:{}},[I,W]=P.useState(t),[T,G]=P.useState(t?1:0),[_,z]=P.useState(w),[n,o]=P.useState(!1),[v,b]=P.useState({}),g=s==="component",x=g?!0:!t,{addUrlRecord:k}=Dt(),J=async()=>{z(w),j(null),y(!0);let f=I.trim();!f.startsWith("https://")&&!f.startsWith("http://")&&!f.startsWith("file://")&&(f=`file://${f}`);try{const q=decodeURIComponent(f);try{new URL(q)}catch{throw new Error("Invalid URL")}const{meta:rt,inStore:Ft,registryUrl:Wt}=await c.getBlockletMetaFromUrl({input:{url:q}});z(rt),b({inStore:Ft,registryUrl:Wt,inputUrl:f}),k(f)}catch(q){console.error(q);const rt=`Blocklet Install failed: ${he(q)}`;j(rt),i(q)}finally{y(!1)}},tt=()=>{if(g){r({meta:_,...v}),e();return}y(!0),o(!0)},et=()=>{y(!1),o(!1),r({meta:_,...v}),e()},$t=()=>{y(!1),o(!1)};P.useEffect(()=>{t&&J()},[t]);const Bt=[{name:m("common.name"),value:ee.getDisplayName({meta:_},!0)},{name:m("common.version"),value:_.version},{name:m("common.did"),value:_.did?u.jsx(re,{did:_.did}):null},{name:m("common.author"),value:_.owner?u.jsx(Tt,{owner:_.owner,locale:F}):_t.formatPerson(_.author)},{name:m("blocklet.dist.downloadLink"),value:_.dist.tarball}],Mt=()=>d?u.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:u.jsx(pt,{})}):_.did?u.jsx("div",{style:{paddingLeft:"10%"},children:Bt.map(f=>f.name===m("common.did")?u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,nameFormatter:()=>m("common.did"),children:f.value},f.name):u.jsx(mt,{valueComponent:"div",nameWidth:120,name:f.name,children:f.value},f.name))}):null,ut=[{label:m("blocklet.fromUrl.step0"),body:u.jsx(ie,{component:"div",children:u.jsx(ht,{style:{marginBottom:32},value:I,helperText:m("blocklet.fromUrl.description"),onValueChange:f=>{j(null),W(f)},children:u.jsx(ne,{label:m("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:I,onChange:f=>{j(null),W(f.target.value)},disabled:d,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),J(),G(1))}})})}),cancel:m("common.cancel"),confirm:m("common.next"),onCancel:e,onConfirm:()=>{J(),G(1)}},{label:m("blocklet.fromUrl.step1"),body:Mt(),cancel:m(x?"common.pre":"common.cancel"),confirm:(a==null?void 0:a.confirm)||m("blocklet.fromUrl.confirm"),onCancel:()=>{x?G(f=>f-1):e()},onConfirm:()=>{tt()}}],D=ut[T];return u.jsxs(u.Fragment,{children:[u.jsxs(se,{title:(a==null?void 0:a.title)||m("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>D.onCancel(),showCloseButton:T===0,disableEscapeKeyDown:!0,open:!0,actions:u.jsxs(u.Fragment,{children:[D.cancel&&u.jsx(ft,{onClick:f=>{f.stopPropagation(),j(null),D.onCancel()},color:"inherit",children:D.cancel||m("common.cancel")}),u.jsxs(ft,{onClick:f=>{f.stopPropagation(),D.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:d||!I||h,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[d&&T===0&&u.jsx(pt,{size:16}),D.confirm]})]}),children:[x&&u.jsx(ye,{alternativeLabel:!0,activeStep:T,children:ut.map(({label:f})=>u.jsx(be,{children:u.jsx(xe,{children:f})},f))}),u.jsx(oe,{component:"div",style:{marginTop:24},children:D.body}),!!h&&u.jsx(ae,{severity:"error",style:{width:"100%",marginTop:8},children:h})]}),_&&n&&u.jsx(le,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:l.get,checkTimeout:5*60*1e3,onSuccess:et,extraParams:{title:_.title,wt:ce(_),blockletMetaUrl:decodeURIComponent(I.trim())},messages:{title:m("setup.keyPair.title"),scan:m("setup.keyPair.scan"),confirm:m("setup.keyPair.confirm"),success:m("setup.keyPair.success")},onClose:$t})]})}Nt.propTypes={defaultUrl:C.string,onCancel:C.func.isRequired,onSuccess:C.func.isRequired,onError:C.func,mode:C.oneOf(["install","component"]),handleText:C.object};Nt.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};export{je as B,Nt as I,Tt as a,_t as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bZ as D,j as s,P as r,n as v,r as m,f as E,bi as A,D as H,m as j,o as $,aU as M,cS as U,
|
|
1
|
+
import{bZ as D,j as s,P as r,n as v,r as m,f as E,bi as A,D as H,m as j,o as $,aU as M,cS as U,cw as b,a4 as q,cT as F,E as B,cU as O,cG as V,cV as N,cW as S,ax as W,N as L,bc as Y,b_ as X,bu as G,C as J}from"./index-AJgIDgSg.js";import{R as K}from"./index-D_gKXPug.js";import{N as Z}from"./index-O5b_bdsU.js";import{C as z}from"./index-knEewVFB.js";import{b as Q}from"./sdk-BmRwENgz.js";import{w as ee}from"./wrap-locale-Cw7rRT3-.js";const se=D(s.jsx("path",{d:"M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2m0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19z"}),"Inbox");function P({invitation:e,createPassportSvg:a,passportColor:c}){const[p,o]=m.useState(!1),{t}=m.useContext(E),l=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),u=m.useMemo(()=>a({title:l,issuer:e.info.name,issuerDid:e.info.appDid,ownerName:"Your Name",ownerDid:e.info.appDid,preferredColor:e.info.passportColor||c,extra:e.passportExpireTime?{key:"Exp",value:A(e.passportExpireTime).format("YYYY-MM-DD HH:mm:ss")}:void 0}),[e,l]),x=m.useCallback(()=>{o(!0)},[]),i=m.useCallback(()=>{o(!1)},[]);return s.jsxs(s.Fragment,{children:[s.jsx(ie,{children:s.jsxs("div",{className:"invite-passport__card",onClick:x,children:[!!e.display&&s.jsx(Z,{data:e.display,style:{width:"100%",height:"100%"}}),!e.display&&s.jsx("div",{className:"invite-passport__cover",dangerouslySetInnerHTML:{__html:u}})]})}),s.jsx(H,{open:p,title:t("invite.viewPermission"),PaperProps:{style:{minHeight:"auto",paddingBottom:"20px"}},onClose:i,children:e.role.permissions&&e.role.permissions.length>0?s.jsx("ul",{style:{listStyle:"circle",padding:"0 20px"},children:e.role.permissions.map(n=>s.jsx("li",{style:{listStyle:"circle"},children:n.description},n.name))}):s.jsxs("div",{style:{color:"#999",textAlign:"center"},children:[s.jsx(se,{style:{width:"30px",height:"30px"}}),s.jsx("div",{children:t("invite.emptyPermission")})]})})]})}P.propTypes={invitation:r.object.isRequired,createPassportSvg:r.func.isRequired,passportColor:r.string};P.defaultProps={passportColor:"auto"};const ie=v.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
max-width: 350px;
|
|
4
4
|
margin: 30px auto;
|
|
@@ -39,7 +39,7 @@ import{bZ as D,j as s,P as r,n as v,r as m,f as E,bi as A,D as H,m as j,o as $,a
|
|
|
39
39
|
line-height: 18px;
|
|
40
40
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
41
41
|
}
|
|
42
|
-
`;function k({invitation:e,onLogin:a,onReceive:c,inService:p,action:o}){var f;const{t,locale:l}=j(),{connectApi:u}=$(),{getPassportId:x}=
|
|
42
|
+
`;function k({invitation:e,onLogin:a,onReceive:c,inService:p,action:o}){var f;const{t,locale:l}=j(),{connectApi:u}=$(),{getPassportId:x}=V();let i;typeof window<"u"&&(i=(f=window==null?void 0:window.blocklet)==null?void 0:f.componentId);const n=M({loading:!1,extraParams:{baseUrl:window.location.origin,componentId:i,sourceAppPid:(e==null?void 0:e.sourceAppPid)||null}});U(async()=>{var g;const d=x();if(d&&(n.extraParams.passportId=d),o==="invite"?n.extraParams.inviteId=e.inviteId:o==="issue-passport"&&(n.extraParams.inviteId=e.inviteId,n.extraParams.id=e.inviteId),p&&((g=e==null?void 0:e.receiver)!=null&&g.did)){n.loading=!0;try{const w=await Q.user.getUserPublicInfo({did:e.receiver.did});w!=null&&w.sourceAppPid&&(n.extraParams.sourceAppPid=w.sourceAppPid)}finally{n.loading=!1}}});const _=b(()=>{u.close()}),h=b((...d)=>{u.close(),a(...d)}),y=b(()=>{var d,g;if(typeof c=="function"){c();return}p?u.open({action:o,className:"connect",forceConnected:((d=e==null?void 0:e.receiver)==null?void 0:d.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:{provider:"wallet",...n.extraParams},baseUrl:window.location.origin,prefix:q(window.location.origin,B.WELLKNOWN_SERVICE_PATH_PREFIX,F),messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_,passkeyBehavior:"both"},{locale:l}):u.open({action:o,className:"connect",forceConnected:((g=e==null?void 0:e.receiver)==null?void 0:g.did)||!1,autoConnect:!1,disableSwitchApp:!0,locale:l,extraParams:n.extraParams,messages:{title:t("receive.dialog.title"),scan:t("receive.dialog.scan"),confirm:t("receive.dialog.confirm"),success:t("receive.dialog.success")},onSuccess:h,onClose:_,passkeyBehavior:"both"})});return s.jsxs(re,{children:[s.jsx(z,{loading:n.loading,size:"large",variant:"contained",className:"invite-receive__button","data-cy":"invite-receive-passport",color:"primary",onClick:y,children:t("invite.receive")}),s.jsxs("div",{className:"invite-receive__until",children:[t("invite.validUntil"),O(e.expireDate,l)]})]})}k.propTypes={invitation:r.object.isRequired,onLogin:r.func,onReceive:r.func,inService:r.bool,action:r.oneOf(["invite","issue-passport"])};k.defaultProps={onLogin:()=>{},onReceive:null,inService:!1,action:"invite"};const re=v.div`
|
|
43
43
|
text-align: center;
|
|
44
44
|
.invite-receive__logo-wrapper {
|
|
45
45
|
display: inline-flex;
|
|
@@ -109,7 +109,7 @@ import{bZ as D,j as s,P as r,n as v,r as m,f as E,bi as A,D as H,m as j,o as $,a
|
|
|
109
109
|
.invite-receive__link {
|
|
110
110
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
111
111
|
}
|
|
112
|
-
`;function T({invitation:e}){const{t:a}=j(),c=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),p=m.useMemo(()=>a("invite.message",{name:"{{name}}",role:c,dapp:"{{dapp}}"}),[a,c]),o=N(e.info.chainHost,e.inviter.did,"account"),t=S(p,{name(){return o?s.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:e.inviter.fullName},"name"):e.inviter.fullName},dapp(){return s.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return s.jsxs(ne,{children:[s.jsx(
|
|
112
|
+
`;function T({invitation:e}){const{t:a}=j(),c=m.useMemo(()=>(e.role.title||e.role.name).toUpperCase(),[e.role.title,e.role.name]),p=m.useMemo(()=>a("invite.message",{name:"{{name}}",role:c,dapp:"{{dapp}}"}),[a,c]),o=N(e.info.chainHost,e.inviter.did,"account"),t=S(p,{name(){return o?s.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:e.inviter.fullName},"name"):e.inviter.fullName},dapp(){return s.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return s.jsxs(ne,{children:[s.jsx(W,{did:e.inviter.did,src:encodeURI(e.inviter.avatar),size:80,shape:"circle",variant:"circle"}),s.jsx("div",{className:"invite-user__message",children:t})]})}T.propTypes={invitation:r.object.isRequired};const ne=v.div`
|
|
113
113
|
display: flex;
|
|
114
114
|
flex-direction: column;
|
|
115
115
|
justify-content: center;
|
|
@@ -132,7 +132,7 @@ import{bZ as D,j as s,P as r,n as v,r as m,f as E,bi as A,D as H,m as j,o as $,a
|
|
|
132
132
|
.invite-user__link {
|
|
133
133
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
134
134
|
}
|
|
135
|
-
`;function C({invitation:e,type:a}){const{t:c}=j(),p=m.useMemo(()=>c("invite.success",{dapp:"{{dapp}}"}),[c]),o=N(e.info.chainHost,e.inviter.did,"account"),t=a==="receiver"?e.receiver:e.inviter,l=S(p,{name(){return o?s.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:t.fullName},"name"):t.fullName},dapp(){return s.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return s.jsxs(oe,{children:[s.jsx(L,{pt:1,color:"success.main",children:s.jsx(
|
|
135
|
+
`;function C({invitation:e,type:a}){const{t:c}=j(),p=m.useMemo(()=>c("invite.success",{dapp:"{{dapp}}"}),[c]),o=N(e.info.chainHost,e.inviter.did,"account"),t=a==="receiver"?e.receiver:e.inviter,l=S(p,{name(){return o?s.jsx("a",{target:"_blank",href:o,className:"invite-user__link",rel:"noreferrer",children:t.fullName},"name"):t.fullName},dapp(){return s.jsx("a",{target:"_blank",href:e.info.url,className:"invite-user__link",rel:"noreferrer",children:e.info.name},"dapp")}});return s.jsxs(oe,{children:[s.jsx(L,{pt:1,color:"success.main",children:s.jsx(Y,{style:{fontSize:80}})}),s.jsx("div",{className:"invite-user__message",children:l})]})}C.propTypes={invitation:r.object.isRequired,type:r.oneOf(["inviter","receiver"])};C.defaultProps={type:"inviter"};const oe=v.div`
|
|
136
136
|
display: flex;
|
|
137
137
|
flex-direction: column;
|
|
138
138
|
justify-content: center;
|
|
@@ -155,7 +155,7 @@ import{bZ as D,j as s,P as r,n as v,r as m,f as E,bi as A,D as H,m as j,o as $,a
|
|
|
155
155
|
.invite-user__link {
|
|
156
156
|
color: ${({theme:e})=>e.palette.primary.main};
|
|
157
157
|
}
|
|
158
|
-
`;function I({getDataFn:e,passportColor:a,createPassportSvg:c,onLoginSuccess:p,checkFn:o,onReceive:t,inService:l,action:u,status:x}){var y,f,d;const i=
|
|
158
|
+
`;function I({getDataFn:e,passportColor:a,createPassportSvg:c,onLoginSuccess:p,checkFn:o,onReceive:t,inService:l,action:u,status:x}){var y,f,d;const i=G(e);if(i!=null&&i.loading)return s.jsx(J,{});if(i!=null&&i.error)return s.jsx(K,{status:"404",title:(f=(y=i==null?void 0:i.error)==null?void 0:y.response)==null?void 0:f.data,description:""});const n=x==="success"||((d=i==null?void 0:i.data)==null?void 0:d.status)==="success",_=n?C:T,h=n?R:k;return s.jsx(ae,{className:"page-invite__wrapper",children:i!=null&&i.data?s.jsxs(L,{className:"page-invite__card",children:[s.jsx(_,{invitation:i.data}),s.jsx(P,{invitation:i.data,action:u,createPassportSvg:c,passportColor:a}),s.jsx(h,{invitation:i.data,action:u,onLogin:p,checkFn:o,onReceive:t,inService:l})]}):null})}I.propTypes={getDataFn:r.func.isRequired,checkFn:r.func.isRequired,createPassportSvg:r.func.isRequired,onLoginSuccess:r.func,onReceive:r.func,passportColor:r.string,inService:r.bool,action:r.oneOf(["invite","issue-passpor"]),status:r.oneOf(["success",""])};I.defaultProps={onLoginSuccess:()=>{},passportColor:"auto",onReceive:null,inService:!1,action:"invite",status:""};const ae=X("div")`
|
|
159
159
|
max-width: 460px;
|
|
160
160
|
max-height: 650px;
|
|
161
161
|
min-height: 450px;
|
|
@@ -174,4 +174,4 @@ import{bZ as D,j as s,P as r,n as v,r as m,f as E,bi as A,D as H,m as j,o as $,a
|
|
|
174
174
|
.page-invite__app {
|
|
175
175
|
margin-top: 20px;
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,xe=ee(I);export{xe as I};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bl as i,ga as e}from"./index-AJgIDgSg.js";const a=e;var o=(r,t)=>a(r)===a(t);const P=i(o);export{P as i};
|