@abtnode/webapp 1.16.37 → 1.16.38-beta-20250110-003414-d3c1bfbd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/blocklet.js +1 -1
- package/blocklet.yml +1 -1
- package/dist/assets/{Add-LNeK5jrT.js → Add-DMbK1vzy.js} +1 -1
- package/dist/assets/{ArrowDropDown-BMCAROdz.js → ArrowDropDown-DKLRovgu.js} +1 -1
- package/dist/assets/Autocomplete-72OfUAKA.js +1 -0
- package/dist/assets/{Breadcrumbs-D96Ji_Fg.js → Breadcrumbs-DvzeQG2v.js} +1 -1
- package/dist/assets/{ButtonGroup-DNhSwTTP.js → ButtonGroup-l0siWVyy.js} +1 -1
- package/dist/assets/{CSSTransition-CyKJ1XLf.js → CSSTransition-DD9Kx1Iq.js} +1 -1
- package/dist/assets/{CheckCircle-fa5-ji4k.js → CheckCircle-BgjyHaH-.js} +1 -1
- package/dist/assets/{ChevronLeft-CBG0DKr8.js → ChevronLeft-D3UVaBk1.js} +1 -1
- package/dist/assets/{ChevronRight-CiXNKrQ5.js → ChevronRight-CRdbPktx.js} +1 -1
- package/dist/assets/{Delete-SdWkobPu.js → Delete-VacyAtz7.js} +1 -1
- package/dist/assets/{DeleteOutline-DmY0qAVl.js → DeleteOutline-B4ZeZmby.js} +1 -1
- package/dist/assets/{Done-D93m_XkV.js → Done-Dm_L4cxw.js} +1 -1
- package/dist/assets/{Edit-CJLZw07X.js → Edit-udIPbjjy.js} +1 -1
- package/dist/assets/{EditIcon-FonE6fi3.js → EditIcon-D8Tco2Vt.js} +1 -1
- package/dist/assets/{ExpandMore-CqgNg-wv.js → ExpandMore-BMpZ8Wgn.js} +1 -1
- package/dist/assets/{Google-BfbvXp8-.js → Google-Ccj7tlHn.js} +1 -1
- package/dist/assets/{HelpOutline-jNej_Tmw.js → HelpOutline-CczYi4vf.js} +1 -1
- package/dist/assets/{Https-CqP1fmfy.js → Https-oAl-nB9G.js} +1 -1
- package/dist/assets/{InputAdornment-CtznPOEY.js → InputAdornment-DWZfDxJ5.js} +1 -1
- package/dist/assets/{Launch-CU2t4bei.js → Launch-Bh2GBEVm.js} +1 -1
- package/dist/assets/{Link-BPz9fTjE.js → Link-D4R9lXIc.js} +1 -1
- package/dist/assets/{ListItemButton-Ctd0Olny.js → ListItemButton-06IoaY7h.js} +1 -1
- package/dist/assets/{LoadingButton-CVn1jCOP.js → LoadingButton-C9iCYV5S.js} +1 -1
- package/dist/assets/{LockIcon-934wV3SA.js → LockIcon-lED3NuFb.js} +1 -1
- package/dist/assets/{Loop-Csp9pHLq.js → Loop-DwiO6dO7.js} +1 -1
- package/dist/assets/{MoreHoriz-kumMux-w.js → MoreHoriz-Dw0WqG6e.js} +1 -1
- package/dist/assets/{MoreVert-sneedYyB.js → MoreVert-C6wKUwAk.js} +1 -1
- package/dist/assets/{Public-BZcXc7nl.js → Public-CMOXQyK4.js} +1 -1
- package/dist/assets/{SchemaReference.es-DPFWnUmw.js → SchemaReference.es-Dlnv0kOV.js} +1 -1
- package/dist/assets/{Search-HG2-ZiCd.js → Search-B79uNwsG.js} +1 -1
- package/dist/assets/{ShoppingCart-B05O0lLg.js → ShoppingCart-Cbf3RE3D.js} +1 -1
- package/dist/assets/{Stepper-CGVylDau.js → Stepper-B03Gdn9z.js} +1 -1
- package/dist/assets/{ToggleButtonGroup-37A-_sW7.js → ToggleButtonGroup-D1XjcSzv.js} +1 -1
- package/dist/assets/{ViewColumn-Bw1Dr-Hv.js → ViewColumn-o0LIJqw8.js} +1 -1
- package/dist/assets/{ViewList-DtZNy2-d.js → ViewList-D8dbR_yl.js} +1 -1
- package/dist/assets/{_createAggregator-DVwXFFA3.js → _createAggregator-BJ_Gxlsc.js} +1 -1
- package/dist/assets/{actions-j_X8RXTm.js → actions-B3nBC3nT.js} +1 -1
- package/dist/assets/{actions-COHejXyQ.js → actions-BmNXubeF.js} +1 -1
- package/dist/assets/{agreement-CdA52x1A.js → agreement-9M0NNXBk.js} +1 -1
- package/dist/assets/api-BhoYn1LW.js +1 -0
- package/dist/assets/ar-DuHAbPhE.js +3 -0
- package/dist/assets/{audit-logs-D6otUrNH.js → audit-logs-C3C4F9zM.js} +1 -1
- package/dist/assets/{base32-CIv3UxMA.js → base32-DsZtf55n.js} +1 -1
- package/dist/assets/blocklet-WvBRbHhh.js +1 -0
- package/dist/assets/{brace-fold.es-SvvPxAcu.js → brace-fold.es-DlGtg1Ay.js} +1 -1
- package/dist/assets/{chart-CAbejja_.js → chart-DGkq-7L_.js} +1 -1
- package/dist/assets/{click-to-copy-DHZn0BU2.js → click-to-copy-C05ik3Tc.js} +1 -1
- package/dist/assets/{closebrackets.es-D0Vu1pph.js → closebrackets.es-BnxC_9rd.js} +1 -1
- package/dist/assets/{codemirror.es-BnDHzwS1.js → codemirror.es-Cq41RbvR.js} +1 -1
- package/dist/assets/{comment.es-CjNTzTkn.js → comment.es-DdPugZrN.js} +1 -1
- package/dist/assets/{config-navigation-CmYuYlOV.js → config-navigation-DDPZOOR-.js} +3 -3
- package/dist/assets/{connect-to-BE2k9kkw.js → connect-to-Crdst8cO.js} +1 -1
- package/dist/assets/de-CJi7wiel.js +3 -0
- package/dist/assets/{delete-confirm-BdV9ygjA.js → delete-confirm-DVXl439v.js} +1 -1
- package/dist/assets/{detail-DhWlLI9a.js → detail-BA6YG4e9.js} +3 -3
- package/dist/assets/{dialog.es-DAZEbvCl.js → dialog.es-mAWjZ4X4.js} +1 -1
- package/dist/assets/{download-CdMMZrfm.js → download-D3JXYHJu.js} +1 -1
- package/dist/assets/emotion-react.browser.esm-Cv2k92pS.js +1 -0
- package/dist/assets/es-ClwhOFrW.js +3 -0
- package/dist/assets/{foldgutter.es-Cj4Bse4O.js → foldgutter.es-CGXjckQe.js} +1 -1
- package/dist/assets/fr-CAkkNKvy.js +3 -0
- package/dist/assets/{get-safe-url-CPcoBNzz.js → get-safe-url-BkFcpbAL.js} +1 -1
- package/dist/assets/{get-safe-url-skqz94-m.js → get-safe-url-CW8aFZFz.js} +1 -1
- package/dist/assets/getValidReactChildren-CQZDoI1W.js +1 -0
- package/dist/assets/hi-CGrG89HI.js +1 -0
- package/dist/assets/{hint.es-D04OYf-Z.js → hint.es-BCbIeXfD.js} +1 -1
- package/dist/assets/{hint.es2--NLmq3n0.js → hint.es2-CH6AINL7.js} +1 -1
- package/dist/assets/id-D6PyIa8m.js +3 -0
- package/dist/assets/{iframe-DvBCKkSE.js → iframe-8AjXIKnl.js} +1 -1
- package/dist/assets/{index-CUO9cP5M.js → index-BJ4-V7tZ.js} +1 -1
- package/dist/assets/{index-CMxyXyyp.js → index-BJdqQbbW.js} +1 -1
- package/dist/assets/{index-D6UlG4np.js → index-BRQeDn6I.js} +1 -1
- package/dist/assets/{index-Bl6HgP2X.js → index-BWk_UMqc.js} +1 -1
- package/dist/assets/{index-Wpz0M9Lm.js → index-BY5fd9sZ.js} +1 -1
- package/dist/assets/{index-DqS8dcdo.js → index-Bp6z3aGT.js} +1 -1
- package/dist/assets/{index-CTEjUADr.js → index-C-tSf3Nu.js} +1 -1
- package/dist/assets/{index-C9zz2Y-O.js → index-C4Yo_q7y.js} +1 -1
- package/dist/assets/{index-CqXcJ23O.js → index-C92-6luS.js} +1 -1
- package/dist/assets/{index-CiMGLB06.js → index-CA15GHeA.js} +1 -1
- package/dist/assets/{index-DdlTTDA0.js → index-CBnuVUeW.js} +1 -1
- package/dist/assets/{index-DiahrB7x.js → index-CC2cdnYk.js} +1 -1
- package/dist/assets/{index-BDUwUVTl.js → index-CG1_igpG.js} +1 -1
- package/dist/assets/{index-CuGRRyR8.js → index-CG7xm8bB.js} +1 -1
- package/dist/assets/{index-CmTNtczD.js → index-CGvRuMnC.js} +1 -1
- package/dist/assets/{index-CME7w0y5.js → index-CIE4pfp7.js} +1 -1
- package/dist/assets/{index-Cu4oiqSG.js → index-CMc0Du4F.js} +21 -21
- package/dist/assets/{index-CenWKla5.js → index-CWbfhRhH.js} +78 -78
- package/dist/assets/{index-ZnkjBWZr.js → index-Cc-UKLvv.js} +1 -1
- package/dist/assets/{index-BQQ6HoHt.js → index-CdtPbsZF.js} +1 -1
- package/dist/assets/{index-BBVHal1U.js → index-CqJwdJfi.js} +1 -1
- package/dist/assets/{index-CeDvR2dF.js → index-D2R4EXnK.js} +4 -4
- package/dist/assets/{index-CdlDvYRv.js → index-D2u3Hmgc.js} +1 -1
- package/dist/assets/{index-BHOZSahD.js → index-D3NL2XyY.js} +1 -1
- package/dist/assets/{index-BUNJKpmD.js → index-D49YArUG.js} +124 -124
- package/dist/assets/{index-B-7NiZMn.js → index-D4cunB-D.js} +1 -1
- package/dist/assets/{index-Cq8gXYls.js → index-DHi3bYBp.js} +1 -1
- package/dist/assets/{index--g6tWKGz.js → index-DKi6BJy-.js} +1 -1
- package/dist/assets/{index-B_4PtLjv.js → index-Dc4xgOvt.js} +1 -1
- package/dist/assets/{index-DFZvQNhs.js → index-DhWjINOl.js} +1 -1
- package/dist/assets/{index-DbPjug53.js → index-DxpxiMNX.js} +1 -1
- package/dist/assets/{index-BZOzc2yh.js → index-GeGGg5FS.js} +1 -1
- package/dist/assets/{index-CTnaHN2F.js → index-JJP1bzc4.js} +1 -1
- package/dist/assets/{index-B7u6DMob.js → index-Jxsgp5Uf.js} +3 -3
- package/dist/assets/{index-CdjAgPV6.js → index-WAManj1W.js} +1 -1
- package/dist/assets/{index-BzJr8MZd.js → index-g54V2euN.js} +1 -1
- package/dist/assets/{index-sR_PZ0Y7.js → index-hLMcQc7k.js} +1 -1
- package/dist/assets/{index-BcFgJ4P7.js → index-n0yXt8Sx.js} +1 -1
- package/dist/assets/{index-DbM7eu_G.js → index-oSDNX64t.js} +3 -3
- package/dist/assets/{index-JwV9ZSj1.js → index-wrId3cmL.js} +1 -1
- package/dist/assets/{index-D_gJpdyF.js → index-zTokKslW.js} +2 -2
- package/dist/assets/{index.esm-BmJ6gVOZ.js → index.esm-CcF_wSql.js} +1 -1
- package/dist/assets/{info-addon.es-LRhGzFNO.js → info-addon.es-Zv7hO3v8.js} +1 -1
- package/dist/assets/{info.es-C-a7s3gR.js → info.es-_PvJk0Sn.js} +1 -1
- package/dist/assets/{install-from-url-SQrCQcYi.js → install-from-url-CHeZ3efm.js} +1 -1
- package/dist/assets/{invitation-DvJLTIS2.js → invitation-DSrQVBko.js} +1 -1
- package/dist/assets/is-path-prefix-equal-6Xk283GW.js +1 -0
- package/dist/assets/{item-BHaPtXP2.js → item-B8Ikm43l.js} +1 -1
- package/dist/assets/ja-C82Szos_.js +3 -0
- package/dist/assets/{javascript.es-C7DdWJKB.js → javascript.es-BRUVbIfm.js} +1 -1
- package/dist/assets/{jump-to-line.es-ivjE1mPV.js → jump-to-line.es-DwDv0xWQ.js} +1 -1
- package/dist/assets/{jump.es-D4TIjpbX.js → jump.es-Djy2R28D.js} +1 -1
- package/dist/assets/ko-zaXquvPm.js +3 -0
- package/dist/assets/{lint.es-DGHaTgxf.js → lint.es-CqwAPBE0.js} +1 -1
- package/dist/assets/{lint.es2-ivQKovR2.js → lint.es2-BzvK8jqN.js} +1 -1
- package/dist/assets/{lint.es3-Bt2w8cvz.js → lint.es3-DK49uIoO.js} +1 -1
- package/dist/assets/{list-header-BX4fmTdb.js → list-header-Dp2PLIET.js} +1 -1
- package/dist/assets/{log-zCc1coPH.js → log-DhOu9Kdc.js} +1 -1
- package/dist/assets/{logo-uploader-Dw-uh1T2.js → logo-uploader-Dj6giLFm.js} +4 -4
- package/dist/assets/{lottie-react.esm-CgEl2A0C.js → lottie-react.esm-Csdw9Vzz.js} +1 -1
- package/dist/assets/{matchbrackets.es-49-A2Uxh.js → matchbrackets.es-imT7Z0Y9.js} +1 -1
- package/dist/assets/{memory-BxEEk0to.js → memory-CCO4mC07.js} +1 -1
- package/dist/assets/{mode.es-CRvvIVYR.js → mode.es-230XBHtp.js} +1 -1
- package/dist/assets/{mode.es2-CH8NtrwB.js → mode.es2-DIyH3KiP.js} +1 -1
- package/dist/assets/{mode.es3-BSTnMxNC.js → mode.es3-MypnvBX7.js} +1 -1
- package/dist/assets/{onlineParser.es-BsaAMnEA.js → onlineParser.es-CIQBs0ab.js} +1 -1
- package/dist/assets/{overview-CbRHUR59.js → overview-f1KcRwxU.js} +1 -1
- package/dist/assets/{permission-Bkth4eV7.js → permission-Bcmsu5d5.js} +1 -1
- package/dist/assets/pt-CMq2TmiV.js +1 -0
- package/dist/assets/{resource-dialog-B39zqK45.js → resource-dialog-CjkV1JgT.js} +9 -9
- package/dist/assets/ru-BwmmHWZS.js +1 -0
- package/dist/assets/{runtime-C-QxOBAC.js → runtime-Bo8HSyE-.js} +1 -1
- package/dist/assets/schema-CCOnGjM-.js +29 -0
- package/dist/assets/sdk-qrY1rACG.js +1 -0
- package/dist/assets/{search.es-BwzP6MG0.js → search.es-DyMbgBDt.js} +1 -1
- package/dist/assets/{searchcursor.es-Bidk4QWP.js → searchcursor.es-BXpAUvZO.js} +1 -1
- package/dist/assets/{service-JO-3dMQL.js → service-CifH8b_H.js} +1 -1
- package/dist/assets/session-Oj9XmKr2.js +1 -0
- package/dist/assets/{shorten-label-Cyl52dM6.js → shorten-label-DWmSldhD.js} +1 -1
- package/dist/assets/{show-hint.es-BshPrCed.js → show-hint.es-E3psg9hY.js} +1 -1
- package/dist/assets/{simple-select-BMHJl3YE.js → simple-select-49kuuDJ_.js} +1 -1
- package/dist/assets/{slicedToArray-BNRTfgmS.js → slicedToArray-Yixr-oJu.js} +1 -1
- package/dist/assets/{spaces-BK8M5T_O.js → spaces-A_lKSdhY.js} +1 -1
- package/dist/assets/{status-CjSQkY6J.js → status-DCmFj-i0.js} +1 -1
- package/dist/assets/{sublime.es-DcKiuWNC.js → sublime.es-ComfFZLY.js} +1 -1
- package/dist/assets/{switch-control-BDeteUmz.js → switch-control-xE4sjHp6.js} +1 -1
- package/dist/assets/{table-icons-B2I5P9wN.js → table-icons-Q5LDmDtO.js} +1 -1
- package/dist/assets/{team-CT47mbew.js → team-3vCE6Gdh.js} +1 -1
- package/dist/assets/{th-CKxPcxWD.js → th-C-hKn9xa.js} +1 -1
- package/dist/assets/{toUpper-DanPvCnW.js → toUpper-0YthuLMH.js} +1 -1
- package/dist/assets/{traffic-DdIpuI4L.js → traffic-C-peaCPk.js} +1 -1
- package/dist/assets/{uniqBy-BwI-KO3U.js → uniqBy-nvRXjDh4.js} +1 -1
- package/dist/assets/{url-evaluation-BkGwhDBb.js → url-evaluation-Chv1gy0N.js} +1 -1
- package/dist/assets/{url-join-CXZZH1hT.js → url-join-Beajpd0B.js} +1 -1
- package/dist/assets/{use-mobile-DL3ieg5k.js → use-mobile-DRPYNh8e.js} +1 -1
- package/dist/assets/{useAsync-tkSQIJ7B.js → useAsync-BkCbq0Nt.js} +1 -1
- package/dist/assets/{useLocalStorage-BuIYftF5.js → useLocalStorage-DJrGEjBO.js} +1 -1
- package/dist/assets/{useThemeProps-CMeYnErS.js → useThemeProps-C9wZ4SLX.js} +1 -1
- package/dist/assets/{util-CJ7LZmNA.js → util-S0lCOd3M.js} +1 -1
- package/dist/assets/{vi-DsheN6LQ.js → vi-C_iM9J2X.js} +1 -1
- package/dist/assets/{wait-container-Bejv0Pdm.js → wait-container-izhq2H-L.js} +1 -1
- package/dist/assets/{withStyles-C7pv6jh1.js → withStyles-DcLZK18s.js} +1 -1
- package/dist/assets/wrap-locale-BEOy0Wuw.js +1 -0
- package/dist/assets/{zh-BJMvTFip.js → zh-DNY792IC.js} +1 -1
- package/dist/assets/zh-tw-9sY6BN2s.js +3 -0
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +1 -1
- package/dist/assets/Autocomplete-TOUUVKuI.js +0 -1
- package/dist/assets/api-Cs_T_Ea4.js +0 -1
- package/dist/assets/ar-DJ10cGfc.js +0 -3
- package/dist/assets/blocklet-B717ECiV.js +0 -1
- package/dist/assets/de-5ORoKwiw.js +0 -3
- package/dist/assets/emotion-react.browser.esm-CNy46FnI.js +0 -1
- package/dist/assets/es-CWClvbjs.js +0 -3
- package/dist/assets/fr-CE8mlhdK.js +0 -3
- package/dist/assets/getValidReactChildren-Cg0RyAku.js +0 -1
- package/dist/assets/hi-DVuJdQme.js +0 -1
- package/dist/assets/id-L6JUyxUh.js +0 -3
- package/dist/assets/is-path-prefix-equal-Bhvu_H7P.js +0 -1
- package/dist/assets/ja-C5orBePq.js +0 -3
- package/dist/assets/ko-BeIurXFC.js +0 -3
- package/dist/assets/pt-BED0VqHV.js +0 -1
- package/dist/assets/ru-B5wj2v7e.js +0 -1
- package/dist/assets/schema-BNNwED-s.js +0 -28
- package/dist/assets/sdk-DKS71jwM.js +0 -1
- package/dist/assets/session-Denx5-a_.js +0 -1
- package/dist/assets/wrap-locale-HbAVHA9D.js +0 -1
- package/dist/assets/zh-tw-B_su4eMW.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var
|
|
1
|
+
var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ve=(e,t,n)=>ho(e,typeof t!="symbol"?t+"":t,n);import{r as R,aW as go,gK as mo,j as a,cp as We,c_ as $,gL as hn,P as m,gM as bo,aV as gn,cj as V,a8 as Ie,f5 as wo,f3 as mn,gN as bn,dX as wn,d8 as L,ac as xo,ad as yo,N as T,gO as vo,l as G,gP as ko,gQ as xn,B as jo,gR as So,gS as X,bw as Io,gT as To,cJ as Pe,o as Y,gU as Ao,gV as Co,co as Eo,gW as Ro,s as U,gX as Oo,gY as yn,c8 as vn,bZ as ae,gZ as Po,aH as kn,ap as Mo,cr as jn,g_ as Lo,cB as No,e9 as re,a6 as Te,g$ as _o,h0 as Sn,fF as Dt,e3 as In,h1 as Bo,h2 as Do,n as Fo,cS as zo,g as qo,az as $o,aE as Je,h3 as Uo,C as Ho,h4 as Wo,F as Vo,gt as Go,aN as Zo,ci as Yo,R as Ft,h5 as Tn,cE as Qo,h6 as Ko}from"./index-CWbfhRhH.js";import"./index-CC2cdnYk.js";import"./index-CG1_igpG.js";import{d as Xo}from"./ExpandMore-BMpZ8Wgn.js";import{L as Jo}from"./ListItemButton-06IoaY7h.js";import"./index-BJdqQbbW.js";import"./index-C4Yo_q7y.js";import"./index-zTokKslW.js";import"./index-C-tSf3Nu.js";import{D as er}from"./index-g54V2euN.js";import{u as tr}from"./use-mobile-DRPYNh8e.js";/**
|
|
2
2
|
* (c) Iconify
|
|
3
3
|
*
|
|
4
4
|
* For the full copyright and license information, please view the license.txt
|
|
@@ -8,7 +8,7 @@ var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,config
|
|
|
8
8
|
*
|
|
9
9
|
* @license MIT
|
|
10
10
|
* @version 1.0.8
|
|
11
|
-
*/const An=Object.freeze({left:0,top:0,width:16,height:16}),Te=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ue=Object.freeze({...An,...Te}),et=Object.freeze({...ue,body:"",hidden:!1}),nr=Object.freeze({width:null,height:null}),Cn=Object.freeze({...nr,...Te});function or(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}const rr=/[\s,]+/;function ir(e,t){t.split(rr).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const En={...Cn,preserveAspectRatio:""};function zt(e){const t={...En},n=(o,r)=>e.getAttribute(o)||r;return t.width=n("width",null),t.height=n("height",null),t.rotate=or(n("rotate","")),ir(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function sr(e,t){for(const n in En)if(e[n]!==t[n])return!0;return!1}const ie=/^[a-z0-9]+(-[a-z0-9]+)*$/,de=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const u=r.pop(),s=r.pop(),f={provider:r.length>0?r[0]:o,prefix:s,name:u};return t&&!ke(f)?null:f}const i=r[0],l=i.split("-");if(l.length>1){const u={provider:o,prefix:l.shift(),name:l.join("-")};return t&&!ke(u)?null:u}if(n&&o===""){const u={provider:o,prefix:"",name:i};return t&&!ke(u,n)?null:u}return null},ke=(e,t)=>e?!!((e.provider===""||e.provider.match(ie))&&(t&&e.prefix===""||e.prefix.match(ie))&&e.name.match(ie)):!1;function ar(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function qt(e,t){const n=ar(e,t);for(const o in et)o in Te?o in e&&!(o in n)&&(n[o]=Te[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function lr(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(l){if(n[l])return r[l]=[];if(!(l in r)){r[l]=null;const u=o[l]&&o[l].parent,s=u&&i(u);s&&(r[l]=[u].concat(s))}return r[l]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}function cr(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function l(u){i=qt(o[u]||r[u],i)}return l(t),n.forEach(l),qt(e,i)}function Rn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=lr(e);for(const r in o){const i=o[r];i&&(t(r,cr(e,r,i)),n.push(r))}return n}const ur={provider:"",aliases:{},not_found:{},...An};function We(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function On(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!We(e,ur))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r.match(ie)||typeof i.body!="string"||!We(i,et))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],l=i.parent;if(!r.match(ie)||typeof l!="string"||!n[l]&&!o[l]||!We(i,et))return null}return t}const Ae=Object.create(null);function dr(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function H(e,t){const n=Ae[e]||(Ae[e]=Object.create(null));return n[t]||(n[t]=dr(e,t))}function ct(e,t){return On(t)?Rn(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function fr(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function pr(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ae)).forEach(r=>{(typeof r=="string"&&typeof t=="string"?[t]:Object.keys(Ae[r]||{})).forEach(l=>{const u=H(r,l);n=n.concat(Object.keys(u.icons).map(s=>(r!==""?"@"+r+":":"")+l+":"+s))})}),n}let ae=!1;function Pn(e){return typeof e=="boolean"&&(ae=e),ae}function le(e){const t=typeof e=="string"?de(e,!0,ae):e;if(t){const n=H(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function Mn(e,t){const n=de(e,!0,ae);if(!n)return!1;const o=H(n.provider,n.prefix);return fr(o,n.name,t)}function $t(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),ae&&!t&&!e.prefix){let r=!1;return On(e)&&(e.prefix="",Rn(e,(i,l)=>{l&&Mn(i,l)&&(r=!0)})),r}const n=e.prefix;if(!ke({provider:t,prefix:n,name:"a"}))return!1;const o=H(t,n);return!!ct(o,e)}function hr(e){return!!le(e)}function gr(e){const t=le(e);return t?{...ue,...t}:null}function mr(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,l=r.prefix,u=r.name,s=n[i]||(n[i]=Object.create(null)),f=s[l]||(s[l]=H(i,l));let h;u in f.icons?h=t.loaded:l===""||f.missing.has(u)?h=t.missing:h=t.pending;const x={provider:i,prefix:l,name:u};h.push(x)}),t}function Ln(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function br(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const l=i.icons,u=l.pending.length;l.pending=l.pending.filter(s=>{if(s.prefix!==r)return!0;const f=s.name;if(e.icons[f])l.loaded.push({provider:o,prefix:r,name:f});else if(e.missing.has(f))l.missing.push({provider:o,prefix:r,name:f});else return n=!0,!0;return!1}),l.pending.length!==u&&(n||Ln([e],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}let wr=0;function xr(e,t,n){const o=wr++,r=Ln.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(i)}),r}const tt=Object.create(null);function Ut(e,t){tt[e]=t}function nt(e){return tt[e]||tt[""]}function yr(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?de(r,t,n):r;i&&o.push(i)}),o}var vr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function kr(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let l;if(e.random){let k=e.resources.slice(0);for(l=[];k.length>1;){const E=Math.floor(Math.random()*k.length);l.push(k[E]),k=k.slice(0,E).concat(k.slice(E+1))}l=l.concat(k)}else l=e.resources.slice(i).concat(e.resources.slice(0,i));const u=Date.now();let s="pending",f=0,h,x=null,c=[],p=[];typeof o=="function"&&p.push(o);function d(){x&&(clearTimeout(x),x=null)}function g(){s==="pending"&&(s="aborted"),d(),c.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),c=[]}function b(k,E){E&&(p=[]),typeof k=="function"&&p.push(k)}function S(){return{startTime:u,payload:t,status:s,queriesSent:f,queriesPending:c.length,subscribe:b,abort:g}}function j(){s="failed",p.forEach(k=>{k(void 0,h)})}function y(){c.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),c=[]}function w(k,E,_){const N=E!=="success";switch(c=c.filter(B=>B!==k),s){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){h=_,j();return}if(N){h=_,c.length||(l.length?v():j());return}if(d(),y(),!e.random){const B=e.resources.indexOf(k.resource);B!==-1&&B!==e.index&&(e.index=B)}s="completed",p.forEach(B=>{B(_)})}function v(){if(s!=="pending")return;d();const k=l.shift();if(k===void 0){if(c.length){x=setTimeout(()=>{d(),s==="pending"&&(y(),j())},e.timeout);return}j();return}const E={status:"pending",resource:k,callback:(_,N)=>{w(E,_,N)}};c.push(E),f++,x=setTimeout(v,e.rotate),n(k,t,E.callback)}return setTimeout(v),S}function Nn(e){const t={...vr,...e};let n=[];function o(){n=n.filter(u=>u().status==="pending")}function r(u,s,f){const h=kr(t,u,s,(x,c)=>{o(),f&&f(x,c)});return n.push(h),h}function i(u){return n.find(s=>u(s))||null}return{query:r,find:i,setIndex:u=>{t.index=u},getIndex:()=>t.index,cleanup:o}}function ut(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,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 Pe=Object.create(null),oe=["https://api.simplesvg.com","https://api.unisvg.com"],je=[];for(;oe.length>0;)oe.length===1||Math.random()>.5?je.push(oe.shift()):je.push(oe.pop());Pe[""]=ut({resources:["https://api.iconify.design"].concat(je)});function Ht(e,t){const n=ut(t);return n===null?!1:(Pe[e]=n,!0)}function Me(e){return Pe[e]}function jr(){return Object.keys(Pe)}function Wt(){}const Ve=Object.create(null);function Sr(e){if(!Ve[e]){const t=Me(e);if(!t)return;const n=Nn(t),o={config:t,redundancy:n};Ve[e]=o}return Ve[e]}function _n(e,t,n){let o,r;if(typeof e=="string"){const i=nt(e);if(!i)return n(void 0,424),Wt;r=i.send;const l=Sr(e);l&&(o=l.redundancy)}else{const i=ut(e);if(i){o=Nn(i);const l=e.resources?e.resources[0]:"",u=nt(l);u&&(r=u.send)}}return!o||!r?(n(void 0,424),Wt):o.query(t,r,n)().abort}const Vt="iconify2",ce="iconify",Bn=ce+"-count",Gt=ce+"-version",Dn=36e5,Ir=168;function ot(e,t){try{return e.getItem(t)}catch{}}function dt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Zt(e,t){try{e.removeItem(t)}catch{}}function rt(e,t){return dt(e,Bn,t.toString())}function it(e){return parseInt(ot(e,Bn))||0}const Z={local:!0,session:!0},Fn={local:new Set,session:new Set};let ft=!1;function Tr(e){ft=e}let ve=typeof window>"u"?{}:window;function zn(e){const t=e+"Storage";try{if(ve&&ve[t]&&typeof ve[t].length=="number")return ve[t]}catch{}Z[e]=!1}function qn(e,t){const n=zn(e);if(!n)return;const o=ot(n,Gt);if(o!==Vt){if(o){const u=it(n);for(let s=0;s<u;s++)Zt(n,ce+s.toString())}dt(n,Gt,Vt),rt(n,0);return}const r=Math.floor(Date.now()/Dn)-Ir,i=u=>{const s=ce+u.toString(),f=ot(n,s);if(typeof f=="string"){try{const h=JSON.parse(f);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>r&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&t(h,u))return!0}catch{}Zt(n,s)}};let l=it(n);for(let u=l-1;u>=0;u--)i(u)||(u===l-1?(l--,rt(n,l)):Fn[e].add(u))}function $n(){if(!ft){Tr(!0);for(const e in Z)qn(e,t=>{const n=t.data,o=t.provider,r=n.prefix,i=H(o,r);if(!ct(i,n).length)return!1;const l=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,l):l,!0})}}function Ar(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const o in Z)qn(o,r=>{const i=r.data;return r.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Cr(e,t){ft||$n();function n(o){let r;if(!Z[o]||!(r=zn(o)))return;const i=Fn[o];let l;if(i.size)i.delete(l=Array.from(i).shift());else if(l=it(r),!rt(r,l+1))return;const u={cached:Math.floor(Date.now()/Dn),provider:e.provider,data:t};return dt(r,ce+l.toString(),JSON.stringify(u))}t.lastModified&&!Ar(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Yt(){}function Er(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,br(e)}))}function Rr(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;delete e.iconsToLoad;let i;if(!r||!(i=nt(n)))return;i.prepare(n,o,r).forEach(u=>{_n(n,u,s=>{if(typeof s!="object")u.icons.forEach(f=>{e.missing.add(f)});else try{const f=ct(e,s);if(!f.length)return;const h=e.pendingIcons;h&&f.forEach(x=>{h.delete(x)}),Cr(e,s)}catch(f){console.error(f)}Er(e)})})}))}const pt=(e,t)=>{const n=yr(e,!0,Pn()),o=mr(n);if(!o.pending.length){let s=!0;return t&&setTimeout(()=>{s&&t(o.loaded,o.missing,o.pending,Yt)}),()=>{s=!1}}const r=Object.create(null),i=[];let l,u;return o.pending.forEach(s=>{const{provider:f,prefix:h}=s;if(h===u&&f===l)return;l=f,u=h,i.push(H(f,h));const x=r[f]||(r[f]=Object.create(null));x[h]||(x[h]=[])}),o.pending.forEach(s=>{const{provider:f,prefix:h,name:x}=s,c=H(f,h),p=c.pendingIcons||(c.pendingIcons=new Set);p.has(x)||(p.add(x),r[f][h].push(x))}),i.forEach(s=>{const{provider:f,prefix:h}=s;r[f][h].length&&Rr(s,r[f][h])}),t?xr(t,o,i):Yt},Or=e=>new Promise((t,n)=>{const o=typeof e=="string"?de(e,!0):e;if(!o){n(e);return}pt([o||e],r=>{if(r.length&&o){const i=le(o);if(i){t({...ue,...i});return}}n(e)})});function Pr(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function Mr(e,t){const n=typeof e=="string"?de(e,!0,!0):null;if(!n){const i=Pr(e);return{value:e,data:i}}const o=le(n);if(o!==void 0||!n.prefix)return{value:e,name:n,data:o};const r=pt([n],()=>t(e,n,le(n)));return{value:e,name:n,loading:r}}function Ge(e){return e.hasAttribute("inline")}let Un=!1;try{Un=navigator.vendor.indexOf("Apple")===0}catch{}function Lr(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(Un||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Nr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_r=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function st(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(Nr);if(o===null||!o.length)return e;const r=[];let i=o.shift(),l=_r.test(i);for(;;){if(l){const u=parseFloat(i);isNaN(u)?r.push(i):r.push(Math.ceil(u*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");l=!l}}const Br=e=>e==="unset"||e==="undefined"||e==="none";function Hn(e,t){const n={...ue,...e},o={...Cn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(d=>{const g=[],b=d.hFlip,S=d.vFlip;let j=d.rotate;b?S?j+=2:(g.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),g.push("scale(-1 1)"),r.top=r.left=0):S&&(g.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),g.push("scale(1 -1)"),r.top=r.left=0);let y;switch(j<0&&(j-=Math.floor(j/4)*4),j=j%4,j){case 1:y=r.height/2+r.top,g.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:g.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:y=r.width/2+r.left,g.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}j%2===1&&(r.left!==r.top&&(y=r.left,r.left=r.top,r.top=y),r.width!==r.height&&(y=r.width,r.width=r.height,r.height=y)),g.length&&(i='<g transform="'+g.join(" ")+'">'+i+"</g>")});const l=o.width,u=o.height,s=r.width,f=r.height;let h,x;l===null?(x=u===null?"1em":u==="auto"?f:u,h=st(x,s/f)):(h=l==="auto"?s:l,x=u===null?st(h,f/s):u==="auto"?f:u);const c={},p=(d,g)=>{Br(g)||(c[d]=g.toString())};return p("width",h),p("height",x),c.viewBox=r.left.toString()+" "+r.top.toString()+" "+s.toString()+" "+f.toString(),{attributes:c,body:i}}const Dr=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ce=Dr();function Fr(e){Ce=e}function zr(){return Ce}function qr(e,t){const n=Me(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(l=>{r=Math.max(r,l.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function $r(e){return e===404}const Ur=(e,t,n)=>{const o=[],r=qr(e,t),i="icons";let l={type:i,provider:e,prefix:t,icons:[]},u=0;return n.forEach((s,f)=>{u+=s.length+1,u>=r&&f>0&&(o.push(l),l={type:i,provider:e,prefix:t,icons:[]},u=s.length),l.icons.push(s)}),o.push(l),o};function Hr(e){if(typeof e=="string"){const t=Me(e);if(t)return t.path}return"/"}const Wr=(e,t,n)=>{if(!Ce){n("abort",424);return}let o=Hr(t.provider);switch(t.type){case"icons":{const i=t.prefix,u=t.icons.join(","),s=new URLSearchParams({icons:u});o+=i+".json?"+s.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;Ce(e+o).then(i=>{const l=i.status;if(l!==200){setTimeout(()=>{n($r(l)?"abort":"next",l)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},Vr={prepare:Ur,send:Wr};function Qt(e,t){switch(e){case"local":case"session":Z[e]=t;break;case"all":for(const n in Z)Z[n]=t;break}}const Ze="data-style";let Wn="";function Gr(e){Wn=e}function Kt(e,t){let n=Array.from(e.childNodes).find(o=>o.hasAttribute&&o.hasAttribute(Ze));n||(n=document.createElement("style"),n.setAttribute(Ze,Ze),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+Wn}function Vn(){Ut("",Vr),Pn(!0);let e;try{e=window}catch{}if(e){if($n(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!$t(r))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const o in n){const r="IconifyProviders["+o+"] is invalid.";try{const i=n[o];if(typeof i!="object"||!i||i.resources===void 0)continue;Ht(o,i)||console.error(r)}catch{console.error(r)}}}}return{enableCache:n=>Qt(n,!0),disableCache:n=>Qt(n,!1),iconExists:hr,getIcon:gr,listIcons:pr,addIcon:Mn,addCollection:$t,calculateSize:st,buildIcon:Hn,loadIcons:pt,loadIcon:Or,addAPIProvider:Ht,appendCustomStyle:Gr,_api:{getAPIConfig:Me,setAPIModule:Ut,sendAPIQuery:_n,setFetch:Fr,getFetch:zr,listAPIProviders:jr}}}function Gn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Zr(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Yr(e){return"data:image/svg+xml,"+Zr(e)}function Qr(e){return'url("'+Yr(e)+'")'}const at={"background-color":"currentColor"},Zn={"background-color":"transparent"},Xt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Jt={"-webkit-mask":at,mask:at,background:Zn};for(const e in Jt){const t=Jt[e];for(const n in Xt)t[e+"-"+n]=Xt[n]}function en(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Kr(e,t,n){const o=document.createElement("span");let r=e.body;r.indexOf("<a")!==-1&&(r+="<!-- "+Date.now()+" -->");const i=e.attributes,l=Gn(r,{...i,width:t.width+"",height:t.height+""}),u=Qr(l),s=o.style,f={"--svg":u,width:en(i.width),height:en(i.height),...n?at:Zn};for(const h in f)s.setProperty(h,f[h]);return o}let se;function Xr(){try{se=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{se=null}}function Jr(e){return se===void 0&&Xr(),se?se.createHTML(e):e}function ei(e){const t=document.createElement("span"),n=e.attributes;let o="";n.width||(o="width: inherit;"),n.height||(o+="height: inherit;"),o&&(n.style=o);const r=Gn(e.body,n);return t.innerHTML=Jr(r),t.firstChild}function tn(e,t){const n=t.icon.data,o=t.customisations,r=Hn(n,o);o.preserveAspectRatio&&(r.attributes.preserveAspectRatio=o.preserveAspectRatio);const i=t.renderedMode;let l;switch(i){case"svg":l=ei(r);break;default:l=Kr(r,{...ue,...n},i==="mask")}const u=Array.from(e.childNodes).find(s=>{const f=s.tagName&&s.tagName.toUpperCase();return f==="SPAN"||f==="SVG"});u?l.tagName==="SPAN"&&u.tagName===l.tagName?u.setAttribute("style",l.getAttribute("style")):e.replaceChild(l,u):e.appendChild(l)}function nn(e,t,n){const o=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:o}}function ti(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const o=t.get(e);if(o)return o;const r=["icon","mode","inline","width","height","rotate","flip"],i=class extends n{constructor(){super();ye(this,"_shadowRoot");ye(this,"_state");ye(this,"_checkQueued",!1);const s=this._shadowRoot=this.attachShadow({mode:"open"}),f=Ge(this);Kt(s,f),this._state=nn({value:""},f),this._queueCheck()}static get observedAttributes(){return r.slice(0)}attributeChangedCallback(s){if(s==="inline"){const f=Ge(this),h=this._state;f!==h.inline&&(h.inline=f,Kt(this._shadowRoot,f))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Ge(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const f=this._shadowRoot;if(s.renderedMode==="svg")try{f.lastChild.setCurrentTime(0);return}catch{}tn(f,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,f=this.getAttribute("icon");if(f!==s.icon.value){this._iconChanged(f);return}if(!s.rendered)return;const h=this.getAttribute("mode"),x=zt(this);(s.attrMode!==h||sr(s.customisations,x))&&this._renderIcon(s.icon,x,h)}_iconChanged(s){const f=Mr(s,(h,x,c)=>{const p=this._state;if(p.rendered||this.getAttribute("icon")!==h)return;const d={value:h,name:x,data:c};d.data?this._gotIconData(d):p.icon=d});f.data?this._gotIconData(f):this._state=nn(f,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,zt(this),this.getAttribute("mode"))}_renderIcon(s,f,h){const x=Lr(s.data.body,h),c=this._state.inline;tn(this._shadowRoot,this._state={rendered:!0,icon:s,inline:c,customisations:f,attrMode:h,renderedMode:x})}};r.forEach(u=>{u in i.prototype||Object.defineProperty(i.prototype,u,{get:function(){return this.getAttribute(u)},set:function(s){s!==null?this.setAttribute(u,s):this.removeAttribute(u)}})});const l=Vn();for(const u in l)i[u]=i.prototype[u]=l[u];return t.define(e,i),i}ti()||Vn();const Q=(e,t,n="children")=>e.map(o=>Array.isArray(o[n])?t({...o,[n]:Q(o[n],t,n)}):t(o)),Yn=(e,t="children")=>{const n=[];return Q(e,o=>n.push(o),t),n},ht=(e,t,n="children")=>e.map(o=>({...o})).filter(o=>{const r=o[n];if(Array.isArray(r)){const l=ht(r,t,n);o[n]=l!=null&&l.length?l:void 0}const i={filteredChildren:o[n],isLeaf:!(r!=null&&r.length)};return t(o,i)}),Qn=e=>/^https?:\/\//.test(e),ni=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=r=>r.endsWith("/")?r:`${r}/`,n=t(window.location.pathname),o=t(new URL(e,window.location.origin).pathname);return n.startsWith(o)},Kn=(e=[])=>{const t=e.map((o,r)=>({path:o,index:r})).filter(o=>ni(o.path));return t!=null&&t.length?t.slice(1).reduce((o,r)=>o.path.length>=r.path.length?o:r,t[0]).index:-1};function gt({icon:e,size:t,sx:n,...o}){const r=[...Array.isArray(n)?n:[n]];t&&r.push({width:t,height:t});const[i,l]=R.useState(!1),[u,s]=R.useState(!0);if(go(async()=>{s(!0);try{await mo(e),l(!0)}catch{l(!1)}s(!1)},[e]),o.variant||r.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),Qn(e))return a.jsx(He,{component:"span",...o,src:e,sx:r});const f=t?.6*t+4:0;return u?a.jsx($,{icon:"codicon:blank",height:f||void 0}):i?a.jsx(He,{component:"span",...o,sx:r,children:a.jsx($,{icon:e,height:f||void 0})}):e&&typeof e=="string"?(r.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),a.jsx(He,{component:"span",...o,sx:r,children:Array.from(e)[0]})):null}const oi=hn();function Le({theme:e,children:t}){const n=e?hn(e):oi;return a.jsx(bo,{theme:n,children:t})}Le.propTypes={children:m.any.isRequired,theme:m.object};Le.defaultProps={theme:null};var fn,pn;const Ee=((fn=window==null?void 0:window.blocklet)==null?void 0:fn.groupPrefix)||((pn=window==null?void 0:window.blocklet)==null?void 0:pn.prefix)||"/",ri=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ii=(e,t="en")=>{if(typeof e=="string"){if(Qn(e)){const o=new URL(e);return o.searchParams.set("locale",t),o.href}const n=new URL(e,window.location.origin);return n.searchParams.set("locale",t),n.pathname+n.search}return typeof e=="object"?e[t]||(e==null?void 0:e.en)||(e==null?void 0:e.zh):e},J=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(o,r)=>typeof o=="string"?o:typeof o=="object"?o[r]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o;return Q(e,o=>{var r;return{...o,title:n(o.title,t),link:(r=o.items)!=null&&r.length?o.link:ii(o.link,t),_rawLink:o.link}},"items")},si=e=>Q(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),ai=e=>{if(!(e!=null&&e.length))return null;const t=si(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(o=>{var r;o.section?Array.isArray(o.section)?o.section.forEach(i=>{var l;(l=n[i])==null||l.push(o)}):typeof o.section=="string"&&((r=n[o.section])==null||r.push(o)):n.header.push(o)}),n},mt=e=>{if(!e)return null;const t={...e};return t.theme=ri(t.theme),t.navigation=ai(li(t.navigation)),t},li=(e=[])=>ht(e,(t,n)=>{var o;return!!t.link||((o=n.filteredChildren)==null?void 0:o.length)},"items"),Xn=(e,t)=>ht(e,(n,o)=>{var i;const r=!n.role||t&&(n.role.includes(t)||n.role.includes("guest"));return o.isLeaf?r:r&&((i=o.filteredChildren)==null?void 0:i.length)},"items"),ci={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},ui={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function di({session:e,locale:t="zh",size:n=24}){const o=(window==null?void 0:window.blocklet)||{},r=(o.navigation||[]).filter(s=>s.section==="sessionManager"&&!["/sessionManager"].includes(s.id)).filter(s=>{var f;return!!((s==null?void 0:s.role)||[]).includes(((f=e==null?void 0:e.user)==null?void 0:f.role)||"guest")}).map(s=>{const f=((o==null?void 0:o.componentMountPoints)||[]).find(h=>s.component===h.name);return{...s,component:f}}),i=R.useRef(null),l=gn({open:!1}),u=V((s=!l.open)=>{l.open=s});return r.length===0||!(e!=null&&e.user)?null:a.jsxs(a.Fragment,{children:[a.jsx(Se,{size:"medium",ref:i,onClick:()=>u(),children:a.jsx($,{icon:ci,fontSize:n,style:{transform:"scale(1.08)"}})}),a.jsx(wo,{open:l.open,anchorEl:i.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:s})=>a.jsx(mn,{onClickAway:f=>{f.preventDefault(),f.stopPropagation(),u(!1)},children:a.jsx(bn,{...s,timeout:350,children:a.jsxs(wn,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:L.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${L.gray6}, 0px 0px 0px 1px ${L.gray6}`},children:[a.jsx(xo,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:r.map(f=>{var h;return a.jsx(yo,{disablePadding:!0,children:a.jsxs(Jo,{href:f.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:L.surfacePrimarySubtitle}},children:[(h=f==null?void 0:f.component)!=null&&h.did?a.jsx(T,{component:"img",src:`${vo}/blocklet/logo-bundle/${f.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):a.jsx($,{fontSize:50,icon:f.icon||ui,color:L.textSubtitle}),a.jsx(G,{sx:{fontSize:"12px",color:L.textBase,textAlign:"center",lineHeight:"normal"},children:ko(f.title,t)})]})},f.id)})}),a.jsx(xn,{session:e,children:a.jsx(jo,{variant:"outlined",fullWidth:!0,href:So,sx:{mt:1,borderRadius:2,color:L.textBase,borderColor:L.lineBorderStrong,"&:hover":{color:L.primaryBase,borderColor:L.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}const Jn=m.shape({appLogo:m.node,appName:m.string,theme:m.shape({background:m.string}),enableConnect:m.bool,enableLocale:m.bool,navigation:m.arrayOf(m.shape({title:m.oneOfType([m.string,m.object]),link:m.oneOfType([m.string,m.object]),icon:m.string,items:m.arrayOf(m.shape({title:m.oneOfType([m.string,m.object]),link:m.oneOfType([m.string,m.object])}))}))}),eo=m.shape({showText:m.bool,showRole:m.bool,switchDid:m.bool,switchProfile:m.bool,switchPassport:m.bool,disableLogout:m.bool,onLogin:m.func,onLogout:m.func,onSwitchDid:m.func,onSwitchProfile:m.func,onSwitchPassport:m.func,menu:m.array,menuRender:m.func,dark:m.bool,size:m.number});function bt({session:e={}}){const{unReadCount:t}=e,n=X(()=>{const{navigation:o}=window.blocklet??{},r=o==null?void 0:o.find(i=>i.id==="/userCenter/notification");return r==null?void 0:r.link});return!e.user||!n?null:a.jsx(Se,{size:"medium",variant:"outlined",href:n,sx:{borderRadius:2,borderColor:L.lineBorderStrong,"&:hover":{borderRadius:"50%"}},children:a.jsx(Io,{variant:"dot",color:"error",invisible:t===0,children:a.jsx(To,{style:{width:"auto",height:24}})})})}bt.propTypes={session:m.object};bt.defaultProps={session:{}};const fi=()=>{var t;return!!(((t=window==null?void 0:window.blocklet)==null?void 0:t.navigation)??[]).find(n=>n.id==="/userCenter/notification")};function Ne({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var c,p,d,g;const o=R.useContext(Oe),{locale:r}=Y()||{},{enableConnect:i=!0,enableLocale:l=!0}=e,u=!!((c=o==null?void 0:o.session)!=null&&c.user);let s=J((p=e==null?void 0:e.navigation)==null?void 0:p.sessionManager,r)||[];s=Xn(s,(g=(d=o==null?void 0:o.session)==null?void 0:d.user)==null?void 0:g.role);const h=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let b=[];if(fi()&&b.push(a.jsx(bt,{session:o.session},"notification-addon")),l&&r&&b.push(a.jsx(Ao,{showText:!1},"locale-selector")),i&&o){const S=[];u&&(s?s.slice(0,5):[]).forEach(y=>{S.push({label:y.title,icon:y.icon?a.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),b.push(a.jsx(di,{session:o.session,locale:r},"session-blocklet")),b.push(a.jsx(Co,{session:o.session,locale:r,menu:S,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(b=t(b)||[]),b})();return R.createElement(a.Fragment,null,...Array.isArray(h)?h:[h])}Ne.propTypes={formattedBlocklet:m.object.isRequired,addons:m.oneOfType([m.func,m.node]),sessionManagerProps:eo};Ne.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const to=()=>{const e=Eo();R.useEffect(()=>{(e.wallet||e.arcSphere)&&Ro.call("arcHideTopBar","{}")},[e])},pi=e=>{if(!(e!=null&&e.length))return{navItems:[],activeId:null};let t=1;const o=Q(e,l=>{var f,h;const u=l.icon?a.jsx(gt,{icon:l.icon}):null;if(l.items)return{id:`${t++}`,label:l.title,icon:u,children:l.items};let s={};return((f=l.link)!=null&&f.startsWith("http://")||(h=l.link)!=null&&h.startsWith("https://"))&&(s={target:"_blank",rel:"noreferrer"}),{id:`${t++}`,label:a.jsx("a",{href:l.link,...s,children:l.title}),icon:u,link:l.link}},"items"),r=Yn(o),i=Kn(r.map(l=>l.link));return{navItems:o,activeId:i>=0?r[i].id:null}};function hi({meta:e={},addons:t,sessionManagerProps:n={showRole:!0},homeLink:o=Ee,theme:r,hideNavMenu:i=!1,...l}){var j,y;to();const{locale:u}=Y()||{},s=R.useMemo(()=>{const w=Object.assign({},window.blocklet,e);try{return mt(w)}catch(v){return console.error("Failed to format blocklet info",v,w),w}},[e]);if(!s.appName)return null;const{appLogo:f,appLogoRect:h,theme:x}=s,c=J((j=s==null?void 0:s.navigation)==null?void 0:j.header,u),p=pi(c),{navItems:d,activeId:g}=p,b=typeof t=="function"?w=>t(w,{navigation:p}):t,S=a.jsx(Ne,{formattedBlocklet:s,addons:b,sessionManagerProps:n});return a.jsx(Le,{theme:r,children:a.jsx(gi,{homeLink:o,logo:a.jsx("img",{src:h||f,alt:"logo"}),addons:S,...vn(l,["bordered"]),$bordered:l==null?void 0:l.bordered,$bgcolor:(y=x==null?void 0:x.background)==null?void 0:y.header,children:i||!(d!=null&&d.length)?null:({isMobile:w})=>a.jsx(Po,{mode:w?"inline":"horizontal",activeId:g,items:d,className:"header-nav",bgColor:"transparent",textColor:"#777"})})})}const gi=U(Oo)`
|
|
11
|
+
*/const An=Object.freeze({left:0,top:0,width:16,height:16}),Ae=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),de=Object.freeze({...An,...Ae}),et=Object.freeze({...de,body:"",hidden:!1}),nr=Object.freeze({width:null,height:null}),Cn=Object.freeze({...nr,...Ae});function or(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function o(r){for(;r<0;)r+=4;return r%4}if(n===""){const r=parseInt(e);return isNaN(r)?0:o(r)}else if(n!==e){let r=0;switch(n){case"%":r=25;break;case"deg":r=90}if(r){let i=parseFloat(e.slice(0,e.length-n.length));return isNaN(i)?0:(i=i/r,i%1===0?o(i):0)}}return t}const rr=/[\s,]+/;function ir(e,t){t.split(rr).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}const En={...Cn,preserveAspectRatio:""};function zt(e){const t={...En},n=(o,r)=>e.getAttribute(o)||r;return t.width=n("width",null),t.height=n("height",null),t.rotate=or(n("rotate","")),ir(t,n("flip","")),t.preserveAspectRatio=n("preserveAspectRatio",n("preserveaspectratio","")),t}function sr(e,t){for(const n in En)if(e[n]!==t[n])return!0;return!1}const ie=/^[a-z0-9]+(-[a-z0-9]+)*$/,fe=(e,t,n,o="")=>{const r=e.split(":");if(e.slice(0,1)==="@"){if(r.length<2||r.length>3)return null;o=r.shift().slice(1)}if(r.length>3||!r.length)return null;if(r.length>1){const u=r.pop(),s=r.pop(),f={provider:r.length>0?r[0]:o,prefix:s,name:u};return t&&!je(f)?null:f}const i=r[0],l=i.split("-");if(l.length>1){const u={provider:o,prefix:l.shift(),name:l.join("-")};return t&&!je(u)?null:u}if(n&&o===""){const u={provider:o,prefix:"",name:i};return t&&!je(u,n)?null:u}return null},je=(e,t)=>e?!!((e.provider===""||e.provider.match(ie))&&(t&&e.prefix===""||e.prefix.match(ie))&&e.name.match(ie)):!1;function ar(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const o=((e.rotate||0)+(t.rotate||0))%4;return o&&(n.rotate=o),n}function qt(e,t){const n=ar(e,t);for(const o in et)o in Ae?o in e&&!(o in n)&&(n[o]=Ae[o]):o in t?n[o]=t[o]:o in e&&(n[o]=e[o]);return n}function lr(e,t){const n=e.icons,o=e.aliases||Object.create(null),r=Object.create(null);function i(l){if(n[l])return r[l]=[];if(!(l in r)){r[l]=null;const u=o[l]&&o[l].parent,s=u&&i(u);s&&(r[l]=[u].concat(s))}return r[l]}return Object.keys(n).concat(Object.keys(o)).forEach(i),r}function cr(e,t,n){const o=e.icons,r=e.aliases||Object.create(null);let i={};function l(u){i=qt(o[u]||r[u],i)}return l(t),n.forEach(l),qt(e,i)}function Rn(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(r=>{t(r,null),n.push(r)});const o=lr(e);for(const r in o){const i=o[r];i&&(t(r,cr(e,r,i)),n.push(r))}return n}const ur={provider:"",aliases:{},not_found:{},...An};function Ve(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function On(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!Ve(e,ur))return null;const n=t.icons;for(const r in n){const i=n[r];if(!r.match(ie)||typeof i.body!="string"||!Ve(i,et))return null}const o=t.aliases||Object.create(null);for(const r in o){const i=o[r],l=i.parent;if(!r.match(ie)||typeof l!="string"||!n[l]&&!o[l]||!Ve(i,et))return null}return t}const Ce=Object.create(null);function dr(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function H(e,t){const n=Ce[e]||(Ce[e]=Object.create(null));return n[t]||(n[t]=dr(e,t))}function ct(e,t){return On(t)?Rn(t,(n,o)=>{o?e.icons[n]=o:e.missing.add(n)}):[]}function fr(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}function pr(e,t){let n=[];return(typeof e=="string"?[e]:Object.keys(Ce)).forEach(r=>{(typeof r=="string"&&typeof t=="string"?[t]:Object.keys(Ce[r]||{})).forEach(l=>{const u=H(r,l);n=n.concat(Object.keys(u.icons).map(s=>(r!==""?"@"+r+":":"")+l+":"+s))})}),n}let le=!1;function Pn(e){return typeof e=="boolean"&&(le=e),le}function ce(e){const t=typeof e=="string"?fe(e,!0,le):e;if(t){const n=H(t.provider,t.prefix),o=t.name;return n.icons[o]||(n.missing.has(o)?null:void 0)}}function Mn(e,t){const n=fe(e,!0,le);if(!n)return!1;const o=H(n.provider,n.prefix);return fr(o,n.name,t)}function $t(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),le&&!t&&!e.prefix){let r=!1;return On(e)&&(e.prefix="",Rn(e,(i,l)=>{l&&Mn(i,l)&&(r=!0)})),r}const n=e.prefix;if(!je({provider:t,prefix:n,name:"a"}))return!1;const o=H(t,n);return!!ct(o,e)}function hr(e){return!!ce(e)}function gr(e){const t=ce(e);return t?{...de,...t}:null}function mr(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((r,i)=>r.provider!==i.provider?r.provider.localeCompare(i.provider):r.prefix!==i.prefix?r.prefix.localeCompare(i.prefix):r.name.localeCompare(i.name));let o={provider:"",prefix:"",name:""};return e.forEach(r=>{if(o.name===r.name&&o.prefix===r.prefix&&o.provider===r.provider)return;o=r;const i=r.provider,l=r.prefix,u=r.name,s=n[i]||(n[i]=Object.create(null)),f=s[l]||(s[l]=H(i,l));let h;u in f.icons?h=t.loaded:l===""||f.missing.has(u)?h=t.missing:h=t.pending;const x={provider:i,prefix:l,name:u};h.push(x)}),t}function Ln(e,t){e.forEach(n=>{const o=n.loaderCallbacks;o&&(n.loaderCallbacks=o.filter(r=>r.id!==t))})}function br(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const o=e.provider,r=e.prefix;t.forEach(i=>{const l=i.icons,u=l.pending.length;l.pending=l.pending.filter(s=>{if(s.prefix!==r)return!0;const f=s.name;if(e.icons[f])l.loaded.push({provider:o,prefix:r,name:f});else if(e.missing.has(f))l.missing.push({provider:o,prefix:r,name:f});else return n=!0,!0;return!1}),l.pending.length!==u&&(n||Ln([e],i.id),i.callback(l.loaded.slice(0),l.missing.slice(0),l.pending.slice(0),i.abort))})}))}let wr=0;function xr(e,t,n){const o=wr++,r=Ln.bind(null,n,o);if(!t.pending.length)return r;const i={id:o,icons:t,callback:e,abort:r};return n.forEach(l=>{(l.loaderCallbacks||(l.loaderCallbacks=[])).push(i)}),r}const tt=Object.create(null);function Ut(e,t){tt[e]=t}function nt(e){return tt[e]||tt[""]}function yr(e,t=!0,n=!1){const o=[];return e.forEach(r=>{const i=typeof r=="string"?fe(r,t,n):r;i&&o.push(i)}),o}var vr={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function kr(e,t,n,o){const r=e.resources.length,i=e.random?Math.floor(Math.random()*r):e.index;let l;if(e.random){let k=e.resources.slice(0);for(l=[];k.length>1;){const E=Math.floor(Math.random()*k.length);l.push(k[E]),k=k.slice(0,E).concat(k.slice(E+1))}l=l.concat(k)}else l=e.resources.slice(i).concat(e.resources.slice(0,i));const u=Date.now();let s="pending",f=0,h,x=null,c=[],p=[];typeof o=="function"&&p.push(o);function d(){x&&(clearTimeout(x),x=null)}function g(){s==="pending"&&(s="aborted"),d(),c.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),c=[]}function b(k,E){E&&(p=[]),typeof k=="function"&&p.push(k)}function S(){return{startTime:u,payload:t,status:s,queriesSent:f,queriesPending:c.length,subscribe:b,abort:g}}function j(){s="failed",p.forEach(k=>{k(void 0,h)})}function y(){c.forEach(k=>{k.status==="pending"&&(k.status="aborted")}),c=[]}function w(k,E,_){const N=E!=="success";switch(c=c.filter(B=>B!==k),s){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(E==="abort"){h=_,j();return}if(N){h=_,c.length||(l.length?v():j());return}if(d(),y(),!e.random){const B=e.resources.indexOf(k.resource);B!==-1&&B!==e.index&&(e.index=B)}s="completed",p.forEach(B=>{B(_)})}function v(){if(s!=="pending")return;d();const k=l.shift();if(k===void 0){if(c.length){x=setTimeout(()=>{d(),s==="pending"&&(y(),j())},e.timeout);return}j();return}const E={status:"pending",resource:k,callback:(_,N)=>{w(E,_,N)}};c.push(E),f++,x=setTimeout(v,e.rotate),n(k,t,E.callback)}return setTimeout(v),S}function Nn(e){const t={...vr,...e};let n=[];function o(){n=n.filter(u=>u().status==="pending")}function r(u,s,f){const h=kr(t,u,s,(x,c)=>{o(),f&&f(x,c)});return n.push(h),h}function i(u){return n.find(s=>u(s))||null}return{query:r,find:i,setIndex:u=>{t.index=u},getIndex:()=>t.index,cleanup:o}}function ut(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,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 Me=Object.create(null),oe=["https://api.simplesvg.com","https://api.unisvg.com"],Se=[];for(;oe.length>0;)oe.length===1||Math.random()>.5?Se.push(oe.shift()):Se.push(oe.pop());Me[""]=ut({resources:["https://api.iconify.design"].concat(Se)});function Ht(e,t){const n=ut(t);return n===null?!1:(Me[e]=n,!0)}function Le(e){return Me[e]}function jr(){return Object.keys(Me)}function Wt(){}const Ge=Object.create(null);function Sr(e){if(!Ge[e]){const t=Le(e);if(!t)return;const n=Nn(t),o={config:t,redundancy:n};Ge[e]=o}return Ge[e]}function _n(e,t,n){let o,r;if(typeof e=="string"){const i=nt(e);if(!i)return n(void 0,424),Wt;r=i.send;const l=Sr(e);l&&(o=l.redundancy)}else{const i=ut(e);if(i){o=Nn(i);const l=e.resources?e.resources[0]:"",u=nt(l);u&&(r=u.send)}}return!o||!r?(n(void 0,424),Wt):o.query(t,r,n)().abort}const Vt="iconify2",ue="iconify",Bn=ue+"-count",Gt=ue+"-version",Dn=36e5,Ir=168;function ot(e,t){try{return e.getItem(t)}catch{}}function dt(e,t,n){try{return e.setItem(t,n),!0}catch{}}function Zt(e,t){try{e.removeItem(t)}catch{}}function rt(e,t){return dt(e,Bn,t.toString())}function it(e){return parseInt(ot(e,Bn))||0}const Z={local:!0,session:!0},Fn={local:new Set,session:new Set};let ft=!1;function Tr(e){ft=e}let ke=typeof window>"u"?{}:window;function zn(e){const t=e+"Storage";try{if(ke&&ke[t]&&typeof ke[t].length=="number")return ke[t]}catch{}Z[e]=!1}function qn(e,t){const n=zn(e);if(!n)return;const o=ot(n,Gt);if(o!==Vt){if(o){const u=it(n);for(let s=0;s<u;s++)Zt(n,ue+s.toString())}dt(n,Gt,Vt),rt(n,0);return}const r=Math.floor(Date.now()/Dn)-Ir,i=u=>{const s=ue+u.toString(),f=ot(n,s);if(typeof f=="string"){try{const h=JSON.parse(f);if(typeof h=="object"&&typeof h.cached=="number"&&h.cached>r&&typeof h.provider=="string"&&typeof h.data=="object"&&typeof h.data.prefix=="string"&&t(h,u))return!0}catch{}Zt(n,s)}};let l=it(n);for(let u=l-1;u>=0;u--)i(u)||(u===l-1?(l--,rt(n,l)):Fn[e].add(u))}function $n(){if(!ft){Tr(!0);for(const e in Z)qn(e,t=>{const n=t.data,o=t.provider,r=n.prefix,i=H(o,r);if(!ct(i,n).length)return!1;const l=n.lastModified||-1;return i.lastModifiedCached=i.lastModifiedCached?Math.min(i.lastModifiedCached,l):l,!0})}}function Ar(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const o in Z)qn(o,r=>{const i=r.data;return r.provider!==e.provider||i.prefix!==e.prefix||i.lastModified===t});return!0}function Cr(e,t){ft||$n();function n(o){let r;if(!Z[o]||!(r=zn(o)))return;const i=Fn[o];let l;if(i.size)i.delete(l=Array.from(i).shift());else if(l=it(r),!rt(r,l+1))return;const u={cached:Math.floor(Date.now()/Dn),provider:e.provider,data:t};return dt(r,ue+l.toString(),JSON.stringify(u))}t.lastModified&&!Ar(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function Yt(){}function Er(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,br(e)}))}function Rr(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:o}=e,r=e.iconsToLoad;delete e.iconsToLoad;let i;if(!r||!(i=nt(n)))return;i.prepare(n,o,r).forEach(u=>{_n(n,u,s=>{if(typeof s!="object")u.icons.forEach(f=>{e.missing.add(f)});else try{const f=ct(e,s);if(!f.length)return;const h=e.pendingIcons;h&&f.forEach(x=>{h.delete(x)}),Cr(e,s)}catch(f){console.error(f)}Er(e)})})}))}const pt=(e,t)=>{const n=yr(e,!0,Pn()),o=mr(n);if(!o.pending.length){let s=!0;return t&&setTimeout(()=>{s&&t(o.loaded,o.missing,o.pending,Yt)}),()=>{s=!1}}const r=Object.create(null),i=[];let l,u;return o.pending.forEach(s=>{const{provider:f,prefix:h}=s;if(h===u&&f===l)return;l=f,u=h,i.push(H(f,h));const x=r[f]||(r[f]=Object.create(null));x[h]||(x[h]=[])}),o.pending.forEach(s=>{const{provider:f,prefix:h,name:x}=s,c=H(f,h),p=c.pendingIcons||(c.pendingIcons=new Set);p.has(x)||(p.add(x),r[f][h].push(x))}),i.forEach(s=>{const{provider:f,prefix:h}=s;r[f][h].length&&Rr(s,r[f][h])}),t?xr(t,o,i):Yt},Or=e=>new Promise((t,n)=>{const o=typeof e=="string"?fe(e,!0):e;if(!o){n(e);return}pt([o||e],r=>{if(r.length&&o){const i=ce(o);if(i){t({...de,...i});return}}n(e)})});function Pr(e){try{const t=typeof e=="string"?JSON.parse(e):e;if(typeof t.body=="string")return{...t}}catch{}}function Mr(e,t){const n=typeof e=="string"?fe(e,!0,!0):null;if(!n){const i=Pr(e);return{value:e,data:i}}const o=ce(n);if(o!==void 0||!n.prefix)return{value:e,name:n,data:o};const r=pt([n],()=>t(e,n,ce(n)));return{value:e,name:n,loading:r}}function Ze(e){return e.hasAttribute("inline")}let Un=!1;try{Un=navigator.vendor.indexOf("Apple")===0}catch{}function Lr(e,t){switch(t){case"svg":case"bg":case"mask":return t}return t!=="style"&&(Un||e.indexOf("<a")===-1)?"svg":e.indexOf("currentColor")===-1?"bg":"mask"}const Nr=/(-?[0-9.]*[0-9]+[0-9.]*)/g,_r=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function st(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const o=e.split(Nr);if(o===null||!o.length)return e;const r=[];let i=o.shift(),l=_r.test(i);for(;;){if(l){const u=parseFloat(i);isNaN(u)?r.push(i):r.push(Math.ceil(u*t*n)/n)}else r.push(i);if(i=o.shift(),i===void 0)return r.join("");l=!l}}const Br=e=>e==="unset"||e==="undefined"||e==="none";function Hn(e,t){const n={...de,...e},o={...Cn,...t},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,o].forEach(d=>{const g=[],b=d.hFlip,S=d.vFlip;let j=d.rotate;b?S?j+=2:(g.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),g.push("scale(-1 1)"),r.top=r.left=0):S&&(g.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),g.push("scale(1 -1)"),r.top=r.left=0);let y;switch(j<0&&(j-=Math.floor(j/4)*4),j=j%4,j){case 1:y=r.height/2+r.top,g.unshift("rotate(90 "+y.toString()+" "+y.toString()+")");break;case 2:g.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:y=r.width/2+r.left,g.unshift("rotate(-90 "+y.toString()+" "+y.toString()+")");break}j%2===1&&(r.left!==r.top&&(y=r.left,r.left=r.top,r.top=y),r.width!==r.height&&(y=r.width,r.width=r.height,r.height=y)),g.length&&(i='<g transform="'+g.join(" ")+'">'+i+"</g>")});const l=o.width,u=o.height,s=r.width,f=r.height;let h,x;l===null?(x=u===null?"1em":u==="auto"?f:u,h=st(x,s/f)):(h=l==="auto"?s:l,x=u===null?st(h,f/s):u==="auto"?f:u);const c={},p=(d,g)=>{Br(g)||(c[d]=g.toString())};return p("width",h),p("height",x),c.viewBox=r.left.toString()+" "+r.top.toString()+" "+s.toString()+" "+f.toString(),{attributes:c,body:i}}const Dr=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let Ee=Dr();function Fr(e){Ee=e}function zr(){return Ee}function qr(e,t){const n=Le(e);if(!n)return 0;let o;if(!n.maxURL)o=0;else{let r=0;n.resources.forEach(l=>{r=Math.max(r,l.length)});const i=t+".json?icons=";o=n.maxURL-r-n.path.length-i.length}return o}function $r(e){return e===404}const Ur=(e,t,n)=>{const o=[],r=qr(e,t),i="icons";let l={type:i,provider:e,prefix:t,icons:[]},u=0;return n.forEach((s,f)=>{u+=s.length+1,u>=r&&f>0&&(o.push(l),l={type:i,provider:e,prefix:t,icons:[]},u=s.length),l.icons.push(s)}),o.push(l),o};function Hr(e){if(typeof e=="string"){const t=Le(e);if(t)return t.path}return"/"}const Wr=(e,t,n)=>{if(!Ee){n("abort",424);return}let o=Hr(t.provider);switch(t.type){case"icons":{const i=t.prefix,u=t.icons.join(","),s=new URLSearchParams({icons:u});o+=i+".json?"+s.toString();break}case"custom":{const i=t.uri;o+=i.slice(0,1)==="/"?i.slice(1):i;break}default:n("abort",400);return}let r=503;Ee(e+o).then(i=>{const l=i.status;if(l!==200){setTimeout(()=>{n($r(l)?"abort":"next",l)});return}return r=501,i.json()}).then(i=>{if(typeof i!="object"||i===null){setTimeout(()=>{i===404?n("abort",i):n("next",r)});return}setTimeout(()=>{n("success",i)})}).catch(()=>{n("next",r)})},Vr={prepare:Ur,send:Wr};function Qt(e,t){switch(e){case"local":case"session":Z[e]=t;break;case"all":for(const n in Z)Z[n]=t;break}}const Ye="data-style";let Wn="";function Gr(e){Wn=e}function Kt(e,t){let n=Array.from(e.childNodes).find(o=>o.hasAttribute&&o.hasAttribute(Ye));n||(n=document.createElement("style"),n.setAttribute(Ye,Ye),e.appendChild(n)),n.textContent=":host{display:inline-block;vertical-align:"+(t?"-0.125em":"0")+"}span,svg{display:block}"+Wn}function Vn(){Ut("",Vr),Pn(!0);let e;try{e=window}catch{}if(e){if($n(),e.IconifyPreload!==void 0){const n=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof n=="object"&&n!==null&&(n instanceof Array?n:[n]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!$t(r))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const n=e.IconifyProviders;if(typeof n=="object"&&n!==null)for(const o in n){const r="IconifyProviders["+o+"] is invalid.";try{const i=n[o];if(typeof i!="object"||!i||i.resources===void 0)continue;Ht(o,i)||console.error(r)}catch{console.error(r)}}}}return{enableCache:n=>Qt(n,!0),disableCache:n=>Qt(n,!1),iconExists:hr,getIcon:gr,listIcons:pr,addIcon:Mn,addCollection:$t,calculateSize:st,buildIcon:Hn,loadIcons:pt,loadIcon:Or,addAPIProvider:Ht,appendCustomStyle:Gr,_api:{getAPIConfig:Le,setAPIModule:Ut,sendAPIQuery:_n,setFetch:Fr,getFetch:zr,listAPIProviders:jr}}}function Gn(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const o in t)n+=" "+o+'="'+t[o]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+n+">"+e+"</svg>"}function Zr(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Yr(e){return"data:image/svg+xml,"+Zr(e)}function Qr(e){return'url("'+Yr(e)+'")'}const at={"background-color":"currentColor"},Zn={"background-color":"transparent"},Xt={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},Jt={"-webkit-mask":at,mask:at,background:Zn};for(const e in Jt){const t=Jt[e];for(const n in Xt)t[e+"-"+n]=Xt[n]}function en(e){return e?e+(e.match(/^[-0-9.]+$/)?"px":""):"inherit"}function Kr(e,t,n){const o=document.createElement("span");let r=e.body;r.indexOf("<a")!==-1&&(r+="<!-- "+Date.now()+" -->");const i=e.attributes,l=Gn(r,{...i,width:t.width+"",height:t.height+""}),u=Qr(l),s=o.style,f={"--svg":u,width:en(i.width),height:en(i.height),...n?at:Zn};for(const h in f)s.setProperty(h,f[h]);return o}let se;function Xr(){try{se=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{se=null}}function Jr(e){return se===void 0&&Xr(),se?se.createHTML(e):e}function ei(e){const t=document.createElement("span"),n=e.attributes;let o="";n.width||(o="width: inherit;"),n.height||(o+="height: inherit;"),o&&(n.style=o);const r=Gn(e.body,n);return t.innerHTML=Jr(r),t.firstChild}function tn(e,t){const n=t.icon.data,o=t.customisations,r=Hn(n,o);o.preserveAspectRatio&&(r.attributes.preserveAspectRatio=o.preserveAspectRatio);const i=t.renderedMode;let l;switch(i){case"svg":l=ei(r);break;default:l=Kr(r,{...de,...n},i==="mask")}const u=Array.from(e.childNodes).find(s=>{const f=s.tagName&&s.tagName.toUpperCase();return f==="SPAN"||f==="SVG"});u?l.tagName==="SPAN"&&u.tagName===l.tagName?u.setAttribute("style",l.getAttribute("style")):e.replaceChild(l,u):e.appendChild(l)}function nn(e,t,n){const o=n&&(n.rendered?n:n.lastRender);return{rendered:!1,inline:t,icon:e,lastRender:o}}function ti(e="iconify-icon"){let t,n;try{t=window.customElements,n=window.HTMLElement}catch{return}if(!t||!n)return;const o=t.get(e);if(o)return o;const r=["icon","mode","inline","width","height","rotate","flip"],i=class extends n{constructor(){super();ve(this,"_shadowRoot");ve(this,"_state");ve(this,"_checkQueued",!1);const s=this._shadowRoot=this.attachShadow({mode:"open"}),f=Ze(this);Kt(s,f),this._state=nn({value:""},f),this._queueCheck()}static get observedAttributes(){return r.slice(0)}attributeChangedCallback(s){if(s==="inline"){const f=Ze(this),h=this._state;f!==h.inline&&(h.inline=f,Kt(this._shadowRoot,f))}else this._queueCheck()}get icon(){const s=this.getAttribute("icon");if(s&&s.slice(0,1)==="{")try{return JSON.parse(s)}catch{}return s}set icon(s){typeof s=="object"&&(s=JSON.stringify(s)),this.setAttribute("icon",s)}get inline(){return Ze(this)}set inline(s){s?this.setAttribute("inline","true"):this.removeAttribute("inline")}restartAnimation(){const s=this._state;if(s.rendered){const f=this._shadowRoot;if(s.renderedMode==="svg")try{f.lastChild.setCurrentTime(0);return}catch{}tn(f,s)}}get status(){const s=this._state;return s.rendered?"rendered":s.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const s=this._state,f=this.getAttribute("icon");if(f!==s.icon.value){this._iconChanged(f);return}if(!s.rendered)return;const h=this.getAttribute("mode"),x=zt(this);(s.attrMode!==h||sr(s.customisations,x))&&this._renderIcon(s.icon,x,h)}_iconChanged(s){const f=Mr(s,(h,x,c)=>{const p=this._state;if(p.rendered||this.getAttribute("icon")!==h)return;const d={value:h,name:x,data:c};d.data?this._gotIconData(d):p.icon=d});f.data?this._gotIconData(f):this._state=nn(f,this._state.inline,this._state)}_gotIconData(s){this._checkQueued=!1,this._renderIcon(s,zt(this),this.getAttribute("mode"))}_renderIcon(s,f,h){const x=Lr(s.data.body,h),c=this._state.inline;tn(this._shadowRoot,this._state={rendered:!0,icon:s,inline:c,customisations:f,attrMode:h,renderedMode:x})}};r.forEach(u=>{u in i.prototype||Object.defineProperty(i.prototype,u,{get:function(){return this.getAttribute(u)},set:function(s){s!==null?this.setAttribute(u,s):this.removeAttribute(u)}})});const l=Vn();for(const u in l)i[u]=i.prototype[u]=l[u];return t.define(e,i),i}ti()||Vn();const Q=(e,t,n="children")=>e.map(o=>Array.isArray(o[n])?t({...o,[n]:Q(o[n],t,n)}):t(o)),Yn=(e,t="children")=>{const n=[];return Q(e,o=>n.push(o),t),n},ht=(e,t,n="children")=>e.map(o=>({...o})).filter(o=>{const r=o[n];if(Array.isArray(r)){const l=ht(r,t,n);o[n]=l!=null&&l.length?l:void 0}const i={filteredChildren:o[n],isLeaf:!(r!=null&&r.length)};return t(o,i)}),Qn=e=>/^https?:\/\//.test(e),ni=e=>{if(!e||!(e!=null&&e.startsWith("/")))return!1;const t=r=>r.endsWith("/")?r:`${r}/`,n=t(window.location.pathname),o=t(new URL(e,window.location.origin).pathname);return n.startsWith(o)},Kn=(e=[])=>{const t=e.map((o,r)=>({path:o,index:r})).filter(o=>ni(o.path));return t!=null&&t.length?t.slice(1).reduce((o,r)=>o.path.length>=r.path.length?o:r,t[0]).index:-1};function gt({icon:e,size:t,sx:n,...o}){const r=[...Array.isArray(n)?n:[n]];t&&r.push({width:t,height:t});const[i,l]=R.useState(!1),[u,s]=R.useState(!0);if(go(async()=>{s(!0);try{await mo(e),l(!0)}catch{l(!1)}s(!1)},[e]),o.variant||r.push({"&.MuiAvatar-root":{color:"inherit",fontWeight:"bold",backgroundColor:"transparent",borderRadius:0},"&.MuiAvatar-root svg":{width:"100%",height:"100%"}}),Qn(e))return a.jsx(We,{component:"span",...o,src:e,sx:r});const f=t?.6*t+4:0;return u?a.jsx($,{icon:"codicon:blank",height:f||void 0}):i?a.jsx(We,{component:"span",...o,sx:r,children:a.jsx($,{icon:e,height:f||void 0})}):e&&typeof e=="string"?(r.push({"&.MuiAvatar-root":{display:"inline-flex",...t&&{fontSize:t-2}}}),a.jsx(We,{component:"span",...o,sx:r,children:Array.from(e)[0]})):null}const oi=hn();function Ne({theme:e,children:t}){const n=e?hn(e):oi;return a.jsx(bo,{theme:n,children:t})}Ne.propTypes={children:m.any.isRequired,theme:m.object};Ne.defaultProps={theme:null};var fn,pn;const Re=((fn=window==null?void 0:window.blocklet)==null?void 0:fn.groupPrefix)||((pn=window==null?void 0:window.blocklet)==null?void 0:pn.prefix)||"/",ri=e=>{const t={...e},n=e==null?void 0:e.background;return typeof n=="string"?t.background={header:n,footer:n,default:n}:n&&typeof n=="object"&&(t.background={header:n.header||n.default,footer:n.footer||n.default,default:n.default}),t},ii=(e,t="en")=>{if(typeof e=="string"){if(Qn(e)){const o=new URL(e);return o.searchParams.set("locale",t),o.href}const n=new URL(e,window.location.origin);return n.searchParams.set("locale",t),n.pathname+n.search}return typeof e=="object"?e[t]||(e==null?void 0:e.en)||(e==null?void 0:e.zh):e},J=(e,t="en")=>{if(!(e!=null&&e.length))return e;const n=(o,r)=>typeof o=="string"?o:typeof o=="object"?o[r]||(o==null?void 0:o.en)||(o==null?void 0:o.zh):o;return Q(e,o=>{var r;return{...o,title:n(o.title,t),link:(r=o.items)!=null&&r.length?o.link:ii(o.link,t),_rawLink:o.link}},"items")},si=e=>Q(e,t=>t.role?{...t,role:Array.isArray(t.role)?t.role:[t.role]}:t,"items"),ai=e=>{if(!(e!=null&&e.length))return null;const t=si(e),n={header:[],footer:[],social:[],bottom:[],dashboard:[],sessionManager:[],userCenter:[]};return t.forEach(o=>{var r;o.section?Array.isArray(o.section)?o.section.forEach(i=>{var l;(l=n[i])==null||l.push(o)}):typeof o.section=="string"&&((r=n[o.section])==null||r.push(o)):n.header.push(o)}),n},mt=e=>{if(!e)return null;const t={...e};return t.theme=ri(t.theme),t.navigation=ai(li(t.navigation)),t},li=(e=[])=>ht(e,(t,n)=>{var o;return!!t.link||((o=n.filteredChildren)==null?void 0:o.length)},"items"),Xn=(e,t)=>ht(e,(n,o)=>{var i;const r=!n.role||t&&(n.role.includes(t)||n.role.includes("guest"));return o.isLeaf?r:r&&((i=o.filteredChildren)==null?void 0:i.length)},"items"),ci={top:-960,width:960,height:960,body:'<path fill="currentColor" d="M510-600v-210q0-12.75 8.625-21.375T540-840h270q12.75 0 21.375 8.625T840-810v210q0 12.75-8.625 21.375T810-570H540q-12.75 0-21.375-8.625T510-600M120-480v-330q0-12.75 8.625-21.375T150-840h270q12.75 0 21.375 8.625T450-810v330q0 12.75-8.625 21.375T420-450H150q-12.75 0-21.375-8.625T120-480m390 330v-330q0-12.75 8.625-21.375T540-510h270q12.75 0 21.375 8.625T840-480v330q0 12.75-8.625 21.375T810-120H540q-12.75 0-21.375-8.625T510-150m-390 0v-210q0-12.75 8.625-21.375T150-390h270q12.75 0 21.375 8.625T450-360v210q0 12.75-8.625 21.375T420-120H150q-12.75 0-21.375-8.625T120-150m60-360h210v-270H180zm390 330h210v-270H570zm0-450h210v-150H570zM180-180h210v-150H180zm210-150"/>'},ui={width:24,height:24,body:'<path fill="currentColor" d="M15.95 12.3L11.7 8.05q-.15-.15-.212-.325t-.063-.375q0-.2.063-.375t.212-.325l4.25-4.25q.15-.15.325-.212t.375-.063q.2 0 .375.063t.325.212l4.25 4.25q.15.15.213.325t.062.375q0 .2-.063.375t-.212.325l-4.25 4.25q-.15.15-.325.213t-.375.062q-.2 0-.375-.062t-.325-.213ZM3 10V4q0-.425.288-.713T4 3h6q.425 0 .713.288T11 4v6q0 .425-.288.713T10 11H4q-.425 0-.713-.288T3 10Zm10 10v-6q0-.425.288-.713T14 13h6q.425 0 .713.288T21 14v6q0 .425-.288.713T20 21h-6q-.425 0-.713-.288T13 20ZM3 20v-6q0-.425.288-.713T4 13h6q.425 0 .713.288T11 14v6q0 .425-.288.713T10 21H4q-.425 0-.713-.288T3 20ZM5 9h4V5H5v4Zm11.675 1.2L19.5 7.375L16.675 4.55L13.85 7.375l2.825 2.825ZM15 19h4v-4h-4v4ZM5 19h4v-4H5v4ZM9 9Zm4.85-1.625ZM9 15Zm6 0Z"/>'};function di({session:e,locale:t="zh",size:n=24}){const o=(window==null?void 0:window.blocklet)||{},r=(o.navigation||[]).filter(s=>s.section==="sessionManager"&&!["/sessionManager"].includes(s.id)).filter(s=>{var f;return!!((s==null?void 0:s.role)||[]).includes(((f=e==null?void 0:e.user)==null?void 0:f.role)||"guest")}).map(s=>{const f=((o==null?void 0:o.componentMountPoints)||[]).find(h=>s.component===h.name);return{...s,component:f}}),i=R.useRef(null),l=gn({open:!1}),u=V((s=!l.open)=>{l.open=s});return r.length===0||!(e!=null&&e.user)?null:a.jsxs(a.Fragment,{children:[a.jsx(Ie,{size:"medium",ref:i,onClick:()=>u(),children:a.jsx($,{icon:ci,fontSize:n,style:{transform:"scale(1.08)"}})}),a.jsx(wo,{open:l.open,anchorEl:i.current,transition:!0,placement:"bottom-end",sx:{zIndex:1600},children:({TransitionProps:s})=>a.jsx(mn,{onClickAway:f=>{f.preventDefault(),f.stopPropagation(),u(!1)},children:a.jsx(bn,{...s,timeout:350,children:a.jsxs(wn,{variant:"outlined",sx:{borderRadius:3,width:350,maxWidth:"90vw",borderColor:L.lineStep,p:2,border:"0 !important",boxShadow:`0px 8px 16px 0px ${L.gray6}, 0px 0px 0px 1px ${L.gray6}`},children:[a.jsx(xo,{sx:{display:"grid",gridTemplateColumns:"repeat(auto-fill, 100px)",gridAutoRows:"minmax(100px, max-content)",justifyContent:"space-between",maxHeight:350,overflowY:"auto",p:0},children:r.map(f=>{var h;return a.jsx(yo,{disablePadding:!0,children:a.jsxs(Jo,{href:f.link,sx:{p:1,display:"flex",flexDirection:"column",alignItems:"center",gap:1,width:"100%",height:"100%",borderRadius:2,"&:hover":{backgroundColor:L.surfacePrimarySubtitle}},children:[(h=f==null?void 0:f.component)!=null&&h.did?a.jsx(T,{component:"img",src:`${vo}/blocklet/logo-bundle/${f.component.did}`,sx:{borderRadius:2,width:50,height:50,objectFit:"contain"},alt:"SessionBlocklet component icon"}):a.jsx($,{fontSize:50,icon:f.icon||ui,color:L.textSubtitle}),a.jsx(G,{sx:{fontSize:"12px",color:L.textBase,textAlign:"center",lineHeight:"normal"},children:ko(f.title,t)})]})},f.id)})}),a.jsx(xn,{session:e,children:a.jsx(jo,{variant:"outlined",fullWidth:!0,href:So,sx:{mt:1,borderRadius:2,color:L.textBase,borderColor:L.lineBorderStrong,"&:hover":{color:L.primaryBase,borderColor:L.primaryBase}},children:t==="zh"?"管理":"Manage"})})]})})})})]})}const Jn=m.shape({appLogo:m.node,appName:m.string,theme:m.shape({background:m.string}),enableConnect:m.bool,enableLocale:m.bool,navigation:m.arrayOf(m.shape({title:m.oneOfType([m.string,m.object]),link:m.oneOfType([m.string,m.object]),icon:m.string,items:m.arrayOf(m.shape({title:m.oneOfType([m.string,m.object]),link:m.oneOfType([m.string,m.object])}))}))}),eo=m.shape({showText:m.bool,showRole:m.bool,switchDid:m.bool,switchProfile:m.bool,switchPassport:m.bool,disableLogout:m.bool,onLogin:m.func,onLogout:m.func,onSwitchDid:m.func,onSwitchProfile:m.func,onSwitchPassport:m.func,menu:m.array,menuRender:m.func,dark:m.bool,size:m.number});function bt({session:e={}}){const{unReadCount:t}=e,n=X(()=>{const{navigation:o}=window.blocklet??{},r=o==null?void 0:o.find(i=>i.id==="/userCenter/notification");return r==null?void 0:r.link});return!e.user||!n?null:a.jsx(Ie,{size:"medium",variant:"outlined",href:n,sx:{borderRadius:2,borderColor:L.lineBorderStrong,"&:hover":{borderRadius:"50%"}},children:a.jsx(Io,{variant:"dot",color:"error",invisible:t===0,children:a.jsx(To,{style:{width:"auto",height:24}})})})}bt.propTypes={session:m.object};bt.defaultProps={session:{}};const fi=()=>{var t;return!!(((t=window==null?void 0:window.blocklet)==null?void 0:t.navigation)??[]).find(n=>n.id==="/userCenter/notification")};function _e({formattedBlocklet:e,addons:t,sessionManagerProps:n}){var c,p,d,g;const o=R.useContext(Pe),{locale:r}=Y()||{},{enableConnect:i=!0,enableLocale:l=!0}=e,u=!!((c=o==null?void 0:o.session)!=null&&c.user);let s=J((p=e==null?void 0:e.navigation)==null?void 0:p.sessionManager,r)||[];s=Xn(s,(g=(d=o==null?void 0:o.session)==null?void 0:d.user)==null?void 0:g.role);const h=(()=>{if(t&&typeof t!="function")return Array.isArray(t)?t:[t];let b=[];if(fi()&&b.push(a.jsx(bt,{session:o.session},"notification-addon")),l&&r&&b.push(a.jsx(Ao,{showText:!1},"locale-selector")),i&&o){const S=[];u&&(s?s.slice(0,5):[]).forEach(y=>{S.push({label:y.title,icon:y.icon?a.jsx("iconify-icon",{icon:y.icon,height:24,style:{marginRight:8}}):null,component:"a",href:y.link,key:y.link})}),b.push(a.jsx(di,{session:o.session,locale:r},"session-blocklet")),b.push(a.jsx(Co,{session:o.session,locale:r,menu:S,showRole:!0,...n},"session-user"))}return typeof t=="function"&&(b=t(b)||[]),b})();return R.createElement(a.Fragment,null,...Array.isArray(h)?h:[h])}_e.propTypes={formattedBlocklet:m.object.isRequired,addons:m.oneOfType([m.func,m.node]),sessionManagerProps:eo};_e.defaultProps={addons:null,sessionManagerProps:{showRole:!0}};const to=()=>{const e=Eo();R.useEffect(()=>{(e.wallet||e.arcSphere)&&Ro.call("arcHideTopBar","{}")},[e])},pi=e=>{if(!(e!=null&&e.length))return{navItems:[],activeId:null};let t=1;const o=Q(e,l=>{var f,h;const u=l.icon?a.jsx(gt,{icon:l.icon}):null;if(l.items)return{id:`${t++}`,label:l.title,icon:u,children:l.items};let s={};return((f=l.link)!=null&&f.startsWith("http://")||(h=l.link)!=null&&h.startsWith("https://"))&&(s={target:"_blank",rel:"noreferrer"}),{id:`${t++}`,label:a.jsx("a",{href:l.link,...s,children:l.title}),icon:u,link:l.link}},"items"),r=Yn(o),i=Kn(r.map(l=>l.link));return{navItems:o,activeId:i>=0?r[i].id:null}};function hi({meta:e={},addons:t,sessionManagerProps:n={showRole:!0},homeLink:o=Re,theme:r,hideNavMenu:i=!1,...l}){var j,y;to();const{locale:u}=Y()||{},s=R.useMemo(()=>{const w=Object.assign({},window.blocklet,e);try{return mt(w)}catch(v){return console.error("Failed to format blocklet info",v,w),w}},[e]);if(!s.appName)return null;const{appLogo:f,appLogoRect:h,theme:x}=s,c=J((j=s==null?void 0:s.navigation)==null?void 0:j.header,u),p=pi(c),{navItems:d,activeId:g}=p,b=typeof t=="function"?w=>t(w,{navigation:p}):t,S=a.jsx(_e,{formattedBlocklet:s,addons:b,sessionManagerProps:n});return a.jsx(Ne,{theme:r,children:a.jsx(gi,{homeLink:o,logo:a.jsx("img",{src:h||f,alt:"logo"}),addons:S,...vn(l,["bordered"]),$bordered:l==null?void 0:l.bordered,$bgcolor:(y=x==null?void 0:x.background)==null?void 0:y.header,className:ae("blocklet__header",l.className),children:i||!(d!=null&&d.length)?null:({isMobile:w})=>a.jsx(Po,{mode:w?"inline":"horizontal",activeId:g,items:d,className:"header-nav",bgColor:"transparent",textColor:"#777"})})})}const gi=U(Oo)`
|
|
12
12
|
${({$bgcolor:e})=>`background-color: ${e||"#fff"};`}
|
|
13
13
|
font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
|
|
14
14
|
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -86,7 +86,7 @@ var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,config
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
`;function
|
|
89
|
+
`;function Oe({links:e,flowLayout:t,...n}){const[o,r]=R.useState(-1);if(!(e!=null&&e.length))return null;const i=e.some(u=>{var s;return(s=u.items)==null?void 0:s.length}),l=({label:u,link:s,icon:f,render:h,props:x})=>{let c=u;return h?c=h({label:u,link:s,props:x}):s&&(c=a.jsx("a",{href:s,"aria-label":`Footer link for ${u}`,...x,children:u})),a.jsxs(a.Fragment,{children:[f&&a.jsx(gt,{icon:f,size:20,sx:{mr:.5}}),c]})};return a.jsx(bi,{...n,className:ae(n.className,{"footer-links--grouped":i,"footer-links--flow":t}),children:a.jsxs("div",{className:"footer-links-inner",children:[t&&e.map((u,s)=>a.jsx("span",{className:"footer-links-item",children:l(u)},s)),!t&&e.map((u,s)=>{const{items:f}=u,h=s===o;return a.jsxs("div",{className:ae("footer-links-group",{"footer-links-group--active":h}),onClick:()=>r(o===s?-1:s),children:[a.jsxs("span",{className:"footer-links-item",children:[l(u),!!(f!=null&&f.length)&&a.jsx("span",{className:"footer-links-group-expand-icon",children:a.jsx(Xo,{style:{transform:`rotate(${h?180:0}deg)`}})})]}),!!(f!=null&&f.length)&&a.jsx("div",{className:"footer-links-sub",children:f.map((x,c)=>a.jsx("span",{className:"footer-links-item",children:l(x)},c))})]},s)})]})})}Oe.propTypes={links:m.arrayOf(m.shape({label:m.string,link:m.string,render:m.func,props:m.object})),flowLayout:m.bool};Oe.defaultProps={links:[],flowLayout:!1};const bi=U("div")`
|
|
90
90
|
overflow: hidden;
|
|
91
91
|
color: ${e=>e.theme.palette.grey[600]};
|
|
92
92
|
.footer-links-inner {
|
|
@@ -230,7 +230,7 @@ var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,config
|
|
|
230
230
|
align-items: center;
|
|
231
231
|
margin: 0;
|
|
232
232
|
font-size: 13px;
|
|
233
|
-
`;function
|
|
233
|
+
`;function Be({children:e,autoCenter:t,...n}){return e?a.jsx(yi,{...n,className:ae(n.className,{"footer-row-auto-center":t}),children:e}):null}Be.propTypes={children:m.any,autoCenter:m.bool};Be.defaultProps={children:null,autoCenter:!1};const yi=U(T)`
|
|
234
234
|
display: flex;
|
|
235
235
|
justify-content: space-between;
|
|
236
236
|
& + & {
|
|
@@ -251,7 +251,7 @@ var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,config
|
|
|
251
251
|
margin: 0 auto;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
`;function no({elements:e,data:t,...n}){var o;return a.jsx(vi,{...n,children:a.jsxs(jn,{children:[a.jsxs(T,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"center",md:"space-between"},gap:2,pb:3},children:[a.jsx(T,{children:e.brand}),a.jsx(T,{lineHeight:1,children:e.socialMedia})]}),!!((o=t.navigation)!=null&&o.length)&&a.jsx(T,{sx:{mb:6,pt:3,borderTop:1,borderColor:"grey.200"},children:e.navigation}),a.jsxs(
|
|
254
|
+
`;function no({elements:e,data:t,...n}){var o;return a.jsx(vi,{...n,children:a.jsxs(jn,{children:[a.jsxs(T,{sx:{display:"flex",flexDirection:{xs:"column",md:"row"},justifyContent:"space-between",alignItems:{xs:"center",md:"space-between"},gap:2,pb:3},children:[a.jsx(T,{children:e.brand}),a.jsx(T,{lineHeight:1,children:e.socialMedia})]}),!!((o=t.navigation)!=null&&o.length)&&a.jsx(T,{sx:{mb:6,pt:3,borderTop:1,borderColor:"grey.200"},children:e.navigation}),a.jsxs(Be,{sx:{pt:3,borderTop:1,borderColor:"grey.200"},autoCenter:!0,children:[e.copyright,e.links]})]})})}no.propTypes={elements:m.shape({brand:m.element,navigation:m.element,socialMedia:m.element,copyright:m.element,links:m.element}).isRequired,data:m.object.isRequired};const vi=U("div")`
|
|
255
255
|
padding: 32px 0 24px 0;
|
|
256
256
|
.footer-brand-name,
|
|
257
257
|
.footer-brand-desc {
|
|
@@ -260,7 +260,7 @@ var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,config
|
|
|
260
260
|
&& .footer-brand-logo {
|
|
261
261
|
margin-right: 0;
|
|
262
262
|
}
|
|
263
|
-
`;function oo({elements:e,data:t,...n}){return a.jsx(ki,{...n,children:a.jsxs(jn,{className:"plain-layout-container",children:[!!t.links&&a.jsxs(
|
|
263
|
+
`;function oo({elements:e,data:t,...n}){return a.jsx(ki,{...n,children:a.jsxs(jn,{className:"plain-layout-container",children:[!!t.links&&a.jsxs(Be,{sx:{width:1},autoCenter:!0,children:[e.copyright,e.links]}),!t.links&&a.jsxs(a.Fragment,{children:[R.cloneElement(e.brand,{name:null,description:null}),e.copyright]})]})})}oo.propTypes={elements:m.shape({brand:m.element,navigation:m.element,socialMedia:m.element,copyright:m.element,links:m.element}).isRequired,data:m.object.isRequired};const ki=U("div")`
|
|
264
264
|
padding: 24px 0;
|
|
265
265
|
.plain-layout-container {
|
|
266
266
|
display: flex;
|
|
@@ -269,13 +269,13 @@ var po=Object.defineProperty;var ho=(e,t,n)=>t in e?po(e,t,{enumerable:!0,config
|
|
|
269
269
|
flex-wrap: wrap;
|
|
270
270
|
gap: 8px;
|
|
271
271
|
}
|
|
272
|
-
`,ro=[{name:"plain",support:(e,t)=>{var n,o;return!((n=t.navigation)!=null&&n.length)&&!((o=t.socialMedia)!=null&&o.length)},component:oo},{name:"standard",support:()=>!0,component:no}],ji=ro.reduce((e,t)=>({...e,[t.name]:t}),{});function vt(e){var g,b;const{brand:t,navigation:n,socialMedia:o,copyright:r,links:i,layout:l,...u}=e,s=()=>t?a.jsx(wt,{...t}):null,f=()=>n!=null&&n.length?a.jsx(
|
|
272
|
+
`,ro=[{name:"plain",support:(e,t)=>{var n,o;return!((n=t.navigation)!=null&&n.length)&&!((o=t.socialMedia)!=null&&o.length)},component:oo},{name:"standard",support:()=>!0,component:no}],ji=ro.reduce((e,t)=>({...e,[t.name]:t}),{});function vt(e){var g,b;const{brand:t,navigation:n,socialMedia:o,copyright:r,links:i,layout:l,...u}=e,s=()=>t?a.jsx(wt,{...t}):null,f=()=>n!=null&&n.length?a.jsx(Oe,{links:n}):null,h=()=>o!=null&&o.length?a.jsx(xt,{items:o}):null,x=()=>{const S=(r==null?void 0:r.owner)||(t==null?void 0:t.name);return S?a.jsx(yt,{owner:S,year:(r==null?void 0:r.year)||void 0}):null},c=()=>i!=null&&i.length?a.jsx(Oe,{flowLayout:!0,links:i}):null,p={brand:s(),navigation:f(),socialMedia:h(),copyright:x(),links:c()};let d=null;if(l==="auto"?d=ro.find(S=>S.support(p,e)).component:d=(g=ji[l])==null?void 0:g.component,!d)throw new Error(`layout ${l} is not supported.`);return a.jsxs(T,{position:"relative",...u,className:ae("blocklet__footer",u.className),children:[a.jsx(d,{elements:p,data:e}),a.jsx(T,{position:"absolute",right:16,bottom:0,fontSize:12,sx:{color:"transparent","::selection":{background:"#000",color:"#fff"}},children:(b=window==null?void 0:window.blocklet)==null?void 0:b.version})]})}vt.propTypes={brand:m.shape({name:m.node,description:m.string,logo:m.node}),navigation:m.arrayOf(m.shape({label:m.node,link:m.string})),socialMedia:m.arrayOf(m.shape({icon:m.node,link:m.string})),copyright:m.shape({owner:m.string,year:m.oneOfType([m.string,m.number])}),links:m.arrayOf(m.shape({label:m.node,link:m.string})),layout:m.oneOf(["auto","standard","plain"])};vt.defaultProps={brand:null,navigation:null,copyright:null,socialMedia:null,links:null,layout:"auto"};function kt({meta:e,theme:t,...n}){var d,g,b,S;const{locale:o}=Y()||{},r=R.useMemo(()=>{const j=Object.assign({},window.blocklet,e);try{return mt(j)}catch(y){return console.error("Failed to format blocklet info",y,j),j}},[e]);if(!r.appName)return null;const{appLogo:i,appLogoRect:l,appName:u,appDescription:s,description:f,theme:h,copyright:x}=r,c={footerNav:J((d=r==null?void 0:r.navigation)==null?void 0:d.footer,o)||[],socialMedia:J((g=r==null?void 0:r.navigation)==null?void 0:g.social,o)||[],links:J((b=r==null?void 0:r.navigation)==null?void 0:b.bottom,o)||[]},p={brand:{name:u,description:s||f,logo:l||i},navigation:Q(c.footerNav,j=>({...j,label:j.title,link:j.link}),"items"),copyright:x,socialMedia:c.socialMedia,links:c.links.map(j=>({...j,label:j.title}))};return a.jsx(Ne,{theme:t,children:a.jsx(Si,{...p,...vn(n,["bordered"]),$bordered:n==null?void 0:n.bordered,$bgcolor:(S=h==null?void 0:h.background)==null?void 0:S.footer})})}kt.propTypes={meta:Jn,theme:m.object};kt.defaultProps={meta:{},theme:null};const Si=U(vt)`
|
|
273
273
|
${({$bordered:e})=>`border-top: 1px solid ${e?L.strokeSep:"#eee"};`}
|
|
274
274
|
color: ${e=>e.theme.palette.grey[600]};
|
|
275
275
|
${({$bgcolor:e})=>e&&`background-color: ${e};`}
|
|
276
276
|
font-family: Inter, Avenir, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif,
|
|
277
277
|
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
278
|
-
`,rs=yn(kt,{FallbackComponent:kn});function io({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:o,sessionManagerProps:r,links:i,...l}){var w;to();const u=R.useContext(Oe),s=(w=u==null?void 0:u.session)==null?void 0:w.user,f=s==null?void 0:s.role,{locale:h}=Y()||{},x=R.useMemo(()=>{const v=Object.assign({},window.blocklet,e);try{return mt(v)}catch(k){return console.error("Failed to format blocklet info",k,v),v}},[e]),{localizedNav:c,flattened:p,matchedIndex:d}=R.useMemo(()=>{var _;let v=J((_=x==null?void 0:x.navigation)==null?void 0:_.dashboard,h)||[];v=Xn(v,f),v=Q(v,N=>{let B=null;return N.icon&&(N.icon.startsWith("http")||N.icon.startsWith("data:")?B=a.jsx(No,{src:N.icon}):B=a.jsx("iconify-icon",{height:"100%",width:"100%",icon:N.icon})),{title:N.title,url:N.link,icon:B,external:!0,children:N.items}},"items");const k=Yn(v).filter(N=>!!N.url),E=Kn(k.map(N=>N.url));return E!==-1&&(k[E].active=!0),{localizedNav:v,flattened:k,matchedIndex:E}},[x,h,f]),g=typeof i=="function"?i(c):[...c,...i];if(R.useLayoutEffect(()=>{s&&!(p!=null&&p.length)&&t&&(window.location.href=t)},[t]),R.useLayoutEffect(()=>{s&&(p!=null&&p.length)&&d===-1&&n&&n()},[n,p,d]),!x.appName)return null;const{appLogo:b,appLogoRect:S,appName:j}=x,y=a.jsx(Ne,{formattedBlocklet:x,addons:o,sessionManagerProps:r});return a.jsx(Lo,{title:j,fullWidth:!0,sidebarWidth:128,legacy:!1,links:g,...l,headerProps:{homeLink:Ee,logo:a.jsx("img",{src:S||b,alt:"logo"}),addons:y,...l.headerProps}})}io.propTypes={meta:Jn,fallbackUrl:m.string,invalidPathFallback:m.func,headerAddons:m.oneOfType([m.func,m.node]),sessionManagerProps:eo,links:m.oneOfType([m.array,m.func])};io.defaultProps={meta:{},fallbackUrl:Ee,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=Ee}},links:[]};function jt({optionalComponent:e,index:t,installStatus:n,hasPermission:o,t:r}){const i=()=>{window.open(e==null?void 0:e.installUrl,"_blank")},l=()=>{window.open(e==null?void 0:e.storeUrl,"_blank")},u=()=>{window.location.reload()},s=n==="stopped"||n==="running",f=60;return a.jsxs(T,{children:[t===0?null:a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsxs(T,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[a.jsx("img",{style:{width:f,height:f,minWidth:f,minHeight:f},src:e.logoUrl,alt:e.meta.title}),a.jsxs(T,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[a.jsxs(T,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var h;return l((h=e.meta)==null?void 0:h.did)},children:[e.meta.title,a.jsxs(T,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[e.meta.version,a.jsx($,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:L.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),a.jsx(T,{sx:{marginTop:0,opacity:.7},children:e.meta.description}),a.jsx(T,{sx:{display:o?"flex":"none",flexDirection:"row",gap:1},children:n?a.jsx(T,{sx:{marginTop:2,opacity:.7},children:s?a.jsx(re,{variant:"contained",onClick:u,children:r("componentInstallerRefresh")},"refresh"):a.jsx(re,{disabled:!0,sx:{color:"#333"},startIcon:a.jsx($,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:n},"status")}):a.jsx(re,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var h;return i((h=e.meta)==null?void 0:h.did)},children:r("componentInstallerInstall")},"install")}),s?a.jsx(T,{sx:{marginTop:2,opacity:.7},children:r("componentInstallerSuccessInstalled")}):null]})]})]})}jt.propTypes={t:m.func.isRequired,optionalComponent:m.object.isRequired,index:m.number.isRequired,installStatus:m.string,hasPermission:m.bool.isRequired};jt.defaultProps={installStatus:""};const Ii={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},Ye=e=>typeof e=="string"?new Set(e.split(";;")):new Set(e);function Ti({did:e,onInstalled:t,onError:n}){const o=Array.isArray(e)?e.join(";;"):e,[r,i]=R.useState({}),l=R.useRef({onInstalled:t,onError:n});l.current={onInstalled:t,onError:n};const{optionalComponents:u,componentMountPoints:s}=window.blocklet,f=R.useMemo(()=>{var p;if(!u||!u.length)return[];const x=Ye(o),c=u.filter(d=>x.has(d.meta.did));return(p=c?l.current.onError:l.current.onInstalled)==null||p(c),c},[o,u]),h=R.useMemo(()=>{if(f.length)return!0;const x=Ye(o);return(s||[]).find(c=>x.has(c.did))},[f,s,o]);return f.forEach(x=>{x.storeUrl=Ie(x.meta.homepage,"blocklets",x.meta.did),x.installUrl=Ie(window.blocklet.appUrl,_o,`/admin/components?install-component=${x.meta.did}`)}),R.useEffect(()=>{const x=c=>{var p,d,g,b,S;if(c.origin===window.blocklet.appUrl&&((p=c.data)==null?void 0:p.kind)==="component-installer"&&(g=(d=c.data)==null?void 0:d.blocklet)!=null&&g.children){let j=!1;const y=Ye(o);(S=(b=c.data)==null?void 0:b.blocklet)==null||S.children.forEach(w=>{var v;y.has((v=w.meta)==null?void 0:v.did)&&(j=!0,i(k=>{var E;return{...k,[(E=w.meta)==null?void 0:E.did]:w.status||"waiting"}}))}),j||i({})}};return window.addEventListener("message",x),()=>{window.removeEventListener("message",x)}},[o]),{optComponents:f,installed:!f.length&&h,installStatus:r,setInstallStatus:i,definedInBlockletYML:h}}function fe({warnIcon:e,did:t,noPermissionMute:n,onInstalled:o,onError:r,children:i,closeByOutSize:l,onClose:u,fallback:s,disabled:f,roles:h=["owner","admin"]}){const{locale:x}=Y(),c=V((y,w={})=>Sn(Ii,y,x,"en",w)),{installed:p,optComponents:d,installStatus:g,definedInBlockletYML:b}=Ti({did:t,onInstalled:o,onError:r}),S=R.useContext(Oe),j=()=>{u==null||u(!1)};return f?i:a.jsx(xn,{session:S==null?void 0:S.session,roles:h,children:({hasPermission:y})=>p?i:n&&!y?s||null:typeof i=="function"?a.jsxs(a.Fragment,{children:[s,i({hasPermission:y,optComponents:d,installStatus:g})]}):a.jsxs(a.Fragment,{children:[s,a.jsx(mn,{onClickAway:w=>{w.preventDefault(),w.stopPropagation(),l&&j()},children:a.jsx(bn,{in:!0,timeout:350,children:a.jsx(wn,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:L.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${L.gray6}, 0px 0px 0px 1px ${L.gray6}`},children:b?a.jsxs(T,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(T,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[e||a.jsx($,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(T,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:c("componentInstallerTitle")}),a.jsx(T,{sx:{flex:1}}),u?a.jsx(Se,{variant:"outlined",className:"button",onClick:j,children:a.jsx(Dt,{})}):null]}),a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsx(T,{sx:{maxHeight:"70vh",overflowY:"auto"},children:d.map((w,v)=>{var k,E;return a.jsx(jt,{t:c,hasPermission:y,index:v,optionalComponent:w,installStatus:g[(k=w.meta)==null?void 0:k.did]},((E=w.meta)==null?void 0:E.did)||v)})}),y?null:a.jsxs(a.Fragment,{children:[a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsx(T,{sx:{padding:"20px 24px"},children:a.jsx(T,{sx:{opacity:1},children:c("componentInstallerSuggestions")})})]})]}):a.jsxs(T,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(T,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[e||a.jsx($,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(T,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:c("componentInstallerTitle")}),a.jsx(T,{sx:{flex:1}}),u?a.jsx(Se,{variant:"outlined",className:"button",onClick:j,children:a.jsx(Dt,{})}):null]}),a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsxs(T,{sx:{padding:"20px 24px",marginTop:0},children:[c("componentInstallerNoDefinedInBlockletYML"),": ",t]})]})})})})]})})}fe.propTypes={disabled:m.bool,warnIcon:m.node,did:m.oneOfType([m.string,m.arrayOf(m.string)]).isRequired,noPermissionMute:m.bool,onInstalled:m.func,onError:m.func,children:m.any.isRequired,closeByOutSize:m.bool,onClose:m.func,fallback:m.node,roles:m.array};fe.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function so(e){return window.blocklet?a.jsx(fe,{...e}):e.children}so.propTypes={...fe.propTypes,children:m.any.isRequired};so.defaultProps={...fe.defaultProps};function Ai({user:e,switchPassport:t}){const n=X(()=>{var o;return(o=(e==null?void 0:e.passports)||[])==null?void 0:o.find(r=>r.name===e.role)},[e==null?void 0:e.passports,e==null?void 0:e.role]);return a.jsx(In,{label:(n==null?void 0:n.title)||(e==null?void 0:e.role)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:L.textBase,borderColor:L.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:active":{boxShadow:"none"}},clickable:!0,deleteIcon:a.jsx($,{icon:Bo,color:L.textBase}),onDelete:t,onClick:t})}R.memo(Ai);var St={};Object.defineProperty(St,"__esModule",{value:!0});var Ci=St.default=void 0;Ei(R);var on=a;function Ei(e){return e&&e.__esModule?e:{default:e}}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(n),!0).forEach(function(o){Ri(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Ri(e,t,n){return(t=Oi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oi(e){var t=Pi(e,"string");return typeof t=="symbol"?t:t+""}function Pi(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var It=function(t){return(0,on.jsx)("svg",sn(sn({},t),{},{children:(0,on.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10C3.25 6.27208 6.27208 3.25 10 3.25C13.7279 3.25 16.75 6.27208 16.75 10C16.75 13.7279 13.7279 16.75 10 16.75C6.27208 16.75 3.25 13.7279 3.25 10ZM10 1.75C5.44365 1.75 1.75 5.44365 1.75 10C1.75 14.5564 5.44365 18.25 10 18.25C14.5563 18.25 18.25 14.5564 18.25 10C18.25 5.44365 14.5563 1.75 10 1.75ZM8.03033 6.96967C7.73744 6.67678 7.26256 6.67678 6.96967 6.96967C6.67678 7.26256 6.67678 7.73744 6.96967 8.03033L11.9697 13.0303C12.2626 13.3232 12.7374 13.3232 13.0303 13.0303C13.3232 12.7374 13.3232 12.2626 13.0303 11.9697L8.03033 6.96967Z"})}))};It.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};It.displayName="revoke";Ci=St.default=It;R.createContext({});const Qe=new Do;Fo(T)`
|
|
278
|
+
`,rs=yn(kt,{FallbackComponent:kn});function io({meta:e,fallbackUrl:t,invalidPathFallback:n,headerAddons:o,sessionManagerProps:r,links:i,...l}){var w;to();const u=R.useContext(Pe),s=(w=u==null?void 0:u.session)==null?void 0:w.user,f=s==null?void 0:s.role,{locale:h}=Y()||{},x=R.useMemo(()=>{const v=Object.assign({},window.blocklet,e);try{return mt(v)}catch(k){return console.error("Failed to format blocklet info",k,v),v}},[e]),{localizedNav:c,flattened:p,matchedIndex:d}=R.useMemo(()=>{var _;let v=J((_=x==null?void 0:x.navigation)==null?void 0:_.dashboard,h)||[];v=Xn(v,f),v=Q(v,N=>{let B=null;return N.icon&&(N.icon.startsWith("http")||N.icon.startsWith("data:")?B=a.jsx(No,{src:N.icon}):B=a.jsx("iconify-icon",{height:"100%",width:"100%",icon:N.icon})),{title:N.title,url:N.link,icon:B,external:!0,children:N.items}},"items");const k=Yn(v).filter(N=>!!N.url),E=Kn(k.map(N=>N.url));return E!==-1&&(k[E].active=!0),{localizedNav:v,flattened:k,matchedIndex:E}},[x,h,f]),g=typeof i=="function"?i(c):[...c,...i];if(R.useLayoutEffect(()=>{s&&!(p!=null&&p.length)&&t&&(window.location.href=t)},[t]),R.useLayoutEffect(()=>{s&&(p!=null&&p.length)&&d===-1&&n&&n()},[n,p,d]),!x.appName)return null;const{appLogo:b,appLogoRect:S,appName:j}=x,y=a.jsx(_e,{formattedBlocklet:x,addons:o,sessionManagerProps:r});return a.jsx(Lo,{title:j,fullWidth:!0,sidebarWidth:128,legacy:!1,links:g,...l,headerProps:{homeLink:Re,logo:a.jsx("img",{src:S||b,alt:"logo"}),addons:y,...l.headerProps}})}io.propTypes={meta:Jn,fallbackUrl:m.string,invalidPathFallback:m.func,headerAddons:m.oneOfType([m.func,m.node]),sessionManagerProps:eo,links:m.oneOfType([m.array,m.func])};io.defaultProps={meta:{},fallbackUrl:Re,invalidPathFallback:null,headerAddons:void 0,sessionManagerProps:{showRole:!0,onLogout:()=>{window.location.href=Re}},links:[]};function jt({optionalComponent:e,index:t,installStatus:n,hasPermission:o,t:r}){const i=()=>{window.open(e==null?void 0:e.installUrl,"_blank")},l=()=>{window.open(e==null?void 0:e.storeUrl,"_blank")},u=()=>{window.location.reload()},s=n==="stopped"||n==="running",f=60;return a.jsxs(T,{children:[t===0?null:a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsxs(T,{sx:{padding:"20px 24px",paddingTop:.5,marginTop:2,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[a.jsx("img",{style:{width:f,height:f,minWidth:f,minHeight:f},src:e.logoUrl,alt:e.meta.title}),a.jsxs(T,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",marginLeft:2},children:[a.jsxs(T,{sx:{fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var h;return l((h=e.meta)==null?void 0:h.did)},children:[e.meta.title,a.jsxs(T,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[e.meta.version,a.jsx($,{className:"link-icon",icon:"fluent:open-20-filled",style:{color:L.primaryBase,fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.3s"}})]})]}),a.jsx(T,{sx:{marginTop:0,opacity:.7},children:e.meta.description}),a.jsx(T,{sx:{display:o?"flex":"none",flexDirection:"row",gap:1},children:n?a.jsx(T,{sx:{marginTop:2,opacity:.7},children:s?a.jsx(re,{variant:"contained",onClick:u,children:r("componentInstallerRefresh")},"refresh"):a.jsx(re,{disabled:!0,sx:{color:"#333"},startIcon:a.jsx($,{icon:"line-md:loading-loop",style:{color:"#333",fontSize:16}}),variant:"contained",children:n},"status")}):a.jsx(re,{sx:{marginTop:2},variant:"contained",className:"button",onClick:()=>{var h;return i((h=e.meta)==null?void 0:h.did)},children:r("componentInstallerInstall")},"install")}),s?a.jsx(T,{sx:{marginTop:2,opacity:.7},children:r("componentInstallerSuccessInstalled")}):null]})]})]})}jt.propTypes={t:m.func.isRequired,optionalComponent:m.object.isRequired,index:m.number.isRequired,installStatus:m.string,hasPermission:m.bool.isRequired};jt.defaultProps={installStatus:""};const Ii={zh:{componentInstallerTitle:"缺少组件",componentInstallerInstall:"安装",componentInstallerClose:"关闭",componentInstallerRefresh:"重载页面",componentInstallerSuccessInstalled:"安装成功,请重载页面查看变化。",componentInstallerSuggestions:"请联系系统管理员安装该组件。",componentInstallerNoDefinedInBlockletYML:"组件未在 blocklet.yml 中定义"},en:{componentInstallerTitle:"Missing component",componentInstallerInstall:"Install",componentInstallerClose:"Close",componentInstallerRefresh:"Refresh",componentInstallerSuccessInstalled:"Successfully installed, please refresh the page to see the changes.",componentInstallerSuggestions:"Please contact the system administrator to install the component.",componentInstallerNoDefinedInBlockletYML:"The component is not defined in blocklet.yml"}},Qe=e=>typeof e=="string"?new Set(e.split(";;")):new Set(e);function Ti({did:e,onInstalled:t,onError:n}){const o=Array.isArray(e)?e.join(";;"):e,[r,i]=R.useState({}),l=R.useRef({onInstalled:t,onError:n});l.current={onInstalled:t,onError:n};const{optionalComponents:u,componentMountPoints:s}=window.blocklet,f=R.useMemo(()=>{var p;if(!u||!u.length)return[];const x=Qe(o),c=u.filter(d=>x.has(d.meta.did));return(p=c?l.current.onError:l.current.onInstalled)==null||p(c),c},[o,u]),h=R.useMemo(()=>{if(f.length)return!0;const x=Qe(o);return(s||[]).find(c=>x.has(c.did))},[f,s,o]);return f.forEach(x=>{x.storeUrl=Te(x.meta.homepage,"blocklets",x.meta.did),x.installUrl=Te(window.blocklet.appUrl,_o,`/admin/components?install-component=${x.meta.did}`)}),R.useEffect(()=>{const x=c=>{var p,d,g,b,S;if(c.origin===window.blocklet.appUrl&&((p=c.data)==null?void 0:p.kind)==="component-installer"&&(g=(d=c.data)==null?void 0:d.blocklet)!=null&&g.children){let j=!1;const y=Qe(o);(S=(b=c.data)==null?void 0:b.blocklet)==null||S.children.forEach(w=>{var v;y.has((v=w.meta)==null?void 0:v.did)&&(j=!0,i(k=>{var E;return{...k,[(E=w.meta)==null?void 0:E.did]:w.status||"waiting"}}))}),j||i({})}};return window.addEventListener("message",x),()=>{window.removeEventListener("message",x)}},[o]),{optComponents:f,installed:!f.length&&h,installStatus:r,setInstallStatus:i,definedInBlockletYML:h}}function pe({warnIcon:e,did:t,noPermissionMute:n,onInstalled:o,onError:r,children:i,closeByOutSize:l,onClose:u,fallback:s,disabled:f,roles:h=["owner","admin"]}){const{locale:x}=Y(),c=V((y,w={})=>Sn(Ii,y,x,"en",w)),{installed:p,optComponents:d,installStatus:g,definedInBlockletYML:b}=Ti({did:t,onInstalled:o,onError:r}),S=R.useContext(Pe),j=()=>{u==null||u(!1)};return f?i:a.jsx(xn,{session:S==null?void 0:S.session,roles:h,children:({hasPermission:y})=>p?i:n&&!y?s||null:typeof i=="function"?a.jsxs(a.Fragment,{children:[s,i({hasPermission:y,optComponents:d,installStatus:g})]}):a.jsxs(a.Fragment,{children:[s,a.jsx(mn,{onClickAway:w=>{w.preventDefault(),w.stopPropagation(),l&&j()},children:a.jsx(bn,{in:!0,timeout:350,children:a.jsx(wn,{variant:"outlined",sx:{position:"fixed",top:20,right:20,zIndex:3e3,borderRadius:3,width:400,maxWidth:"90vw",borderColor:L.lineStep,border:"0 !important",fontSize:"14px",textAlign:"left",boxShadow:`0px 8px 16px 0px ${L.gray6}, 0px 0px 0px 1px ${L.gray6}`},children:b?a.jsxs(T,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(T,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start"},children:[e||a.jsx($,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(T,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:c("componentInstallerTitle")}),a.jsx(T,{sx:{flex:1}}),u?a.jsx(Ie,{variant:"outlined",className:"button",onClick:j,children:a.jsx(Dt,{})}):null]}),a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsx(T,{sx:{maxHeight:"70vh",overflowY:"auto"},children:d.map((w,v)=>{var k,E;return a.jsx(jt,{t:c,hasPermission:y,index:v,optionalComponent:w,installStatus:g[(k=w.meta)==null?void 0:k.did]},((E=w.meta)==null?void 0:E.did)||v)})}),y?null:a.jsxs(a.Fragment,{children:[a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsx(T,{sx:{padding:"20px 24px"},children:a.jsx(T,{sx:{opacity:1},children:c("componentInstallerSuggestions")})})]})]}):a.jsxs(T,{sx:{display:"flex",flexDirection:"column"},children:[a.jsxs(T,{sx:{padding:"20px 24px",marginLeft:0,display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"flex-start"},children:[e||a.jsx($,{icon:"mdi:warning-box",style:{color:"yellowgreen",fontSize:24}}),a.jsx(T,{sx:{marginLeft:1,fontSize:"16px",fontWeight:"bold"},children:c("componentInstallerTitle")}),a.jsx(T,{sx:{flex:1}}),u?a.jsx(Ie,{variant:"outlined",className:"button",onClick:j,children:a.jsx(Dt,{})}):null]}),a.jsx(T,{sx:{width:"100%",height:"1px",backgroundColor:L.gray6}}),a.jsxs(T,{sx:{padding:"20px 24px",marginTop:0},children:[c("componentInstallerNoDefinedInBlockletYML"),": ",t]})]})})})})]})})}pe.propTypes={disabled:m.bool,warnIcon:m.node,did:m.oneOfType([m.string,m.arrayOf(m.string)]).isRequired,noPermissionMute:m.bool,onInstalled:m.func,onError:m.func,children:m.any.isRequired,closeByOutSize:m.bool,onClose:m.func,fallback:m.node,roles:m.array};pe.defaultProps={disabled:!1,warnIcon:null,noPermissionMute:!1,onInstalled:null,onError:null,closeByOutSize:!1,onClose:null,fallback:null,roles:["owner","admin"]};function so(e){return window.blocklet?a.jsx(pe,{...e}):e.children}so.propTypes={...pe.propTypes,children:m.any.isRequired};so.defaultProps={...pe.defaultProps};function Ai({user:e,switchPassport:t}){const n=X(()=>{var o;return(o=(e==null?void 0:e.passports)||[])==null?void 0:o.find(r=>r.name===e.role)},[e==null?void 0:e.passports,e==null?void 0:e.role]);return a.jsx(In,{label:(n==null?void 0:n.title)||(e==null?void 0:e.role)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:L.textBase,borderColor:L.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:1,pl:.5,"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)"},"&:active":{boxShadow:"none"}},clickable:!0,deleteIcon:a.jsx($,{icon:Bo,color:L.textBase}),onDelete:t,onClick:t})}R.memo(Ai);var St={};Object.defineProperty(St,"__esModule",{value:!0});var Ci=St.default=void 0;Ei(R);var on=a;function Ei(e){return e&&e.__esModule?e:{default:e}}function rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rn(Object(n),!0).forEach(function(o){Ri(e,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rn(Object(n)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(n,o))})}return e}function Ri(e,t,n){return(t=Oi(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oi(e){var t=Pi(e,"string");return typeof t=="symbol"?t:t+""}function Pi(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var It=function(t){return(0,on.jsx)("svg",sn(sn({},t),{},{children:(0,on.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.25 10C3.25 6.27208 6.27208 3.25 10 3.25C13.7279 3.25 16.75 6.27208 16.75 10C16.75 13.7279 13.7279 16.75 10 16.75C6.27208 16.75 3.25 13.7279 3.25 10ZM10 1.75C5.44365 1.75 1.75 5.44365 1.75 10C1.75 14.5564 5.44365 18.25 10 18.25C14.5563 18.25 18.25 14.5564 18.25 10C18.25 5.44365 14.5563 1.75 10 1.75ZM8.03033 6.96967C7.73744 6.67678 7.26256 6.67678 6.96967 6.96967C6.67678 7.26256 6.67678 7.73744 6.96967 8.03033L11.9697 13.0303C12.2626 13.3232 12.7374 13.3232 13.0303 13.0303C13.3232 12.7374 13.3232 12.2626 13.0303 11.9697L8.03033 6.96967Z"})}))};It.defaultProps={width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};It.displayName="revoke";Ci=St.default=It;R.createContext({});const Ke=new Do;Fo(T)`
|
|
279
279
|
height: 100%;
|
|
280
280
|
overflow-y: auto;
|
|
281
|
-
`;var lt={exports:{}};(function(e,t){(function(n,o){var r="1.0.38",i="",l="?",u="function",s="undefined",f="object",h="string",x="major",c="model",p="name",d="type",g="vendor",b="version",S="architecture",j="console",y="mobile",w="tablet",v="smarttv",k="wearable",E="embedded",_=500,N="Amazon",B="Apple",Tt="ASUS",At="BlackBerry",W="Browser",pe="Chrome",lo="Edge",he="Firefox",ge="Google",Ct="Huawei",Be="LG",De="Microsoft",Et="Motorola",ee="Opera",me="Samsung",Rt="Sharp",be="Sony",Fe="Xiaomi",ze="Zebra",Ot="Facebook",Pt="Chromium OS",Mt="Mac OS",co=function(C,P){var A={};for(var M in C)P[M]&&P[M].length%2===0?A[M]=P[M].concat(C[M]):A[M]=C[M];return A},we=function(C){for(var P={},A=0;A<C.length;A++)P[C[A].toUpperCase()]=C[A];return P},Lt=function(C,P){return typeof C===h?te(P).indexOf(te(C))!==-1:!1},te=function(C){return C.toLowerCase()},uo=function(C){return typeof C===h?C.replace(/[^\d\.]/g,i).split(".")[0]:o},qe=function(C,P){if(typeof C===h)return C=C.replace(/^\s\s*/,i),typeof P===s?C:C.substring(0,_)},ne=function(C,P){for(var A=0,M,q,F,O,I,z;A<P.length&&!I;){var Ue=P[A],Bt=P[A+1];for(M=q=0;M<Ue.length&&!I&&Ue[M];)if(I=Ue[M++].exec(C),I)for(F=0;F<Bt.length;F++)z=I[++q],O=Bt[F],typeof O===f&&O.length>0?O.length===2?typeof O[1]==u?this[O[0]]=O[1].call(this,z):this[O[0]]=O[1]:O.length===3?typeof O[1]===u&&!(O[1].exec&&O[1].test)?this[O[0]]=z?O[1].call(this,z,O[2]):o:this[O[0]]=z?z.replace(O[1],O[2]):o:O.length===4&&(this[O[0]]=z?O[3].call(this,z.replace(O[1],O[2])):o):this[O]=z||o;A+=2}},$e=function(C,P){for(var A in P)if(typeof P[A]===f&&P[A].length>0){for(var M=0;M<P[A].length;M++)if(Lt(P[A][M],C))return A===l?o:A}else if(Lt(P[A],C))return A===l?o:A;return C},fo={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Nt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},_t={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,b],[/opios[\/ ]+([\w\.]+)/i],[b,[p,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[p,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[p,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,b],[/\bddg\/([\w\.]+)/i],[b,[p,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[p,"UC"+W]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[p,"Smart Lenovo "+W]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+W],b],[/\bfocus\/([\w\.]+)/i],[b,[p,he+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[p,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[p,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[p,"MIUI "+W]],[/fxios\/([-\w\.]+)/i],[b,[p,he]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+W]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+W],b],[/samsungbrowser\/([\w\.]+)/i],[b,[p,me+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,b],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,Ot],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[p,pe+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,pe+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[p,"Android "+W]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[b,$e,fo]],[/(webkit|khtml)\/([\w\.]+)/i],[p,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[p,he+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,b],[/(cobalt)\/([\w\.]+)/i],[p,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[S,"amd64"]],[/(ia32(?=;))/i],[[S,te]],[/((?:i[346]|x)86)[;\)]/i],[[S,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[S,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[S,"armhf"]],[/windows (ce|mobile); ppc;/i],[[S,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[S,/ower/,i,te]],[/(sun4\w)[;\)]/i],[[S,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[S,te]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[g,me],[d,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[g,me],[d,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[g,B],[d,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[g,B],[d,w]],[/(macintosh);/i],[c,[g,B]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[g,Rt],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[g,Ct],[d,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[g,Ct],[d,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[g,Fe],[d,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[g,Fe],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[g,"OPPO"],[d,y]],[/\b(opd2\d{3}a?) bui/i],[c,[g,"OPPO"],[d,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[g,"Vivo"],[d,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[g,"Realme"],[d,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[g,Et],[d,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[g,Et],[d,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[g,Be],[d,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[g,Be],[d,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[g,"Lenovo"],[d,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[g,"Nokia"],[d,y]],[/(pixel c)\b/i],[c,[g,ge],[d,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[g,ge],[d,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[g,be],[d,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[g,be],[d,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[g,"OnePlus"],[d,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[g,N],[d,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[g,N],[d,y]],[/(playbook);[-\w\),; ]+(rim)/i],[c,g,[d,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[g,At],[d,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[g,Tt],[d,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[g,Tt],[d,y]],[/(nexus 9)/i],[c,[g,"HTC"],[d,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[c,/_/g," "],[d,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[g,"Acer"],[d,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[g,"Meizu"],[d,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[g,"Ulefone"],[d,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,c,[d,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,c,[d,w]],[/(surface duo)/i],[c,[g,De],[d,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[g,"Fairphone"],[d,y]],[/(u304aa)/i],[c,[g,"AT&T"],[d,y]],[/\bsie-(\w*)/i],[c,[g,"Siemens"],[d,y]],[/\b(rct\w+) b/i],[c,[g,"RCA"],[d,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[g,"Dell"],[d,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[g,"Verizon"],[d,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[g,"Barnes & Noble"],[d,w]],[/\b(tm\d{3}\w+) b/i],[c,[g,"NuVision"],[d,w]],[/\b(k88) b/i],[c,[g,"ZTE"],[d,w]],[/\b(nx\d{3}j) b/i],[c,[g,"ZTE"],[d,y]],[/\b(gen\d{3}) b.+49h/i],[c,[g,"Swiss"],[d,y]],[/\b(zur\d{3}) b/i],[c,[g,"Swiss"],[d,w]],[/\b((zeki)?tb.*\b) b/i],[c,[g,"Zeki"],[d,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],c,[d,w]],[/\b(ns-?\w{0,9}) b/i],[c,[g,"Insignia"],[d,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[g,"NextBook"],[d,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],c,[d,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],c,[d,y]],[/\b(ph-1) /i],[c,[g,"Essential"],[d,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[g,"Envizen"],[d,w]],[/\b(trio[-\w\. ]+) b/i],[c,[g,"MachSpeed"],[d,w]],[/\btu_(1491) b/i],[c,[g,"Rotor"],[d,w]],[/(shield[\w ]+) b/i],[c,[g,"Nvidia"],[d,w]],[/(sprint) (\w+)/i],[g,c,[d,y]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[g,De],[d,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[g,ze],[d,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[g,ze],[d,y]],[/smart-tv.+(samsung)/i],[g,[d,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[g,me],[d,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,Be],[d,v]],[/(apple) ?tv/i],[g,[c,B+" TV"],[d,v]],[/crkey/i],[[c,pe+"cast"],[g,ge],[d,v]],[/droid.+aft(\w+)( bui|\))/i],[c,[g,N],[d,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[g,Rt],[d,v]],[/(bravia[\w ]+)( bui|\))/i],[c,[g,be],[d,v]],[/(mitv-\w{5}) bui/i],[c,[g,Fe],[d,v]],[/Hbbtv.*(technisat) (.*);/i],[g,c,[d,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,qe],[c,qe],[d,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,c,[d,j]],[/droid.+; (shield) bui/i],[c,[g,"Nvidia"],[d,j]],[/(playstation [345portablevi]+)/i],[c,[g,be],[d,j]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[g,De],[d,j]],[/((pebble))app/i],[g,c,[d,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[g,B],[d,k]],[/droid.+; (glass) \d/i],[c,[g,ge],[d,k]],[/droid.+; (wt63?0{2,3})\)/i],[c,[g,ze],[d,k]],[/(quest( \d| pro)?)/i],[c,[g,Ot],[d,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[d,E]],[/(aeobc)\b/i],[c,[g,N],[d,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,y]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[p,lo+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,b],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[b,$e,Nt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,$e,Nt],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,Mt],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,b],[/\(bb(10);/i],[b,[p,At]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[p,he+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[p,pe+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,Pt],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,b],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,b]]},D=function(C,P){if(typeof C===f&&(P=C,C=o),!(this instanceof D))return new D(C,P).getResult();var A=typeof n!==s&&n.navigator?n.navigator:o,M=C||(A&&A.userAgent?A.userAgent:i),q=A&&A.userAgentData?A.userAgentData:o,F=P?co(_t,P):_t,O=A&&A.userAgent==M;return this.getBrowser=function(){var I={};return I[p]=o,I[b]=o,ne.call(I,M,F.browser),I[x]=uo(I[b]),O&&A&&A.brave&&typeof A.brave.isBrave==u&&(I[p]="Brave"),I},this.getCPU=function(){var I={};return I[S]=o,ne.call(I,M,F.cpu),I},this.getDevice=function(){var I={};return I[g]=o,I[c]=o,I[d]=o,ne.call(I,M,F.device),O&&!I[d]&&q&&q.mobile&&(I[d]=y),O&&I[c]=="Macintosh"&&A&&typeof A.standalone!==s&&A.maxTouchPoints&&A.maxTouchPoints>2&&(I[c]="iPad",I[d]=w),I},this.getEngine=function(){var I={};return I[p]=o,I[b]=o,ne.call(I,M,F.engine),I},this.getOS=function(){var I={};return I[p]=o,I[b]=o,ne.call(I,M,F.os),O&&!I[p]&&q&&q.platform&&q.platform!="Unknown"&&(I[p]=q.platform.replace(/chrome os/i,Pt).replace(/macos/i,Mt)),I},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return M},this.setUA=function(I){return M=typeof I===h&&I.length>_?qe(I,_):I,this},this.setUA(M),this};D.VERSION=r,D.BROWSER=we([p,b,x]),D.CPU=we([S]),D.DEVICE=we([c,g,d,j,y,v,w,k,E]),D.ENGINE=D.OS=we([p,b]),e.exports&&(t=e.exports=D),t.UAParser=D;var K=typeof n!==s&&(n.jQuery||n.Zepto);if(K&&!K.ua){var xe=new D;K.ua=xe.getResult(),K.ua.get=function(){return xe.getUA()},K.ua.set=function(C){xe.setUA(C);var P=xe.getResult();for(var A in P)K.ua[A]=P[A]}}})(typeof window=="object"?window:zo)})(lt,lt.exports);var Mi=lt.exports;const Ke=qo(Mi);class Li extends Error{constructor(t){super(),this.name="AbortError",this.message=t}}const an=e=>globalThis.DOMException===void 0?new Li(e):new DOMException(e),ln=e=>{const t=e.reason===void 0?an("This operation was aborted."):e.reason;return t instanceof Error?t:an(t)};async function Ni(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:o=!0,signal:r}={}){return new Promise((i,l)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);const u=[],s=[],f=new Map;let h=!1,x=!1,c=!1,p=0,d=0;const g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),b=j=>{h=!0,x=!0,l(j)};r&&(r.aborted&&b(ln(r)),r.addEventListener("abort",()=>{b(ln(r))}));const S=async()=>{if(x)return;const j=await g.next(),y=d;if(d++,j.done){if(c=!0,p===0&&!x){if(!o&&s.length>0){b(new AggregateError(s));return}if(x=!0,f.size===0){i(u);return}const w=[];for(const[v,k]of u.entries())f.get(v)!==cn&&w.push(k);i(w)}return}p++,(async()=>{try{const w=await j.value;if(x)return;const v=await t(w,y);v===cn&&f.set(y,v),u[y]=v,p--,await S()}catch(w){if(o)b(w);else{s.push(w),p--;try{await S()}catch(v){b(v)}}}})()};(async()=>{for(let j=0;j<n;j++){try{await S()}catch(y){b(y);break}if(c||h)break}})()})}const cn=Symbol("skip");async function _i(e,t){return Ni(e,n=>n(),t)}function Bi({user:e,sessionUser:t}){const n=X(()=>{var o;return(o=(e==null?void 0:e.passports)||[])==null?void 0:o.find(r=>r.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return a.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx($o,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),a.jsxs(T,{sx:{flex:1,overflow:"hidden"},children:[a.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx(Je,{title:t.fullName,children:a.jsx(G,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),a.jsx(In,{label:(n==null?void 0:n.title)||(n==null?void 0:n.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:L.textBase,borderColor:L.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),a.jsx(Je,{title:t.email,children:a.jsx(G,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const Di={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},ao="Reserved IP",un="ip-region-cache";async function Fi(e){const t=`https://ipapi.co/${e}/json/`,o=await(await fetch(t)).json();let r="";return o.error?o.reserved&&(r=ao):r=[o.country_name,o.region,o.city].filter(Boolean).join("/"),r}async function zi(e){const t=`https://api.ip.sb/geoip/${e}`,o=await(await fetch(t)).json();let r="";return o.error?o.reserved&&(r=ao):r=[o.country,o.region,o.city].filter(Boolean).join("/"),r}async function qi(e){let t="",n={};try{const o=localStorage.getItem(un);o&&(n=JSON.parse(o))}catch{n={}}if(n[e])t=n[e];else{try{t=await zi(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await Fi(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const o=Object.keys(n);o.length>100&&delete n[o[0]],n[e]&&delete n[e],n[e]=t,localStorage.setItem(un,JSON.stringify(n))}return t}const dn=e=>new Ke(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Ke.BROWSER.NAME,Ke.BROWSER.VERSION]]}).getResult(),$i=new Uo({concurrency:1}),Ui=R.memo(({userSession:e})=>{const t=gn({loading:!0,ipRegion:""}),{t:n}=Y();return R.useEffect(()=>{$i.add(async()=>{try{t.ipRegion=await qi(e.lastLoginIp)}finally{t.loading=!1}})},[t,e.lastLoginIp]),a.jsx(T,{children:t.ipRegion?a.jsxs(a.Fragment,{children:[a.jsx(G,{variant:"body2",children:t.ipRegion}),a.jsx(G,{variant:"body2",color:"grey",children:e.lastLoginIp||n("unknown")})]}):a.jsxs(a.Fragment,{children:[a.jsx(G,{children:e.lastLoginIp||n("unknown")}),t.loading?a.jsx(G,{variant:"body2",color:"grey",sx:{textAlign:"center"},children:a.jsx(Ho,{size:12,color:"inherit"})}):null]})})});function is({user:e,showAction:t=!0,showUser:n=!0}){const{session:o}=R.useContext(Oe),r=Wo(),{locale:i}=Y(),l=tr({key:"md"}),u=Vo(w=>w.breakpoints.down("lg")),{confirmApi:s,confirmHolder:f}=Go(),h=V((w,v={})=>Sn(Di,w,i,"en",v)),x=V(async()=>{let w=(e==null?void 0:e.userSessions)||[];try{!(e!=null&&e.userSessions)&&o.user&&(w=await Qe.userSession.getMyLoginSessions())}catch(k){console.warn("Failed to convert ip to region"),console.error(k)}const v=new Date().getTime();return Zo(w,k=>k.visitorId===r?-1:v-new Date(k.updatedAt).getTime())}),c=Yo(x),p=X(()=>c.data||[],[c.data]),d=V(({visitorId:w})=>{s.open({title:h("logoutThisSession"),content:h("logoutThisSessionConfirm"),confirmButtonText:h("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:h("cancel"),onConfirm:async()=>{await Qe.user.logout({visitorId:w}),c.refresh(),s.close()}})}),g=X(()=>p.filter(v=>v.visitorId!==r),[p]),b=V(()=>{s.open({title:h("logoutAllSession"),content:h("logoutAllSessionConfirm"),confirmButtonText:h("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:h("cancel"),onConfirm:async()=>{const w=g.map(v=>()=>Qe.user.logout({visitorId:v.visitorId}));await _i(w,{concurrency:3,stopOnError:!1}),c.refresh(),s.close()}})}),S=[];t&&S.push(a.jsx(Je,{title:h("logoutAllTips"),children:a.jsx(re,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:b,disabled:g.length===0,children:h("logoutAll")})},"logoutAll"));const j=X(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),y=[{label:h("platform"),name:"platform",options:{customBodyRenderLite:w=>{var E,_;const v=p[w],k=dn(v.ua);return a.jsx(T,{children:[(E=k.os)==null?void 0:E.name,(_=k.os)==null?void 0:_.version].filter(Boolean).join("/")||h("unknown")})}}},{label:h("deviceType"),name:"deviceType",options:{customBodyRenderLite:w=>{var E,_;const v=p[w],k=dn(v.ua);return a.jsx(T,{children:[(E=k.browser)==null?void 0:E.name,(_=k.browser)==null?void 0:_.version].filter(Boolean).join("/")||h("unknown")})}}},{label:h("walletOS"),name:"walletOS",options:{customBodyRenderLite:w=>{var k;const v=p[w];return a.jsx(T,{children:((k=v.extra)==null?void 0:k.walletOS)||h("unknown")})}}},n&&{label:h("user"),name:"user",options:{customBodyRenderLite:w=>{const v=p[w];return a.jsx(T,{sx:{minWidth:150,maxWidth:250},children:a.jsx(Bi,{sessionUser:v.user,user:e})})}}},{label:h("createdAt"),name:"createdAt",options:{customBodyRenderLite:w=>{const v=p[w];return v.createdAt?a.jsx(Ft,{value:v.createdAt,relativeRange:3*86400*1e3,locale:i}):h("unknown")}}},{label:h("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:w=>{const v=p[w];return v.status==="expired"?h("expired"):a.jsx(Ft,{value:v.updatedAt,relativeRange:3*86400*1e3,locale:i})}}},{label:h("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:w=>{const v=p[w];return a.jsx(Ui,{userSession:v})}}},t&&{label:h("actions"),name:"actions",options:{customBodyRenderLite:w=>{const v=p[w];return a.jsx(T,{children:a.jsx(re,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:r===v.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>d({visitorId:v.visitorId}),children:v.status==="expired"?h("remove"):r===v.visitorId?h("currentSession"):h("logout")})})}}}].filter(Boolean);return a.jsxs(T,{sx:{maxWidth:l?"unset":u?"calc(100vw - 300px)":"920px",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px"}},children:[f,a.jsx(er,{locale:i,data:p,columns:y,customButtons:S,options:j,loading:c.loading})]})}Ie(Tn,"/profile");Ie(Tn,"/settings");function Hi({src:e,open:t=!1,componentDid:n,loading:o=!0,storeUrl:r,onClose:i=()=>{},onComplete:l=()=>{},onLoad:u=()=>{}},s){const f=R.useRef(null),h=V(x=>{var c,p,d;t&&(((c=x==null?void 0:x.data)==null?void 0:c.event)==="resourceDialog.close"&&i(),((p=x==null?void 0:x.data)==null?void 0:p.event)==="resourceDialog.complete"&&l(),((d=x==null?void 0:x.data)==null?void 0:d.event)==="resourceDialog.loaded"&&u())});return Qo(()=>{window.addEventListener("message",h)}),Ko(()=>{window.removeEventListener("message",h)}),R.useImperativeHandle(s,()=>({selectBlocklet:x=>{var c;(c=f.current)!=null&&c.contentWindow&&f.current.contentWindow.postMessage({event:"resourceDialog.select",data:x,componentDid:n,storeUrl:r},"*")}})),t?a.jsx("iframe",{ref:f,src:e,title:"Resource Dialog",style:{position:"fixed",top:0,left:o?"-100vw":0,width:"100vw",height:"100vh",zIndex:9999,backgroundColor:"transparent",border:"none"}}):null}R.forwardRef(Hi);export{io as D,rs as F,os as H,gt as I,is as U,so as W,Ci as d};
|
|
281
|
+
`;var lt={exports:{}};(function(e,t){(function(n,o){var r="1.0.38",i="",l="?",u="function",s="undefined",f="object",h="string",x="major",c="model",p="name",d="type",g="vendor",b="version",S="architecture",j="console",y="mobile",w="tablet",v="smarttv",k="wearable",E="embedded",_=500,N="Amazon",B="Apple",Tt="ASUS",At="BlackBerry",W="Browser",he="Chrome",lo="Edge",ge="Firefox",me="Google",Ct="Huawei",De="LG",Fe="Microsoft",Et="Motorola",ee="Opera",be="Samsung",Rt="Sharp",we="Sony",ze="Xiaomi",qe="Zebra",Ot="Facebook",Pt="Chromium OS",Mt="Mac OS",co=function(C,P){var A={};for(var M in C)P[M]&&P[M].length%2===0?A[M]=P[M].concat(C[M]):A[M]=C[M];return A},xe=function(C){for(var P={},A=0;A<C.length;A++)P[C[A].toUpperCase()]=C[A];return P},Lt=function(C,P){return typeof C===h?te(P).indexOf(te(C))!==-1:!1},te=function(C){return C.toLowerCase()},uo=function(C){return typeof C===h?C.replace(/[^\d\.]/g,i).split(".")[0]:o},$e=function(C,P){if(typeof C===h)return C=C.replace(/^\s\s*/,i),typeof P===s?C:C.substring(0,_)},ne=function(C,P){for(var A=0,M,q,F,O,I,z;A<P.length&&!I;){var He=P[A],Bt=P[A+1];for(M=q=0;M<He.length&&!I&&He[M];)if(I=He[M++].exec(C),I)for(F=0;F<Bt.length;F++)z=I[++q],O=Bt[F],typeof O===f&&O.length>0?O.length===2?typeof O[1]==u?this[O[0]]=O[1].call(this,z):this[O[0]]=O[1]:O.length===3?typeof O[1]===u&&!(O[1].exec&&O[1].test)?this[O[0]]=z?O[1].call(this,z,O[2]):o:this[O[0]]=z?z.replace(O[1],O[2]):o:O.length===4&&(this[O[0]]=z?O[3].call(this,z.replace(O[1],O[2])):o):this[O]=z||o;A+=2}},Ue=function(C,P){for(var A in P)if(typeof P[A]===f&&P[A].length>0){for(var M=0;M<P[A].length;M++)if(Lt(P[A][M],C))return A===l?o:A}else if(Lt(P[A],C))return A===l?o:A;return C},fo={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Nt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},_t={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[b,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[b,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,b],[/opios[\/ ]+([\w\.]+)/i],[b,[p,ee+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[b,[p,ee+" GX"]],[/\bopr\/([\w\.]+)/i],[b,[p,ee]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[b,[p,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,b],[/\bddg\/([\w\.]+)/i],[b,[p,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[b,[p,"UC"+W]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[b,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[b,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[b,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[b,[p,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[b,[p,"Smart Lenovo "+W]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+W],b],[/\bfocus\/([\w\.]+)/i],[b,[p,ge+" Focus"]],[/\bopt\/([\w\.]+)/i],[b,[p,ee+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[b,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[b,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[b,[p,ee+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[b,[p,"MIUI "+W]],[/fxios\/([-\w\.]+)/i],[b,[p,ge]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+W]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+W],b],[/samsungbrowser\/([\w\.]+)/i],[b,[p,be+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],b],[/metasr[\/ ]?([\d\.]+)/i],[b,[p,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[p,"Sogou Mobile"],b],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[p,b],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,Ot],b],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[p,b],[/\bgsa\/([\w\.]+) .*safari\//i],[b,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[b,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[b,[p,he+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,he+" WebView"],b],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[b,[p,"Android "+W]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,b],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[b,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[b,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[b,Ue,fo]],[/(webkit|khtml)\/([\w\.]+)/i],[p,b],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],b],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[b,[p,ge+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,b],[/(cobalt)\/([\w\.]+)/i],[p,[b,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[S,"amd64"]],[/(ia32(?=;))/i],[[S,te]],[/((?:i[346]|x)86)[;\)]/i],[[S,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[S,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[S,"armhf"]],[/windows (ce|mobile); ppc;/i],[[S,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[S,/ower/,i,te]],[/(sun4\w)[;\)]/i],[[S,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[S,te]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[c,[g,be],[d,w]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[c,[g,be],[d,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[c,[g,B],[d,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[c,[g,B],[d,w]],[/(macintosh);/i],[c,[g,B]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[c,[g,Rt],[d,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[c,[g,Ct],[d,w]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[c,[g,Ct],[d,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[c,/_/g," "],[g,ze],[d,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[c,/_/g," "],[g,ze],[d,w]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[c,[g,"OPPO"],[d,y]],[/\b(opd2\d{3}a?) bui/i],[c,[g,"OPPO"],[d,w]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[c,[g,"Vivo"],[d,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[c,[g,"Realme"],[d,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[c,[g,Et],[d,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[c,[g,Et],[d,w]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[c,[g,De],[d,w]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[c,[g,De],[d,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[c,[g,"Lenovo"],[d,w]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[c,/_/g," "],[g,"Nokia"],[d,y]],[/(pixel c)\b/i],[c,[g,me],[d,w]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[c,[g,me],[d,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[c,[g,we],[d,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[c,"Xperia Tablet"],[g,we],[d,w]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[c,[g,"OnePlus"],[d,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[c,[g,N],[d,w]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[c,/(.+)/g,"Fire Phone $1"],[g,N],[d,y]],[/(playbook);[-\w\),; ]+(rim)/i],[c,g,[d,w]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[c,[g,At],[d,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[c,[g,Tt],[d,w]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[c,[g,Tt],[d,y]],[/(nexus 9)/i],[c,[g,"HTC"],[d,w]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[c,/_/g," "],[d,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[c,[g,"Acer"],[d,w]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[c,[g,"Meizu"],[d,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[c,[g,"Ulefone"],[d,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,c,[d,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,c,[d,w]],[/(surface duo)/i],[c,[g,Fe],[d,w]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[c,[g,"Fairphone"],[d,y]],[/(u304aa)/i],[c,[g,"AT&T"],[d,y]],[/\bsie-(\w*)/i],[c,[g,"Siemens"],[d,y]],[/\b(rct\w+) b/i],[c,[g,"RCA"],[d,w]],[/\b(venue[\d ]{2,7}) b/i],[c,[g,"Dell"],[d,w]],[/\b(q(?:mv|ta)\w+) b/i],[c,[g,"Verizon"],[d,w]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[c,[g,"Barnes & Noble"],[d,w]],[/\b(tm\d{3}\w+) b/i],[c,[g,"NuVision"],[d,w]],[/\b(k88) b/i],[c,[g,"ZTE"],[d,w]],[/\b(nx\d{3}j) b/i],[c,[g,"ZTE"],[d,y]],[/\b(gen\d{3}) b.+49h/i],[c,[g,"Swiss"],[d,y]],[/\b(zur\d{3}) b/i],[c,[g,"Swiss"],[d,w]],[/\b((zeki)?tb.*\b) b/i],[c,[g,"Zeki"],[d,w]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],c,[d,w]],[/\b(ns-?\w{0,9}) b/i],[c,[g,"Insignia"],[d,w]],[/\b((nxa|next)-?\w{0,9}) b/i],[c,[g,"NextBook"],[d,w]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],c,[d,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],c,[d,y]],[/\b(ph-1) /i],[c,[g,"Essential"],[d,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[c,[g,"Envizen"],[d,w]],[/\b(trio[-\w\. ]+) b/i],[c,[g,"MachSpeed"],[d,w]],[/\btu_(1491) b/i],[c,[g,"Rotor"],[d,w]],[/(shield[\w ]+) b/i],[c,[g,"Nvidia"],[d,w]],[/(sprint) (\w+)/i],[g,c,[d,y]],[/(kin\.[onetw]{3})/i],[[c,/\./g," "],[g,Fe],[d,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[c,[g,qe],[d,w]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[c,[g,qe],[d,y]],[/smart-tv.+(samsung)/i],[g,[d,v]],[/hbbtv.+maple;(\d+)/i],[[c,/^/,"SmartTV"],[g,be],[d,v]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,De],[d,v]],[/(apple) ?tv/i],[g,[c,B+" TV"],[d,v]],[/crkey/i],[[c,he+"cast"],[g,me],[d,v]],[/droid.+aft(\w+)( bui|\))/i],[c,[g,N],[d,v]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[c,[g,Rt],[d,v]],[/(bravia[\w ]+)( bui|\))/i],[c,[g,we],[d,v]],[/(mitv-\w{5}) bui/i],[c,[g,ze],[d,v]],[/Hbbtv.*(technisat) (.*);/i],[g,c,[d,v]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,$e],[c,$e],[d,v]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[d,v]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,c,[d,j]],[/droid.+; (shield) bui/i],[c,[g,"Nvidia"],[d,j]],[/(playstation [345portablevi]+)/i],[c,[g,we],[d,j]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[c,[g,Fe],[d,j]],[/((pebble))app/i],[g,c,[d,k]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[c,[g,B],[d,k]],[/droid.+; (glass) \d/i],[c,[g,me],[d,k]],[/droid.+; (wt63?0{2,3})\)/i],[c,[g,qe],[d,k]],[/(quest( \d| pro)?)/i],[c,[g,Ot],[d,k]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[d,E]],[/(aeobc)\b/i],[c,[g,N],[d,E]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[c,[d,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[c,[d,w]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[d,w]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[d,y]],[/(android[-\w\. ]{0,9});.+buil/i],[c,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[b,[p,lo+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[b,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,b],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[b,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,b],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[p,[b,Ue,Nt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[b,Ue,Nt],[p,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[b,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,Mt],[b,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[b,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,b],[/\(bb(10);/i],[b,[p,At]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[b,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[b,[p,ge+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[b,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[b,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[b,[p,he+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,Pt],b],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,b],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],b],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,b]]},D=function(C,P){if(typeof C===f&&(P=C,C=o),!(this instanceof D))return new D(C,P).getResult();var A=typeof n!==s&&n.navigator?n.navigator:o,M=C||(A&&A.userAgent?A.userAgent:i),q=A&&A.userAgentData?A.userAgentData:o,F=P?co(_t,P):_t,O=A&&A.userAgent==M;return this.getBrowser=function(){var I={};return I[p]=o,I[b]=o,ne.call(I,M,F.browser),I[x]=uo(I[b]),O&&A&&A.brave&&typeof A.brave.isBrave==u&&(I[p]="Brave"),I},this.getCPU=function(){var I={};return I[S]=o,ne.call(I,M,F.cpu),I},this.getDevice=function(){var I={};return I[g]=o,I[c]=o,I[d]=o,ne.call(I,M,F.device),O&&!I[d]&&q&&q.mobile&&(I[d]=y),O&&I[c]=="Macintosh"&&A&&typeof A.standalone!==s&&A.maxTouchPoints&&A.maxTouchPoints>2&&(I[c]="iPad",I[d]=w),I},this.getEngine=function(){var I={};return I[p]=o,I[b]=o,ne.call(I,M,F.engine),I},this.getOS=function(){var I={};return I[p]=o,I[b]=o,ne.call(I,M,F.os),O&&!I[p]&&q&&q.platform&&q.platform!="Unknown"&&(I[p]=q.platform.replace(/chrome os/i,Pt).replace(/macos/i,Mt)),I},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return M},this.setUA=function(I){return M=typeof I===h&&I.length>_?$e(I,_):I,this},this.setUA(M),this};D.VERSION=r,D.BROWSER=xe([p,b,x]),D.CPU=xe([S]),D.DEVICE=xe([c,g,d,j,y,v,w,k,E]),D.ENGINE=D.OS=xe([p,b]),e.exports&&(t=e.exports=D),t.UAParser=D;var K=typeof n!==s&&(n.jQuery||n.Zepto);if(K&&!K.ua){var ye=new D;K.ua=ye.getResult(),K.ua.get=function(){return ye.getUA()},K.ua.set=function(C){ye.setUA(C);var P=ye.getResult();for(var A in P)K.ua[A]=P[A]}}})(typeof window=="object"?window:zo)})(lt,lt.exports);var Mi=lt.exports;const Xe=qo(Mi);class Li extends Error{constructor(t){super(),this.name="AbortError",this.message=t}}const an=e=>globalThis.DOMException===void 0?new Li(e):new DOMException(e),ln=e=>{const t=e.reason===void 0?an("This operation was aborted."):e.reason;return t instanceof Error?t:an(t)};async function Ni(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:o=!0,signal:r}={}){return new Promise((i,l)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);const u=[],s=[],f=new Map;let h=!1,x=!1,c=!1,p=0,d=0;const g=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),b=j=>{h=!0,x=!0,l(j)};r&&(r.aborted&&b(ln(r)),r.addEventListener("abort",()=>{b(ln(r))}));const S=async()=>{if(x)return;const j=await g.next(),y=d;if(d++,j.done){if(c=!0,p===0&&!x){if(!o&&s.length>0){b(new AggregateError(s));return}if(x=!0,f.size===0){i(u);return}const w=[];for(const[v,k]of u.entries())f.get(v)!==cn&&w.push(k);i(w)}return}p++,(async()=>{try{const w=await j.value;if(x)return;const v=await t(w,y);v===cn&&f.set(y,v),u[y]=v,p--,await S()}catch(w){if(o)b(w);else{s.push(w),p--;try{await S()}catch(v){b(v)}}}})()};(async()=>{for(let j=0;j<n;j++){try{await S()}catch(y){b(y);break}if(c||h)break}})()})}const cn=Symbol("skip");async function _i(e,t){return Ni(e,n=>n(),t)}function Bi({user:e,sessionUser:t}){const n=X(()=>{var o;return(o=(e==null?void 0:e.passports)||[])==null?void 0:o.find(r=>r.name===t.role)},[e==null?void 0:e.passports,t==null?void 0:t.role]);return a.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx($o,{size:40,variant:"circle",shape:"circle",src:t.avatar,did:t.did,sx:{flexShrink:0}}),a.jsxs(T,{sx:{flex:1,overflow:"hidden"},children:[a.jsxs(T,{sx:{display:"flex",alignItems:"center",gap:1},children:[a.jsx(Je,{title:t.fullName,children:a.jsx(G,{sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:1},children:t.fullName})}),a.jsx(In,{label:(n==null?void 0:n.title)||(n==null?void 0:n.name)||"Guest",size:"small",variant:"outlined",sx:{flexShrink:0,fontWeight:"bold",fontSize:"12px",color:L.textBase,borderColor:L.strokeBorderStrong,backgroundColor:"transparent",textTransform:"capitalize",pr:.5,pl:0,height:"auto"}})]}),a.jsx(Je,{title:t.email,children:a.jsx(G,{variant:"body2",color:"grey",sx:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t.email})})]})]})}const Di={zh:{confirm:"确认",cancel:"取消",visitorId:"设备标识",deviceType:"设备类型",platform:"操作系统",walletOS:"钱包类型",role:"角色",fullname:"姓名",email:"邮箱",avatar:"头像",user:"用户",createdAt:"首次活动时间",updatedAt:"最近活动时间",lastLoginIp:"最近活动地址",actions:"操作",logoutAll:"注销所有会话",logoutAllTips:"不会注销当前会话",logout:"注销",currentSession:"当前会话",unknown:"未知",expired:"已过期",remove:"删除",logoutThisSession:"注销指定会话",logoutThisSessionConfirm:"确定要注销此会话吗?",logoutAllSession:"注销所有会话",logoutAllSessionConfirm:"确定要注销所有会话吗?"},en:{confirm:"Confirm",cancel:"Cancel",visitorId:"Device ID",deviceType:"Device Type",platform:"Platform",walletOS:"Wallet OS",role:"Role",fullname:"Fullname",email:"Email",avatar:"Avatar",user:"User",createdAt:"First Active Time",updatedAt:"Last Active Time",actions:"Actions",lastLoginIp:"Last Login IP",logoutAll:"Logout all",logoutAllTips:"Will not logout current session",logout:"Logout",currentSession:"Current Session",unknown:"Unknown",expired:"Expired",remove:"Remove",logoutThisSession:"Logout this session",logoutThisSessionConfirm:"Are you sure to logout this session?",logoutAllSession:"Logout all sessions",logoutAllSessionConfirm:"Are you sure to logout all sessions?"}},ao="Reserved IP",un="ip-region-cache";async function Fi(e){const t=`https://ipapi.co/${e}/json/`,o=await(await fetch(t)).json();let r="";return o.error?o.reserved&&(r=ao):r=[o.country_name,o.region,o.city].filter(Boolean).join("/"),r}async function zi(e){const t=`https://api.ip.sb/geoip/${e}`,o=await(await fetch(t)).json();let r="";return o.error?o.reserved&&(r=ao):r=[o.country,o.region,o.city].filter(Boolean).join("/"),r}async function qi(e){let t="",n={};try{const o=localStorage.getItem(un);o&&(n=JSON.parse(o))}catch{n={}}if(n[e])t=n[e];else{try{t=await zi(e)}catch{console.warn("Fail to get ip region from ip.sb")}if(!t)try{t=await Fi(e)}catch{console.warn("Fail to get ip region from ip-api.co")}}if(t){const o=Object.keys(n);o.length>100&&delete n[o[0]],n[e]&&delete n[e],n[e]=t,localStorage.setItem(un,JSON.stringify(n))}return t}const dn=e=>new Xe(e,{browser:[[/(ArcWallet)\/([\w\.]+)/i],[Xe.BROWSER.NAME,Xe.BROWSER.VERSION]]}).getResult(),$i=new Uo({concurrency:1}),Ui=R.memo(({userSession:e})=>{const t=gn({loading:!0,ipRegion:""}),{t:n}=Y();return R.useEffect(()=>{$i.add(async()=>{try{t.ipRegion=await qi(e.lastLoginIp)}finally{t.loading=!1}})},[t,e.lastLoginIp]),a.jsx(T,{children:t.ipRegion?a.jsxs(a.Fragment,{children:[a.jsx(G,{variant:"body2",children:t.ipRegion}),a.jsx(G,{variant:"body2",color:"grey",children:e.lastLoginIp||n("unknown")})]}):a.jsxs(a.Fragment,{children:[a.jsx(G,{children:e.lastLoginIp||n("unknown")}),t.loading?a.jsx(G,{variant:"body2",color:"grey",sx:{textAlign:"center"},children:a.jsx(Ho,{size:12,color:"inherit"})}):null]})})});function is({user:e,showAction:t=!0,showUser:n=!0}){const{session:o}=R.useContext(Pe),r=Wo(),{locale:i}=Y(),l=tr({key:"md"}),u=Vo(w=>w.breakpoints.down("lg")),{confirmApi:s,confirmHolder:f}=Go(),h=V((w,v={})=>Sn(Di,w,i,"en",v)),x=V(async()=>{let w=(e==null?void 0:e.userSessions)||[];try{!(e!=null&&e.userSessions)&&o.user&&(w=await Ke.userSession.getMyLoginSessions())}catch(k){console.warn("Failed to convert ip to region"),console.error(k)}const v=new Date().getTime();return Zo(w,k=>k.visitorId===r?-1:v-new Date(k.updatedAt).getTime())}),c=Yo(x),p=X(()=>c.data||[],[c.data]),d=V(({visitorId:w})=>{s.open({title:h("logoutThisSession"),content:h("logoutThisSessionConfirm"),confirmButtonText:h("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:h("cancel"),onConfirm:async()=>{await Ke.user.logout({visitorId:w}),c.refresh(),s.close()}})}),g=X(()=>p.filter(v=>v.visitorId!==r),[p]),b=V(()=>{s.open({title:h("logoutAllSession"),content:h("logoutAllSessionConfirm"),confirmButtonText:h("confirm"),confirmButtonProps:{color:"error"},cancelButtonText:h("cancel"),onConfirm:async()=>{const w=g.map(v=>()=>Ke.user.logout({visitorId:v.visitorId}));await _i(w,{concurrency:3,stopOnError:!1}),c.refresh(),s.close()}})}),S=[];t&&S.push(a.jsx(Je,{title:h("logoutAllTips"),children:a.jsx(re,{sx:{ml:.5},size:"small",variant:"contained",color:"error",onClick:b,disabled:g.length===0,children:h("logoutAll")})},"logoutAll"));const j=X(()=>({search:!1,sort:!1,download:!1,filter:!1,print:!1,expandableRowsOnClick:!1,searchDebounceTime:600}),[]),y=[{label:h("platform"),name:"platform",options:{customBodyRenderLite:w=>{var E,_;const v=p[w],k=dn(v.ua);return a.jsx(T,{children:[(E=k.os)==null?void 0:E.name,(_=k.os)==null?void 0:_.version].filter(Boolean).join("/")||h("unknown")})}}},{label:h("deviceType"),name:"deviceType",options:{customBodyRenderLite:w=>{var E,_;const v=p[w],k=dn(v.ua);return a.jsx(T,{children:[(E=k.browser)==null?void 0:E.name,(_=k.browser)==null?void 0:_.version].filter(Boolean).join("/")||h("unknown")})}}},{label:h("walletOS"),name:"walletOS",options:{customBodyRenderLite:w=>{var k;const v=p[w];return a.jsx(T,{children:((k=v.extra)==null?void 0:k.walletOS)||h("unknown")})}}},n&&{label:h("user"),name:"user",options:{customBodyRenderLite:w=>{const v=p[w];return a.jsx(T,{sx:{minWidth:150,maxWidth:250},children:a.jsx(Bi,{sessionUser:v.user,user:e})})}}},{label:h("createdAt"),name:"createdAt",options:{customBodyRenderLite:w=>{const v=p[w];return v.createdAt?a.jsx(Ft,{value:v.createdAt,relativeRange:3*86400*1e3,locale:i}):h("unknown")}}},{label:h("updatedAt"),name:"updatedAt",options:{customBodyRenderLite:w=>{const v=p[w];return v.status==="expired"?h("expired"):a.jsx(Ft,{value:v.updatedAt,relativeRange:3*86400*1e3,locale:i})}}},{label:h("lastLoginIp"),name:"lastLoginIp",options:{customBodyRenderLite:w=>{const v=p[w];return a.jsx(Ui,{userSession:v})}}},t&&{label:h("actions"),name:"actions",options:{customBodyRenderLite:w=>{const v=p[w];return a.jsx(T,{children:a.jsx(re,{sx:{whiteSpace:"nowrap",fontSize:"12px",px:1},disabled:r===v.visitorId,variant:"outlined",size:"small",color:"error",onClick:()=>d({visitorId:v.visitorId}),children:v.status==="expired"?h("remove"):r===v.visitorId?h("currentSession"):h("logout")})})}}}].filter(Boolean);return a.jsxs(T,{sx:{maxWidth:l?"unset":u?"calc(100vw - 300px)":"920px",".MuiTableCell-head":{whiteSpace:"nowrap",fontWeight:"bold"},".MuiTableCell-root":{paddingRight:"8px"}},children:[f,a.jsx(er,{locale:i,data:p,columns:y,customButtons:S,options:j,loading:c.loading})]})}Te(Tn,"/profile");Te(Tn,"/settings");function Hi({src:e,open:t=!1,componentDid:n,loading:o=!0,storeUrl:r,onClose:i=()=>{},onComplete:l=()=>{},onLoad:u=()=>{}},s){const f=R.useRef(null),h=V(x=>{var c,p,d;t&&(((c=x==null?void 0:x.data)==null?void 0:c.event)==="resourceDialog.close"&&i(),((p=x==null?void 0:x.data)==null?void 0:p.event)==="resourceDialog.complete"&&l(),((d=x==null?void 0:x.data)==null?void 0:d.event)==="resourceDialog.loaded"&&u())});return Qo(()=>{window.addEventListener("message",h)}),Ko(()=>{window.removeEventListener("message",h)}),R.useImperativeHandle(s,()=>({selectBlocklet:x=>{var c;(c=f.current)!=null&&c.contentWindow&&f.current.contentWindow.postMessage({event:"resourceDialog.select",data:x,componentDid:n,storeUrl:r},"*")}})),t?a.jsx("iframe",{ref:f,src:e,title:"Resource Dialog",style:{position:"fixed",top:0,left:o?"-100vw":0,width:"100vw",height:"100vh",zIndex:9999,backgroundColor:"transparent",border:"none"}}):null}R.forwardRef(Hi);export{io as D,rs as F,os as H,gt as I,is as U,so as W,Ci as d};
|