@abtnode/blocklet-services 1.16.42-beta-20250412-083409-53f46a85 → 1.16.42-beta-20250413-121549-22e9a196
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/index.js +32 -2
- package/api/libs/push-kit/index.js +16 -11
- package/api/routes/user-session.js +49 -40
- package/api/routes/user.js +16 -4
- package/api/services/auth/session.js +37 -10
- package/api/util/attach-shared-utils.js +12 -5
- package/dist/assets/{ArrowDropDown-C_E3qkPd.js → ArrowDropDown-a-C4j7Lx.js} +1 -1
- package/dist/assets/{CheckCircle-D7Ntmb2o.js → CheckCircle-CuYzdCtm.js} +1 -1
- package/dist/assets/{ChevronLeft-BIgT65EY.js → ChevronLeft-CnflXey6.js} +1 -1
- package/dist/assets/{ChevronRight-foZmiP4J.js → ChevronRight-DE7hYCb3.js} +1 -1
- package/dist/assets/{Community-Ds1NG5Zj.js → Community-C8NtUXNH.js} +1 -1
- package/dist/assets/{DeleteOutline-CKVA3PXs.js → DeleteOutline-PGhagisl.js} +1 -1
- package/dist/assets/{Done-BDrYSkZM.js → Done-BVaQae1-.js} +1 -1
- package/dist/assets/{Download-BQiSNQBP.js → Download-DNNh4N1T.js} +1 -1
- package/dist/assets/{EditIcon-Bt91o1l6.js → EditIcon-Y1U-3M09.js} +1 -1
- package/dist/assets/{Email-C7SKOpM8.js → Email-BYzCrU9G.js} +1 -1
- package/dist/assets/{Error-CK4gTMoT.js → Error-C4dVUMw4.js} +1 -1
- package/dist/assets/{ExpandLess-1B6PdCYC.js → ExpandLess-Blh1x-4z.js} +1 -1
- package/dist/assets/{Google-DimUFzIe.js → Google-CAujGJ1A.js} +1 -1
- package/dist/assets/{Holiday-Dfj3kBBI.js → Holiday-DxDxhx5X.js} +1 -1
- package/dist/assets/{InfoOutlined-CEHciuDy.js → InfoOutlined-DF9JwavD.js} +1 -1
- package/dist/assets/{Launch-DX76v5dw.js → Launch-gOz_lwLg.js} +1 -1
- package/dist/assets/{LaunchOutlined-CnOQGhu-.js → LaunchOutlined-MbSPR9qn.js} +1 -1
- package/dist/assets/{Location--4ueDivQ.js → Location-CEwgGcA5.js} +1 -1
- package/dist/assets/{LockIcon-B84lMZao.js → LockIcon-D7BH0t_p.js} +1 -1
- package/dist/assets/{Meeting-CVVnP-bH.js → Meeting-BJz5QiFc.js} +1 -1
- package/dist/assets/{MoreHoriz-THEF6D0C.js → MoreHoriz-CGWVyYh4.js} +1 -1
- package/dist/assets/{OffSick-C_2x7yDI.js → OffSick--msvqLGm.js} +1 -1
- package/dist/assets/{Phone-CaKOX2Yu.js → Phone-CDl3oDYG.js} +1 -1
- package/dist/assets/{PlayArrow-DpcMtsY5.js → PlayArrow-CxWt6459.js} +1 -1
- package/dist/assets/{QuestionMarkCircle-5K6WR8Pc.js → QuestionMarkCircle-CPHZnM6u.js} +1 -1
- package/dist/assets/{ServerLogo-C4P-qXGV.js → ServerLogo-vX_nf8Sc.js} +1 -1
- package/dist/assets/{Timezone-Bgwxnj29.js → Timezone-uXi4_8BX.js} +1 -1
- package/dist/assets/{TuneOutlined-DHqZ7jGz.js → TuneOutlined-DcqnBMqE.js} +1 -1
- package/dist/assets/{ViewList-DOu7Co_L.js → ViewList-B6eveRY-.js} +1 -1
- package/dist/assets/{WorkingRemotely-Dm2BOs5c.js → WorkingRemotely-CK4z1-Sd.js} +1 -1
- package/dist/assets/{access-control-wqGz9JCo.js → access-control-Dxyg5dpc.js} +1 -1
- package/dist/assets/{actions-CAL1KFv7.js → actions-BAjt7G_t.js} +1 -1
- package/dist/assets/{add-component-core-DqvSoT6a.js → add-component-core-BXowXTJz.js} +1 -1
- package/dist/assets/{add-resource-DmN1IY_o.js → add-resource-BetUBTvt.js} +1 -1
- package/dist/assets/{addon-D1_etOjl.js → addon-B1aBsfOX.js} +1 -1
- package/dist/assets/{advanced-CzJgEcda.js → advanced-C8t1232G.js} +1 -1
- package/dist/assets/{appearance-Bn0kYJHu.js → appearance-BIOmTg1q.js} +1 -1
- package/dist/assets/{audit-logs-DU66CSpw.js → audit-logs-SSAqJt40.js} +1 -1
- package/dist/assets/{base32-CLGITfm-.js → base32-iVyUiizz.js} +1 -1
- package/dist/assets/{branding-C5rNAfwW.js → branding-BDuOcSfH.js} +1 -1
- package/dist/assets/{branding-CiE421Dn.js → branding-NmIAi0kv.js} +2 -2
- package/dist/assets/{bundle-avatar-vSofRY4G.js → bundle-avatar-DfAWUEqX.js} +1 -1
- package/dist/assets/button-Kk1bqv_H.js +1 -0
- package/dist/assets/{click-to-copy-C9iEVQIO.js → click-to-copy-DCUroWft.js} +1 -1
- package/dist/assets/{complete-BeWyfTmK.js → complete-R99mlHBI.js} +1 -1
- package/dist/assets/{component-CZ948vh4.js → component-By64LaLD.js} +1 -1
- package/dist/assets/{config-DzZULB-q.js → config-BHBxeyYh.js} +1 -1
- package/dist/assets/{config-CFbM7U_5.js → config-BvNNOdw8.js} +1 -1
- package/dist/assets/config-navigation-CPd_4svD.js +26 -0
- package/dist/assets/{config-space-Drp9NI7a.js → config-space-BgWEAM0m.js} +1 -1
- package/dist/assets/{confirm-B9OqaJpT.js → confirm-92J4n1RP.js} +1 -1
- package/dist/assets/{connect-CpUC5BAX.js → connect-Bq-p3hnS.js} +1 -1
- package/dist/assets/connect-D20f2K4u.js +5 -0
- package/dist/assets/{connect-to-BasQxweP.js → connect-to-bQVCrkhh.js} +1 -1
- package/dist/assets/{content-layout-Bs-vdQ_U.js → content-layout-CFHoSupA.js} +1 -1
- package/dist/assets/{dashboard-BYUKOMAe.js → dashboard-BgQFc2Pc.js} +11 -11
- package/dist/assets/{delete-confirm-CM4f-ajO.js → delete-confirm-AkwIQ5yF.js} +1 -1
- package/dist/assets/{did-address-B_VfxEC5.js → did-address-D4v6iN2l.js} +1 -1
- package/dist/assets/domain-CBdLs2D9.js +9 -0
- package/dist/assets/{domain-action-card-pHkmKFE3.js → domain-action-card-DN3KjFwP.js} +2 -2
- package/dist/assets/domains-CMJbalsn.js +1 -0
- package/dist/assets/{email-C5iUsSjP.js → email-JviRloBo.js} +1 -1
- package/dist/assets/{empty-spinner-Cia24BVr.js → empty-spinner-DlzuJxRt.js} +1 -1
- package/dist/assets/{exchange-passport-CyGvLDal.js → exchange-passport-3aXbJr-q.js} +1 -1
- package/dist/assets/{fuel-C5H_z1Ay.js → fuel-DOs3bqYm.js} +1 -1
- package/dist/assets/{get-safe-url-BOY9UAaI.js → get-safe-url-CWgEUVPT.js} +1 -1
- package/dist/assets/{get-safe-url-D_Puq_oh.js → get-safe-url-eATw6wn7.js} +1 -1
- package/dist/assets/{home-CjHQSa_8.js → home-a0RwGUp7.js} +1 -1
- package/dist/assets/{iframe-BhRKCdFb.js → iframe-DVBEjxC1.js} +1 -1
- package/dist/assets/{index-Kaq7tC6c.js → index-3q6oLa2e.js} +1 -1
- package/dist/assets/{index-C5lvlGzp.js → index-BBl5mftj.js} +3 -3
- package/dist/assets/{index-d34Q6nXR.js → index-BGeUo-5w.js} +1 -1
- package/dist/assets/{index-Cp_gD4ZQ.js → index-BJYrBMyS.js} +1 -1
- package/dist/assets/{index-B8FtPEFx.js → index-BVOsgGKh.js} +1 -1
- package/dist/assets/{index-DUU3hQpo.js → index-BxTrfRkG.js} +1 -1
- package/dist/assets/index-C3-7zmeY.js +346 -0
- package/dist/assets/{index-BTOIZL6e.js → index-CCwUSMuP.js} +1 -1
- package/dist/assets/{index-CjmXl7jW.js → index-CwdXL2a0.js} +1 -1
- package/dist/assets/{index-Ctl8J5Z5.js → index-DBLdE2lQ.js} +1 -1
- package/dist/assets/{index-CVIeQOoE.js → index-DQIxR9j5.js} +1 -1
- package/dist/assets/index-DWuuU3ta.js +113 -0
- package/dist/assets/{index-Cuoxr9xB.js → index-DjIOxw8x.js} +1 -1
- package/dist/assets/{index-CYAgDp3G.js → index-DrUxhMM5.js} +1 -1
- package/dist/assets/index-K5iSHoYm.js +224 -0
- package/dist/assets/{index-DR9nQ2tJ.js → index-KLUHbsxg.js} +1 -1
- package/dist/assets/{index-BYsXlcQC.js → index-MqiIu4kd.js} +1 -1
- package/dist/assets/{index-BjYech25.js → index-Th4BUzmb.js} +23 -23
- package/dist/assets/{index-Du2DtxVt.js → index-VvWvVQT8.js} +1 -1
- package/dist/assets/{index-DkZfhapD.js → index-sv3a1ZUw.js} +1 -1
- package/dist/assets/{invitation-C9hFp_wD.js → invitation-CwtXOXZc.js} +4 -4
- package/dist/assets/{invite-CzfqL5Tx.js → invite-CMj5995Z.js} +1 -1
- package/dist/assets/{issue-passport-D3F63x7z.js → issue-passport-DtEbcgX6.js} +1 -1
- package/dist/assets/{item-C_TigVeC.js → item-zVdGBfMR.js} +1 -1
- package/dist/assets/{landing-page-B5nKEn_3.js → landing-page-BM1TmagN.js} +1 -1
- package/dist/assets/{launch-result-message-C0Ao1hE-.js → launch-result-message-DOa3SWMR.js} +1 -1
- package/dist/assets/{layout-D5ALyxXA.js → layout-DCzN0ui5.js} +1 -1
- package/dist/assets/{list-DuzdV0Wa.js → list-BuXPrN1N.js} +8 -8
- package/dist/assets/{list-header-BibBP5t1.js → list-header-BLGbkNad.js} +1 -1
- package/dist/assets/localization-qd6O0FX9.js +1 -0
- package/dist/assets/{log-Dg8IZoeo.js → log-C0ajhie8.js} +1 -1
- package/dist/assets/{logger-Bd77RetM.js → logger-D6n4nbwy.js} +1 -1
- package/dist/assets/{login-B9XiO8eS.js → login-f1AXbIm0.js} +1 -1
- package/dist/assets/{login-oauth-callback-5AlLzjZ2.js → login-oauth-callback-C5CFUlUR.js} +1 -1
- package/dist/assets/{logo-uploader-ChABQ_cS.js → logo-uploader-DbAVW3BS.js} +3 -3
- package/dist/assets/{lost-passport-gGzRW--h.js → lost-passport-Dlmv8D-L.js} +2 -2
- package/dist/assets/{open-window-CX_mRFPs.js → open-window-DskgWqba.js} +1 -1
- package/dist/assets/{overview-ClfPLbRa.js → overview-DY9-9zrL.js} +1 -1
- package/dist/assets/{page-header-DWf5vODI.js → page-header-XbzfRkA7.js} +1 -1
- package/dist/assets/{permission-CmHMB8NK.js → permission-Bi46fqEy.js} +1 -1
- package/dist/assets/{preferences-COMN8FgJ.js → preferences-DPpwnIAs.js} +1 -1
- package/dist/assets/{profile-embed-Crj1xM6Z.js → profile-embed-DV5vno0C.js} +1 -1
- package/dist/assets/publish-resource-z2_THSz6.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-B3HYEQUw.js → react-beautiful-dnd.esm-B68lWn23.js} +1 -1
- package/dist/assets/{relative-time-CE47D6s7.js → relative-time-BeR_4mfM.js} +1 -1
- package/dist/assets/{runtime-CdKbOwQM.js → runtime-D6tESY33.js} +1 -1
- package/dist/assets/sdk-DNr-nKBq.js +1 -0
- package/dist/assets/{security-DmjkCoJ_.js → security-DmR541pi.js} +1 -1
- package/dist/assets/{session-0rF5SuCk.js → session-CJFbMNLl.js} +1 -1
- package/dist/assets/setup-BSsqBrsc.js +19 -0
- package/dist/assets/{shorten-label-DDBwv81M.js → shorten-label-BuH-7PI8.js} +1 -1
- package/dist/assets/{simple-select-vCKkiHhG.js → simple-select-DHvjqsw4.js} +1 -1
- package/dist/assets/{slicedToArray-Da5X2Yv5.js → slicedToArray-C0MW3KIe.js} +1 -1
- package/dist/assets/{spaces-CyFGYf34.js → spaces-gLUqr6Uq.js} +1 -1
- package/dist/assets/{start-CwSXw9Xs.js → start-XbVMHGiE.js} +1 -1
- package/dist/assets/{status-CgfGREVl.js → status-DmyvEkKL.js} +1 -1
- package/dist/assets/{step-actions-BNW8I1sI.js → step-actions-brdohYRv.js} +1 -1
- package/dist/assets/{studio-cLKWVbyy.js → studio-DJeZlIfF.js} +1 -1
- package/dist/assets/{switch-control-DpvMHPLC.js → switch-control-Br1YNOSB.js} +1 -1
- package/dist/assets/{traffic-ChJb5Oyl.js → traffic-LuIcK-L1.js} +1 -1
- package/dist/assets/{transfer-BHifjdxl.js → transfer-DboKwiA_.js} +1 -1
- package/dist/assets/{unsubscribe-CcyOqX8E.js → unsubscribe-C9k_L3g5.js} +1 -1
- package/dist/assets/{use-mobile-DjnNmGRG.js → use-mobile-C98e2dYy.js} +1 -1
- package/dist/assets/{use-mobile-DpXDDjat.js → use-mobile-CqLLcWbr.js} +1 -1
- package/dist/assets/useAsync-BxB2TpDl.js +1 -0
- package/dist/assets/useAsync-L7_fHBH5.js +1 -0
- package/dist/assets/useAsyncRetry-CEouAsle.js +7 -0
- package/dist/assets/{useLocalStorage-Cq9THoCr.js → useLocalStorage-0mjZfnua.js} +1 -1
- package/dist/assets/user-center-BaKv3X4J.js +77 -0
- package/dist/assets/{util-1n1Ulk5w.js → util-DLK92HF8.js} +1 -1
- package/dist/assets/{util-BmbbisPE.js → util-YnaMqM3B.js} +1 -1
- package/dist/assets/{vendor-arcblock-V3HYELzG.js → vendor-arcblock-DPMnO1AO.js} +83 -83
- package/dist/assets/{vendor-mui-core-1jJmAutq.js → vendor-mui-core-x3zpe_j_.js} +1 -1
- package/dist/assets/{vendor-mui-x-CPwlD3uT.js → vendor-mui-x-CPOc4sOK.js} +1 -1
- package/dist/assets/{vendor-ux-did-connect-DEbq97Xz.js → vendor-ux-did-connect-B1u6nvmg.js} +7 -7
- package/dist/assets/{wrap-locale-5LSB6OAr.js → wrap-locale-m_NRjq-h.js} +1 -1
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/package.json +30 -30
- package/dist/assets/button-BSJ2z68-.js +0 -1
- package/dist/assets/config-navigation-hrdLDyFZ.js +0 -26
- package/dist/assets/connect-0zFqdTRm.js +0 -5
- package/dist/assets/domain-D0xqhxvZ.js +0 -9
- package/dist/assets/domains-BrNRyjCn.js +0 -1
- package/dist/assets/index-Bee_YcJC.js +0 -113
- package/dist/assets/index-D3YZfNxX.js +0 -5
- package/dist/assets/index-DFoYVoMG.js +0 -346
- package/dist/assets/index-Dzvf3kMf.js +0 -220
- package/dist/assets/localization-WUgLuLwU.js +0 -1
- package/dist/assets/publish-resource-C6TOyrHC.js +0 -1
- package/dist/assets/sdk-j4w1A_X4.js +0 -1
- package/dist/assets/setup-DLCw2h80.js +0 -19
- package/dist/assets/useAsync-BENTIUEf.js +0 -1
- package/dist/assets/useAsyncRetry-DSYkC9r5.js +0 -7
- package/dist/assets/user-center-DfDG_giT.js +0 -77
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-
|
|
2
|
-
import{c as Ve,u as yn,p as ao,h as Vt,f as vn,b as bn,e as lo,i as co,g as uo,m as fo,j as Us,D as po,E as ho,k as mo,H as go,_ as Y,R as xo}from"./vendor-arcblock-V3HYELzG.js";import{E as P,j as o,a2 as Se,aa as ve,I as Jt,aj as yo,ad as _n,al as Gr,ak as vo,b3 as bo,a3 as He,b4 as _o,bt as wo,T as de,bC as jo,br as xt,bD as Bs,a4 as U,a5 as Mt,bE as So,t as De,$ as Yt,bF as Co,a6 as Ao,bh as Eo,ai as Qr,bG as wn,bH as To,am as Ro,ab as ko,ae as $t,M as ke,bs as Rr,bn as Oe,bI as jn,bJ as Sn,bK as Cn,A as Qe,b2 as An,bj as Io}from"./vendor-mui-core-1jJmAutq.js";import{r as F,L as En,f as Tn,b as z,g as Rn,u as Do,l as Lo}from"./vendor-react-DEoibe3W.js";import{r as Ce,b1 as Po,a$ as Xt,b2 as Fo,B as Je,p as ie,a1 as zs,Y as ne,u as me,am as Oo,b3 as Vo,v as kn,o as Zr,q as Mo,d as $o,W as Jr,K as No,n as Uo,a4 as In,aq as Dn,C as Nt,b4 as Bo,b5 as zo,_ as Hs,ak as Ho}from"./vendor-ux-did-connect-DEbq97Xz.js";import{z as at,f as ye,A as cr,B as qo,b as Wo,C as Yr,D as Ko,E as Ln,t as st,F as Pn,G as Go,n as lt,H as Qo,I as Zo,j as qs,g as Jo,h as Yo,l as Ws,k as Xo,m as ea,J as Dt,e as Et,K as ta,L as ra,M as sa,N as na,O as ur,c as Ks}from"./index-BjYech25.js";import{aa as ia,y as er,ab as oa,z as Lt,I as Fn,x as On,ac as aa}from"./vendor-utils-C3FZIS9A.js";import{_ as Gs}from"./useLocalStorage-Cq9THoCr.js";import{C as Qs}from"./confirm-B9OqaJpT.js";import{d as la}from"./PlayArrow-DpcMtsY5.js";import{g as Zs}from"./get-safe-url-D_Puq_oh.js";import{f as Xr}from"./format-error-BrmqJs5a.js";import{i as ca,u as ua,M as da,c as yt,s as Ut,H as fa,p as Vn,B as pa}from"./index-Cp_gD4ZQ.js";import{u as Mn}from"./session-0rF5SuCk.js";import{D as ha,_ as $n}from"./useAsyncRetry-DSYkC9r5.js";import{f as Ye,a as Nn,u as pe,v as ma}from"./vendor-hooks-DN4nZ7TU.js";import{d as ga}from"./InfoOutlined-CEHciuDy.js";import{_ as Un}from"./useSetState-CWq0AVWn.js";import{u as xa}from"./use-mobile-DpXDDjat.js";const Bn=F.createContext({});function es({children:e,type:r}){const[t,s]=F.useState([]),n=F.useRef([]),i=c=>{if(!n.current.includes(c)){const d=[...n.current,c];s(d),n.current=d}},a=c=>{if(n.current.includes(c)){const d=n.current.filter(f=>f!==c);s(d),n.current=d}},l=c=>{const d=t.filter(p=>c.find(g=>g===p));ia(d,t).forEach(p=>a(p))};return o.jsx(Bn.Provider,{value:{type:r,deletingBlocklets:t,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:l},children:e})}es.propTypes={type:P.string,children:P.node.isRequired};es.defaultProps={type:"blocklets"};function Pd(){return F.useContext(Bn)}var ts={},ya=Se;Object.defineProperty(ts,"__esModule",{value:!0});var zn=ts.default=void 0,va=ya(Ce()),ba=o;zn=ts.default=(0,va.default)((0,ba.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var rs={},_a=Se;Object.defineProperty(rs,"__esModule",{value:!0});var Hn=rs.default=void 0,wa=_a(Ce()),ja=o;Hn=rs.default=(0,wa.default)((0,ja.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ss={},Sa=Se;Object.defineProperty(ss,"__esModule",{value:!0});var qn=ss.default=void 0,Ca=Sa(Ce()),Aa=o;qn=ss.default=(0,Ca.default)((0,Aa.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var ns={},Ea=Se;Object.defineProperty(ns,"__esModule",{value:!0});var is=ns.default=void 0,Ta=Ea(Ce()),Ra=o;is=ns.default=(0,Ta.default)((0,Ra.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var os={},ka=Se;Object.defineProperty(os,"__esModule",{value:!0});var Wn=os.default=void 0,Ia=ka(Ce()),Da=o;Wn=os.default=(0,Ia.default)((0,Da.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var as={},La=Se;Object.defineProperty(as,"__esModule",{value:!0});var Kn=as.default=void 0,Pa=La(Ce()),Fa=o;Kn=as.default=(0,Pa.default)((0,Fa.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var ls={},Oa=Se;Object.defineProperty(ls,"__esModule",{value:!0});var Gn=ls.default=void 0,Va=Oa(Ce()),Ma=o;Gn=ls.default=(0,Va.default)((0,Ma.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var cs=function(e){return o.jsx("svg",{...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};cs.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};cs.displayName="dashboard";var us={},$a=Se;Object.defineProperty(us,"__esModule",{value:!0});var Qn=us.default=void 0,Na=$a(Ce()),Ua=o;Qn=us.default=(0,Na.default)((0,Ua.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const tt={Start:la,Stop:zn,Restart:Hn,Reload:qn,Remove:Po,Config:is,Log:Wn,Group:Kn,Cancel:Gn,Dashboard:cs,Overview:Qn},Ba=(e,r)=>{if(!e)return"";const t=new URL(e),s=new URLSearchParams(t.searchParams),n=new URL(er(t.origin,r));return n.search=s.toString(),n.toString()},za="internal",Ha="external";function ds({blocklet:e,onStart:r,onComplete:t,variant:s,hasPermission:n,getComponentUrl:i,useBlockletUrlEvaluation:a,...l}){const c=at(),[d,f]=F.useState(null),[p,g]=F.useState(null),[j,E]=F.useState(!1),[T,M]=F.useState(null),{t:y}=F.useContext(Xt),[b]=Gs("skip-blocklet-setup",!1),{loading:I,recommendedUrl:B}=a(e),[_]=Gs("blocklet-type-filter",za),m=ye.isInProgress(e.status),[w,S]=F.useState(!1);F.useEffect(()=>{var Q,ae;if(!(e!=null&&e.controller))return;S(((ae=(Q=e==null?void 0:e.controller)==null?void 0:Q.status)==null?void 0:ae.value)===Ve.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var ge,be,Pe;try{const le=await c.api.getLauncherSession({input:{launcherSessionId:(ge=e==null?void 0:e.controller)==null?void 0:ge.launcherSessionId,launcherUrl:(be=e==null?void 0:e.controller)==null?void 0:be.launcherUrl}});if(le!=null&&le.error){console.error("get launcher session failed",le.error);return}S([ie.LAUNCH_SESSION_STATUS.overdue,ie.LAUNCH_SESSION_STATUS.canceled,ie.LAUNCH_SESSION_STATUS.terminated].includes((Pe=le==null?void 0:le.launcherSession)==null?void 0:Pe.status))}catch(le){console.error("call getLauncherSession error",le)}})()},[]);const{inService:R}=c,x=(O,Q,ae=!1)=>async()=>{const ge=async $e=>{var et;r({action:O,blocklet:e}),E(!0),g(O);let Ke=!1;try{if(O==="remove")await Q($e);else if(O==="start"){if(!ye.hasRunnableComponent(e)){ne.error(y("blocklet.noComponent"));return}if(!R&&!b&&!((et=e.settings)!=null&&et.initialized)&&e.mode!==Ve.BLOCKLET_MODES.DEVELOPMENT){if(!B||!zs(B)){ne.error(y("blocklet.gotoVisitError"));return}const xe=qo(c.info),ut=new URL(B);ut.searchParams.set("serverUrl",xe),window.open(Zs(ut.href,{allowDomains:null})),t({action:O,blocklet:e});return}const Re=e.children.filter(xe=>!ye.isInProgress(xe.status)&&xe.status!=="running").map(xe=>xe.meta.did),Ne={did:e.meta.did,componentDids:Re};await Q({input:Ne})}else if(["stop","restart","reload"].includes(O)){const Re=e.children.filter(xe=>xe.status==="running").map(xe=>xe.meta.did),Ne={did:e.meta.did,componentDids:Re};await Q({input:Ne})}else{const Re={did:e.meta.did};await Q({input:Re})}O==="remove"?Ke=!0:await Wo(1e3),O==="reload"&&ne.success(y("blocklet.reloadSuccess")),M(null),t({action:O,blocklet:e})}catch(Re){const Ne=`Blocklet ${O} failed: ${Xr(Re)}`;throw t({action:O,blocklet:e,error:new Error(Ne)}),new Error(Ne)}finally{Ke||E(!1)}},be=()=>{E(!1),M(null)},Pe=ye.getDisplayName(e,!0),le=e.mode===Ve.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(de,{component:"div",children:o.jsx(de,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:($e,Ke)=>o.jsxs(de,{component:"div",children:[o.jsx(de,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(jo,{name:"removeType",value:$e.removeType,onChange:et=>Ke({...$e,removeType:et.target.value}),children:[o.jsx(xt,{value:"backup",control:o.jsx(Bs,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(xt,{value:"complete",control:o.jsx(Bs,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},At={stop:{title:`${y("common.stop")} ${Pe}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be},restart:{title:`${y("common.restart")} ${Pe}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be},remove:{title:`${y("common.remove")} ${Pe}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be,...le},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:Pe}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be}};ae?M(At[O]):await ge()},D=!!d,V=O=>{try{O.stopPropagation(),O.preventDefault()}catch{}f(O.currentTarget)},$=O=>{try{O.stopPropagation(),O.preventDefault()}catch{}f(null)},H=async(O,Q)=>{try{Q.stopPropagation(),Q.preventDefault()}catch{}if(typeof O.handler=="function")try{E(!0),g(O.action),await O.handler()}catch(ae){console.error(`Blocklet ${O.name} failed: `,ae)}finally{E(!1),f(null)}else f(null)},W=!R&&ye.isDeletableBlocklet(e)?{action:"remove",icon:tt.Remove,name:y("common.remove"),handler:x("remove",async({removeType:O})=>{O==="backup"&&await c.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await c.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:m}:null,oe={action:"remove",icon:({sx:O,...Q})=>o.jsx(tt.Cancel,{sx:{...O,paddingRight:"2px",zoom:.95},...Q}),name:y("common.cancel"),handler:x("cancelDownload",c.api.cancelDownloadBlocklet,!0)},fe=ye.getAppMissingConfigs(e),We=()=>{var ge;const O=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),Q=i==null?void 0:i({mountPoint:O,blocklet:e});if(!Q||!zs(Q)){ne.error(y("blocklet.gotoVisitError"));return}const ae=(ge=e==null?void 0:e.site)==null?void 0:ge.domainAliases;window.open(Zs(Ba(Q,".well-known/service/admin"),{allowDomains:ae==null?void 0:ae.map(be=>be.value)}))};let Te=[{action:"start",icon:tt.Start,inExternal:!0,name:y("common.start"),handler:x("start",c.api.startBlocklet),disabled:w||e.children.every(O=>O.status==="running")||cr(e.status)||I||m},{action:"stop",icon:tt.Stop,inExternal:!0,name:y("common.stop"),handler:x("stop",c.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:tt.Restart,name:y("common.restart"),handler:x("restart",c.api.restartBlocklet,!0),disabled:w||e.status!=="running"},cr(e.status)?oe:W,{separator:!0},R?null:{action:"dashboard",icon:({style:O,...Q})=>o.jsx(tt.Dashboard,{...Q,style:{...O,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:We}].filter(Boolean);return _===Ha&&(Te=Te.filter(O=>O.inExternal)),s==="menu"?o.jsxs(Js,{"data-cy":"blocklet-actions",children:[o.jsx(Jt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:V,size:"small",disabled:!n||!cr(e.status)&&j,children:o.jsx(Fo,{})}),o.jsxs(yo,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:D,onClose:$,PaperProps:{},children:[fe.length>0&&o.jsxs(_n,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(En,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Te.map((O,Q)=>O.separator?o.jsx(Gr,{},`separator-${Q}`):o.jsxs(vo,{dense:!0,onClick:ae=>H(O,ae),disabled:j||O.disabled,"data-cy":`${O.action}-blocklet`,children:[o.jsx(bo,{style:{minWidth:24},children:p===O.action&&j?o.jsx(He,{size:16,sx:{marginRight:1}}):o.jsx(O.icon,{fontSize:"small"})}),o.jsx(_o,{primary:O.name})]},O.name))]}),T&&o.jsx(Qs,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel})]}):o.jsxs(Js,{"data-cy":"blocklet-actions",...l,children:[o.jsx(wo,{children:Te.filter(O=>!O.separator&&!O.onlyInMenu).map(O=>o.jsxs(Je,{title:O.name,"data-cy":`${O.action}-blocklet`,onClick:()=>H(O),disabled:!!O.disabled||j,children:[p===O.action&&j?o.jsx(He,{size:16,sx:{marginRight:1}}):o.jsx(O.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:O.name})]},O.name))}),T&&o.jsx(Qs,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel})]})}ds.propTypes={getComponentUrl:P.func,blocklet:P.object.isRequired,onStart:P.func.isRequired,onComplete:P.func.isRequired,variant:P.oneOf(["menu","group"]),hasPermission:P.bool,useBlockletUrlEvaluation:P.func};ds.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Js=ve.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/log-C0ajhie8.js","assets/vendor-mui-core-x3zpe_j_.js","assets/vendor-react-DEoibe3W.js","assets/useLocalStorage-0mjZfnua.js","assets/vendor-ux-did-connect-B1u6nvmg.js","assets/vendor-utils-C3FZIS9A.js","assets/vendor-hooks-DN4nZ7TU.js","assets/lottie-web-jYmAQWuC.js","assets/vendor-ux-did-connect-BDmhBveY.css","assets/index-Th4BUzmb.js","assets/vendor-arcblock-DPMnO1AO.js","assets/Download-DNNh4N1T.js","assets/bundle-avatar-DfAWUEqX.js","assets/log-D33dFtt_.css","assets/index-C3-7zmeY.js","assets/ViewList-B6eveRY-.js","assets/did-address-D4v6iN2l.js","assets/permission-Bi46fqEy.js","assets/session-CJFbMNLl.js","assets/click-to-copy-DCUroWft.js","assets/format-error-BrmqJs5a.js","assets/useAsync-L7_fHBH5.js","assets/useAsync-BxB2TpDl.js","assets/index-VvWvVQT8.js","assets/DeleteOutline-PGhagisl.js","assets/confirm-92J4n1RP.js","assets/util-DLK92HF8.js","assets/base32-iVyUiizz.js","assets/sdk-DNr-nKBq.js","assets/actions-BAjt7G_t.js","assets/MoreHoriz-CGWVyYh4.js","assets/shorten-label-BuH-7PI8.js","assets/PlayArrow-CxWt6459.js","assets/get-safe-url-CWgEUVPT.js","assets/index-BJYrBMyS.js","assets/useAsyncRetry-CEouAsle.js","assets/InfoOutlined-DF9JwavD.js","assets/useSetState-CWq0AVWn.js","assets/use-mobile-C98e2dYy.js","assets/index-BxTrfRkG.js","assets/ExpandLess-Blh1x-4z.js","assets/index-K5iSHoYm.js","assets/Error-C4dVUMw4.js","assets/empty-spinner-DlzuJxRt.js","assets/list-header-BLGbkNad.js","assets/QuestionMarkCircle-CPHZnM6u.js","assets/index-DVQCgvFb.js","assets/index-DjIOxw8x.js","assets/api-kwOW9mRz.js","assets/ChevronRight-DE7hYCb3.js","assets/vendor-mui-x-CPOc4sOK.js","assets/react-beautiful-dnd.esm-B68lWn23.js","assets/raf-schd.esm-B3j6BePR.js","assets/item-zVdGBfMR.js","assets/Launch-gOz_lwLg.js","assets/Done-BVaQae1-.js","assets/delete-confirm-AkwIQ5yF.js","assets/ArrowDropDown-a-C4j7Lx.js","assets/index-CCwUSMuP.js","assets/index-D4PP6P2d.css","assets/index-MqiIu4kd.js","assets/overview-DY9-9zrL.js","assets/keyboard-arrow-down-rounded-DadBVmpO.js","assets/status-DmyvEkKL.js","assets/omit-IjXSqbDA.js","assets/spaces-gLUqr6Uq.js","assets/domains-CMJbalsn.js","assets/domain-action-card-DN3KjFwP.js","assets/util-YnaMqM3B.js","assets/CheckCircle-CuYzdCtm.js","assets/index-3q6oLa2e.js","assets/Google-CAujGJ1A.js","assets/cloneDeep-DHAAvuEH.js","assets/EditIcon-Y1U-3M09.js","assets/LockIcon-D7BH0t_p.js","assets/appearance-BIOmTg1q.js","assets/iframe-DVBEjxC1.js","assets/audit-logs-SSAqJt40.js","assets/relative-time-BeR_4mfM.js","assets/index-DWuuU3ta.js","assets/list-BuXPrN1N.js","assets/traffic-LuIcK-L1.js","assets/LaunchOutlined-MbSPR9qn.js","assets/ChevronLeft-CnflXey6.js","assets/index-sv3a1ZUw.js","assets/config-navigation-CPd_4svD.js","assets/index-C1nvgBfF.js","assets/slicedToArray-C0MW3KIe.js","assets/simple-select-DHvjqsw4.js","assets/index-BVOsgGKh.js","assets/use-mobile-CqLLcWbr.js","assets/connect-to-bQVCrkhh.js","assets/config-space-BgWEAM0m.js","assets/index-9aeq_G-H.js","assets/switch-control-Br1YNOSB.js","assets/index-BGeUo-5w.js","assets/security-DmR541pi.js","assets/config-BHBxeyYh.js","assets/branding-BDuOcSfH.js","assets/logo-uploader-DbAVW3BS.js","assets/advanced-C8t1232G.js","assets/runtime-D6tESY33.js","assets/component-By64LaLD.js","assets/TuneOutlined-DcqnBMqE.js","assets/add-component-core-BXowXTJz.js","assets/launch-result-message-DOa3SWMR.js","assets/page-header-XbzfRkA7.js","assets/index-DQIxR9j5.js","assets/content-layout-CFHoSupA.js","assets/add-component-core-D-IRi6XF.css","assets/index-CwdXL2a0.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as Ve,u as yn,p as ao,h as Vt,f as vn,b as bn,e as lo,i as co,g as uo,m as fo,j as Us,D as po,E as ho,k as mo,H as go,_ as Y,R as xo}from"./vendor-arcblock-DPMnO1AO.js";import{E as P,j as o,a2 as Se,aa as ve,I as Jt,aj as yo,ad as _n,al as Gr,ak as vo,b3 as bo,a3 as He,b4 as _o,bv as wo,T as de,bt as jo,br as xt,bu as Bs,a4 as U,a5 as Mt,bE as So,t as De,$ as Yt,bF as Co,a6 as Ao,bh as Eo,ai as Qr,bG as wn,bH as To,am as Ro,ab as ko,ae as $t,M as ke,bs as Rr,bn as Oe,bI as jn,bJ as Sn,bK as Cn,A as Qe,b2 as An,bj as Io}from"./vendor-mui-core-x3zpe_j_.js";import{r as F,L as En,f as Tn,b as z,g as Rn,u as Do,l as Lo}from"./vendor-react-DEoibe3W.js";import{r as Ce,b1 as Po,a$ as Xt,b2 as Fo,B as Je,p as ie,a1 as zs,Y as ne,u as me,am as Oo,b3 as Vo,v as kn,o as Zr,q as Mo,d as $o,W as Jr,K as No,aU as Uo,a4 as In,aq as Dn,C as Nt,b4 as Bo,b5 as zo,_ as Hs,ak as Ho}from"./vendor-ux-did-connect-B1u6nvmg.js";import{z as at,f as ye,A as cr,B as qo,b as Wo,C as Yr,D as Ko,E as Ln,t as st,F as Pn,G as Go,n as lt,H as Qo,I as Zo,j as qs,g as Jo,h as Yo,l as Ws,k as Xo,m as ea,J as Dt,e as Et,K as ta,L as ra,M as sa,N as na,O as ur,c as Ks}from"./index-Th4BUzmb.js";import{aa as ia,y as er,ab as oa,z as Lt,I as Fn,x as On,ac as aa}from"./vendor-utils-C3FZIS9A.js";import{_ as Gs}from"./useLocalStorage-0mjZfnua.js";import{C as Qs}from"./confirm-92J4n1RP.js";import{d as la}from"./PlayArrow-CxWt6459.js";import{g as Zs}from"./get-safe-url-CWgEUVPT.js";import{f as Xr}from"./format-error-BrmqJs5a.js";import{i as ca,u as ua,M as da,c as yt,s as Ut,H as fa,p as Vn,B as pa}from"./index-BJYrBMyS.js";import{u as Mn}from"./session-CJFbMNLl.js";import{D as ha,_ as $n}from"./useAsyncRetry-CEouAsle.js";import{f as Ye,a as Nn,u as pe,v as ma}from"./vendor-hooks-DN4nZ7TU.js";import{d as ga}from"./InfoOutlined-DF9JwavD.js";import{_ as Un}from"./useSetState-CWq0AVWn.js";import{u as xa}from"./use-mobile-C98e2dYy.js";const Bn=F.createContext({});function es({children:e,type:r}){const[t,s]=F.useState([]),n=F.useRef([]),i=c=>{if(!n.current.includes(c)){const d=[...n.current,c];s(d),n.current=d}},a=c=>{if(n.current.includes(c)){const d=n.current.filter(f=>f!==c);s(d),n.current=d}},l=c=>{const d=t.filter(p=>c.find(g=>g===p));ia(d,t).forEach(p=>a(p))};return o.jsx(Bn.Provider,{value:{type:r,deletingBlocklets:t,addDeletingDid:i,removeDeletingDid:a,matchDeletingDid:l},children:e})}es.propTypes={type:P.string,children:P.node.isRequired};es.defaultProps={type:"blocklets"};function Fd(){return F.useContext(Bn)}var ts={},ya=Se;Object.defineProperty(ts,"__esModule",{value:!0});var zn=ts.default=void 0,va=ya(Ce()),ba=o;zn=ts.default=(0,va.default)((0,ba.jsx)("path",{d:"M6 6h12v12H6z"}),"Stop");var rs={},_a=Se;Object.defineProperty(rs,"__esModule",{value:!0});var Hn=rs.default=void 0,wa=_a(Ce()),ja=o;Hn=rs.default=(0,wa.default)((0,ja.jsx)("path",{d:"M12 5V1L7 6l5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6H4c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8"}),"Replay");var ss={},Sa=Se;Object.defineProperty(ss,"__esModule",{value:!0});var qn=ss.default=void 0,Ca=Sa(Ce()),Aa=o;qn=ss.default=(0,Ca.default)((0,Aa.jsx)("path",{d:"M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6m6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26"}),"Autorenew");var ns={},Ea=Se;Object.defineProperty(ns,"__esModule",{value:!0});var is=ns.default=void 0,Ta=Ea(Ce()),Ra=o;is=ns.default=(0,Ta.default)((0,Ra.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings");var os={},ka=Se;Object.defineProperty(os,"__esModule",{value:!0});var Wn=os.default=void 0,Ia=ka(Ce()),Da=o;Wn=os.default=(0,Ia.default)((0,Da.jsx)("path",{d:"M18 17H6v-2h12zm0-4H6v-2h12zm0-4H6V7h12zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2z"}),"Receipt");var as={},La=Se;Object.defineProperty(as,"__esModule",{value:!0});var Kn=as.default=void 0,Pa=La(Ce()),Fa=o;Kn=as.default=(0,Pa.default)((0,Fa.jsx)("path",{d:"M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3m-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3m0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5m8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5"}),"Group");var ls={},Oa=Se;Object.defineProperty(ls,"__esModule",{value:!0});var Gn=ls.default=void 0,Va=Oa(Ce()),Ma=o;Gn=ls.default=(0,Va.default)((0,Ma.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9"}),"NotInterested");var cs=function(e){return o.jsx("svg",{...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.32989 8.20744C11.2787 6.82349 13.6098 6.08 16 6.08C18.3902 6.08 20.7213 6.82349 22.6701 8.20744C24.6189 9.59139 26.089 11.5473 26.8766 13.804C27.6642 16.0607 27.7304 18.5066 27.0659 20.8026C26.4419 22.9587 25.2026 24.8823 23.5044 26.3404H8.49555C6.79735 24.8823 5.55809 22.9587 4.9341 20.8026C4.26961 18.5066 4.33575 16.0607 5.12337 13.804C5.91098 11.5473 7.38107 9.59139 9.32989 8.20744ZM16 3.52C13.0786 3.52 10.2295 4.42871 7.84764 6.1202C5.46575 7.81169 3.66898 10.2022 2.70634 12.9604C1.7437 15.7187 1.66286 18.708 2.47501 21.5143C3.28717 24.3205 4.95211 26.8046 7.23909 28.6224C7.46554 28.8024 7.74628 28.9004 8.03554 28.9004H23.9644C24.2537 28.9004 24.5344 28.8024 24.7609 28.6224C27.0479 26.8046 28.7128 24.3205 29.5249 21.5143C30.3371 18.708 30.2563 15.7187 29.2936 12.9604C28.331 10.2022 26.5342 7.81169 24.1523 6.1202C21.7704 4.42871 18.9214 3.52 16 3.52ZM21.8829 13.5921C22.3827 13.0923 22.3827 12.2818 21.8829 11.7819C21.383 11.2821 20.5725 11.2821 20.0727 11.7819L17.868 13.9866C17.3072 13.7012 16.6724 13.5404 16 13.5404C13.7221 13.5404 11.8755 15.3869 11.8755 17.6648C11.8755 19.9427 13.7221 21.7892 16 21.7892C18.2779 21.7892 20.1244 19.9427 20.1244 17.6648C20.1244 16.9924 19.9635 16.3576 19.6782 15.7968L21.8829 13.5921ZM14.4355 17.6648C14.4355 16.8008 15.136 16.1004 16 16.1004C16.864 16.1004 17.5644 16.8008 17.5644 17.6648C17.5644 18.5288 16.864 19.2292 16 19.2292C15.136 19.2292 14.4355 18.5288 14.4355 17.6648Z",fill:"currentColor"})})};cs.defaultProps={width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};cs.displayName="dashboard";var us={},$a=Se;Object.defineProperty(us,"__esModule",{value:!0});var Qn=us.default=void 0,Na=$a(Ce()),Ua=o;Qn=us.default=(0,Na.default)((0,Ua.jsx)("path",{d:"m18.25 7.6-5.5-3.18c-.46-.27-1.04-.27-1.5 0L5.75 7.6c-.46.27-.75.76-.75 1.3v6.35c0 .54.29 1.03.75 1.3l5.5 3.18c.46.27 1.04.27 1.5 0l5.5-3.18c.46-.27.75-.76.75-1.3V8.9c0-.54-.29-1.03-.75-1.3M7 14.96v-4.62l4 2.32v4.61zm5-4.03L8 8.61l4-2.31 4 2.31zm1 6.34v-4.61l4-2.32v4.62zM7 2H3.5C2.67 2 2 2.67 2 3.5V7h2V4h3zm10 0h3.5c.83 0 1.5.67 1.5 1.5V7h-2V4h-3zM7 22H3.5c-.83 0-1.5-.67-1.5-1.5V17h2v3h3zm10 0h3.5c.83 0 1.5-.67 1.5-1.5V17h-2v3h-3z"}),"ViewInAr");const tt={Start:la,Stop:zn,Restart:Hn,Reload:qn,Remove:Po,Config:is,Log:Wn,Group:Kn,Cancel:Gn,Dashboard:cs,Overview:Qn},Ba=(e,r)=>{if(!e)return"";const t=new URL(e),s=new URLSearchParams(t.searchParams),n=new URL(er(t.origin,r));return n.search=s.toString(),n.toString()},za="internal",Ha="external";function ds({blocklet:e,onStart:r,onComplete:t,variant:s,hasPermission:n,getComponentUrl:i,useBlockletUrlEvaluation:a,...l}){const c=at(),[d,f]=F.useState(null),[p,g]=F.useState(null),[j,E]=F.useState(!1),[T,M]=F.useState(null),{t:y}=F.useContext(Xt),[b]=Gs("skip-blocklet-setup",!1),{loading:I,recommendedUrl:B}=a(e),[_]=Gs("blocklet-type-filter",za),m=ye.isInProgress(e.status),[w,S]=F.useState(!1);F.useEffect(()=>{var Q,ae;if(!(e!=null&&e.controller))return;S(((ae=(Q=e==null?void 0:e.controller)==null?void 0:Q.status)==null?void 0:ae.value)===Ve.BLOCKLET_CONTROLLER_STATUS.suspended),(async()=>{var ge,be,Pe;try{const le=await c.api.getLauncherSession({input:{launcherSessionId:(ge=e==null?void 0:e.controller)==null?void 0:ge.launcherSessionId,launcherUrl:(be=e==null?void 0:e.controller)==null?void 0:be.launcherUrl}});if(le!=null&&le.error){console.error("get launcher session failed",le.error);return}S([ie.LAUNCH_SESSION_STATUS.overdue,ie.LAUNCH_SESSION_STATUS.canceled,ie.LAUNCH_SESSION_STATUS.terminated].includes((Pe=le==null?void 0:le.launcherSession)==null?void 0:Pe.status))}catch(le){console.error("call getLauncherSession error",le)}})()},[]);const{inService:R}=c,x=(O,Q,ae=!1)=>async()=>{const ge=async $e=>{var et;r({action:O,blocklet:e}),E(!0),g(O);let Ke=!1;try{if(O==="remove")await Q($e);else if(O==="start"){if(!ye.hasRunnableComponent(e)){ne.error(y("blocklet.noComponent"));return}if(!R&&!b&&!((et=e.settings)!=null&&et.initialized)&&e.mode!==Ve.BLOCKLET_MODES.DEVELOPMENT){if(!B||!zs(B)){ne.error(y("blocklet.gotoVisitError"));return}const xe=qo(c.info),ut=new URL(B);ut.searchParams.set("serverUrl",xe),window.open(Zs(ut.href,{allowDomains:null})),t({action:O,blocklet:e});return}const Re=e.children.filter(xe=>!ye.isInProgress(xe.status)&&xe.status!=="running").map(xe=>xe.meta.did),Ne={did:e.meta.did,componentDids:Re};await Q({input:Ne})}else if(["stop","restart","reload"].includes(O)){const Re=e.children.filter(xe=>xe.status==="running").map(xe=>xe.meta.did),Ne={did:e.meta.did,componentDids:Re};await Q({input:Ne})}else{const Re={did:e.meta.did};await Q({input:Re})}O==="remove"?Ke=!0:await Wo(1e3),O==="reload"&&ne.success(y("blocklet.reloadSuccess")),M(null),t({action:O,blocklet:e})}catch(Re){const Ne=`Blocklet ${O} failed: ${Xr(Re)}`;throw t({action:O,blocklet:e,error:new Error(Ne)}),new Error(Ne)}finally{Ke||E(!1)}},be=()=>{E(!1),M(null)},Pe=ye.getDisplayName(e,!0),le=e.mode===Ve.BLOCKLET_MODES.DEVELOPMENT?{description:()=>o.jsx(de,{component:"div",children:o.jsx(de,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")})}),params:{removeType:"complete"}}:{description:($e,Ke)=>o.jsxs(de,{component:"div",children:[o.jsx(de,{gutterBottom:!0,children:y("blocklet.action.removeApplicationDescription")}),o.jsxs(jo,{name:"removeType",value:$e.removeType,onChange:et=>Ke({...$e,removeType:et.target.value}),children:[o.jsx(xt,{value:"backup",control:o.jsx(Bs,{}),label:y("blocklet.action.removeApplicationAfterBackup")}),o.jsx(xt,{value:"complete",control:o.jsx(Bs,{}),label:y("blocklet.action.removeApplicationComplete")})]})]}),params:{removeType:"backup"}},At={stop:{title:`${y("common.stop")} ${Pe}`,description:y("blocklet.action.stopDescription"),confirm:y("blocklet.action.confirmStop"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be},restart:{title:`${y("common.restart")} ${Pe}`,description:y("blocklet.action.restartDescription"),confirm:y("blocklet.action.confirmRestart"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be},remove:{title:`${y("common.remove")} ${Pe}`,confirm:y("blocklet.action.confirmRemove"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be,...le},cancelDownload:{title:`${y("common.cancel")}`,description:y("blocklet.action.cancelDownloadDescription",{name:Pe}),confirm:y("common.confirm"),cancel:y("common.cancel"),onConfirm:ge,onCancel:be}};ae?M(At[O]):await ge()},D=!!d,V=O=>{try{O.stopPropagation(),O.preventDefault()}catch{}f(O.currentTarget)},$=O=>{try{O.stopPropagation(),O.preventDefault()}catch{}f(null)},H=async(O,Q)=>{try{Q.stopPropagation(),Q.preventDefault()}catch{}if(typeof O.handler=="function")try{E(!0),g(O.action),await O.handler()}catch(ae){console.error(`Blocklet ${O.name} failed: `,ae)}finally{E(!1),f(null)}else f(null)},W=!R&&ye.isDeletableBlocklet(e)?{action:"remove",icon:tt.Remove,name:y("common.remove"),handler:x("remove",async({removeType:O})=>{O==="backup"&&await c.api.backupBlocklet({input:{appDid:e.appDid,to:"disk"}}),await c.api.deleteBlocklet({input:{did:e.meta.did,keepData:!1}})},!0),disabled:m}:null,oe={action:"remove",icon:({sx:O,...Q})=>o.jsx(tt.Cancel,{sx:{...O,paddingRight:"2px",zoom:.95},...Q}),name:y("common.cancel"),handler:x("cancelDownload",c.api.cancelDownloadBlocklet,!0)},fe=ye.getAppMissingConfigs(e),We=()=>{var ge;const O=`/${e.mountPoint||"/"}`.replace(/\/+/g,"/"),Q=i==null?void 0:i({mountPoint:O,blocklet:e});if(!Q||!zs(Q)){ne.error(y("blocklet.gotoVisitError"));return}const ae=(ge=e==null?void 0:e.site)==null?void 0:ge.domainAliases;window.open(Zs(Ba(Q,".well-known/service/admin"),{allowDomains:ae==null?void 0:ae.map(be=>be.value)}))};let Te=[{action:"start",icon:tt.Start,inExternal:!0,name:y("common.start"),handler:x("start",c.api.startBlocklet),disabled:w||e.children.every(O=>O.status==="running")||cr(e.status)||I||m},{action:"stop",icon:tt.Stop,inExternal:!0,name:y("common.stop"),handler:x("stop",c.api.stopBlocklet,!0),disabled:!["running","starting"].includes(e.status)},{action:"restart",inExternal:!0,icon:tt.Restart,name:y("common.restart"),handler:x("restart",c.api.restartBlocklet,!0),disabled:w||e.status!=="running"},cr(e.status)?oe:W,{separator:!0},R?null:{action:"dashboard",icon:({style:O,...Q})=>o.jsx(tt.Dashboard,{...Q,style:{...O,width:"26px",height:"26px",paddingRight:"3px"}}),name:y("sidebar.dashboard"),handler:We}].filter(Boolean);return _===Ha&&(Te=Te.filter(O=>O.inExternal)),s==="menu"?o.jsxs(Js,{"data-cy":"blocklet-actions",children:[o.jsx(Jt,{"aria-label":"more","aria-controls":"actions-menu","aria-haspopup":"true","data-cy":"trigger-blocklet-actions","actions-blocklet-did":e.meta.did,onClick:V,size:"small",disabled:!n||!cr(e.status)&&j,children:o.jsx(Fo,{})}),o.jsxs(yo,{id:"actions-menu",anchorEl:d,keepMounted:!0,open:D,onClose:$,PaperProps:{},children:[fe.length>0&&o.jsxs(_n,{style:{maxWidth:"400px"},severity:"error",children:[y("blocklet.config.missingRequired"),o.jsx("br",{}),o.jsx(En,{to:`/blocklets/${e.meta.did}/components`,children:y("blocklet.config.gotoFix")})]}),Te.map((O,Q)=>O.separator?o.jsx(Gr,{},`separator-${Q}`):o.jsxs(vo,{dense:!0,onClick:ae=>H(O,ae),disabled:j||O.disabled,"data-cy":`${O.action}-blocklet`,children:[o.jsx(bo,{style:{minWidth:24},children:p===O.action&&j?o.jsx(He,{size:16,sx:{marginRight:1}}):o.jsx(O.icon,{fontSize:"small"})}),o.jsx(_o,{primary:O.name})]},O.name))]}),T&&o.jsx(Qs,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel})]}):o.jsxs(Js,{"data-cy":"blocklet-actions",...l,children:[o.jsx(wo,{children:Te.filter(O=>!O.separator&&!O.onlyInMenu).map(O=>o.jsxs(Je,{title:O.name,"data-cy":`${O.action}-blocklet`,onClick:()=>H(O),disabled:!!O.disabled||j,children:[p===O.action&&j?o.jsx(He,{size:16,sx:{marginRight:1}}):o.jsx(O.icon,{}),o.jsx("span",{className:"blocklet-action-text",children:O.name})]},O.name))}),T&&o.jsx(Qs,{title:T.title,description:T.description,confirm:T.confirm,cancel:T.cancel,params:T.params,onConfirm:T.onConfirm,onCancel:T.onCancel})]})}ds.propTypes={getComponentUrl:P.func,blocklet:P.object.isRequired,onStart:P.func.isRequired,onComplete:P.func.isRequired,variant:P.oneOf(["menu","group"]),hasPermission:P.bool,useBlockletUrlEvaluation:P.func};ds.defaultProps={getComponentUrl:null,variant:"menu",hasPermission:!1,useBlockletUrlEvaluation:()=>{var e;return{loading:!1,recommendedUrl:(e=window==null?void 0:window.location)==null?void 0:e.href}}};const Js=ve.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
5
5
|
|
|
@@ -72,7 +72,7 @@ import{c as Ve,u as yn,p as ao,h as Vt,f as vn,b as bn,e as lo,i as co,g as uo,m
|
|
|
72
72
|
&:last-child {
|
|
73
73
|
margin-bottom: 0;
|
|
74
74
|
}
|
|
75
|
-
`;vs.propTypes={data:P.object.isRequired,feedType:P.string};vs.defaultProps={feedType:"data-tracker"};const al=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},
|
|
75
|
+
`;vs.propTypes={data:P.object.isRequired,feedType:P.string};vs.defaultProps={feedType:"data-tracker"};const al=Uo(),ll=e=>{let r="rgba(0, 0, 0, 0.12)";return e==="warning"?r="#DE9E37":e==="error"?r="#F16E6E":r="rgba(0, 0, 0, 0.12)",r},cl=e=>e.every(r=>r.type==="text"),ul=e=>e.every(r=>r.type==="image"),dl=e=>oa(e,2).map(r=>({type:"combined",items:r})).filter(r=>(r.items||[]).every(t=>{var s,n,i;return(i=(n=(s=t==null?void 0:t.data)==null?void 0:s.text)==null?void 0:n.trim)==null?void 0:i.call(n)})),fl=e=>{if(!e.length||e.length<=1)return!1;const r=e[0].type;return e.every(t=>t.type===r)},pl=async(e,r)=>{const t=al.user;if(t)try{return await t.getUserPublicInfo({did:e})?await t.getProfileUrl({did:e,locale:r}):void 0}catch(s){console.error(s);return}};function bs({notification:e,severity:r,showSke:t=!0}){const{attachments:s,data:n,...i}=e,a=De(f=>f.breakpoints.down("md"));if((!s||!s.length)&&Lt(n))return null;const l=ll(r),c=(f,p=!1)=>{if(!f&&!Array.isArray(f))return null;let g=f,j={},E="horizontal";p&&cl(f)&&(g=dl(f),E="vertical",j={display:"flex",gap:8,flexDirection:"row",justifyContent:"flex-start",flexWrap:"wrap",height:"100%",width:a||g.length===1?"100%":"28%"});const T=fl(g);return o.jsx(U,{sx:{width:"100%",display:"flex",gap:1,flexDirection:p?"row":"column",justifyContent:"flex-start",alignItems:p?"center":"unset",flexWrap:"wrap"},children:g.map((M,y)=>M.type==="section"?o.jsx(F.Fragment,{children:c(M.fields,!0)},y):o.jsxs(F.Fragment,{children:[o.jsx(ti,{attachment:M,style:j,...i}),!(a&&E==="vertical")&&T&&g.length>1&&y%3!==2?o.jsx(Gr,{orientation:E,style:{color:Zr.dividerColor},sx:E==="vertical"?{ml:2,mr:2,height:32}:{}}):null]},y))})},d=ul(s);return o.jsx(hl,{children:o.jsxs("div",{className:"message-in-list",children:[s.length>0&&o.jsx("div",{className:"message-container",style:a?{width:"100%"}:{},children:d?c(s):o.jsx(wn,{variant:"outlined",sx:{p:2,borderRadius:"8px",minWidth:128,borderColor:l},children:c(s)})}),!Lt(n)&&o.jsx("div",{className:"message-container",children:o.jsx("div",{className:"data-container",children:o.jsx(vs,{data:n,feedType:e.feedType})})}),s.length===0&&Lt(n)&&t&&o.jsx(ko,{className:"attach-ske",style:{marginTop:10},variant:"rectangular",height:150})]})})}const hl=ve.div`
|
|
76
76
|
display: flex;
|
|
77
77
|
flex-direction: column;
|
|
78
78
|
.message-in-list {
|
|
@@ -124,7 +124,7 @@ import{c as Ve,u as yn,p as ao,h as Vt,f as vn,b as bn,e as lo,i as co,g as uo,m
|
|
|
124
124
|
margin-right: 8px;
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
`;bs.propTypes={severity:P.string.isRequired,notification:P.object.isRequired,showSke:P.bool};bs.defaultProps={showSke:!0};const dr=e=>ao.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),
|
|
127
|
+
`;bs.propTypes={severity:P.string.isRequired,notification:P.object.isRequired,showSke:P.bool};bs.defaultProps={showSke:!0};const dr=e=>ao.sanitize(e,{ALLOWED_ATTR:["href","target","rel","class","id","style"]}),ml=async(e,r)=>{const{type:t,did:s}=e;return vn.isSameAddr(t,"did")?await pl(s,r)||Vt.getLink(e):Vt.getLink(e)},gl=async(e,r,t=!0)=>{const s=Vt.toTextList(e);return await Promise.all(s.map(async i=>{if(i instanceof Vt.Link){if(t){const a=await ml(i,r),{type:l,chainId:c,did:d}=i;return vn.isSameAddr(l,"dapp")?`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`:a?`<a target="_blank" rel="noopener noreferrer" style="color:#4598fa;font-weight:bold;" href="${a}">${i.text}</a>`:`<em style="font-weight:bold;" data-type="${l}" data-chain-id="${c}" data-did="${d}">${i.text}</em>`}return i.text}return i})).then(i=>i.join(""))};ni.propTypes={notification:P.object,rows:P.number,minimal:P.bool};function ni({notification:e,rows:r=2,minimal:t=!1}){const[s,n]=F.useState(!1),[i,a]=F.useState(""),{t:l,locale:c}=me(),d=F.useMemo(()=>{const{attachments:M}=e||{};if(!M)return!1;try{return M.length>0}catch{return!1}},[e]),f=F.useMemo(()=>{const{blocks:M}=e||{};if(!M)return!1;try{return M.length>0}catch{return!1}},[e]),p=F.useMemo(()=>{const{description:M}=e||{};return!!M},[e]),g=F.useMemo(()=>{const{data:M}=e||{};return!Lt(M)},[e]),j=F.useMemo(()=>d||f||p||g,[d,f,p,g]);if(F.useEffect(()=>{gl((e==null?void 0:e.description)??"",c).then(M=>{a(M)})},[e==null?void 0:e.description,c]),!j)return null;const E=()=>r===0?"":s?`<span class='toggle-btn' data-name='toggle-expanded'>${l("common.collapse")}</span>`:`...<span class='toggle-btn' data-name='toggle-expanded'>${l("common.expand")}</span>`,T=M=>{const{target:y}=M;y.getAttribute("data-name")==="toggle-expanded"&&(n(!s),M.customPreventRedirect=!0)};return o.jsxs(xl,{color:t?"#fff":"",children:[o.jsx(U,{className:"text-container",component:"div",onClick:T,children:i&&(!s&&r>0?o.jsx(fa,{basedOn:"letters",unsafeHTML:dr(i),maxLine:r,ellipsisHTML:dr(E())}):o.jsx(de,{component:"div",className:`content ${r===0?"ellipsis":""}`,style:{whiteSpace:"pre-line!important"},dangerouslySetInnerHTML:{__html:dr(`${i}${E()}`)}}))}),!t&&(d||g)?o.jsx(bs,{severity:e.severity,notification:e}):null]})}const xl=ve(U)`
|
|
128
128
|
width: 100%;
|
|
129
129
|
color: ${e=>e.color?e.color:"rgba(75, 85, 99, 1)"};
|
|
130
130
|
.text-container {
|
|
@@ -148,8 +148,8 @@ import{c as Ve,u as yn,p as ao,h as Vt,f as vn,b as bn,e as lo,i as co,g as uo,m
|
|
|
148
148
|
-webkit-line-clamp: 2;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
`,xl=F.memo(ni);var bt=e=>e.type==="checkbox",nt=e=>e instanceof Date,ue=e=>e==null;const ii=e=>typeof e=="object";var J=e=>!ue(e)&&!Array.isArray(e)&&ii(e)&&!nt(e),oi=e=>J(e)&&e.target?bt(e.target)?e.target.checked:e.target.value:e,yl=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ai=(e,r)=>e.has(yl(r)),vl=e=>{const r=e.constructor&&e.constructor.prototype;return J(r)&&r.hasOwnProperty("isPrototypeOf")},_s=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function X(e){let r;const t=Array.isArray(e);if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(_s&&(e instanceof Blob||e instanceof FileList))&&(t||J(e)))if(r=t?[]:{},!t&&!vl(e))r=e;else for(const s in e)e.hasOwnProperty(s)&&(r[s]=X(e[s]));else return e;return r}var _t=e=>Array.isArray(e)?e.filter(Boolean):[],G=e=>e===void 0,A=(e,r,t)=>{if(!r||!J(e))return t;const s=_t(r.split(/[,[\].]+?/)).reduce((n,i)=>ue(n)?n:n[i],e);return G(s)||s===e?G(e[r])?t:e[r]:s},_e=e=>typeof e=="boolean",ws=e=>/^\w*$/.test(e),li=e=>_t(e.replace(/["|']|\]/g,"").split(/\.|\[/)),K=(e,r,t)=>{let s=-1;const n=ws(r)?[r]:li(r),i=n.length,a=i-1;for(;++s<i;){const l=n[s];let c=t;if(s!==a){const d=e[l];c=J(d)||Array.isArray(d)?d:isNaN(+n[s+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const Bt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},je={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},bl=z.createContext(null),tr=()=>z.useContext(bl);var ci=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const i in e)Object.defineProperty(n,i,{get:()=>{const a=i;return r._proxyFormState[a]!==je.all&&(r._proxyFormState[a]=!s||je.all),t&&(t[a]=!0),e[a]}});return n},ce=e=>J(e)&&!Object.keys(e).length,ui=(e,r,t,s)=>{t(e);const{name:n,...i}=e;return ce(i)||Object.keys(i).length>=Object.keys(r).length||Object.keys(i).find(a=>r[a]===(!s||je.all))},he=e=>Array.isArray(e)?e:[e],di=(e,r,t)=>!e||!r||e===r||he(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s)));function rr(e){const r=z.useRef(e);r.current=e,z.useEffect(()=>{const t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function _l(e){const r=tr(),{control:t=r.control,disabled:s,name:n,exact:i}=e||{},[a,l]=z.useState(t._formState),c=z.useRef(!0),d=z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=z.useRef(n);return f.current=n,rr({disabled:s,next:p=>c.current&&di(f.current,p.name,i)&&ui(p,d.current,t._updateFormState)&&l({...t._formState,...p}),subject:t._subjects.state}),z.useEffect(()=>(c.current=!0,d.current.isValid&&t._updateValid(!0),()=>{c.current=!1}),[t]),ci(a,t,d.current,!1)}var Ie=e=>typeof e=="string",fi=(e,r,t,s,n)=>Ie(e)?(s&&r.watch.add(e),A(t,e,n)):Array.isArray(e)?e.map(i=>(s&&r.watch.add(i),A(t,i))):(s&&(r.watchAll=!0),t);function wl(e){const r=tr(),{control:t=r.control,name:s,defaultValue:n,disabled:i,exact:a}=e||{},l=z.useRef(s);l.current=s,rr({disabled:i,subject:t._subjects.values,next:f=>{di(l.current,f.name,a)&&d(X(fi(l.current,t._names,f.values||t._formValues,!1,n)))}});const[c,d]=z.useState(t._getWatch(s,n));return z.useEffect(()=>t._removeUnmounted()),c}function jl(e){const r=tr(),{name:t,disabled:s,control:n=r.control,shouldUnregister:i}=e,a=ai(n._names.array,t),l=wl({control:n,name:t,defaultValue:A(n._formValues,t,A(n._defaultValues,t,e.defaultValue)),exact:!0}),c=_l({control:n,name:t,exact:!0}),d=z.useRef(n.register(t,{...e.rules,value:l,..._e(e.disabled)?{disabled:e.disabled}:{}}));return z.useEffect(()=>{const f=n._options.shouldUnregister||i,p=(g,j)=>{const E=A(n._fields,g);E&&E._f&&(E._f.mount=j)};if(p(t,!0),f){const g=X(A(n._options.defaultValues,t));K(n._defaultValues,t,g),G(A(n._formValues,t))&&K(n._formValues,t,g)}return()=>{(a?f&&!n._state.action:f)?n.unregister(t):p(t,!1)}},[t,n,a,i]),z.useEffect(()=>{A(n._fields,t)&&n._updateDisabledField({disabled:s,fields:n._fields,name:t,value:A(n._fields,t)._f.value})},[s,t,n]),{field:{name:t,value:l,..._e(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:z.useCallback(f=>d.current.onChange({target:{value:oi(f),name:t},type:Bt.CHANGE}),[t]),onBlur:z.useCallback(()=>d.current.onBlur({target:{value:A(n._formValues,t),name:t},type:Bt.BLUR}),[t,n]),ref:z.useCallback(f=>{const p=A(n._fields,t);p&&f&&(p._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:g=>f.setCustomValidity(g),reportValidity:()=>f.reportValidity()})},[n._fields,t])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!A(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!A(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!A(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!A(c.validatingFields,t)},error:{enumerable:!0,get:()=>A(c.errors,t)}})}}const Ee=e=>e.render(jl(e));var Sl=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},Ue=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},fr=(e,r,t={})=>t.shouldFocus||G(t.shouldFocus)?t.focusName||`${e}.${G(t.focusIndex)?r:t.focusIndex}.`:"",pt=e=>({isOnSubmit:!e||e===je.onSubmit,isOnBlur:e===je.onBlur,isOnChange:e===je.onChange,isOnAll:e===je.all,isOnTouch:e===je.onTouched}),kr=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const it=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const i=A(e,n);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],n)&&!s)return!0;if(a.ref&&r(a.ref,a.name)&&!s)return!0;if(it(l,r))break}else if(J(l)&&it(l,r))break}}};var pi=(e,r,t)=>{const s=he(A(e,t));return K(s,"root",r[t]),K(e,t,s),e},js=e=>e.type==="file",Me=e=>typeof e=="function",zt=e=>{if(!_s)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Pt=e=>Ie(e),Ss=e=>e.type==="radio",Ht=e=>e instanceof RegExp;const Ys={value:!1,isValid:!1},Xs={value:!0,isValid:!0};var hi=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!G(e[0].attributes.value)?G(e[0].value)||e[0].value===""?Xs:{value:e[0].value,isValid:!0}:Xs:Ys}return Ys};const en={isValid:!1,value:null};var mi=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,en):en;function tn(e,r,t="validate"){if(Pt(e)||Array.isArray(e)&&e.every(Pt)||_e(e)&&!e)return{type:t,message:Pt(e)?e:"",ref:r}}var rt=e=>J(e)&&!Ht(e)?e:{value:e,message:""},Ir=async(e,r,t,s,n)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:f,max:p,pattern:g,validate:j,name:E,valueAsNumber:T,mount:M,disabled:y}=e._f,b=A(r,E);if(!M||y)return{};const I=a?a[0]:i,B=V=>{s&&I.reportValidity&&(I.setCustomValidity(_e(V)?"":V||""),I.reportValidity())},_={},m=Ss(i),w=bt(i),S=m||w,R=(T||js(i))&&G(i.value)&&G(b)||zt(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,x=Sl.bind(null,E,t,_),D=(V,$,H,W=Fe.maxLength,oe=Fe.minLength)=>{const fe=V?$:H;_[E]={type:V?W:oe,message:fe,ref:i,...x(V?W:oe,fe)}};if(n?!Array.isArray(b)||!b.length:l&&(!S&&(R||ue(b))||_e(b)&&!b||w&&!hi(a).isValid||m&&!mi(a).isValid)){const{value:V,message:$}=Pt(l)?{value:!!l,message:l}:rt(l);if(V&&(_[E]={type:Fe.required,message:$,ref:I,...x(Fe.required,$)},!t))return B($),_}if(!R&&(!ue(f)||!ue(p))){let V,$;const H=rt(p),W=rt(f);if(!ue(b)&&!isNaN(b)){const oe=i.valueAsNumber||b&&+b;ue(H.value)||(V=oe>H.value),ue(W.value)||($=oe<W.value)}else{const oe=i.valueAsDate||new Date(b),fe=O=>new Date(new Date().toDateString()+" "+O),We=i.type=="time",Te=i.type=="week";Ie(H.value)&&b&&(V=We?fe(b)>fe(H.value):Te?b>H.value:oe>new Date(H.value)),Ie(W.value)&&b&&($=We?fe(b)<fe(W.value):Te?b<W.value:oe<new Date(W.value))}if((V||$)&&(D(!!V,H.message,W.message,Fe.max,Fe.min),!t))return B(_[E].message),_}if((c||d)&&!R&&(Ie(b)||n&&Array.isArray(b))){const V=rt(c),$=rt(d),H=!ue(V.value)&&b.length>+V.value,W=!ue($.value)&&b.length<+$.value;if((H||W)&&(D(H,V.message,$.message),!t))return B(_[E].message),_}if(g&&!R&&Ie(b)){const{value:V,message:$}=rt(g);if(Ht(V)&&!b.match(V)&&(_[E]={type:Fe.pattern,message:$,ref:i,...x(Fe.pattern,$)},!t))return B($),_}if(j){if(Me(j)){const V=await j(b,r),$=tn(V,I);if($&&(_[E]={...$,...x(Fe.validate,$.message)},!t))return B($.message),_}else if(J(j)){let V={};for(const $ in j){if(!ce(V)&&!t)break;const H=tn(await j[$](b,r),I,$);H&&(V={...H,...x($,H.message)},B(H.message),t&&(_[E]=V))}if(!ce(V)&&(_[E]={ref:I,...V},!t))return _}}return B(!0),_},pr=(e,r)=>[...e,...he(r)],hr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function mr(e,r,t){return[...e.slice(0,r),...he(t),...e.slice(r)]}var gr=(e,r,t)=>Array.isArray(e)?(G(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],xr=(e,r)=>[...he(r),...he(e)];function Cl(e,r){let t=0;const s=[...e];for(const n of r)s.splice(n-t,1),t++;return _t(s).length?s:[]}var yr=(e,r)=>G(r)?[]:Cl(e,he(r).sort((t,s)=>t-s)),vr=(e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]};function Al(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=G(e)?s++:e[r[s++]];return e}function El(e){for(const r in e)if(e.hasOwnProperty(r)&&!G(e[r]))return!1;return!0}function Z(e,r){const t=Array.isArray(r)?r:ws(r)?[r]:li(r),s=t.length===1?e:Al(e,t),n=t.length-1,i=t[n];return s&&delete s[i],n!==0&&(J(s)&&ce(s)||Array.isArray(s)&&El(s))&&Z(e,t.slice(0,-1)),e}var rn=(e,r,t)=>(e[r]=t,e);function Fd(e){const r=tr(),{control:t=r.control,name:s,keyName:n="id",shouldUnregister:i}=e,[a,l]=z.useState(t._getFieldArray(s)),c=z.useRef(t._getFieldArray(s).map(Ue)),d=z.useRef(a),f=z.useRef(s),p=z.useRef(!1);f.current=s,d.current=a,t._names.array.add(s),e.rules&&t.register(s,e.rules),rr({next:({values:_,name:m})=>{if(m===f.current||!m){const w=A(_,f.current);Array.isArray(w)&&(l(w),c.current=w.map(Ue))}},subject:t._subjects.array});const g=z.useCallback(_=>{p.current=!0,t._updateFieldArray(s,_)},[t,s]),j=(_,m)=>{const w=he(X(_)),S=pr(t._getFieldArray(s),w);t._names.focus=fr(s,S.length-1,m),c.current=pr(c.current,w.map(Ue)),g(S),l(S),t._updateFieldArray(s,S,pr,{argA:hr(_)})},E=(_,m)=>{const w=he(X(_)),S=xr(t._getFieldArray(s),w);t._names.focus=fr(s,0,m),c.current=xr(c.current,w.map(Ue)),g(S),l(S),t._updateFieldArray(s,S,xr,{argA:hr(_)})},T=_=>{const m=yr(t._getFieldArray(s),_);c.current=yr(c.current,_),g(m),l(m),t._updateFieldArray(s,m,yr,{argA:_})},M=(_,m,w)=>{const S=he(X(m)),R=mr(t._getFieldArray(s),_,S);t._names.focus=fr(s,_,w),c.current=mr(c.current,_,S.map(Ue)),g(R),l(R),t._updateFieldArray(s,R,mr,{argA:_,argB:hr(m)})},y=(_,m)=>{const w=t._getFieldArray(s);vr(w,_,m),vr(c.current,_,m),g(w),l(w),t._updateFieldArray(s,w,vr,{argA:_,argB:m},!1)},b=(_,m)=>{const w=t._getFieldArray(s);gr(w,_,m),gr(c.current,_,m),g(w),l(w),t._updateFieldArray(s,w,gr,{argA:_,argB:m},!1)},I=(_,m)=>{const w=X(m),S=rn(t._getFieldArray(s),_,w);c.current=[...S].map((R,x)=>!R||x===_?Ue():c.current[x]),g(S),l([...S]),t._updateFieldArray(s,S,rn,{argA:_,argB:w},!0,!1)},B=_=>{const m=he(X(_));c.current=m.map(Ue),g([...m]),l([...m]),t._updateFieldArray(s,[...m],w=>w,{},!0,!1)};return z.useEffect(()=>{if(t._state.action=!1,kr(s,t._names)&&t._subjects.state.next({...t._formState}),p.current&&(!pt(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([s]).then(_=>{const m=A(_.errors,s),w=A(t._formState.errors,s);(w?!m&&w.type||m&&(w.type!==m.type||w.message!==m.message):m&&m.type)&&(m?K(t._formState.errors,s,m):Z(t._formState.errors,s),t._subjects.state.next({errors:t._formState.errors}))});else{const _=A(t._fields,s);_&&_._f&&!(pt(t._options.reValidateMode).isOnSubmit&&pt(t._options.mode).isOnSubmit)&&Ir(_,t._formValues,t._options.criteriaMode===je.all,t._options.shouldUseNativeValidation,!0).then(m=>!ce(m)&&t._subjects.state.next({errors:pi(t._formState.errors,m,s)}))}t._subjects.values.next({name:s,values:{...t._formValues}}),t._names.focus&&it(t._fields,(_,m)=>{if(t._names.focus&&m.startsWith(t._names.focus)&&_.focus)return _.focus(),1}),t._names.focus="",t._updateValid(),p.current=!1},[a,s,t]),z.useEffect(()=>(!A(t._formValues,s)&&t._updateFieldArray(s),()=>{(t._options.shouldUnregister||i)&&t.unregister(s)}),[s,t,n,i]),{swap:z.useCallback(y,[g,s,t]),move:z.useCallback(b,[g,s,t]),prepend:z.useCallback(E,[g,s,t]),append:z.useCallback(j,[g,s,t]),remove:z.useCallback(T,[g,s,t]),insert:z.useCallback(M,[g,s,t]),update:z.useCallback(I,[g,s,t]),replace:z.useCallback(B,[g,s,t]),fields:z.useMemo(()=>a.map((_,m)=>({..._,[n]:c.current[m]||Ue()})),[a,n])}}var br=()=>{let e=[];return{get observers(){return e},next:n=>{for(const i of e)i.next&&i.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(i=>i!==n)}}),unsubscribe:()=>{e=[]}}},qt=e=>ue(e)||!ii(e);function Be(e,r){if(qt(e)||qt(r))return e===r;if(nt(e)&&nt(r))return e.getTime()===r.getTime();const t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(const n of t){const i=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const a=r[n];if(nt(i)&&nt(a)||J(i)&&J(a)||Array.isArray(i)&&Array.isArray(a)?!Be(i,a):i!==a)return!1}}return!0}var gi=e=>e.type==="select-multiple",Tl=e=>Ss(e)||bt(e),_r=e=>zt(e)&&e.isConnected,xi=e=>{for(const r in e)if(Me(e[r]))return!0;return!1};function Wt(e,r={}){const t=Array.isArray(e);if(J(e)||t)for(const s in e)Array.isArray(e[s])||J(e[s])&&!xi(e[s])?(r[s]=Array.isArray(e[s])?[]:{},Wt(e[s],r[s])):ue(e[s])||(r[s]=!0);return r}function yi(e,r,t){const s=Array.isArray(e);if(J(e)||s)for(const n in e)Array.isArray(e[n])||J(e[n])&&!xi(e[n])?G(r)||qt(t[n])?t[n]=Array.isArray(e[n])?Wt(e[n],[]):{...Wt(e[n])}:yi(e[n],ue(r)?{}:r[n],t[n]):t[n]=!Be(e[n],r[n]);return t}var Rt=(e,r)=>yi(e,r,Wt(r)),vi=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>G(e)?e:r?e===""?NaN:e&&+e:t&&Ie(e)?new Date(e):s?s(e):e;function wr(e){const r=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):r.disabled))return js(r)?r.files:Ss(r)?mi(e.refs).value:gi(r)?[...r.selectedOptions].map(({value:t})=>t):bt(r)?hi(e.refs).value:vi(G(r.value)?e.ref.value:r.value,e)}var Rl=(e,r,t,s)=>{const n={};for(const i of e){const a=A(r,i);a&&K(n,i,a._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},dt=e=>G(e)?e:Ht(e)?e.source:J(e)?Ht(e.value)?e.value.source:e.value:e;const sn="AsyncFunction";var kl=e=>(!e||!e.validate)&&!!(Me(e.validate)&&e.validate.constructor.name===sn||J(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===sn)),Il=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function nn(e,r,t){const s=A(e,t);if(s||ws(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const i=n.join("."),a=A(r,i),l=A(e,i);if(a&&!Array.isArray(a)&&t!==i)return{name:t};if(l&&l.type)return{name:i,error:l};n.pop()}return{name:t}}var Dl=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Ll=(e,r)=>!_t(A(e,r)).length&&Z(e,r);const Pl={mode:je.onSubmit,reValidateMode:je.onChange,shouldFocusError:!0};function Fl(e={}){let r={...Pl,...e},t={submitCount:0,isDirty:!1,isLoading:Me(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=J(r.defaultValues)||J(r.values)?X(r.defaultValues||r.values)||{}:{},i=r.shouldUnregister?{}:X(n),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:br(),array:br(),state:br()},g=pt(r.mode),j=pt(r.reValidateMode),E=r.criteriaMode===je.all,T=u=>h=>{clearTimeout(d),d=setTimeout(u,h)},M=async u=>{if(f.isValid||u){const h=r.resolver?ce((await S()).errors):await x(s,!0);h!==t.isValid&&p.state.next({isValid:h})}},y=(u,h)=>{(f.isValidating||f.validatingFields)&&((u||Array.from(l.mount)).forEach(v=>{v&&(h?K(t.validatingFields,v,h):Z(t.validatingFields,v))}),p.state.next({validatingFields:t.validatingFields,isValidating:!ce(t.validatingFields)}))},b=(u,h=[],v,L,k=!0,C=!0)=>{if(L&&v){if(a.action=!0,C&&Array.isArray(A(s,u))){const N=v(A(s,u),L.argA,L.argB);k&&K(s,u,N)}if(C&&Array.isArray(A(t.errors,u))){const N=v(A(t.errors,u),L.argA,L.argB);k&&K(t.errors,u,N),Ll(t.errors,u)}if(f.touchedFields&&C&&Array.isArray(A(t.touchedFields,u))){const N=v(A(t.touchedFields,u),L.argA,L.argB);k&&K(t.touchedFields,u,N)}f.dirtyFields&&(t.dirtyFields=Rt(n,i)),p.state.next({name:u,isDirty:V(u,h),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(i,u,h)},I=(u,h)=>{K(t.errors,u,h),p.state.next({errors:t.errors})},B=u=>{t.errors=u,p.state.next({errors:t.errors,isValid:!1})},_=(u,h,v,L)=>{const k=A(s,u);if(k){const C=A(i,u,G(v)?A(n,u):v);G(C)||L&&L.defaultChecked||h?K(i,u,h?C:wr(k._f)):W(u,C),a.mount&&M()}},m=(u,h,v,L,k)=>{let C=!1,N=!1;const q={name:u},ee=!!(A(s,u)&&A(s,u)._f&&A(s,u)._f.disabled);if(!v||L){f.isDirty&&(N=t.isDirty,t.isDirty=q.isDirty=V(),C=N!==q.isDirty);const te=ee||Be(A(n,u),h);N=!!(!ee&&A(t.dirtyFields,u)),te||ee?Z(t.dirtyFields,u):K(t.dirtyFields,u,!0),q.dirtyFields=t.dirtyFields,C=C||f.dirtyFields&&N!==!te}if(v){const te=A(t.touchedFields,u);te||(K(t.touchedFields,u,v),q.touchedFields=t.touchedFields,C=C||f.touchedFields&&te!==v)}return C&&k&&p.state.next(q),C?q:{}},w=(u,h,v,L)=>{const k=A(t.errors,u),C=f.isValid&&_e(h)&&t.isValid!==h;if(e.delayError&&v?(c=T(()=>I(u,v)),c(e.delayError)):(clearTimeout(d),c=null,v?K(t.errors,u,v):Z(t.errors,u)),(v?!Be(k,v):k)||!ce(L)||C){const N={...L,...C&&_e(h)?{isValid:h}:{},errors:t.errors,name:u};t={...t,...N},p.state.next(N)}},S=async u=>{y(u,!0);const h=await r.resolver(i,r.context,Rl(u||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return y(u),h},R=async u=>{const{errors:h}=await S(u);if(u)for(const v of u){const L=A(h,v);L?K(t.errors,v,L):Z(t.errors,v)}else t.errors=h;return h},x=async(u,h,v={valid:!0})=>{for(const L in u){const k=u[L];if(k){const{_f:C,...N}=k;if(C){const q=l.array.has(C.name),ee=k._f&&kl(k._f);ee&&f.validatingFields&&y([L],!0);const te=await Ir(k,i,E,r.shouldUseNativeValidation&&!h,q);if(ee&&f.validatingFields&&y([L]),te[C.name]&&(v.valid=!1,h))break;!h&&(A(te,C.name)?q?pi(t.errors,te,C.name):K(t.errors,C.name,te[C.name]):Z(t.errors,C.name))}!ce(N)&&await x(N,h,v)}}return v.valid},D=()=>{for(const u of l.unMount){const h=A(s,u);h&&(h._f.refs?h._f.refs.every(v=>!_r(v)):!_r(h._f.ref))&&le(u)}l.unMount=new Set},V=(u,h)=>(u&&h&&K(i,u,h),!Be(Q(),n)),$=(u,h,v)=>fi(u,l,{...a.mount?i:G(h)?n:Ie(u)?{[u]:h}:h},v,h),H=u=>_t(A(a.mount?i:n,u,e.shouldUnregister?A(n,u,[]):[])),W=(u,h,v={})=>{const L=A(s,u);let k=h;if(L){const C=L._f;C&&(!C.disabled&&K(i,u,vi(h,C)),k=zt(C.ref)&&ue(h)?"":h,gi(C.ref)?[...C.ref.options].forEach(N=>N.selected=k.includes(N.value)):C.refs?bt(C.ref)?C.refs.length>1?C.refs.forEach(N=>(!N.defaultChecked||!N.disabled)&&(N.checked=Array.isArray(k)?!!k.find(q=>q===N.value):k===N.value)):C.refs[0]&&(C.refs[0].checked=!!k):C.refs.forEach(N=>N.checked=N.value===k):js(C.ref)?C.ref.value="":(C.ref.value=k,C.ref.type||p.values.next({name:u,values:{...i}})))}(v.shouldDirty||v.shouldTouch)&&m(u,k,v.shouldTouch,v.shouldDirty,!0),v.shouldValidate&&O(u)},oe=(u,h,v)=>{for(const L in h){const k=h[L],C=`${u}.${L}`,N=A(s,C);(l.array.has(u)||!qt(k)||N&&!N._f)&&!nt(k)?oe(C,k,v):W(C,k,v)}},fe=(u,h,v={})=>{const L=A(s,u),k=l.array.has(u),C=X(h);K(i,u,C),k?(p.array.next({name:u,values:{...i}}),(f.isDirty||f.dirtyFields)&&v.shouldDirty&&p.state.next({name:u,dirtyFields:Rt(n,i),isDirty:V(u,C)})):L&&!L._f&&!ue(C)?oe(u,C,v):W(u,C,v),kr(u,l)&&p.state.next({...t}),p.values.next({name:a.mount?u:void 0,values:{...i}})},We=async u=>{a.mount=!0;const h=u.target;let v=h.name,L=!0;const k=A(s,v),C=()=>h.type?wr(k._f):oi(u),N=q=>{L=Number.isNaN(q)||Be(q,A(i,v,q))};if(k){let q,ee;const te=C(),Ge=u.type===Bt.BLUR||u.type===Bt.FOCUS_OUT,no=!Il(k._f)&&!r.resolver&&!A(t.errors,v)&&!k._f.deps||Dl(Ge,A(t.touchedFields,v),t.isSubmitted,j,g),ar=kr(v,l,Ge);K(i,v,te),Ge?(k._f.onBlur&&k._f.onBlur(u),c&&c(0)):k._f.onChange&&k._f.onChange(u);const lr=m(v,te,Ge,!1),io=!ce(lr)||ar;if(!Ge&&p.values.next({name:v,type:u.type,values:{...i}}),no)return f.isValid&&(e.mode==="onBlur"?Ge&&M():M()),io&&p.state.next({name:v,...ar?{}:lr});if(!Ge&&ar&&p.state.next({...t}),r.resolver){const{errors:$s}=await S([v]);if(N(te),L){const oo=nn(t.errors,s,v),Ns=nn($s,s,oo.name||v);q=Ns.error,v=Ns.name,ee=ce($s)}}else y([v],!0),q=(await Ir(k,i,E,r.shouldUseNativeValidation))[v],y([v]),N(te),L&&(q?ee=!1:f.isValid&&(ee=await x(s,!0)));L&&(k._f.deps&&O(k._f.deps),w(v,ee,q,lr))}},Te=(u,h)=>{if(A(t.errors,h)&&u.focus)return u.focus(),1},O=async(u,h={})=>{let v,L;const k=he(u);if(r.resolver){const C=await R(G(u)?u:k);v=ce(C),L=u?!k.some(N=>A(C,N)):v}else u?(L=(await Promise.all(k.map(async C=>{const N=A(s,C);return await x(N&&N._f?{[C]:N}:N)}))).every(Boolean),!(!L&&!t.isValid)&&M()):L=v=await x(s);return p.state.next({...!Ie(u)||f.isValid&&v!==t.isValid?{}:{name:u},...r.resolver||!u?{isValid:v}:{},errors:t.errors}),h.shouldFocus&&!L&&it(s,Te,u?k:l.mount),L},Q=u=>{const h={...a.mount?i:n};return G(u)?h:Ie(u)?A(h,u):u.map(v=>A(h,v))},ae=(u,h)=>({invalid:!!A((h||t).errors,u),isDirty:!!A((h||t).dirtyFields,u),error:A((h||t).errors,u),isValidating:!!A(t.validatingFields,u),isTouched:!!A((h||t).touchedFields,u)}),ge=u=>{u&&he(u).forEach(h=>Z(t.errors,h)),p.state.next({errors:u?t.errors:{}})},be=(u,h,v)=>{const L=(A(s,u,{_f:{}})._f||{}).ref,k=A(t.errors,u)||{},{ref:C,message:N,type:q,...ee}=k;K(t.errors,u,{...ee,...h,ref:L}),p.state.next({name:u,errors:t.errors,isValid:!1}),v&&v.shouldFocus&&L&&L.focus&&L.focus()},Pe=(u,h)=>Me(u)?p.values.subscribe({next:v=>u($(void 0,h),v)}):$(u,h,!0),le=(u,h={})=>{for(const v of u?he(u):l.mount)l.mount.delete(v),l.array.delete(v),h.keepValue||(Z(s,v),Z(i,v)),!h.keepError&&Z(t.errors,v),!h.keepDirty&&Z(t.dirtyFields,v),!h.keepTouched&&Z(t.touchedFields,v),!h.keepIsValidating&&Z(t.validatingFields,v),!r.shouldUnregister&&!h.keepDefaultValue&&Z(n,v);p.values.next({values:{...i}}),p.state.next({...t,...h.keepDirty?{isDirty:V()}:{}}),!h.keepIsValid&&M()},At=({disabled:u,name:h,field:v,fields:L,value:k})=>{if(_e(u)&&a.mount||u){const C=u?void 0:G(k)?wr(v?v._f:A(L,h)._f):k;K(i,h,C),m(h,C,!1,!1,!0)}},$e=(u,h={})=>{let v=A(s,u);const L=_e(h.disabled)||_e(e.disabled);return K(s,u,{...v||{},_f:{...v&&v._f?v._f:{ref:{name:u}},name:u,mount:!0,...h}}),l.mount.add(u),v?At({field:v,disabled:_e(h.disabled)?h.disabled:e.disabled,name:u,value:h.value}):_(u,!0,h.value),{...L?{disabled:h.disabled||e.disabled}:{},...r.progressive?{required:!!h.required,min:dt(h.min),max:dt(h.max),minLength:dt(h.minLength),maxLength:dt(h.maxLength),pattern:dt(h.pattern)}:{},name:u,onChange:We,onBlur:We,ref:k=>{if(k){$e(u,h),v=A(s,u);const C=G(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,N=Tl(C),q=v._f.refs||[];if(N?q.find(ee=>ee===C):C===v._f.ref)return;K(s,u,{_f:{...v._f,...N?{refs:[...q.filter(_r),C,...Array.isArray(A(n,u))?[{}]:[]],ref:{type:C.type,name:u}}:{ref:C}}}),_(u,!1,void 0,C)}else v=A(s,u,{}),v._f&&(v._f.mount=!1),(r.shouldUnregister||h.shouldUnregister)&&!(ai(l.array,u)&&a.action)&&l.unMount.add(u)}}},Ke=()=>r.shouldFocusError&&it(s,Te,l.mount),et=u=>{_e(u)&&(p.state.next({disabled:u}),it(s,(h,v)=>{const L=A(s,v);L&&(h.disabled=L._f.disabled||u,Array.isArray(L._f.refs)&&L._f.refs.forEach(k=>{k.disabled=L._f.disabled||u}))},0,!1))},Re=(u,h)=>async v=>{let L;v&&(v.preventDefault&&v.preventDefault(),v.persist&&v.persist());let k=X(i);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:C,values:N}=await S();t.errors=C,k=N}else await x(s);if(Z(t.errors,"root"),ce(t.errors)){p.state.next({errors:{}});try{await u(k,v)}catch(C){L=C}}else h&&await h({...t.errors},v),Ke(),setTimeout(Ke);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ce(t.errors)&&!L,submitCount:t.submitCount+1,errors:t.errors}),L)throw L},Ne=(u,h={})=>{A(s,u)&&(G(h.defaultValue)?fe(u,X(A(n,u))):(fe(u,h.defaultValue),K(n,u,X(h.defaultValue))),h.keepTouched||Z(t.touchedFields,u),h.keepDirty||(Z(t.dirtyFields,u),t.isDirty=h.defaultValue?V(u,X(A(n,u))):V()),h.keepError||(Z(t.errors,u),f.isValid&&M()),p.state.next({...t}))},xe=(u,h={})=>{const v=u?X(u):n,L=X(v),k=ce(u),C=k?n:L;if(h.keepDefaultValues||(n=v),!h.keepValues){if(h.keepDirtyValues)for(const N of l.mount)A(t.dirtyFields,N)?K(C,N,A(i,N)):fe(N,A(C,N));else{if(_s&&G(u))for(const N of l.mount){const q=A(s,N);if(q&&q._f){const ee=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(zt(ee)){const te=ee.closest("form");if(te){te.reset();break}}}}s={}}i=e.shouldUnregister?h.keepDefaultValues?X(n):{}:X(C),p.array.next({values:{...C}}),p.values.next({values:{...C}})}l={mount:h.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!f.isValid||!!h.keepIsValid||!!h.keepDirtyValues,a.watch=!!e.shouldUnregister,p.state.next({submitCount:h.keepSubmitCount?t.submitCount:0,isDirty:k?!1:h.keepDirty?t.isDirty:!!(h.keepDefaultValues&&!Be(u,n)),isSubmitted:h.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:k?{}:h.keepDirtyValues?h.keepDefaultValues&&i?Rt(n,i):t.dirtyFields:h.keepDefaultValues&&u?Rt(n,u):h.keepDirty?t.dirtyFields:{},touchedFields:h.keepTouched?t.touchedFields:{},errors:h.keepErrors?t.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ut=(u,h)=>xe(Me(u)?u(i):u,h);return{control:{register:$e,unregister:le,getFieldState:ae,handleSubmit:Re,setError:be,_executeSchema:S,_getWatch:$,_getDirty:V,_updateValid:M,_removeUnmounted:D,_updateFieldArray:b,_updateDisabledField:At,_getFieldArray:H,_reset:xe,_resetDefaultValues:()=>Me(r.defaultValues)&&r.defaultValues().then(u=>{ut(u,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:u=>{t={...t,...u}},_disableForm:et,_subjects:p,_proxyFormState:f,_setErrors:B,get _fields(){return s},get _formValues(){return i},get _state(){return a},set _state(u){a=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},set _formState(u){t=u},get _options(){return r},set _options(u){r={...r,...u}}},trigger:O,register:$e,handleSubmit:Re,watch:Pe,setValue:fe,getValues:Q,reset:ut,resetField:Ne,clearErrors:ge,unregister:le,setError:be,setFocus:(u,h={})=>{const v=A(s,u),L=v&&v._f;if(L){const k=L.refs?L.refs[0]:L.ref;k.focus&&(k.focus(),h.shouldSelect&&k.select())}},getFieldState:ae}}function bi(e={}){const r=z.useRef(),t=z.useRef(),[s,n]=z.useState({isDirty:!1,isValidating:!1,isLoading:Me(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Me(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...Fl(e),formState:s});const i=r.current.control;return i._options=e,rr({subject:i._subjects.state,next:a=>{ui(a,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),z.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),z.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==s.isDirty&&i._subjects.state.next({isDirty:a})}},[i,s.isDirty]),z.useEffect(()=>{e.values&&!Be(e.values,t.current)?(i._reset(e.values,i._options.resetOptions),t.current=e.values,n(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),z.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),z.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),z.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),r.current.formState=ci(s,i),r.current}var Dr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=M;var t=l(bn),s=l(lo),n=l(co),i=l(uo),a=l(fo);function l(y){return y&&y.__esModule?y:{default:y}}function c(y,b){return j(y)||g(y,b)||f(y,b)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
152
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(y,b){if(y){if(typeof y=="string")return p(y,b);var I={}.toString.call(y).slice(8,-1);return I==="Object"&&y.constructor&&(I=y.constructor.name),I==="Map"||I==="Set"?Array.from(y):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?p(y,b):void 0}}function p(y,b){(b==null||b>y.length)&&(b=y.length);for(var I=0,B=Array(b);I<b;I++)B[I]=y[I];return B}function g(y,b){var I=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(I!=null){var B,_,m,w,S=[],R=!0,x=!1;try{if(m=(I=I.call(y)).next,b!==0)for(;!(R=(B=m.call(I)).done)&&(S.push(B.value),S.length!==b);R=!0);}catch(D){x=!0,_=D}finally{try{if(!R&&I.return!=null&&(w=I.return(),Object(w)!==w))return}finally{if(x)throw _}}return S}}function j(y){if(Array.isArray(y))return y}var E={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},T=/^\[([^\]]+)\](?::([0-9]+))?$/;function M(y,b){if((0,t.default)(y),!y||/[\s<>]/.test(y)||y.indexOf("mailto:")===0||(b=(0,a.default)(b,E),b.validate_length&&y.length>b.max_allowed_length)||!b.allow_fragments&&y.includes("#")||!b.allow_query_components&&(y.includes("?")||y.includes("&")))return!1;var I,B,_,m,w,S,R,x;if(R=y.split("#"),y=R.shift(),R=y.split("?"),y=R.shift(),R=y.split("://"),R.length>1){if(I=R.shift().toLowerCase(),b.require_valid_protocol&&b.protocols.indexOf(I)===-1)return!1}else{if(b.require_protocol)return!1;if(y.slice(0,2)==="//"){if(!b.allow_protocol_relative_urls)return!1;R[0]=y.slice(2)}}if(y=R.join("://"),y==="")return!1;if(R=y.split("/"),y=R.shift(),y===""&&!b.require_host)return!0;if(R=y.split("@"),R.length>1){if(b.disallow_auth||R[0]===""||(B=R.shift(),B.indexOf(":")>=0&&B.split(":").length>2))return!1;var D=B.split(":"),V=c(D,2),$=V[0],H=V[1];if($===""&&H==="")return!1}m=R.join("@"),S=null,x=null;var W=m.match(T);if(W?(_="",x=W[1],S=W[2]||null):(R=m.split(":"),_=R.shift(),R.length&&(S=R.join(":"))),S!==null&&S.length>0){if(w=parseInt(S,10),!/^[0-9]+$/.test(S)||w<=0||w>65535)return!1}else if(b.require_port)return!1;return b.host_whitelist?(0,s.default)(_,b.host_whitelist):_===""&&!b.require_host?!0:!(!(0,i.default)(_)&&!(0,n.default)(_,b)&&(!x||!(0,i.default)(x,6))||(_=_||x,b.host_blacklist&&(0,s.default)(_,b.host_blacklist)))}e.exports=r.default,e.exports.default=r.default})(Dr,Dr.exports);var
|
|
151
|
+
`,yl=F.memo(ni);var bt=e=>e.type==="checkbox",nt=e=>e instanceof Date,ue=e=>e==null;const ii=e=>typeof e=="object";var J=e=>!ue(e)&&!Array.isArray(e)&&ii(e)&&!nt(e),oi=e=>J(e)&&e.target?bt(e.target)?e.target.checked:e.target.value:e,vl=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ai=(e,r)=>e.has(vl(r)),bl=e=>{const r=e.constructor&&e.constructor.prototype;return J(r)&&r.hasOwnProperty("isPrototypeOf")},_s=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function X(e){let r;const t=Array.isArray(e);if(e instanceof Date)r=new Date(e);else if(e instanceof Set)r=new Set(e);else if(!(_s&&(e instanceof Blob||e instanceof FileList))&&(t||J(e)))if(r=t?[]:{},!t&&!bl(e))r=e;else for(const s in e)e.hasOwnProperty(s)&&(r[s]=X(e[s]));else return e;return r}var _t=e=>Array.isArray(e)?e.filter(Boolean):[],G=e=>e===void 0,A=(e,r,t)=>{if(!r||!J(e))return t;const s=_t(r.split(/[,[\].]+?/)).reduce((n,i)=>ue(n)?n:n[i],e);return G(s)||s===e?G(e[r])?t:e[r]:s},_e=e=>typeof e=="boolean",ws=e=>/^\w*$/.test(e),li=e=>_t(e.replace(/["|']|\]/g,"").split(/\.|\[/)),K=(e,r,t)=>{let s=-1;const n=ws(r)?[r]:li(r),i=n.length,a=i-1;for(;++s<i;){const l=n[s];let c=t;if(s!==a){const d=e[l];c=J(d)||Array.isArray(d)?d:isNaN(+n[s+1])?{}:[]}if(l==="__proto__")return;e[l]=c,e=e[l]}return e};const Bt={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},je={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Fe={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},_l=z.createContext(null),tr=()=>z.useContext(_l);var ci=(e,r,t,s=!0)=>{const n={defaultValues:r._defaultValues};for(const i in e)Object.defineProperty(n,i,{get:()=>{const a=i;return r._proxyFormState[a]!==je.all&&(r._proxyFormState[a]=!s||je.all),t&&(t[a]=!0),e[a]}});return n},ce=e=>J(e)&&!Object.keys(e).length,ui=(e,r,t,s)=>{t(e);const{name:n,...i}=e;return ce(i)||Object.keys(i).length>=Object.keys(r).length||Object.keys(i).find(a=>r[a]===(!s||je.all))},he=e=>Array.isArray(e)?e:[e],di=(e,r,t)=>!e||!r||e===r||he(e).some(s=>s&&(t?s===r:s.startsWith(r)||r.startsWith(s)));function rr(e){const r=z.useRef(e);r.current=e,z.useEffect(()=>{const t=!e.disabled&&r.current.subject&&r.current.subject.subscribe({next:r.current.next});return()=>{t&&t.unsubscribe()}},[e.disabled])}function wl(e){const r=tr(),{control:t=r.control,disabled:s,name:n,exact:i}=e||{},[a,l]=z.useState(t._formState),c=z.useRef(!0),d=z.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=z.useRef(n);return f.current=n,rr({disabled:s,next:p=>c.current&&di(f.current,p.name,i)&&ui(p,d.current,t._updateFormState)&&l({...t._formState,...p}),subject:t._subjects.state}),z.useEffect(()=>(c.current=!0,d.current.isValid&&t._updateValid(!0),()=>{c.current=!1}),[t]),ci(a,t,d.current,!1)}var Ie=e=>typeof e=="string",fi=(e,r,t,s,n)=>Ie(e)?(s&&r.watch.add(e),A(t,e,n)):Array.isArray(e)?e.map(i=>(s&&r.watch.add(i),A(t,i))):(s&&(r.watchAll=!0),t);function jl(e){const r=tr(),{control:t=r.control,name:s,defaultValue:n,disabled:i,exact:a}=e||{},l=z.useRef(s);l.current=s,rr({disabled:i,subject:t._subjects.values,next:f=>{di(l.current,f.name,a)&&d(X(fi(l.current,t._names,f.values||t._formValues,!1,n)))}});const[c,d]=z.useState(t._getWatch(s,n));return z.useEffect(()=>t._removeUnmounted()),c}function Sl(e){const r=tr(),{name:t,disabled:s,control:n=r.control,shouldUnregister:i}=e,a=ai(n._names.array,t),l=jl({control:n,name:t,defaultValue:A(n._formValues,t,A(n._defaultValues,t,e.defaultValue)),exact:!0}),c=wl({control:n,name:t,exact:!0}),d=z.useRef(n.register(t,{...e.rules,value:l,..._e(e.disabled)?{disabled:e.disabled}:{}}));return z.useEffect(()=>{const f=n._options.shouldUnregister||i,p=(g,j)=>{const E=A(n._fields,g);E&&E._f&&(E._f.mount=j)};if(p(t,!0),f){const g=X(A(n._options.defaultValues,t));K(n._defaultValues,t,g),G(A(n._formValues,t))&&K(n._formValues,t,g)}return()=>{(a?f&&!n._state.action:f)?n.unregister(t):p(t,!1)}},[t,n,a,i]),z.useEffect(()=>{A(n._fields,t)&&n._updateDisabledField({disabled:s,fields:n._fields,name:t,value:A(n._fields,t)._f.value})},[s,t,n]),{field:{name:t,value:l,..._e(s)||c.disabled?{disabled:c.disabled||s}:{},onChange:z.useCallback(f=>d.current.onChange({target:{value:oi(f),name:t},type:Bt.CHANGE}),[t]),onBlur:z.useCallback(()=>d.current.onBlur({target:{value:A(n._formValues,t),name:t},type:Bt.BLUR}),[t,n]),ref:z.useCallback(f=>{const p=A(n._fields,t);p&&f&&(p._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:g=>f.setCustomValidity(g),reportValidity:()=>f.reportValidity()})},[n._fields,t])},formState:c,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!A(c.errors,t)},isDirty:{enumerable:!0,get:()=>!!A(c.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!A(c.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!A(c.validatingFields,t)},error:{enumerable:!0,get:()=>A(c.errors,t)}})}}const Ee=e=>e.render(Sl(e));var Cl=(e,r,t,s,n)=>r?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[s]:n||!0}}:{},Ue=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const t=(Math.random()*16+e)%16|0;return(r=="x"?t:t&3|8).toString(16)})},fr=(e,r,t={})=>t.shouldFocus||G(t.shouldFocus)?t.focusName||`${e}.${G(t.focusIndex)?r:t.focusIndex}.`:"",pt=e=>({isOnSubmit:!e||e===je.onSubmit,isOnBlur:e===je.onBlur,isOnChange:e===je.onChange,isOnAll:e===je.all,isOnTouch:e===je.onTouched}),kr=(e,r,t)=>!t&&(r.watchAll||r.watch.has(e)||[...r.watch].some(s=>e.startsWith(s)&&/^\.\w+/.test(e.slice(s.length))));const it=(e,r,t,s)=>{for(const n of t||Object.keys(e)){const i=A(e,n);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&r(a.refs[0],n)&&!s)return!0;if(a.ref&&r(a.ref,a.name)&&!s)return!0;if(it(l,r))break}else if(J(l)&&it(l,r))break}}};var pi=(e,r,t)=>{const s=he(A(e,t));return K(s,"root",r[t]),K(e,t,s),e},js=e=>e.type==="file",Me=e=>typeof e=="function",zt=e=>{if(!_s)return!1;const r=e?e.ownerDocument:0;return e instanceof(r&&r.defaultView?r.defaultView.HTMLElement:HTMLElement)},Pt=e=>Ie(e),Ss=e=>e.type==="radio",Ht=e=>e instanceof RegExp;const Ys={value:!1,isValid:!1},Xs={value:!0,isValid:!0};var hi=e=>{if(Array.isArray(e)){if(e.length>1){const r=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:r,isValid:!!r.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!G(e[0].attributes.value)?G(e[0].value)||e[0].value===""?Xs:{value:e[0].value,isValid:!0}:Xs:Ys}return Ys};const en={isValid:!1,value:null};var mi=e=>Array.isArray(e)?e.reduce((r,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:r,en):en;function tn(e,r,t="validate"){if(Pt(e)||Array.isArray(e)&&e.every(Pt)||_e(e)&&!e)return{type:t,message:Pt(e)?e:"",ref:r}}var rt=e=>J(e)&&!Ht(e)?e:{value:e,message:""},Ir=async(e,r,t,s,n)=>{const{ref:i,refs:a,required:l,maxLength:c,minLength:d,min:f,max:p,pattern:g,validate:j,name:E,valueAsNumber:T,mount:M,disabled:y}=e._f,b=A(r,E);if(!M||y)return{};const I=a?a[0]:i,B=V=>{s&&I.reportValidity&&(I.setCustomValidity(_e(V)?"":V||""),I.reportValidity())},_={},m=Ss(i),w=bt(i),S=m||w,R=(T||js(i))&&G(i.value)&&G(b)||zt(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,x=Cl.bind(null,E,t,_),D=(V,$,H,W=Fe.maxLength,oe=Fe.minLength)=>{const fe=V?$:H;_[E]={type:V?W:oe,message:fe,ref:i,...x(V?W:oe,fe)}};if(n?!Array.isArray(b)||!b.length:l&&(!S&&(R||ue(b))||_e(b)&&!b||w&&!hi(a).isValid||m&&!mi(a).isValid)){const{value:V,message:$}=Pt(l)?{value:!!l,message:l}:rt(l);if(V&&(_[E]={type:Fe.required,message:$,ref:I,...x(Fe.required,$)},!t))return B($),_}if(!R&&(!ue(f)||!ue(p))){let V,$;const H=rt(p),W=rt(f);if(!ue(b)&&!isNaN(b)){const oe=i.valueAsNumber||b&&+b;ue(H.value)||(V=oe>H.value),ue(W.value)||($=oe<W.value)}else{const oe=i.valueAsDate||new Date(b),fe=O=>new Date(new Date().toDateString()+" "+O),We=i.type=="time",Te=i.type=="week";Ie(H.value)&&b&&(V=We?fe(b)>fe(H.value):Te?b>H.value:oe>new Date(H.value)),Ie(W.value)&&b&&($=We?fe(b)<fe(W.value):Te?b<W.value:oe<new Date(W.value))}if((V||$)&&(D(!!V,H.message,W.message,Fe.max,Fe.min),!t))return B(_[E].message),_}if((c||d)&&!R&&(Ie(b)||n&&Array.isArray(b))){const V=rt(c),$=rt(d),H=!ue(V.value)&&b.length>+V.value,W=!ue($.value)&&b.length<+$.value;if((H||W)&&(D(H,V.message,$.message),!t))return B(_[E].message),_}if(g&&!R&&Ie(b)){const{value:V,message:$}=rt(g);if(Ht(V)&&!b.match(V)&&(_[E]={type:Fe.pattern,message:$,ref:i,...x(Fe.pattern,$)},!t))return B($),_}if(j){if(Me(j)){const V=await j(b,r),$=tn(V,I);if($&&(_[E]={...$,...x(Fe.validate,$.message)},!t))return B($.message),_}else if(J(j)){let V={};for(const $ in j){if(!ce(V)&&!t)break;const H=tn(await j[$](b,r),I,$);H&&(V={...H,...x($,H.message)},B(H.message),t&&(_[E]=V))}if(!ce(V)&&(_[E]={ref:I,...V},!t))return _}}return B(!0),_},pr=(e,r)=>[...e,...he(r)],hr=e=>Array.isArray(e)?e.map(()=>{}):void 0;function mr(e,r,t){return[...e.slice(0,r),...he(t),...e.slice(r)]}var gr=(e,r,t)=>Array.isArray(e)?(G(e[t])&&(e[t]=void 0),e.splice(t,0,e.splice(r,1)[0]),e):[],xr=(e,r)=>[...he(r),...he(e)];function Al(e,r){let t=0;const s=[...e];for(const n of r)s.splice(n-t,1),t++;return _t(s).length?s:[]}var yr=(e,r)=>G(r)?[]:Al(e,he(r).sort((t,s)=>t-s)),vr=(e,r,t)=>{[e[r],e[t]]=[e[t],e[r]]};function El(e,r){const t=r.slice(0,-1).length;let s=0;for(;s<t;)e=G(e)?s++:e[r[s++]];return e}function Tl(e){for(const r in e)if(e.hasOwnProperty(r)&&!G(e[r]))return!1;return!0}function Z(e,r){const t=Array.isArray(r)?r:ws(r)?[r]:li(r),s=t.length===1?e:El(e,t),n=t.length-1,i=t[n];return s&&delete s[i],n!==0&&(J(s)&&ce(s)||Array.isArray(s)&&Tl(s))&&Z(e,t.slice(0,-1)),e}var rn=(e,r,t)=>(e[r]=t,e);function Od(e){const r=tr(),{control:t=r.control,name:s,keyName:n="id",shouldUnregister:i}=e,[a,l]=z.useState(t._getFieldArray(s)),c=z.useRef(t._getFieldArray(s).map(Ue)),d=z.useRef(a),f=z.useRef(s),p=z.useRef(!1);f.current=s,d.current=a,t._names.array.add(s),e.rules&&t.register(s,e.rules),rr({next:({values:_,name:m})=>{if(m===f.current||!m){const w=A(_,f.current);Array.isArray(w)&&(l(w),c.current=w.map(Ue))}},subject:t._subjects.array});const g=z.useCallback(_=>{p.current=!0,t._updateFieldArray(s,_)},[t,s]),j=(_,m)=>{const w=he(X(_)),S=pr(t._getFieldArray(s),w);t._names.focus=fr(s,S.length-1,m),c.current=pr(c.current,w.map(Ue)),g(S),l(S),t._updateFieldArray(s,S,pr,{argA:hr(_)})},E=(_,m)=>{const w=he(X(_)),S=xr(t._getFieldArray(s),w);t._names.focus=fr(s,0,m),c.current=xr(c.current,w.map(Ue)),g(S),l(S),t._updateFieldArray(s,S,xr,{argA:hr(_)})},T=_=>{const m=yr(t._getFieldArray(s),_);c.current=yr(c.current,_),g(m),l(m),t._updateFieldArray(s,m,yr,{argA:_})},M=(_,m,w)=>{const S=he(X(m)),R=mr(t._getFieldArray(s),_,S);t._names.focus=fr(s,_,w),c.current=mr(c.current,_,S.map(Ue)),g(R),l(R),t._updateFieldArray(s,R,mr,{argA:_,argB:hr(m)})},y=(_,m)=>{const w=t._getFieldArray(s);vr(w,_,m),vr(c.current,_,m),g(w),l(w),t._updateFieldArray(s,w,vr,{argA:_,argB:m},!1)},b=(_,m)=>{const w=t._getFieldArray(s);gr(w,_,m),gr(c.current,_,m),g(w),l(w),t._updateFieldArray(s,w,gr,{argA:_,argB:m},!1)},I=(_,m)=>{const w=X(m),S=rn(t._getFieldArray(s),_,w);c.current=[...S].map((R,x)=>!R||x===_?Ue():c.current[x]),g(S),l([...S]),t._updateFieldArray(s,S,rn,{argA:_,argB:w},!0,!1)},B=_=>{const m=he(X(_));c.current=m.map(Ue),g([...m]),l([...m]),t._updateFieldArray(s,[...m],w=>w,{},!0,!1)};return z.useEffect(()=>{if(t._state.action=!1,kr(s,t._names)&&t._subjects.state.next({...t._formState}),p.current&&(!pt(t._options.mode).isOnSubmit||t._formState.isSubmitted))if(t._options.resolver)t._executeSchema([s]).then(_=>{const m=A(_.errors,s),w=A(t._formState.errors,s);(w?!m&&w.type||m&&(w.type!==m.type||w.message!==m.message):m&&m.type)&&(m?K(t._formState.errors,s,m):Z(t._formState.errors,s),t._subjects.state.next({errors:t._formState.errors}))});else{const _=A(t._fields,s);_&&_._f&&!(pt(t._options.reValidateMode).isOnSubmit&&pt(t._options.mode).isOnSubmit)&&Ir(_,t._formValues,t._options.criteriaMode===je.all,t._options.shouldUseNativeValidation,!0).then(m=>!ce(m)&&t._subjects.state.next({errors:pi(t._formState.errors,m,s)}))}t._subjects.values.next({name:s,values:{...t._formValues}}),t._names.focus&&it(t._fields,(_,m)=>{if(t._names.focus&&m.startsWith(t._names.focus)&&_.focus)return _.focus(),1}),t._names.focus="",t._updateValid(),p.current=!1},[a,s,t]),z.useEffect(()=>(!A(t._formValues,s)&&t._updateFieldArray(s),()=>{(t._options.shouldUnregister||i)&&t.unregister(s)}),[s,t,n,i]),{swap:z.useCallback(y,[g,s,t]),move:z.useCallback(b,[g,s,t]),prepend:z.useCallback(E,[g,s,t]),append:z.useCallback(j,[g,s,t]),remove:z.useCallback(T,[g,s,t]),insert:z.useCallback(M,[g,s,t]),update:z.useCallback(I,[g,s,t]),replace:z.useCallback(B,[g,s,t]),fields:z.useMemo(()=>a.map((_,m)=>({..._,[n]:c.current[m]||Ue()})),[a,n])}}var br=()=>{let e=[];return{get observers(){return e},next:n=>{for(const i of e)i.next&&i.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(i=>i!==n)}}),unsubscribe:()=>{e=[]}}},qt=e=>ue(e)||!ii(e);function Be(e,r){if(qt(e)||qt(r))return e===r;if(nt(e)&&nt(r))return e.getTime()===r.getTime();const t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(const n of t){const i=e[n];if(!s.includes(n))return!1;if(n!=="ref"){const a=r[n];if(nt(i)&&nt(a)||J(i)&&J(a)||Array.isArray(i)&&Array.isArray(a)?!Be(i,a):i!==a)return!1}}return!0}var gi=e=>e.type==="select-multiple",Rl=e=>Ss(e)||bt(e),_r=e=>zt(e)&&e.isConnected,xi=e=>{for(const r in e)if(Me(e[r]))return!0;return!1};function Wt(e,r={}){const t=Array.isArray(e);if(J(e)||t)for(const s in e)Array.isArray(e[s])||J(e[s])&&!xi(e[s])?(r[s]=Array.isArray(e[s])?[]:{},Wt(e[s],r[s])):ue(e[s])||(r[s]=!0);return r}function yi(e,r,t){const s=Array.isArray(e);if(J(e)||s)for(const n in e)Array.isArray(e[n])||J(e[n])&&!xi(e[n])?G(r)||qt(t[n])?t[n]=Array.isArray(e[n])?Wt(e[n],[]):{...Wt(e[n])}:yi(e[n],ue(r)?{}:r[n],t[n]):t[n]=!Be(e[n],r[n]);return t}var Rt=(e,r)=>yi(e,r,Wt(r)),vi=(e,{valueAsNumber:r,valueAsDate:t,setValueAs:s})=>G(e)?e:r?e===""?NaN:e&&+e:t&&Ie(e)?new Date(e):s?s(e):e;function wr(e){const r=e.ref;if(!(e.refs?e.refs.every(t=>t.disabled):r.disabled))return js(r)?r.files:Ss(r)?mi(e.refs).value:gi(r)?[...r.selectedOptions].map(({value:t})=>t):bt(r)?hi(e.refs).value:vi(G(r.value)?e.ref.value:r.value,e)}var kl=(e,r,t,s)=>{const n={};for(const i of e){const a=A(r,i);a&&K(n,i,a._f)}return{criteriaMode:t,names:[...e],fields:n,shouldUseNativeValidation:s}},dt=e=>G(e)?e:Ht(e)?e.source:J(e)?Ht(e.value)?e.value.source:e.value:e;const sn="AsyncFunction";var Il=e=>(!e||!e.validate)&&!!(Me(e.validate)&&e.validate.constructor.name===sn||J(e.validate)&&Object.values(e.validate).find(r=>r.constructor.name===sn)),Dl=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function nn(e,r,t){const s=A(e,t);if(s||ws(t))return{error:s,name:t};const n=t.split(".");for(;n.length;){const i=n.join("."),a=A(r,i),l=A(e,i);if(a&&!Array.isArray(a)&&t!==i)return{name:t};if(l&&l.type)return{name:i,error:l};n.pop()}return{name:t}}var Ll=(e,r,t,s,n)=>n.isOnAll?!1:!t&&n.isOnTouch?!(r||e):(t?s.isOnBlur:n.isOnBlur)?!e:(t?s.isOnChange:n.isOnChange)?e:!0,Pl=(e,r)=>!_t(A(e,r)).length&&Z(e,r);const Fl={mode:je.onSubmit,reValidateMode:je.onChange,shouldFocusError:!0};function Ol(e={}){let r={...Fl,...e},t={submitCount:0,isDirty:!1,isLoading:Me(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},s={},n=J(r.defaultValues)||J(r.values)?X(r.defaultValues||r.values)||{}:{},i=r.shouldUnregister?{}:X(n),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:br(),array:br(),state:br()},g=pt(r.mode),j=pt(r.reValidateMode),E=r.criteriaMode===je.all,T=u=>h=>{clearTimeout(d),d=setTimeout(u,h)},M=async u=>{if(f.isValid||u){const h=r.resolver?ce((await S()).errors):await x(s,!0);h!==t.isValid&&p.state.next({isValid:h})}},y=(u,h)=>{(f.isValidating||f.validatingFields)&&((u||Array.from(l.mount)).forEach(v=>{v&&(h?K(t.validatingFields,v,h):Z(t.validatingFields,v))}),p.state.next({validatingFields:t.validatingFields,isValidating:!ce(t.validatingFields)}))},b=(u,h=[],v,L,k=!0,C=!0)=>{if(L&&v){if(a.action=!0,C&&Array.isArray(A(s,u))){const N=v(A(s,u),L.argA,L.argB);k&&K(s,u,N)}if(C&&Array.isArray(A(t.errors,u))){const N=v(A(t.errors,u),L.argA,L.argB);k&&K(t.errors,u,N),Pl(t.errors,u)}if(f.touchedFields&&C&&Array.isArray(A(t.touchedFields,u))){const N=v(A(t.touchedFields,u),L.argA,L.argB);k&&K(t.touchedFields,u,N)}f.dirtyFields&&(t.dirtyFields=Rt(n,i)),p.state.next({name:u,isDirty:V(u,h),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else K(i,u,h)},I=(u,h)=>{K(t.errors,u,h),p.state.next({errors:t.errors})},B=u=>{t.errors=u,p.state.next({errors:t.errors,isValid:!1})},_=(u,h,v,L)=>{const k=A(s,u);if(k){const C=A(i,u,G(v)?A(n,u):v);G(C)||L&&L.defaultChecked||h?K(i,u,h?C:wr(k._f)):W(u,C),a.mount&&M()}},m=(u,h,v,L,k)=>{let C=!1,N=!1;const q={name:u},ee=!!(A(s,u)&&A(s,u)._f&&A(s,u)._f.disabled);if(!v||L){f.isDirty&&(N=t.isDirty,t.isDirty=q.isDirty=V(),C=N!==q.isDirty);const te=ee||Be(A(n,u),h);N=!!(!ee&&A(t.dirtyFields,u)),te||ee?Z(t.dirtyFields,u):K(t.dirtyFields,u,!0),q.dirtyFields=t.dirtyFields,C=C||f.dirtyFields&&N!==!te}if(v){const te=A(t.touchedFields,u);te||(K(t.touchedFields,u,v),q.touchedFields=t.touchedFields,C=C||f.touchedFields&&te!==v)}return C&&k&&p.state.next(q),C?q:{}},w=(u,h,v,L)=>{const k=A(t.errors,u),C=f.isValid&&_e(h)&&t.isValid!==h;if(e.delayError&&v?(c=T(()=>I(u,v)),c(e.delayError)):(clearTimeout(d),c=null,v?K(t.errors,u,v):Z(t.errors,u)),(v?!Be(k,v):k)||!ce(L)||C){const N={...L,...C&&_e(h)?{isValid:h}:{},errors:t.errors,name:u};t={...t,...N},p.state.next(N)}},S=async u=>{y(u,!0);const h=await r.resolver(i,r.context,kl(u||l.mount,s,r.criteriaMode,r.shouldUseNativeValidation));return y(u),h},R=async u=>{const{errors:h}=await S(u);if(u)for(const v of u){const L=A(h,v);L?K(t.errors,v,L):Z(t.errors,v)}else t.errors=h;return h},x=async(u,h,v={valid:!0})=>{for(const L in u){const k=u[L];if(k){const{_f:C,...N}=k;if(C){const q=l.array.has(C.name),ee=k._f&&Il(k._f);ee&&f.validatingFields&&y([L],!0);const te=await Ir(k,i,E,r.shouldUseNativeValidation&&!h,q);if(ee&&f.validatingFields&&y([L]),te[C.name]&&(v.valid=!1,h))break;!h&&(A(te,C.name)?q?pi(t.errors,te,C.name):K(t.errors,C.name,te[C.name]):Z(t.errors,C.name))}!ce(N)&&await x(N,h,v)}}return v.valid},D=()=>{for(const u of l.unMount){const h=A(s,u);h&&(h._f.refs?h._f.refs.every(v=>!_r(v)):!_r(h._f.ref))&&le(u)}l.unMount=new Set},V=(u,h)=>(u&&h&&K(i,u,h),!Be(Q(),n)),$=(u,h,v)=>fi(u,l,{...a.mount?i:G(h)?n:Ie(u)?{[u]:h}:h},v,h),H=u=>_t(A(a.mount?i:n,u,e.shouldUnregister?A(n,u,[]):[])),W=(u,h,v={})=>{const L=A(s,u);let k=h;if(L){const C=L._f;C&&(!C.disabled&&K(i,u,vi(h,C)),k=zt(C.ref)&&ue(h)?"":h,gi(C.ref)?[...C.ref.options].forEach(N=>N.selected=k.includes(N.value)):C.refs?bt(C.ref)?C.refs.length>1?C.refs.forEach(N=>(!N.defaultChecked||!N.disabled)&&(N.checked=Array.isArray(k)?!!k.find(q=>q===N.value):k===N.value)):C.refs[0]&&(C.refs[0].checked=!!k):C.refs.forEach(N=>N.checked=N.value===k):js(C.ref)?C.ref.value="":(C.ref.value=k,C.ref.type||p.values.next({name:u,values:{...i}})))}(v.shouldDirty||v.shouldTouch)&&m(u,k,v.shouldTouch,v.shouldDirty,!0),v.shouldValidate&&O(u)},oe=(u,h,v)=>{for(const L in h){const k=h[L],C=`${u}.${L}`,N=A(s,C);(l.array.has(u)||!qt(k)||N&&!N._f)&&!nt(k)?oe(C,k,v):W(C,k,v)}},fe=(u,h,v={})=>{const L=A(s,u),k=l.array.has(u),C=X(h);K(i,u,C),k?(p.array.next({name:u,values:{...i}}),(f.isDirty||f.dirtyFields)&&v.shouldDirty&&p.state.next({name:u,dirtyFields:Rt(n,i),isDirty:V(u,C)})):L&&!L._f&&!ue(C)?oe(u,C,v):W(u,C,v),kr(u,l)&&p.state.next({...t}),p.values.next({name:a.mount?u:void 0,values:{...i}})},We=async u=>{a.mount=!0;const h=u.target;let v=h.name,L=!0;const k=A(s,v),C=()=>h.type?wr(k._f):oi(u),N=q=>{L=Number.isNaN(q)||Be(q,A(i,v,q))};if(k){let q,ee;const te=C(),Ge=u.type===Bt.BLUR||u.type===Bt.FOCUS_OUT,no=!Dl(k._f)&&!r.resolver&&!A(t.errors,v)&&!k._f.deps||Ll(Ge,A(t.touchedFields,v),t.isSubmitted,j,g),ar=kr(v,l,Ge);K(i,v,te),Ge?(k._f.onBlur&&k._f.onBlur(u),c&&c(0)):k._f.onChange&&k._f.onChange(u);const lr=m(v,te,Ge,!1),io=!ce(lr)||ar;if(!Ge&&p.values.next({name:v,type:u.type,values:{...i}}),no)return f.isValid&&(e.mode==="onBlur"?Ge&&M():M()),io&&p.state.next({name:v,...ar?{}:lr});if(!Ge&&ar&&p.state.next({...t}),r.resolver){const{errors:$s}=await S([v]);if(N(te),L){const oo=nn(t.errors,s,v),Ns=nn($s,s,oo.name||v);q=Ns.error,v=Ns.name,ee=ce($s)}}else y([v],!0),q=(await Ir(k,i,E,r.shouldUseNativeValidation))[v],y([v]),N(te),L&&(q?ee=!1:f.isValid&&(ee=await x(s,!0)));L&&(k._f.deps&&O(k._f.deps),w(v,ee,q,lr))}},Te=(u,h)=>{if(A(t.errors,h)&&u.focus)return u.focus(),1},O=async(u,h={})=>{let v,L;const k=he(u);if(r.resolver){const C=await R(G(u)?u:k);v=ce(C),L=u?!k.some(N=>A(C,N)):v}else u?(L=(await Promise.all(k.map(async C=>{const N=A(s,C);return await x(N&&N._f?{[C]:N}:N)}))).every(Boolean),!(!L&&!t.isValid)&&M()):L=v=await x(s);return p.state.next({...!Ie(u)||f.isValid&&v!==t.isValid?{}:{name:u},...r.resolver||!u?{isValid:v}:{},errors:t.errors}),h.shouldFocus&&!L&&it(s,Te,u?k:l.mount),L},Q=u=>{const h={...a.mount?i:n};return G(u)?h:Ie(u)?A(h,u):u.map(v=>A(h,v))},ae=(u,h)=>({invalid:!!A((h||t).errors,u),isDirty:!!A((h||t).dirtyFields,u),error:A((h||t).errors,u),isValidating:!!A(t.validatingFields,u),isTouched:!!A((h||t).touchedFields,u)}),ge=u=>{u&&he(u).forEach(h=>Z(t.errors,h)),p.state.next({errors:u?t.errors:{}})},be=(u,h,v)=>{const L=(A(s,u,{_f:{}})._f||{}).ref,k=A(t.errors,u)||{},{ref:C,message:N,type:q,...ee}=k;K(t.errors,u,{...ee,...h,ref:L}),p.state.next({name:u,errors:t.errors,isValid:!1}),v&&v.shouldFocus&&L&&L.focus&&L.focus()},Pe=(u,h)=>Me(u)?p.values.subscribe({next:v=>u($(void 0,h),v)}):$(u,h,!0),le=(u,h={})=>{for(const v of u?he(u):l.mount)l.mount.delete(v),l.array.delete(v),h.keepValue||(Z(s,v),Z(i,v)),!h.keepError&&Z(t.errors,v),!h.keepDirty&&Z(t.dirtyFields,v),!h.keepTouched&&Z(t.touchedFields,v),!h.keepIsValidating&&Z(t.validatingFields,v),!r.shouldUnregister&&!h.keepDefaultValue&&Z(n,v);p.values.next({values:{...i}}),p.state.next({...t,...h.keepDirty?{isDirty:V()}:{}}),!h.keepIsValid&&M()},At=({disabled:u,name:h,field:v,fields:L,value:k})=>{if(_e(u)&&a.mount||u){const C=u?void 0:G(k)?wr(v?v._f:A(L,h)._f):k;K(i,h,C),m(h,C,!1,!1,!0)}},$e=(u,h={})=>{let v=A(s,u);const L=_e(h.disabled)||_e(e.disabled);return K(s,u,{...v||{},_f:{...v&&v._f?v._f:{ref:{name:u}},name:u,mount:!0,...h}}),l.mount.add(u),v?At({field:v,disabled:_e(h.disabled)?h.disabled:e.disabled,name:u,value:h.value}):_(u,!0,h.value),{...L?{disabled:h.disabled||e.disabled}:{},...r.progressive?{required:!!h.required,min:dt(h.min),max:dt(h.max),minLength:dt(h.minLength),maxLength:dt(h.maxLength),pattern:dt(h.pattern)}:{},name:u,onChange:We,onBlur:We,ref:k=>{if(k){$e(u,h),v=A(s,u);const C=G(k.value)&&k.querySelectorAll&&k.querySelectorAll("input,select,textarea")[0]||k,N=Rl(C),q=v._f.refs||[];if(N?q.find(ee=>ee===C):C===v._f.ref)return;K(s,u,{_f:{...v._f,...N?{refs:[...q.filter(_r),C,...Array.isArray(A(n,u))?[{}]:[]],ref:{type:C.type,name:u}}:{ref:C}}}),_(u,!1,void 0,C)}else v=A(s,u,{}),v._f&&(v._f.mount=!1),(r.shouldUnregister||h.shouldUnregister)&&!(ai(l.array,u)&&a.action)&&l.unMount.add(u)}}},Ke=()=>r.shouldFocusError&&it(s,Te,l.mount),et=u=>{_e(u)&&(p.state.next({disabled:u}),it(s,(h,v)=>{const L=A(s,v);L&&(h.disabled=L._f.disabled||u,Array.isArray(L._f.refs)&&L._f.refs.forEach(k=>{k.disabled=L._f.disabled||u}))},0,!1))},Re=(u,h)=>async v=>{let L;v&&(v.preventDefault&&v.preventDefault(),v.persist&&v.persist());let k=X(i);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:C,values:N}=await S();t.errors=C,k=N}else await x(s);if(Z(t.errors,"root"),ce(t.errors)){p.state.next({errors:{}});try{await u(k,v)}catch(C){L=C}}else h&&await h({...t.errors},v),Ke(),setTimeout(Ke);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ce(t.errors)&&!L,submitCount:t.submitCount+1,errors:t.errors}),L)throw L},Ne=(u,h={})=>{A(s,u)&&(G(h.defaultValue)?fe(u,X(A(n,u))):(fe(u,h.defaultValue),K(n,u,X(h.defaultValue))),h.keepTouched||Z(t.touchedFields,u),h.keepDirty||(Z(t.dirtyFields,u),t.isDirty=h.defaultValue?V(u,X(A(n,u))):V()),h.keepError||(Z(t.errors,u),f.isValid&&M()),p.state.next({...t}))},xe=(u,h={})=>{const v=u?X(u):n,L=X(v),k=ce(u),C=k?n:L;if(h.keepDefaultValues||(n=v),!h.keepValues){if(h.keepDirtyValues)for(const N of l.mount)A(t.dirtyFields,N)?K(C,N,A(i,N)):fe(N,A(C,N));else{if(_s&&G(u))for(const N of l.mount){const q=A(s,N);if(q&&q._f){const ee=Array.isArray(q._f.refs)?q._f.refs[0]:q._f.ref;if(zt(ee)){const te=ee.closest("form");if(te){te.reset();break}}}}s={}}i=e.shouldUnregister?h.keepDefaultValues?X(n):{}:X(C),p.array.next({values:{...C}}),p.values.next({values:{...C}})}l={mount:h.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!f.isValid||!!h.keepIsValid||!!h.keepDirtyValues,a.watch=!!e.shouldUnregister,p.state.next({submitCount:h.keepSubmitCount?t.submitCount:0,isDirty:k?!1:h.keepDirty?t.isDirty:!!(h.keepDefaultValues&&!Be(u,n)),isSubmitted:h.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:k?{}:h.keepDirtyValues?h.keepDefaultValues&&i?Rt(n,i):t.dirtyFields:h.keepDefaultValues&&u?Rt(n,u):h.keepDirty?t.dirtyFields:{},touchedFields:h.keepTouched?t.touchedFields:{},errors:h.keepErrors?t.errors:{},isSubmitSuccessful:h.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ut=(u,h)=>xe(Me(u)?u(i):u,h);return{control:{register:$e,unregister:le,getFieldState:ae,handleSubmit:Re,setError:be,_executeSchema:S,_getWatch:$,_getDirty:V,_updateValid:M,_removeUnmounted:D,_updateFieldArray:b,_updateDisabledField:At,_getFieldArray:H,_reset:xe,_resetDefaultValues:()=>Me(r.defaultValues)&&r.defaultValues().then(u=>{ut(u,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:u=>{t={...t,...u}},_disableForm:et,_subjects:p,_proxyFormState:f,_setErrors:B,get _fields(){return s},get _formValues(){return i},get _state(){return a},set _state(u){a=u},get _defaultValues(){return n},get _names(){return l},set _names(u){l=u},get _formState(){return t},set _formState(u){t=u},get _options(){return r},set _options(u){r={...r,...u}}},trigger:O,register:$e,handleSubmit:Re,watch:Pe,setValue:fe,getValues:Q,reset:ut,resetField:Ne,clearErrors:ge,unregister:le,setError:be,setFocus:(u,h={})=>{const v=A(s,u),L=v&&v._f;if(L){const k=L.refs?L.refs[0]:L.ref;k.focus&&(k.focus(),h.shouldSelect&&k.select())}},getFieldState:ae}}function bi(e={}){const r=z.useRef(),t=z.useRef(),[s,n]=z.useState({isDirty:!1,isValidating:!1,isLoading:Me(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Me(e.defaultValues)?void 0:e.defaultValues});r.current||(r.current={...Ol(e),formState:s});const i=r.current.control;return i._options=e,rr({subject:i._subjects.state,next:a=>{ui(a,i._proxyFormState,i._updateFormState,!0)&&n({...i._formState})}}),z.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),z.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==s.isDirty&&i._subjects.state.next({isDirty:a})}},[i,s.isDirty]),z.useEffect(()=>{e.values&&!Be(e.values,t.current)?(i._reset(e.values,i._options.resetOptions),t.current=e.values,n(a=>({...a}))):i._resetDefaultValues()},[e.values,i]),z.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),z.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),z.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),r.current.formState=ci(s,i),r.current}var Dr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=M;var t=l(bn),s=l(lo),n=l(co),i=l(uo),a=l(fo);function l(y){return y&&y.__esModule?y:{default:y}}function c(y,b){return j(y)||g(y,b)||f(y,b)||d()}function d(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
152
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(y,b){if(y){if(typeof y=="string")return p(y,b);var I={}.toString.call(y).slice(8,-1);return I==="Object"&&y.constructor&&(I=y.constructor.name),I==="Map"||I==="Set"?Array.from(y):I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I)?p(y,b):void 0}}function p(y,b){(b==null||b>y.length)&&(b=y.length);for(var I=0,B=Array(b);I<b;I++)B[I]=y[I];return B}function g(y,b){var I=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(I!=null){var B,_,m,w,S=[],R=!0,x=!1;try{if(m=(I=I.call(y)).next,b!==0)for(;!(R=(B=m.call(I)).done)&&(S.push(B.value),S.length!==b);R=!0);}catch(D){x=!0,_=D}finally{try{if(!R&&I.return!=null&&(w=I.return(),Object(w)!==w))return}finally{if(x)throw _}}return S}}function j(y){if(Array.isArray(y))return y}var E={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},T=/^\[([^\]]+)\](?::([0-9]+))?$/;function M(y,b){if((0,t.default)(y),!y||/[\s<>]/.test(y)||y.indexOf("mailto:")===0||(b=(0,a.default)(b,E),b.validate_length&&y.length>b.max_allowed_length)||!b.allow_fragments&&y.includes("#")||!b.allow_query_components&&(y.includes("?")||y.includes("&")))return!1;var I,B,_,m,w,S,R,x;if(R=y.split("#"),y=R.shift(),R=y.split("?"),y=R.shift(),R=y.split("://"),R.length>1){if(I=R.shift().toLowerCase(),b.require_valid_protocol&&b.protocols.indexOf(I)===-1)return!1}else{if(b.require_protocol)return!1;if(y.slice(0,2)==="//"){if(!b.allow_protocol_relative_urls)return!1;R[0]=y.slice(2)}}if(y=R.join("://"),y==="")return!1;if(R=y.split("/"),y=R.shift(),y===""&&!b.require_host)return!0;if(R=y.split("@"),R.length>1){if(b.disallow_auth||R[0]===""||(B=R.shift(),B.indexOf(":")>=0&&B.split(":").length>2))return!1;var D=B.split(":"),V=c(D,2),$=V[0],H=V[1];if($===""&&H==="")return!1}m=R.join("@"),S=null,x=null;var W=m.match(T);if(W?(_="",x=W[1],S=W[2]||null):(R=m.split(":"),_=R.shift(),R.length&&(S=R.join(":"))),S!==null&&S.length>0){if(w=parseInt(S,10),!/^[0-9]+$/.test(S)||w<=0||w>65535)return!1}else if(b.require_port)return!1;return b.host_whitelist?(0,s.default)(_,b.host_whitelist):_===""&&!b.require_host?!0:!(!(0,i.default)(_)&&!(0,n.default)(_,b)&&(!x||!(0,i.default)(x,6))||(_=_||x,b.host_blacklist&&(0,s.default)(_,b.host_blacklist)))}e.exports=r.default,e.exports.default=r.default})(Dr,Dr.exports);var Vl=Dr.exports;const _i=Rn(Vl);var Lr={exports:{}},Pr={exports:{}},Fr={exports:{}};(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=t;function t(s){return s==null}e.exports=r.default,e.exports.default=r.default})(Fr,Fr.exports);var Ml=Fr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=l;var t=n(bn),s=n(Ml);function n(c){return c&&c.__esModule?c:{default:c}}var i=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,a=/^[-+]?[0-9]+$/;function l(c,d){(0,t.default)(c),d=d||{};var f=d.allow_leading_zeroes===!1?i:a,p=!d.hasOwnProperty("min")||(0,s.default)(d.min)||c>=d.min,g=!d.hasOwnProperty("max")||(0,s.default)(d.max)||c<=d.max,j=!d.hasOwnProperty("lt")||(0,s.default)(d.lt)||c<d.lt,E=!d.hasOwnProperty("gt")||(0,s.default)(d.gt)||c>d.gt;return f.test(c)&&p&&g&&j&&E}e.exports=r.default,e.exports.default=r.default})(Pr,Pr.exports);var $l=Pr.exports;(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=n;var t=s($l);function s(i){return i&&i.__esModule?i:{default:i}}function n(i){return(0,t.default)(i,{allow_leading_zeroes:!1,min:0,max:65535})}e.exports=r.default,e.exports.default=r.default})(Lr,Lr.exports);var Nl=Lr.exports;const Ul=Rn(Nl);function we({title:e,desc:r,sectionLeftSx:t,sectionRightSx:s,children:n,...i}){return o.jsx(Bl,{...i,children:o.jsxs($t,{className:"section",direction:{sm:"column",md:"row"},gap:{xs:3,md:6},children:[o.jsxs(U,{className:"section-left",sx:t,children:[o.jsx(de,{className:"section-title",dangerouslySetInnerHTML:{__html:e}}),o.jsx(U,{className:"section-desc",sx:{color:"text.secondary"},dangerouslySetInnerHTML:{__html:r}})]}),o.jsx($t,{className:"section-content",direction:"column",sx:{width:"100%",...s},children:n})]})})}we.propTypes={title:P.string.isRequired,children:P.node.isRequired,desc:P.string,sectionLeftSx:P.object,sectionRightSx:P.object};we.defaultProps={desc:"",sectionLeftSx:{width:"384px"},sectionRightSx:{}};const Bl=ve(U)`
|
|
153
153
|
display: flex;
|
|
154
154
|
align-items: flex-start;
|
|
155
155
|
width: 100%;
|
|
@@ -189,7 +189,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
189
189
|
width: 100% !important;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
`,jr={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function
|
|
192
|
+
`,jr={enabled:!1,secure:!1,from:"",host:"",port:"",user:"",password:""};function zl(){var w,S,R;const{api:e}=at(),{blocklet:r}=Yr(),{t}=me(),{confirmApi:s,confirmHolder:n}=In(),i=(w=r==null?void 0:r.meta)==null?void 0:w.did,a=Object.assign({...jr},((R=(S=r==null?void 0:r.settings)==null?void 0:S.notification)==null?void 0:R.email)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:p}=bi({defaultValues:Fn(a,Object.keys(jr))}),g=Nn({testReceiver:"",testReceiverError:""}),j=f("enabled"),E=pe(async(x,D,V=!0)=>{var $,H;try{const{blocklet:W}=await e.configNotification({input:{did:i,notification:JSON.stringify({email:x})}}),oe=Object.assign({...jr},((H=($=W==null?void 0:W.settings)==null?void 0:$.notification)==null?void 0:H.email)||{});p(oe),V&&ne.success(t("oauth.saveSuccess"))}catch(W){if(V)ne.error(W.message||t("oauth.saveFailed"));else throw W}}),T=pe(async(x,D,V)=>{try{d.isDirty&&await E(x,D,!1),await e.sendEmail({input:{did:i,receiver:V,email:JSON.stringify({body:"Your SMTP configuration is correct!",title:"Test email",type:"notification"})}}),ne.success(t("notification.email.testSuccess"))}catch($){ne.error($.message||t("notification.email.testfailed"))}}),M=pe((x,D)=>{g.testReceiver="",g.testReceiverError="",s.open({title:t("notification.email.testSendEmail"),content:()=>o.jsx(U,{sx:{width:"300px"},children:o.jsx(ke,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.email.inputTestReceiver"),value:g.testReceiver,onChange:V=>{g.testReceiver=V.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(V){var H;const $=(H=g.testReceiver)==null?void 0:H.trim();if(!$){g.testReceiverError=t("notification.email.receiverRequired");return}if(!Us($)){g.testReceiverError=t("notification.email.receiverInvalid");return}g.testReceiverError="",await T(x,D,$),V()}})}),y=pe(x=>{const D=x==null?void 0:x.trim();return D?Us(D)?!0:t("notification.email.fromInvalid"):t("notification.email.fromRequired")}),b=pe(x=>{const D=x==null?void 0:x.trim();return D?_i(D,{require_host:!1,protocols:[]})?!0:t("notification.email.hostInvalid"):t("notification.email.hostRequired")}),I=pe(x=>x?Ul(x)?!0:t("notification.email.portInvalid"):t("notification.email.portRequired")),B=pe(x=>x!=null&&x.trim()?!0:t("notification.email.userRequired")),_=pe(x=>x!=null&&x.trim()?!0:t("notification.email.passwordRequired")),m=pe(()=>!0);return o.jsxs(U,{children:[o.jsxs(Hl,{component:"form",onSubmit:l(E),disabled:!0,sx:{".section-left":{width:"160px"}},children:[o.jsx(we,{title:t("notification.email.enable"),my:2.5,children:o.jsx(Ee,{name:"enabled",control:c,render:({field:x})=>o.jsx(xt,{control:o.jsx(Rr,{checked:x.value,...x})})})}),o.jsx(we,{title:t("notification.email.from"),children:o.jsx(Ee,{name:"from",control:c,rules:{validate:j?y:m},render:({field:x})=>{var D;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...x,size:"small",required:!0,label:t("notification.email.from"),error:!!d.errors[x.name],helperText:((D=d.errors[x.name])==null?void 0:D.message)||" ",disabled:!j})})}})}),o.jsx(we,{title:t("notification.email.host"),children:o.jsx(Ee,{name:"host",control:c,rules:{validate:j?b:m},render:({field:x})=>{var D;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...x,size:"small",required:!0,error:!!d.errors[x.name],label:t("notification.email.host"),helperText:((D=d.errors[x.name])==null?void 0:D.message)||" ",disabled:!j})})}})}),o.jsx(we,{title:t("notification.email.port"),children:o.jsx(Ee,{name:"port",control:c,rules:{validate:j?I:m},render:({field:x})=>{var D;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...x,size:"small",required:!0,type:"number",error:!!d.errors[x.name],label:t("notification.email.port"),helperText:((D=d.errors[x.name])==null?void 0:D.message)||" ",disabled:!j})})}})}),o.jsx(we,{title:t("notification.email.user"),children:o.jsx(Ee,{name:"user",control:c,rules:{validate:j?B:m},render:({field:x})=>{var D;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...x,size:"small",required:!0,error:!!d.errors[x.name],label:t("notification.email.user"),helperText:((D=d.errors[x.name])==null?void 0:D.message)||" ",disabled:!j})})}})}),o.jsx(we,{title:t("notification.email.password"),children:o.jsx(Ee,{name:"password",control:c,rules:{validate:j?_:m},render:({field:x})=>{var D;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...x,size:"small",required:!0,type:"password",error:!!d.errors[x.name],label:t("notification.email.password"),helperText:((D=d.errors[x.name])==null?void 0:D.message)||" ",disabled:!j})})}})}),o.jsx(we,{title:t("notification.email.secure"),children:o.jsx(Ee,{name:"secure",control:c,rules:{validate:m},render:({field:x})=>o.jsx(Oe,{fullWidth:!0,children:o.jsx(xt,{control:o.jsx(Rr,{checked:x.value,...x,disabled:!j})})})})}),o.jsxs(U,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[o.jsx(Je,{variant:"outlined",color:"warning",onClick:l(M),sx:{mr:2},disabled:!j,children:t("oauth.runTest")}),o.jsx(Je,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]})]}),n]})}const Hl=ve($t)``,Sr={enabled:!1,endpoint:"",did:void 0,pushPath:void 0};function ql(){var I,B,_;const{api:e}=at(),{blocklet:r}=Yr(),{t}=me(),{confirmApi:s,confirmHolder:n}=In(),i=(I=r==null?void 0:r.meta)==null?void 0:I.did,a=Object.assign({...Sr},((_=(B=r==null?void 0:r.settings)==null?void 0:B.notification)==null?void 0:_.pushKit)||{}),{handleSubmit:l,control:c,formState:d,watch:f,reset:p}=bi({defaultValues:Fn(a,Object.keys(Sr))}),g=Nn({testReceiver:"",testReceiverError:""}),j=f("enabled"),E=pe(async(m,w,S=!0)=>{var R,x;try{const{blocklet:D}=await e.configNotification({input:{did:i,notification:JSON.stringify({pushKit:m})}}),V=Object.assign({...Sr},((x=(R=D==null?void 0:D.settings)==null?void 0:R.notification)==null?void 0:x.pushKit)||{});p(V),S&&ne.success(t("oauth.saveSuccess"))}catch(D){if(S)ne.error(D.message||t("oauth.saveFailed"));else throw D}}),T=pe(async(m,w)=>{var S,R,x;try{d.isDirty&&await E(m,w,!1);const D=(S=((r==null?void 0:r.configs)||[]).find(H=>H.key==="BLOCKLET_APP_URL"))==null?void 0:S.value,V=On(er(D,"/.well-known/service/blocklet/logo"),{v:(R=r==null?void 0:r.meta)==null?void 0:R.version,t:new Date((r==null?void 0:r.updatedAt)||0).getTime()}),$={type:"passthrough",passthroughType:"messageStatus",data:{message:{title:"Test push-kit notification",body:"This is message from push-kit config test",sender:{did:r==null?void 0:r.appDid,fullName:(x=r==null?void 0:r.meta)==null?void 0:x.title,avatar:V}}}};await e.sendPush({input:{did:i,receiver:g.testReceiver,notification:JSON.stringify($)}}),ne.success(t("notification.pushKit.testSuccess"))}catch(D){ne.error(D.message||t("notification.pushKit.testfailed"))}}),M=pe((m,w)=>{g.testReceiverError="",s.open({title:t("notification.pushKit.testSend"),content:()=>o.jsx(U,{sx:{width:"450px",maxWidth:"100%"},children:o.jsx(ke,{sx:{mt:1},fullWidth:!0,name:"testReceiver",label:t("notification.pushKit.inputTestReceiver"),value:g.testReceiver,onChange:S=>{g.testReceiver=S.target.value},error:!!g.testReceiverError,helperText:g.testReceiverError||" "})}),confirmButtonText:t("common.confirm"),cancelButtonText:t("common.cancel"),async onConfirm(S){var x;if(!((x=g.testReceiver)==null?void 0:x.trim())){g.testReceiverError=t("notification.pushKit.receiverRequired");return}g.testReceiverError="",await T(m,w),S()}})}),y=pe(m=>{const w=m==null?void 0:m.trim();return w?_i(w)?!0:t("notification.pushKit.endpointInvalid"):t("notification.pushKit.endpointRequired")}),b=pe(()=>!0);return o.jsxs(U,{children:[o.jsxs(Wl,{component:"form",onSubmit:l(E),disabled:!0,sx:{".section-left":{width:"160px"}},children:[o.jsx(we,{title:t("notification.pushKit.enable"),my:2.5,children:o.jsx(Ee,{name:"enabled",control:c,render:({field:m})=>o.jsx(xt,{control:o.jsx(Rr,{checked:m.value,...m})})})}),o.jsx(we,{title:t("notification.pushKit.endpoint"),children:o.jsx(Ee,{name:"endpoint",control:c,rules:{validate:j?y:b},render:({field:m})=>{var w;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...m,size:"small",required:!0,label:t("notification.pushKit.endpoint"),error:!!d.errors[m.name],helperText:((w=d.errors[m.name])==null?void 0:w.message)||" ",disabled:!j})})}})}),o.jsxs(we,{title:t("notification.pushKit.customOptions"),children:[o.jsx(Ee,{name:"did",control:c,render:({field:m})=>{var w;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...m,size:"small",label:t("notification.pushKit.did"),error:!!d.errors[m.name],helperText:((w=d.errors[m.name])==null?void 0:w.message)||" ",disabled:!j})})}}),o.jsx(Ee,{name:"pushPath",control:c,render:({field:m})=>{var w;return o.jsx(Oe,{fullWidth:!0,children:o.jsx(ke,{...m,size:"small",label:t("notification.pushKit.pushPath"),error:!!d.errors[m.name],helperText:((w=d.errors[m.name])==null?void 0:w.message)||" ",disabled:!j})})}})]}),o.jsxs(U,{sx:{display:"flex",justifyContent:"flex-end",gap:2,mt:3},children:[o.jsx(Je,{variant:"outlined",color:"warning",onClick:l(M),disabled:!j,children:t("oauth.runTest")}),o.jsx(Je,{type:"submit",variant:"contained",disabled:!d.isDirty,children:t("oauth.save")})]})]}),n]})}const Wl=ve($t)``,on=[{label:o.jsx(U,{textAlign:"center",width:"100%",children:"Email"}),value:"email"},{label:o.jsx(U,{textAlign:"center",width:"100%",children:"Push Kit"}),value:"pushKit"}];function Kl(){const[e,r]=F.useState(on[0].value),{locale:t}=F.useContext(Xt),s=Ye(()=>({email:o.jsx(zl,{}),pushKit:o.jsx(ql,{})}),[t]),n=F.useMemo(()=>({padding:"10px 0"}),[]);return o.jsxs(U,{children:[o.jsx(Dn,{tabs:on,current:e,onChange:r}),o.jsx(U,{style:n,children:s[e]})]})}function se(e,r,t){return jn.call(r,"css")?o.jsx(Sn,Cn(e,r),t):o.jsx(e,r,t)}function Cr(e,r,t){return jn.call(r,"css")?o.jsxs(Sn,Cn(e,r),t):o.jsxs(e,r,t)}/**
|
|
193
193
|
* (c) Iconify
|
|
194
194
|
*
|
|
195
195
|
* For the full copyright and license information, please view the license.txt or license.gpl.txt
|
|
@@ -199,7 +199,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
199
199
|
*
|
|
200
200
|
* @license MIT
|
|
201
201
|
* @version 3.1.1
|
|
202
|
-
*/const wi=Object.freeze({left:0,top:0,width:16,height:16}),Kt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),wt=Object.freeze({...wi,...Kt}),Or=Object.freeze({...wt,body:"",hidden:!1});function Kl(e,r){const t={};!e.hFlip!=!r.hFlip&&(t.hFlip=!0),!e.vFlip!=!r.vFlip&&(t.vFlip=!0);const s=((e.rotate||0)+(r.rotate||0))%4;return s&&(t.rotate=s),t}function an(e,r){const t=Kl(e,r);for(const s in Or)s in Kt?s in e&&!(s in t)&&(t[s]=Kt[s]):s in r?t[s]=r[s]:s in e&&(t[s]=e[s]);return t}function Gl(e,r){const t=e.icons,s=e.aliases||Object.create(null),n=Object.create(null);function i(a){if(t[a])return n[a]=[];if(!(a in n)){n[a]=null;const l=s[a]&&s[a].parent,c=l&&i(l);c&&(n[a]=[l].concat(c))}return n[a]}return Object.keys(t).concat(Object.keys(s)).forEach(i),n}function Ql(e,r,t){const s=e.icons,n=e.aliases||Object.create(null);let i={};function a(l){i=an(s[l]||n[l],i)}return a(r),t.forEach(a),an(e,i)}function Zl(e,r){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(n=>{r(n,null),t.push(n)});const s=Gl(e);for(const n in s){const i=s[n];i&&(r(n,Ql(e,n,i)),t.push(n))}return t}const ht=/^[a-z0-9]+(-[a-z0-9]+)*$/,ct=(e,r,t,s="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const l=n.pop(),c=n.pop(),d={provider:n.length>0?n[0]:s,prefix:c,name:l};return r&&!Ft(d)?null:d}const i=n[0],a=i.split("-");if(a.length>1){const l={provider:s,prefix:a.shift(),name:a.join("-")};return r&&!Ft(l)?null:l}if(t&&s===""){const l={provider:s,prefix:"",name:i};return r&&!Ft(l,t)?null:l}return null},Ft=(e,r)=>e?!!((e.provider===""||e.provider.match(ht))&&(r&&e.prefix===""||e.prefix.match(ht))&&e.name.match(ht)):!1,Jl={provider:"",aliases:{},not_found:{},...wi};function Ar(e,r){for(const t in r)if(t in e&&typeof e[t]!=typeof r[t])return!1;return!0}function Yl(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ar(e,Jl))return null;const t=r.icons;for(const n in t){const i=t[n];if(!n.match(ht)||typeof i.body!="string"||!Ar(i,Or))return null}const s=r.aliases||Object.create(null);for(const n in s){const i=s[n],a=i.parent;if(!n.match(ht)||typeof a!="string"||!t[a]&&!s[a]||!Ar(i,Or))return null}return r}const Gt=Object.create(null);function Xl(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Le(e,r){const t=Gt[e]||(Gt[e]=Object.create(null));return t[r]||(t[r]=Xl(e,r))}function Cs(e,r){return Yl(r)?Zl(r,(t,s)=>{s?e.icons[t]=s:e.missing.add(t)}):[]}function ec(e,r,t){try{if(typeof t.body=="string")return e.icons[r]={...t},!0}catch{}return!1}function tc(e,r){let t=[];return(typeof e=="string"?[e]:Object.keys(Gt)).forEach(n=>{(typeof n=="string"&&typeof r=="string"?[r]:Object.keys(Gt[n]||{})).forEach(a=>{const l=Le(n,a);t=t.concat(Object.keys(l.icons).map(c=>(n!==""?"@"+n+":":"")+a+":"+c))})}),t}let As=!1;function rc(e){return As}function jt(e){const r=typeof e=="string"?ct(e,!0,As):e;if(r){const t=Le(r.provider,r.prefix),s=r.name;return t.icons[s]||(t.missing.has(s)?null:void 0)}}function sc(e,r){const t=ct(e,!0,As);if(!t)return!1;const s=Le(t.provider,t.prefix);return ec(s,t.name,r)}function ji(e,r){if(typeof e!="object")return!1;typeof r!="string"&&(r=e.provider||"");const t=e.prefix;if(!Ft({provider:r,prefix:t,name:"a"}))return!1;const s=Le(r,t);return!!Cs(s,e)}function nc(e){return!!jt(e)}function ic(e){const r=jt(e);return r?{...wt,...r}:null}const Si=Object.freeze({width:null,height:null}),Ci=Object.freeze({...Si,...Kt}),oc=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ac=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Vr(e,r,t){if(r===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*r*t)/t;if(typeof e!="string")return e;const s=e.split(oc);if(s===null||!s.length)return e;const n=[];let i=s.shift(),a=ac.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?n.push(i):n.push(Math.ceil(l*r*t)/t)}else n.push(i);if(i=s.shift(),i===void 0)return n.join("");a=!a}}const lc=e=>e==="unset"||e==="undefined"||e==="none";function sr(e,r){const t={...wt,...e},s={...Ci,...r},n={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,s].forEach(E=>{const T=[],M=E.hFlip,y=E.vFlip;let b=E.rotate;M?y?b+=2:(T.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),T.push("scale(-1 1)"),n.top=n.left=0):y&&(T.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),T.push("scale(1 -1)"),n.top=n.left=0);let I;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:I=n.height/2+n.top,T.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:T.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:I=n.width/2+n.left,T.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}b%2===1&&(n.left!==n.top&&(I=n.left,n.left=n.top,n.top=I),n.width!==n.height&&(I=n.width,n.width=n.height,n.height=I)),T.length&&(i='<g transform="'+T.join(" ")+'">'+i+"</g>")});const a=s.width,l=s.height,c=n.width,d=n.height;let f,p;a===null?(p=l===null?"1em":l==="auto"?d:l,f=Vr(p,c/d)):(f=a==="auto"?c:a,p=l===null?Vr(f,d/c):l==="auto"?d:l);const g={},j=(E,T)=>{lc(T)||(g[E]=T.toString())};return j("width",f),j("height",p),g.viewBox=n.left.toString()+" "+n.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:g,body:i}}const cc=/\sid="(\S+)"/g,uc="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let dc=0;function Ai(e,r=uc){const t=[];let s;for(;s=cc.exec(e);)t.push(s[1]);if(!t.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const a=typeof r=="function"?r(i):r+(dc++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const Ze={local:!0,session:!0},Ei={local:new Set,session:new Set};let Es=!1;function fc(e){Es=e}const ln="iconify2",vt="iconify",Ti=vt+"-count",cn=vt+"-version",Ri=36e5,pc=168;function Mr(e,r){try{return e.getItem(r)}catch{}}function Ts(e,r,t){try{return e.setItem(r,t),!0}catch{}}function un(e,r){try{e.removeItem(r)}catch{}}function $r(e,r){return Ts(e,Ti,r.toString())}function Nr(e){return parseInt(Mr(e,Ti))||0}let kt=typeof window>"u"?{}:window;function ki(e){const r=e+"Storage";try{if(kt&&kt[r]&&typeof kt[r].length=="number")return kt[r]}catch{}Ze[e]=!1}function Ii(e,r){const t=ki(e);if(!t)return;const s=Mr(t,cn);if(s!==ln){if(s){const l=Nr(t);for(let c=0;c<l;c++)un(t,vt+c.toString())}Ts(t,cn,ln),$r(t,0);return}const n=Math.floor(Date.now()/Ri)-pc,i=l=>{const c=vt+l.toString(),d=Mr(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>n&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&r(f,l))return!0}catch{}un(t,c)}};let a=Nr(t);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,$r(t,a)):Ei[e].add(l))}function Di(){if(!Es){fc(!0);for(const e in Ze)Ii(e,r=>{const t=r.data,s=r.provider,n=t.prefix,i=Le(s,n);if(!Cs(i,t).length)return!1;const a=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Li(e,r){switch(e){case"local":case"session":Ze[e]=r;break;case"all":for(const t in Ze)Ze[t]=r;break}}const Ur=Object.create(null);function Pi(e,r){Ur[e]=r}function Br(e){return Ur[e]||Ur[""]}function Rs(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const nr=Object.create(null),ft=["https://api.simplesvg.com","https://api.unisvg.com"],Ot=[];for(;ft.length>0;)ft.length===1||Math.random()>.5?Ot.push(ft.shift()):Ot.push(ft.pop());nr[""]=Rs({resources:["https://api.iconify.design"].concat(Ot)});function Fi(e,r){const t=Rs(r);return t===null?!1:(nr[e]=t,!0)}function ir(e){return nr[e]}function hc(){return Object.keys(nr)}const mc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Qt=mc();function gc(e){Qt=e}function xc(){return Qt}function yc(e,r){const t=ir(e);if(!t)return 0;let s;if(!t.maxURL)s=0;else{let n=0;t.resources.forEach(a=>{n=Math.max(n,a.length)});const i=r+".json?icons=";s=t.maxURL-n-t.path.length-i.length}return s}function vc(e){return e===404}const bc=(e,r,t)=>{const s=[],n=yc(e,r),i="icons";let a={type:i,provider:e,prefix:r,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=n&&d>0&&(s.push(a),a={type:i,provider:e,prefix:r,icons:[]},l=c.length),a.icons.push(c)}),s.push(a),s};function _c(e){if(typeof e=="string"){const r=ir(e);if(r)return r.path}return"/"}const wc=(e,r,t)=>{if(!Qt){t("abort",424);return}let s=_c(r.provider);switch(r.type){case"icons":{const i=r.prefix,l=r.icons.join(","),c=new URLSearchParams({icons:l});s+=i+".json?"+c.toString();break}case"custom":{const i=r.uri;s+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let n=503;Qt(e+s).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{t(vc(a)?"abort":"next",a)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?t("abort",i):t("next",n)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",n)})},jc={prepare:bc,send:wc};function Sc(e){const r={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let s={provider:"",prefix:"",name:""};return e.forEach(n=>{if(s.name===n.name&&s.prefix===n.prefix&&s.provider===n.provider)return;s=n;const i=n.provider,a=n.prefix,l=n.name,c=t[i]||(t[i]=Object.create(null)),d=c[a]||(c[a]=Le(i,a));let f;l in d.icons?f=r.loaded:a===""||d.missing.has(l)?f=r.missing:f=r.pending;const p={provider:i,prefix:a,name:l};f.push(p)}),r}function Oi(e,r){e.forEach(t=>{const s=t.loaderCallbacks;s&&(t.loaderCallbacks=s.filter(n=>n.id!==r))})}function Cc(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let t=!1;const s=e.provider,n=e.prefix;r.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==n)return!0;const d=c.name;if(e.icons[d])a.loaded.push({provider:s,prefix:n,name:d});else if(e.missing.has(d))a.missing.push({provider:s,prefix:n,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||Oi([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let Ac=0;function Ec(e,r,t){const s=Ac++,n=Oi.bind(null,t,s);if(!r.pending.length)return n;const i={id:s,icons:r,callback:e,abort:n};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),n}function Tc(e,r=!0,t=!1){const s=[];return e.forEach(n=>{const i=typeof n=="string"?ct(n,r,t):n;i&&s.push(i)}),s}var Rc={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function kc(e,r,t,s){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let a;if(e.random){let m=e.resources.slice(0);for(a=[];m.length>1;){const w=Math.floor(Math.random()*m.length);a.push(m[w]),m=m.slice(0,w).concat(m.slice(w+1))}a=a.concat(m)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",d=0,f,p=null,g=[],j=[];typeof s=="function"&&j.push(s);function E(){p&&(clearTimeout(p),p=null)}function T(){c==="pending"&&(c="aborted"),E(),g.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),g=[]}function M(m,w){w&&(j=[]),typeof m=="function"&&j.push(m)}function y(){return{startTime:l,payload:r,status:c,queriesSent:d,queriesPending:g.length,subscribe:M,abort:T}}function b(){c="failed",j.forEach(m=>{m(void 0,f)})}function I(){g.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),g=[]}function B(m,w,S){const R=w!=="success";switch(g=g.filter(x=>x!==m),c){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(w==="abort"){f=S,b();return}if(R){f=S,g.length||(a.length?_():b());return}if(E(),I(),!e.random){const x=e.resources.indexOf(m.resource);x!==-1&&x!==e.index&&(e.index=x)}c="completed",j.forEach(x=>{x(S)})}function _(){if(c!=="pending")return;E();const m=a.shift();if(m===void 0){if(g.length){p=setTimeout(()=>{E(),c==="pending"&&(I(),b())},e.timeout);return}b();return}const w={status:"pending",resource:m,callback:(S,R)=>{B(w,S,R)}};g.push(w),d++,p=setTimeout(_,e.rotate),t(m,r,w.callback)}return setTimeout(_),y}function Vi(e){const r={...Rc,...e};let t=[];function s(){t=t.filter(l=>l().status==="pending")}function n(l,c,d){const f=kc(r,l,c,(p,g)=>{s(),d&&d(p,g)});return t.push(f),f}function i(l){return t.find(c=>l(c))||null}return{query:n,find:i,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:s}}function dn(){}const Er=Object.create(null);function Ic(e){if(!Er[e]){const r=ir(e);if(!r)return;const t=Vi(r),s={config:r,redundancy:t};Er[e]=s}return Er[e]}function Mi(e,r,t){let s,n;if(typeof e=="string"){const i=Br(e);if(!i)return t(void 0,424),dn;n=i.send;const a=Ic(e);a&&(s=a.redundancy)}else{const i=Rs(e);if(i){s=Vi(i);const a=e.resources?e.resources[0]:"",l=Br(a);l&&(n=l.send)}}return!s||!n?(t(void 0,424),dn):s.query(r,n,t)().abort}function Dc(e,r){const t=e.lastModifiedCached;if(t&&t>=r)return t===r;if(e.lastModifiedCached=r,t)for(const s in Ze)Ii(s,n=>{const i=n.data;return n.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===r});return!0}function Lc(e,r){Es||Di();function t(s){let n;if(!Ze[s]||!(n=ki(s)))return;const i=Ei[s];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Nr(n),!$r(n,a+1))return;const l={cached:Math.floor(Date.now()/Ri),provider:e.provider,data:r};return Ts(n,vt+a.toString(),JSON.stringify(l))}r.lastModified&&!Dc(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),t("local")||t("session"))}function fn(){}function Pc(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Cc(e)}))}function Fc(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:s}=e,n=e.iconsToLoad;delete e.iconsToLoad;let i;if(!n||!(i=Br(t)))return;i.prepare(t,s,n).forEach(l=>{Mi(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{e.missing.add(d)});else try{const d=Cs(e,c);if(!d.length)return;const f=e.pendingIcons;f&&d.forEach(p=>{f.delete(p)}),Lc(e,c)}catch(d){console.error(d)}Pc(e)})})}))}const Oc=e=>{const t=Le(e.provider,e.prefix).pendingIcons;return!!(t&&t.has(e.name))},ks=(e,r)=>{const t=Tc(e,!0,rc()),s=Sc(t);if(!s.pending.length){let c=!0;return r&&setTimeout(()=>{c&&r(s.loaded,s.missing,s.pending,fn)}),()=>{c=!1}}const n=Object.create(null),i=[];let a,l;return s.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,i.push(Le(d,f));const p=n[d]||(n[d]=Object.create(null));p[f]||(p[f]=[])}),s.pending.forEach(c=>{const{provider:d,prefix:f,name:p}=c,g=Le(d,f),j=g.pendingIcons||(g.pendingIcons=new Set);j.has(p)||(j.add(p),n[d][f].push(p))}),i.forEach(c=>{const{provider:d,prefix:f}=c;n[d][f].length&&Fc(c,n[d][f])}),r?Ec(r,s,i):fn},Vc=e=>new Promise((r,t)=>{const s=typeof e=="string"?ct(e,!0):e;if(!s){t(e);return}ks([s||e],n=>{if(n.length&&s){const i=jt(s);if(i){r({...wt,...i});return}}t(e)})});function $i(e,r){const t={...e};for(const s in r){const n=r[s],i=typeof n;s in Si?(n===null||n&&(i==="string"||i==="number"))&&(t[s]=n):i===typeof t[s]&&(t[s]=s==="rotate"?n%4:n)}return t}const or={...Ci,inline:!1},Tr="iconify",zr="iconify-inline",qe="iconifyData"+Date.now();let Xe=[];function St(e){for(let r=0;r<Xe.length;r++){const t=Xe[r];if((typeof t.node=="function"?t.node():t.node)===e)return t}}function Ni(e,r=!1){let t=St(e);return t?(t.temporary&&(t.temporary=r),t):(t={node:e,temporary:r},Xe.push(t),t)}function Mc(){if(document.documentElement)return Ni(document.documentElement);Xe.push({node:()=>document.documentElement})}function $c(e){Xe=Xe.filter(r=>e!==r&&e!==(typeof r.node=="function"?r.node():r.node))}function Ct(){return Xe}function Nc(e){const r=document;r.readyState&&r.readyState!=="loading"?e():r.addEventListener("DOMContentLoaded",e)}let mt=null;const Uc={childList:!0,subtree:!0,attributes:!0};function Ui(e){if(!e.observer)return;const r=e.observer;r.pendingScan||(r.pendingScan=setTimeout(()=>{delete r.pendingScan,mt&&mt(e)}))}function Bc(e,r){if(!e.observer)return;const t=e.observer;if(!t.pendingScan)for(let s=0;s<r.length;s++){const n=r[s];if(n.addedNodes&&n.addedNodes.length>0||n.type==="attributes"&&n.target[qe]!==void 0){t.paused||Ui(e);return}}}function Bi(e,r){e.observer.instance.observe(r,Uc)}function Zt(e){let r=e.observer;if(r&&r.instance)return;const t=typeof e.node=="function"?e.node():e.node;!t||!window||(r||(r={paused:0},e.observer=r),r.instance=new window.MutationObserver(Bc.bind(null,e)),Bi(e,t),r.paused||Ui(e))}function pn(){Ct().forEach(Zt)}function zi(e){if(!e.observer)return;const r=e.observer;r.pendingScan&&(clearTimeout(r.pendingScan),delete r.pendingScan),r.instance&&(r.instance.disconnect(),delete r.instance)}function zc(e){const r=mt!==null;if(mt!==e&&(mt=e,r&&Ct().forEach(zi)),r){pn();return}Nc(pn)}function Hr(e){(e?[e]:Ct()).forEach(r=>{if(!r.observer){r.observer={paused:1};return}const t=r.observer;if(t.paused++,t.paused>1||!t.instance)return;t.instance.disconnect()})}function Hc(e){if(e){const r=St(e);r&&Hr(r)}else Hr()}function qr(e){(e?[e]:Ct()).forEach(r=>{if(!r.observer){Zt(r);return}const t=r.observer;if(t.paused&&(t.paused--,!t.paused)){const s=typeof r.node=="function"?r.node():r.node;if(s)t.instance?Bi(r,s):Zt(r);else return}})}function qc(e){if(e){const r=St(e);r&&qr(r)}else qr()}function Hi(e,r=!1){const t=Ni(e,r);return Zt(t),t}function qi(e){const r=St(e);r&&(zi(r),$c(e))}function Wc(e,r){if(e.name!==r.name||e.mode!==r.mode)return!0;const t=e.customisations,s=r.customisations;for(const n in or)if(t[n]!==s[n])return!0;return!1}function Kc(e,r=0){const t=e.replace(/^-?[0-9.]*/,"");function s(n){for(;n<0;)n+=4;return n%4}if(t===""){const n=parseInt(e);return isNaN(n)?0:s(n)}else if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/n,i%1===0?s(i):0)}}return r}const Gc=/[\s,]+/;function Qc(e,r){r.split(Gc).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Zc=["width","height"],Jc=["inline","hFlip","vFlip"];function Yc(e,r){return e===r||e==="true"?!0:e===""||e==="false"?!1:null}function Xc(e){const r=e.getAttribute("data-icon"),t=typeof r=="string"&&ct(r,!0);if(!t)return null;const s={...or,inline:e.classList&&e.classList.contains(zr)};Zc.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(s[l]=c)});const n=e.getAttribute("data-rotate");typeof n=="string"&&(s.rotate=Kc(n));const i=e.getAttribute("data-flip");typeof i=="string"&&Qc(s,i),Jc.forEach(l=>{const c="data-"+l,d=Yc(e.getAttribute(c),c);typeof d=="boolean"&&(s[l]=d)});const a=e.getAttribute("data-mode");return{name:r,icon:t,customisations:s,mode:a}}const eu="svg."+Tr+", i."+Tr+", span."+Tr+", i."+zr+", span."+zr;function tu(e){const r=[];return e.querySelectorAll(eu).forEach(t=>{const s=t[qe]||t.tagName.toLowerCase()!=="svg"?Xc(t):null;s&&r.push({node:t,props:s})}),r}function Wi(e,r){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in r)t+=" "+s+'="'+r[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}let gt;function ru(){try{gt=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{gt=null}}function su(e){return gt===void 0&&ru(),gt?gt.createHTML(e):e}function Ki(e){const r=new Set(["iconify"]);return["provider","prefix"].forEach(t=>{e[t]&&r.add("iconify--"+e[t])}),r}function Gi(e,r,t,s){const n=e.classList;if(s){const a=s.classList;Array.from(a).forEach(l=>{n.add(l)})}const i=[];return r.forEach(a=>{n.contains(a)?t.has(a)&&i.push(a):(n.add(a),i.push(a))}),t.forEach(a=>{r.has(a)||n.remove(a)}),i}function Qi(e,r,t){const s=e.style;(t||[]).forEach(i=>{s.removeProperty(i)});const n=[];for(const i in r)s.getPropertyValue(i)||(n.push(i),s.setProperty(i,r[i]));return n}function Zi(e,r,t){let s;try{s=document.createElement("span")}catch{return e}const n=r.customisations,i=sr(t,n),a=e[qe],l=Wi(Ai(i.body),{"aria-hidden":"true",role:"img",...i.attributes});s.innerHTML=su(l);const c=s.childNodes[0],d=e.attributes;for(let E=0;E<d.length;E++){const T=d.item(E),M=T.name;M!=="class"&&!c.hasAttribute(M)&&c.setAttribute(M,T.value)}const f=Ki(r.icon),p=Gi(c,f,new Set(a&&a.addedClasses),e),g=Qi(c,n.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),j={...r,status:"loaded",addedClasses:p,addedStyles:g};return c[qe]=j,e.parentNode&&e.parentNode.replaceChild(c,e),c}function nu(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function iu(e){return"data:image/svg+xml,"+nu(e)}function ou(e){return'url("'+iu(e)+'")'}const au={display:"inline-block"},Wr={"background-color":"currentColor"},Ji={"background-color":"transparent"},hn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},mn={"-webkit-mask":Wr,mask:Wr,background:Ji};for(const e in mn){const r=mn[e];for(const t in hn)r[e+"-"+t]=hn[t]}function gn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function lu(e,r,t,s){const n=r.customisations,i=sr(t,n),a=i.attributes,l=e[qe],c=Wi(i.body,{...a,width:t.width+"",height:t.height+""}),d=Ki(r.icon),f=Gi(e,d,new Set(l&&l.addedClasses)),g={"--svg":ou(c),width:gn(a.width),height:gn(a.height),...au,...s?Wr:Ji};n.inline&&(g["vertical-align"]="-0.125em");const j=Qi(e,g,l&&l.addedStyles),E={...r,status:"loaded",addedClasses:f,addedStyles:j};return e[qe]=E,e}let It=!1;function cu(){It||(It=!0,setTimeout(()=>{It&&(It=!1,ot())}))}function ot(e,r=!1){const t=Object.create(null);function s(n,i){const{provider:a,prefix:l,name:c}=n,d=Le(a,l),f=d.icons[c];if(f)return{status:"loaded",icon:f};if(d.missing.has(c))return{status:"missing"};if(i&&!Oc(n)){const p=t[a]||(t[a]=Object.create(null));(p[l]||(p[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:Ct()).forEach(n=>{const i=typeof n.node=="function"?n.node():n.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function c(d,f,p){if(l||(l=!0,Hr(n)),d.tagName.toUpperCase()!=="SVG"){const g=f.mode,j=g==="mask"||(g==="bg"?!1:g==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof j=="boolean"){lu(d,f,{...wt,...p},j);return}}Zi(d,f,p)}tu(i).forEach(({node:d,props:f})=>{const p=d[qe];if(!p){const{status:j,icon:E}=s(f.icon,!0);if(E){c(d,f,E);return}a=a||j==="loading",d[qe]={...f,status:j};return}let g;if(Wc(p,f)){if(g=s(f.icon,p.name!==f.name),!g.icon){a=a||g.status==="loading",Object.assign(p,{...f,status:g.status});return}}else{if(p.status!=="loading")return;if(g=s(f.icon,!1),!g.icon){p.status=g.status;return}}c(d,f,g.icon)}),n.temporary&&!a?qi(i):r&&a?Hi(i,!0):l&&n.observer&&qr(n)});for(const n in t){const i=t[n];for(const a in i){const l=i[a];ks(Array.from(l).map(c=>({provider:n,prefix:a,name:c})),cu)}}}function uu(e){const r=St(e);r?ot(r):ot({node:e,temporary:!0},!0)}function Yi(e,r,t=!1){const s=jt(e);if(!s)return null;const n=ct(e),i=$i(or,r||{}),a=Zi(document.createElement("span"),{name:e,icon:n,customisations:i},s);return t?a.outerHTML:a}function du(){return"3.1.1"}function fu(e,r){return Yi(e,r,!1)}function pu(e,r){return Yi(e,r,!0)}function hu(e,r){const t=jt(e);if(!t)return null;const s=$i(or,r||{});return sr(t,s)}function mu(e){e?uu(e):ot()}if(typeof document<"u"&&typeof window<"u"){Mc();const e=window;if(e.IconifyPreload!==void 0){const r=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!ji(s))&&console.error(t)}catch{console.error(t)}})}setTimeout(()=>{zc(ot),ot()})}function gu(e,r){Li(e,r!==!1)}function xu(e){Li(e,!0)}Pi("",jc);if(typeof document<"u"&&typeof window<"u"){Di();const e=window;if(e.IconifyProviders!==void 0){const r=e.IconifyProviders;if(typeof r=="object"&&r!==null)for(const t in r){const s="IconifyProviders["+t+"] is invalid.";try{const n=r[t];if(typeof n!="object"||!n||n.resources===void 0)continue;Fi(t,n)||console.error(s)}catch{console.error(s)}}}}const yu={getAPIConfig:ir,setAPIModule:Pi,sendAPIQuery:Mi,setFetch:gc,getFetch:xc,listAPIProviders:hc},vu={_api:yu,addAPIProvider:Fi,loadIcons:ks,loadIcon:Vc,iconExists:nc,getIcon:ic,listIcons:tc,addIcon:sc,addCollection:ji,replaceIDs:Ai,calculateSize:Vr,buildIcon:sr,getVersion:du,renderSVG:fu,renderHTML:pu,renderIcon:hu,scan:mu,observe:Hi,stopObserving:qi,pauseObserver:Hc,resumeObserver:qc,enableCache:gu,disableCache:xu};try{self.Iconify===void 0&&(self.Iconify=vu)}catch{}var Is={},bu=Se;Object.defineProperty(Is,"__esModule",{value:!0});var Xi=Is.default=void 0,_u=bu(Ce()),wu=o;Xi=Is.default=(0,_u.default)((0,wu.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function Ds({infos:e}){const{t:r}=me(),t=new URL("https://community.arcblock.io/discussions/add");e.forEach(n=>{t.searchParams.set(n.label,n.value)});const s=e.map(n=>`* ${n.label}: ${n.value}`).join(`
|
|
202
|
+
*/const wi=Object.freeze({left:0,top:0,width:16,height:16}),Kt=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),wt=Object.freeze({...wi,...Kt}),Or=Object.freeze({...wt,body:"",hidden:!1});function Gl(e,r){const t={};!e.hFlip!=!r.hFlip&&(t.hFlip=!0),!e.vFlip!=!r.vFlip&&(t.vFlip=!0);const s=((e.rotate||0)+(r.rotate||0))%4;return s&&(t.rotate=s),t}function an(e,r){const t=Gl(e,r);for(const s in Or)s in Kt?s in e&&!(s in t)&&(t[s]=Kt[s]):s in r?t[s]=r[s]:s in e&&(t[s]=e[s]);return t}function Ql(e,r){const t=e.icons,s=e.aliases||Object.create(null),n=Object.create(null);function i(a){if(t[a])return n[a]=[];if(!(a in n)){n[a]=null;const l=s[a]&&s[a].parent,c=l&&i(l);c&&(n[a]=[l].concat(c))}return n[a]}return Object.keys(t).concat(Object.keys(s)).forEach(i),n}function Zl(e,r,t){const s=e.icons,n=e.aliases||Object.create(null);let i={};function a(l){i=an(s[l]||n[l],i)}return a(r),t.forEach(a),an(e,i)}function Jl(e,r){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(n=>{r(n,null),t.push(n)});const s=Ql(e);for(const n in s){const i=s[n];i&&(r(n,Zl(e,n,i)),t.push(n))}return t}const ht=/^[a-z0-9]+(-[a-z0-9]+)*$/,ct=(e,r,t,s="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const l=n.pop(),c=n.pop(),d={provider:n.length>0?n[0]:s,prefix:c,name:l};return r&&!Ft(d)?null:d}const i=n[0],a=i.split("-");if(a.length>1){const l={provider:s,prefix:a.shift(),name:a.join("-")};return r&&!Ft(l)?null:l}if(t&&s===""){const l={provider:s,prefix:"",name:i};return r&&!Ft(l,t)?null:l}return null},Ft=(e,r)=>e?!!((e.provider===""||e.provider.match(ht))&&(r&&e.prefix===""||e.prefix.match(ht))&&e.name.match(ht)):!1,Yl={provider:"",aliases:{},not_found:{},...wi};function Ar(e,r){for(const t in r)if(t in e&&typeof e[t]!=typeof r[t])return!1;return!0}function Xl(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ar(e,Yl))return null;const t=r.icons;for(const n in t){const i=t[n];if(!n.match(ht)||typeof i.body!="string"||!Ar(i,Or))return null}const s=r.aliases||Object.create(null);for(const n in s){const i=s[n],a=i.parent;if(!n.match(ht)||typeof a!="string"||!t[a]&&!s[a]||!Ar(i,Or))return null}return r}const Gt=Object.create(null);function ec(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function Le(e,r){const t=Gt[e]||(Gt[e]=Object.create(null));return t[r]||(t[r]=ec(e,r))}function Cs(e,r){return Xl(r)?Jl(r,(t,s)=>{s?e.icons[t]=s:e.missing.add(t)}):[]}function tc(e,r,t){try{if(typeof t.body=="string")return e.icons[r]={...t},!0}catch{}return!1}function rc(e,r){let t=[];return(typeof e=="string"?[e]:Object.keys(Gt)).forEach(n=>{(typeof n=="string"&&typeof r=="string"?[r]:Object.keys(Gt[n]||{})).forEach(a=>{const l=Le(n,a);t=t.concat(Object.keys(l.icons).map(c=>(n!==""?"@"+n+":":"")+a+":"+c))})}),t}let As=!1;function sc(e){return As}function jt(e){const r=typeof e=="string"?ct(e,!0,As):e;if(r){const t=Le(r.provider,r.prefix),s=r.name;return t.icons[s]||(t.missing.has(s)?null:void 0)}}function nc(e,r){const t=ct(e,!0,As);if(!t)return!1;const s=Le(t.provider,t.prefix);return tc(s,t.name,r)}function ji(e,r){if(typeof e!="object")return!1;typeof r!="string"&&(r=e.provider||"");const t=e.prefix;if(!Ft({provider:r,prefix:t,name:"a"}))return!1;const s=Le(r,t);return!!Cs(s,e)}function ic(e){return!!jt(e)}function oc(e){const r=jt(e);return r?{...wt,...r}:null}const Si=Object.freeze({width:null,height:null}),Ci=Object.freeze({...Si,...Kt}),ac=/(-?[0-9.]*[0-9]+[0-9.]*)/g,lc=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Vr(e,r,t){if(r===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*r*t)/t;if(typeof e!="string")return e;const s=e.split(ac);if(s===null||!s.length)return e;const n=[];let i=s.shift(),a=lc.test(i);for(;;){if(a){const l=parseFloat(i);isNaN(l)?n.push(i):n.push(Math.ceil(l*r*t)/t)}else n.push(i);if(i=s.shift(),i===void 0)return n.join("");a=!a}}const cc=e=>e==="unset"||e==="undefined"||e==="none";function sr(e,r){const t={...wt,...e},s={...Ci,...r},n={left:t.left,top:t.top,width:t.width,height:t.height};let i=t.body;[t,s].forEach(E=>{const T=[],M=E.hFlip,y=E.vFlip;let b=E.rotate;M?y?b+=2:(T.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),T.push("scale(-1 1)"),n.top=n.left=0):y&&(T.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),T.push("scale(1 -1)"),n.top=n.left=0);let I;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:I=n.height/2+n.top,T.unshift("rotate(90 "+I.toString()+" "+I.toString()+")");break;case 2:T.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:I=n.width/2+n.left,T.unshift("rotate(-90 "+I.toString()+" "+I.toString()+")");break}b%2===1&&(n.left!==n.top&&(I=n.left,n.left=n.top,n.top=I),n.width!==n.height&&(I=n.width,n.width=n.height,n.height=I)),T.length&&(i='<g transform="'+T.join(" ")+'">'+i+"</g>")});const a=s.width,l=s.height,c=n.width,d=n.height;let f,p;a===null?(p=l===null?"1em":l==="auto"?d:l,f=Vr(p,c/d)):(f=a==="auto"?c:a,p=l===null?Vr(f,d/c):l==="auto"?d:l);const g={},j=(E,T)=>{cc(T)||(g[E]=T.toString())};return j("width",f),j("height",p),g.viewBox=n.left.toString()+" "+n.top.toString()+" "+c.toString()+" "+d.toString(),{attributes:g,body:i}}const uc=/\sid="(\S+)"/g,dc="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let fc=0;function Ai(e,r=dc){const t=[];let s;for(;s=uc.exec(e);)t.push(s[1]);if(!t.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(i=>{const a=typeof r=="function"?r(i):r+(fc++).toString(),l=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const Ze={local:!0,session:!0},Ei={local:new Set,session:new Set};let Es=!1;function pc(e){Es=e}const ln="iconify2",vt="iconify",Ti=vt+"-count",cn=vt+"-version",Ri=36e5,hc=168;function Mr(e,r){try{return e.getItem(r)}catch{}}function Ts(e,r,t){try{return e.setItem(r,t),!0}catch{}}function un(e,r){try{e.removeItem(r)}catch{}}function $r(e,r){return Ts(e,Ti,r.toString())}function Nr(e){return parseInt(Mr(e,Ti))||0}let kt=typeof window>"u"?{}:window;function ki(e){const r=e+"Storage";try{if(kt&&kt[r]&&typeof kt[r].length=="number")return kt[r]}catch{}Ze[e]=!1}function Ii(e,r){const t=ki(e);if(!t)return;const s=Mr(t,cn);if(s!==ln){if(s){const l=Nr(t);for(let c=0;c<l;c++)un(t,vt+c.toString())}Ts(t,cn,ln),$r(t,0);return}const n=Math.floor(Date.now()/Ri)-hc,i=l=>{const c=vt+l.toString(),d=Mr(t,c);if(typeof d=="string"){try{const f=JSON.parse(d);if(typeof f=="object"&&typeof f.cached=="number"&&f.cached>n&&typeof f.provider=="string"&&typeof f.data=="object"&&typeof f.data.prefix=="string"&&r(f,l))return!0}catch{}un(t,c)}};let a=Nr(t);for(let l=a-1;l>=0;l--)i(l)||(l===a-1?(a--,$r(t,a)):Ei[e].add(l))}function Di(){if(!Es){pc(!0);for(const e in Ze)Ii(e,r=>{const t=r.data,s=r.provider,n=t.prefix,i=Le(s,n);if(!Cs(i,t).length)return!1;const a=t.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,a):a,!0})}}function Li(e,r){switch(e){case"local":case"session":Ze[e]=r;break;case"all":for(const t in Ze)Ze[t]=r;break}}const Ur=Object.create(null);function Pi(e,r){Ur[e]=r}function Br(e){return Ur[e]||Ur[""]}function Rs(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const nr=Object.create(null),ft=["https://api.simplesvg.com","https://api.unisvg.com"],Ot=[];for(;ft.length>0;)ft.length===1||Math.random()>.5?Ot.push(ft.shift()):Ot.push(ft.pop());nr[""]=Rs({resources:["https://api.iconify.design"].concat(Ot)});function Fi(e,r){const t=Rs(r);return t===null?!1:(nr[e]=t,!0)}function ir(e){return nr[e]}function mc(){return Object.keys(nr)}const gc=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Qt=gc();function xc(e){Qt=e}function yc(){return Qt}function vc(e,r){const t=ir(e);if(!t)return 0;let s;if(!t.maxURL)s=0;else{let n=0;t.resources.forEach(a=>{n=Math.max(n,a.length)});const i=r+".json?icons=";s=t.maxURL-n-t.path.length-i.length}return s}function bc(e){return e===404}const _c=(e,r,t)=>{const s=[],n=vc(e,r),i="icons";let a={type:i,provider:e,prefix:r,icons:[]},l=0;return t.forEach((c,d)=>{l+=c.length+1,l>=n&&d>0&&(s.push(a),a={type:i,provider:e,prefix:r,icons:[]},l=c.length),a.icons.push(c)}),s.push(a),s};function wc(e){if(typeof e=="string"){const r=ir(e);if(r)return r.path}return"/"}const jc=(e,r,t)=>{if(!Qt){t("abort",424);return}let s=wc(r.provider);switch(r.type){case"icons":{const i=r.prefix,l=r.icons.join(","),c=new URLSearchParams({icons:l});s+=i+".json?"+c.toString();break}case"custom":{const i=r.uri;s+=i.slice(0,1)==="/"?i.slice(1):i;break}default:t("abort",400);return}let n=503;Qt(e+s).then(i=>{const a=i.status;if(a!==200){setTimeout(()=>{t(bc(a)?"abort":"next",a)});return}return n=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?t("abort",i):t("next",n)});return}setTimeout(()=>{t("success",i)})}).catch(()=>{t("next",n)})},Sc={prepare:_c,send:jc};function Cc(e){const r={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((n,i)=>n.provider!==i.provider?n.provider.localeCompare(i.provider):n.prefix!==i.prefix?n.prefix.localeCompare(i.prefix):n.name.localeCompare(i.name));let s={provider:"",prefix:"",name:""};return e.forEach(n=>{if(s.name===n.name&&s.prefix===n.prefix&&s.provider===n.provider)return;s=n;const i=n.provider,a=n.prefix,l=n.name,c=t[i]||(t[i]=Object.create(null)),d=c[a]||(c[a]=Le(i,a));let f;l in d.icons?f=r.loaded:a===""||d.missing.has(l)?f=r.missing:f=r.pending;const p={provider:i,prefix:a,name:l};f.push(p)}),r}function Oi(e,r){e.forEach(t=>{const s=t.loaderCallbacks;s&&(t.loaderCallbacks=s.filter(n=>n.id!==r))})}function Ac(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let t=!1;const s=e.provider,n=e.prefix;r.forEach(i=>{const a=i.icons,l=a.pending.length;a.pending=a.pending.filter(c=>{if(c.prefix!==n)return!0;const d=c.name;if(e.icons[d])a.loaded.push({provider:s,prefix:n,name:d});else if(e.missing.has(d))a.missing.push({provider:s,prefix:n,name:d});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||Oi([e],i.id),i.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),i.abort))})}))}let Ec=0;function Tc(e,r,t){const s=Ec++,n=Oi.bind(null,t,s);if(!r.pending.length)return n;const i={id:s,icons:r,callback:e,abort:n};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(i)}),n}function Rc(e,r=!0,t=!1){const s=[];return e.forEach(n=>{const i=typeof n=="string"?ct(n,r,t):n;i&&s.push(i)}),s}var kc={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ic(e,r,t,s){const n=e.resources.length,i=e.random?Math.floor(Math.random()*n):e.index;let a;if(e.random){let m=e.resources.slice(0);for(a=[];m.length>1;){const w=Math.floor(Math.random()*m.length);a.push(m[w]),m=m.slice(0,w).concat(m.slice(w+1))}a=a.concat(m)}else a=e.resources.slice(i).concat(e.resources.slice(0,i));const l=Date.now();let c="pending",d=0,f,p=null,g=[],j=[];typeof s=="function"&&j.push(s);function E(){p&&(clearTimeout(p),p=null)}function T(){c==="pending"&&(c="aborted"),E(),g.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),g=[]}function M(m,w){w&&(j=[]),typeof m=="function"&&j.push(m)}function y(){return{startTime:l,payload:r,status:c,queriesSent:d,queriesPending:g.length,subscribe:M,abort:T}}function b(){c="failed",j.forEach(m=>{m(void 0,f)})}function I(){g.forEach(m=>{m.status==="pending"&&(m.status="aborted")}),g=[]}function B(m,w,S){const R=w!=="success";switch(g=g.filter(x=>x!==m),c){case"pending":break;case"failed":if(R||!e.dataAfterTimeout)return;break;default:return}if(w==="abort"){f=S,b();return}if(R){f=S,g.length||(a.length?_():b());return}if(E(),I(),!e.random){const x=e.resources.indexOf(m.resource);x!==-1&&x!==e.index&&(e.index=x)}c="completed",j.forEach(x=>{x(S)})}function _(){if(c!=="pending")return;E();const m=a.shift();if(m===void 0){if(g.length){p=setTimeout(()=>{E(),c==="pending"&&(I(),b())},e.timeout);return}b();return}const w={status:"pending",resource:m,callback:(S,R)=>{B(w,S,R)}};g.push(w),d++,p=setTimeout(_,e.rotate),t(m,r,w.callback)}return setTimeout(_),y}function Vi(e){const r={...kc,...e};let t=[];function s(){t=t.filter(l=>l().status==="pending")}function n(l,c,d){const f=Ic(r,l,c,(p,g)=>{s(),d&&d(p,g)});return t.push(f),f}function i(l){return t.find(c=>l(c))||null}return{query:n,find:i,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:s}}function dn(){}const Er=Object.create(null);function Dc(e){if(!Er[e]){const r=ir(e);if(!r)return;const t=Vi(r),s={config:r,redundancy:t};Er[e]=s}return Er[e]}function Mi(e,r,t){let s,n;if(typeof e=="string"){const i=Br(e);if(!i)return t(void 0,424),dn;n=i.send;const a=Dc(e);a&&(s=a.redundancy)}else{const i=Rs(e);if(i){s=Vi(i);const a=e.resources?e.resources[0]:"",l=Br(a);l&&(n=l.send)}}return!s||!n?(t(void 0,424),dn):s.query(r,n,t)().abort}function Lc(e,r){const t=e.lastModifiedCached;if(t&&t>=r)return t===r;if(e.lastModifiedCached=r,t)for(const s in Ze)Ii(s,n=>{const i=n.data;return n.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===r});return!0}function Pc(e,r){Es||Di();function t(s){let n;if(!Ze[s]||!(n=ki(s)))return;const i=Ei[s];let a;if(i.size)i.delete(a=Array.from(i).shift());else if(a=Nr(n),!$r(n,a+1))return;const l={cached:Math.floor(Date.now()/Ri),provider:e.provider,data:r};return Ts(n,vt+a.toString(),JSON.stringify(l))}r.lastModified&&!Lc(e,r.lastModified)||Object.keys(r.icons).length&&(r.not_found&&(r=Object.assign({},r),delete r.not_found),t("local")||t("session"))}function fn(){}function Fc(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ac(e)}))}function Oc(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:s}=e,n=e.iconsToLoad;delete e.iconsToLoad;let i;if(!n||!(i=Br(t)))return;i.prepare(t,s,n).forEach(l=>{Mi(t,l,c=>{if(typeof c!="object")l.icons.forEach(d=>{e.missing.add(d)});else try{const d=Cs(e,c);if(!d.length)return;const f=e.pendingIcons;f&&d.forEach(p=>{f.delete(p)}),Pc(e,c)}catch(d){console.error(d)}Fc(e)})})}))}const Vc=e=>{const t=Le(e.provider,e.prefix).pendingIcons;return!!(t&&t.has(e.name))},ks=(e,r)=>{const t=Rc(e,!0,sc()),s=Cc(t);if(!s.pending.length){let c=!0;return r&&setTimeout(()=>{c&&r(s.loaded,s.missing,s.pending,fn)}),()=>{c=!1}}const n=Object.create(null),i=[];let a,l;return s.pending.forEach(c=>{const{provider:d,prefix:f}=c;if(f===l&&d===a)return;a=d,l=f,i.push(Le(d,f));const p=n[d]||(n[d]=Object.create(null));p[f]||(p[f]=[])}),s.pending.forEach(c=>{const{provider:d,prefix:f,name:p}=c,g=Le(d,f),j=g.pendingIcons||(g.pendingIcons=new Set);j.has(p)||(j.add(p),n[d][f].push(p))}),i.forEach(c=>{const{provider:d,prefix:f}=c;n[d][f].length&&Oc(c,n[d][f])}),r?Tc(r,s,i):fn},Mc=e=>new Promise((r,t)=>{const s=typeof e=="string"?ct(e,!0):e;if(!s){t(e);return}ks([s||e],n=>{if(n.length&&s){const i=jt(s);if(i){r({...wt,...i});return}}t(e)})});function $i(e,r){const t={...e};for(const s in r){const n=r[s],i=typeof n;s in Si?(n===null||n&&(i==="string"||i==="number"))&&(t[s]=n):i===typeof t[s]&&(t[s]=s==="rotate"?n%4:n)}return t}const or={...Ci,inline:!1},Tr="iconify",zr="iconify-inline",qe="iconifyData"+Date.now();let Xe=[];function St(e){for(let r=0;r<Xe.length;r++){const t=Xe[r];if((typeof t.node=="function"?t.node():t.node)===e)return t}}function Ni(e,r=!1){let t=St(e);return t?(t.temporary&&(t.temporary=r),t):(t={node:e,temporary:r},Xe.push(t),t)}function $c(){if(document.documentElement)return Ni(document.documentElement);Xe.push({node:()=>document.documentElement})}function Nc(e){Xe=Xe.filter(r=>e!==r&&e!==(typeof r.node=="function"?r.node():r.node))}function Ct(){return Xe}function Uc(e){const r=document;r.readyState&&r.readyState!=="loading"?e():r.addEventListener("DOMContentLoaded",e)}let mt=null;const Bc={childList:!0,subtree:!0,attributes:!0};function Ui(e){if(!e.observer)return;const r=e.observer;r.pendingScan||(r.pendingScan=setTimeout(()=>{delete r.pendingScan,mt&&mt(e)}))}function zc(e,r){if(!e.observer)return;const t=e.observer;if(!t.pendingScan)for(let s=0;s<r.length;s++){const n=r[s];if(n.addedNodes&&n.addedNodes.length>0||n.type==="attributes"&&n.target[qe]!==void 0){t.paused||Ui(e);return}}}function Bi(e,r){e.observer.instance.observe(r,Bc)}function Zt(e){let r=e.observer;if(r&&r.instance)return;const t=typeof e.node=="function"?e.node():e.node;!t||!window||(r||(r={paused:0},e.observer=r),r.instance=new window.MutationObserver(zc.bind(null,e)),Bi(e,t),r.paused||Ui(e))}function pn(){Ct().forEach(Zt)}function zi(e){if(!e.observer)return;const r=e.observer;r.pendingScan&&(clearTimeout(r.pendingScan),delete r.pendingScan),r.instance&&(r.instance.disconnect(),delete r.instance)}function Hc(e){const r=mt!==null;if(mt!==e&&(mt=e,r&&Ct().forEach(zi)),r){pn();return}Uc(pn)}function Hr(e){(e?[e]:Ct()).forEach(r=>{if(!r.observer){r.observer={paused:1};return}const t=r.observer;if(t.paused++,t.paused>1||!t.instance)return;t.instance.disconnect()})}function qc(e){if(e){const r=St(e);r&&Hr(r)}else Hr()}function qr(e){(e?[e]:Ct()).forEach(r=>{if(!r.observer){Zt(r);return}const t=r.observer;if(t.paused&&(t.paused--,!t.paused)){const s=typeof r.node=="function"?r.node():r.node;if(s)t.instance?Bi(r,s):Zt(r);else return}})}function Wc(e){if(e){const r=St(e);r&&qr(r)}else qr()}function Hi(e,r=!1){const t=Ni(e,r);return Zt(t),t}function qi(e){const r=St(e);r&&(zi(r),Nc(e))}function Kc(e,r){if(e.name!==r.name||e.mode!==r.mode)return!0;const t=e.customisations,s=r.customisations;for(const n in or)if(t[n]!==s[n])return!0;return!1}function Gc(e,r=0){const t=e.replace(/^-?[0-9.]*/,"");function s(n){for(;n<0;)n+=4;return n%4}if(t===""){const n=parseInt(e);return isNaN(n)?0:s(n)}else if(t!==e){let n=0;switch(t){case"%":n=25;break;case"deg":n=90}if(n){let i=parseFloat(e.slice(0,e.length-t.length));return isNaN(i)?0:(i=i/n,i%1===0?s(i):0)}}return r}const Qc=/[\s,]+/;function Zc(e,r){r.split(Qc).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const Jc=["width","height"],Yc=["inline","hFlip","vFlip"];function Xc(e,r){return e===r||e==="true"?!0:e===""||e==="false"?!1:null}function eu(e){const r=e.getAttribute("data-icon"),t=typeof r=="string"&&ct(r,!0);if(!t)return null;const s={...or,inline:e.classList&&e.classList.contains(zr)};Jc.forEach(l=>{const c=e.getAttribute("data-"+l);c&&(s[l]=c)});const n=e.getAttribute("data-rotate");typeof n=="string"&&(s.rotate=Gc(n));const i=e.getAttribute("data-flip");typeof i=="string"&&Zc(s,i),Yc.forEach(l=>{const c="data-"+l,d=Xc(e.getAttribute(c),c);typeof d=="boolean"&&(s[l]=d)});const a=e.getAttribute("data-mode");return{name:r,icon:t,customisations:s,mode:a}}const tu="svg."+Tr+", i."+Tr+", span."+Tr+", i."+zr+", span."+zr;function ru(e){const r=[];return e.querySelectorAll(tu).forEach(t=>{const s=t[qe]||t.tagName.toLowerCase()!=="svg"?eu(t):null;s&&r.push({node:t,props:s})}),r}function Wi(e,r){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in r)t+=" "+s+'="'+r[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}let gt;function su(){try{gt=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{gt=null}}function nu(e){return gt===void 0&&su(),gt?gt.createHTML(e):e}function Ki(e){const r=new Set(["iconify"]);return["provider","prefix"].forEach(t=>{e[t]&&r.add("iconify--"+e[t])}),r}function Gi(e,r,t,s){const n=e.classList;if(s){const a=s.classList;Array.from(a).forEach(l=>{n.add(l)})}const i=[];return r.forEach(a=>{n.contains(a)?t.has(a)&&i.push(a):(n.add(a),i.push(a))}),t.forEach(a=>{r.has(a)||n.remove(a)}),i}function Qi(e,r,t){const s=e.style;(t||[]).forEach(i=>{s.removeProperty(i)});const n=[];for(const i in r)s.getPropertyValue(i)||(n.push(i),s.setProperty(i,r[i]));return n}function Zi(e,r,t){let s;try{s=document.createElement("span")}catch{return e}const n=r.customisations,i=sr(t,n),a=e[qe],l=Wi(Ai(i.body),{"aria-hidden":"true",role:"img",...i.attributes});s.innerHTML=nu(l);const c=s.childNodes[0],d=e.attributes;for(let E=0;E<d.length;E++){const T=d.item(E),M=T.name;M!=="class"&&!c.hasAttribute(M)&&c.setAttribute(M,T.value)}const f=Ki(r.icon),p=Gi(c,f,new Set(a&&a.addedClasses),e),g=Qi(c,n.inline?{"vertical-align":"-0.125em"}:{},a&&a.addedStyles),j={...r,status:"loaded",addedClasses:p,addedStyles:g};return c[qe]=j,e.parentNode&&e.parentNode.replaceChild(c,e),c}function iu(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ou(e){return"data:image/svg+xml,"+iu(e)}function au(e){return'url("'+ou(e)+'")'}const lu={display:"inline-block"},Wr={"background-color":"currentColor"},Ji={"background-color":"transparent"},hn={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},mn={"-webkit-mask":Wr,mask:Wr,background:Ji};for(const e in mn){const r=mn[e];for(const t in hn)r[e+"-"+t]=hn[t]}function gn(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}function cu(e,r,t,s){const n=r.customisations,i=sr(t,n),a=i.attributes,l=e[qe],c=Wi(i.body,{...a,width:t.width+"",height:t.height+""}),d=Ki(r.icon),f=Gi(e,d,new Set(l&&l.addedClasses)),g={"--svg":au(c),width:gn(a.width),height:gn(a.height),...lu,...s?Wr:Ji};n.inline&&(g["vertical-align"]="-0.125em");const j=Qi(e,g,l&&l.addedStyles),E={...r,status:"loaded",addedClasses:f,addedStyles:j};return e[qe]=E,e}let It=!1;function uu(){It||(It=!0,setTimeout(()=>{It&&(It=!1,ot())}))}function ot(e,r=!1){const t=Object.create(null);function s(n,i){const{provider:a,prefix:l,name:c}=n,d=Le(a,l),f=d.icons[c];if(f)return{status:"loaded",icon:f};if(d.missing.has(c))return{status:"missing"};if(i&&!Vc(n)){const p=t[a]||(t[a]=Object.create(null));(p[l]||(p[l]=new Set)).add(c)}return{status:"loading"}}(e?[e]:Ct()).forEach(n=>{const i=typeof n.node=="function"?n.node():n.node;if(!i||!i.querySelectorAll)return;let a=!1,l=!1;function c(d,f,p){if(l||(l=!0,Hr(n)),d.tagName.toUpperCase()!=="SVG"){const g=f.mode,j=g==="mask"||(g==="bg"?!1:g==="style"?p.body.indexOf("currentColor")!==-1:null);if(typeof j=="boolean"){cu(d,f,{...wt,...p},j);return}}Zi(d,f,p)}ru(i).forEach(({node:d,props:f})=>{const p=d[qe];if(!p){const{status:j,icon:E}=s(f.icon,!0);if(E){c(d,f,E);return}a=a||j==="loading",d[qe]={...f,status:j};return}let g;if(Kc(p,f)){if(g=s(f.icon,p.name!==f.name),!g.icon){a=a||g.status==="loading",Object.assign(p,{...f,status:g.status});return}}else{if(p.status!=="loading")return;if(g=s(f.icon,!1),!g.icon){p.status=g.status;return}}c(d,f,g.icon)}),n.temporary&&!a?qi(i):r&&a?Hi(i,!0):l&&n.observer&&qr(n)});for(const n in t){const i=t[n];for(const a in i){const l=i[a];ks(Array.from(l).map(c=>({provider:n,prefix:a,name:c})),uu)}}}function du(e){const r=St(e);r?ot(r):ot({node:e,temporary:!0},!0)}function Yi(e,r,t=!1){const s=jt(e);if(!s)return null;const n=ct(e),i=$i(or,r||{}),a=Zi(document.createElement("span"),{name:e,icon:n,customisations:i},s);return t?a.outerHTML:a}function fu(){return"3.1.1"}function pu(e,r){return Yi(e,r,!1)}function hu(e,r){return Yi(e,r,!0)}function mu(e,r){const t=jt(e);if(!t)return null;const s=$i(or,r||{});return sr(t,s)}function gu(e){e?du(e):ot()}if(typeof document<"u"&&typeof window<"u"){$c();const e=window;if(e.IconifyPreload!==void 0){const r=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!ji(s))&&console.error(t)}catch{console.error(t)}})}setTimeout(()=>{Hc(ot),ot()})}function xu(e,r){Li(e,r!==!1)}function yu(e){Li(e,!0)}Pi("",Sc);if(typeof document<"u"&&typeof window<"u"){Di();const e=window;if(e.IconifyProviders!==void 0){const r=e.IconifyProviders;if(typeof r=="object"&&r!==null)for(const t in r){const s="IconifyProviders["+t+"] is invalid.";try{const n=r[t];if(typeof n!="object"||!n||n.resources===void 0)continue;Fi(t,n)||console.error(s)}catch{console.error(s)}}}}const vu={getAPIConfig:ir,setAPIModule:Pi,sendAPIQuery:Mi,setFetch:xc,getFetch:yc,listAPIProviders:mc},bu={_api:vu,addAPIProvider:Fi,loadIcons:ks,loadIcon:Mc,iconExists:ic,getIcon:oc,listIcons:rc,addIcon:nc,addCollection:ji,replaceIDs:Ai,calculateSize:Vr,buildIcon:sr,getVersion:fu,renderSVG:pu,renderHTML:hu,renderIcon:mu,scan:gu,observe:Hi,stopObserving:qi,pauseObserver:qc,resumeObserver:Wc,enableCache:xu,disableCache:yu};try{self.Iconify===void 0&&(self.Iconify=bu)}catch{}var Is={},_u=Se;Object.defineProperty(Is,"__esModule",{value:!0});var Xi=Is.default=void 0,wu=_u(Ce()),ju=o;Xi=Is.default=(0,wu.default)((0,ju.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline");function Ds({infos:e}){const{t:r}=me(),t=new URL("https://community.arcblock.io/discussions/add");e.forEach(n=>{t.searchParams.set(n.label,n.value)});const s=e.map(n=>`* ${n.label}: ${n.value}`).join(`
|
|
203
203
|
`);return t.searchParams.set("report","server"),t.searchParams.set("context",`[Enter feedback here]
|
|
204
204
|
|
|
205
205
|
|
|
@@ -209,7 +209,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
209
209
|
${s}
|
|
210
210
|
* Page: ${window.location.href}
|
|
211
211
|
-->
|
|
212
|
-
`),se(U,{sx:{mx:{xs:0,md:2}},children:se(Qr,{sx:{color:"text.primary"},target:"_blank",href:t.href,rel:"noreferrer",style:{textDecoration:"underline"},children:r("common.reportIssue")})})}Ds.propTypes={infos:P.arrayOf(P.shape({label:P.string,value:P.string}))};Ds.defaultProps={infos:[]};var Ls={},
|
|
212
|
+
`),se(U,{sx:{mx:{xs:0,md:2}},children:se(Qr,{sx:{color:"text.primary"},target:"_blank",href:t.href,rel:"noreferrer",style:{textDecoration:"underline"},children:r("common.reportIssue")})})}Ds.propTypes={infos:P.arrayOf(P.shape({label:P.string,value:P.string}))};Ds.defaultProps={infos:[]};var Ls={},Su=Se;Object.defineProperty(Ls,"__esModule",{value:!0});var Kr=Ls.default=void 0,Cu=Su(Ce()),xn=o;Kr=Ls.default=(0,Cu.default)([(0,xn.jsx)("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"},"0"),(0,xn.jsx)("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"AccessTime");function ze({children:e}){return De(t=>t.breakpoints.down("md"))?o.jsx(Mt,{enterDelay:500,leaveDelay:2e3,title:typeof e=="string"?e:"",children:o.jsx(U,{sx:{display:"flex",alignItems:"center",gap:1},children:o.jsx(Kr,{fontSize:"small"})})}):o.jsxs(U,{sx:{display:"flex",alignItems:"center",gap:1},children:[o.jsx(Kr,{fontSize:"small"}),e]})}ze.propTypes={children:P.node.isRequired};const Au="https://launcher.arcblock.io/",Eu=30*24*60*60*1e3;function Ps({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var _,m,w,S,R,x;const{t:i,locale:a}=me(),l=at(),[c,d]=Un({safeIframeRef:null,popoverAnchorEl:null}),f=F.useRef(null),p=De(D=>D.breakpoints.down("md")),{sx:g={},...j}=n,E=p?"mobile":"desktop",T=$n(async()=>{const[D,V]=await Promise.all([l.api.getLauncherSession({input:{launcherSessionId:s,launcherUrl:e}}),Ln({launcherUrl:e||Au,nftDid:t,launcherSessionId:s,locale:a})]);if(D!=null&&D.error)throw new Error(D.error);return{launcherSession:D.launcherSession,subscriptionURL:V}},[a]);if(T.loading)return o.jsx(Qe,{label:o.jsxs(ze,{children:[!p&&i("expiration.desktop.loading"),o.jsx(He,{size:16})]}),variant:"success",sx:{cursor:"pointer",...g},...j});if(T.error)return console.error(T.error),o.jsx(Qe,{label:o.jsx(ze,{children:i(`expiration.${E}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...g},...j,onClick:()=>T.retry()});const M=D=>{d({popoverAnchorEl:D.currentTarget})},y=()=>{d({popoverAnchorEl:null})},b=(_=T.value)==null?void 0:_.launcherSession;let I="success";[ie.LAUNCH_SESSION_STATUS.overdue,ie.LAUNCH_SESSION_STATUS.canceled,ie.LAUNCH_SESSION_STATUS.terminated].includes((w=(m=T.value)==null?void 0:m.launcherSession)==null?void 0:w.status)&&(I="error");let B=null;if(b.expirationDate&&!b.subscription){const D=st(b.expirationDate).diff(st(),"ms");B=i(`expiration.${E}.tips.${I}`,{validity:Vn(D,{locale:Pn(a),compact:!0,verbose:!0})}),D>0&&D<=Eu&&(I="warning")}return o.jsxs(o.Fragment,{children:[o.jsx(Qe,{label:o.jsx(ze,{children:B||((R=(S=b==null?void 0:b.subscription)==null?void 0:S.product)==null?void 0:R.name)||i("common.subscription")}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...g},...j,onClick:M}),o.jsx(An,{id:"popover-info",open:!!c.popoverAnchorEl,anchorEl:c.popoverAnchorEl,onClose:y,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(U,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:f,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(x=T.value)==null?void 0:x.subscriptionURL})})})]})}Ps.propTypes={chainHost:P.string.isRequired,nftId:P.string,launcherSessionId:P.string,sx:P.object,retention:P.number,launcherUrl:P.string.isRequired};Ps.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};const Tu=30*24*60*60*1e3,Ru="https://launcher.arcblock.io/";function Fs({launcherUrl:e,chainHost:r,nftId:t,launcherSessionId:s,...n}){var m,w,S,R,x,D,V;const{t:i,locale:a}=me(),[l,c]=Un({safeIframeRef:null,popoverAnchorEl:null}),d=F.useRef(null),f=De($=>$.breakpoints.down("md")),p=at(),{sx:g={},...j}=n,E=f?"mobile":"desktop",T=$n(async()=>{const[$,H]=await Promise.all([p.api.getLauncherSession({input:{launcherSessionId:s||t,launcherUrl:e}}),Ln({launcherUrl:e||Ru,nftDid:t,launcherSessionId:s,locale:a})]);if($!=null&&$.error)throw new Error($.error);return{launcherSession:$.launcherSession,subscriptionURL:H}},[a]);if(T.loading)return o.jsx(Qe,{label:o.jsxs(ze,{children:[!f&&i("expiration.desktop.loading"),o.jsx(He,{size:16})]}),variant:"success",sx:{cursor:"pointer",...g},...j});if(T.error)return console.error(T.error),o.jsx(Qe,{label:o.jsx(ze,{children:i(`expiration.${E}.loadFailed`)}),color:"error",variant:"success",sx:{cursor:"pointer",...g},...j,onClick:()=>T.retry()});const M=(w=(m=T.value)==null?void 0:m.launcherSession)==null?void 0:w.expirationDate,y=st(M).isBefore(st()),b=st(M).diff(st(),"ms");let I="success";b<=Tu&&(I="warning"),y&&(I="error");const B=$=>{c({popoverAnchorEl:$.currentTarget})},_=()=>{c({popoverAnchorEl:null})};return o.jsxs(o.Fragment,{children:[((R=(S=T.value)==null?void 0:S.launcherSession)==null?void 0:R.subscription)&&o.jsx(Qe,{label:o.jsx(ze,{children:i("expiration.desktop.nextInvoice",{date:Go(M,a)})}),color:"success",variant:"outlined",sx:{cursor:"pointer",...g},...j,onClick:B}),!((D=(x=T.value)==null?void 0:x.launcherSession)!=null&&D.subscription)&&o.jsx(Qe,{label:o.jsx(ze,{children:i(`expiration.${E}.tips.${I}`,{validity:Vn(b,{locale:Pn(a),compact:!0,verbose:!0})})}),color:I,variant:I!=="success"?"contained":"outlined",sx:{cursor:"pointer",...g},...j,onClick:B}),o.jsx(An,{id:"popover-info",open:!!l.popoverAnchorEl,anchorEl:l.popoverAnchorEl,onClose:_,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:o.jsx(U,{sx:{width:{xs:"360px",md:"450px"}},children:o.jsx("iframe",{ref:d,title:i("common.subscription"),width:"100%",height:"600px",style:{border:0},src:(V=T.value)==null?void 0:V.subscriptionURL})})})]})}Fs.propTypes={chainHost:P.string.isRequired,nftId:P.string,launcherSessionId:P.string,sx:P.object,retention:P.number,launcherUrl:P.string.isRequired};Fs.defaultProps={sx:{},retention:0,nftId:"",launcherSessionId:""};var Os={},ku=Se;Object.defineProperty(Os,"__esModule",{value:!0});var eo=Os.default=void 0,Iu=ku(Ce()),Du=o;eo=Os.default=(0,Iu.default)((0,Du.jsx)("path",{d:"M7 14H5v5h5v-2H7zm-2-4h2V7h3V5H5zm12 7h-3v2h5v-5h-2zM14 5v2h3v3h2V5z"}),"Fullscreen");var Vs={},Lu=Se;Object.defineProperty(Vs,"__esModule",{value:!0});var to=Vs.default=void 0,Pu=Lu(Ce()),Fu=o;to=Vs.default=(0,Pu.default)((0,Fu.jsx)("path",{d:"M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"}),"FullscreenExit");function Ou(){const{inFullPage:e,toggleFullPage:r}=mo();return se(Jt,{onClick:r,children:e?se(to,{sx:{transform:"scale(1.3)"}}):se(eo,{sx:{transform:"scale(1.3)"}})})}function Ms({children:e}){var I,B,_;const{t:r}=me(),{loading:t,error:s,actions:{refreshBlocklet:n},env:i,blocklet:a}=lt(),{info:l}=Qo(),c=Do(),d=De(m=>m.breakpoints.down("md")),[f,p]=F.useState(null),{appId:g,version:j}=i,E=[{label:"App ID",value:g},{label:"App Version",value:j},{label:"App Bundle Name",value:(I=a==null?void 0:a.meta)==null?void 0:I.bundleName},{label:"Server Id",value:l.did},{label:"Server Version",value:l.version}],T=m=>{var S,R,x,D;const w=Array.isArray(m)?m:[m];if(d||w.unshift(se(Ou,{})),a){const V={cursor:"pointer",marginRight:{xs:"8px",md:"48px"}};Zo(a)?w.unshift(se(Ps,{chainHost:(S=a==null?void 0:a.controller)==null?void 0:S.chainHost,nftId:(R=a==null?void 0:a.controller)==null?void 0:R.nftId,launcherSessionId:(x=a==null?void 0:a.controller)==null?void 0:x.launcherSessionId,launcherUrl:(D=a==null?void 0:a.controller)==null?void 0:D.launcherUrl,sx:V})):l.ownerNft&&l.launcher&&w.unshift(se(Fs,{chainHost:l.launcher.chainHost,launcherUrl:l.launcher.url,nftId:l.ownerNft.did,launcherSessionId:l.ownerNft.launcherSessionId,sx:V}))}return w},M=(B=((a==null?void 0:a.environments)||[]).find(m=>m.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE))==null?void 0:B.value,y=(_=((a==null?void 0:a.environments)||[]).find(m=>m.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_RECT))==null?void 0:_.value;return F.useEffect(()=>{if(d)p(null);else{const{appLogo:m,appLogoRect:w}=window.blocklet??{};(w||m)&&p(`${w||m}&v=${Date.now()}`)}},[M,y,d]),Cr(Vu,{legacy:!1,fullWidth:!0,headerAddons:T,headerProps:{logo:f?se("img",{src:f,alt:"logo"}):null},footerProps:{addon:se(Ds,{infos:E})},children:[!a&&t&&se(Nt,{relative:"parent",children:se(He,{})}),!a&&s&&Cr(Nt,{relative:"parent",children:[Cr(U,{display:"flex",alignItems:"center",children:[se(Xi,{color:"error",sx:{marginRight:1}}),Xr(s)]}),se(Je,{onClick:()=>n(),children:se("span",{style:{textDecoration:"underline"},children:r("common.retry")})})]}),!!a&&se(U,{flex:1,padding:d?2:3,display:"flex",flexDirection:"column",children:se(Bo,{FallbackComponent:ho,resetKeys:[c.pathname],children:e})})]})}Ms.propTypes={children:P.any};Ms.defaultProps={children:null};const Vu=ve(po)`
|
|
213
213
|
div.dashboard-content {
|
|
214
214
|
padding: 0;
|
|
215
215
|
}
|
|
@@ -217,7 +217,7 @@ ${s}
|
|
|
217
217
|
max-height: 400px;
|
|
218
218
|
overflow-y: auto;
|
|
219
219
|
}
|
|
220
|
-
`;function Vu(){const{t:e,locale:r}=me(),{blocklet:t,launcherSession:s}=lt(),[n,i]=ma({subscriptionURL:"#"});if(F.useEffect(()=>{var c,d;qs(t,s)&&Jo({launcherSessionId:(c=t==null?void 0:t.controller)==null?void 0:c.launcherSessionId,launcherUrl:(d=t==null?void 0:t.controller)==null?void 0:d.launcherUrl,locale:r}).then(f=>{i({subscriptionURL:f})}).catch(f=>{console.error("get subscription url error:",f)})},[t,s]),!t||!s||!Yo(t)||s.status===ie.LAUNCH_SESSION_STATUS.installed)return"";let a=null,l="";return qs(t,s)?(a=o.jsx(Qr,{href:n.subscriptionURL,children:e("blocklet.manageSubscription")}),l=e("blocklet.suspendedCausedByExpired",{deadline:Ws(s==null?void 0:s.reservedUntil,r)})):Xo(t,s)&&(a=o.jsx(En,{to:er(ie.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),l=e("blocklet.suspendedCausedByTerminated",{canceledAt:Ws(s==null?void 0:s.terminatedAt,r),deadline:ea(s==null?void 0:s.terminatedAt,r)})),o.jsxs(U,{component:zo,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l,o.jsx(de,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const ro=F.createContext({});function Od(){return F.useContext(ro)}const{Provider:Mu,Consumer:Vd}=ro,{did:Ae,appId:$u}=window.env;function Nu({children:e}){var m,w;const{t:r,locale:t}=me(),{blocklet:s}=lt(),[n,i]=F.useState([]),[a,l]=F.useState([]),[c,d]=F.useState([]),f=ye.getDisplayName(s),p=((m=((s==null?void 0:s.environments)||[]).find(S=>S.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:m.value)||"auto",g=(s==null?void 0:s.trustedPassports)||[],j=(s==null?void 0:s.trustedFactories)||[],E=(s==null?void 0:s.enablePassportIssuance)!==!1,T=async()=>{try{const S=await Et.doBatchQuery({getRoles:{input:{teamDid:Ae}},getPermissions:{input:{teamDid:Ae}},getInvitations:{input:{teamDid:Ae}}}),R=(S.getRoles.roles||[]).filter(x=>!ie.RBAC_CONFIG.roles.some(D=>D.name===x.name&&(!D.passport||D.ci))).map(x=>(x.hasDescription=!!x.description,x.hasDescription||(x.description=r("team.passport.description",{teamName:f,title:x.title})),x));l(aa(R,[x=>ta(x.name)],["desc"])),d(S.getPermissions.permissions||[]),i(S.getInvitations.invitations||[])}catch(S){ne.error(S.message)}},M=({did:S}={})=>{const R={teamDid:Ae,user:{did:S}};return Et.getUser({input:R})},y=({query:S,paging:R}={})=>{const x={teamDid:Ae};return R&&(x.paging=R),S&&(x.query=S),x.sort={lastLoginAt:-1},Et.getUsers({input:x})},b=()=>Et.getUsersCountPerRole({input:{teamDid:Ae}}),I=()=>T();F.useEffect(()=>{var S;(S=s==null?void 0:s.meta)!=null&&S.did&&T()},[(w=s==null?void 0:s.meta)==null?void 0:w.did]),F.useEffect(()=>{l(S=>S.map(R=>(R.hasDescription||(R.description=r("team.passport.description",{teamName:f,title:R.title})),{...R})))},[r,t]);const B=S=>{S.teamDid===Ae&&T()};Dt(Ve.TeamEvents.userAdded,B,[Ae]),Dt(Ve.TeamEvents.userRemoved,B,[Ae]),Dt(Ve.TeamEvents.userUpdated,B,[Ae]);const _={teamDid:Ae,teamIssuerDid:$u,teamName:f,invitations:n,roles:a,permissions:c,trustedPassports:g,trustedFactories:j,isNodeTeam:!1,enablePassportIssuance:E,refresh:I,passportColor:p,endpoint:window.location.origin,blocklet:s,api:{getUser:M,getUsers:y,getUsersCountPerRole:b}};return o.jsx(Mu,{value:_,children:e})}const Uu=F.lazy(()=>Y(()=>import("./log-Dg8IZoeo.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),Bu=F.lazy(()=>Y(()=>import("./index-DFoYVoMG.js"),__vite__mapDeps([14,2,1,5,4,6,7,8,10,15,9,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,3,32,33,34,35,36,37,38]))),zu=F.lazy(()=>Y(()=>import("./index-DUU3hQpo.js"),__vite__mapDeps([39,4,2,5,1,6,7,8,36,9,10,40,24,20,29,30,3,32,33,34,18,35,21,37,38]))),Hu=F.lazy(()=>Y(()=>import("./index-Dzvf3kMf.js"),__vite__mapDeps([41,2,1,9,10,4,5,6,7,8,42,24,20,18,16,43,12,31,44,11,19,45,37,46,47,28,48,49,50,23,51,52,53,54,55,56,33,57,58,59,60]))),qu=F.lazy(()=>Y(()=>import("./overview-ClfPLbRa.js"),__vite__mapDeps([61,1,2,4,5,6,7,8,10,36,62,34,9,22,35,21,16,63,64,65,48,3,24,20,32,33,18,37,38]))),Wu=F.lazy(()=>Y(()=>import("./domains-BrNRyjCn.js"),__vite__mapDeps([66,2,4,5,1,6,7,8,9,10,67,40,17,18,35,21,24,20,29,30,56,19,31,68,37,36,22,69]))),Ku=F.lazy(()=>Y(()=>import("./index-Kaq7tC6c.js"),__vite__mapDeps([70,2,6,5,1,4,7,8,9,10,16,25,26,17,18,71,72,73,24,20,44,37,74,3,32,33,34,35,21,36,38]))),Gu=F.lazy(()=>Y(()=>import("./appearance-Bn0kYJHu.js"),__vite__mapDeps([75,76,2,10,1,4,5,6,7,8,9]))),Qu=F.lazy(()=>Y(()=>import("./audit-logs-DU66CSpw.js"),__vite__mapDeps([77,4,2,5,1,6,7,8,25,26,3,9,10,58,59,36,78,34,31,60,24,20,32,33,18,35,21,37,38]))),Zu=F.lazy(()=>Y(()=>import("./index-Bee_YcJC.js"),__vite__mapDeps([79,2,1,5,4,6,7,8,9,10,31,22,80,47,12,34,78,36,69,25,26,16,81,35,21,76,82,83,49,84,20,50,3,24,32,33,18,37,38]))),Ju=F.lazy(()=>Y(()=>import("./config-navigation-hrdLDyFZ.js"),__vite__mapDeps([85,2,4,5,1,6,7,8,86,10,9,64,72,87,88,48,34,51,52,20,3,24,32,33,18,35,21,36,37,38]))),Yu=F.lazy(()=>Y(()=>import("./index-B8FtPEFx.js"),__vite__mapDeps([89,1,2,6,5,10,4,7,8,9,90,48,91,92,65,23,20,22,93,30,33,94,44,3,24,32,34,18,35,21,36,37,38]))),Xu=F.lazy(()=>Y(()=>import("./index-d34Q6nXR.js"),__vite__mapDeps([95,4,2,5,1,6,7,8,9,10,94,62,22,26,90,3,24,20,32,33,34,18,35,21,36,37,38]))),ed=F.lazy(()=>Y(()=>import("./security-DmjkCoJ_.js"),__vite__mapDeps([96,4,2,5,1,6,7,8,9,10,88,97,90,3,24,20,32,33,34,18,35,21,36,37,38]))),td=F.lazy(()=>Y(()=>import("./branding-C5rNAfwW.js"),__vite__mapDeps([98,2,1,4,5,6,7,8,10,55,99,46,73,57,9,17,18,34,3,24,20,32,33,35,21,36,37,38]))),rd=F.lazy(()=>Y(()=>import("./advanced-CzJgEcda.js"),__vite__mapDeps([100,2,1,9,10,4,5,6,7,8,17,18,24,20,37,19,22,16,63,64,3,32,33,34,35,21,36,38]))),sd=F.lazy(()=>Y(()=>import("./traffic-ChJb5Oyl.js").then(e=>e.t),__vite__mapDeps([81,2,9,1,10,4,5,6,7,8,35,21,76,82,83,49,84,20,50]))),nd=F.lazy(()=>Y(()=>import("./runtime-CdKbOwQM.js"),__vite__mapDeps([101,2,1,34,5,10,4,6,7,8,9,93,12,3,24,20,32,33,18,35,21,36,37,38]))),id=F.lazy(()=>Y(()=>import("./component-CZ948vh4.js"),__vite__mapDeps([102,1,2,5,4,6,7,8,10,9,103,94,17,18,86,84,52,19,49,83,57,20,104,53,54,55,23,56,31,24,33,16,105,106,92,65,48,99,46,107,71,72,58,59,87,22,3,68,90,108,91,109,74,36,76,12,32,29,30,34,35,21,37,38]))),od=F.lazy(()=>Y(()=>import("./index-CjmXl7jW.js"),__vite__mapDeps([110,1,2,9,10,4,5,6,7,8]))),ad=er(ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),ld=e=>{const{enqueueSnackbar:r}=kn(),t=F.useCallback(s=>On(ad,{id:s.id,severity:s.severity||"all",componentDid:s.source==="system"?"system":s.componentDid||"all"}),[]);Dt(`${e}/${ie.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,s=>{const n=t(s),{severity:i,description:a}=s||{},l=["error","warning"].includes(i)||s.sticky;s.source==="system"&&r(a,{variant:i,autoHideDuration:l?null:5e3,content:c=>o.jsx(tl,{viewAllUrl:n,keyId:c,notification:s,content:o.jsx(xl,{notification:s,minimal:!0,rows:0})})})},[],"user")};function so({blocklet:e,isAdmin:r}){const[t,s]=F.useState(!1),{t:n}=me(),i=xa();return r?o.jsxs(o.Fragment,{children:[o.jsx(Zu,{blocklet:e,customTableButtons:[o.jsxs(U,{display:"flex",alignItems:"center",gap:1.5,children:[o.jsx(Jt,{onClick:()=>s(!0),sx:{p:i?0:void 0},children:o.jsx(is,{})},"settings"),i?o.jsx(de,{children:n("common.setting")}):null]})]}),o.jsx(Ho,{title:`${n("common.notification")} ${n("common.setting")}`,fullWidth:!0,maxWidth:"md",open:t,onClose:()=>s(!1),PaperProps:{style:{minHeight:"500px"}},children:o.jsx(U,{sx:{mt:"-16px",overflowY:"hidden"},children:o.jsx(Wl,{})})})]}):o.jsx(xo,{status:403})}so.propTypes={blocklet:P.object.isRequired,isAdmin:P.bool.isRequired};const cd=e=>{var f,p;const{t:r}=me(),{blocklet:t,actions:{refreshBlocklet:s},client:n,did:i}=lt(),a=(f=t==null?void 0:t.meta)==null?void 0:f.did,l=!t||ur(t.status)?[]:ye.getAppMissingConfigs(t),c={overview:[{label:r("common.overview"),value:"overview"},{label:o.jsx(Io,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:r("common.components")}),value:"components"}],"did-connect":[{label:r("common.members"),value:"members"},{label:r("team.member.passports"),value:"passports"},{label:r("common.setting"),value:"settings"},{label:r("common.security"),value:"security"}],website:[{label:r("common.domains"),value:"domains"},{label:r("common.branding"),value:"branding",show:!ur(t==null?void 0:t.status)},{label:r("common.theming"),value:"theming",show:!ur(t==null?void 0:t.status)},{label:r("common.navigation"),value:"navigation"},{label:r("common.sitemap"),value:"sitemap"}],operations:[{label:r("common.notificationRecords"),value:"notifications",show:e},{label:r("common.analytics"),value:"analytics"},{label:r("common.auditLogs"),value:"audit-logs"},{label:r("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:r("common.accessKeys"),value:"access-keys"}],developers:[{label:r("common.logs"),value:"logs",show:((p=t==null?void 0:t.children)==null?void 0:p.length)&&t.structVersion===ie.APP_STRUCT_VERSION},{label:r("common.performance"),value:"performance"},{label:r("common.docs"),value:"docs"}]},d={overview:qu,components:id,members:o.jsx(Bu,{type:"blocklet",createPassportSvg:Ks}),passports:o.jsx(Ku,{createPassportSvg:Ks}),settings:o.jsx(Xu,{orientation:"vertical"}),security:o.jsx(ed,{}),"did-spaces":o.jsx(Yu,{navOrientation:"horizontal"}),domains:Wu,branding:o.jsx(td,{blocklet:t,onUpdate:s}),theming:o.jsx(Gu,{}),navigation:Ju,sitemap:o.jsx(Hs,{children:r("common.comingSoon")}),notifications:o.jsx(so,{blocklet:t,isAdmin:e}),"audit-logs":o.jsx(Qu,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:o.jsx(sd,{client:n,did:i}),advanced:o.jsx(rd,{blocklet:t,onUpdate:s}),webhooks:zu,"access-keys":o.jsx(Hs,{children:r("common.comingSoon")}),logs:Uu,performance:o.jsx(nd,{client:n,did:i}),docs:od,publish:o.jsx(Hu,{})};return{tabGroups:c,renders:d}};function ud(){var M,y;const e=Tn(),{tab:r="overview",subtab:t}=Lo(),{blocklet:s}=lt(),{t:n}=me(),{session:i}=Mn(),a=Ye(()=>{var b;return(b=i==null?void 0:i.user)==null?void 0:b.did},[i]),l=Ye(()=>{var b;return((b=i.user)==null?void 0:b.role)&&sa.includes(i.user.role)},[i]);ld(a);const{tabGroups:c,renders:d}=cd(l),f=b=>{e(`${ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${r}/${b}`)},p=(c[r]||[]).filter(b=>b.show===void 0||b.show),g=((M=(p||[]).find(b=>b.value===t))==null?void 0:M.value)||((y=p==null?void 0:p[0])==null?void 0:y.value)||r,j=d[g]||d.overview,E=["overview"].includes(r),T=s?o.jsxs(es,{type:"components",children:[p.length>0&&o.jsx(U,{pt:E?3:0,mb:2,children:o.jsx(Dn,{tabs:p,current:g,onChange:f,scrollButtons:"auto"})}),o.jsx(U,{className:"page-content",children:o.jsx(F.Suspense,{fallback:o.jsx(Nt,{relative:"parent",children:o.jsx(He,{})}),children:F.isValidElement(j)?j:o.jsx(j,{blocklet:s})})})]}):o.jsx(Nt,{relative:"parent",children:o.jsx(He,{})});return o.jsx(na,{children:o.jsx(Nu,{children:o.jsx(Ms,{children:o.jsxs(fd,{children:[E&&o.jsxs(U,{component:"div",className:"page-header",children:[o.jsxs(de,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[s?o.jsx(pa,{blocklet:s,style:{marginRight:16}}):null,s?o.jsxs(U,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(U,{children:ye.getDisplayName(s)}),(s==null?void 0:s.status)!=="unknown"&&o.jsx(ps,{size:"12px",status:s.status,source:s.source,progress:s.progress})]}):`${n("common.blocklet")} ${n("common.detail")}`]}),s?o.jsx(qa,{className:"page-actions",hasPermission:!0,blocklet:s,onStart:()=>{},onComplete:({error:b}={})=>{b&&ne.error(b.message)},variant:"group"}):null]}),o.jsx(Zn,{}),o.jsx(Vu,{}),T]})})})})}function dd(){var s;const{blocklet:e}=lt(),{t:r}=me(),t=(s=e==null?void 0:e.meta)==null?void 0:s.did;return F.useEffect(()=>{const n=ra();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),o.jsxs(o.Fragment,{children:[o.jsx(go,{children:o.jsx("title",{children:r("pageTitle.dashboard")})}),o.jsx(ud,{})]})}const fd=ve.main`
|
|
220
|
+
`;function Mu(){const{t:e,locale:r}=me(),{blocklet:t,launcherSession:s}=lt(),[n,i]=ma({subscriptionURL:"#"});if(F.useEffect(()=>{var c,d;qs(t,s)&&Jo({launcherSessionId:(c=t==null?void 0:t.controller)==null?void 0:c.launcherSessionId,launcherUrl:(d=t==null?void 0:t.controller)==null?void 0:d.launcherUrl,locale:r}).then(f=>{i({subscriptionURL:f})}).catch(f=>{console.error("get subscription url error:",f)})},[t,s]),!t||!s||!Yo(t)||s.status===ie.LAUNCH_SESSION_STATUS.installed)return"";let a=null,l="";return qs(t,s)?(a=o.jsx(Qr,{href:n.subscriptionURL,children:e("blocklet.manageSubscription")}),l=e("blocklet.suspendedCausedByExpired",{deadline:Ws(s==null?void 0:s.reservedUntil,r)})):Xo(t,s)&&(a=o.jsx(En,{to:er(ie.WELLKNOWN_BLOCKLET_ADMIN_PATH,"/did-spaces"),children:e("common.backup")}),l=e("blocklet.suspendedCausedByTerminated",{canceledAt:Ws(s==null?void 0:s.terminatedAt,r),deadline:ea(s==null?void 0:s.terminatedAt,r)})),o.jsxs(U,{component:zo,type:"error",sx:{"&> .alert-content":{display:"block"}},children:[l,o.jsx(de,{component:"span",sx:{marginLeft:"4px"},children:a})]})}const ro=F.createContext({});function Vd(){return F.useContext(ro)}const{Provider:$u,Consumer:Md}=ro,{did:Ae,appId:Nu}=window.env;function Uu({children:e}){var m,w;const{t:r,locale:t}=me(),{blocklet:s}=lt(),[n,i]=F.useState([]),[a,l]=F.useState([]),[c,d]=F.useState([]),f=ye.getDisplayName(s),p=((m=((s==null?void 0:s.environments)||[]).find(S=>S.key===Ve.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR))==null?void 0:m.value)||"auto",g=(s==null?void 0:s.trustedPassports)||[],j=(s==null?void 0:s.trustedFactories)||[],E=(s==null?void 0:s.enablePassportIssuance)!==!1,T=async()=>{try{const S=await Et.doBatchQuery({getRoles:{input:{teamDid:Ae}},getPermissions:{input:{teamDid:Ae}},getInvitations:{input:{teamDid:Ae}}}),R=(S.getRoles.roles||[]).filter(x=>!ie.RBAC_CONFIG.roles.some(D=>D.name===x.name&&(!D.passport||D.ci))).map(x=>(x.hasDescription=!!x.description,x.hasDescription||(x.description=r("team.passport.description",{teamName:f,title:x.title})),x));l(aa(R,[x=>ta(x.name)],["desc"])),d(S.getPermissions.permissions||[]),i(S.getInvitations.invitations||[])}catch(S){ne.error(S.message)}},M=({did:S}={})=>{const R={teamDid:Ae,user:{did:S}};return Et.getUser({input:R})},y=({query:S,paging:R}={})=>{const x={teamDid:Ae};return R&&(x.paging=R),S&&(x.query=S),x.sort={lastLoginAt:-1},Et.getUsers({input:x})},b=()=>Et.getUsersCountPerRole({input:{teamDid:Ae}}),I=()=>T();F.useEffect(()=>{var S;(S=s==null?void 0:s.meta)!=null&&S.did&&T()},[(w=s==null?void 0:s.meta)==null?void 0:w.did]),F.useEffect(()=>{l(S=>S.map(R=>(R.hasDescription||(R.description=r("team.passport.description",{teamName:f,title:R.title})),{...R})))},[r,t]);const B=S=>{S.teamDid===Ae&&T()};Dt(Ve.TeamEvents.userAdded,B,[Ae]),Dt(Ve.TeamEvents.userRemoved,B,[Ae]),Dt(Ve.TeamEvents.userUpdated,B,[Ae]);const _={teamDid:Ae,teamIssuerDid:Nu,teamName:f,invitations:n,roles:a,permissions:c,trustedPassports:g,trustedFactories:j,isNodeTeam:!1,enablePassportIssuance:E,refresh:I,passportColor:p,endpoint:window.location.origin,blocklet:s,api:{getUser:M,getUsers:y,getUsersCountPerRole:b}};return o.jsx($u,{value:_,children:e})}const Bu=F.lazy(()=>Y(()=>import("./log-C0ajhie8.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]))),zu=F.lazy(()=>Y(()=>import("./index-C3-7zmeY.js"),__vite__mapDeps([14,2,1,5,4,6,7,8,10,15,9,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,3,32,33,34,35,36,37,38]))),Hu=F.lazy(()=>Y(()=>import("./index-BxTrfRkG.js"),__vite__mapDeps([39,4,2,5,1,6,7,8,36,9,10,40,25,20,29,30,3,32,33,34,18,35,22,37,38]))),qu=F.lazy(()=>Y(()=>import("./index-K5iSHoYm.js"),__vite__mapDeps([41,2,1,9,10,4,5,6,7,8,42,25,20,18,16,43,12,31,44,11,19,45,37,46,47,48,49,50,24,51,52,53,54,55,56,33,57,58,59,60]))),Wu=F.lazy(()=>Y(()=>import("./overview-DY9-9zrL.js"),__vite__mapDeps([61,1,2,4,5,6,7,8,10,36,62,34,9,23,35,22,16,63,64,65,48,3,25,20,32,33,18,37,38]))),Ku=F.lazy(()=>Y(()=>import("./domains-CMJbalsn.js"),__vite__mapDeps([66,2,4,5,1,6,7,8,9,10,67,40,17,18,35,22,25,20,29,30,56,19,31,68,37,36,21,23,69]))),Gu=F.lazy(()=>Y(()=>import("./index-3q6oLa2e.js"),__vite__mapDeps([70,2,6,5,1,4,7,8,9,10,16,26,27,17,18,71,72,73,25,20,44,37,74,3,32,33,34,35,22,36,38]))),Qu=F.lazy(()=>Y(()=>import("./appearance-BIOmTg1q.js"),__vite__mapDeps([75,76,2,10,1,4,5,6,7,8,9]))),Zu=F.lazy(()=>Y(()=>import("./audit-logs-SSAqJt40.js"),__vite__mapDeps([77,4,2,5,1,6,7,8,26,27,3,9,10,58,59,36,78,34,31,60,25,20,32,33,18,35,22,37,38]))),Ju=F.lazy(()=>Y(()=>import("./index-DWuuU3ta.js"),__vite__mapDeps([79,2,1,5,4,6,7,8,9,10,31,23,80,47,12,34,78,36,28,69,26,27,16,81,35,22,76,82,83,49,84,20,50,3,25,32,33,18,37,38]))),Yu=F.lazy(()=>Y(()=>import("./config-navigation-CPd_4svD.js"),__vite__mapDeps([85,2,4,5,1,6,7,8,64,72,10,86,9,87,88,57,48,34,51,52,76,20,3,25,32,33,18,35,22,36,37,38]))),Xu=F.lazy(()=>Y(()=>import("./index-BVOsgGKh.js"),__vite__mapDeps([89,1,2,6,5,10,4,7,8,9,90,48,91,92,65,24,20,23,93,30,33,94,44,3,25,32,34,18,35,22,36,37,38]))),ed=F.lazy(()=>Y(()=>import("./index-BGeUo-5w.js"),__vite__mapDeps([95,4,2,5,1,6,7,8,9,10,94,62,23,27,90,3,25,20,32,33,34,18,35,22,36,37,38]))),td=F.lazy(()=>Y(()=>import("./security-DmR541pi.js"),__vite__mapDeps([96,4,2,5,1,6,7,8,9,10,88,97,90,3,25,20,32,33,34,18,35,22,36,37,38]))),rd=F.lazy(()=>Y(()=>import("./branding-BDuOcSfH.js"),__vite__mapDeps([98,2,1,4,5,6,7,8,10,55,99,46,73,57,9,17,18,34,3,25,20,32,33,35,22,36,37,38]))),sd=F.lazy(()=>Y(()=>import("./advanced-C8t1232G.js"),__vite__mapDeps([100,2,1,9,10,4,5,6,7,8,17,18,25,20,37,19,23,16,63,64,3,32,33,34,35,22,36,38]))),nd=F.lazy(()=>Y(()=>import("./traffic-LuIcK-L1.js").then(e=>e.t),__vite__mapDeps([81,2,9,1,10,4,5,6,7,8,35,22,76,82,83,49,84,20,50]))),id=F.lazy(()=>Y(()=>import("./runtime-D6tESY33.js"),__vite__mapDeps([101,2,1,34,5,10,4,6,7,8,9,93,12,3,25,20,32,33,18,35,22,36,37,38]))),od=F.lazy(()=>Y(()=>import("./component-By64LaLD.js"),__vite__mapDeps([102,1,2,5,4,6,7,8,10,9,103,94,17,18,87,84,52,19,49,83,57,20,104,53,54,55,24,56,31,25,33,16,105,106,92,65,48,99,46,107,71,72,58,59,86,23,3,68,90,108,91,109,74,36,76,12,32,29,30,34,35,22,37,38]))),ad=F.lazy(()=>Y(()=>import("./index-CwdXL2a0.js"),__vite__mapDeps([110,1,2,9,10,4,5,6,7,8]))),ld=er(ie.WELLKNOWN_SERVICE_PATH_PREFIX,"user","notifications"),cd=e=>{const{enqueueSnackbar:r}=kn(),t=F.useCallback(s=>On(ld,{id:s.id,severity:s.severity||"all",componentDid:s.source==="system"?"system":s.componentDid||"all"}),[]);Dt(`${e}/${ie.EVENTS.NOTIFICATION_BLOCKLET_CREATE}`,s=>{const n=t(s),{severity:i,description:a}=s||{},l=["error","warning"].includes(i)||s.sticky;s.source==="system"&&r(a,{variant:i,autoHideDuration:l?null:5e3,content:c=>o.jsx(tl,{viewAllUrl:n,keyId:c,notification:s,content:o.jsx(yl,{notification:s,minimal:!0,rows:0})})})},[],"user")};function so({blocklet:e,isAdmin:r}){const[t,s]=F.useState(!1),{t:n}=me(),i=xa();return r?o.jsxs(o.Fragment,{children:[o.jsx(Ju,{blocklet:e,customTableButtons:[o.jsxs(U,{display:"flex",alignItems:"center",gap:1.5,children:[o.jsx(Jt,{onClick:()=>s(!0),sx:{p:i?0:void 0},children:o.jsx(is,{})},"settings"),i?o.jsx(de,{children:n("common.setting")}):null]})]}),o.jsx(Ho,{title:`${n("common.notification")} ${n("common.setting")}`,fullWidth:!0,maxWidth:"md",open:t,onClose:()=>s(!1),PaperProps:{style:{minHeight:"500px"}},children:o.jsx(U,{sx:{mt:"-16px",overflowY:"hidden"},children:o.jsx(Kl,{})})})]}):o.jsx(xo,{status:403})}so.propTypes={blocklet:P.object.isRequired,isAdmin:P.bool.isRequired};const ud=e=>{var f,p;const{t:r}=me(),{blocklet:t,actions:{refreshBlocklet:s},client:n,did:i}=lt(),a=(f=t==null?void 0:t.meta)==null?void 0:f.did,l=!t||ur(t.status)?[]:ye.getAppMissingConfigs(t),c={overview:[{label:r("common.overview"),value:"overview"},{label:o.jsx(Io,{"data-cy":"blocklet-list",color:"error",variant:"dot",invisible:!l.length,children:r("common.components")}),value:"components"}],"did-connect":[{label:r("common.members"),value:"members"},{label:r("team.member.passports"),value:"passports"},{label:r("common.setting"),value:"settings"},{label:r("common.security"),value:"security"}],website:[{label:r("common.domains"),value:"domains"},{label:r("common.branding"),value:"branding",show:!ur(t==null?void 0:t.status)},{label:r("common.theming"),value:"theming",show:!ur(t==null?void 0:t.status)},{label:r("common.navigation"),value:"navigation"},{label:r("common.sitemap"),value:"sitemap"}],operations:[{label:r("common.notificationRecords"),value:"notifications",show:e},{label:r("common.analytics"),value:"analytics"},{label:r("common.auditLogs"),value:"audit-logs"},{label:r("common.advanced"),value:"advanced"}],integrations:[{label:"Webhooks",value:"webhooks",show:e},{label:r("common.accessKeys"),value:"access-keys"}],developers:[{label:r("common.logs"),value:"logs",show:((p=t==null?void 0:t.children)==null?void 0:p.length)&&t.structVersion===ie.APP_STRUCT_VERSION},{label:r("common.performance"),value:"performance"},{label:r("common.docs"),value:"docs"}]},d={overview:Wu,components:od,members:o.jsx(zu,{type:"blocklet",createPassportSvg:Ks}),passports:o.jsx(Gu,{createPassportSvg:Ks}),settings:o.jsx(ed,{orientation:"vertical"}),security:o.jsx(td,{}),"did-spaces":o.jsx(Xu,{navOrientation:"horizontal"}),domains:Ku,branding:o.jsx(rd,{blocklet:t,onUpdate:s}),theming:o.jsx(Qu,{}),navigation:Yu,sitemap:o.jsx(Hs,{children:r("common.comingSoon")}),notifications:o.jsx(so,{blocklet:t,isAdmin:e}),"audit-logs":o.jsx(Zu,{scope:a,categories:["blocklet","team","security","certificates","gateway"]}),analytics:o.jsx(nd,{client:n,did:i}),advanced:o.jsx(sd,{blocklet:t,onUpdate:s}),webhooks:Hu,"access-keys":o.jsx(Hs,{children:r("common.comingSoon")}),logs:Bu,performance:o.jsx(id,{client:n,did:i}),docs:ad,publish:o.jsx(qu,{})};return{tabGroups:c,renders:d}};function dd(){var M,y;const e=Tn(),{tab:r="overview",subtab:t}=Lo(),{blocklet:s}=lt(),{t:n}=me(),{session:i}=Mn(),a=Ye(()=>{var b;return(b=i==null?void 0:i.user)==null?void 0:b.did},[i]),l=Ye(()=>{var b;return((b=i.user)==null?void 0:b.role)&&sa.includes(i.user.role)},[i]);cd(a);const{tabGroups:c,renders:d}=ud(l),f=b=>{e(`${ie.WELLKNOWN_SERVICE_PATH_PREFIX}/admin/${r}/${b}`)},p=(c[r]||[]).filter(b=>b.show===void 0||b.show),g=((M=(p||[]).find(b=>b.value===t))==null?void 0:M.value)||((y=p==null?void 0:p[0])==null?void 0:y.value)||r,j=d[g]||d.overview,E=["overview"].includes(r),T=s?o.jsxs(es,{type:"components",children:[p.length>0&&o.jsx(U,{pt:E?3:0,mb:2,children:o.jsx(Dn,{tabs:p,current:g,onChange:f,scrollButtons:"auto"})}),o.jsx(U,{className:"page-content",children:o.jsx(F.Suspense,{fallback:o.jsx(Nt,{relative:"parent",children:o.jsx(He,{})}),children:F.isValidElement(j)?j:o.jsx(j,{blocklet:s})})})]}):o.jsx(Nt,{relative:"parent",children:o.jsx(He,{})});return o.jsx(na,{children:o.jsx(Uu,{children:o.jsx(Ms,{children:o.jsxs(pd,{children:[E&&o.jsxs(U,{component:"div",className:"page-header",children:[o.jsxs(de,{component:"h6",variant:"h6",className:"page-title",color:"textPrimary",children:[s?o.jsx(pa,{blocklet:s,style:{marginRight:16}}):null,s?o.jsxs(U,{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,children:[o.jsx(U,{children:ye.getDisplayName(s)}),(s==null?void 0:s.status)!=="unknown"&&o.jsx(ps,{size:"12px",status:s.status,source:s.source,progress:s.progress})]}):`${n("common.blocklet")} ${n("common.detail")}`]}),s?o.jsx(qa,{className:"page-actions",hasPermission:!0,blocklet:s,onStart:()=>{},onComplete:({error:b}={})=>{b&&ne.error(b.message)},variant:"group"}):null]}),o.jsx(Zn,{}),o.jsx(Mu,{}),T]})})})})}function fd(){var s;const{blocklet:e}=lt(),{t:r}=me(),t=(s=e==null?void 0:e.meta)==null?void 0:s.did;return F.useEffect(()=>{const n=ra();return t&&n.connect(),()=>{t&&n.isConnected()&&n.disconnect()}},[t]),o.jsxs(o.Fragment,{children:[o.jsx(go,{children:o.jsx("title",{children:r("pageTitle.dashboard")})}),o.jsx(dd,{})]})}const pd=ve.main`
|
|
221
221
|
.page-header {
|
|
222
222
|
display: flex;
|
|
223
223
|
justify-content: space-between;
|
|
@@ -259,4 +259,4 @@ ${s}
|
|
|
259
259
|
margin-bottom: 15px;
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
`,$d=Object.freeze(Object.defineProperty({__proto__:null,default:fd},Symbol.toStringTag,{value:"Module"}));export{ps as B,Ee as C,we as S,fs as W,bi as a,Hn as b,jl as c,Xi as d,zn as e,Od as f,Kn as g,tt as h,Fd as i,$d as j,Vd as u};
|