@abtnode/blocklet-services 1.16.21-beta-da3f852a → 1.16.21-beta-8ce6a704
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/services/auth/index.js +22 -4
- package/api/util/attach-shared-utils.js +8 -1
- package/dist/assets/{Add-Fa_jDVH4.js → Add-TPn0Xq2y.js} +1 -1
- package/dist/assets/{Alert-CVBj6K_x.js → Alert-msfMnXoL.js} +1 -1
- package/dist/assets/{ArrowDropDown-eyRAz4BW.js → ArrowDropDown-u5qE0c6W.js} +1 -1
- package/dist/assets/{Autocomplete-JUBrNs2g.js → Autocomplete-vyFefb0T.js} +1 -1
- package/dist/assets/{Avatar-phMyiuZN.js → Avatar-40UryW2V.js} +1 -1
- package/dist/assets/{ButtonGroup-WpuCESRm.js → ButtonGroup-YM9idA0S.js} +1 -1
- package/dist/assets/{CardContent-11p23WdN.js → CardContent-Q2QI-QCi.js} +1 -1
- package/dist/assets/{CheckCircle-TSCHhVSn.js → CheckCircle-EKyY4n73.js} +1 -1
- package/dist/assets/{Checkbox-E7hRdaZx.js → Checkbox-6b2Wxw9o.js} +1 -1
- package/dist/assets/{ChevronRight-4XdBuB9J.js → ChevronRight-969UYibA.js} +1 -1
- package/dist/assets/{DeleteOutline-ldnn034A.js → DeleteOutline-VKfxyMcW.js} +1 -1
- package/dist/assets/{DialogContentText-GOi1cMCU.js → DialogContentText-IKkXjwY4.js} +1 -1
- package/dist/assets/{Done-QX8JUe6j.js → Done-8vU_Upzq.js} +1 -1
- package/dist/assets/{Download-6axtZJsQ.js → Download-dvlwhMcC.js} +1 -1
- package/dist/assets/{Edit-3QDIocJ_.js → Edit-GbCk8hZt.js} +1 -1
- package/dist/assets/{EditIcon-iEwSDmTg.js → EditIcon-kce6kCKp.js} +1 -1
- package/dist/assets/{ExpandMore-AjCxxobS.js → ExpandMore-IA-2iaem.js} +1 -1
- package/dist/assets/{FilterList-2ERNRQaM.js → FilterList-qFkuKu0i.js} +1 -1
- package/dist/assets/{FormControl-dd94hWMS.js → FormControl-hdLaFfly.js} +1 -1
- package/dist/assets/{FormControlLabel-RXb6vK7s.js → FormControlLabel--DtAy8ru.js} +1 -1
- package/dist/assets/{FormGroup--UBs69R8.js → FormGroup-uAQ93T09.js} +1 -1
- package/dist/assets/{Google-IOajhpti.js → Google-Q7CSvqZv.js} +1 -1
- package/dist/assets/{Grid-xUYHRi0b.js → Grid-W1BkY5Ap.js} +1 -1
- package/dist/assets/{Hidden-mWvmgc4A.js → Hidden-85MTYsBc.js} +1 -1
- package/dist/assets/{Icon-Z3sa2o7_.js → Icon-NXg5tkLd.js} +1 -1
- package/dist/assets/{InfoOutlined-ASBaIOeG.js → InfoOutlined-CbR8jNPO.js} +1 -1
- package/dist/assets/{InputAdornment-uDUcdmme.js → InputAdornment-DqlpUqnE.js} +1 -1
- package/dist/assets/{InputLabel-TPtinWuK.js → InputLabel-NZgDieHH.js} +1 -1
- package/dist/assets/{LastPage-JHHCVMPH.js → LastPage-8I3Fk9_4.js} +1 -1
- package/dist/assets/{Launch-Lgl-88-b.js → Launch-eOQU29xS.js} +1 -1
- package/dist/assets/{LaunchOutlined-lL2bUPmR.js → LaunchOutlined-ZzEMLrgz.js} +1 -1
- package/dist/assets/{ListItem-0o0I3uAI.js → ListItem-8xgbSCnj.js} +1 -1
- package/dist/assets/{LockIcon-JBIsvzZH.js → LockIcon-sfj5oPgW.js} +1 -1
- package/dist/assets/{Loop-xAh7ODfS.js → Loop--wL6OZAl.js} +1 -1
- package/dist/assets/{MoreHoriz-CgcL_RUW.js → MoreHoriz-nW6861tu.js} +1 -1
- package/dist/assets/{MoreVert--r4YINap.js → MoreVert-js_otO_B.js} +1 -1
- package/dist/assets/{OpenInNew-UCL6a4s2.js → OpenInNew-LA_Vftw3.js} +1 -1
- package/dist/assets/{Pagination-Bv9Q6Zpr.js → Pagination-y_j_46OO.js} +1 -1
- package/dist/assets/{PlayArrow-lHMXu7Pu.js → PlayArrow-yDXb6jT-.js} +1 -1
- package/dist/assets/{RadioGroup-7FTePFM-.js → RadioGroup-q_troyXZ.js} +1 -1
- package/dist/assets/{Search-iVqmV6Op.js → Search-TiKYSEXg.js} +1 -1
- package/dist/assets/{Select-S9JKyZyg.js → Select-kt7kYpdf.js} +1 -1
- package/dist/assets/{ServerLogo-q3dZeMtc.js → ServerLogo-zKRLrZ_t.js} +1 -1
- package/dist/assets/{Skeleton-bZ_Miios.js → Skeleton-SccM_IPU.js} +1 -1
- package/dist/assets/{Slider-55cYAWYh.js → Slider-a2MsZ4Gl.js} +1 -1
- package/dist/assets/{Stepper-jB61m6gP.js → Stepper-cuElXodD.js} +1 -1
- package/dist/assets/{TableRow-NtkZR5qp.js → TableRow-g8XooIYl.js} +1 -1
- package/dist/assets/{TextField-mvaGVkiG.js → TextField-_iwvPvON.js} +1 -1
- package/dist/assets/{Toolbar-yH3XFZuP.js → Toolbar-VMTR0FH4.js} +1 -1
- package/dist/assets/{access-control-btXZcun0.js → access-control-uHfbEVh8.js} +1 -1
- package/dist/assets/{actions-gHfHu3vC.js → actions-eG2nr68h.js} +1 -1
- package/dist/assets/{add-component-core-rFzl_VX2.js → add-component-core-Wo1tPDwI.js} +1 -1
- package/dist/assets/add-resource-FFT9Nq-D.js +1 -0
- package/dist/assets/{addon-1QMy4IRG.js → addon-Bog8-kCc.js} +1 -1
- package/dist/assets/{analytics-RDIHqtEC.js → analytics-EzRmxVsS.js} +1 -1
- package/dist/assets/api-KhkAYAK1.js +1 -0
- package/dist/assets/{audit-logs-UyvhmXR3.js → audit-logs-F9Pr7cjv.js} +1 -1
- package/dist/assets/{button-t_AwvrL4.js → button-pphPD4D7.js} +1 -1
- package/dist/assets/{click-to-copy-H6ULFxkd.js → click-to-copy-TVTLHTem.js} +1 -1
- package/dist/assets/{complete-IuJpgYIr.js → complete-0l0ron_0.js} +1 -1
- package/dist/assets/{component-G6qh7GXc.js → component-CrwULnW_.js} +1 -1
- package/dist/assets/{config-TgYTBZTt.js → config-c0Lr2t0H.js} +1 -1
- package/dist/assets/{config-navigation-Rn6Zod0O.js → config-navigation-L-qLX4B0.js} +1 -1
- package/dist/assets/{config-4scj9ePp.js → config-vlauq037.js} +1 -1
- package/dist/assets/{confirm-rTEv2cR4.js → confirm-sh5q1a0n.js} +1 -1
- package/dist/assets/{confirm-QgU1_PTp.js → confirm-tcpqKzZB.js} +1 -1
- package/dist/assets/{connect-QgYEXdVh.js → connect-nYhNuMqi.js} +1 -1
- package/dist/assets/{connect-Dl-8ETzY.js → connect-obhVg5Ok.js} +1 -1
- package/dist/assets/{content-layout-royTMDoy.js → content-layout-NIhaYYrz.js} +1 -1
- package/dist/assets/{dashboard-u9hZyLwN.js → dashboard-I5vRXleu.js} +3 -3
- package/dist/assets/{did-address-HLejxWfT.js → did-address-qq_1T5l2.js} +1 -1
- package/dist/assets/{did-utils-HUCV2HWu.js → did-utils-n-LpEp5G.js} +1 -1
- package/dist/assets/{domain-GpRAPaIx.js → domain-MeqIChvN.js} +1 -1
- package/dist/assets/{domain-list-lPrVUmAl.js → domain-list-yGq_Y4yz.js} +1 -1
- package/dist/assets/{exchange-passport-IuC9VwEx.js → exchange-passport--BD8S8jX.js} +1 -1
- package/dist/assets/{fallback-b_zmsVbg.js → fallback-FI7UBCyS.js} +1 -1
- package/dist/assets/{format-error-wlUtS96P.js → format-error-AwlVbqQ_.js} +1 -1
- package/dist/assets/{fuel-TR64CTn1.js → fuel-Tnz0Y8l1.js} +1 -1
- package/dist/assets/fullpage-a7ojvBVp.js +1 -0
- package/dist/assets/{home-3M89U2oU.js → home-emaTaf8u.js} +1 -1
- package/dist/assets/{iframe-tVY0Votd.js → iframe-qCWq1lRA.js} +1 -1
- package/dist/assets/{index-FN8xWpsb.js → index-7WDAi8QZ.js} +1 -1
- package/dist/assets/{index-evdoM2z3.js → index-ALnlxAZf.js} +1 -1
- package/dist/assets/{index-dmjAo0qH.js → index-DMCnrsz9.js} +1 -1
- package/dist/assets/{index-FBVX6B9S.js → index-FwjymWKs.js} +4 -4
- package/dist/assets/{index--OWo39zO.js → index-HhHxxbfK.js} +1 -1
- package/dist/assets/{index-21p4-hlH.js → index-KULIep2J.js} +1 -1
- package/dist/assets/{index-0niAcafj.js → index-NeahD9R-.js} +1 -1
- package/dist/assets/{index-CLYRJvy9.js → index-Q8npJK7t.js} +1 -1
- package/dist/assets/{index-BG8b7I-X.js → index-Ro3Si39i.js} +1 -1
- package/dist/assets/{index-3wOALYwV.js → index-RxmlMTY4.js} +1 -1
- package/dist/assets/{index-K2Ybm2pw.js → index-S9SK_SjL.js} +1 -1
- package/dist/assets/{index-HUMCtJ-F.js → index-UJ1YMaoR.js} +1 -1
- package/dist/assets/{index-Drj2DsEg.js → index-VrHUjlIO.js} +1 -1
- package/dist/assets/{index-l56g_CHP.js → index-WY_Xf5uh.js} +1 -1
- package/dist/assets/{index-kA6bEgMs.js → index-XSoLlKHE.js} +1 -1
- package/dist/assets/{index--CyhSTyx.js → index-YpqYtp4Y.js} +1 -1
- package/dist/assets/{index-jXP9EjwJ.js → index-a5IVf4Ds.js} +1 -1
- package/dist/assets/{index-BD3_xRrb.js → index-bx0V2_nY.js} +3 -3
- package/dist/assets/{index-xRHYRJ_7.js → index-h5B_-jrN.js} +1 -1
- package/dist/assets/{index-l2b8-RX7.js → index-k76AZIv6.js} +1 -1
- package/dist/assets/{index-KIoBUz9b.js → index-kE9Ny3to.js} +1 -1
- package/dist/assets/{index-H9IRRby9.js → index-oSKvPxqz.js} +3 -3
- package/dist/assets/{index-O5NefLt1.js → index-pYu4WiGr.js} +1 -1
- package/dist/assets/{index-y1vZ4I-c.js → index-uFXfSLT3.js} +1 -1
- package/dist/assets/{index-pXkIJMvn.js → index-usQGF3Hd.js} +1 -1
- package/dist/assets/{index-G8cwybdF.js → index-v3sD9jwl.js} +1 -1
- package/dist/assets/{index-O-lzERhh.js → index-vcrZDM8V.js} +1 -1
- package/dist/assets/{index.es-EW-0danM.js → index.es-wsof92By.js} +1 -1
- package/dist/assets/{index.esm-yzdsIZwH.js → index.esm-sb7FovOt.js} +1 -1
- package/dist/assets/{invite-ZFnOF7D-.js → invite-U6iWhMyt.js} +1 -1
- package/dist/assets/{issue-passport-LI0vQTx6.js → issue-passport-HcMt_zdr.js} +1 -1
- package/dist/assets/{jss-plugin-props-sort.esm-dCzWy4MH.js → jss-plugin-props-sort.esm-uATOjvk7.js} +1 -1
- package/dist/assets/{launch-result-message-ZdZYSlup.js → launch-result-message-PfgqBUec.js} +1 -1
- package/dist/assets/{layout-EmhtrWaf.js → layout-_xpJFULa.js} +1 -1
- package/dist/assets/{list-header-CQgHRvVE.js → list-header-EVFeaoah.js} +1 -1
- package/dist/assets/localization-A9q7RwDF.js +1 -0
- package/dist/assets/{log-z1RzeRR6.js → log-3oZd9rhJ.js} +1 -1
- package/dist/assets/{login-zL8w551q.js → login-EhjG48Yw.js} +1 -1
- package/dist/assets/{logo-uploader-zW337Go0.js → logo-uploader-wd-ziphC.js} +3 -3
- package/dist/assets/{lost-passport-GLaDRSNa.js → lost-passport-Zuhxyica.js} +3 -3
- package/dist/assets/{lottie-jK27rNdj.js → lottie-8GVMnq4j.js} +1 -1
- package/dist/assets/{memoize-one.esm-t8vjaxPM.js → memoize-one.esm-SfINFbzL.js} +1 -1
- package/dist/assets/{nav-menu-Tl5mEfRm.js → nav-menu-MsHU6Nrg.js} +1 -1
- package/dist/assets/{notifications-PlI3p8fj.js → notifications-0zNYwhYd.js} +1 -1
- package/dist/assets/{overview-ysfYkE05.js → overview-l9Mpqmhu.js} +1 -1
- package/dist/assets/{page-header-66OZD-k5.js → page-header-H2K8sq1W.js} +1 -1
- package/dist/assets/{permission-hBdmK8vu.js → permission-z3yQEkWY.js} +1 -1
- package/dist/assets/preferences-E_gHyBm2.js +1 -0
- package/dist/assets/publish-resource-oHk38jQi.js +1 -0
- package/dist/assets/{react-0H7F4HJd.js → react-xqSM7B89.js} +3 -3
- package/dist/assets/{selector-MhbaknSB.js → selector-F8m6H7ls.js} +1 -1
- package/dist/assets/session-JrxJoUmO.js +1 -0
- package/dist/assets/{setup-sZd9bR8j.js → setup-Q8eWrWcl.js} +3 -3
- package/dist/assets/{slicedToArray-k67ntm7h.js → slicedToArray-cvBDQ8ge.js} +1 -1
- package/dist/assets/{spaces-PqbUeoTO.js → spaces-hhM8J11w.js} +1 -1
- package/dist/assets/{start-Zw90S5HQ.js → start-8bpjhQMX.js} +1 -1
- package/dist/assets/{step-actions-ILFnVvrv.js → step-actions-nm_Ds7nY.js} +1 -1
- package/dist/assets/{studio-o1cOhwh6.js → studio-VzA8spAy.js} +1 -1
- package/dist/assets/{switch-control-X6a6W1Im.js → switch-control-3QoW5jw5.js} +1 -1
- package/dist/assets/{transfer-ZLiabJcr.js → transfer-rlOoYYgH.js} +1 -1
- package/dist/assets/{uniqBy-ngvp8e0L.js → uniqBy-ce2Rut-n.js} +1 -1
- package/dist/assets/{unsubscribe-QliZKSwU.js → unsubscribe-knq8tExI.js} +1 -1
- package/dist/assets/{use-blocklet-info-for-connect-did-spaces-gdL1zKwo.js → use-blocklet-info-for-connect-did-spaces-xmxqqrX1.js} +1 -1
- package/dist/assets/{useAsync-L140-N35.js → useAsync-mbLXKNT9.js} +1 -1
- package/dist/assets/{useFormControl-pwVb7wu_.js → useFormControl-1XPmGFai.js} +1 -1
- package/dist/assets/{useLocalStorage-UtHo1ezh.js → useLocalStorage-aXh_Rj3q.js} +1 -1
- package/dist/assets/{useSetState-qyJ6mTGB.js → useSetState--uFjPInN.js} +1 -1
- package/dist/assets/{user-_XAxkLCw.js → user-Dz7m3bpJ.js} +1 -1
- package/dist/assets/{util-Xu6BqTTW.js → util-VyxQThsV.js} +1 -1
- package/dist/assets/{wallet-hidden-topbar-bqcwYNs3.js → wallet-hidden-topbar-UIfeoHPs.js} +3 -3
- package/dist/assets/{wrap-locale-FLgJeXdD.js → wrap-locale-RacvOmgo.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +22 -22
- package/dist/assets/add-resource-WRcoBeLJ.js +0 -1
- package/dist/assets/api-dJ8jWDqQ.js +0 -1
- package/dist/assets/fullpage-ErEPlrFR.js +0 -1
- package/dist/assets/localization-57p2YRoa.js +0 -1
- package/dist/assets/preferences-h7aAXHWa.js +0 -1
- package/dist/assets/publish-resource-6bBVAn-l.js +0 -1
- package/dist/assets/session-UBJotivU.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bK as J,r as W,bL as Q,bM as _,al as w,j as e,d as L,aq as X,S as Y,u as S,bN as Z,aJ as ee,e as q,h as te,T as u,F as f,bO as B,bf as F,aK as U,bP as $,n as C,bJ as ne,N as se,$ as oe,B as V,bt as ae,bQ as D,by as N,w as O,R as re,G as ie,O as le}from"./index-FBVX6B9S.js";import{H as ce}from"./index-CLYRJvy9.js";import{I as P}from"./index-l2b8-RX7.js";import{T as me}from"./index-BG8b7I-X.js";import{W as de}from"./did-address-HLejxWfT.js";import{g as pe,U as ue,P as he}from"./did-utils-HUCV2HWu.js";import{i as xe}from"./index-kA6bEgMs.js";import{u as ge,a as fe,C as v}from"./index.esm-yzdsIZwH.js";import{u as be}from"./confirm-QgU1_PTp.js";import{A as je}from"./Alert-CVBj6K_x.js";import{S as c,F as T}from"./FormControlLabel-RXb6vK7s.js";import{C as I}from"./Checkbox-E7hRdaZx.js";import{S as ve}from"./Select-S9JKyZyg.js";import{T as ye}from"./TextField-mvaGVkiG.js";import{M as Ce}from"./InputAdornment-uDUcdmme.js";import{f as H}from"./format-error-wlUtS96P.js";import{A as we}from"./Avatar-phMyiuZN.js";import"./fallback-b_zmsVbg.js";import"./nav-menu-Tl5mEfRm.js";import"./MoreHoriz-CgcL_RUW.js";import"./ExpandMore-AjCxxobS.js";import"./wallet-hidden-topbar-bqcwYNs3.js";import"./ListItem-0o0I3uAI.js";import"./selector-MhbaknSB.js";import"./useFormControl-pwVb7wu_.js";import"./FormControl-dd94hWMS.js";import"./InputLabel-TPtinWuK.js";var Se=function(n){var o=J(W.useState(n),2),i=o[0],t=o[1],a=W.useCallback(function(s){t(function(m){var d=Q(s)?s(m):s;return d?_(_({},m),d):m})},[]);return[i,a]};const ke=w(e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined"),Ae=w(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined"),ze=w(e.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83V6.31l6-2.12 6 2.12v4.78zm-9.18-.5L7.4 12l3.54 3.54 5.66-5.66-1.41-1.41-4.24 4.24-2.13-2.12z"}),"GppGoodOutlined"),Te=w(e.jsx("path",{d:"m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z"}),"SendOutlined");function Ie({data:n,user:o,onChange:i}){const{t}=S(),{api:a}=L(),[s,m]=Se({editing:!1,dirty:!1}),{control:d,getValues:g,setValue:p,formState:x,handleSubmit:k}=ge({defaultValues:Z({notifications:{email:!0,wallet:!0,phone:!1},webhooks:[]},n)}),{confirmApi:A,confirmHolder:y}=be(),M=ee(),E=new URLSearchParams(M.search),G=q(),b=fe({control:d,name:"webhooks"}),z=async r=>{try{await a.post("/api/user/extra",r),C.success(t("common.saveSuccess")),m({editing:!1}),await i()}catch(l){C.error(H(l))}};te(()=>{if(E.get("action")==="unsubscribe"){const r=E.get("channel");["email","wallet","phone"].includes(r)&&(G(M.pathname,{replace:!0}),A.open({title:t("notification.email.disable"),content:t("notification.email.disableDescription"),async onConfirm(l){await z({notifications:{[r]:!1}}),l()}}))}});const K=async r=>{try{const l=g();await a.put("/api/user/extra",l.webhooks[r]),C.success(t("team.member.settings.tested"))}catch(l){C.error(H(l))}};return e.jsxs(c,{spacing:3,children:[e.jsxs(c,{sx:{width:"100%"},children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.notification")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:k(z),disabled:x.isSubmitting,children:t("common.save")})]}),e.jsx(v,{name:"notifications.wallet",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.wallet,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.wallet"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:pe(o)})]})})}),e.jsx(v,{name:"notifications.email",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.email,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.email"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.email||""})]})})}),e.jsx(v,{name:"notifications.phone",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.phone,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,disabled:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.phone"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.phone||""})]})})})]}),e.jsxs(c,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.webhook")}),e.jsxs(c,{direction:"row",children:[s.editing&&e.jsx(f,{variant:"text",size:"small",color:"primary",style:{height:"32px"},onClick:()=>m({editing:!1}),children:t("common.cancel")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:s.editing?k(z):()=>m({editing:!0}),disabled:x.isSubmitting,children:s.editing?t("common.save"):t("common.edit")})]})]}),b.fields.map((r,l)=>{var R;const h=(R=B(x.errors,`webhooks.${l}.url`))==null?void 0:R.message;return s.editing?e.jsxs(c,{mt:2,spacing:2,sx:{width:"100%"},direction:"row",alignItems:"center",children:[e.jsxs(c,{direction:"row",spacing:2,sx:{width:"80%"},children:[e.jsx(v,{name:`webhooks.${l}.type`,control:d,rules:{required:t("common.required")},render:({field:j})=>e.jsxs(ve,{...j,sx:{flex:1},fullWidth:!0,size:"small",children:[e.jsx(F,{value:"api",children:t("team.member.settings.url")}),e.jsx(F,{value:"slack",children:t("team.member.settings.slack")})]})}),e.jsx(v,{name:`webhooks.${l}.url`,control:d,rules:{required:t("common.required"),validate:j=>xe(j)||t("common.invalid")},render:({field:j})=>e.jsx(ye,{sx:{flex:4},fullWidth:!0,size:"small",required:!0,...j,error:!!h,InputProps:{endAdornment:h?e.jsx(Ce,{position:"end",children:e.jsx(u,{component:"span",color:"error",children:h})}):null}})})]}),e.jsxs(c,{direction:"row",spacing:1,children:[e.jsx(U,{size:"small",onClick:()=>K(l),children:e.jsx(Te,{color:"primary",sx:{opacity:.75}})}),e.jsx(U,{size:"small",onClick:()=>b.remove(l),children:e.jsx(Ae,{color:"error",sx:{opacity:.75}})})]})]},r.id):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:r.type,children:r.url},r.id)}),!s.editing&&!b.fields.length&&e.jsx($,{children:t("common.empty")}),s.editing&&e.jsx(c,{mt:b.fields.length?2:1,direction:"row",justifyContent:"space-between",children:e.jsxs(f,{size:"small",variant:"outlined",color:"primary",onClick:()=>b.append({type:"slack",url:""}),children:[e.jsx(ke,{fontSize:"small"})," ",t("team.member.settings.add")]})})]}),y]})}function Pe({user:n}){const{api:o}=L(),{loading:i,error:t,runAsync:a,data:s}=X(()=>o.get("/api/user/extra").then(m=>m.data));return t?e.jsx(je,{severity:"error",children:t.message}):i||!s?e.jsx(Y,{}):e.jsx(Ie,{data:s,user:n,onChange:a})}function Le({user:n}){const{t:o,locale:i}=S(),t={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"};return[{name:o("team.member.name"),value:n.fullName},{name:o("common.email"),value:n.email},{name:o("common.phone"),value:n.phone},{name:o("team.member.lastLogin"),value:N(n.lastLoginAt,i)},{name:o("team.member.lastLoginIp"),value:n.lastLoginIp||""},{name:o("common.createdAt"),value:N(n.createdAt,i)},{name:o("team.member.source"),value:t[(n==null?void 0:n.sourceProvider)||O.USER_TYPE.WALLET]||(n==null?void 0:n.sourceProvider)}].filter(Boolean).map(s=>s.name===o("common.did")?e.jsx(P,{valueComponent:"div",nameWidth:120,name:s.name,nameFormatter:()=>o("common.did"),children:s.value},s.name):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.name,children:s.value},s.name))}function Oe({user:n}){const{t:o}=S(),i=(B(n,"passports")||[]).map(t=>({...t,revoked:t.status===O.PASSPORT_STATUS.REVOKED}));return i.length===0?e.jsx($,{children:o("common.empty")}):e.jsx(c,{direction:"row",spacing:3,children:i.map(t=>e.jsx(he,{passport:t,user:n,width:200,color:window.blocklet.passportColor,createPassportSvg:re,sx:{flexDirection:"column",alignItems:"center"}},t.id))})}function it(){const n=q(),o=ne(),{t:i}=S(),{session:t}=L(),a=se({user:t.user,tab:o.tab||"profile"}),s=p=>{a.tab=p,n(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/user/${p}`)},m={info:{label:i("common.profile"),value:"profile",component:Le},oauth:{label:i("team.member.connections"),value:"connections",component:ue},passports:{label:i("team.member.passports"),value:"passports",component:Oe},settings:{label:i("common.setting"),value:"settings",component:Pe}},d=Object.values(m).map(({label:p,value:x})=>({label:p,value:x})).filter(p=>{var x;return p.value==="connections"?(((x=a.user)==null?void 0:x.connectedAccounts)||[]).find(A=>{var y;return A.provider!==(((y=a.user)==null?void 0:y.sourceProvider)||oe.LOGIN_PROVIDER.WALLET)}):!0}),g=m[a.tab]||m.info;return e.jsxs(e.Fragment,{children:[e.jsx(ce,{}),e.jsxs(Me,{sx:{mt:4},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(we,{src:a.user.avatar,variant:"rounded",style:{width:80,height:80,backgroundColor:"transparent",marginRight:8}}),e.jsxs(c,{direction:"column",spacing:.5,children:[e.jsx(u,{variant:"h4",fontWeight:"bold",children:a.user.fullName}),e.jsx(V,{children:e.jsx(ae,{label:a.user.role.toUpperCase(),size:"small",variant:"outlined",color:"success",sx:{height:"auto",fontWeight:"bold",fontSize:"12px"},icon:e.jsx(ze,{sx:{fontSize:"0.8em"}})})}),e.jsx(de,{did:a.user.did})]})]}),e.jsxs(c,{children:[a.tab==="profile"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchProfile(D,{}),children:i("team.member.switch.profile")}),a.tab==="passports"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchPassport(D,{}),children:i("team.member.switch.passport")})]})]}),e.jsx(V,{className:"tabs",sx:{my:3},children:e.jsx(me,{tabs:d,current:a.tab,onChange:s})}),e.jsx("div",{className:"body",children:e.jsx(g.component,{user:a.user})})]})]})}const Me=ie(le)`
|
|
1
|
+
import{bK as J,r as W,bL as Q,bM as _,al as w,j as e,d as L,aq as X,S as Y,u as S,bN as Z,aJ as ee,e as q,h as te,T as u,F as f,bO as B,bf as F,aK as U,bP as $,n as C,bJ as ne,N as se,$ as oe,B as V,bt as ae,bQ as D,by as N,w as O,R as re,G as ie,O as le}from"./index-FwjymWKs.js";import{H as ce}from"./index-Q8npJK7t.js";import{I as P}from"./index-k76AZIv6.js";import{T as me}from"./index-Ro3Si39i.js";import{W as de}from"./did-address-qq_1T5l2.js";import{g as pe,U as ue,P as he}from"./did-utils-n-LpEp5G.js";import{i as xe}from"./index-XSoLlKHE.js";import{u as ge,a as fe,C as v}from"./index.esm-sb7FovOt.js";import{u as be}from"./confirm-tcpqKzZB.js";import{A as je}from"./Alert-msfMnXoL.js";import{S as c,F as T}from"./FormControlLabel--DtAy8ru.js";import{C as I}from"./Checkbox-6b2Wxw9o.js";import{S as ve}from"./Select-kt7kYpdf.js";import{T as ye}from"./TextField-_iwvPvON.js";import{M as Ce}from"./InputAdornment-DqlpUqnE.js";import{f as H}from"./format-error-AwlVbqQ_.js";import{A as we}from"./Avatar-40UryW2V.js";import"./fallback-FI7UBCyS.js";import"./nav-menu-MsHU6Nrg.js";import"./MoreHoriz-nW6861tu.js";import"./ExpandMore-IA-2iaem.js";import"./wallet-hidden-topbar-UIfeoHPs.js";import"./ListItem-8xgbSCnj.js";import"./selector-F8m6H7ls.js";import"./useFormControl-1XPmGFai.js";import"./FormControl-hdLaFfly.js";import"./InputLabel-NZgDieHH.js";var Se=function(n){var o=J(W.useState(n),2),i=o[0],t=o[1],a=W.useCallback(function(s){t(function(m){var d=Q(s)?s(m):s;return d?_(_({},m),d):m})},[]);return[i,a]};const ke=w(e.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"AddOutlined"),Ae=w(e.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5-1-1h-5l-1 1H5v2h14V4h-3.5z"}),"DeleteOutlineOutlined"),ze=w(e.jsx("path",{d:"M12 2 4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm6 9.09c0 4-2.55 7.7-6 8.83-3.45-1.13-6-4.82-6-8.83V6.31l6-2.12 6 2.12v4.78zm-9.18-.5L7.4 12l3.54 3.54 5.66-5.66-1.41-1.41-4.24 4.24-2.13-2.12z"}),"GppGoodOutlined"),Te=w(e.jsx("path",{d:"m4.01 6.03 7.51 3.22-7.52-1 .01-2.22m7.5 8.72L4 17.97v-2.22l7.51-1M2.01 3 2 10l15 2-15 2 .01 7L23 12 2.01 3z"}),"SendOutlined");function Ie({data:n,user:o,onChange:i}){const{t}=S(),{api:a}=L(),[s,m]=Se({editing:!1,dirty:!1}),{control:d,getValues:g,setValue:p,formState:x,handleSubmit:k}=ge({defaultValues:Z({notifications:{email:!0,wallet:!0,phone:!1},webhooks:[]},n)}),{confirmApi:A,confirmHolder:y}=be(),M=ee(),E=new URLSearchParams(M.search),G=q(),b=fe({control:d,name:"webhooks"}),z=async r=>{try{await a.post("/api/user/extra",r),C.success(t("common.saveSuccess")),m({editing:!1}),await i()}catch(l){C.error(H(l))}};te(()=>{if(E.get("action")==="unsubscribe"){const r=E.get("channel");["email","wallet","phone"].includes(r)&&(G(M.pathname,{replace:!0}),A.open({title:t("notification.email.disable"),content:t("notification.email.disableDescription"),async onConfirm(l){await z({notifications:{[r]:!1}}),l()}}))}});const K=async r=>{try{const l=g();await a.put("/api/user/extra",l.webhooks[r]),C.success(t("team.member.settings.tested"))}catch(l){C.error(H(l))}};return e.jsxs(c,{spacing:3,children:[e.jsxs(c,{sx:{width:"100%"},children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.notification")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:k(z),disabled:x.isSubmitting,children:t("common.save")})]}),e.jsx(v,{name:"notifications.wallet",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.wallet,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.wallet"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:pe(o)})]})})}),e.jsx(v,{name:"notifications.email",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.email,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.email"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.email||""})]})})}),e.jsx(v,{name:"notifications.phone",control:d,render:({field:r})=>e.jsx(T,{control:e.jsx(I,{checked:g().notifications.phone,...r,onChange:(l,h)=>p(r.name,h)}),disableTypography:!0,disabled:!0,label:e.jsxs(u,{color:"text.primary",children:[t("team.member.settings.phone"),e.jsx(u,{component:"span",color:"text.secondary",ml:1,children:o.phone||""})]})})})]}),e.jsxs(c,{children:[e.jsxs(c,{direction:"row",justifyContent:"space-between",children:[e.jsx(u,{variant:"h6",gutterBottom:!0,children:t("team.member.settings.webhook")}),e.jsxs(c,{direction:"row",children:[s.editing&&e.jsx(f,{variant:"text",size:"small",color:"primary",style:{height:"32px"},onClick:()=>m({editing:!1}),children:t("common.cancel")}),e.jsx(f,{variant:"contained",size:"small",color:"primary",style:{height:"32px"},onClick:s.editing?k(z):()=>m({editing:!0}),disabled:x.isSubmitting,children:s.editing?t("common.save"):t("common.edit")})]})]}),b.fields.map((r,l)=>{var R;const h=(R=B(x.errors,`webhooks.${l}.url`))==null?void 0:R.message;return s.editing?e.jsxs(c,{mt:2,spacing:2,sx:{width:"100%"},direction:"row",alignItems:"center",children:[e.jsxs(c,{direction:"row",spacing:2,sx:{width:"80%"},children:[e.jsx(v,{name:`webhooks.${l}.type`,control:d,rules:{required:t("common.required")},render:({field:j})=>e.jsxs(ve,{...j,sx:{flex:1},fullWidth:!0,size:"small",children:[e.jsx(F,{value:"api",children:t("team.member.settings.url")}),e.jsx(F,{value:"slack",children:t("team.member.settings.slack")})]})}),e.jsx(v,{name:`webhooks.${l}.url`,control:d,rules:{required:t("common.required"),validate:j=>xe(j)||t("common.invalid")},render:({field:j})=>e.jsx(ye,{sx:{flex:4},fullWidth:!0,size:"small",required:!0,...j,error:!!h,InputProps:{endAdornment:h?e.jsx(Ce,{position:"end",children:e.jsx(u,{component:"span",color:"error",children:h})}):null}})})]}),e.jsxs(c,{direction:"row",spacing:1,children:[e.jsx(U,{size:"small",onClick:()=>K(l),children:e.jsx(Te,{color:"primary",sx:{opacity:.75}})}),e.jsx(U,{size:"small",onClick:()=>b.remove(l),children:e.jsx(Ae,{color:"error",sx:{opacity:.75}})})]})]},r.id):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:r.type,children:r.url},r.id)}),!s.editing&&!b.fields.length&&e.jsx($,{children:t("common.empty")}),s.editing&&e.jsx(c,{mt:b.fields.length?2:1,direction:"row",justifyContent:"space-between",children:e.jsxs(f,{size:"small",variant:"outlined",color:"primary",onClick:()=>b.append({type:"slack",url:""}),children:[e.jsx(ke,{fontSize:"small"})," ",t("team.member.settings.add")]})})]}),y]})}function Pe({user:n}){const{api:o}=L(),{loading:i,error:t,runAsync:a,data:s}=X(()=>o.get("/api/user/extra").then(m=>m.data));return t?e.jsx(je,{severity:"error",children:t.message}):i||!s?e.jsx(Y,{}):e.jsx(Ie,{data:s,user:n,onChange:a})}function Le({user:n}){const{t:o,locale:i}=S(),t={auth0:"Auth0",wallet:"DID wallet",federated:"Federated"};return[{name:o("team.member.name"),value:n.fullName},{name:o("common.email"),value:n.email},{name:o("common.phone"),value:n.phone},{name:o("team.member.lastLogin"),value:N(n.lastLoginAt,i)},{name:o("team.member.lastLoginIp"),value:n.lastLoginIp||""},{name:o("common.createdAt"),value:N(n.createdAt,i)},{name:o("team.member.source"),value:t[(n==null?void 0:n.sourceProvider)||O.USER_TYPE.WALLET]||(n==null?void 0:n.sourceProvider)}].filter(Boolean).map(s=>s.name===o("common.did")?e.jsx(P,{valueComponent:"div",nameWidth:120,name:s.name,nameFormatter:()=>o("common.did"),children:s.value},s.name):e.jsx(P,{style:{alignItems:"flex-start"},valueComponent:"div",nameWidth:120,name:s.name,children:s.value},s.name))}function Oe({user:n}){const{t:o}=S(),i=(B(n,"passports")||[]).map(t=>({...t,revoked:t.status===O.PASSPORT_STATUS.REVOKED}));return i.length===0?e.jsx($,{children:o("common.empty")}):e.jsx(c,{direction:"row",spacing:3,children:i.map(t=>e.jsx(he,{passport:t,user:n,width:200,color:window.blocklet.passportColor,createPassportSvg:re,sx:{flexDirection:"column",alignItems:"center"}},t.id))})}function it(){const n=q(),o=ne(),{t:i}=S(),{session:t}=L(),a=se({user:t.user,tab:o.tab||"profile"}),s=p=>{a.tab=p,n(`${O.WELLKNOWN_SERVICE_PATH_PREFIX}/user/${p}`)},m={info:{label:i("common.profile"),value:"profile",component:Le},oauth:{label:i("team.member.connections"),value:"connections",component:ue},passports:{label:i("team.member.passports"),value:"passports",component:Oe},settings:{label:i("common.setting"),value:"settings",component:Pe}},d=Object.values(m).map(({label:p,value:x})=>({label:p,value:x})).filter(p=>{var x;return p.value==="connections"?(((x=a.user)==null?void 0:x.connectedAccounts)||[]).find(A=>{var y;return A.provider!==(((y=a.user)==null?void 0:y.sourceProvider)||oe.LOGIN_PROVIDER.WALLET)}):!0}),g=m[a.tab]||m.info;return e.jsxs(e.Fragment,{children:[e.jsx(ce,{}),e.jsxs(Me,{sx:{mt:4},children:[e.jsxs(c,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[e.jsxs(c,{direction:"row",spacing:1,alignItems:"center",children:[e.jsx(we,{src:a.user.avatar,variant:"rounded",style:{width:80,height:80,backgroundColor:"transparent",marginRight:8}}),e.jsxs(c,{direction:"column",spacing:.5,children:[e.jsx(u,{variant:"h4",fontWeight:"bold",children:a.user.fullName}),e.jsx(V,{children:e.jsx(ae,{label:a.user.role.toUpperCase(),size:"small",variant:"outlined",color:"success",sx:{height:"auto",fontWeight:"bold",fontSize:"12px"},icon:e.jsx(ze,{sx:{fontSize:"0.8em"}})})}),e.jsx(de,{did:a.user.did})]})]}),e.jsxs(c,{children:[a.tab==="profile"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchProfile(D,{}),children:i("team.member.switch.profile")}),a.tab==="passports"&&e.jsx(f,{variant:"contained",size:"small",color:"primary",onClick:()=>t.switchPassport(D,{}),children:i("team.member.switch.passport")})]})]}),e.jsx(V,{className:"tabs",sx:{my:3},children:e.jsx(me,{tabs:d,current:a.tab,onChange:s})}),e.jsx("div",{className:"body",children:e.jsx(g.component,{user:a.user})})]})]})}const Me=ie(le)`
|
|
2
2
|
.MuiTab-root {
|
|
3
3
|
padding: 0;
|
|
4
4
|
margin-right: 24px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b4 as l,el as s,em as h,$ as P,w as u}from"./index-
|
|
1
|
+
import{b4 as l,el as s,em as h,$ as P,w as u}from"./index-FwjymWKs.js";const d=s;var c=(e,r)=>d(e)===d(r);const E=l(c),x=(e,r)=>{if(e.type===u.ROUTING_RULE_TYPES.REDIRECT){if(!e.url)return new Error(`${r("router.validation.redirectUrlRequired")}`);if(!e.redirectCode)return new Error(`redirect ${r("router.validation.redirectCodeRequired")}`)}else if(e.type===u.ROUTING_RULE_TYPES.BLOCKLET&&!e.did)return new Error(r("router.validation.didRequired"));return null},R=(e,r)=>{const t=x(e,r);return t||(e.pathPrefix.length?e.pathPrefix.length>150?new Error(r("router.validation.pathPrefixTooLong",{length:150})):null:new Error(r("router.validation.pathPrefixCannotBeEmpty")))},v=({params:e,blocklets:r,blocklet:t,locale:o="en"})=>{if(t){let i=(t.children||[]).find(f=>h(f.meta)&&E(f.mountPoint,e.pathPrefix));if(t.meta.group!=="gateway"&&e.pathPrefix==="/"&&(i="/"),i)return{zh:`挂载点 ${e.pathPrefix} 已存在,请使用其他挂载点`,en:`The mount point ${e.pathPrefix} already exist, please use another mount point`}[o]}const a=r.find(i=>i.meta.did===e.did);if(!a)return"";const n=a.meta.interfaces.find(i=>i.type==="web");return n&&n.prefix!==P.BLOCKLET_DYNAMIC_PATH_PREFIX&&e.pathPrefix!==n.prefix?{zh:`该 blocklet 只能挂载在 ${n.prefix}`,en:`This blocklet can only be mounted on ${n.prefix}`}[o]:""},T=e=>{if(!e||typeof e!="string")return e;let r=e.trim();try{return r=r.toLowerCase(),r.startsWith("http://")||r.startsWith("https://")?new URL(r).hostname:r}catch(t){return console.error("format domain failed",t),r}};export{R as a,T as p,v};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var B=(t,e,n)=>(fe(t,typeof e!="symbol"?e+"":e,n),n);import{aO as de,bR as pe,bS as he,aS as D,bT as V,r as T,aQ as ge,aR as me,aW as xt,bU as be,bV as ye,j as b,aU as wt,aV as xe,P as f,N as we,f as ve,aK as Ie,bW as vt,bC as Ce,bD as Se,bX as Te,a7 as Ae,J as S,bA as Pe,B as je,bY as ke,T as Le,bZ as Oe,F as Me,b_ as Re,br as _e,u as Ee,aL as qe,_ as Ne,Q as Fe}from"./index-
|
|
1
|
+
var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var B=(t,e,n)=>(fe(t,typeof e!="symbol"?e+"":e,n),n);import{aO as de,bR as pe,bS as he,aS as D,bT as V,r as T,aQ as ge,aR as me,aW as xt,bU as be,bV as ye,j as b,aU as wt,aV as xe,P as f,N as we,f as ve,aK as Ie,bW as vt,bC as Ce,bD as Se,bX as Te,a7 as Ae,J as S,bA as Pe,B as je,bY as ke,T as Le,bZ as Oe,F as Me,b_ as Re,br as _e,u as Ee,aL as qe,_ as Ne,Q as Fe}from"./index-FwjymWKs.js";import{l as L,g as $e,L as Be}from"./ListItem-8xgbSCnj.js";import{L as Ve}from"./selector-F8m6H7ls.js";const ze=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],He=(t,e)=>{const{ownerState:n}=t;return[e.root,n.dense&&e.dense,n.alignItems==="flex-start"&&e.alignItemsFlexStart,n.divider&&e.divider,!n.disableGutters&&e.gutters]},Ze=t=>{const{alignItems:e,classes:n,dense:r,disabled:o,disableGutters:s,divider:i,selected:a}=t,l=xe({root:["root",r&&"dense",!s&&"gutters",i&&"divider",o&&"disabled",e==="flex-start"&&"alignItemsFlexStart",a&&"selected"]},$e,n);return D({},n,l)},De=de(pe,{shouldForwardProp:t=>he(t)||t==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:He})(({theme:t,ownerState:e})=>D({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${L.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${L.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${L.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:V(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:V(t.palette.primary.main,t.palette.action.selectedOpacity)}},[`&.${L.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${L.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},e.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},e.alignItems==="flex-start"&&{alignItems:"flex-start"},!e.disableGutters&&{paddingLeft:16,paddingRight:16},e.dense&&{paddingTop:4,paddingBottom:4})),Ue=T.forwardRef(function(e,n){const r=ge({props:e,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:s=!1,component:i="div",children:a,dense:c=!1,disableGutters:l=!1,divider:u=!1,focusVisibleClassName:d,selected:p=!1,className:x}=r,g=me(r,ze),y=T.useContext(xt),v=T.useMemo(()=>({dense:c||y.dense||!1,alignItems:o,disableGutters:l}),[o,y.dense,c,l]),C=T.useRef(null);be(()=>{s&&C.current&&C.current.focus()},[s]);const w=D({},r,{alignItems:o,dense:v.dense,disableGutters:l,divider:u,selected:p}),m=Ze(w),Y=ye(C,n);return b.jsx(xt.Provider,{value:v,children:b.jsx(De,D({ref:Y,href:g.href||g.to,component:(g.href||g.to)&&i==="div"?"button":i,focusVisibleClassName:wt(m.focusVisible,d),ownerState:w,className:wt(m.root,x)},g,{classes:m,children:a}))})}),Qe=Ue;/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -8,10 +8,10 @@ var ue=Object.defineProperty;var fe=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,config
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
* @version 1.0.8
|
|
11
|
-
*/const Vt=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...Vt,...U}),rt=Object.freeze({...N,body:"",hidden:!1}),Ge=Object.freeze({width:null,height:null}),zt=Object.freeze({...Ge,...U});function We(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const Je=/[\s,]+/;function Xe(t,e){e.split(Je).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Ht={...zt,preserveAspectRatio:""};function It(t){const e={...Ht},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=We(n("rotate","")),Xe(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function Ye(t,e){for(const n in Ht)if(t[n]!==e[n])return!0;return!1}const M=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!H(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!H(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!H(a,n)?null:a}return null},H=(t,e)=>t?!!((t.provider===""||t.provider.match(M))&&(e&&t.prefix===""||t.prefix.match(M))&&t.name.match(M)):!1;function Ke(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function Ct(t,e){const n=Ke(t,e);for(const r in rt)r in U?r in t&&!(r in n)&&(n[r]=U[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function tn(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function en(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=Ct(r[a]||o[a],s)}return i(e),n.forEach(i),Ct(t,s)}function Zt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=tn(t);for(const o in r){const s=r[o];s&&(e(o,en(t,o,s)),n.push(o))}return n}const nn={provider:"",aliases:{},not_found:{},...Vt};function tt(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Dt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!tt(t,nn))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(M)||typeof s.body!="string"||!tt(s,rt))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(M)||typeof i!="string"||!n[i]&&!r[i]||!tt(s,rt))return null}return e}const Q=Object.create(null);function on(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function A(t,e){const n=Q[t]||(Q[t]=Object.create(null));return n[e]||(n[e]=on(t,e))}function dt(t,e){return Dt(e)?Zt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function rn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function sn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(Q)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(Q[o]||{})).forEach(i=>{const a=A(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ut(t){return typeof t=="boolean"&&(_=t),_}function E(t){const e=typeof t=="string"?F(t,!0,_):t;if(e){const n=A(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Qt(t,e){const n=F(t,!0,_);if(!n)return!1;const r=A(n.provider,n.prefix);return rn(r,n.name,e)}function St(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Dt(t)&&(t.prefix="",Zt(t,(s,i)=>{i&&Qt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!H({provider:e,prefix:n,name:"a"}))return!1;const r=A(e,n);return!!dt(r,t)}function cn(t){return!!E(t)}function an(t){const e=E(t);return e?{...N,...e}:null}function ln(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=A(s,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),e}function Gt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function un(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Gt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let fn=0;function dn(t,e,n){const r=fn++,o=Gt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const st=Object.create(null);function Tt(t,e){st[t]=e}function it(t){return st[t]||st[""]}function pn(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?F(o,e,n):o;s&&r.push(s)}),r}var hn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gn(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let h=t.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],x=[];typeof r=="function"&&x.push(r);function g(){d&&(clearTimeout(d),d=null)}function y(){c==="pending"&&(c="aborted"),g(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function v(h,I){I&&(x=[]),typeof h=="function"&&x.push(h)}function C(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:v,abort:y}}function w(){c="failed",x.forEach(h=>{h(void 0,u)})}function m(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function Y(h,I,k){const $=I!=="success";switch(p=p.filter(P=>P!==h),c){case"pending":break;case"failed":if($||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=k,w();return}if($){u=k,p.length||(i.length?K():w());return}if(g(),m(),!t.random){const P=t.resources.indexOf(h.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",x.forEach(P=>{P(k)})}function K(){if(c!=="pending")return;g();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{g(),c==="pending"&&(m(),w())},t.timeout);return}w();return}const I={status:"pending",resource:h,callback:(k,$)=>{Y(I,k,$)}};p.push(I),l++,d=setTimeout(K,t.rotate),n(h,e,I.callback)}return setTimeout(K),C}function Wt(t){const e={...hn,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=gn(e,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function pt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const W=Object.create(null),O=["https://api.simplesvg.com","https://api.unisvg.com"],Z=[];for(;O.length>0;)O.length===1||Math.random()>.5?Z.push(O.shift()):Z.push(O.pop());W[""]=pt({resources:["https://api.iconify.design"].concat(Z)});function At(t,e){const n=pt(e);return n===null?!1:(W[t]=n,!0)}function J(t){return W[t]}function mn(){return Object.keys(W)}function Pt(){}const et=Object.create(null);function bn(t){if(!et[t]){const e=J(t);if(!e)return;const n=Wt(e),r={config:e,redundancy:n};et[t]=r}return et[t]}function Jt(t,e,n){let r,o;if(typeof t=="string"){const s=it(t);if(!s)return n(void 0,424),Pt;o=s.send;const i=bn(t);i&&(r=i.redundancy)}else{const s=pt(t);if(s){r=Wt(s);const i=t.resources?t.resources[0]:"",a=it(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pt):r.query(e,o,n)().abort}const jt="iconify2",q="iconify",Xt=q+"-count",kt=q+"-version",Yt=36e5,yn=168;function ct(t,e){try{return t.getItem(e)}catch{}}function ht(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Lt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return ht(t,Xt,e.toString())}function lt(t){return parseInt(ct(t,Xt))||0}const j={local:!0,session:!0},Kt={local:new Set,session:new Set};let gt=!1;function xn(t){gt=t}let z=typeof window>"u"?{}:window;function te(t){const e=t+"Storage";try{if(z&&z[e]&&typeof z[e].length=="number")return z[e]}catch{}j[t]=!1}function ee(t,e){const n=te(t);if(!n)return;const r=ct(n,kt);if(r!==jt){if(r){const a=lt(n);for(let c=0;c<a;c++)Lt(n,q+c.toString())}ht(n,kt,jt),at(n,0);return}const o=Math.floor(Date.now()/Yt)-yn,s=a=>{const c=q+a.toString(),l=ct(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Lt(n,c)}};let i=lt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,at(n,i)):Kt[t].add(a))}function ne(){if(!gt){xn(!0);for(const t in j)ee(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=A(r,o);if(!dt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function wn(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in j)ee(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function vn(t,e){gt||ne();function n(r){let o;if(!j[r]||!(o=te(r)))return;const s=Kt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=lt(o),!at(o,i+1))return;const a={cached:Math.floor(Date.now()/Yt),provider:t.provider,data:e};return ht(o,q+i.toString(),JSON.stringify(a))}e.lastModified&&!wn(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Ot(){}function In(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,un(t)}))}function Cn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=it(n)))return;s.prepare(n,r,o).forEach(a=>{Jt(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=dt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),vn(t,c)}catch(l){console.error(l)}In(t)})})}))}const mt=(t,e)=>{const n=pn(t,!0,Ut()),r=ln(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,Ot)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(A(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=A(l,u),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(d)||(x.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Cn(c,o[l][u])}),e?dn(e,r,s):Ot},Sn=t=>new Promise((e,n)=>{const r=typeof t=="string"?F(t,!0):t;if(!r){n(t);return}mt([r||t],o=>{if(o.length&&r){const s=E(r);if(s){e({...N,...s});return}}n(t)})});function Tn(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function An(t,e){const n=typeof t=="string"?F(t,!0,!0):null;if(!n){const s=Tn(t);return{value:t,data:s}}const r=E(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=mt([n],()=>e(t,n,E(n)));return{value:t,name:n,loading:o}}function nt(t){return t.hasAttribute("inline")}let oe=!1;try{oe=navigator.vendor.indexOf("Apple")===0}catch{}function Pn(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(oe||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const jn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,kn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ut(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(jn);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=kn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ln=t=>t==="unset"||t==="undefined"||t==="none";function re(t,e){const n={...N,...t},r={...zt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],v=g.hFlip,C=g.vFlip;let w=g.rotate;v?C?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):C&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let m;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:m=o.height/2+o.top,y.unshift("rotate(90 "+m.toString()+" "+m.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:m=o.width/2+o.left,y.unshift("rotate(-90 "+m.toString()+" "+m.toString()+")");break}w%2===1&&(o.left!==o.top&&(m=o.left,o.left=o.top,o.top=m),o.width!==o.height&&(m=o.width,o.width=o.height,o.height=m)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ut(d,c/l)):(u=i==="auto"?c:i,d=a===null?ut(u,l/c):a==="auto"?l:a);const p={},x=(g,y)=>{Ln(y)||(p[g]=y.toString())};return x("width",u),x("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const On=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=On();function Mn(t){G=t}function Rn(){return G}function _n(t,e){const n=J(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function En(t){return t===404}const qn=(t,e,n)=>{const r=[],o=_n(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Nn(t){if(typeof t=="string"){const e=J(t);if(e)return e.path}return"/"}const Fn=(t,e,n)=>{if(!G){n("abort",424);return}let r=Nn(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(En(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},$n={prepare:qn,send:Fn};function Mt(t,e){switch(t){case"local":case"session":j[t]=e;break;case"all":for(const n in j)j[n]=e;break}}const ot="data-style";let se="";function Bn(t){se=t}function Rt(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ot));n||(n=document.createElement("style"),n.setAttribute(ot,ot),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+se}function ie(){Tt("",$n),Ut(!0);let t;try{t=window}catch{}if(t){if(ne(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!St(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;At(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Mt(n,!0),disableCache:n=>Mt(n,!1),iconExists:cn,getIcon:an,listIcons:sn,addIcon:Qt,addCollection:St,calculateSize:ut,buildIcon:re,loadIcons:mt,loadIcon:Sn,addAPIProvider:At,appendCustomStyle:Bn,_api:{getAPIConfig:J,setAPIModule:Tt,sendAPIQuery:Jt,setFetch:Mn,getFetch:Rn,listAPIProviders:mn}}}function ce(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Vn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function zn(t){return"data:image/svg+xml,"+Vn(t)}function Hn(t){return'url("'+zn(t)+'")'}const ft={"background-color":"currentColor"},ae={"background-color":"transparent"},_t={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Et={"-webkit-mask":ft,mask:ft,background:ae};for(const t in Et){const e=Et[t];for(const n in _t)e[t+"-"+n]=_t[n]}function qt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Zn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=ce(o,{...s,width:e.width+"",height:e.height+""}),a=Hn(i),c=r.style,l={"--svg":a,width:qt(s.width),height:qt(s.height),...n?ft:ae};for(const u in l)c.setProperty(u,l[u]);return r}let R;function Dn(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{R=null}}function Un(t){return R===void 0&&Dn(),R?R.createHTML(t):t}function Qn(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ce(t.body,n);return e.innerHTML=Un(o),e.firstChild}function Nt(t,e){const n=e.icon.data,r=e.customisations,o=re(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=Qn(o);break;default:i=Zn(o,{...N,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function Ft(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function Gn(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();B(this,"_shadowRoot");B(this,"_state");B(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=nt(this);Rt(c,l),this._state=Ft({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=nt(this),u=this._state;l!==u.inline&&(u.inline=l,Rt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return nt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Nt(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=It(this);(c.attrMode!==u||Ye(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=An(c,(u,d,p)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==u)return;const g={value:u,name:d,data:p};g.data?this._gotIconData(g):x.icon=g});l.data?this._gotIconData(l):this._state=Ft(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,It(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Pn(c.data.body,u),p=this._state.inline;Nt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ie();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}Gn()||ie();const uo=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),Wn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),X=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:X(r[n],e,n)}):e(r)),fo=(t,e="children")=>{const n=[];return X(t,r=>n.push(r),e),n},bt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=bt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),Jn=t=>/^https?:\/\//.test(t),po=t=>/^[\w-]+:[\w-]+$/.test(t),Xn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},ho=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>Xn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var $t,Bt;const go=(($t=window==null?void 0:window.blocklet)==null?void 0:$t.groupPrefix)||((Bt=window==null?void 0:window.blocklet)==null?void 0:Bt.prefix)||"/",Yn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Kn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(Jn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return X(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},to=t=>X(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),eo=t=>{if(!(t!=null&&t.length))return null;const e=to(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},mo=t=>{if(!t)return null;const e={...t};return e.theme=Yn(e.theme),e.navigation=eo(no(e.navigation)),e},no=(t=[])=>bt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),oo=(t,e)=>bt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),ro={width:24,height:24,body:'<path fill="currentColor" d="M13 8V4q0-.425.288-.713T14 3h6q.425 0 .713.288T21 4v4q0 .425-.288.713T20 9h-6q-.425 0-.713-.288T13 8ZM3 12V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v8q0 .425-.288.713T10 13H4q-.425 0-.713-.288T3 12Zm10 8v-8q0-.425.288-.713T14 11h6q.425 0 .713.288T21 12v8q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-4q0-.425.288-.713T4 15h6q.425 0 .713.288T11 16v4q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20Zm2-9h4V5H5v6Zm10 8h4v-6h-4v6Zm0-12h4V5h-4v2ZM5 19h4v-2H5v2Zm4-8Zm6-4Zm0 6Zm-6 4Z"/>'},so={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function yt({session:t,locale:e,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=T.useRef(null),i=we({open:!1}),a=ve((c=!i.open)=>{i.open=c});return o.length===0?null:b.jsxs(b.Fragment,{children:[b.jsx(Ie,{size:"medium",ref:s,onClick:()=>a(),children:b.jsx(vt,{icon:ro,fontSize:n,style:{transform:"scale(1.10)"}})}),b.jsx(Ce,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>b.jsx(Se,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:b.jsx(Te,{...c,timeout:350,children:b.jsxs(Ae,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:S.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${S.gray6}, 0px 0px 0px 1px ${S.gray6}`},children:[b.jsx(Pe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,d;return b.jsx(Be,{disablePadding:!0,children:b.jsxs(Qe,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:S.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?b.jsx(je,{component:"img",src:`${ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):b.jsx(vt,{fontSize:50,icon:l.icon||so,color:S.textSubtitle}),b.jsx(Le,{sx:{fontSize:"12px",color:S.textBase,textAlign:"center",lineHeight:"normal"},children:((d=l.title)==null?void 0:d.zh)||l.title})]})},l.id)})}),b.jsx(Oe,{session:t,children:b.jsx(Me,{variant:"outlined",fullWidth:!0,href:Re,sx:{mt:1,borderRadius:2,color:S.textBase,borderColor:S.lineBorderStrong,"&:hover":{color:S.primaryBase,borderColor:S.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}yt.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};yt.defaultProps={locale:"en",size:24};function le({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,x,g,y;const r=T.useContext(_e),{locale:o}=Ee()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=Kn((x=t==null?void 0:t.navigation)==null?void 0:x.sessionManager,o)||[];c=oo(c,(y=(g=r==null?void 0:r.session)==null?void 0:g.user)==null?void 0:y.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let v=[];if(i&&o&&v.push(b.jsx(Ve,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(m=>{C.push({label:m.title,icon:m.icon?b.jsx("iconify-icon",{icon:m.icon,height:24,style:{marginRight:8}}):null,component:"a",href:m.link,key:m.link})}),v.push(b.jsx(yt,{session:r.session,locale:o},"session-blocklet")),v.push(b.jsx(qe,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(v=e(v)||[]),v})();return T.createElement(b.Fragment,null,...Array.isArray(u)?u:[u])}le.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Wn};le.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const bo=()=>{const t=Ne();T.useEffect(()=>{t.wallet&&Fe(()=>import("./index-0niAcafj.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{le as H,Qe as L,oo as a,uo as b,fo as c,ho as d,po as e,mo as f,Kn as g,Jn as i,X as m,go as p,Wn as s,bo as u};
|
|
11
|
+
*/const Vt=Object.freeze({left:0,top:0,width:16,height:16}),U=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),N=Object.freeze({...Vt,...U}),rt=Object.freeze({...N,body:"",hidden:!1}),Ge=Object.freeze({width:null,height:null}),zt=Object.freeze({...Ge,...U});function We(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(o){for(;o<0;)o+=4;return o%4}if(n===""){const o=parseInt(t);return isNaN(o)?0:r(o)}else if(n!==t){let o=0;switch(n){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(t.slice(0,t.length-n.length));return isNaN(s)?0:(s=s/o,s%1===0?r(s):0)}}return e}const Je=/[\s,]+/;function Xe(t,e){e.split(Je).forEach(n=>{switch(n.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const Ht={...zt,preserveAspectRatio:""};function It(t){const e={...Ht},n=(r,o)=>t.getAttribute(r)||o;return e.width=n("width",null),e.height=n("height",null),e.rotate=We(n("rotate","")),Xe(e,n("flip","")),e.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),e}function Ye(t,e){for(const n in Ht)if(t[n]!==e[n])return!0;return!1}const M=/^[a-z0-9]+(-[a-z0-9]+)*$/,F=(t,e,n,r="")=>{const o=t.split(":");if(t.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const a=o.pop(),c=o.pop(),l={provider:o.length>0?o[0]:r,prefix:c,name:a};return e&&!H(l)?null:l}const s=o[0],i=s.split("-");if(i.length>1){const a={provider:r,prefix:i.shift(),name:i.join("-")};return e&&!H(a)?null:a}if(n&&r===""){const a={provider:r,prefix:"",name:s};return e&&!H(a,n)?null:a}return null},H=(t,e)=>t?!!((t.provider===""||t.provider.match(M))&&(e&&t.prefix===""||t.prefix.match(M))&&t.name.match(M)):!1;function Ke(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const r=((t.rotate||0)+(e.rotate||0))%4;return r&&(n.rotate=r),n}function Ct(t,e){const n=Ke(t,e);for(const r in rt)r in U?r in t&&!(r in n)&&(n[r]=U[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}function tn(t,e){const n=t.icons,r=t.aliases||Object.create(null),o=Object.create(null);function s(i){if(n[i])return o[i]=[];if(!(i in o)){o[i]=null;const a=r[i]&&r[i].parent,c=a&&s(a);c&&(o[i]=[a].concat(c))}return o[i]}return(e||Object.keys(n).concat(Object.keys(r))).forEach(s),o}function en(t,e,n){const r=t.icons,o=t.aliases||Object.create(null);let s={};function i(a){s=Ct(r[a]||o[a],s)}return i(e),n.forEach(i),Ct(t,s)}function Zt(t,e){const n=[];if(typeof t!="object"||typeof t.icons!="object")return n;t.not_found instanceof Array&&t.not_found.forEach(o=>{e(o,null),n.push(o)});const r=tn(t);for(const o in r){const s=r[o];s&&(e(o,en(t,o,s)),n.push(o))}return n}const nn={provider:"",aliases:{},not_found:{},...Vt};function tt(t,e){for(const n in e)if(n in t&&typeof t[n]!=typeof e[n])return!1;return!0}function Dt(t){if(typeof t!="object"||t===null)return null;const e=t;if(typeof e.prefix!="string"||!t.icons||typeof t.icons!="object"||!tt(t,nn))return null;const n=e.icons;for(const o in n){const s=n[o];if(!o.match(M)||typeof s.body!="string"||!tt(s,rt))return null}const r=e.aliases||Object.create(null);for(const o in r){const s=r[o],i=s.parent;if(!o.match(M)||typeof i!="string"||!n[i]&&!r[i]||!tt(s,rt))return null}return e}const Q=Object.create(null);function on(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:new Set}}function A(t,e){const n=Q[t]||(Q[t]=Object.create(null));return n[e]||(n[e]=on(t,e))}function dt(t,e){return Dt(e)?Zt(e,(n,r)=>{r?t.icons[n]=r:t.missing.add(n)}):[]}function rn(t,e,n){try{if(typeof n.body=="string")return t.icons[e]={...n},!0}catch{}return!1}function sn(t,e){let n=[];return(typeof t=="string"?[t]:Object.keys(Q)).forEach(o=>{(typeof o=="string"&&typeof e=="string"?[e]:Object.keys(Q[o]||{})).forEach(i=>{const a=A(o,i);n=n.concat(Object.keys(a.icons).map(c=>(o!==""?"@"+o+":":"")+i+":"+c))})}),n}let _=!1;function Ut(t){return typeof t=="boolean"&&(_=t),_}function E(t){const e=typeof t=="string"?F(t,!0,_):t;if(e){const n=A(e.provider,e.prefix),r=e.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function Qt(t,e){const n=F(t,!0,_);if(!n)return!1;const r=A(n.provider,n.prefix);return rn(r,n.name,e)}function St(t,e){if(typeof t!="object")return!1;if(typeof e!="string"&&(e=t.provider||""),_&&!e&&!t.prefix){let o=!1;return Dt(t)&&(t.prefix="",Zt(t,(s,i)=>{i&&Qt(s,i)&&(o=!0)})),o}const n=t.prefix;if(!H({provider:e,prefix:n,name:"a"}))return!1;const r=A(e,n);return!!dt(r,t)}function cn(t){return!!E(t)}function an(t){const e=E(t);return e?{...N,...e}:null}function ln(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let r={provider:"",prefix:"",name:""};return t.forEach(o=>{if(r.name===o.name&&r.prefix===o.prefix&&r.provider===o.provider)return;r=o;const s=o.provider,i=o.prefix,a=o.name,c=n[s]||(n[s]=Object.create(null)),l=c[i]||(c[i]=A(s,i));let u;a in l.icons?u=e.loaded:i===""||l.missing.has(a)?u=e.missing:u=e.pending;const d={provider:s,prefix:i,name:a};u.push(d)}),e}function Gt(t,e){t.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(o=>o.id!==e))})}function un(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let n=!1;const r=t.provider,o=t.prefix;e.forEach(s=>{const i=s.icons,a=i.pending.length;i.pending=i.pending.filter(c=>{if(c.prefix!==o)return!0;const l=c.name;if(t.icons[l])i.loaded.push({provider:r,prefix:o,name:l});else if(t.missing.has(l))i.missing.push({provider:r,prefix:o,name:l});else return n=!0,!0;return!1}),i.pending.length!==a&&(n||Gt([t],s.id),s.callback(i.loaded.slice(0),i.missing.slice(0),i.pending.slice(0),s.abort))})}))}let fn=0;function dn(t,e,n){const r=fn++,o=Gt.bind(null,n,r);if(!e.pending.length)return o;const s={id:r,icons:e,callback:t,abort:o};return n.forEach(i=>{(i.loaderCallbacks||(i.loaderCallbacks=[])).push(s)}),o}const st=Object.create(null);function Tt(t,e){st[t]=e}function it(t){return st[t]||st[""]}function pn(t,e=!0,n=!1){const r=[];return t.forEach(o=>{const s=typeof o=="string"?F(o,e,n):o;s&&r.push(s)}),r}var hn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function gn(t,e,n,r){const o=t.resources.length,s=t.random?Math.floor(Math.random()*o):t.index;let i;if(t.random){let h=t.resources.slice(0);for(i=[];h.length>1;){const I=Math.floor(Math.random()*h.length);i.push(h[I]),h=h.slice(0,I).concat(h.slice(I+1))}i=i.concat(h)}else i=t.resources.slice(s).concat(t.resources.slice(0,s));const a=Date.now();let c="pending",l=0,u,d=null,p=[],x=[];typeof r=="function"&&x.push(r);function g(){d&&(clearTimeout(d),d=null)}function y(){c==="pending"&&(c="aborted"),g(),p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function v(h,I){I&&(x=[]),typeof h=="function"&&x.push(h)}function C(){return{startTime:a,payload:e,status:c,queriesSent:l,queriesPending:p.length,subscribe:v,abort:y}}function w(){c="failed",x.forEach(h=>{h(void 0,u)})}function m(){p.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),p=[]}function Y(h,I,k){const $=I!=="success";switch(p=p.filter(P=>P!==h),c){case"pending":break;case"failed":if($||!t.dataAfterTimeout)return;break;default:return}if(I==="abort"){u=k,w();return}if($){u=k,p.length||(i.length?K():w());return}if(g(),m(),!t.random){const P=t.resources.indexOf(h.resource);P!==-1&&P!==t.index&&(t.index=P)}c="completed",x.forEach(P=>{P(k)})}function K(){if(c!=="pending")return;g();const h=i.shift();if(h===void 0){if(p.length){d=setTimeout(()=>{g(),c==="pending"&&(m(),w())},t.timeout);return}w();return}const I={status:"pending",resource:h,callback:(k,$)=>{Y(I,k,$)}};p.push(I),l++,d=setTimeout(K,t.rotate),n(h,e,I.callback)}return setTimeout(K),C}function Wt(t){const e={...hn,...t};let n=[];function r(){n=n.filter(a=>a().status==="pending")}function o(a,c,l){const u=gn(e,a,c,(d,p)=>{r(),l&&l(d,p)});return n.push(u),u}function s(a){return n.find(c=>a(c))||null}return{query:o,find:s,setIndex:a=>{e.index=a},getIndex:()=>e.index,cleanup:r}}function pt(t){let e;if(typeof t.resources=="string")e=[t.resources];else if(e=t.resources,!(e instanceof Array)||!e.length)return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const W=Object.create(null),O=["https://api.simplesvg.com","https://api.unisvg.com"],Z=[];for(;O.length>0;)O.length===1||Math.random()>.5?Z.push(O.shift()):Z.push(O.pop());W[""]=pt({resources:["https://api.iconify.design"].concat(Z)});function At(t,e){const n=pt(e);return n===null?!1:(W[t]=n,!0)}function J(t){return W[t]}function mn(){return Object.keys(W)}function Pt(){}const et=Object.create(null);function bn(t){if(!et[t]){const e=J(t);if(!e)return;const n=Wt(e),r={config:e,redundancy:n};et[t]=r}return et[t]}function Jt(t,e,n){let r,o;if(typeof t=="string"){const s=it(t);if(!s)return n(void 0,424),Pt;o=s.send;const i=bn(t);i&&(r=i.redundancy)}else{const s=pt(t);if(s){r=Wt(s);const i=t.resources?t.resources[0]:"",a=it(i);a&&(o=a.send)}}return!r||!o?(n(void 0,424),Pt):r.query(e,o,n)().abort}const jt="iconify2",q="iconify",Xt=q+"-count",kt=q+"-version",Yt=36e5,yn=168;function ct(t,e){try{return t.getItem(e)}catch{}}function ht(t,e,n){try{return t.setItem(e,n),!0}catch{}}function Lt(t,e){try{t.removeItem(e)}catch{}}function at(t,e){return ht(t,Xt,e.toString())}function lt(t){return parseInt(ct(t,Xt))||0}const j={local:!0,session:!0},Kt={local:new Set,session:new Set};let gt=!1;function xn(t){gt=t}let z=typeof window>"u"?{}:window;function te(t){const e=t+"Storage";try{if(z&&z[e]&&typeof z[e].length=="number")return z[e]}catch{}j[t]=!1}function ee(t,e){const n=te(t);if(!n)return;const r=ct(n,kt);if(r!==jt){if(r){const a=lt(n);for(let c=0;c<a;c++)Lt(n,q+c.toString())}ht(n,kt,jt),at(n,0);return}const o=Math.floor(Date.now()/Yt)-yn,s=a=>{const c=q+a.toString(),l=ct(n,c);if(typeof l=="string"){try{const u=JSON.parse(l);if(typeof u=="object"&&typeof u.cached=="number"&&u.cached>o&&typeof u.provider=="string"&&typeof u.data=="object"&&typeof u.data.prefix=="string"&&e(u,a))return!0}catch{}Lt(n,c)}};let i=lt(n);for(let a=i-1;a>=0;a--)s(a)||(a===i-1?(i--,at(n,i)):Kt[t].add(a))}function ne(){if(!gt){xn(!0);for(const t in j)ee(t,e=>{const n=e.data,r=e.provider,o=n.prefix,s=A(r,o);if(!dt(s,n).length)return!1;const i=n.lastModified||-1;return s.lastModifiedCached=s.lastModifiedCached?Math.min(s.lastModifiedCached,i):i,!0})}}function wn(t,e){const n=t.lastModifiedCached;if(n&&n>=e)return n===e;if(t.lastModifiedCached=e,n)for(const r in j)ee(r,o=>{const s=o.data;return o.provider!==t.provider||s.prefix!==t.prefix||s.lastModified===e});return!0}function vn(t,e){gt||ne();function n(r){let o;if(!j[r]||!(o=te(r)))return;const s=Kt[r];let i;if(s.size)s.delete(i=Array.from(s).shift());else if(i=lt(o),!at(o,i+1))return;const a={cached:Math.floor(Date.now()/Yt),provider:t.provider,data:e};return ht(o,q+i.toString(),JSON.stringify(a))}e.lastModified&&!wn(t,e.lastModified)||Object.keys(e.icons).length&&(e.not_found&&(e=Object.assign({},e),delete e.not_found),n("local")||n("session"))}function Ot(){}function In(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,un(t)}))}function Cn(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:n,prefix:r}=t,o=t.iconsToLoad;delete t.iconsToLoad;let s;if(!o||!(s=it(n)))return;s.prepare(n,r,o).forEach(a=>{Jt(n,a,c=>{if(typeof c!="object")a.icons.forEach(l=>{t.missing.add(l)});else try{const l=dt(t,c);if(!l.length)return;const u=t.pendingIcons;u&&l.forEach(d=>{u.delete(d)}),vn(t,c)}catch(l){console.error(l)}In(t)})})}))}const mt=(t,e)=>{const n=pn(t,!0,Ut()),r=ln(n);if(!r.pending.length){let c=!0;return e&&setTimeout(()=>{c&&e(r.loaded,r.missing,r.pending,Ot)}),()=>{c=!1}}const o=Object.create(null),s=[];let i,a;return r.pending.forEach(c=>{const{provider:l,prefix:u}=c;if(u===a&&l===i)return;i=l,a=u,s.push(A(l,u));const d=o[l]||(o[l]=Object.create(null));d[u]||(d[u]=[])}),r.pending.forEach(c=>{const{provider:l,prefix:u,name:d}=c,p=A(l,u),x=p.pendingIcons||(p.pendingIcons=new Set);x.has(d)||(x.add(d),o[l][u].push(d))}),s.forEach(c=>{const{provider:l,prefix:u}=c;o[l][u].length&&Cn(c,o[l][u])}),e?dn(e,r,s):Ot},Sn=t=>new Promise((e,n)=>{const r=typeof t=="string"?F(t,!0):t;if(!r){n(t);return}mt([r||t],o=>{if(o.length&&r){const s=E(r);if(s){e({...N,...s});return}}n(t)})});function Tn(t){try{const e=typeof t=="string"?JSON.parse(t):t;if(typeof e.body=="string")return{...e}}catch{}}function An(t,e){const n=typeof t=="string"?F(t,!0,!0):null;if(!n){const s=Tn(t);return{value:t,data:s}}const r=E(n);if(r!==void 0||!n.prefix)return{value:t,name:n,data:r};const o=mt([n],()=>e(t,n,E(n)));return{value:t,name:n,loading:o}}function nt(t){return t.hasAttribute("inline")}let oe=!1;try{oe=navigator.vendor.indexOf("Apple")===0}catch{}function Pn(t,e){switch(e){case"svg":case"bg":case"mask":return e}return e!=="style"&&(oe||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const jn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,kn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ut(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const r=t.split(jn);if(r===null||!r.length)return t;const o=[];let s=r.shift(),i=kn.test(s);for(;;){if(i){const a=parseFloat(s);isNaN(a)?o.push(s):o.push(Math.ceil(a*e*n)/n)}else o.push(s);if(s=r.shift(),s===void 0)return o.join("");i=!i}}const Ln=t=>t==="unset"||t==="undefined"||t==="none";function re(t,e){const n={...N,...t},r={...zt,...e},o={left:n.left,top:n.top,width:n.width,height:n.height};let s=n.body;[n,r].forEach(g=>{const y=[],v=g.hFlip,C=g.vFlip;let w=g.rotate;v?C?w+=2:(y.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),y.push("scale(-1 1)"),o.top=o.left=0):C&&(y.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),y.push("scale(1 -1)"),o.top=o.left=0);let m;switch(w<0&&(w-=Math.floor(w/4)*4),w=w%4,w){case 1:m=o.height/2+o.top,y.unshift("rotate(90 "+m.toString()+" "+m.toString()+")");break;case 2:y.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:m=o.width/2+o.left,y.unshift("rotate(-90 "+m.toString()+" "+m.toString()+")");break}w%2===1&&(o.left!==o.top&&(m=o.left,o.left=o.top,o.top=m),o.width!==o.height&&(m=o.width,o.width=o.height,o.height=m)),y.length&&(s='<g transform="'+y.join(" ")+'">'+s+"</g>")});const i=r.width,a=r.height,c=o.width,l=o.height;let u,d;i===null?(d=a===null?"1em":a==="auto"?l:a,u=ut(d,c/l)):(u=i==="auto"?c:i,d=a===null?ut(u,l/c):a==="auto"?l:a);const p={},x=(g,y)=>{Ln(y)||(p[g]=y.toString())};return x("width",u),x("height",d),p.viewBox=o.left.toString()+" "+o.top.toString()+" "+c.toString()+" "+l.toString(),{attributes:p,body:s}}const On=()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}};let G=On();function Mn(t){G=t}function Rn(){return G}function _n(t,e){const n=J(t);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let o=0;n.resources.forEach(i=>{o=Math.max(o,i.length)});const s=e+".json?icons=";r=n.maxURL-o-n.path.length-s.length}return r}function En(t){return t===404}const qn=(t,e,n)=>{const r=[],o=_n(t,e),s="icons";let i={type:s,provider:t,prefix:e,icons:[]},a=0;return n.forEach((c,l)=>{a+=c.length+1,a>=o&&l>0&&(r.push(i),i={type:s,provider:t,prefix:e,icons:[]},a=c.length),i.icons.push(c)}),r.push(i),r};function Nn(t){if(typeof t=="string"){const e=J(t);if(e)return e.path}return"/"}const Fn=(t,e,n)=>{if(!G){n("abort",424);return}let r=Nn(e.provider);switch(e.type){case"icons":{const s=e.prefix,a=e.icons.join(","),c=new URLSearchParams({icons:a});r+=s+".json?"+c.toString();break}case"custom":{const s=e.uri;r+=s.slice(0,1)==="/"?s.slice(1):s;break}default:n("abort",400);return}let o=503;G(t+r).then(s=>{const i=s.status;if(i!==200){setTimeout(()=>{n(En(i)?"abort":"next",i)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?n("abort",s):n("next",o)});return}setTimeout(()=>{n("success",s)})}).catch(()=>{n("next",o)})},$n={prepare:qn,send:Fn};function Mt(t,e){switch(t){case"local":case"session":j[t]=e;break;case"all":for(const n in j)j[n]=e;break}}const ot="data-style";let se="";function Bn(t){se=t}function Rt(t,e){let n=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(ot));n||(n=document.createElement("style"),n.setAttribute(ot,ot),t.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(e?"-0.125em":"0")+"}span,svg{display:block}"+se}function ie(){Tt("",$n),Ut(!0);let t;try{t=window}catch{}if(t){if(ne(),t.IconifyPreload!==void 0){const n=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(o=>{try{(typeof o!="object"||o===null||o instanceof Array||typeof o.icons!="object"||typeof o.prefix!="string"||!St(o))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const n=t.IconifyProviders;if(typeof n=="object"&&n!==null)for(const r in n){const o="IconifyProviders["+r+"] is invalid.";try{const s=n[r];if(typeof s!="object"||!s||s.resources===void 0)continue;At(r,s)||console.error(o)}catch{console.error(o)}}}}return{enableCache:n=>Mt(n,!0),disableCache:n=>Mt(n,!1),iconExists:cn,getIcon:an,listIcons:sn,addIcon:Qt,addCollection:St,calculateSize:ut,buildIcon:re,loadIcons:mt,loadIcon:Sn,addAPIProvider:At,appendCustomStyle:Bn,_api:{getAPIConfig:J,setAPIModule:Tt,sendAPIQuery:Jt,setFetch:Mn,getFetch:Rn,listAPIProviders:mn}}}function ce(t,e){let n=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in e)n+=" "+r+'="'+e[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+t+"</svg>"}function Vn(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function zn(t){return"data:image/svg+xml,"+Vn(t)}function Hn(t){return'url("'+zn(t)+'")'}const ft={"background-color":"currentColor"},ae={"background-color":"transparent"},_t={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Et={"-webkit-mask":ft,mask:ft,background:ae};for(const t in Et){const e=Et[t];for(const n in _t)e[t+"-"+n]=_t[n]}function qt(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Zn(t,e,n){const r=document.createElement("span");let o=t.body;o.indexOf("<a")!==-1&&(o+="<!-- "+Date.now()+" -->");const s=t.attributes,i=ce(o,{...s,width:e.width+"",height:e.height+""}),a=Hn(i),c=r.style,l={"--svg":a,width:qt(s.width),height:qt(s.height),...n?ft:ae};for(const u in l)c.setProperty(u,l[u]);return r}let R;function Dn(){try{R=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{R=null}}function Un(t){return R===void 0&&Dn(),R?R.createHTML(t):t}function Qn(t){const e=document.createElement("span"),n=t.attributes;let r="";n.width||(r="width: inherit;"),n.height||(r+="height: inherit;"),r&&(n.style=r);const o=ce(t.body,n);return e.innerHTML=Un(o),e.firstChild}function Nt(t,e){const n=e.icon.data,r=e.customisations,o=re(n,r);r.preserveAspectRatio&&(o.attributes.preserveAspectRatio=r.preserveAspectRatio);const s=e.renderedMode;let i;switch(s){case"svg":i=Qn(o);break;default:i=Zn(o,{...N,...n},s==="mask")}const a=Array.from(t.childNodes).find(c=>{const l=c.tagName&&c.tagName.toUpperCase();return l==="SPAN"||l==="SVG"});a?i.tagName==="SPAN"&&a.tagName===i.tagName?a.setAttribute("style",i.getAttribute("style")):t.replaceChild(i,a):t.appendChild(i)}function Ft(t,e,n){const r=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:e,icon:t,lastRender:r}}function Gn(t="iconify-icon"){let e,n;try{e=window.customElements,n=window.HTMLElement}catch{return}if(!e||!n)return;const r=e.get(t);if(r)return r;const o=["icon","mode","inline","width","height","rotate","flip"],s=class extends n{constructor(){super();B(this,"_shadowRoot");B(this,"_state");B(this,"_checkQueued",!1);const c=this._shadowRoot=this.attachShadow({mode:"open"}),l=nt(this);Rt(c,l),this._state=Ft({value:""},l),this._queueCheck()}static get observedAttributes(){return o.slice(0)}attributeChangedCallback(c){if(c==="inline"){const l=nt(this),u=this._state;l!==u.inline&&(u.inline=l,Rt(this._shadowRoot,l))}else this._queueCheck()}get icon(){const c=this.getAttribute("icon");if(c&&c.slice(0,1)==="{")try{return JSON.parse(c)}catch{}return c}set icon(c){typeof c=="object"&&(c=JSON.stringify(c)),this.setAttribute("icon",c)}get inline(){return nt(this)}set inline(c){c?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const c=this._state;if(c.rendered){const l=this._shadowRoot;if(c.renderedMode==="svg")try{l.lastChild.setCurrentTime(0);return}catch{}Nt(l,c)}}get status(){const c=this._state;return c.rendered?"rendered":c.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const c=this._state,l=this.getAttribute("icon");if(l!==c.icon.value){this._iconChanged(l);return}if(!c.rendered)return;const u=this.getAttribute("mode"),d=It(this);(c.attrMode!==u||Ye(c.customisations,d))&&this._renderIcon(c.icon,d,u)}_iconChanged(c){const l=An(c,(u,d,p)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==u)return;const g={value:u,name:d,data:p};g.data?this._gotIconData(g):x.icon=g});l.data?this._gotIconData(l):this._state=Ft(l,this._state.inline,this._state)}_gotIconData(c){this._checkQueued=!1,this._renderIcon(c,It(this),this.getAttribute("mode"))}_renderIcon(c,l,u){const d=Pn(c.data.body,u),p=this._state.inline;Nt(this._shadowRoot,this._state={rendered:!0,icon:c,inline:p,customisations:l,attrMode:u,renderedMode:d})}};o.forEach(a=>{a in s.prototype||Object.defineProperty(s.prototype,a,{get:function(){return this.getAttribute(a)},set:function(c){c!==null?this.setAttribute(a,c):this.removeAttribute(a)}})});const i=ie();for(const a in i)s[a]=s.prototype[a]=i[a];return e.define(t,s),s}Gn()||ie();const uo=f.shape({appLogo:f.node,appName:f.string,theme:f.shape({background:f.string}),enableConnect:f.bool,enableLocale:f.bool,navigation:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object]),icon:f.string,items:f.arrayOf(f.shape({title:f.oneOfType([f.string,f.object]),link:f.oneOfType([f.string,f.object])}))}))}),Wn=f.shape({showText:f.bool,showRole:f.bool,switchDid:f.bool,switchProfile:f.bool,switchPassport:f.bool,disableLogout:f.bool,onLogin:f.func,onLogout:f.func,onSwitchDid:f.func,onSwitchProfile:f.func,onSwitchPassport:f.func,menu:f.array,menuRender:f.func,dark:f.bool,size:f.number}),X=(t,e,n="children")=>t.map(r=>Array.isArray(r[n])?e({...r,[n]:X(r[n],e,n)}):e(r)),fo=(t,e="children")=>{const n=[];return X(t,r=>n.push(r),e),n},bt=(t,e,n="children")=>t.map(r=>({...r})).filter(r=>{const o=r[n];if(Array.isArray(o)){const i=bt(o,e,n);r[n]=i!=null&&i.length?i:void 0}const s={filteredChildren:r[n],isLeaf:!(o!=null&&o.length)};return e(r,s)}),Jn=t=>/^https?:\/\//.test(t),po=t=>/^[\w-]+:[\w-]+$/.test(t),Xn=t=>{if(!t||!(t!=null&&t.startsWith("/")))return!1;const e=o=>o.endsWith("/")?o:`${o}/`,n=e(window.location.pathname),r=e(new URL(t,window.location.origin).pathname);return n.startsWith(r)},ho=(t=[])=>{const e=t.map((r,o)=>({path:r,index:o})).filter(r=>Xn(r.path));return e!=null&&e.length?e.slice(1).reduce((r,o)=>r.path.length>=o.path.length?r:o,e[0]).index:-1};var $t,Bt;const go=(($t=window==null?void 0:window.blocklet)==null?void 0:$t.groupPrefix)||((Bt=window==null?void 0:window.blocklet)==null?void 0:Bt.prefix)||"/",Yn=t=>{const e={...t},n=t==null?void 0:t.background;return typeof n=="string"?e.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(e.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),e},Kn=(t,e="en")=>{if(!(t!=null&&t.length))return t;const n=(o,s)=>typeof o=="string"?o:typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o,r=(o,s)=>{if(typeof o=="string"){if(Jn(o)){const a=new URL(o);return a.searchParams.set("locale",s),a.href}const i=new URL(o,window.location.origin);return i.searchParams.set("locale",s),i.pathname+i.search}return typeof o=="object"?o[s]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o};return X(t,o=>{var s;return{...o,title:n(o.title,e),link:(s=o.items)!=null&&s.length?o.link:r(o.link,e)}},"items")},to=t=>X(t,e=>e.role?{...e,role:Array.isArray(e.role)?e.role:[e.role]}:e,"items"),eo=t=>{if(!(t!=null&&t.length))return null;const e=to(t),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[]};return e.forEach(r=>{var o;r.section?Array.isArray(r.section)?r.section.forEach(s=>{var i;(i=n[s])==null||i.push(r)}):typeof r.section=="string"&&((o=n[r.section])==null||o.push(r)):n.header.push(r)}),n},mo=t=>{if(!t)return null;const e={...t};return e.theme=Yn(e.theme),e.navigation=eo(no(e.navigation)),e},no=(t=[])=>bt(t,(e,n)=>{var r;return!!e.link||((r=n.filteredChildren)==null?void 0:r.length)},"items"),oo=(t,e)=>bt(t,(n,r)=>{var s;const o=!n.role||e&&n.role.includes(e);return r.isLeaf?o:o&&((s=r.filteredChildren)==null?void 0:s.length)},"items"),ro={width:24,height:24,body:'<path fill="currentColor" d="M13 8V4q0-.425.288-.713T14 3h6q.425 0 .713.288T21 4v4q0 .425-.288.713T20 9h-6q-.425 0-.713-.288T13 8ZM3 12V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v8q0 .425-.288.713T10 13H4q-.425 0-.713-.288T3 12Zm10 8v-8q0-.425.288-.713T14 11h6q.425 0 .713.288T21 12v8q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-4q0-.425.288-.713T4 15h6q.425 0 .713.288T11 16v4q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20Zm2-9h4V5H5v6Zm10 8h4v-6h-4v6Zm0-12h4V5h-4v2ZM5 19h4v-2H5v2Zm4-8Zm6-4Zm0 6Zm-6 4Z"/>'},so={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function yt({session:t,locale:e,size:n}){const r=(window==null?void 0:window.blocklet)||{},o=(r.navigation||[]).filter(c=>c.section==="sessionManager"&&!["/sessionManager"].includes(c.id)).filter(c=>{var l;return!!((c==null?void 0:c.role)||[]).includes(((l=t==null?void 0:t.user)==null?void 0:l.role)||"guest")}).map(c=>{const l=((r==null?void 0:r.componentMountPoints)||[]).find(u=>c.component===u.name);return{...c,component:l}}),s=T.useRef(null),i=we({open:!1}),a=ve((c=!i.open)=>{i.open=c});return o.length===0?null:b.jsxs(b.Fragment,{children:[b.jsx(Ie,{size:"medium",ref:s,onClick:()=>a(),children:b.jsx(vt,{icon:ro,fontSize:n,style:{transform:"scale(1.10)"}})}),b.jsx(Ce,{open:i.open,onClose:()=>a(!1),anchorEl:s.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:c})=>b.jsx(Se,{onClickAway:l=>{l.preventDefault(),l.stopPropagation(),a(!1)},children:b.jsx(Te,{...c,timeout:350,children:b.jsxs(Ae,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:S.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${S.gray6}, 0px 0px 0px 1px ${S.gray6}`},children:[b.jsx(Pe,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:o.map(l=>{var u,d;return b.jsx(Be,{disablePadding:!0,children:b.jsxs(Qe,{href:l.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:S.surfacePrimarySubtitle}},children:[(u=l==null?void 0:l.component)!=null&&u.did?b.jsx(je,{component:"img",src:`${ke}/blocklet/logo-bundle/${l.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"}}):b.jsx(vt,{fontSize:50,icon:l.icon||so,color:S.textSubtitle}),b.jsx(Le,{sx:{fontSize:"12px",color:S.textBase,textAlign:"center",lineHeight:"normal"},children:((d=l.title)==null?void 0:d.zh)||l.title})]})},l.id)})}),b.jsx(Oe,{session:t,children:b.jsx(Me,{variant:"outlined",fullWidth:!0,href:Re,sx:{mt:1,borderRadius:2,color:S.textBase,borderColor:S.lineBorderStrong,"&:hover":{color:S.primaryBase,borderColor:S.primaryBase}},children:e==="zh"?"管理":"Manage"})})]})})})})]})}yt.propTypes={session:f.object.isRequired,locale:f.string,size:f.number};yt.defaultProps={locale:"en",size:24};function le({formattedBlocklet:t,addons:e,sessionManagerProps:n}){var p,x,g,y;const r=T.useContext(_e),{locale:o}=Ee()||{},{enableConnect:s=!0,enableLocale:i=!0}=t,a=!!((p=r==null?void 0:r.session)!=null&&p.user);let c=Kn((x=t==null?void 0:t.navigation)==null?void 0:x.sessionManager,o)||[];c=oo(c,(y=(g=r==null?void 0:r.session)==null?void 0:g.user)==null?void 0:y.role);const u=(()=>{if(e&&typeof e!="function")return Array.isArray(e)?e:[e];let v=[];if(i&&o&&v.push(b.jsx(Ve,{showText:!1},"locale-selector")),s&&r){const C=[];a&&(c?c.slice(0,5):[]).forEach(m=>{C.push({label:m.title,icon:m.icon?b.jsx("iconify-icon",{icon:m.icon,height:24,style:{marginRight:8}}):null,component:"a",href:m.link,key:m.link})}),v.push(b.jsx(yt,{session:r.session,locale:o},"session-blocklet")),v.push(b.jsx(qe,{session:r.session,locale:o,menu:C,showRole:!0,...n},"session-user"))}return typeof e=="function"&&(v=e(v)||[]),v})();return T.createElement(b.Fragment,null,...Array.isArray(u)?u:[u])}le.propTypes={formattedBlocklet:f.object.isRequired,addons:f.oneOfType([f.func,f.node]),sessionManagerProps:Wn};le.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const bo=()=>{const t=Ne();T.useEffect(()=>{t.wallet&&Fe(()=>import("./index-NeahD9R-.js").then(e=>e.i),__vite__mapDeps([0,1,2])).then(e=>{e.call||(e=e.default),e.call("arcHideTopBar","{}")}).catch(e=>{console.error("load dsbridge error",e)})},[t])};export{le as H,Qe as L,oo as a,uo as b,fo as c,ho as d,po as e,mo as f,Kn as g,Jn as i,X as m,go as p,Wn as s,bo as u};
|
|
12
12
|
function __vite__mapDeps(indexes) {
|
|
13
13
|
if (!__vite__mapDeps.viteFileDeps) {
|
|
14
|
-
__vite__mapDeps.viteFileDeps = ["assets/index-
|
|
14
|
+
__vite__mapDeps.viteFileDeps = ["assets/index-NeahD9R-.js","assets/index-FwjymWKs.js","assets/index-Fay2ci-b.css"]
|
|
15
15
|
}
|
|
16
16
|
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{as as a,at as e,au as i,av as n,aw as o,ax as h,ay as p,az as u,aA as c,aB as d,aC as j,aD as l,aE as x,aF as f,aG as z,aH as v,j as s,aI as w}from"./index-
|
|
1
|
+
import{as as a,at as e,au as i,av as n,aw as o,ax as h,ay as p,az as u,aA as c,aB as d,aC as j,aD as l,aE as x,aF as f,aG as z,aH as v,j as s,aI as w}from"./index-FwjymWKs.js";const m={ar:a(e),de:a(i),en:a(n),es:a(o),fr:a(h),hi:a(p),id:a(u),ja:a(c),ko:a(d),pt:a(j),ru:a(l),th:a(x),vi:a(f),"zh-TW":a(z),zh:a(v)};function E(r){return function(t){return s.jsx(w,{translations:m,children:s.jsx(r,{...t})})}}export{E as w};
|
package/dist/index.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
padding: 0;
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
|
-
<script type="module" crossorigin src="/.well-known/service/static/assets/index-
|
|
17
|
+
<script type="module" crossorigin src="/.well-known/service/static/assets/index-FwjymWKs.js"></script>
|
|
18
18
|
<link rel="stylesheet" crossorigin href="/.well-known/service/static/assets/index-Fay2ci-b.css">
|
|
19
19
|
</head>
|
|
20
20
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.21-beta-
|
|
6
|
+
"version": "1.16.21-beta-8ce6a704",
|
|
7
7
|
"description": "Provide unified services for every blocklet",
|
|
8
8
|
"main": "api/index.js",
|
|
9
9
|
"files": [
|
|
@@ -32,17 +32,17 @@
|
|
|
32
32
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@abtnode/analytics": "1.16.21-beta-
|
|
36
|
-
"@abtnode/auth": "1.16.21-beta-
|
|
37
|
-
"@abtnode/client": "1.16.21-beta-
|
|
38
|
-
"@abtnode/connect-storage": "1.16.21-beta-
|
|
39
|
-
"@abtnode/constant": "1.16.21-beta-
|
|
40
|
-
"@abtnode/core": "1.16.21-beta-
|
|
41
|
-
"@abtnode/cron": "1.16.21-beta-
|
|
42
|
-
"@abtnode/logger": "1.16.21-beta-
|
|
43
|
-
"@abtnode/models": "1.16.21-beta-
|
|
44
|
-
"@abtnode/router-templates": "1.16.21-beta-
|
|
45
|
-
"@abtnode/util": "1.16.21-beta-
|
|
35
|
+
"@abtnode/analytics": "1.16.21-beta-8ce6a704",
|
|
36
|
+
"@abtnode/auth": "1.16.21-beta-8ce6a704",
|
|
37
|
+
"@abtnode/client": "1.16.21-beta-8ce6a704",
|
|
38
|
+
"@abtnode/connect-storage": "1.16.21-beta-8ce6a704",
|
|
39
|
+
"@abtnode/constant": "1.16.21-beta-8ce6a704",
|
|
40
|
+
"@abtnode/core": "1.16.21-beta-8ce6a704",
|
|
41
|
+
"@abtnode/cron": "1.16.21-beta-8ce6a704",
|
|
42
|
+
"@abtnode/logger": "1.16.21-beta-8ce6a704",
|
|
43
|
+
"@abtnode/models": "1.16.21-beta-8ce6a704",
|
|
44
|
+
"@abtnode/router-templates": "1.16.21-beta-8ce6a704",
|
|
45
|
+
"@abtnode/util": "1.16.21-beta-8ce6a704",
|
|
46
46
|
"@arcblock/did": "^1.18.108",
|
|
47
47
|
"@arcblock/did-auth": "1.18.108",
|
|
48
48
|
"@arcblock/did-ext": "^1.18.108",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@arcblock/jwt": "1.18.108",
|
|
52
52
|
"@arcblock/validator": "^1.18.108",
|
|
53
53
|
"@arcblock/ws": "1.18.108",
|
|
54
|
-
"@blocklet/constant": "1.16.21-beta-
|
|
54
|
+
"@blocklet/constant": "1.16.21-beta-8ce6a704",
|
|
55
55
|
"@blocklet/form-builder": "^0.1.11",
|
|
56
56
|
"@blocklet/form-collector": "^0.1.6",
|
|
57
|
-
"@blocklet/meta": "1.16.21-beta-
|
|
58
|
-
"@blocklet/sdk": "1.16.21-beta-
|
|
57
|
+
"@blocklet/meta": "1.16.21-beta-8ce6a704",
|
|
58
|
+
"@blocklet/sdk": "1.16.21-beta-8ce6a704",
|
|
59
59
|
"@did-connect/authenticator": "^2.2.1",
|
|
60
60
|
"@did-connect/relay-adapter-express": "^2.2.1",
|
|
61
61
|
"@ocap/client": "1.18.108",
|
|
@@ -94,13 +94,13 @@
|
|
|
94
94
|
},
|
|
95
95
|
"resolutions": {},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@abtnode/ux": "1.16.21-beta-
|
|
98
|
-
"@arcblock/did-connect": "^2.9.
|
|
99
|
-
"@arcblock/icons": "^2.9.
|
|
100
|
-
"@arcblock/ux": "^2.9.
|
|
97
|
+
"@abtnode/ux": "1.16.21-beta-8ce6a704",
|
|
98
|
+
"@arcblock/did-connect": "^2.9.3",
|
|
99
|
+
"@arcblock/icons": "^2.9.3",
|
|
100
|
+
"@arcblock/ux": "^2.9.3",
|
|
101
101
|
"@blocklet/launcher-layout": "2.2.50",
|
|
102
|
-
"@blocklet/tracker": "1.16.21-beta-
|
|
103
|
-
"@blocklet/ui-react": "^2.9.
|
|
102
|
+
"@blocklet/tracker": "1.16.21-beta-8ce6a704",
|
|
103
|
+
"@blocklet/ui-react": "^2.9.3",
|
|
104
104
|
"@emotion/react": "^11.10.4",
|
|
105
105
|
"@emotion/styled": "^11.10.4",
|
|
106
106
|
"@iconify/iconify": "^2.2.1",
|
|
@@ -171,5 +171,5 @@
|
|
|
171
171
|
"url": "https://github.com/ArcBlock/blocklet-server/issues",
|
|
172
172
|
"email": "shijun@arcblock.io"
|
|
173
173
|
},
|
|
174
|
-
"gitHead": "
|
|
174
|
+
"gitHead": "c0d935c27c3ad2ba455deb4aa3a0eacc4c1e7216"
|
|
175
175
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as x,a8 as P,q as R,bJ as j,U as D,r as a,c as S,ce as W,bI as O,j as u,am as U}from"./index-FBVX6B9S.js";import{A as k,S as A}from"./add-component-core-rFzl_VX2.js";import"./uniqBy-ngvp8e0L.js";import"./page-header-66OZD-k5.js";import"./index-3wOALYwV.js";import"./Skeleton-bZ_Miios.js";import"./Hidden-mWvmgc4A.js";import"./index-O5NefLt1.js";import"./lottie-jK27rNdj.js";import"./launch-result-message-ZdZYSlup.js";import"./index-dmjAo0qH.js";import"./EditIcon-iEwSDmTg.js";import"./Done-QX8JUe6j.js";import"./Google-IOajhpti.js";import"./TextField-mvaGVkiG.js";import"./FormControl-dd94hWMS.js";import"./useFormControl-pwVb7wu_.js";import"./InputLabel-TPtinWuK.js";import"./Select-S9JKyZyg.js";import"./logo-uploader-zW337Go0.js";import"./index--OWo39zO.js";import"./api-dJ8jWDqQ.js";import"./jss-plugin-props-sort.esm-dCzWy4MH.js";import"./toPropertyKey-NzAT2yhV.js";import"./confirm-rTEv2cR4.js";import"./DialogContentText-GOi1cMCU.js";import"./Alert-CVBj6K_x.js";import"./format-error-wlUtS96P.js";import"./ListItem-0o0I3uAI.js";import"./util-Xu6BqTTW.js";import"./index-jXP9EjwJ.js";import"./TableRow-NtkZR5qp.js";import"./index-l2b8-RX7.js";import"./session-UBJotivU.js";import"./did-address-HLejxWfT.js";import"./Stepper-jB61m6gP.js";import"./ArrowDropDown-eyRAz4BW.js";import"./useLocalStorage-UtHo1ezh.js";import"./Add-Fa_jDVH4.js";import"./Launch-Lgl-88-b.js";import"./DeleteOutline-ldnn034A.js";import"./click-to-copy-H6ULFxkd.js";import"./fallback-b_zmsVbg.js";import"./Search-iVqmV6Op.js";import"./Grid-xUYHRi0b.js";import"./InputAdornment-uDUcdmme.js";import"./preact.module-yJdvQMHZ.js";import"./content-layout-royTMDoy.js";import"./use-blocklet-info-for-connect-did-spaces-gdL1zKwo.js";import"./spaces-PqbUeoTO.js";import"./index-kA6bEgMs.js";import"./index-O-lzERhh.js";import"./ExpandMore-AjCxxobS.js";import"./ButtonGroup-WpuCESRm.js";function Bt(){var l;const{t:d}=x(),{blocklet:r}=P(),[h]=R(),{componentDid:m}=j(),f=D(t=>t.breakpoints.down("md")),g=h.get("mode")==="dialog",e=(l=r==null?void 0:r.meta)==null?void 0:l.did,i=new URL(window.location.href),s=(i.searchParams.get("store")||"").split(",").filter(Boolean).map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t}`).origin}catch(o){return console.error(o),null}}).filter(Boolean),[w,C]=a.useState(s.map(t=>({url:t,name:t.replace("https://","")}))),p=i.searchParams.get("resourceType")||"",n=i.searchParams.get("resourceDid")||m;a.useEffect(()=>{(async()=>{try{const t=await Promise.all(s.map(async o=>{const E=S(o,"/api/store.json"),{data:b}=await W.get(E);return{url:o,name:b.name}}));C(t||[])}catch(t){console.error(t)}})()},[s.join(",")]);const y=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:m},"*")};a.useEffect(()=>{const t=O();return e&&t.connect(),()=>{e&&t.isConnected()&&t.disconnect()}},[e]);const c=({inDialog:t=!0}={})=>u.jsx(k,{stores:w,resourceType:p,resourceDid:n,mode:"embed",inDialog:t,storageKey:A(`${p}+${n}`)});return g?u.jsx(U,{className:"resource-dialog",title:d("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:f?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(t,o)=>{o!=="backdropClick"&&y()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:c()}):c({inDialog:!1})}export{Bt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ce as a}from"./index-FBVX6B9S.js";a.defaults.timeout=10*1e3;const e=a.create();export{e as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,T as d,H as f,P as n,I as k,A as h,B as i,J as a}from"./index-FBVX6B9S.js";function c({linkProps:t,...r}){return e.jsxs(d,{...r,children:["Powered by"," ",e.jsx(f,{href:"https://www.arcblock.io",target:"_blank",underline:"hover",...t,children:"ArcBlock"}),"'s"," ",e.jsx(f,{href:"https://www.blocklet.io",target:"_blank",underline:"hover",...t,children:"Blocklet Technology"}),", the decentralized web engine."]})}c.propTypes={linkProps:n.object};c.defaultProps={linkProps:{}};const m="/.well-known/service/static/assets/login-bg-m34fVHNm.png";function b({did:t,children:r,title:l,description:s,logo:o,logoSize:p}){var u;if(!t)return r;const{color:x}=k(t),g=(globalThis==null?void 0:globalThis.blocklet)||(globalThis==null?void 0:globalThis.env)||{};if(l===void 0&&(l=g.appName),s===void 0&&(s=g.appDescription),o===void 0){const y=((u=globalThis==null?void 0:globalThis.blocklet)==null?void 0:u.appLogo)||"";o=e.jsx(h,{size:p,did:t,src:y,variant:"rounded"})}return typeof o=="string"&&(o=e.jsx(h,{size:p,did:t,src:o,variant:"rounded"})),e.jsxs(i,{sx:{width:"100vw",height:"100vh",display:"flex"},children:[e.jsxs(i,{sx:{position:"relative",fontSize:0,flex:30,display:{xs:"none",lg:"flex"},minWidth:"400px",backgroundColor:a.surfaceBgSubtitle},children:[e.jsx(i,{sx:{position:"absolute",top:0,bottom:0,left:0,right:0,background:`linear-gradient(0deg, ${x} 0%, ${x} 100%), url(${m}), lightgray 50% / cover no-repeat `,backgroundPosition:"center",backgroundSize:"cover",backgroundBlendMode:"soft-light, normal",mask:"linear-gradient(172deg, rgba(0, 0, 0, 0.0) 24.62%, rgba(0, 0, 0, 0.80) 44.47%, #000 100%)"}}),e.jsxs(i,{sx:{display:"flex",flexDirection:"column",position:"absolute",top:0,left:0,width:"100%",p:3},children:[o,l&&e.jsx(d,{variant:"h4",sx:{mt:3,mb:1,p:0,mx:0,fontWeight:"bold"},children:l}),s&&e.jsx(d,{variant:"body2",sx:{m:0,p:0,color:a.textSubtitle,fontSize:"14px",lineHeight:"24px"},children:s})]}),e.jsx(c,{linkProps:{underline:"always",color:a.textSubtitle},sx:{zIndex:10,position:"absolute",bottom:40,left:20,right:20,textAlign:"center",fontSize:"14px",color:a.textSubtitle}})]}),e.jsx(i,{sx:{display:"flex",justifyContent:"center",alignItems:"center",flex:70,maxWidth:"90%",margin:"auto",height:"100%"},children:r})]})}b.propTypes={did:n.string.isRequired,children:n.any.isRequired,title:n.any,description:n.any,logo:n.any,logoSize:n.number};b.defaultProps={title:void 0,description:void 0,logo:void 0,logoSize:40};export{b as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-FBVX6B9S.js";import{S as t}from"./studio-o1cOhwh6.js";import"./index--CyhSTyx.js";import"./nav-menu-Tl5mEfRm.js";import"./MoreHoriz-CgcL_RUW.js";import"./ExpandMore-AjCxxobS.js";import"./Toolbar-yH3XFZuP.js";import"./Hidden-mWvmgc4A.js";import"./fallback-b_zmsVbg.js";function d(){return o.jsx(t,{children:"Coming soon..."})}export{d as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as o,w as t,j as i}from"./index-FBVX6B9S.js";import{I as s}from"./iframe-tVY0Votd.js";import{S as a}from"./studio-o1cOhwh6.js";import"./index--CyhSTyx.js";import"./nav-menu-Tl5mEfRm.js";import"./MoreHoriz-CgcL_RUW.js";import"./ExpandMore-AjCxxobS.js";import"./Toolbar-yH3XFZuP.js";import"./Hidden-mWvmgc4A.js";import"./fallback-b_zmsVbg.js";function P(){const r=new URLSearchParams;r.set("title","Preference Builder"),r.set("schemaKey",o(window.location.origin,t.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/studio/preferences"));const e=`${o(window.location.origin,t.WELLKNOWN_SERVICE_PATH_PREFIX,"/hosted/form-builder/")}?${r.toString()}`;return i.jsx(a,{children:i.jsx(s,{url:e,width:"100%",height:"100%",frameBorder:0,styles:{border:0}})})}export{P as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as n,bJ as l,U as c,j as o,am as d,B as u}from"./index-FBVX6B9S.js";import h from"./index-BD3_xRrb.js";import"./useSetState-qyJ6mTGB.js";import"./index-Drj2DsEg.js";import"./FilterList-2ERNRQaM.js";import"./TableRow-NtkZR5qp.js";import"./Checkbox-E7hRdaZx.js";import"./FormControlLabel-RXb6vK7s.js";import"./useFormControl-pwVb7wu_.js";import"./FormControl-dd94hWMS.js";import"./FormGroup--UBs69R8.js";import"./InputLabel-TPtinWuK.js";import"./confirm-rTEv2cR4.js";import"./DialogContentText-GOi1cMCU.js";import"./Alert-CVBj6K_x.js";import"./format-error-wlUtS96P.js";import"./Select-S9JKyZyg.js";import"./TextField-mvaGVkiG.js";import"./index-BG8b7I-X.js";import"./LastPage-JHHCVMPH.js";import"./Toolbar-yH3XFZuP.js";import"./index-pXkIJMvn.js";import"./redux-XOuz_cVf.js";import"./toPropertyKey-NzAT2yhV.js";import"./Grid-xUYHRi0b.js";import"./Search-iVqmV6Op.js";import"./MoreVert--r4YINap.js";import"./did-address-HLejxWfT.js";import"./ChevronRight-4XdBuB9J.js";import"./Avatar-phMyiuZN.js";import"./useLocalStorage-UtHo1ezh.js";import"./session-UBJotivU.js";import"./InputAdornment-uDUcdmme.js";import"./Download-6axtZJsQ.js";import"./DeleteOutline-ldnn034A.js";import"./index--OWo39zO.js";import"./index-kA6bEgMs.js";import"./ExpandMore-AjCxxobS.js";import"./OpenInNew-UCL6a4s2.js";import"./api-dJ8jWDqQ.js";const i=new URL(window.location.href),r=i.searchParams.get("mode")==="dialog",g=r?"":i.searchParams.get("padding")||"";function io(){const{t:e}=n(),{componentDid:s}=l(),m=c(a=>a.breakpoints.down("md")),p=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")},t=o.jsx(h,{padding:g});return r?o.jsx(d,{className:"resource-dialog",title:e("blocklet.publish.createResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:p,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:o.jsx(u,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:t})}):t}export{io as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,br as t}from"./index-FBVX6B9S.js";function e(){return o.useContext(t)}export{e as u};
|