@abtnode/blocklet-services 1.16.39 → 1.16.40-beta-20250227-092112-1815be0a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/index.js +39 -1
- package/api/libs/env.js +2 -0
- package/api/routes/blocklet.js +16 -20
- package/api/routes/user.js +26 -0
- package/api/services/auth/connect/config-vault.js +52 -0
- package/api/services/auth/connect/lost-passport-issue.js +1 -1
- package/api/services/auth/index.js +2 -0
- package/api/util/index.js +1 -0
- package/dist/assets/{Add-BmJKwQyO.js → Add-CehHkXtu.js} +1 -1
- package/dist/assets/{ArrowDropDown-0rZMX37X.js → ArrowDropDown-C9ESZaJj.js} +1 -1
- package/dist/assets/{CheckCircle-Db4MUQqT.js → CheckCircle-Cux_Aj3D.js} +1 -1
- package/dist/assets/{ChevronLeft-y4mI_FZX.js → ChevronLeft-sep8bYo6.js} +1 -1
- package/dist/assets/{ChevronRight-BmoRuC5d.js → ChevronRight-E1JFBSBQ.js} +1 -1
- package/dist/assets/{DeleteOutline-Dk_mx0U9.js → DeleteOutline--b0uhBXu.js} +1 -1
- package/dist/assets/{Done-DAPcWPre.js → Done-Bh7hkuyF.js} +1 -1
- package/dist/assets/{Download-DBtg8_XU.js → Download-DauItc6L.js} +1 -1
- package/dist/assets/{Error-bxhw092Z.js → Error-DHOJb02F.js} +1 -1
- package/dist/assets/{Google-BBRxInBI.js → Google-Dc5CpY7r.js} +1 -1
- package/dist/assets/{InfoOutlined-0ZG65hON.js → InfoOutlined-CaT2OjoW.js} +1 -1
- package/dist/assets/{Launch-B0LQdypi.js → Launch-DLH9cYau.js} +1 -1
- package/dist/assets/{LaunchOutlined-B8xgQQyz.js → LaunchOutlined-CJoRhUht.js} +1 -1
- package/dist/assets/{MoreHoriz-C_pz-iQX.js → MoreHoriz-BdiHG-9g.js} +1 -1
- package/dist/assets/{PlayArrow-BxDb8_fk.js → PlayArrow-D3Xnrt2P.js} +1 -1
- package/dist/assets/{ViewList-Clymz6qO.js → ViewList-vuv6XoB6.js} +1 -1
- package/dist/assets/{access-control-l36Kv1eP.js → access-control-BvYVIpWS.js} +1 -1
- package/dist/assets/{actions-Bg4B90Ng.js → actions-Bejw-e5O.js} +1 -1
- package/dist/assets/add-component-core-RBE5ELHU.js +765 -0
- package/dist/assets/{add-resource-DJDXCNGa.js → add-resource-CDUyyqzt.js} +1 -1
- package/dist/assets/{addon-BMefWj3Y.js → addon-BpqDO9tj.js} +1 -1
- package/dist/assets/{analytics-CGZZCYDW.js → analytics-BJtYxYJj.js} +1 -1
- package/dist/assets/api-CSRyy6oj.js +1 -0
- package/dist/assets/ar-CsSmyJif.js +3 -0
- package/dist/assets/{audit-logs-4T6NVdcs.js → audit-logs-CElQxuBw.js} +1 -1
- package/dist/assets/{base32-CVAoJIo6.js → base32-Dxx2uO-0.js} +1 -1
- package/dist/assets/{branding-BknIP81X.js → branding-Co6nc32C.js} +2 -2
- package/dist/assets/{bundle-avatar-CoNY8eRA.js → bundle-avatar-CKPO4II3.js} +1 -1
- package/dist/assets/{button-CwN4D6jN.js → button-DgAPN-lt.js} +1 -1
- package/dist/assets/{click-to-copy-6ddlB0Mf.js → click-to-copy-SiMa2cN1.js} +1 -1
- package/dist/assets/{cloneDeep-BRiLvZjr.js → cloneDeep-DvDcCvik.js} +1 -1
- package/dist/assets/{complete-CodLsV6Q.js → complete-DmlGFAlQ.js} +1 -1
- package/dist/assets/{component-C6KUjmKu.js → component-DiDY-Kw4.js} +72 -72
- package/dist/assets/{config-DAYU_u5T.js → config-CLiczBaW.js} +1 -1
- package/dist/assets/{config-HWuoTPzE.js → config-Czk-fLJI.js} +1 -1
- package/dist/assets/{config-navigation-zrtX4o4X.js → config-navigation-BB7iqfQe.js} +6 -6
- package/dist/assets/{config-space-XhZzfFlu.js → config-space-DDnvKnd8.js} +1 -1
- package/dist/assets/{confirm-DOiB1azm.js → confirm-0Ay4zz5F.js} +1 -1
- package/dist/assets/{connect-DdcVSk7o.js → connect-COTQTs95.js} +1 -1
- package/dist/assets/{connect-Pr7yPGbr.js → connect-NWnGxDqK.js} +1 -1
- package/dist/assets/{connect-to-CPFzIYRI.js → connect-to-BWm1tQwA.js} +1 -1
- package/dist/assets/{dashboard-69TJZZXf.js → dashboard-Dr8B5iTX.js} +3 -3
- package/dist/assets/de-Ck9YpIMJ.js +3 -0
- package/dist/assets/{delete-confirm-B40sLeZT.js → delete-confirm-CRp06UUb.js} +1 -1
- package/dist/assets/{did-address-CMEabTWK.js → did-address-B8WelYg7.js} +1 -1
- package/dist/assets/{domain-CO__yMfd.js → domain-CjvQEI6b.js} +1 -1
- package/dist/assets/{domain-action-card-IU_piBkf.js → domain-action-card-DjmDH3Uj.js} +1 -1
- package/dist/assets/domains-C7Nqnf0f.js +1 -0
- package/dist/assets/{email-9Wn_1QHa.js → email-DOlX0xe4.js} +1 -1
- package/dist/assets/es-C27J2JeQ.js +3 -0
- package/dist/assets/{exchange-passport-C6ZRYzGg.js → exchange-passport-CoUK8I9Y.js} +1 -1
- package/dist/assets/{form-text-input-DFJ-HY33.js → form-text-input-CIKBwPcu.js} +1 -1
- package/dist/assets/fr-VZUGRssx.js +3 -0
- package/dist/assets/{fuel-CStHTdj2.js → fuel-CIXFsXuA.js} +1 -1
- package/dist/assets/{fullpage-8h94224x.js → fullpage-D6C9sgie.js} +1 -1
- package/dist/assets/{get-safe-url-Dx3fHYdz.js → get-safe-url-CvMgdIsM.js} +1 -1
- package/dist/assets/{get-safe-url-uLL3o3Bz.js → get-safe-url-Cww9J3VK.js} +1 -1
- package/dist/assets/hi-0Dd5nSCH.js +1 -0
- package/dist/assets/{home-Sj7bRyOu.js → home-BcaRSPYx.js} +1 -1
- package/dist/assets/id-DnRIoIgL.js +3 -0
- package/dist/assets/{iframe--xVlWiFx.js → iframe-BeZaO9bZ.js} +1 -1
- package/dist/assets/{index-BbPryvTN.js → index-19jBKgbd.js} +1 -1
- package/dist/assets/{index-B-6lM7Ra.js → index-2YkwBVJx.js} +1 -1
- package/dist/assets/{index-B88z8ae_.js → index-6U1CWqVe.js} +1 -1
- package/dist/assets/{index-DHbUVurK.js → index-BCiJnwmE.js} +1 -1
- package/dist/assets/{index-Dej7O8u1.js → index-BSEUYLtR.js} +3 -3
- package/dist/assets/{index-CaYw_sGg.js → index-BgO4U6d_.js} +1 -1
- package/dist/assets/{index-Bvc1Het2.js → index-C2rpN-Mh.js} +48 -48
- package/dist/assets/{index-DCYfQZQv.js → index-C5E0f4MM.js} +1 -1
- package/dist/assets/{index-BFlzRo9y.js → index-C8diuKw-.js} +1 -1
- package/dist/assets/{index-Chdw3Mm9.js → index-CIovcKjE.js} +11 -11
- package/dist/assets/{index-BuEBzoTv.js → index-COMBNFIf.js} +1 -1
- package/dist/assets/index-CqFqcj_v.js +144 -0
- package/dist/assets/{index-DiBrr7rQ.js → index-D9unNEiC.js} +1 -1
- package/dist/assets/index-DvZ2VDrh.js +104 -0
- package/dist/assets/{index-C2fPoxDR.js → index-ISNTpwcS.js} +1 -1
- package/dist/assets/{index-CLtmZ4Uc.js → index-d-LGBl0-.js} +1 -1
- package/dist/assets/{invitation-Bk4V3npR.js → invitation-CXP1edIt.js} +1 -1
- package/dist/assets/{invite-BUrxUiM4.js → invite-B-tph_rB.js} +1 -1
- package/dist/assets/{issue-passport-LjCBWTLp.js → issue-passport-BUVkg2-O.js} +1 -1
- package/dist/assets/{item-CU8gjQLR.js → item-CuvjqLrq.js} +1 -1
- package/dist/assets/ja-CV7QuyLJ.js +3 -0
- package/dist/assets/ko-Cc-UWhAC.js +3 -0
- package/dist/assets/{layout-DlcnI-bQ.js → layout-DH6138ux.js} +1 -1
- package/dist/assets/{list-C0r8iRRB.js → list-WWP8bcK6.js} +1 -1
- package/dist/assets/{list-header-BxwaCWhi.js → list-header-MogH2bs1.js} +1 -1
- package/dist/assets/localization-D_98hbR7.js +1 -0
- package/dist/assets/{log-DDt6ZHuh.js → log-Bt5p-4Xe.js} +1 -1
- package/dist/assets/{login-BrcbsHWR.js → login-CIIEVvdS.js} +1 -1
- package/dist/assets/{login-oauth-callback-BtiDyMHL.js → login-oauth-callback-DjEWdBzQ.js} +1 -1
- package/dist/assets/{logo-uploader-D4fxXmur.js → logo-uploader-B7U1Vq_i.js} +3 -3
- package/dist/assets/lost-passport-CoAoO7Df.js +168 -0
- package/dist/assets/omit-C3h2fvu1.js +1 -0
- package/dist/assets/{open-window-DnH-0MMu.js → open-window-HNe0hOEj.js} +1 -1
- package/dist/assets/overview-i1NNuzDM.js +12 -0
- package/dist/assets/{page-header-DuudrBOC.js → page-header-DdgQ5XYN.js} +1 -1
- package/dist/assets/{permission-gXouk-B0.js → permission-Yia679mu.js} +1 -1
- package/dist/assets/{preferences-A51J87rf.js → preferences-BBS3DDBv.js} +1 -1
- package/dist/assets/pt-BSP6S8OX.js +1 -0
- package/dist/assets/{publish-resource-NOa9YLAl.js → publish-resource-D_iibuC8.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-BZeJj24u.js → react-beautiful-dnd.esm-DCOKNvGX.js} +1 -1
- package/dist/assets/{relative-time-BCWLhhPH.js → relative-time-Tv8VzuvC.js} +1 -1
- package/dist/assets/ru-6g_ewyGj.js +1 -0
- package/dist/assets/sdk-CLSP2XpB.js +1 -0
- package/dist/assets/{session-BZcdSP0I.js → session-C4pA5XYh.js} +1 -1
- package/dist/assets/{setup-Cpu7J4_y.js → setup-VtCz7ZF5.js} +3 -3
- package/dist/assets/{start-BLOBNJG_.js → start-DyNFzLUm.js} +1 -1
- package/dist/assets/status-EWGG72pb.js +2 -0
- package/dist/assets/{step-actions-CmVVf-zP.js → step-actions-CYRP8hK4.js} +1 -1
- package/dist/assets/{studio-BTdXXP89.js → studio-scrRCunQ.js} +1 -1
- package/dist/assets/{switch-control-CvWGgTqL.js → switch-control-BzT1Su42.js} +1 -1
- package/dist/assets/th-esVTW-ew.js +1 -0
- package/dist/assets/{traffic-BY4t5NK9.js → traffic-CzR0nh2V.js} +3 -3
- package/dist/assets/{transfer-BanXhhLH.js → transfer-CQc79y3K.js} +1 -1
- package/dist/assets/{unsubscribe-moWDAdNt.js → unsubscribe-Bl6Rt5x9.js} +1 -1
- package/dist/assets/{useAsync-CEZQNMFX.js → useAsync-DIcJhKIm.js} +1 -1
- package/dist/assets/{useAsyncRetry-Dgdo-UIp.js → useAsyncRetry-DCwz7CH3.js} +1 -1
- package/dist/assets/{useLocalStorage-W2jFfyW5.js → useLocalStorage-Cd4aCng4.js} +1 -1
- package/dist/assets/user-center-DlCGGhhc.js +71 -0
- package/dist/assets/{util-D7bUyvZo.js → util-AoFN7OG5.js} +1 -1
- package/dist/assets/{util-DSr6HSOc.js → util-qn_aF3F7.js} +1 -1
- package/dist/assets/{vendor-arcblock-CCaRdbCP.js → vendor-arcblock-Cn3IZfUJ.js} +11 -11
- package/dist/assets/{vendor-hooks-ZnvK17j8.js → vendor-hooks-6khEvbqa.js} +1 -1
- package/dist/assets/{vendor-utils-5TjOM6td.js → vendor-utils-CzbloUV0.js} +1 -1
- package/dist/assets/vi-hhbCmVdC.js +1 -0
- package/dist/assets/wrap-locale-DigqkQih.js +1 -0
- package/dist/assets/zh-DhdNY_Mb.js +4 -0
- package/dist/assets/zh-tw-joa-mQa2.js +3 -0
- package/dist/index.html +4 -4
- package/dist/service-worker.js +1 -1
- package/package.json +43 -43
- package/dist/assets/Loop-BXX-hAMr.js +0 -1
- package/dist/assets/add-component-core-DIvTbKqk.js +0 -765
- package/dist/assets/api-K65cLqol.js +0 -1
- package/dist/assets/ar-C834W8qI.js +0 -3
- package/dist/assets/de-CFnPquDv.js +0 -3
- package/dist/assets/domains-COuggT-Y.js +0 -1
- package/dist/assets/es-1vhRGejN.js +0 -3
- package/dist/assets/fr-Ns3NPRIk.js +0 -3
- package/dist/assets/hi-ViGzXalB.js +0 -1
- package/dist/assets/id-BLl6P6K2.js +0 -3
- package/dist/assets/index-BqgSchC2.js +0 -144
- package/dist/assets/index-CWXx4nxx.js +0 -104
- package/dist/assets/ja-n4xwdLG4.js +0 -3
- package/dist/assets/keyboard-arrow-down-rounded-DadBVmpO.js +0 -1
- package/dist/assets/ko-Dbj9FZ69.js +0 -3
- package/dist/assets/localization-DV3j9YRu.js +0 -1
- package/dist/assets/lost-passport-DWkyeWzY.js +0 -168
- package/dist/assets/overview-Da2dyzO3.js +0 -12
- package/dist/assets/pt-BhWb_zOM.js +0 -1
- package/dist/assets/ru-CT_fQaXm.js +0 -1
- package/dist/assets/sdk-BwPkyeHJ.js +0 -1
- package/dist/assets/th-0YsGJNSr.js +0 -1
- package/dist/assets/user-center-C6w10W9t.js +0 -71
- package/dist/assets/vi-Bd_aQi4n.js +0 -1
- package/dist/assets/wrap-locale-CQN7rz2k.js +0 -1
- package/dist/assets/zh-BpuBeUbL.js +0 -4
- package/dist/assets/zh-tw-BxRHN771.js +0 -3
|
@@ -0,0 +1,765 @@
|
|
|
1
|
+
import{a1 as Yr,j as i,E as L,a2 as vt,aa as Ve,a3 as Q,T as me,t as Wt,aN as Jr,bL as Qr,I as Uo,bA as Wo,bM as zo,z as qo,aJ as Ia,bn as Ko,bN as Pa,M as dr,bt as La,bu as _a,bv as Na,br as Aa,ad as Vo,L as Da,bm as Ma,aw as Fa,al as Zr,a4 as Go,a6 as Ba,ac as nt,e as Gn,am as $a,x as Hn,R as Ho,V as Xo,ar as Yo,bK as Jo,ay as Ua,as as Ut,bO as Yi,A as Ji,Z as Wa,P as za,G as qa,v as Ka,$ as Va,D as Ga,K as Qi,bp as Ha}from"./vendor-mui-core-BWT1QT-d.js";import{r as N,g as ei,u as Xa,k as Ya,a as ti,e as Ee,b as Ja,l as Qa}from"./vendor-react-D-afvo_7.js";import{j as Qo,d as Za,S as el,s as Zo,A as tl}from"./item-CuvjqLrq.js";import{a0 as ni,a3 as dt,a8 as ri,E as es,aD as Zi,b as ts,e as yt,aE as lt,o as nl,m as rl,n as hr,ab as il,_ as ns,aF as eo,aG as ol,j as ii,C as sl,aH as qt,D as lr,aI as al,f as to,aJ as rs,aK as sr,ag as oi,al as is,W as pr,aL as ll,aM as os,aw as cl,aN as ul,aO as Ur,aP as dl,a7 as hl,aQ as pl,a6 as fl}from"./vendor-arcblock-Cn3IZfUJ.js";import{f as Mt,z as Rn,Z as ml,$ as gl,h as wt,a0 as vl,D as yl,a1 as bl,a2 as xl,a3 as wl,C as fr,a4 as ss,X as El,a5 as Sl,a6 as Tl,a7 as jl,a8 as er,a9 as no,aa as Ol}from"./index-DvZ2VDrh.js";import{L as ro}from"./launch-result-message-BqgwRruP.js";import{P as as}from"./page-header-DdgQ5XYN.js";import{b as ut,p as kl,B as Rl,C as io,x as qn,U as ls,Z as Cl,a8 as Il,G as Pl,K as Er,w as si,a9 as Ll,aa as _l,ab as Nl,ac as Al,y as Un,ad as Dl,c as Ml}from"./vendor-utils-CzbloUV0.js";import{u as Fl,C as Bl}from"./config-space-DDnvKnd8.js";import{R as Sr}from"./logo-uploader-B7U1Vq_i.js";import{S as $l}from"./index-d-LGBl0-.js";import{s as cs,h as Ul,w as Wl,f as zl,a as ql,b as Kl,c as Vl,M as Gl}from"./index-DdqHlWJ9.js";import{o as Xn,e as Hl,a as Xl,f as us,w as Yl}from"./vendor-hooks-6khEvbqa.js";import{g as Jl}from"./get-safe-url-Cww9J3VK.js";import{p as Ql}from"./index-ISNTpwcS.js";import{r as Zl}from"./cloneDeep-DvDcCvik.js";import{I as oo}from"./index-19jBKgbd.js";import{u as ec}from"./session-C4pA5XYh.js";import{W as tc}from"./did-address-B8WelYg7.js";import{_ as ds}from"./useLocalStorage-Cd4aCng4.js";import{f as hs}from"./format-error-C0Ke3VXF.js";import{a as so}from"./api-CSRyy6oj.js";import{d as nc,a as rc,v as ic,e as oc}from"./util-qn_aF3F7.js";import{u as ps}from"./use-mobile-B37G6FHz.js";import{C as sc}from"./content-layout-Dw7m52fz.js";import{C as ac,D as lc,a as cc}from"./connect-to-BWm1tQwA.js";import{d as uc}from"./ArrowDropDown-C9ESZaJj.js";import{d as dc}from"./ChevronLeft-sep8bYo6.js";import{d as hc}from"./ChevronRight-E1JFBSBQ.js";const lf="blocklet-add-component-registry",cf="server-add-registry",uf=e=>`resource-${e}-add-registry`;var ai={},pc=Yr;Object.defineProperty(ai,"__esModule",{value:!0});var fs=ai.default=void 0,fc=pc(ni()),mc=i;fs=ai.default=(0,fc.default)((0,mc.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function li({disabled:e,children:t,onConfirm:n}){return N.useEffect(()=>{if(e)return()=>{};const r=o=>{o.code==="Enter"&&(o.metaKey===!0||o.ctrlKey===!0)&&(o.preventDefault(),o.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}li.propTypes={disabled:L.bool,children:L.any.isRequired,onConfirm:L.func.isRequired};li.defaultProps={disabled:!1};function ci({onContinue:e,nextDisabled:t,launching:n,texts:r,description:o}){const[u,d]=N.useState(!1),h=()=>d(v=>!v);return i.jsxs(i.Fragment,{children:[i.jsx(gc,{children:i.jsxs(li,{disabled:t,onConfirm:e,children:[i.jsx("div",{className:"eula-trigger",onClick:h,children:r.listenName}),i.jsx(dt,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?i.jsxs(i.Fragment,{children:[i.jsx(vt,{size:14}),r.launchingText]}):r.buttonNext})]})}),i.jsx(ri,{open:u,title:r.listenName,onClose:()=>d(!1),children:o})]})}ci.propTypes={onContinue:L.func.isRequired,nextDisabled:L.bool,launching:L.bool,description:L.any,texts:L.object};ci.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const gc=Ve.div`
|
|
2
|
+
margin: 0 auto;
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
align-items: center;
|
|
6
|
+
|
|
7
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.sm}px) {
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.eula-trigger {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
text-decoration: underline;
|
|
14
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
15
|
+
padding-right: 24px;
|
|
16
|
+
}
|
|
17
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
18
|
+
padding: 16px;
|
|
19
|
+
}
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
white-space: nowrap;
|
|
22
|
+
&:hover {
|
|
23
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.next-button {
|
|
28
|
+
min-width: 200px;
|
|
29
|
+
}
|
|
30
|
+
`;var ui={exports:{}},ao=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,vc=/\n/g,yc=/^\s*/,bc=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xc=/^:\s*/,wc=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ec=/^[;\s]*/,Sc=/^\s+|\s+$/g,Tc=`
|
|
31
|
+
`,lo="/",co="*",un="",jc="comment",Oc="declaration",kc=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(S){var R=S.match(vc);R&&(n+=R.length);var _=S.lastIndexOf(Tc);r=~_?S.length-_:r+S.length}function u(){var S={line:n,column:r};return function(R){return R.position=new d(S),x(),R}}function d(S){this.start=S,this.end={line:n,column:r},this.source=t.source}d.prototype.content=e;function h(S){var R=new Error(t.source+":"+n+":"+r+": "+S);if(R.reason=S,R.filename=t.source,R.line=n,R.column=r,R.source=e,!t.silent)throw R}function v(S){var R=S.exec(e);if(R){var _=R[0];return o(_),e=e.slice(_.length),R}}function x(){v(yc)}function s(S){var R;for(S=S||[];R=a();)R!==!1&&S.push(R);return S}function a(){var S=u();if(!(lo!=e.charAt(0)||co!=e.charAt(1))){for(var R=2;un!=e.charAt(R)&&(co!=e.charAt(R)||lo!=e.charAt(R+1));)++R;if(R+=2,un===e.charAt(R-1))return h("End of comment missing");var _=e.slice(2,R-2);return r+=2,o(_),e=e.slice(R),r+=2,S({type:jc,comment:_})}}function k(){var S=u(),R=v(bc);if(R){if(a(),!v(xc))return h("property missing ':'");var _=v(wc),D=S({type:Oc,property:uo(R[0].replace(ao,un)),value:_?uo(_[0].replace(ao,un)):un});return v(Ec),D}}function y(){var S=[];s(S);for(var R;R=k();)R!==!1&&(S.push(R),s(S));return S}return x(),y()};function uo(e){return e?e.replace(Sc,un):un}var Rc=kc;function ms(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,o=Rc(e),u=typeof t=="function",d,h,v=0,x=o.length;v<x;v++)r=o[v],d=r.property,h=r.value,u?t(d,h,r):h&&(n||(n={}),n[d]=h);return n}ui.exports=ms;ui.exports.default=ms;var Cc=ui.exports;const Ic=ei(Cc),Pc={}.hasOwnProperty;function Lc(e,t,n){if(typeof e!="function")throw new TypeError("h is not a function");const r=Nc(e),o=Mc(e),u=Dc(e);let d,h;if(typeof n=="string"||typeof n=="boolean"?(d=n,n={}):(n||(n={}),d=n.prefix),t&&t.type==="root"){const v=t.children[0];h=t.children.length===1&&v.type==="element"?v:{type:"element",tagName:"div",properties:{},children:t.children}}else if(t&&t.type==="element")h=t;else throw new Error("Expected root or element, not `"+(t&&t.type||t)+"`");return gs(e,h,{schema:n.space==="svg"?cs:Ul,prefix:d==null?r||o||u?"h-":void 0:typeof d=="string"?d:d?"h-":void 0,key:0,react:r,vue:o,vdom:u,hyperscript:Ac(e)})}function gs(e,t,n){const r=n.schema;let o=r,u=t.tagName;const d={},h=[];let v=-1,x;r.space==="html"&&u.toLowerCase()==="svg"&&(o=cs,n.schema=o);for(x in t.properties)t.properties&&Pc.call(t.properties,x)&&_c(d,x,t.properties[x],n,u);if(n.vdom&&(o.space==="html"?u=u.toUpperCase():o.space&&(d.namespace=Wl[o.space])),n.prefix&&(n.key++,d.key=n.prefix+n.key),t.children)for(;++v<t.children.length;){const s=t.children[v];s.type==="element"?h.push(gs(e,s,n)):s.type==="text"&&h.push(s.value)}return n.schema=r,h.length>0?e.call(t,u,d,h):e.call(t,u,d)}function _c(e,t,n,r,o){const u=zl(r.schema,t);let d;n==null||typeof n=="number"&&Number.isNaN(n)||n===!1&&(r.vue||r.vdom||r.hyperscript)||!n&&u.boolean&&(r.vue||r.vdom||r.hyperscript)||(Array.isArray(n)&&(n=u.commaSeparated?ql(n):Kl(n)),u.boolean&&r.hyperscript&&(n=""),u.property==="style"&&typeof n=="string"&&(r.react||r.vue||r.vdom)&&(n=Fc(n,o)),r.vue?u.property!=="style"&&(d="attrs"):u.mustUseProperty||(r.vdom?u.property!=="style"&&(d="attributes"):r.hyperscript&&(d="attrs")),d?e[d]=Object.assign(e[d]||{},{[u.attribute]:n}):u.space&&r.react?e[Vl[u.property]||u.property]=n:e[u.attribute]=n)}function Nc(e){const t=e("div",{});return!!(t&&("_owner"in t||"_store"in t)&&(t.key===void 0||t.key===null))}function Ac(e){return"context"in e&&"cleanup"in e}function Dc(e){return e("div",{}).type==="VirtualNode"}function Mc(e){const t=e("div",{});return!!(t&&t.context&&t.context._isVue)}function Fc(e,t){const n={};try{Ic(e,(r,o)=>{r.slice(0,4)==="-ms-"&&(r="ms-"+r.slice(4)),n[r.replace(/-([a-z])/g,(u,d)=>d.toUpperCase())]=o})}catch(r){const o=r;throw o.message=t+"[style]"+o.message.slice(9),o}return n}var Bc=vs;function vs(e){if(typeof e=="string")return zc(e);if(e==null)return qc;if(typeof e=="object")return("length"in e?Wc:Uc)(e);if(typeof e=="function")return e;throw new Error("Expected function, string, or object as test")}function $c(e){for(var t=[],n=e.length,r=-1;++r<n;)t[r]=vs(e[r]);return t}function Uc(e){return t;function t(n){var r;for(r in e)if(n[r]!==e[r])return!1;return!0}}function Wc(e){var t=$c(e),n=t.length;return r;function r(){for(var o=-1;++o<n;)if(t[o].apply(this,arguments))return!0;return!1}}function zc(e){return t;function t(n){return!!(n&&n.type===e)}}function qc(){return!0}var Kc=mr,Vc=Bc,ys=!0,bs="skip",ar=!1;mr.CONTINUE=ys;mr.SKIP=bs;mr.EXIT=ar;function mr(e,t,n,r){var o;typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),o=Vc(t),u(e,null,[]);function u(h,v,x){var s=[],a;return(!t||o(h,v,x[x.length-1]||null))&&(s=ho(n(h,x)),s[0]===ar)?s:h.children&&s[0]!==bs?(a=ho(d(h.children,x.concat(h))),a[0]===ar?a:s):s}function d(h,v){for(var x=-1,s=r?-1:1,a=(r?h.length:x)+s,k;a>x&&a<h.length;){if(k=u(h[a],a,v),k[0]===ar)return k;a=typeof k[1]=="number"?k[1]:a+s}}}function ho(e){return e!==null&&typeof e=="object"&&"length"in e?e:typeof e=="number"?[ys,e]:[e]}var Gc=vr,gr=Kc,Hc=gr.CONTINUE,Xc=gr.SKIP,Yc=gr.EXIT;vr.CONTINUE=Hc;vr.SKIP=Xc;vr.EXIT=Yc;function vr(e,t,n,r){typeof t=="function"&&typeof n!="function"&&(r=n,n=t,t=null),gr(e,t,o,r);function o(u,d){var h=d[d.length-1],v=h?h.children.indexOf(u):null;return n(u,v,h)}}var Jc=Gc,Qc=Object.prototype.hasOwnProperty,Tr={align:"text-align",valign:"vertical-align",height:"height",width:"width"},Zc=function(t){return Jc(t,"element",eu),t};function eu(e){if(!(e.tagName!=="tr"&&e.tagName!=="td"&&e.tagName!=="th")){var t,n;for(t in Tr)!Qc.call(Tr,t)||e.properties[t]===void 0||(n=Tr[t],tu(e,n,e.properties[t]),delete e.properties[t])}}function tu(e,t,n){var r=(e.properties.style||"").trim();r&&!/;\s*/.test(r)&&(r+=";"),r&&(r+=" ");var o=r+t+": "+n+";";e.properties.style=o}const nu=ei(Zc);function ru(e){const t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}const iu={}.hasOwnProperty,ou=new Set(["table","thead","tbody","tfoot","tr"]);function su(e){if(!e||typeof e.createElement!="function")throw new TypeError("createElement is not a function");const t=e.createElement,n=e.fixTableCellAlign!==!1;Object.assign(this,{Compiler:r});function r(u){let d=Lc(o,n?nu(u):u,e.prefix);return u.type==="root"?(d=d&&typeof d=="object"&&"type"in d&&"props"in d&&d.type==="div"&&(u.children.length!==1||u.children[0].type!=="element")?d.props.children:[d],t(e.Fragment||"div",{},d)):d}function o(u,d,h){if(h&&ou.has(u)&&(h=h.filter(v=>!ru(v))),e.components&&iu.call(e.components,u)){const v=e.components[u];return e.passNode&&typeof v=="function"&&(d=Object.assign({node:this},d)),t(v,d,h)}return t(u,d,h)}}function di({children:e}){return i.jsx(au,{children:e})}const po="source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace !important",au=Ve(Q)`
|
|
32
|
+
.highlight pre,
|
|
33
|
+
pre {
|
|
34
|
+
border-radius: 5px;
|
|
35
|
+
}
|
|
36
|
+
code {
|
|
37
|
+
font-family: ${po};
|
|
38
|
+
}
|
|
39
|
+
pre code {
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
font-family: ${po};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
h1,
|
|
45
|
+
h2,
|
|
46
|
+
h3,
|
|
47
|
+
h4,
|
|
48
|
+
h5,
|
|
49
|
+
h6 {
|
|
50
|
+
font-weight: 700 !important;
|
|
51
|
+
font-size: 1.2rem !important;
|
|
52
|
+
line-height: 1.5 !important;
|
|
53
|
+
margin-bottom: 16px;
|
|
54
|
+
margin-top: 24px;
|
|
55
|
+
border-bottom: initial !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.CodeMirror pre {
|
|
59
|
+
background: #f6f8fa !important;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.anchor {
|
|
63
|
+
display: none;
|
|
64
|
+
}
|
|
65
|
+
`;di.propTypes={children:L.any.isRequired};di.defaultProps={};function xs({infoList:e=[]}){return i.jsx(Q,{className:"info-table",sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"max-content 1fr"},columnGap:4,rowGap:1.5},children:e.map(t=>i.jsxs(i.Fragment,{children:[i.jsx(Q,{component:"span",sx:{fontWeight:"bold",whiteSpace:"nowrap"},children:t.key}),i.jsx(Q,{component:"span",sx:{marginTop:{xs:-1,md:0}},children:t.value})]}))})}xs.propTypes={infoList:L.arrayOf(L.shape({key:L.string,value:L.string}))};const lu=e=>e.payment?(e.payment.price||[]).map(n=>n.value||0).every(n=>n===0):!0,cu=new su({createElement:N.createElement}).Compiler,Ct={zh:{appinfo:{name:"应用名",version:"版本号",author:"开发者",description:"描述",community:"社区地址",documentation:"文档手册",support:"服务支持",overview:"概述",requirements:"节点版本要求"}},en:{appinfo:{name:"Name",version:"Version",author:"Author",description:"Description",community:"Community",documentation:"Documentation",support:"Support",overview:"Overview",requirements:"Server requirements"}}};function hi({blockletMeta:e,locale:t,handleDescEle:n}){const{data:r}=e,{registryUrl:o,did:u}=r,d=Mt.getDisplayName({meta:r}),h=Xn(()=>o&&u?fetch(Zi(o,"/api/blocklets",u,"readme")).then(S=>S.json()):null,{refreshDeps:[o,u]}),v=Hl(()=>h.data?h.data[t]||h.data.en||h.data[Object.keys(h.data)[0]]:"",[h]),x=r&&r.htmlAst?cu(r.htmlAst):"",s=lu(r);let a=ut(r,"owner.fullName");if(a){const S=ut(r,"owner.did");S&&(a=i.jsxs(Q,{sx:{display:"flex",alignItems:"center",gap:1},children:[a,i.jsx(es,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:S,compact:!0,size:14,locale:t})]}))}else a=ut(r,"author.name");const k=[{key:ut(Ct[t],"appinfo.name"),value:Mt.getDisplayName({meta:r})},{key:ut(Ct[t],"appinfo.version"),value:r.version},{key:ut(Ct[t],"appinfo.author"),value:a},{type:"description",key:ut(Ct[t],"appinfo.description"),value:r.description}];r.requirements&&k.push({key:ut(Ct[t],"appinfo.requirements"),value:r.requirements.server}),r.community&&k.push({key:ut(Ct[t],"appinfo.community"),value:i.jsx("a",{href:r.community,target:"_blank",rel:"noreferrer",children:r.community})}),r.documentation&&k.push({key:ut(Ct[t],"appinfo.documentation"),value:i.jsx("a",{href:r.documentation,target:"_blank",rel:"noreferrer",children:r.documentation})}),r.support&&k.push({key:ut(Ct[t],"appinfo.support"),value:i.jsx("a",{href:`mailto:${r.support}`,target:"_blank",rel:"noreferrer",children:r.support})}),x&&k.push({key:ut(Ct[t],"appinfo.overview"),value:""});let y;return t==="zh"?y=i.jsxs(i.Fragment,{children:[s?i.jsxs("p",{children:["您可以免费使用 ",i.jsx("b",{children:d}),";"]}):i.jsxs("p",{children:["您需要购买才能使用 ",i.jsx("b",{children:d}),";"]}),i.jsx("p",{children:"在应用启动前,需要选择您的节点;"}),i.jsx("p",{children:"如果您没有节点,我们会引导您创建新的节点;"}),i.jsx("p",{children:"下面为该应用的信息:"})]}):y=i.jsxs(i.Fragment,{children:[s?i.jsxs("p",{children:["You can use ",i.jsx("b",{children:d})," for free;"]}):i.jsxs("p",{children:["You need to purchase before launch ",i.jsx("b",{children:d}),";"]}),i.jsx("p",{children:"Before the blocklet starts, you need to select your Blocklet Server; "}),i.jsx("p",{children:"If you do not have any Blocklet Server, we will guide you to create a new one; "}),i.jsx("p",{children:"Below is the information for the blocklet: "})]}),i.jsxs(du,{children:[n||y,i.jsx(xs,{infoList:k}),v?i.jsxs("div",{className:"app-overview",children:[i.jsx(me,{variant:"h5",gutterBottom:!0,children:ut(Ct[t],"appinfo.overview")}),i.jsx(di,{children:i.jsx(uu,{component:"div",className:"content-wrapper post-content",children:i.jsx(Gl,{source:v,wrapperElement:{"data-color-mode":"light"},urlTransform:(S,R,_)=>S.startsWith("/")?Zi(o,S):S})})})]}):x?i.jsx("div",{className:"app-overview",children:x}):null]})}const uu=Ve(me)`
|
|
66
|
+
width: 100%;
|
|
67
|
+
word-wrap: break-word;
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
line-height: 1.5em;
|
|
70
|
+
min-height: 10vh;
|
|
71
|
+
margin-bottom: 40px !important;
|
|
72
|
+
|
|
73
|
+
.alert-content {
|
|
74
|
+
max-width: 100%;
|
|
75
|
+
p:last-of-type {
|
|
76
|
+
margin-bottom: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
iframe {
|
|
81
|
+
width: 100% !important;
|
|
82
|
+
}
|
|
83
|
+
`,du=Ve.div`
|
|
84
|
+
.info-table {
|
|
85
|
+
a {
|
|
86
|
+
word-break: break-all;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.app-overview {
|
|
90
|
+
font-size: 16px;
|
|
91
|
+
margin: 16px 0 0 16px;
|
|
92
|
+
h1 {
|
|
93
|
+
margin: 8px 0;
|
|
94
|
+
font-size: 20px;
|
|
95
|
+
}
|
|
96
|
+
h2 {
|
|
97
|
+
margin: 8px 0;
|
|
98
|
+
font-size: 18px;
|
|
99
|
+
}
|
|
100
|
+
ul {
|
|
101
|
+
display: block;
|
|
102
|
+
list-style-type: disc;
|
|
103
|
+
padding-left: 2em;
|
|
104
|
+
li {
|
|
105
|
+
display: list-item;
|
|
106
|
+
list-style: disc;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
blockquote {
|
|
110
|
+
margin-left: 2em;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
`;hi.propTypes={blockletMeta:L.object.isRequired,locale:L.string.isRequired,handleDescEle:L.node};hi.defaultProps={handleDescEle:""};function hu({...e}){return i.jsxs("div",{...e,style:{width:"100%"},children:[i.jsx("h3",{children:"End User License Agreement for Application"}),i.jsxs("p",{children:["Blocklet Server License Agreement ",ts.COPYRIGHT_OWNER," version 2020-08-28"]}),i.jsx("p",{children:"BLOCKLET SERVER LICENSE AGREEMENT"}),i.jsx("p",{children:"暂无"})]})}function pu(e){var t,n,r,o;return`${((t=e.bundleSource)==null?void 0:t.store)||e.meta.homepage}/assets/${(n=e.meta)==null?void 0:n.did}/${((r=e.meta)==null?void 0:r.logo)||"logo.png"}?v=${(o=e.meta)==null?void 0:o.version}`}function pi({installRelated:e,meta:t,show:n,onClose:r,components:o,loading:u}){const{t:d}=yt(),h=Wt(a=>a.breakpoints.down("md"));if(!n)return null;const v=!u&&o.length===0,x=!u&&o.length!==0,s=40;return i.jsxs(ri,{title:d("blocklet.component.relatedComponents",{name:t.title}),maxWidth:!1,fullWidth:!1,onClose:(a,k)=>{k!=="backdropClick"&&r(!1)},PaperProps:{style:h?{width:"100%",height:window.innerHeight}:{maxWidth:500,minWidth:300,width:"80%"}},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:[u&&i.jsx(Q,{sx:{marginTop:4,display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:i.jsx(Q,{sx:{fontSize:32},color:"primary.main",component:lt,icon:"line-md:loading-loop"})}),v&&i.jsx(Q,{sx:{textAlign:"center"},children:d("blocklet.component.noDependencies",{name:t.title})}),x&&i.jsx(Q,{sx:{marginBottom:2},children:o.map(a=>{if(!a.meta)return null;const{required:k}=a;let y;return e||k?y=1:y=.5,i.jsxs(Q,{sx:{opacity:y,padding:"10px 0px",paddingBottom:.5,marginTop:0,display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"flex-start"},children:[i.jsx("img",{style:{width:s,height:s,minWidth:s,minHeight:s},src:pu(a),alt:a.meta.title}),i.jsxs(Q,{sx:{display:"flex",flexDirection:"column",justifyContent:"start",alignItems:"start",flex:1,marginLeft:2},children:[i.jsxs(Q,{sx:{display:"flex",flexDirection:"row",justifyContent:"start",alignItems:"center",fontSize:"16px",fontWeight:"bold",cursor:"pointer",".link-icon":{opacity:0},":hover .link-icon":{opacity:1}},onClick:()=>{var S;window.open(Jl(`${((S=a.bundleSource)==null?void 0:S.store)||a.meta.homepage}/blocklets/${a.meta.did}`,{allowDomains:null}),"_blank")},children:[a.meta.title,i.jsx(Q,{sx:{display:k?"inline-block":"none",fontSize:"12px",fontWeight:"bold",marginLeft:1},children:d("blocklet.component.required")}),i.jsxs(Q,{sx:{paddingLeft:1,fontSize:"13px",fontWeight:"400"},component:"span",children:[a.meta.version,i.jsx(Q,{className:"link-icon",icon:"fluent:open-20-filled",component:lt,sx:{color:"primary.main",fontSize:16,transform:"translate(6px, 3px)",transition:"all 0.1s"}})]})]}),i.jsx(Q,{sx:{marginTop:0,opacity:.7},children:a.meta.description})]})]},a.meta.did)})})]})}pi.propTypes={meta:L.object,show:L.bool,onClose:L.func.isRequired,installRelated:L.func,components:L.array.isRequired,loading:L.bool.isRequired};pi.defaultProps={meta:null,show:!1,installRelated:!1};function fu(e){return e&&(e.registryUrl||e.homepage)&&e.did?`${e.registryUrl||e.homepage}/api/blocklets/${e==null?void 0:e.did}/blocklet.json`:""}function mu(e){const{api:t}=Rn(),[n]=Xa(),r=n.get("blocklet_meta_url")||fu(e),[o,u]=N.useState([]),[d,h]=N.useState(!1);return N.useEffect(()=>{!r||e!=null&&e.inputUrl||(h(!0),t.getDynamicComponents({input:{url:r}}).then(v=>{u(v.components)}).finally(()=>{h(!1)}))},[r]),{components:o,loading:d}}function ws(e){const{info:t}=Rn();return N.useMemo(()=>{var n,r,o;return!e||!((n=e.docker)!=null&&n.image)||(r=e.docker)!=null&&r.image&&((o=e.docker)!=null&&o.runBaseScript)?!0:window.blocklet?window.blocklet.enableDocker&&window.blocklet.enableDockerNetwork:t.enableDocker&&t.enableDockerNetwork},[e,t])}function fi({installRelated:e,onChangeInstallRelated:t,meta:n,onClickNext:r,handleDescEle:o}){const u=Ya(),{t:d,locale:h}=yt(),[v,x]=N.useState(!1),{components:s,loading:a}=mu(n),k=ws(n),y=r||(()=>{u(`/launch-blocklet/install${window.location.search}`)}),S=()=>{x(!0)},R=()=>{x(!1)};return i.jsxs(gu,{children:[i.jsx("div",{className:"app-content",children:i.jsx("div",{className:"agreement",children:i.jsx("div",{className:"agreement-content",children:k?i.jsx(hi,{blockletMeta:{data:n},locale:h,handleDescEle:o}):i.jsx(Q,{sx:{p:3},children:i.jsx(me,{children:d("launchBlocklet.dockerBlockletCantInstall")})})})})}),i.jsxs(Q,{className:"agreement-bottom",sx:{"> .agreement-loading":{color:"primary.main"}},children:[a?i.jsx(lt,{className:"agreement-loading",icon:"line-md:loading-loop",style:{fontSize:42,transform:"scale(0.6)"}}):null,k&&t&&(s!=null&&s.length)?i.jsxs(Q,{sx:{display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"},children:[i.jsx(Jr,{sx:{mr:.5},checked:e,onChange:_=>t(_.currentTarget.checked),control:i.jsx(Qr,{}),label:i.jsx("span",{children:d("launchBlocklet.installRelatedComponents")})}),i.jsx(Q,{sx:{"> button svg":{color:"primary.main"}},children:i.jsx(Uo,{size:"small",onClick:S,children:i.jsx(lt,{icon:"octicon:package-dependencies-16"})})})]}):null,i.jsx("div",{className:"button-container","data-cy":"agree-all",children:k?i.jsx(ci,{onContinue:y,description:i.jsx(hu,{}),texts:{listenName:d("launchBlocklet.license"),buttonNext:d("launchBlocklet.next")}}):null})]}),i.jsx(pi,{installRelated:e,meta:n,show:v,onClose:R,components:s,loading:a})]})}fi.propTypes={meta:L.object.isRequired,onClickNext:L.func,handleDescEle:L.node,installRelated:L.bool,onChangeInstallRelated:L.func};fi.defaultProps={onClickNext:null,handleDescEle:"",installRelated:!0,onChangeInstallRelated:null};const gu=Ve.div`
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
align-items: center;
|
|
117
|
+
width: 100%;
|
|
118
|
+
height: 100%;
|
|
119
|
+
flex: 1;
|
|
120
|
+
.app-content {
|
|
121
|
+
padding: 2px 24px 24px;
|
|
122
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
123
|
+
padding-top: 10px;
|
|
124
|
+
}
|
|
125
|
+
width: 100%;
|
|
126
|
+
flex: 1;
|
|
127
|
+
letter-spacing: normal;
|
|
128
|
+
}
|
|
129
|
+
.agreement {
|
|
130
|
+
position: relative;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
width: 100%;
|
|
134
|
+
height: 100%;
|
|
135
|
+
border: 1px solid ${e=>e.theme.palette.grey[100]};
|
|
136
|
+
border-radius: 12px;
|
|
137
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
138
|
+
margin-top: 24px;
|
|
139
|
+
}
|
|
140
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
141
|
+
margin-top: 16px;
|
|
142
|
+
}
|
|
143
|
+
.agreement-content {
|
|
144
|
+
position: absolute;
|
|
145
|
+
left: 0;
|
|
146
|
+
top: 0;
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
font-size: 14px;
|
|
150
|
+
overflow-y: auto;
|
|
151
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
152
|
+
padding: 0 24px;
|
|
153
|
+
}
|
|
154
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
155
|
+
padding: 0 16px;
|
|
156
|
+
}
|
|
157
|
+
&:after {
|
|
158
|
+
display: block;
|
|
159
|
+
content: '';
|
|
160
|
+
height: 24px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
.agreement-bottom {
|
|
165
|
+
display: flex;
|
|
166
|
+
width: 100%;
|
|
167
|
+
padding: 24px;
|
|
168
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
169
|
+
flex-direction: row;
|
|
170
|
+
align-items: center;
|
|
171
|
+
margin-left: auto;
|
|
172
|
+
}
|
|
173
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
174
|
+
flex-direction: column;
|
|
175
|
+
align-items: center;
|
|
176
|
+
padding-top: 0;
|
|
177
|
+
padding-bottom: 16px;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
.button-container {
|
|
181
|
+
${e=>e.theme.breakpoints.up("md")} {
|
|
182
|
+
margin-left: auto;
|
|
183
|
+
}
|
|
184
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
185
|
+
padding-top: 0;
|
|
186
|
+
padding-bottom: 16px;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
`;var Es={},mi={exports:{}},Ss={exports:{}},Mn=Ss.exports={github:{protocols:["git","http","git+ssh","git+https","ssh","https"],domain:"github.com",treepath:"tree",filetemplate:"https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}",bugstemplate:"https://{domain}/{user}/{project}/issues",gittemplate:"git://{auth@}{domain}/{user}/{project}.git{#committish}",tarballtemplate:"https://codeload.{domain}/{user}/{project}/tar.gz/{committish}"},bitbucket:{protocols:["git+ssh","git+https","ssh","https"],domain:"bitbucket.org",treepath:"src",tarballtemplate:"https://{domain}/{user}/{project}/get/{committish}.tar.gz"},gitlab:{protocols:["git+ssh","git+https","ssh","https"],domain:"gitlab.com",treepath:"tree",bugstemplate:"https://{domain}/{user}/{project}/issues",httpstemplate:"git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}",tarballtemplate:"https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}",pathmatch:/^\/([^/]+)\/((?!.*(\/-\/|\/repository(\/[^/]+)?\/archive\.tar\.gz)).*?)(?:\.git|\/)?$/},gist:{protocols:["git","git+ssh","git+https","ssh","https"],domain:"gist.github.com",pathmatch:/^[/](?:([^/]+)[/])?([a-z0-9]{7,})(?:[.]git)?$/,filetemplate:"https://gist.githubusercontent.com/{user}/{project}/raw{/committish}/{path}",bugstemplate:"https://{domain}/{project}",gittemplate:"git://{domain}/{project}.git{#committish}",sshtemplate:"git@{domain}:/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{project}.git{#committish}",browsetemplate:"https://{domain}/{project}{/committish}",browsefiletemplate:"https://{domain}/{project}{/committish}{#path}",docstemplate:"https://{domain}/{project}{/committish}",httpstemplate:"git+https://{domain}/{project}.git{#committish}",shortcuttemplate:"{type}:{project}{#committish}",pathtemplate:"{project}{#committish}",tarballtemplate:"https://codeload.github.com/gist/{project}/tar.gz/{committish}",hashformat:function(e){return"file-"+Ts(e)}}},fo={sshtemplate:"git@{domain}:{user}/{project}.git{#committish}",sshurltemplate:"git+ssh://git@{domain}/{user}/{project}.git{#committish}",browsetemplate:"https://{domain}/{user}/{project}{/tree/committish}",browsefiletemplate:"https://{domain}/{user}/{project}/{treepath}/{committish}/{path}{#fragment}",docstemplate:"https://{domain}/{user}/{project}{/tree/committish}#readme",httpstemplate:"git+https://{auth@}{domain}/{user}/{project}.git{#committish}",filetemplate:"https://{domain}/{user}/{project}/raw/{committish}/{path}",shortcuttemplate:"{type}:{user}/{project}{#committish}",pathtemplate:"{user}/{project}{#committish}",pathmatch:/^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/,hashformat:Ts};Object.keys(Mn).forEach(function(e){Object.keys(fo).forEach(function(t){Mn[e][t]||(Mn[e][t]=fo[t])}),Mn[e].protocols_re=RegExp("^("+Mn[e].protocols.map(function(t){return t.replace(/([\\+*{}()[\]$^|])/g,"\\$1")}).join("|")+"):$")});function Ts(e){return e.toLowerCase().replace(/^\W+|\/|\W+$/g,"").replace(/\W+/g,"-")}var js=Ss.exports,mo=js,jn=Object.assign||function(t,n){if(n===null||typeof n!="object")return t;const r=Object.keys(n);let o=r.length;for(;o--;)t[r[o]]=n[r[o]];return t},vu=Ye;function Ye(e,t,n,r,o,u,d){var h=this;h.type=e,Object.keys(mo[e]).forEach(function(v){h[v]=mo[e][v]}),h.user=t,h.auth=n,h.project=r,h.committish=o,h.default=u,h.opts=d||{}}Ye.prototype.hash=function(){return this.committish?"#"+this.committish:""};Ye.prototype._fill=function(e,t){if(e){var n=jn({},t);n.path=n.path?n.path.replace(/^[/]+/g,""):"",t=jn(jn({},this.opts),t);var r=this;Object.keys(this).forEach(function(s){r[s]!=null&&n[s]==null&&(n[s]=r[s])});var o=n.auth,u=n.committish,d=n.fragment,h=n.path,v=n.project;Object.keys(n).forEach(function(s){var a=n[s];(s==="path"||s==="project")&&typeof a=="string"?n[s]=a.split("/").map(function(k){return encodeURIComponent(k)}).join("/"):s!=="domain"&&(n[s]=encodeURIComponent(a))}),n["auth@"]=o?o+"@":"",n["#fragment"]=d?"#"+this.hashformat(d):"",n.fragment=n.fragment?n.fragment:"",n["#path"]=h?"#"+this.hashformat(h):"",n["/path"]=n.path?"/"+n.path:"",n.projectPath=v.split("/").map(encodeURIComponent).join("/"),t.noCommittish?(n["#committish"]="",n["/tree/committish"]="",n["/committish"]="",n.committish=""):(n["#committish"]=u?"#"+u:"",n["/tree/committish"]=n.committish?"/"+n.treepath+"/"+n.committish:"",n["/committish"]=n.committish?"/"+n.committish:"",n.committish=n.committish||"master");var x=e;return Object.keys(n).forEach(function(s){x=x.replace(new RegExp("[{]"+s+"[}]","g"),n[s])}),t.noGitPlus?x.replace(/^git[+]/,""):x}};Ye.prototype.ssh=function(e){return this._fill(this.sshtemplate,e)};Ye.prototype.sshurl=function(e){return this._fill(this.sshurltemplate,e)};Ye.prototype.browse=function(e,t,n){return typeof e=="string"?(typeof t!="string"&&(n=t,t=null),this._fill(this.browsefiletemplate,jn({fragment:t,path:e},n))):this._fill(this.browsetemplate,e)};Ye.prototype.docs=function(e){return this._fill(this.docstemplate,e)};Ye.prototype.bugs=function(e){return this._fill(this.bugstemplate,e)};Ye.prototype.https=function(e){return this._fill(this.httpstemplate,e)};Ye.prototype.git=function(e){return this._fill(this.gittemplate,e)};Ye.prototype.shortcut=function(e){return this._fill(this.shortcuttemplate,e)};Ye.prototype.path=function(e){return this._fill(this.pathtemplate,e)};Ye.prototype.tarball=function(e){var t=jn({},e,{noCommittish:!1});return this._fill(this.tarballtemplate,t)};Ye.prototype.file=function(e,t){return this._fill(this.filetemplate,jn({path:e},t))};Ye.prototype.getDefaultRepresentation=function(){return this.default};Ye.prototype.toString=function(e){return this.default&&typeof this[this.default]=="function"?this[this.default](e):this.sshurl(e)};var jr,go;function yu(){return go||(go=1,jr=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),jr}var bu=ge;ge.Node=pn;ge.create=ge;function ge(e){var t=this;if(t instanceof ge||(t=new ge),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(o){t.push(o)});else if(arguments.length>0)for(var n=0,r=arguments.length;n<r;n++)t.push(arguments[n]);return t}ge.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t};ge.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}};ge.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}};ge.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)wu(this,arguments[e]);return this.length};ge.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)Eu(this,arguments[e]);return this.length};ge.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}};ge.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}};ge.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;n!==null;r++)e.call(t,n.value,r,this),n=n.next};ge.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;n!==null;r--)e.call(t,n.value,r,this),n=n.prev};ge.prototype.get=function(e){for(var t=0,n=this.head;n!==null&&t<e;t++)n=n.next;if(t===e&&n!==null)return n.value};ge.prototype.getReverse=function(e){for(var t=0,n=this.tail;n!==null&&t<e;t++)n=n.prev;if(t===e&&n!==null)return n.value};ge.prototype.map=function(e,t){t=t||this;for(var n=new ge,r=this.head;r!==null;)n.push(e.call(t,r.value,this)),r=r.next;return n};ge.prototype.mapReverse=function(e,t){t=t||this;for(var n=new ge,r=this.tail;r!==null;)n.push(e.call(t,r.value,this)),r=r.prev;return n};ge.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else if(this.head)r=this.head.next,n=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=0;r!==null;o++)n=e(n,r.value,o),r=r.next;return n};ge.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else if(this.tail)r=this.tail.prev,n=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var o=this.length-1;r!==null;o--)n=e(n,r.value,o),r=r.prev;return n};ge.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;n!==null;t++)e[t]=n.value,n=n.next;return e};ge.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;n!==null;t++)e[t]=n.value,n=n.prev;return e};ge.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new ge;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=0,o=this.head;o!==null&&r<e;r++)o=o.next;for(;o!==null&&r<t;r++,o=o.next)n.push(o.value);return n};ge.prototype.sliceReverse=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var n=new ge;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var r=this.length,o=this.tail;o!==null&&r>t;r--)o=o.prev;for(;o!==null&&r>e;r--,o=o.prev)n.push(o.value);return n};ge.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;o!==null&&r<e;r++)o=o.next;for(var u=[],r=0;o&&r<t;r++)u.push(o.value),o=this.removeNode(o);o===null&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev);for(var r=0;r<n.length;r++)o=xu(this,o,n[r]);return u};ge.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;n!==null;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};function xu(e,t,n){var r=t===e.head?new pn(n,null,t,e):new pn(n,t,t.next,e);return r.next===null&&(e.tail=r),r.prev===null&&(e.head=r),e.length++,r}function wu(e,t){e.tail=new pn(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function Eu(e,t){e.head=new pn(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function pn(e,t,n,r){if(!(this instanceof pn))return new pn(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}try{yu()(ge)}catch{}const Su=bu,dn=Symbol("max"),Dt=Symbol("length"),Tn=Symbol("lengthCalculator"),Wn=Symbol("allowStale"),hn=Symbol("maxAge"),At=Symbol("dispose"),vo=Symbol("noDisposeOnSet"),We=Symbol("lruList"),xt=Symbol("cache"),Os=Symbol("updateAgeOnGet"),Or=()=>1;class Tu{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[dn]=t.max||1/0;const n=t.length||Or;if(this[Tn]=typeof n!="function"?Or:n,this[Wn]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[hn]=t.maxAge||0,this[At]=t.dispose,this[vo]=t.noDisposeOnSet||!1,this[Os]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[dn]=t||1/0,Fn(this)}get max(){return this[dn]}set allowStale(t){this[Wn]=!!t}get allowStale(){return this[Wn]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[hn]=t,Fn(this)}get maxAge(){return this[hn]}set lengthCalculator(t){typeof t!="function"&&(t=Or),t!==this[Tn]&&(this[Tn]=t,this[Dt]=0,this[We].forEach(n=>{n.length=this[Tn](n.value,n.key),this[Dt]+=n.length})),Fn(this)}get lengthCalculator(){return this[Tn]}get length(){return this[Dt]}get itemCount(){return this[We].length}rforEach(t,n){n=n||this;for(let r=this[We].tail;r!==null;){const o=r.prev;yo(this,t,r,n),r=o}}forEach(t,n){n=n||this;for(let r=this[We].head;r!==null;){const o=r.next;yo(this,t,r,n),r=o}}keys(){return this[We].toArray().map(t=>t.key)}values(){return this[We].toArray().map(t=>t.value)}reset(){this[At]&&this[We]&&this[We].length&&this[We].forEach(t=>this[At](t.key,t.value)),this[xt]=new Map,this[We]=new Su,this[Dt]=0}dump(){return this[We].map(t=>cr(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[We]}set(t,n,r){if(r=r||this[hn],r&&typeof r!="number")throw new TypeError("maxAge must be a number");const o=r?Date.now():0,u=this[Tn](n,t);if(this[xt].has(t)){if(u>this[dn])return On(this,this[xt].get(t)),!1;const v=this[xt].get(t).value;return this[At]&&(this[vo]||this[At](t,v.value)),v.now=o,v.maxAge=r,v.value=n,this[Dt]+=u-v.length,v.length=u,this.get(t),Fn(this),!0}const d=new ju(t,n,u,o,r);return d.length>this[dn]?(this[At]&&this[At](t,n),!1):(this[Dt]+=d.length,this[We].unshift(d),this[xt].set(t,this[We].head),Fn(this),!0)}has(t){if(!this[xt].has(t))return!1;const n=this[xt].get(t).value;return!cr(this,n)}get(t){return kr(this,t,!0)}peek(t){return kr(this,t,!1)}pop(){const t=this[We].tail;return t?(On(this,t),t.value):null}del(t){On(this,this[xt].get(t))}load(t){this.reset();const n=Date.now();for(let r=t.length-1;r>=0;r--){const o=t[r],u=o.e||0;if(u===0)this.set(o.k,o.v);else{const d=u-n;d>0&&this.set(o.k,o.v,d)}}}prune(){this[xt].forEach((t,n)=>kr(this,n,!1))}}const kr=(e,t,n)=>{const r=e[xt].get(t);if(r){const o=r.value;if(cr(e,o)){if(On(e,r),!e[Wn])return}else n&&(e[Os]&&(r.value.now=Date.now()),e[We].unshiftNode(r));return o.value}},cr=(e,t)=>{if(!t||!t.maxAge&&!e[hn])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[hn]&&n>e[hn]},Fn=e=>{if(e[Dt]>e[dn])for(let t=e[We].tail;e[Dt]>e[dn]&&t!==null;){const n=t.prev;On(e,t),t=n}},On=(e,t)=>{if(t){const n=t.value;e[At]&&e[At](n.key,n.value),e[Dt]-=n.length,e[xt].delete(n.key),e[We].removeNode(t)}};class ju{constructor(t,n,r,o,u){this.key=t,this.value=n,this.length=r,this.now=o,this.maxAge=u||0}}const yo=(e,t,n,r)=>{let o=n.value;cr(e,o)&&(On(e,n),e[Wn]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};var Ou=Tu,Wr=ml,bo=js,ku=mi.exports=vu,Ru=Ou,Rr=new Ru({max:1e3}),Cu={"git+ssh:":"sshurl","git+https:":"https","ssh:":"sshurl","git:":"git"};function Iu(e){return Cu[e]||e.slice(0,-1)}var Pu={"git:":!0,"https:":!0,"git+https:":!0,"http:":!0,"git+http:":!0};mi.exports.fromUrl=function(e,t){if(typeof e=="string"){var n=e+JSON.stringify(t||{});return Rr.has(n)||Rr.set(n,Lu(e,t)),Rr.get(n)}};function Lu(e,t){if(!(e==null||e==="")){var n=Nu(_u(e)?"github:"+e:e),r=Au(n),o=n.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/),u=Object.keys(bo).map(function(d){try{var h=bo[d],v=null;r.auth&&Pu[r.protocol]&&(v=r.auth);var x=r.hash?decodeURIComponent(r.hash.substr(1)):null,s=null,a=null,k=null;if(o&&o[1]===d)s=o[2]&&decodeURIComponent(o[2]),a=decodeURIComponent(o[3].replace(/\.git$/,"")),k="shortcut";else{if(r.host&&r.host!==h.domain&&r.host.replace(/^www[.]/,"")!==h.domain||!h.protocols_re.test(r.protocol)||!r.path)return;var y=h.pathmatch,S=r.path.match(y);if(!S)return;S[1]!==null&&S[1]!==void 0&&(s=decodeURIComponent(S[1].replace(/^:/,""))),a=decodeURIComponent(S[2]),k=Iu(r.protocol)}return new ku(d,s,v,a,x,k,t)}catch(R){if(!(R instanceof URIError))throw R}}).filter(function(d){return d});if(u.length===1)return u[0]}}function _u(e){return/^[^:@%/\s.-][^:@%/\s]*[/][^:@\s/%]+(?:#.*)?$/.test(e)}function Nu(e){var t=Wr.parse(e);return t.protocol==="gist:"&&t.host&&!t.path?t.protocol+"/"+t.host:e}function Au(e){var t=e.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/);if(!t){var n=Wr.parse(e);if(n.auth){const o=e.match(/[^@]+@[^:/]+/);if(o){var r=new Wr.URL(o[0]);n.auth=r.username||"",r.password&&(n.auth+=":"+r.password)}}return n}return{protocol:"git+ssh:",slashes:!0,auth:t[1],host:t[2],port:null,hostname:t[2],hash:t[4],search:null,query:null,pathname:"/"+t[3],path:"/"+t[3],href:"git+ssh://"+t[1]+"@"+t[2]+"/"+t[3]+(t[4]||"")}}var Du=mi.exports,fn={},te={},Mu=null;const Fu=Object.freeze(Object.defineProperty({__proto__:null,default:Mu},Symbol.toStringTag,{value:"Module"})),ks=ti(Fu),Bu=["ᄀ-ᇹ"," -〿","ぁ-ゔ","゙-ゞ","ァ-ヾ","ㄱ-ㆎ","㆐-㆟","㈀-㈜","㈠-㉃","㉠-㊰","㋀-㍶","㍻-㏝","㏠-㏾","一-龥","가-힣","-","豈-鶴"],$u=["︰-﹄","﹉-﹒","﹔-﹫","!-~","¢-₩"];var Uu={charsWide:Bu,charsFullWidth:$u};const{charsWide:Wu,charsFullWidth:zu}=Uu,Rs=new RegExp(`[${Wu.join("")}${zu.join("")}]`,"g"),qu=e=>e.replace(Rs,"xx").length;var Ku={default:qu,charsRegex:Rs};/*!
|
|
190
|
+
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
191
|
+
*
|
|
192
|
+
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
193
|
+
* Licensed under the MIT License.
|
|
194
|
+
*/var Vu=function(t){if(typeof t!="string"||t==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(n[2])return!0;t=t.slice(n.index+n[0].length)}return!1};/*!
|
|
195
|
+
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
196
|
+
*
|
|
197
|
+
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
198
|
+
* Released under the MIT License.
|
|
199
|
+
*/var Gu=Vu,Cs={"{":"}","(":")","[":"]"},Hu=function(e){if(e[0]==="!")return!0;for(var t=0,n=-2,r=-2,o=-2,u=-2,d=-2;t<e.length;){if(e[t]==="*"||e[t+1]==="?"&&/[\].+)]/.test(e[t])||r!==-1&&e[t]==="["&&e[t+1]!=="]"&&(r<t&&(r=e.indexOf("]",t)),r>t&&(d===-1||d>r||(d=e.indexOf("\\",t),d===-1||d>r)))||o!==-1&&e[t]==="{"&&e[t+1]!=="}"&&(o=e.indexOf("}",t),o>t&&(d=e.indexOf("\\",t),d===-1||d>o))||u!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"&&(u=e.indexOf(")",t),u>t&&(d=e.indexOf("\\",t),d===-1||d>u))||n!==-1&&e[t]==="("&&e[t+1]!=="|"&&(n<t&&(n=e.indexOf("|",t)),n!==-1&&e[n+1]!==")"&&(u=e.indexOf(")",n),u>n&&(d=e.indexOf("\\",n),d===-1||d>u))))return!0;if(e[t]==="\\"){var h=e[t+1];t+=2;var v=Cs[h];if(v){var x=e.indexOf(v,t);x!==-1&&(t=x+1)}if(e[t]==="!")return!0}else t++}return!1},Xu=function(e){if(e[0]==="!")return!0;for(var t=0;t<e.length;){if(/[*?{}()[\]]/.test(e[t]))return!0;if(e[t]==="\\"){var n=e[t+1];t+=2;var r=Cs[n];if(r){var o=e.indexOf(r,t);o!==-1&&(t=o+1)}if(e[t]==="!")return!0}else t++}return!1},Yu=function(t,n){if(typeof t!="string"||t==="")return!1;if(Gu(t))return!0;var r=Hu;return n&&n.strict===!1&&(r=Xu),r(t)},zr={exports:{}};(function(e,t){var n={};t=e.exports=F;var r;typeof kl=="object"&&n&&n.NODE_DEBUG&&/\bsemver\b/i.test(n.NODE_DEBUG)?r=function(){var l=Array.prototype.slice.call(arguments,0);l.unshift("SEMVER"),console.log.apply(console,l)}:r=function(){},t.SEMVER_SPEC_VERSION="2.0.0";var o=256,u=Number.MAX_SAFE_INTEGER||9007199254740991,d=16,h=o-6,v=t.re=[],x=t.safeRe=[],s=t.src=[],a=t.tokens={},k=0;function y(l){a[l]=k++}var S="[a-zA-Z0-9-]",R=[["\\s",1],["\\d",o],[S,h]];function _(l){for(var b=0;b<R.length;b++){var w=R[b][0],T=R[b][1];l=l.split(w+"*").join(w+"{0,"+T+"}").split(w+"+").join(w+"{1,"+T+"}")}return l}y("NUMERICIDENTIFIER"),s[a.NUMERICIDENTIFIER]="0|[1-9]\\d*",y("NUMERICIDENTIFIERLOOSE"),s[a.NUMERICIDENTIFIERLOOSE]="\\d+",y("NONNUMERICIDENTIFIER"),s[a.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+S+"*",y("MAINVERSION"),s[a.MAINVERSION]="("+s[a.NUMERICIDENTIFIER]+")\\.("+s[a.NUMERICIDENTIFIER]+")\\.("+s[a.NUMERICIDENTIFIER]+")",y("MAINVERSIONLOOSE"),s[a.MAINVERSIONLOOSE]="("+s[a.NUMERICIDENTIFIERLOOSE]+")\\.("+s[a.NUMERICIDENTIFIERLOOSE]+")\\.("+s[a.NUMERICIDENTIFIERLOOSE]+")",y("PRERELEASEIDENTIFIER"),s[a.PRERELEASEIDENTIFIER]="(?:"+s[a.NUMERICIDENTIFIER]+"|"+s[a.NONNUMERICIDENTIFIER]+")",y("PRERELEASEIDENTIFIERLOOSE"),s[a.PRERELEASEIDENTIFIERLOOSE]="(?:"+s[a.NUMERICIDENTIFIERLOOSE]+"|"+s[a.NONNUMERICIDENTIFIER]+")",y("PRERELEASE"),s[a.PRERELEASE]="(?:-("+s[a.PRERELEASEIDENTIFIER]+"(?:\\."+s[a.PRERELEASEIDENTIFIER]+")*))",y("PRERELEASELOOSE"),s[a.PRERELEASELOOSE]="(?:-?("+s[a.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+s[a.PRERELEASEIDENTIFIERLOOSE]+")*))",y("BUILDIDENTIFIER"),s[a.BUILDIDENTIFIER]=S+"+",y("BUILD"),s[a.BUILD]="(?:\\+("+s[a.BUILDIDENTIFIER]+"(?:\\."+s[a.BUILDIDENTIFIER]+")*))",y("FULL"),y("FULLPLAIN"),s[a.FULLPLAIN]="v?"+s[a.MAINVERSION]+s[a.PRERELEASE]+"?"+s[a.BUILD]+"?",s[a.FULL]="^"+s[a.FULLPLAIN]+"$",y("LOOSEPLAIN"),s[a.LOOSEPLAIN]="[v=\\s]*"+s[a.MAINVERSIONLOOSE]+s[a.PRERELEASELOOSE]+"?"+s[a.BUILD]+"?",y("LOOSE"),s[a.LOOSE]="^"+s[a.LOOSEPLAIN]+"$",y("GTLT"),s[a.GTLT]="((?:<|>)?=?)",y("XRANGEIDENTIFIERLOOSE"),s[a.XRANGEIDENTIFIERLOOSE]=s[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",y("XRANGEIDENTIFIER"),s[a.XRANGEIDENTIFIER]=s[a.NUMERICIDENTIFIER]+"|x|X|\\*",y("XRANGEPLAIN"),s[a.XRANGEPLAIN]="[v=\\s]*("+s[a.XRANGEIDENTIFIER]+")(?:\\.("+s[a.XRANGEIDENTIFIER]+")(?:\\.("+s[a.XRANGEIDENTIFIER]+")(?:"+s[a.PRERELEASE]+")?"+s[a.BUILD]+"?)?)?",y("XRANGEPLAINLOOSE"),s[a.XRANGEPLAINLOOSE]="[v=\\s]*("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+s[a.XRANGEIDENTIFIERLOOSE]+")(?:"+s[a.PRERELEASELOOSE]+")?"+s[a.BUILD]+"?)?)?",y("XRANGE"),s[a.XRANGE]="^"+s[a.GTLT]+"\\s*"+s[a.XRANGEPLAIN]+"$",y("XRANGELOOSE"),s[a.XRANGELOOSE]="^"+s[a.GTLT]+"\\s*"+s[a.XRANGEPLAINLOOSE]+"$",y("COERCE"),s[a.COERCE]="(^|[^\\d])(\\d{1,"+d+"})(?:\\.(\\d{1,"+d+"}))?(?:\\.(\\d{1,"+d+"}))?(?:$|[^\\d])",y("COERCERTL"),v[a.COERCERTL]=new RegExp(s[a.COERCE],"g"),x[a.COERCERTL]=new RegExp(_(s[a.COERCE]),"g"),y("LONETILDE"),s[a.LONETILDE]="(?:~>?)",y("TILDETRIM"),s[a.TILDETRIM]="(\\s*)"+s[a.LONETILDE]+"\\s+",v[a.TILDETRIM]=new RegExp(s[a.TILDETRIM],"g"),x[a.TILDETRIM]=new RegExp(_(s[a.TILDETRIM]),"g");var D="$1~";y("TILDE"),s[a.TILDE]="^"+s[a.LONETILDE]+s[a.XRANGEPLAIN]+"$",y("TILDELOOSE"),s[a.TILDELOOSE]="^"+s[a.LONETILDE]+s[a.XRANGEPLAINLOOSE]+"$",y("LONECARET"),s[a.LONECARET]="(?:\\^)",y("CARETTRIM"),s[a.CARETTRIM]="(\\s*)"+s[a.LONECARET]+"\\s+",v[a.CARETTRIM]=new RegExp(s[a.CARETTRIM],"g"),x[a.CARETTRIM]=new RegExp(_(s[a.CARETTRIM]),"g");var H="$1^";y("CARET"),s[a.CARET]="^"+s[a.LONECARET]+s[a.XRANGEPLAIN]+"$",y("CARETLOOSE"),s[a.CARETLOOSE]="^"+s[a.LONECARET]+s[a.XRANGEPLAINLOOSE]+"$",y("COMPARATORLOOSE"),s[a.COMPARATORLOOSE]="^"+s[a.GTLT]+"\\s*("+s[a.LOOSEPLAIN]+")$|^$",y("COMPARATOR"),s[a.COMPARATOR]="^"+s[a.GTLT]+"\\s*("+s[a.FULLPLAIN]+")$|^$",y("COMPARATORTRIM"),s[a.COMPARATORTRIM]="(\\s*)"+s[a.GTLT]+"\\s*("+s[a.LOOSEPLAIN]+"|"+s[a.XRANGEPLAIN]+")",v[a.COMPARATORTRIM]=new RegExp(s[a.COMPARATORTRIM],"g"),x[a.COMPARATORTRIM]=new RegExp(_(s[a.COMPARATORTRIM]),"g");var z="$1$2$3";y("HYPHENRANGE"),s[a.HYPHENRANGE]="^\\s*("+s[a.XRANGEPLAIN]+")\\s+-\\s+("+s[a.XRANGEPLAIN]+")\\s*$",y("HYPHENRANGELOOSE"),s[a.HYPHENRANGELOOSE]="^\\s*("+s[a.XRANGEPLAINLOOSE]+")\\s+-\\s+("+s[a.XRANGEPLAINLOOSE]+")\\s*$",y("STAR"),s[a.STAR]="(<|>)?=?\\s*\\*";for(var X=0;X<k;X++)r(X,s[X]),v[X]||(v[X]=new RegExp(s[X]),x[X]=new RegExp(_(s[X])));t.parse=O;function O(l,b){if((!b||typeof b!="object")&&(b={loose:!!b,includePrerelease:!1}),l instanceof F)return l;if(typeof l!="string"||l.length>o)return null;var w=b.loose?x[a.LOOSE]:x[a.FULL];if(!w.test(l))return null;try{return new F(l,b)}catch{return null}}t.valid=q;function q(l,b){var w=O(l,b);return w?w.version:null}t.clean=Z;function Z(l,b){var w=O(l.trim().replace(/^[=v]+/,""),b);return w?w.version:null}t.SemVer=F;function F(l,b){if((!b||typeof b!="object")&&(b={loose:!!b,includePrerelease:!1}),l instanceof F){if(l.loose===b.loose)return l;l=l.version}else if(typeof l!="string")throw new TypeError("Invalid Version: "+l);if(l.length>o)throw new TypeError("version is longer than "+o+" characters");if(!(this instanceof F))return new F(l,b);r("SemVer",l,b),this.options=b,this.loose=!!b.loose;var w=l.trim().match(b.loose?x[a.LOOSE]:x[a.FULL]);if(!w)throw new TypeError("Invalid Version: "+l);if(this.raw=l,this.major=+w[1],this.minor=+w[2],this.patch=+w[3],this.major>u||this.major<0)throw new TypeError("Invalid major version");if(this.minor>u||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>u||this.patch<0)throw new TypeError("Invalid patch version");w[4]?this.prerelease=w[4].split(".").map(function(T){if(/^[0-9]+$/.test(T)){var C=+T;if(C>=0&&C<u)return C}return T}):this.prerelease=[],this.build=w[5]?w[5].split("."):[],this.format()}F.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},F.prototype.toString=function(){return this.version},F.prototype.compare=function(l){return r("SemVer.compare",this.version,this.options,l),l instanceof F||(l=new F(l,this.options)),this.compareMain(l)||this.comparePre(l)},F.prototype.compareMain=function(l){return l instanceof F||(l=new F(l,this.options)),Se(this.major,l.major)||Se(this.minor,l.minor)||Se(this.patch,l.patch)},F.prototype.comparePre=function(l){if(l instanceof F||(l=new F(l,this.options)),this.prerelease.length&&!l.prerelease.length)return-1;if(!this.prerelease.length&&l.prerelease.length)return 1;if(!this.prerelease.length&&!l.prerelease.length)return 0;var b=0;do{var w=this.prerelease[b],T=l.prerelease[b];if(r("prerelease compare",b,w,T),w===void 0&&T===void 0)return 0;if(T===void 0)return 1;if(w===void 0)return-1;if(w===T)continue;return Se(w,T)}while(++b)},F.prototype.compareBuild=function(l){l instanceof F||(l=new F(l,this.options));var b=0;do{var w=this.build[b],T=l.build[b];if(r("prerelease compare",b,w,T),w===void 0&&T===void 0)return 0;if(T===void 0)return 1;if(w===void 0)return-1;if(w===T)continue;return Se(w,T)}while(++b)},F.prototype.inc=function(l,b){switch(l){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",b);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",b);break;case"prepatch":this.prerelease.length=0,this.inc("patch",b),this.inc("pre",b);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",b),this.inc("pre",b);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{for(var w=this.prerelease.length;--w>=0;)typeof this.prerelease[w]=="number"&&(this.prerelease[w]++,w=-2);w===-1&&this.prerelease.push(0)}b&&(this.prerelease[0]===b?isNaN(this.prerelease[1])&&(this.prerelease=[b,0]):this.prerelease=[b,0]);break;default:throw new Error("invalid increment argument: "+l)}return this.format(),this.raw=this.version,this},t.inc=ce;function ce(l,b,w,T){typeof w=="string"&&(T=w,w=void 0);try{return new F(l,w).inc(b,T).version}catch{return null}}t.diff=Y;function Y(l,b){if(Pt(l,b))return null;var w=O(l),T=O(b),C="";if(w.prerelease.length||T.prerelease.length){C="pre";var A="prerelease"}for(var $ in w)if(($==="major"||$==="minor"||$==="patch")&&w[$]!==T[$])return C+$;return A}t.compareIdentifiers=Se;var oe=/^[0-9]+$/;function Se(l,b){var w=oe.test(l),T=oe.test(b);return w&&T&&(l=+l,b=+b),l===b?0:w&&!T?-1:T&&!w?1:l<b?-1:1}t.rcompareIdentifiers=Fe;function Fe(l,b){return Se(b,l)}t.major=$e;function $e(l,b){return new F(l,b).major}t.minor=it;function it(l,b){return new F(l,b).minor}t.patch=ee;function ee(l,b){return new F(l,b).patch}t.compare=pe;function pe(l,b,w){return new F(l,w).compare(new F(b,w))}t.compareLoose=K;function K(l,b){return pe(l,b,!0)}t.compareBuild=Te;function Te(l,b,w){var T=new F(l,w),C=new F(b,w);return T.compare(C)||T.compareBuild(C)}t.rcompare=ie;function ie(l,b,w){return pe(b,l,w)}t.sort=pt;function pt(l,b){return l.sort(function(w,T){return t.compareBuild(w,T,b)})}t.rsort=xe;function xe(l,b){return l.sort(function(w,T){return t.compareBuild(T,w,b)})}t.gt=Je;function Je(l,b,w){return pe(l,b,w)>0}t.lt=ze;function ze(l,b,w){return pe(l,b,w)<0}t.eq=Pt;function Pt(l,b,w){return pe(l,b,w)===0}t.neq=Kt;function Kt(l,b,w){return pe(l,b,w)!==0}t.gte=Ft;function Ft(l,b,w){return pe(l,b,w)>=0}t.lte=Vt;function Vt(l,b,w){return pe(l,b,w)<=0}t.cmp=Le;function Le(l,b,w,T){switch(b){case"===":return typeof l=="object"&&(l=l.version),typeof w=="object"&&(w=w.version),l===w;case"!==":return typeof l=="object"&&(l=l.version),typeof w=="object"&&(w=w.version),l!==w;case"":case"=":case"==":return Pt(l,w,T);case"!=":return Kt(l,w,T);case">":return Je(l,w,T);case">=":return Ft(l,w,T);case"<":return ze(l,w,T);case"<=":return Vt(l,w,T);default:throw new TypeError("Invalid operator: "+b)}}t.Comparator=_e;function _e(l,b){if((!b||typeof b!="object")&&(b={loose:!!b,includePrerelease:!1}),l instanceof _e){if(l.loose===!!b.loose)return l;l=l.value}if(!(this instanceof _e))return new _e(l,b);l=l.trim().split(/\s+/).join(" "),r("comparator",l,b),this.options=b,this.loose=!!b.loose,this.parse(l),this.semver===Oe?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}var Oe={};_e.prototype.parse=function(l){var b=this.options.loose?x[a.COMPARATORLOOSE]:x[a.COMPARATOR],w=l.match(b);if(!w)throw new TypeError("Invalid comparator: "+l);this.operator=w[1]!==void 0?w[1]:"",this.operator==="="&&(this.operator=""),w[2]?this.semver=new F(w[2],this.options.loose):this.semver=Oe},_e.prototype.toString=function(){return this.value},_e.prototype.test=function(l){if(r("Comparator.test",l,this.options.loose),this.semver===Oe||l===Oe)return!0;if(typeof l=="string")try{l=new F(l,this.options)}catch{return!1}return Le(l,this.operator,this.semver,this.options)},_e.prototype.intersects=function(l,b){if(!(l instanceof _e))throw new TypeError("a Comparator is required");(!b||typeof b!="object")&&(b={loose:!!b,includePrerelease:!1});var w;if(this.operator==="")return this.value===""?!0:(w=new ve(l.value,b),st(this.value,w,b));if(l.operator==="")return l.value===""?!0:(w=new ve(this.value,b),st(l.semver,w,b));var T=(this.operator===">="||this.operator===">")&&(l.operator===">="||l.operator===">"),C=(this.operator==="<="||this.operator==="<")&&(l.operator==="<="||l.operator==="<"),A=this.semver.version===l.semver.version,$=(this.operator===">="||this.operator==="<=")&&(l.operator===">="||l.operator==="<="),ue=Le(this.semver,"<",l.semver,b)&&(this.operator===">="||this.operator===">")&&(l.operator==="<="||l.operator==="<"),se=Le(this.semver,">",l.semver,b)&&(this.operator==="<="||this.operator==="<")&&(l.operator===">="||l.operator===">");return T||C||A&&$||ue||se},t.Range=ve;function ve(l,b){if((!b||typeof b!="object")&&(b={loose:!!b,includePrerelease:!1}),l instanceof ve)return l.loose===!!b.loose&&l.includePrerelease===!!b.includePrerelease?l:new ve(l.raw,b);if(l instanceof _e)return new ve(l.value,b);if(!(this instanceof ve))return new ve(l,b);if(this.options=b,this.loose=!!b.loose,this.includePrerelease=!!b.includePrerelease,this.raw=l.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(function(w){return this.parseRange(w.trim())},this).filter(function(w){return w.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}ve.prototype.format=function(){return this.range=this.set.map(function(l){return l.join(" ").trim()}).join("||").trim(),this.range},ve.prototype.toString=function(){return this.range},ve.prototype.parseRange=function(l){var b=this.options.loose,w=b?x[a.HYPHENRANGELOOSE]:x[a.HYPHENRANGE];l=l.replace(w,bt),r("hyphen replace",l),l=l.replace(x[a.COMPARATORTRIM],z),r("comparator trim",l,x[a.COMPARATORTRIM]),l=l.replace(x[a.TILDETRIM],D),l=l.replace(x[a.CARETTRIM],H),l=l.split(/\s+/).join(" ");var T=b?x[a.COMPARATORLOOSE]:x[a.COMPARATOR],C=l.split(" ").map(function(A){return Ht(A,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(C=C.filter(function(A){return!!A.match(T)})),C=C.map(function(A){return new _e(A,this.options)},this),C},ve.prototype.intersects=function(l,b){if(!(l instanceof ve))throw new TypeError("a Range is required");return this.set.some(function(w){return St(w,b)&&l.set.some(function(T){return St(T,b)&&w.every(function(C){return T.every(function(A){return C.intersects(A,b)})})})})};function St(l,b){for(var w=!0,T=l.slice(),C=T.pop();w&&T.length;)w=T.every(function(A){return C.intersects(A,b)}),C=T.pop();return w}t.toComparators=Gt;function Gt(l,b){return new ve(l,b).set.map(function(w){return w.map(function(T){return T.value}).join(" ").trim().split(" ")})}function Ht(l,b){return r("comp",l,b),l=vn(l,b),r("caret",l),l=In(l,b),r("tildes",l),l=Yt(l,b),r("xrange",l),l=ot(l,b),r("stars",l),l}function ke(l){return!l||l.toLowerCase()==="x"||l==="*"}function In(l,b){return l.trim().split(/\s+/).map(function(w){return Qe(w,b)}).join(" ")}function Qe(l,b){var w=b.loose?x[a.TILDELOOSE]:x[a.TILDE];return l.replace(w,function(T,C,A,$,ue){r("tilde",l,T,C,A,$,ue);var se;return ke(C)?se="":ke(A)?se=">="+C+".0.0 <"+(+C+1)+".0.0":ke($)?se=">="+C+"."+A+".0 <"+C+"."+(+A+1)+".0":ue?(r("replaceTilde pr",ue),se=">="+C+"."+A+"."+$+"-"+ue+" <"+C+"."+(+A+1)+".0"):se=">="+C+"."+A+"."+$+" <"+C+"."+(+A+1)+".0",r("tilde return",se),se})}function vn(l,b){return l.trim().split(/\s+/).map(function(w){return Xt(w,b)}).join(" ")}function Xt(l,b){r("caret",l,b);var w=b.loose?x[a.CARETLOOSE]:x[a.CARET];return l.replace(w,function(T,C,A,$,ue){r("caret",l,T,C,A,$,ue);var se;return ke(C)?se="":ke(A)?se=">="+C+".0.0 <"+(+C+1)+".0.0":ke($)?C==="0"?se=">="+C+"."+A+".0 <"+C+"."+(+A+1)+".0":se=">="+C+"."+A+".0 <"+(+C+1)+".0.0":ue?(r("replaceCaret pr",ue),C==="0"?A==="0"?se=">="+C+"."+A+"."+$+"-"+ue+" <"+C+"."+A+"."+(+$+1):se=">="+C+"."+A+"."+$+"-"+ue+" <"+C+"."+(+A+1)+".0":se=">="+C+"."+A+"."+$+"-"+ue+" <"+(+C+1)+".0.0"):(r("no pr"),C==="0"?A==="0"?se=">="+C+"."+A+"."+$+" <"+C+"."+A+"."+(+$+1):se=">="+C+"."+A+"."+$+" <"+C+"."+(+A+1)+".0":se=">="+C+"."+A+"."+$+" <"+(+C+1)+".0.0"),r("caret return",se),se})}function Yt(l,b){return r("replaceXRanges",l,b),l.split(/\s+/).map(function(w){return Ze(w,b)}).join(" ")}function Ze(l,b){l=l.trim();var w=b.loose?x[a.XRANGELOOSE]:x[a.XRANGE];return l.replace(w,function(T,C,A,$,ue,se){r("xRange",l,T,C,A,$,ue,se);var De=ke(A),Ce=De||ke($),je=Ce||ke(ue),Ie=je;return C==="="&&Ie&&(C=""),se=b.includePrerelease?"-0":"",De?C===">"||C==="<"?T="<0.0.0-0":T="*":C&&Ie?(Ce&&($=0),ue=0,C===">"?(C=">=",Ce?(A=+A+1,$=0,ue=0):($=+$+1,ue=0)):C==="<="&&(C="<",Ce?A=+A+1:$=+$+1),T=C+A+"."+$+"."+ue+se):Ce?T=">="+A+".0.0"+se+" <"+(+A+1)+".0.0"+se:je&&(T=">="+A+"."+$+".0"+se+" <"+A+"."+(+$+1)+".0"+se),r("xRange return",T),T})}function ot(l,b){return r("replaceStars",l,b),l.trim().replace(x[a.STAR],"")}function bt(l,b,w,T,C,A,$,ue,se,De,Ce,je,Ie){return ke(w)?b="":ke(T)?b=">="+w+".0.0":ke(C)?b=">="+w+"."+T+".0":b=">="+b,ke(se)?ue="":ke(De)?ue="<"+(+se+1)+".0.0":ke(Ce)?ue="<"+se+"."+(+De+1)+".0":je?ue="<="+se+"."+De+"."+Ce+"-"+je:ue="<="+ue,(b+" "+ue).trim()}ve.prototype.test=function(l){if(!l)return!1;if(typeof l=="string")try{l=new F(l,this.options)}catch{return!1}for(var b=0;b<this.set.length;b++)if(Tt(this.set[b],l,this.options))return!0;return!1};function Tt(l,b,w){for(var T=0;T<l.length;T++)if(!l[T].test(b))return!1;if(b.prerelease.length&&!w.includePrerelease){for(T=0;T<l.length;T++)if(r(l[T].semver),l[T].semver!==Oe&&l[T].semver.prerelease.length>0){var C=l[T].semver;if(C.major===b.major&&C.minor===b.minor&&C.patch===b.patch)return!0}return!1}return!0}t.satisfies=st;function st(l,b,w){try{b=new ve(b,w)}catch{return!1}return b.test(l)}t.maxSatisfying=ft;function ft(l,b,w){var T=null,C=null;try{var A=new ve(b,w)}catch{return null}return l.forEach(function($){A.test($)&&(!T||C.compare($)===-1)&&(T=$,C=new F(T,w))}),T}t.minSatisfying=Ue;function Ue(l,b,w){var T=null,C=null;try{var A=new ve(b,w)}catch{return null}return l.forEach(function($){A.test($)&&(!T||C.compare($)===1)&&(T=$,C=new F(T,w))}),T}t.minVersion=yn;function yn(l,b){l=new ve(l,b);var w=new F("0.0.0");if(l.test(w)||(w=new F("0.0.0-0"),l.test(w)))return w;w=null;for(var T=0;T<l.set.length;++T){var C=l.set[T];C.forEach(function(A){var $=new F(A.semver.version);switch(A.operator){case">":$.prerelease.length===0?$.patch++:$.prerelease.push(0),$.raw=$.format();case"":case">=":(!w||Je(w,$))&&(w=$);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+A.operator)}})}return w&&l.test(w)?w:null}t.validRange=Jt;function Jt(l,b){try{return new ve(l,b).range||"*"}catch{return null}}t.ltr=Qt;function Qt(l,b,w){return P(l,b,"<",w)}t.gtr=bn;function bn(l,b,w){return P(l,b,">",w)}t.outside=P;function P(l,b,w,T){l=new F(l,T),b=new ve(b,T);var C,A,$,ue,se;switch(w){case">":C=Je,A=Vt,$=ze,ue=">",se=">=";break;case"<":C=ze,A=Ft,$=Je,ue="<",se="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(st(l,b,T))return!1;for(var De=0;De<b.set.length;++De){var Ce=b.set[De],je=null,Ie=null;if(Ce.forEach(function(Ge){Ge.semver===Oe&&(Ge=new _e(">=0.0.0")),je=je||Ge,Ie=Ie||Ge,C(Ge.semver,je.semver,T)?je=Ge:$(Ge.semver,Ie.semver,T)&&(Ie=Ge)}),je.operator===ue||je.operator===se||(!Ie.operator||Ie.operator===ue)&&A(l,Ie.semver))return!1;if(Ie.operator===se&&$(l,Ie.semver))return!1}return!0}t.prerelease=mt;function mt(l,b){var w=O(l,b);return w&&w.prerelease.length?w.prerelease:null}t.intersects=Zt;function Zt(l,b,w){return l=new ve(l,w),b=new ve(b,w),l.intersects(b)}t.coerce=Lt;function Lt(l,b){if(l instanceof F)return l;if(typeof l=="number"&&(l=String(l)),typeof l!="string")return null;b=b||{};var w=null;if(!b.rtl)w=l.match(x[a.COERCE]);else{for(var T;(T=x[a.COERCERTL].exec(l))&&(!w||w.index+w[0].length!==l.length);)(!w||T.index+T[0].length!==w.index+w[0].length)&&(w=T),x[a.COERCERTL].lastIndex=T.index+T[1].length+T[2].length;x[a.COERCERTL].lastIndex=-1}return w===null?null:O(w[2]+"."+(w[3]||"0")+"."+(w[4]||"0"),b)}})(zr,zr.exports);var Ju=zr.exports;const Is=Qo,It=Ju,Be="semver",Qu={base:Is.string(),type:"semverRange",validate:function(e,{error:t}){return It.validRange(e)?{value:e}:{errors:t(`${Be}.valid`)}},messages:{[`${Be}.valid`]:"{{#label}} needs to be a valid semver range"}},gn={};gn.compare={method:!1,validate:function(e,t,{exp:n},{name:r}){return It[r](e,n)?e:t.error(`${Be}.${r}`,{exp:n})},args:[{name:"exp",assert:It.valid,message:"needs to be a valid semver expression"}]};["gt","gte","lt","lte","eq","neq"].forEach(function(e){gn[e]={method:function(t){return this.$_addRule({name:e,method:"compare",args:{exp:t}})}}});gn.cmp={method:function(e,t){return this.$_addRule({name:"cmp",args:{cmp:e,exp:t}})},validate:function(e,t,{cmp:n,exp:r}){return It.cmp(e,n,r)?e:t.error(`${Be}.cmp`,{cmp:n,exp:r})},args:[{name:"cmp",assert:e=>["===","!==","","=","==","!=",">",">=","<","<="].includes(e),message:"needs to be a valid comparator"},{name:"exp",assert:It.valid,message:"needs to be a valid semver expression"}]};gn.compareRange={method:!1,validate:function(e,t,{rng:n},{name:r}){return It[r](e,n)?e:t.error(`${Be}.${r}`,{rng:n})},args:[{name:"rng",assert:It.validRange,message:"needs to be a valid semver range"}]};["satisfies","gtr","ltr"].forEach(function(e){gn[e]={method:function(t){return this.$_addRule({name:e,method:"compareRange",args:{rng:t}})}}});gn.outside={method:function(e,t){return this.$_addRule({name:"outside",args:{hilo:e,rng:t}})},validate:function(e,t,{hilo:n,rng:r}){return It.outside(e,r,n)?e:t.error(`${Be}.outside`,{hilo:n,rng:r})},args:[{name:"hilo",assert:e=>[">","<"].includes(e),message:"needs to be a valid comparator"},{name:"rng",assert:It.validRange,message:"needs to be a valid semver range"}]};const Zu={base:Is.string(),type:"semver",validate:function(e,{error:t}){return It.valid(e)?{value:e}:{errors:t(`${Be}.valid`)}},messages:{[`${Be}.valid`]:"{{#label}} needs to be a valid semver expression",[`${Be}.gt`]:"{{#label}} needs to be greater than {{#exp}}",[`${Be}.gte`]:"{{#label}} needs to be greater than or equal to {{#exp}}",[`${Be}.lt`]:"{{#label}} needs to be less than {{#exp}}",[`${Be}.lte`]:"{{#label}} needs to be less than or equal to {{#exp}}",[`${Be}.eq`]:"{{#label}} needs to be logically equivalent to {{#exp}}",[`${Be}.neq`]:"{{#label}} needs to be logically different than {{#exp}}",[`${Be}.cmp`]:"{{#label}} needs to satisfy {{#cmp}} on {{#exp}}",[`${Be}.satisfies`]:"{{#label}} needs to satisfy {{#rng}}",[`${Be}.gtr`]:"{{#label}} needs to be greater than range {{#rng}}",[`${Be}.ltr`]:"{{#label}} needs to be less than range {{#rng}}",[`${Be}.outside`]:"{{#label}} needs to be {{#hilo}} than range {{#rng}}"},rules:gn};var ed={semver:Zu,semverRange:Qu};/*!
|
|
200
|
+
* is-var-name | ISC (c) Shinnosuke Watanabe
|
|
201
|
+
* https://github.com/shinnn/is-var-name
|
|
202
|
+
*/function td(e){if(typeof e!="string"||e.trim()!==e)return!1;try{new Function(e,"var "+e)}catch{return!1}return!0}const nd=Object.freeze(Object.defineProperty({__proto__:null,default:td},Symbol.toStringTag,{value:"Module"})),rd=ti(nd),id=ti(Za),od=nl,sd=rl,xo=hr,ad=e=>{if((0,xo.isValid)(e))return e;const t=(0,sd.toHex)(Rl.from(typeof e=="string"?e.trim():e));return(0,xo.fromPublicKey)(t,{role:od.types.RoleType.ROLE_ANY})};var ld=ad,mn={},Ps=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mn,"__esModule",{value:!0});mn.didExtension=mn.fileExtension=void 0;const wo=Ps(ks),cd=Ps(Ql),ud=hr,Ls=e=>({type:"file",base:e.string(),validate(t,{error:n}){return t&&typeof t=="string"?{value:t}:{errors:n("file.empty",{file:t})}},messages:{"file.empty":'file "{{#file}}" must be non-empty string',"file.enoent":'file "{{#file}}" does not exist',"file.error.generic":'file could not be read. message: "{{#message}}"'},rules:{exists:{multi:!1,method({baseDir:t=null,canSkip:n=()=>!1}={}){return this.$_addRule({name:"exists",args:{baseDir:t,canSkip:n}})},args:[{name:"baseDir",assert:t=>wo.default.existsSync(t),message:"baseDir must exist"},{name:"canSkip",assert:t=>typeof t=="function",message:"canSkip must be a function"}],validate(t,{error:n},{baseDir:r,canSkip:o}={}){if(typeof o=="function"&&o(r,t))return t;try{return wo.default.statSync(cd.default.join(r,t)),t}catch(u){switch(u.code){case"ENOENT":return n("file.enoent",{file:t})}return n("file.error.generic",{message:u.message})}}}}});mn.fileExtension=Ls;const _s=e=>({type:"DID",base:e.string(),validate(t,{error:n}){return!t||typeof t!="string"?{errors:n("did.empty",{did:t})}:(0,ud.isValid)(t)===!1?{errors:n("did.invalid",{did:t})}:{value:t}},messages:{"did.empty":'did "{{#did}}" must be non-empty string',"did.invalid":'did "{{#did}}" is not valid'}});mn.didExtension=_s;mn.default={fileExtension:Ls,didExtension:_s};var gi={},Ns={exports:{}};const dd=["assert","buffer","child_process","cluster","console","constants","crypto","dgram","dns","domain","events","fs","http","https","module","net","os","path","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","tty","url","util","v8","vm","zlib"];var As=new RegExp("^(?:@([^/]+?)[/])?([^/]+?)$"),hd=dd,pd=["node_modules","favicon.ico"],fd=Ns.exports=function(e){var t=[],n=[];if(e===null)return n.push("name cannot be null"),Bn(t,n);if(e===void 0)return n.push("name cannot be undefined"),Bn(t,n);if(typeof e!="string")return n.push("name must be a string"),Bn(t,n);if(e.length||n.push("name length must be greater than zero"),e.match(/^\./)&&n.push("name cannot start with a period"),e.match(/^_/)&&n.push("name cannot start with an underscore"),e.trim()!==e&&n.push("name cannot contain leading or trailing spaces"),pd.forEach(function(d){e.toLowerCase()===d&&n.push(d+" is a blacklisted name")}),hd.forEach(function(d){e.toLowerCase()===d&&t.push(d+" is a core module name")}),e.length>214&&t.push("name can no longer contain more than 214 characters"),e.toLowerCase()!==e&&t.push("name can no longer contain capital letters"),/[~'!()*]/.test(e.split("/").slice(-1)[0])&&t.push(`name can no longer contain special characters ("~'!()*")`),encodeURIComponent(e)!==e){var r=e.match(As);if(r){var o=r[1],u=r[2];if(encodeURIComponent(o)===o&&encodeURIComponent(u)===u)return Bn(t,n)}n.push("name can only contain URL-friendly characters")}return Bn(t,n)};fd.scopedPackagePattern=As;var Bn=function(e,t){var n={validForNewPackages:t.length===0&&e.length===0,validForOldPackages:t.length===0,warnings:e,errors:t};return n.warnings.length||delete n.warnings,n.errors.length||delete n.errors,n},md=Ns.exports;(function(e){var t=Ee&&Ee.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(e,"__esModule",{value:!0}),e.validateName=e.validateNewDid=void 0;const n=hr,r=t(md),o=32,u=h=>{if((0,n.toTypeInfo)(h).role!==n.types.RoleType.ROLE_BLOCKLET)throw new Error("Blocklet DID's type must be ROLE_BLOCKLET")};e.validateNewDid=u;const d=(h,{checkDid:v=!0}={})=>{if((0,n.isValid)(h))v&&(0,e.validateNewDid)(h);else{const{validForNewPackages:x,errors:s=[],warnings:a=[]}=(0,r.default)(h);if(!x)throw new Error(s[0]||a[0]);if(h.length>o)throw new Error("Blocklet name is too long")}};e.validateName=d,e.default={validateName:e.validateName,validateNewDid:e.validateNewDid}})(gi);var gd=Ee&&Ee.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),vd=Ee&&Ee.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),yd=Ee&&Ee.__importStar||function(){var e=function(t){return e=Object.getOwnPropertyNames||function(n){var r=[];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[r.length]=o);return r},e(t)};return function(t){if(t&&t.__esModule)return t;var n={};if(t!=null)for(var r=e(t),o=0;o<r.length;o++)r[o]!=="default"&&gd(n,t,r[o]);return vd(n,t),n}}(),Cn=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(te,"__esModule",{value:!0});te.Joi=te.eventsSchema=te.installBlockletDescriptionSchema=te.installBlockletTitleSchema=te.resourceBundleSchema=te.authConfigSchema=te.cacheableSchema=te.statsSchema=te.titleSchema=te.themeSchema=te.signatureSchema=te.serviceSchema=te.scriptsSchema=te.personSchema=te.navigationSchema=te.navigationItemSchema=te.updateMountPointSchema=te.mountPointSchema=te.logoSchema=te.interfaceSchema=te.environmentNameSchema=te.environmentSchema=te.engineSchema=te.endpointSchema=te.distSchema=te.descriptionSchema=te.createBlockletSchema=te.componentSchema=te.blockletNameSchema=te.blockletMetaSchema=void 0;const bd=Cn(ks),xd=Cn(Qo),wd=Cn(Ku),Ed=Cn(Yu),Eo=ed,Sd=Cn(rd),So=ts,Td=hr,jd=id,Ae=wt,Od=Cn(ld),To=mn,qr=gi,vi=yd(gl),kd=wd.default.default,jo="/.well-known",c=xd.default.extend(Eo.semver).extend(Eo.semverRange).extend(To.fileExtension).extend(To.didExtension);te.Joi=c;const Oo=(e,t)=>(0,vi.checkLink)(e)?e:t.message(`Invalid navigation link: ${e}
|
|
203
|
+
|
|
204
|
+
A valid navigation link should be a relative url which start with '/' or a absolute url, such as:
|
|
205
|
+
- /en/home
|
|
206
|
+
- /zh/home
|
|
207
|
+
- https://www.arcblock.io
|
|
208
|
+
`),Rd=(e,t)=>!e||(0,Sd.default)(e)?e:t.message(`Invalid navigation id: ${e}
|
|
209
|
+
|
|
210
|
+
A valid navigation id is should follow the rules of javascript variables, such as:
|
|
211
|
+
- foo
|
|
212
|
+
- fooBar
|
|
213
|
+
- foo123
|
|
214
|
+
|
|
215
|
+
see detail in https://www.npmjs.com/package/is-var-name
|
|
216
|
+
`),yr=c.string().trim().min(1).custom(e=>{if(kd(e)>Ae.MAX_TITLE_LENGTH)throw new Error(`title length should not exceed ${Ae.MAX_TITLE_LENGTH} (see: https://www.npmjs.com/package/cjk-length)`);return e}).meta({className:"TTitle"});te.titleSchema=yr;const br=c.string().trim().min(3).max(160).meta({className:"TDescription"});te.descriptionSchema=br;const Ds=c.string().trim().min(3).max(20).messages({"*":"Title length must be between 3 and 20 characters"}).meta({className:"TInstallBlockletTitle"});te.installBlockletTitleSchema=Ds;const Ms=c.string().trim().min(3).max(80).messages({"*":"Description length must be between 3 and 80 characters"}).meta({className:"TInstallBlockletDescription"});te.installBlockletDescriptionSchema=Ms;const Fs=c.string().uri({scheme:["http","https"],allowRelative:!0}).allow("").custom((e,t)=>e.includes(So.WELLKNOWN_BLOCKLET_LOGO_PATH)?t.message(`logo url should not include ${So.WELLKNOWN_BLOCKLET_LOGO_PATH}`):e).meta({className:"TLogo"});te.logoSchema=Fs;const Bs=c.string().trim().min(1),yi=Bs.meta({className:"TMountPoint"}).custom((e,t)=>(0,vi.isValidUrlPath)(e)?e:t.message(`mountPoint cannot contain such characters space $*+~()'"!:@\\`));te.mountPointSchema=yi;const $s=Bs.meta({className:"TUpdateMountPoint"}).custom(e=>(0,vi.default)(e));te.updateMountPointSchema=$s;const kn=c.string().custom(e=>((0,qr.validateName)(e),e)).meta({className:"TBlockletName"});te.blockletNameSchema=kn;const Cd=[],bi=c.string().trim().min(1).max(50).required().custom((e,t)=>e.startsWith("BLOCKLET")&&!Cd.includes(e)?t.message("Env name can not start with BLOCKLET_"):e.startsWith("COMPONENT")?t.message("Env name can not start with COMPONENT_"):e.startsWith("ABTNODE")?t.message("Env name can not start with ABTNODE_"):/[^\w]/.test(e)?t.message('Env name can include only numbers or letters or "_"'):e).meta({className:"TEnvironmentName",unknownType:"any"});te.environmentNameSchema=bi;const xi=c.object({name:bi.required(),description:c.string().trim().required(),default:c.string().optional().allow("").default(""),required:c.boolean().default(!1),secure:c.boolean().default(!1),validation:c.string().optional(),shared:c.boolean().default(e=>e.secure?!1:void 0)}).custom((e,t)=>e.secure&&e.default?t.message(`Cannot declare default value for secure env ${e.name}`):e).meta({className:"TEnvironment",unknownType:"any"});te.environmentSchema=xi;const wi=c.object({dev:c.string().trim().min(1),e2eDev:c.string().trim().min(1),preFlight:c.string().trim().min(1),preInstall:c.string().trim().min(1),postInstall:c.string().trim().min(1),preStart:c.string().trim().min(1),postStart:c.string().trim().min(1),preStop:c.string().trim().min(1),preUninstall:c.string().trim().min(1),preConfig:c.string().trim().min(1)}).rename("pre-flight","preFlight").rename("pre-install","preInstall").rename("post-install","postInstall").rename("pre-start","preStart").rename("post-start","postStart").rename("pre-stop","preStop").rename("pre-uninstall","preUninstall").rename("pre-config","preConfig").optional().meta({className:"TScripts",unknownType:"any"});te.scriptsSchema=wi;const Ei=c.object({name:c.string().required().trim(),config:c.object().optional().default({})}).unknown(!0).meta({className:"TService",unknownType:"any"});te.serviceSchema=Ei;const Si=c.object({type:c.string().trim(!0).min(1).required(),path:c.string().required(),meta:c.object({vcType:c.string(),payable:c.boolean(),params:c.array().items({name:c.string().required().trim(),description:c.string().required().trim()})})}).meta({className:"TEndpoint",unknownType:"any"});te.endpointSchema=Si;const Us=c.string().trim().custom((e,t)=>{const n=e.split("/").filter(Boolean);return n.length===0?t.message("cacheable path must be a valid pathname that is not /"):`/${n.join("/")}`}).meta({className:"TPathPrefix",unknownType:"any"});te.cacheableSchema=Us;const Ti=c.object({type:c.string().lowercase().valid(...Ae.BLOCKLET_INTERFACE_TYPES).required(),name:c.string().trim().required(),path:c.string().trim().default("/"),prefix:c.string().trim().min(1).default(Ae.BLOCKLET_DYNAMIC_PATH_PREFIX),containerPort:c.number().port().optional(),hostIP:c.string().trim().ip({version:["ipv4","ipv6"]}).optional(),protocol:c.string().lowercase().valid(...Ae.BLOCKLET_INTERFACE_PROTOCOLS).default("http"),port:c.alternatives().try(c.string().uppercase().default(Ae.BLOCKLET_DEFAULT_PORT_NAME),c.object({internal:c.string().uppercase().required(),external:c.number().port().required()})).default(Ae.BLOCKLET_DEFAULT_PORT_NAME),cacheable:c.array().items(Us).unique(),services:c.array().items(Ei).unique("name"),endpoints:c.array().items(Si).unique("type"),pageGroups:c.array().items(c.string().min(1).max(255).trim()).unique()}).meta({className:"TInterface",unknownType:"any"});te.interfaceSchema=Ti;const Id=c.alternatives().try(c.string().required(),c.object({url:c.string().uri({scheme:["http","https","file"]}).required(),name:kn.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid())}),c.object({store:c.string().uri({scheme:["http","https"]}).required(),name:kn.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid()).default("latest")})),Kr=c.object({platform:c.string().valid(...Ae.BLOCKLET_PLATFORMS).optional(),interpreter:c.string().valid("binary","node","blocklet").default("node"),source:Id,args:c.array().items(c.string()).optional().default([])}).meta({className:"TEngine",unknownType:"any"});te.engineSchema=Kr;const zn=c.object({name:c.string().min(1).required(),email:c.string().email({tlds:!1}).optional(),url:c.string().uri().optional()}).meta({className:"TPerson",unknownType:"any"});te.personSchema=zn;const Kn=c.object({tarball:c.alternatives().try(c.string().uri(),c.string()).required(),integrity:c.string().required(),size:c.number().optional()}).meta({className:"TDist",unknownType:"any"});te.distSchema=Kn;const Ws=c.object({downloads:c.number().integer().greater(-1),star:c.number().default(0),purchases:c.number().default(0)}).meta({className:"TStats",unknownType:"any"});te.statsSchema=Ws;const Pd=c.alternatives().try(c.object({url:c.alternatives().try(c.string().uri(),c.array().items(c.string().uri()).min(1)).required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid())}),c.object({store:c.string().uri({scheme:["http","https"]}),name:kn.required(),version:c.alternatives().try(c.string().valid("latest"),c.semverRange().valid()).default("latest")})),zs={source:Pd.required(),required:c.boolean(),title:yr,description:br,mountPoint:yi,name:kn},qs=(e,t)=>c.object(e).custom((n,r)=>!t&&n.source&&n.source.name&&!n.source.store?r.message(`missing 'store' in source of component ${n.name}`):n),ji=qs(zs).meta({className:"TComponent",unknownType:"any"});te.componentSchema=ji;const Ld=qs(zs,!0),Ks=({checkStore:e}={})=>{const t=[ji,Ld];return c.array().items(e?t[0]:t[1]).optional().default([])},Vs=c.object({type:c.string().required(),name:c.string().required(),signer:c.string().required(),pk:c.string().required(),created:c.string().isoDate().required(),sig:c.string().required(),excludes:c.array().items(c.string()).optional(),appended:c.array().items(c.string()).optional(),delegatee:c.string(),delegateePk:c.string(),delegation:c.string()}).meta({className:"TSignature",unknownType:"any"});te.signatureSchema=Vs;const ko=["en","zh","fr","ru","ar","es","de","pt","ja","hi"],Ro={id:c.string().custom(Rd),title:c.alternatives().try(c.string().min(1).max(Ae.MAX_TITLE_LENGTH),c.object().min(1).pattern(c.string().valid(...ko),c.string().min(1).max(Ae.MAX_TITLE_LENGTH))).required(),link:c.alternatives().try(c.string().custom(Oo),c.object().min(1).pattern(c.string().valid(...ko),c.string().custom(Oo))),component:c.string().min(1),section:c.array().items(c.string().min(1)).single(),role:c.array().items(c.string().min(1)).single(),icon:c.string().min(1),visible:c.boolean()},Gs=c.object({...Ro,items:c.array().items(c.object({...Ro}).rename("child","component"))}).rename("child","component").meta({className:"TNavigationItem",unknownType:"any"});te.navigationItemSchema=Gs;const Oi=c.array().items(Gs).unique((e,t)=>e.id&&t.id?e.id===t.id:!1).meta({className:"TNavigation",unknownType:"any"});te.navigationSchema=Oi;const ki=c.object({background:c.alternatives().try(c.string().min(1),c.object({header:c.string().min(1),footer:c.string().min(1),default:c.string().min(1)}).min(1))}).meta({className:"TTheme",unknownType:"any"});te.themeSchema=ki;const Hs=c.object({whoCanAccess:c.string().valid("owner","invited","all"),profileFields:c.array().items(c.string().valid("fullName","email","avatar","phone")).unique(),ignoreUrls:c.array().items(c.string().min(1)),allowSwitchProfile:c.boolean(),blockUnauthenticated:c.boolean(),blockUnauthorized:c.boolean()}).options({stripUnknown:!0}).meta({className:"TAuthConfig",unknownType:"any"});te.authConfigSchema=Hs;const _d=c.object({type:c.string().trim().min(1).required(),description:c.string().trim().min(1)}),Ri=c.object({did:c.DID().trim().required(),type:c.string().trim().min(1).required(),public:c.boolean()}).meta({className:"TResourceBundle",unknownType:"any"});te.resourceBundleSchema=Ri;const Ci=c.array().items(c.object({type:c.string().trim().min(1).max(128).pattern(/^(?!blocklet\.)[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/).message('Event type must be in format of "[noun.]verb" like "post.published" or "post.comment.published", and prefix "blocklet." is reserved').required(),description:c.string().trim().min(1).max(256).required()})).unique("type").meta({className:"TEvent",unknownType:"any"});te.eventsSchema=Ci;const Xs={did:c.DID().trim().required(),version:c.semver().valid().required(),name:c.string().optional(),description:br.required(),group:c.string().valid(...Ae.BLOCKLET_GROUPS),main:c.string().trim(),title:yr.optional().allow(""),logo:c.string().trim().optional(),specVersion:c.semver().valid().gte("1.0.0").optional(),author:zn.optional(),contributors:c.array().items(zn).optional(),maintainers:c.array().items(zn).optional(),community:c.string().uri().optional().allow("").default(""),documentation:c.string().uri().optional().allow("").default(""),homepage:c.string().uri().optional().allow("").default(""),license:c.string().optional().allow("").default(""),support:c.alternatives().try(c.string().uri(),c.string().email({tlds:!1})).optional(),nftFactory:c.DID().optional().allow("").default(""),payment:c.object({price:c.array().max(1).items(c.object({value:c.number().greater(0).required(),address:c.DID().required()})).default([]),share:c.array().max(4).items(c.object({name:c.string().required(),address:c.DID().required(),value:c.number().greater(0).max(1).required()})).default([]).custom(e=>{if(e.length===0)return e;const t=e.reduce((n,r)=>n+r.value,0);if(t!==1)throw new Error(`Invalid blocklet payment share config: total share must be 1, got ${t}`);return e},"invalid blocklet share"),componentPrice:c.array().items(c.object({parentPriceRange:c.array().items(c.number()).custom((e,t)=>e.length!==2?t.message("length of range should be 2"):e[0]<0?t.message("the first value should not less than 0 in range"):e[1]<=e[0]?t.message("the second value should greater than the first value in range"):e),type:c.string().valid("fixed","percentage").required(),value:c.number().greater(0).required()})).single()}).default({price:[],share:[]}),keywords:c.alternatives().try(c.string().trim().min(1),c.array().items(c.string().min(1))).optional(),tags:c.alternatives().try(c.string().trim().min(1),c.array().items(c.string().min(1))).optional(),gitHash:c.string().optional().allow(""),repository:c.alternatives().try(c.string().min(1),c.object({type:c.string().valid("git","https","svn").required(),url:c.string().uri().required(),directory:c.string()})).optional(),timeout:c.object({start:c.number().min(10).max(600),script:c.number().min(1).max(1800)}).default({start:60}),requirements:c.object({abtnode:c.semverRange().valid(),server:c.semverRange().valid(),os:c.alternatives().try(c.string().valid("*",...Ae.BLOCKLET_PLATFORMS),c.array().items(c.string().valid(...Ae.BLOCKLET_PLATFORMS)).min(1)),cpu:c.alternatives().try(c.string().valid("*",...Ae.BLOCKLET_ARCHITECTURES),c.array().items(c.string().valid(...Ae.BLOCKLET_ARCHITECTURES)).min(1)),fuels:c.array().items(c.object({endpoint:c.string().trim().required(),address:c.string().trim(),value:c.string().trim().required(),reason:c.string().trim().required()})),nodejs:c.semverRange().valid()}).default({server:Ae.BLOCKLET_LATEST_REQUIREMENT_SERVER,os:"*",cpu:"*",nodejs:"*"}),interfaces:c.array().items(Ti).unique("name").custom((e,t)=>{if(e.filter(o=>o.type===Ae.BLOCKLET_INTERFACE_TYPE_WEB).length>1)return t.message(`Only one ${Ae.BLOCKLET_INTERFACE_TYPE_WEB} interface can be declared`);const r=e.filter(o=>o.type===Ae.BLOCKLET_INTERFACE_TYPE_WELLKNOWN);for(const o of r)if(!o.prefix.startsWith(jo))return t.message(`Wellknown path prefix must start with: ${jo}`);return e}).default([]),environments:c.array().items(xi).default([]).optional().custom((e,t)=>{if(e&&e.length){const n=e.filter((r,o)=>e.findIndex(u=>u.name===r.name)!==o);if(n.length)return t.message(`find duplicate environment names ${n.map(r=>r.name).join(", ")}`)}return e}),scripts:wi,capabilities:c.object({clusterMode:c.boolean(),didSpace:c.string().valid(...Object.values(Ae.BLOCKLET_APP_SPACE_REQUIREMENT)).optional(),navigation:c.boolean().default(!0),serverless:c.boolean().optional(),component:c.boolean(),sitemap:c.boolean().optional()}).default({}),files:c.array().items(c.string().trim()).optional(),resource:c.object({exportApi:c.string().trim(),bundles:c.array().items(Ri),types:c.array().items(_d).max(10)}),engine:c.alternatives().try(Kr,c.array().items(Kr)).optional(),screenshots:c.array().items(c.string().min(1)).optional().default([]),videos:c.array().items(c.string().pattern(/^https:\/\/(www\.)?(youtube\.com|youtu\.be|vimeo\.com)\/[\w\-/?&=]+/).message("Each video URL must be a valid YouTube or Vimeo link")).max(3).optional(),logoUrl:c.string().optional().allow(""),dist:Kn.optional(),stats:Ws.optional(),htmlAst:c.any().optional(),path:c.string().optional(),signatures:c.array().items(Vs).optional(),lastPublishedAt:c.string().isoDate().optional().allow(null),components:Ks(),navigation:Oi,theme:ki,copyright:c.object({owner:c.string().min(1),year:c.alternatives().try(c.string(),c.number())}),bundleName:c.string(),bundleDid:c.DID().trim(),storeId:c.string(),events:Ci.optional()},Nd=c.object(Xs).options({stripUnknown:!0,noDefaults:!1}).meta({className:"TBlockletMeta",unknownType:"any"});te.blockletMetaSchema=Nd;const Ys=(e,{ensureFiles:t=!1,ensureDist:n=!1,ensureComponentStore:r=!0,ensureName:o=!1,skipValidateDidName:u=!1,...d}={})=>((!e||!bd.default.existsSync(e))&&(t=!1),c.object({...Xs,owner:c.object({avatar:c.string().optional(),did:c.DID().trim().required(),fullName:c.string().trim().required(),email:c.string().optional().allow(null).empty("").default("")}).optional(),logo:t?c.file().trim().exists({baseDir:e}).optional():c.string().trim().optional(),files:c.array().items(t?c.file().exists({baseDir:e,canSkip:(h,v)=>[Ae.BLOCKLET_ENTRY_FILE,Ae.BLOCKLET_BUNDLE_FILE].includes(v)||(0,Ed.default)(v)}):c.string().trim()).optional(),dist:n?Kn.required():Kn.optional(),components:Ks({checkStore:r}),name:o?c.string().optional():c.string().required(),egress:c.boolean().optional().default(!0),docker:jd.dockerSchema}).options({stripUnknown:!0,noDefaults:!1,...d}).rename("children","components").custom((h,v)=>{const{did:x,name:s,docker:a}=h;if(a){const{image:y,dockerfile:S,network:R}=a;if(!y&&!S)return v.message("Image or dockerfile must be set");if(y&&S)return v.message("Image and dockerfile cannot be set at the same time");if(R)return v.message("ExportPorts and network cannot be set at the same time");if(S&&(h.files||(h.files=[]),h.files.push(S)),a.volumes)for(const _ of a.volumes){if(!_.startsWith("$BLOCKLET_APP_DIR/")&&!_.startsWith("$BLOCKLET_DATA_DIR/"))return v.message("Volume must start with $BLOCKLET_APP_DIR or $BLOCKLET_DATA_DIR");if(_.indexOf("..")>-1)return v.message('Volume cannot contain ".."')}}let k;if((0,Td.isValid)(x))try{return(0,qr.validateNewDid)(x),h}catch(y){k=y}if(s){(0,qr.validateName)(s,{checkDid:!u});const y=(0,Od.default)(s);return y!==x?v.message(`The did of name "${s}" should be "${y}"`):h}return k?v.message(k.message):h}));te.createBlockletSchema=Ys;te.default={blockletNameSchema:kn,componentSchema:ji,endpointSchema:Si,serviceSchema:Ei,createBlockletSchema:Ys,interfaceSchema:Ti,environmentSchema:xi,environmentNameSchema:bi,scriptsSchema:wi,personSchema:zn,distSchema:Kn,titleSchema:yr,descriptionSchema:br,logoSchema:Fs,navigationSchema:Oi,themeSchema:ki,mountPointSchema:yi,updateMountPointSchema:$s,authConfigSchema:Hs,resourceBundleSchema:Ri,installBlockletTitleSchema:Ds,installBlockletDescriptionSchema:Ms,eventsSchema:Ci,Joi:c};var Et={},Ad=Ee&&Ee.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Et,"__esModule",{value:!0});Et.setService=Et.findService=Et.getDefaultServiceConfig=Et.getServiceConfig=void 0;const Dd=Ad(Zl),Md=te,Js={},Ii=e=>{Js[e.name]={validate:e.schema.validate.bind(e.schema),defaultConfig:e.default}};Et.setService=Ii;Ii({name:"auth",schema:Md.authConfigSchema,default:{}});const Qs=e=>{if(!e)throw new Error("service name should not be empty");const t=Js[e];if(!t)throw new Error(`service ${e} does not exist`);return t},Zs=(e,t,{validate:n}={})=>{const r=Qs(e),o=(0,Dd.default)(t||{}),{value:u,error:d}=r.validate(o);if(n&&d)throw new Error(`Invalid blocklet service config: ${d.details.map(h=>h.message).join(", ")}`);return u};Et.getServiceConfig=Zs;const ea=e=>{const{defaultConfig:t}=Qs(e);return t};Et.getDefaultServiceConfig=ea;const ta=(e,t)=>{const n=[t];return(e||[]).find(r=>n.includes(r.name))};Et.findService=ta;Et.default={getServiceConfig:Zs,getDefaultServiceConfig:ea,findService:ta,setService:Ii};Object.defineProperty(fn,"__esModule",{value:!0});fn.fixAndValidateService=fn.validateMeta=void 0;const Fd=te,Bd=Et,$d=e=>(!e.interfaces||!e.interfaces.length||e.interfaces.forEach(t=>{t.services&&t.services.length&&t.services.forEach(n=>{n.config=(0,Bd.getServiceConfig)(n.name,n.config,{validate:!0})})}),e);fn.fixAndValidateService=$d;const na=(e,{ensureFiles:t=!1,ensureDist:n=!1,ensureComponentStore:r=!0,ensureName:o=!1,skipValidateDidName:u=!1,schemaOptions:d={}}={})=>{const h=(0,Fd.createBlockletSchema)(null,{ensureFiles:t,ensureDist:n,ensureComponentStore:r,ensureName:o,skipValidateDidName:u,...d}),{value:v,error:x}=h.validate(e);if(x)throw new Error(`Invalid blocklet meta: ${x.details.map(s=>s.message).join(", ")}`);return v};fn.validateMeta=na;fn.default=na;(function(e){var t=Ee&&Ee.__createBinding||(Object.create?function(O,q,Z,F){F===void 0&&(F=Z);var ce=Object.getOwnPropertyDescriptor(q,Z);(!ce||("get"in ce?!q.__esModule:ce.writable||ce.configurable))&&(ce={enumerable:!0,get:function(){return q[Z]}}),Object.defineProperty(O,F,ce)}:function(O,q,Z,F){F===void 0&&(F=Z),O[F]=q[Z]}),n=Ee&&Ee.__setModuleDefault||(Object.create?function(O,q){Object.defineProperty(O,"default",{enumerable:!0,value:q})}:function(O,q){O.default=q}),r=Ee&&Ee.__importStar||function(){var O=function(q){return O=Object.getOwnPropertyNames||function(Z){var F=[];for(var ce in Z)Object.prototype.hasOwnProperty.call(Z,ce)&&(F[F.length]=ce);return F},O(q)};return function(q){if(q&&q.__esModule)return q;var Z={};if(q!=null)for(var F=O(q),ce=0;ce<F.length;ce++)F[ce]!=="default"&&t(Z,q,F[ce]);return n(Z,q),Z}}(),o=Ee&&Ee.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(e,"__esModule",{value:!0}),e.fixService=e.fixInterfaces=e.parsePerson=e.formatPerson=e.fixName=e.fixTags=e.fixPerson=e.fixKeywords=e.fixFiles=e.fixRepository=e.fixRequired=void 0;const u=o(vl),d=r(Du),h=wt,v=fn;Object.defineProperty(e,"fixService",{enumerable:!0,get:function(){return v.fixAndValidateService}});const x=gi,s=(O,q)=>{O.description||(O.description=`Blocklet from ${q}`),O.version||(O.version=h.BLOCKLET_DEFAULT_VERSION)};e.fixRequired=s;const a=O=>{if(O.repository&&(typeof O.repository=="string"&&(O.repository={type:"git",url:O.repository}),O.repository.url)){const q=d.fromUrl(O.repository.url);q&&(O.repository.url=q.getDefaultRepresentation()==="shortcut"?q.https():q.toString())}};e.fixRepository=a;const k=O=>{Array.isArray(O.files)?O.files&&(O.files=O.files.filter(q=>!(!q||typeof q!="string"))):delete O.files};e.fixFiles=k;const y=O=>{typeof O.keywords=="string"&&(O.keywords=O.keywords.split(/,\s+/)),O.keywords&&!Array.isArray(O.keywords)?delete O.keywords:O.keywords&&(O.keywords=O.keywords.filter(q=>!(typeof q!="string"||!q)))};e.fixKeywords=y;const S=O=>{typeof O.tags=="string"&&(O.tags=O.tags.split(/,\s+/)),O.tags&&!Array.isArray(O.tags)?delete O.tags:O.tags&&(O.tags=O.tags.filter(q=>!(typeof q!="string"||!q)))};e.fixTags=S;const R=(O,q)=>(O.author&&(O.author=q(O.author)),["maintainers","contributors"].forEach(Z=>{Array.isArray(O[Z])&&(O[Z]=O[Z].map(q))}),O),_=O=>{if(!O)return"";if(typeof O=="string")return O;const q=O.name||"",Z=O.url||O.web,F=Z?` (${Z})`:"",ce=O.email||O.mail,Y=ce?` <${ce}>`:"";return q+Y+F};e.formatPerson=_;const D=O=>{if(typeof O!="string")return O;const q=O.match(/^([^(<]+)/),Z=O.match(/\(([^)]+)\)/),F=O.match(/<([^>]+)>/),ce={};return q&&q[0].trim()&&(ce.name=q[0].trim()),F&&([,ce.email]=F),Z&&([,ce.url]=Z),ce};e.parsePerson=D;const H=O=>(R(O,_),R(O,D),O);e.fixPerson=H;const z=(O,q=!0)=>{if(Array.isArray(O.interfaces)||(O.interfaces=[]),O.interfaces.length)return O.interfaces.forEach(Y=>{Y.type===h.BLOCKLET_INTERFACE_TYPE_WEB&&(Y.protocol="http")}),O;const F=(0,u.default)(O,"capabilities.dynamicPathPrefix",!0)?h.BLOCKLET_DYNAMIC_PATH_PREFIX:"/",ce=({type:Y="web",name:oe,path:Se="/",protocol:Fe="http",port:$e=h.BLOCKLET_DEFAULT_PORT_NAME})=>{O.interfaces.push({type:Y,name:oe,path:Se,prefix:F,port:$e,protocol:Fe})};return[h.BLOCKLET_INTERFACE_PUBLIC].forEach(Y=>{O[Y]&&ce({name:Y,path:O[Y]})}),Array.isArray(O.exposeServices)&&O.exposeServices.forEach(Y=>{ce({type:"service",name:Y.protocol,protocol:Y.protocol,port:{internal:`BLOCKLET_${Y.protocol}_PORT`.toUpperCase(),external:Y.port}})}),q&&(delete O.publicUrl,delete O.adminUrl,delete O.configUrl,delete O.docUrl,delete O.exposeServices,O.capabilities&&delete O.capabilities.dynamicPathPrefix),O};e.fixInterfaces=z;const X=O=>{const{did:q}=O;try{(0,x.validateNewDid)(q),O.name=q}catch{}return O};e.fixName=X,e.default={fixRequired:s,fixRepository:a,fixFiles:k,fixKeywords:y,fixPerson:H,fixTags:S,fixName:X,formatPerson:_,parsePerson:D,fixInterfaces:z,fixService:v.fixAndValidateService}})(Es);function ra({owner:e,locale:t}){return i.jsxs(Q,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.fullName,e.did?i.jsx(es,{sx:{lineHeight:"initial","&::before":{content:'"("'},"&::after":{content:'")"'}},did:e.did,compact:!0,size:14,locale:t}):null]})}ra.propTypes={owner:L.object.isRequired,locale:L.string.isRequired};const Ud="install-blocklet-from-URL",ia=()=>{const[e,t]=ds(Ud,"[]",{raw:!0}),n=o=>{const u=o.trim(),d=JSON.parse(e),h=d.findIndex(v=>v===u);h!==0&&(h>0&&d.splice(h,1),d.length>=10&&d.splice(9),d.unshift(u),t(JSON.stringify(d)))},r=o=>{if(!o)return;const u=JSON.parse(e),d=o.trim(),h=u.findIndex(v=>v===d);h>-1&&(u.splice(h,1),t(JSON.stringify(u)))};return{urls:e?JSON.parse(e):[],addUrlRecord:n,removeUrlRecord:r}},Wd=Wo(()=>({listItemText:{"& span":{display:"block",width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}}));function Pi(e){const{value:t,onValueChange:n,children:r,helperText:o}=e,{urls:u,removeUrlRecord:d}=ia(),h=(x,s)=>{x.preventDefault(),x.stopPropagation(),d(s)},v=Wd();return i.jsxs(Q,{children:[i.jsx(zo,{freeSolo:!0,options:u,inputValue:t,onInputChange:(x,s)=>{n(s)},disableClearable:!0,popupIcon:null,renderInput:x=>Ja.cloneElement(r,{...x}),renderOption:(x,s)=>N.createElement(qo,{...x,key:s,secondaryAction:i.jsx(Uo,{edge:"end","aria-label":"delete",onClick:a=>h(a,s),children:i.jsx(il,{})})},i.jsx(Ia,{role:void 0,dense:!0,sx:{paddingLeft:0,paddingRight:30,"&:hover":{backgroundColor:"transparent"}},children:i.jsx(Ko,{primary:s,className:v.listItemText})})),ListboxProps:{sx:{maxHeight:300,overflow:"auto"}}}),i.jsx(Pa,{style:{margin:0},children:o})]})}Pi.propTypes={onValueChange:L.func,children:L.node,value:L.string,helperText:L.string};Pi.defaultProps={onValueChange:()=>{},children:null,value:"",helperText:""};function Li({defaultUrl:e,onCancel:t,onSuccess:n,onError:r,mode:o,handleText:u}){const{api:d}=Rn(),{api:h}=ec(),[v,x]=N.useState(!1),[s,a]=N.useState(""),{t:k,locale:y}=yt(),S={dist:{}},[R,_]=N.useState(e),[D,H]=N.useState(e?1:0),[z,X]=N.useState(S),[O,q]=N.useState(!1),[Z,F]=N.useState({}),ce=o==="component",Y=ce?!0:!e,{addUrlRecord:oe}=ia(),Se=async()=>{X(S),a(null),x(!0);let ie=R.trim();!ie.startsWith("https://")&&!ie.startsWith("http://")&&!ie.startsWith("file://")&&(ie=`file://${ie}`);try{const pt=decodeURIComponent(ie);try{new URL(pt)}catch{throw new Error("Invalid URL")}const{meta:xe,inStore:Je,registryUrl:ze}=await d.getBlockletMetaFromUrl({input:{url:pt}});X(xe),F({inStore:Je,registryUrl:ze,inputUrl:ie}),oe(ie)}catch(pt){console.error(pt);const xe=`Blocklet Install failed: ${hs(pt)}`;a(xe),r(pt)}finally{x(!1)}},Fe=()=>{if(ce){n({meta:z,...Z}),t();return}x(!0),q(!0)},$e=()=>{x(!1),q(!1),n({meta:z,...Z}),t()},it=()=>{x(!1),q(!1)};N.useEffect(()=>{e&&Se()},[e]);const ee=[{name:k("common.name"),value:Mt.getDisplayName({meta:z},!0)},{name:k("common.version"),value:z.version},{name:k("common.did"),value:z.did?i.jsx(tc,{did:z.did}):null},{name:k("common.author"),value:z.owner?i.jsx(ra,{owner:z.owner,locale:y}):Es.formatPerson(z.author)},{name:k("blocklet.dist.downloadLink"),value:z.dist.tarball}],pe=()=>v?i.jsx("div",{style:{height:200,width:"100%",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"},children:i.jsx(vt,{})}):z.did?i.jsx("div",{style:{paddingLeft:"10%"},children:ee.map(ie=>ie.name===k("common.did")?i.jsx(oo,{valueComponent:"div",nameWidth:120,name:ie.name,nameFormatter:()=>k("common.did"),children:ie.value},ie.name):i.jsx(oo,{valueComponent:"div",nameWidth:120,name:ie.name,children:ie.value},ie.name))}):null,K=[{label:k("blocklet.fromUrl.step0"),body:i.jsx(me,{component:"div",children:i.jsx(Pi,{style:{marginBottom:32},value:R,helperText:k("blocklet.fromUrl.description"),onValueChange:ie=>{a(null),_(ie)},children:i.jsx(dr,{label:k("blocklet.fromUrl.label"),autoComplete:"off",variant:"outlined",name:"url","data-cy":"blocklet-url-input",fullWidth:!0,autoFocus:!0,margin:"dense",value:R,onChange:ie=>{a(null),_(ie.target.value)},disabled:v,onKeyPress:ie=>{ie.key==="Enter"&&(ie.preventDefault(),Se(),H(1))}})})}),cancel:k("common.cancel"),confirm:k("common.next"),onCancel:t,onConfirm:()=>{Se(),H(1)}},{label:k("blocklet.fromUrl.step1"),body:pe(),cancel:k(Y?"common.pre":"common.cancel"),confirm:(u==null?void 0:u.confirm)||k("blocklet.fromUrl.confirm"),onCancel:()=>{Y?H(ie=>ie-1):t()},onConfirm:()=>{Fe()}}],Te=K[D];return i.jsxs(i.Fragment,{children:[i.jsxs(ri,{title:(u==null?void 0:u.title)||k("blocklet.fromUrl.title"),fullWidth:!0,maxWidth:"md",onClose:()=>Te.onCancel(),showCloseButton:D===0,disableEscapeKeyDown:!0,open:!0,actions:i.jsxs(i.Fragment,{children:[Te.cancel&&i.jsx(dt,{onClick:ie=>{ie.stopPropagation(),a(null),Te.onCancel()},color:"inherit",children:Te.cancel||k("common.cancel")}),i.jsxs(dt,{onClick:ie=>{ie.stopPropagation(),Te.onConfirm()},color:"primary","data-cy":"install-blocklet-next-step",disabled:v||!R||s,variant:"contained",autoFocus:!0,style:{marginLeft:8},children:[v&&D===0&&i.jsx(vt,{size:16}),Te.confirm]})]}),children:[Y&&i.jsx(La,{alternativeLabel:!0,activeStep:D,children:K.map(({label:ie})=>i.jsx(_a,{children:i.jsx(Na,{children:ie})},ie))}),i.jsx(Aa,{component:"div",style:{marginTop:24},children:Te.body}),!!s&&i.jsx(Vo,{severity:"error",style:{width:"100%",marginTop:8},children:s})]}),z&&O&&i.jsx(ns,{popup:!0,open:!0,forceConnected:!1,className:"launch-from-url-auth",action:"launch-free-blocklet-by-session",checkFn:h.get,checkTimeout:5*60*1e3,onSuccess:$e,extraParams:{title:z.title,wt:yl(z),blockletMetaUrl:decodeURIComponent(R.trim())},messages:{title:k("setup.keyPair.title"),scan:k("setup.keyPair.scan"),confirm:k("setup.keyPair.confirm"),success:k("setup.keyPair.success")},onClose:it})]})}Li.propTypes={defaultUrl:L.string,onCancel:L.func.isRequired,onSuccess:L.func.isRequired,onError:L.func,mode:L.oneOf(["install","component"]),handleText:L.object};Li.defaultProps={onError:()=>{},defaultUrl:"",mode:"install",handleText:{}};const zd={meta:L.object.isRequired,onCancel:L.func.isRequired},qd=Wo(()=>({dialogAuth:{padding:"0 0 24px !important","& .auth-title":{textAlign:"center !important",marginBottom:"4px !important"},"& .auth-tip--scan":{textAlign:"center !important"}},iconRoot:{minWidth:48}}));function oa({action:e,onSelect:t,onNext:n}){const r=qd(),{t:o}=yt(),u=[{action:"purchase",title:o("store.purchase.purchase.title"),description:o("store.purchase.purchase.description")},{action:"verify",title:o("store.purchase.verify.title"),description:o("store.purchase.verify.description")}];return i.jsxs(i.Fragment,{children:[i.jsx(Da,{className:r.tabPanel,children:u.map(d=>i.jsxs(qo,{button:!0,selected:e===d.action,onClick:()=>t(d.action),children:[i.jsx(Ma,{className:r.iconRoot,children:d.action==="purchase"?i.jsx(nc,{style:{color:e==="purchase"?eo.primary.main:"#AAA",fontSize:32}}):i.jsx(rc,{style:{color:e==="verify"?eo.primary.main:"#AAA",fontSize:32}})}),i.jsx(Ko,{primary:d.title,secondary:d.description})]},d.action))}),n&&i.jsx(dt,{fullWidth:!0,disabled:!e,variant:"contained",color:"primary",style:{marginTop:16},onClick:n,children:o("common.next")})]})}oa.propTypes={action:L.oneOf(["both","purchase","verify"]).isRequired,onSelect:L.func.isRequired,onNext:L.func.isRequired};function _i({meta:e,onCancel:t,mode:n,handlePaySuccess:r}){const{t:o,locale:u}=yt(),{info:d}=Rn(),h=bl(d),[v,x]=N.useState(null),s=new URL(e==null?void 0:e.registryUrl).origin,a=Mt.getDisplayName({meta:e}),k=async(S,R)=>{const _=({downloadTokenList:z})=>{r({downloadTokenList:z})},D=z=>{ii.error(z),t(z)};function H(z){return ol(()=>so.get(z).then(async({data:X})=>{const O=X==null?void 0:X.downloadTokenList;if(X.status==="succeed"){if(O&&O.length)await _({downloadTokenList:O});else return await D(o("blocklet.component.missDownloadTokenTip")),!0;return!0}return X.status==="error"?(console.error("vc error: ",X),await D(X==null?void 0:X.error),!0):!1}),{interval:1e3})}if(n==="purchase"&&v){const{statusUrl:z}=xl(v);await H(z)}else await _({downloadTokenList:S.downloadTokenList&&R(S.downloadTokenList)})};if(N.useEffect(()=>{if(n==="purchase"){const S=new URL(s);S.pathname="/api/did/verify-purchase-blocklet/token",S.searchParams.set("serverDid",d.did),S.searchParams.set("blockletDid",e==null?void 0:e.did);try{so.get(S.href).then(({data:R})=>{const _=`${R.url}`;x(_)})}catch(R){console.error("get next workflow url error: ",R)}}return()=>{x(null)}},[n]),n==="purchase"&&!v)return"";const y={verify:{action:"verify-purchase-blocklet",checkFn:io.create({baseURL:s}).get,extraParams:{serverDid:d.did,blockletDid:e==null?void 0:e.did},messages:{title:o("store.purchase.verify.auth.title",{name:a}),scan:o("store.purchase.verify.auth.scan"),confirm:o("store.purchase.verify.auth.confirm"),success:o("store.purchase.verify.auth.success")}},purchase:{action:"acquire-asset",checkFn:io.create({baseURL:qn(s,"/store")}).get,extraParams:{factory:e.nftFactory,nw:v},messages:{title:o("store.purchase.auth.title",{name:a}),scan:o("store.purchase.auth.scan"),confirm:o("store.purchase.auth.confirm"),success:i.jsxs(i.Fragment,{children:[i.jsx("p",{children:o("store.purchase.auth.success")}),i.jsx("p",{children:o("blocklet.component.purchaseComponentSecondCheckTip")})]})}}};return i.jsx(ns,{open:!0,locale:u,popup:!1,saveConnect:!1,className:"connect",baseUrl:s,onSuccess:k,cancelWhenScanned:t,onClose:t,checkTimeout:60*5e3,webWalletUrl:h,disableClose:!0,showDownload:!1,...y[n]})}_i.propTypes={...zd,handlePaySuccess:L.func,mode:L.oneOf(["verify","purchase"]).isRequired};_i.defaultProps={handlePaySuccess:()=>{}};const Ni=N.forwardRef(({mode:e,...t},n)=>{const[r,o]=N.useState(e!=="both"?e:"verify"),[u,d]=N.useState(e!=="both"?2:1),h=x=>{x!==r&&o(x)},v=()=>{r&&u!==2&&d(2)};return N.useImperativeHandle(n,()=>({onNext:v,getCurrentStep:()=>u})),u===1?i.jsx("div",{style:{maxWidth:520},children:i.jsx(oa,{action:r,onNext:null,onSelect:h})}):i.jsx(_i,{...t,mode:r})});Ni.propTypes={mode:L.oneOf(["both","verify","purchase"]).isRequired,ref:L.any};Ni.defaultProps={ref:{}};const Kd=Ni;function Vd({...e}){return i.jsx(dt,{className:"bottom-button",variant:"contained",color:"primary",...e})}function Ai({blocklet:e,onStartNow:t,children:n,disabled:r}){const{t:o}=yt(),u=ps();return!e||wl(e.meta)?i.jsx(Gd,{children:n}):i.jsxs(Hd,{isMobile:u,children:[i.jsx(Vd,{className:"start-now",variant:"contained",color:"primary",disabled:r,onClick:()=>t(),children:o("setup.startNow")}),i.jsx(Q,{display:"flex",alignItems:"center",children:n})]})}Ai.propTypes={blocklet:L.object,onStartNow:L.func,children:L.any,disabled:L.bool};Ai.defaultProps={blocklet:null,onStartNow:()=>{},children:null,disabled:!1};const Gd=Ve(Q)`
|
|
217
|
+
width: 100%;
|
|
218
|
+
margin-top: auto;
|
|
219
|
+
padding-top: 24px;
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
.bottom-button {
|
|
224
|
+
min-width: 200px;
|
|
225
|
+
}
|
|
226
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
227
|
+
.bottom-button {
|
|
228
|
+
width: 100%;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
`,Hd=Ve(Q)`
|
|
232
|
+
padding-top: 24px;
|
|
233
|
+
margin-top: auto;
|
|
234
|
+
width: 100%;
|
|
235
|
+
display: flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
justify-content: space-between;
|
|
238
|
+
.start-now {
|
|
239
|
+
min-width: 140px;
|
|
240
|
+
}
|
|
241
|
+
.bottom-button {
|
|
242
|
+
min-width: 120px;
|
|
243
|
+
}
|
|
244
|
+
${e=>e.theme.breakpoints.down("lg")} {
|
|
245
|
+
width: 100%;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
${e=>e.theme.breakpoints.down("md")} {
|
|
249
|
+
.start-now {
|
|
250
|
+
min-width: inherit;
|
|
251
|
+
}
|
|
252
|
+
.bottom-button {
|
|
253
|
+
min-width: 100px;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
${e=>e.isMobile} {
|
|
258
|
+
justify-content: space-between;
|
|
259
|
+
gap: '32px',
|
|
260
|
+
}}
|
|
261
|
+
`;function Di({blockletMeta:e,onEndpointUpdate:t}){var h;const n=ps(),{blocklet:r}=fr(),{updateSpaceGateway:o,loading:u,hasStorageEndpoint:d}=Fl();return N.useEffect(()=>{t==null||t()},[r]),u?i.jsx(sl,{relative:"parent",children:i.jsx(vt,{})}):i.jsxs(Xd,{children:[i.jsx(Q,{width:n?"360px":"720px",children:d?i.jsx(ac,{}):i.jsx(lc,{})}),((h=e==null?void 0:e.capabilities)==null?void 0:h.didSpace)==="required"&&i.jsx(Ai,{mt:8,children:i.jsx(cc,{onConnect:o})})]})}Di.propTypes={blockletMeta:L.any.isRequired,onEndpointUpdate:Fa.func};Di.defaultProps={onEndpointUpdate:()=>{}};const Xd=Ve(sc)`
|
|
262
|
+
height: 100%;
|
|
263
|
+
overflow-y: auto;
|
|
264
|
+
padding-bottom: 32px;
|
|
265
|
+
overflow-x: hidden;
|
|
266
|
+
`;function Mi({onChange:e,loading:t,children:n,extra:r,stores:o,storageKey:u}){const{t:d}=yt(),{info:h,inService:v}=Rn(),{blocklet:x}=fr(),[s,a]=N.useState(!1),k=N.useRef(null),[y,S]=N.useState(),[R,_]=ds(u||"tmp"),[D,H]=u?[R,_]:[y,S],{storeList:z,teamDid:X}=ss({fromBlocklet:v,blocklet:x,nodeInfo:h}),O=ls([...o.map(Z=>({...Z,protected:!0})),...z],"url"),q=D&&O.find(Z=>D===Z.url)||O[0];return i.jsxs(i.Fragment,{children:[i.jsxs(Yd,{children:[i.jsx(dt,{ref:k,color:"primary","data-cy":"add-component-select-store",endIcon:i.jsx(uc,{color:"primary"}),onClick:()=>{a(!0)},style:{padding:"0 2px"},children:i.jsx(me,{color:"primary",children:q.name})}),i.jsx(me,{color:"primary",children:r})]}),i.jsxs(dr,{id:"mui-registry-select",select:!0,autoComplete:"off",variant:"outlined",name:"did",helperText:d("blocklet.component.selectRegistryTip"),"data-cy":"component-registry-select",fullWidth:!0,value:q,autoFocus:!0,onChange:Z=>{const F=Z.target.value;H(F.url),e(F)},SelectProps:{open:s,MenuProps:{anchorEl:k.current},renderValue:Z=>Z==null?void 0:Z.name,onClose:()=>{a(!1)}},style:{display:"none"},margin:"normal",children:[O==null?void 0:O.map(Z=>i.jsx(Zr,{sx:{width:"400px",maxWidth:"90vw"},value:Z,"data-cy":Z.url,children:i.jsx(el,{teamDid:X,store:Z,onDelete:()=>{var F;D===Z.url&&H((F=O[0])==null?void 0:F.url)}})},Z.url)),!Zo.isInServerlessMode(h)&&i.jsx(tl,{disabled:t,storeList:O,teamDid:X,onAdd:Z=>{H(Z)}})]}),n({currentRegistry:q})]})}Mi.propTypes={onChange:L.func,loading:L.bool,children:L.any.isRequired,extra:L.node,storageKey:L.string,stores:L.arrayOf(L.shape({name:L.string.isRequired,url:L.string.isRequired}))};Mi.defaultProps={onChange:()=>{},loading:!1,extra:"",stores:[],storageKey:""};const Yd=Ve.div`
|
|
267
|
+
display: flex;
|
|
268
|
+
justify-content: space-between;
|
|
269
|
+
align-items: center;
|
|
270
|
+
margin-bottom: 16px;
|
|
271
|
+
|
|
272
|
+
span {
|
|
273
|
+
font-size: 16px;
|
|
274
|
+
color: ${e=>e.theme.palette.common.black};
|
|
275
|
+
// font-weight: bold;
|
|
276
|
+
}
|
|
277
|
+
`,Jd=qt("div")`
|
|
278
|
+
background-color: transparent !important;
|
|
279
|
+
& > :not(.Mui-disabled) {
|
|
280
|
+
position: relative;
|
|
281
|
+
z-index: 1;
|
|
282
|
+
&::before {
|
|
283
|
+
content: '';
|
|
284
|
+
position: absolute;
|
|
285
|
+
height: 100%;
|
|
286
|
+
width: 100%;
|
|
287
|
+
left: 0;
|
|
288
|
+
top: 0;
|
|
289
|
+
transition: opacity 0.3s;
|
|
290
|
+
}
|
|
291
|
+
&:hover::before {
|
|
292
|
+
opacity: 0;
|
|
293
|
+
}
|
|
294
|
+
&::after {
|
|
295
|
+
content: '';
|
|
296
|
+
position: absolute;
|
|
297
|
+
height: 100%;
|
|
298
|
+
width: 100%;
|
|
299
|
+
top: 0;
|
|
300
|
+
left: 0;
|
|
301
|
+
border-radius: 2px;
|
|
302
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
303
|
+
transform: scale(0.1);
|
|
304
|
+
opacity: 0;
|
|
305
|
+
z-index: -1;
|
|
306
|
+
transition:
|
|
307
|
+
transform 0.3s,
|
|
308
|
+
opacity 0.3s,
|
|
309
|
+
background-color 0.3s;
|
|
310
|
+
}
|
|
311
|
+
&:hover::after {
|
|
312
|
+
opacity: 1;
|
|
313
|
+
transform-origin: center;
|
|
314
|
+
transform: scale(1);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
& > :not(.Mui-disabled) {
|
|
318
|
+
background-color: transparent !important;
|
|
319
|
+
color: ${e=>e.theme.palette.primary.main}!important;
|
|
320
|
+
}
|
|
321
|
+
& > :not(.Mui-disabled) {
|
|
322
|
+
&:hover {
|
|
323
|
+
color: ${e=>e.theme.palette.common.white}!important;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
`;qt("div")`
|
|
327
|
+
&.arcblock-blocklet {
|
|
328
|
+
padding: ${e=>e.theme.spacing(2)} ${e=>e.theme.spacing(2)} 0
|
|
329
|
+
${e=>e.theme.spacing(2)};
|
|
330
|
+
}
|
|
331
|
+
.arcblock-blocklet__content {
|
|
332
|
+
cursor: pointer;
|
|
333
|
+
display: flex;
|
|
334
|
+
${e=>e.theme.breakpoints.up("sm")} {
|
|
335
|
+
align-items: center;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
.arcblock-blocklet__cover {
|
|
339
|
+
width: 64px;
|
|
340
|
+
height: 64px;
|
|
341
|
+
margin-right: ${e=>e.theme.spacing(2)};
|
|
342
|
+
overflow: hidden;
|
|
343
|
+
border-radius: 12px;
|
|
344
|
+
/* see: https://stackoverflow.com/questions/49066011/overflow-hidden-with-border-radius-not-working-on-safari */
|
|
345
|
+
transform: translateZ(0);
|
|
346
|
+
${e=>e.theme.breakpoints.up("sm")} {
|
|
347
|
+
width: 80px;
|
|
348
|
+
height: 80px;
|
|
349
|
+
margin-bottom: 12px;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
.arcblock-blocklet__button--hover {
|
|
353
|
+
&:not(.Mui-disabled) {
|
|
354
|
+
position: relative;
|
|
355
|
+
z-index: 1;
|
|
356
|
+
&::before {
|
|
357
|
+
content: '';
|
|
358
|
+
position: absolute;
|
|
359
|
+
height: 100%;
|
|
360
|
+
width: 100%;
|
|
361
|
+
left: 0;
|
|
362
|
+
top: 0;
|
|
363
|
+
transition: opacity 0.3s;
|
|
364
|
+
}
|
|
365
|
+
&:hover::before {
|
|
366
|
+
opacity: 0;
|
|
367
|
+
}
|
|
368
|
+
&::after {
|
|
369
|
+
content: '';
|
|
370
|
+
position: absolute;
|
|
371
|
+
height: 100%;
|
|
372
|
+
width: 100%;
|
|
373
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
374
|
+
transform: scale(0.1);
|
|
375
|
+
opacity: 0;
|
|
376
|
+
z-index: -1;
|
|
377
|
+
transition:
|
|
378
|
+
transform 0.3s,
|
|
379
|
+
opacity 0.3s,
|
|
380
|
+
background-color 0.3s;
|
|
381
|
+
}
|
|
382
|
+
&:hover::after {
|
|
383
|
+
opacity: 1;
|
|
384
|
+
transform-origin: center;
|
|
385
|
+
transform: scale(1);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
&:not(.Mui-disabled) {
|
|
390
|
+
background-color: transparent !important;
|
|
391
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
392
|
+
}
|
|
393
|
+
&:not(.Mui-disabled) {
|
|
394
|
+
&:hover {
|
|
395
|
+
color: ${e=>e.theme.palette.common.white};
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
.arcblock-blocklet__info {
|
|
400
|
+
flex: 1;
|
|
401
|
+
overflow: hidden;
|
|
402
|
+
border-bottom: 1px solid ${e=>e.theme.palette.divider};
|
|
403
|
+
padding-bottom: ${e=>e.theme.spacing(2)};
|
|
404
|
+
}
|
|
405
|
+
.arcblock-blocklet__text {
|
|
406
|
+
height: 65px;
|
|
407
|
+
overflow: hidden;
|
|
408
|
+
}
|
|
409
|
+
/* 设置多行文本溢出显示省略号 兼容fireFox、safari */
|
|
410
|
+
.arcblock-blocklet__title {
|
|
411
|
+
margin: 0;
|
|
412
|
+
font-size: 16px;
|
|
413
|
+
font-weight: 500;
|
|
414
|
+
overflow: hidden;
|
|
415
|
+
text-overflow: ellipsis;
|
|
416
|
+
white-space: nowrap;
|
|
417
|
+
}
|
|
418
|
+
.arcblock-blocklet__describe {
|
|
419
|
+
margin-top: ${e=>e.theme.spacing(.5)};
|
|
420
|
+
color: ${e=>e.theme.palette.grey[600]};
|
|
421
|
+
font-size: 14px;
|
|
422
|
+
font-weight: 500;
|
|
423
|
+
line-height: 17px;
|
|
424
|
+
max-height: 34px;
|
|
425
|
+
overflow: hidden;
|
|
426
|
+
text-overflow: ellipsis;
|
|
427
|
+
display: -webkit-box;
|
|
428
|
+
-webkit-line-clamp: 2;
|
|
429
|
+
-webkit-box-orient: vertical;
|
|
430
|
+
word-break: break-word;
|
|
431
|
+
}
|
|
432
|
+
.arcblock-blocklet__version {
|
|
433
|
+
color: ${e=>e.theme.palette.grey[600]};
|
|
434
|
+
font-size: 12px;
|
|
435
|
+
}
|
|
436
|
+
`;L.string||L.node,L.string,L.string||L.node,L.string,L.string,L.bool,L.bool,L.element,L.string,L.func,L.func,L.string;qt("div")`
|
|
437
|
+
background-color: transparent !important;
|
|
438
|
+
& > :not(.Mui-disabled) {
|
|
439
|
+
position: relative;
|
|
440
|
+
z-index: 1;
|
|
441
|
+
&::before {
|
|
442
|
+
content: '';
|
|
443
|
+
position: absolute;
|
|
444
|
+
height: 100%;
|
|
445
|
+
width: 100%;
|
|
446
|
+
left: 0;
|
|
447
|
+
top: 0;
|
|
448
|
+
transition: opacity 0.3s;
|
|
449
|
+
}
|
|
450
|
+
&:hover::before {
|
|
451
|
+
opacity: 0;
|
|
452
|
+
}
|
|
453
|
+
&::after {
|
|
454
|
+
content: '';
|
|
455
|
+
position: absolute;
|
|
456
|
+
height: 100%;
|
|
457
|
+
width: 100%;
|
|
458
|
+
top: 0;
|
|
459
|
+
left: 0;
|
|
460
|
+
border-radius: 2px;
|
|
461
|
+
background-color: ${e=>e.theme.palette.primary.main};
|
|
462
|
+
transform: scale(0.1);
|
|
463
|
+
opacity: 0;
|
|
464
|
+
z-index: -1;
|
|
465
|
+
transition:
|
|
466
|
+
transform 0.3s,
|
|
467
|
+
opacity 0.3s,
|
|
468
|
+
background-color 0.3s;
|
|
469
|
+
}
|
|
470
|
+
&:hover::after {
|
|
471
|
+
opacity: 1;
|
|
472
|
+
transform-origin: center;
|
|
473
|
+
transform: scale(1);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
& > :not(.Mui-disabled) {
|
|
477
|
+
background-color: transparent !important;
|
|
478
|
+
color: ${e=>e.theme.palette.primary.main}!important;
|
|
479
|
+
}
|
|
480
|
+
& > :not(.Mui-disabled) {
|
|
481
|
+
&:hover {
|
|
482
|
+
color: ${e=>e.theme.palette.common.white}!important;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
`;const Co=(e="")=>e.replace(/(<([^>]+)>)/gi,"").trim(),Qd=(e="")=>{const t=parseInt(e,10);return Number.isNaN(t)?e:t<1e3?t:t<1e6?`${(t/1e3).toFixed(1)}k`:t<1e9?`${(t/1e6).toFixed(1)}m`:`${(t/1e9).toFixed(1)}b`},sa={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 18a3.5 3.5 0 0 0 0-7h-1A5 4.5 0 0 0 7 9a4.6 4.4 0 0 0-2.1 8.4M12 13v9m-3-3l3 3l3-3"/>'};function Vr({title:e,sx:t,children:n,slotProps:r,fontSize:o=12,fontWeight:u=500,color:d="text.secondary",...h}){var v,x;return e?i.jsx(Go,{title:e,placement:"top",...h,slotProps:{popper:{...r==null?void 0:r.popper,sx:[{[`& .${Ba.tooltip}`]:{backgroundColor:"common.white",fontSize:o,fontWeight:u,boxShadow:"0px 4px 8px 0px #03071214, 0px 0px 0px 1px #03071214",marginBottom:"6px !important",borderRadius:"8px",cursor:"default",color:d,display:"flex",alignItems:"center"}},...Array.isArray((v=r==null?void 0:r.popper)==null?void 0:v.sx)?r.popper.sx:[(x=r==null?void 0:r.popper)==null?void 0:x.sx]]}},children:n}):n}function tr({icon:e,children:t,maxWidth:n=100,title:r,sx:o}){return(t===0||t)&&i.jsxs(nt,{direction:"row",alignItems:"center",gap:.5,sx:[{maxWidth:n,overflow:"hidden"},...Array.isArray(o)?o:[o]],children:[e,i.jsx(Vr,{title:r||(typeof t=="string"?t:""),children:i.jsx(me,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"default"},children:t})})]})}function Zd(e){const{title:t,description:n="",cover:r="",avatar:o,author:u,download:d,did:h,official:v,buttonText:x="Install",buttonDisabled:s,buttonLoading:a,button:k,onButtonClick:y=()=>{},onMainClick:S,className:R,ref:_,icons:D,status:H,...z}=e,X=Gn(),O=(Y,oe=()=>!1)=>(Se,...Fe)=>{const $e=Y instanceof Function;(oe()||$e)&&(Se.preventDefault(),Se.stopPropagation(),$e&&Y(...Fe))},q=S&&O(S),Z=O(y,()=>!!(k||s||a)),F=N.isValidElement(t)?{children:t}:{title:Co(t),dangerouslySetInnerHTML:{__html:t}},ce=N.isValidElement(n)?{children:n}:{title:Co(n),dangerouslySetInnerHTML:{__html:n}};return i.jsxs($a,{variant:"outlined",onClick:q,...z,sx:{p:{xs:2,md:3},borderRadius:2,...z.sx},children:[i.jsxs(nt,{flex:1,direction:"row",gap:1,alignItems:"center",overflow:"hidden",sx:{"& > *":{flexShrink:0}},children:[i.jsx(lr,{src:r,did:h,size:48,variant:"rounded",style:{borderRadius:"8px",overflow:"hidden"}}),i.jsx(me,{className:"blocklet-title",fontWeight:"fontWeightMedium",sx:{fontSize:16,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",cursor:"default",pl:.5,"&&":{flexShrink:1}},...F}),i.jsxs(Q,{flex:1,display:"flex",alignItems:"center",justifyContent:"flex-start",gap:1,children:[v&&i.jsx(Vr,{title:v.tooltip,children:i.jsx(al,{sx:{color:v.color||"#D97706",fontSize:v.size||18}})}),D==null?void 0:D.map(Y=>i.jsx(Vr,{title:Y.title,children:typeof Y.icon=="string"?i.jsx(lt,{icon:Y.icon,style:{color:Y.color}}):Y.icon},Y.key))]}),y&&i.jsxs(dt,{color:"reverse",variant:"outlined",size:"small",disabled:s||a,style:{borderColor:X.palette.grey[300],borderRadius:8,fontSize:13,fontWeight:X.typography.fontWeightMedium},onClick:Z,children:[a&&i.jsx(vt,{size:15,style:{marginRight:3,color:"inherit"}}),x]}),k]}),i.jsx(nt,{py:2,children:i.jsx(me,{className:"blocklet-description",variant:"body2",color:"text.secondary",sx:{display:"-webkit-box",lineClamp:2,WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",cursor:"default",height:40},...ce})}),i.jsxs(nt,{direction:"row",alignItems:"center",gap:2,color:"text.secondary",children:[i.jsx(tr,{icon:i.jsx(lr,{src:o,did:h,size:20,variant:"circle"}),maxWidth:200,children:u}),i.jsx(tr,{icon:i.jsx(lt,{icon:sa}),title:d,children:Qd(d)}),H==null?void 0:H.filter(Y=>Y.align!=="right").map(Y=>i.jsx(tr,{icon:typeof Y.icon=="string"?i.jsx(lt,{icon:Y.icon}):Y.icon,title:Y.title,maxWidth:Y.maxWidth,children:Y.text},Y.key)),i.jsx(Q,{sx:{flex:1}}),H==null?void 0:H.filter(Y=>Y.align==="right").map(Y=>i.jsx(tr,{icon:typeof Y.icon=="string"?i.jsx(lt,{icon:Y.icon}):Y.icon,title:Y.title,maxWidth:Y.maxWidth,sx:{color:Y.color},children:Y.text},Y.key))]})]})}const eh={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m8 16l2-6l6-2l-2 6l-6 2"/><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0m9-9v2m0 14v2m-9-9h2m14 0h2"/></g>'};var Fi={},th=Yr;Object.defineProperty(Fi,"__esModule",{value:!0});var aa=Fi.default=void 0,nh=th(ni()),rh=i;aa=Fi.default=(0,nh.default)((0,rh.jsx)("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown");var la={exports:{}};(function(e,t){(function(n,r){e.exports=r(N)})(Ee,n=>(()=>{var r={703:(h,v,x)=>{var s=x(414);function a(){}function k(){}k.resetWarningCache=a,h.exports=function(){function y(_,D,H,z,X,O){if(O!==s){var q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw q.name="Invariant Violation",q}}function S(){return y}y.isRequired=y;var R={array:y,bool:y,func:y,number:y,object:y,string:y,symbol:y,any:y,arrayOf:S,element:y,elementType:y,instanceOf:S,node:y,objectOf:S,oneOf:S,oneOfType:S,shape:S,exact:S,checkPropTypes:k,resetWarningCache:a};return R.PropTypes=R,R}},697:(h,v,x)=>{h.exports=x(703)()},414:h=>{h.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},590:h=>{var v=typeof Element<"u",x=typeof Map=="function",s=typeof Set=="function",a=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function k(y,S){if(y===S)return!0;if(y&&S&&typeof y=="object"&&typeof S=="object"){if(y.constructor!==S.constructor)return!1;var R,_,D,H;if(Array.isArray(y)){if((R=y.length)!=S.length)return!1;for(_=R;_--!=0;)if(!k(y[_],S[_]))return!1;return!0}if(x&&y instanceof Map&&S instanceof Map){if(y.size!==S.size)return!1;for(H=y.entries();!(_=H.next()).done;)if(!S.has(_.value[0]))return!1;for(H=y.entries();!(_=H.next()).done;)if(!k(_.value[1],S.get(_.value[0])))return!1;return!0}if(s&&y instanceof Set&&S instanceof Set){if(y.size!==S.size)return!1;for(H=y.entries();!(_=H.next()).done;)if(!S.has(_.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(y)&&ArrayBuffer.isView(S)){if((R=y.length)!=S.length)return!1;for(_=R;_--!=0;)if(y[_]!==S[_])return!1;return!0}if(y.constructor===RegExp)return y.source===S.source&&y.flags===S.flags;if(y.valueOf!==Object.prototype.valueOf)return y.valueOf()===S.valueOf();if(y.toString!==Object.prototype.toString)return y.toString()===S.toString();if((R=(D=Object.keys(y)).length)!==Object.keys(S).length)return!1;for(_=R;_--!=0;)if(!Object.prototype.hasOwnProperty.call(S,D[_]))return!1;if(v&&y instanceof Element)return!1;for(_=R;_--!=0;)if((D[_]!=="_owner"&&D[_]!=="__v"&&D[_]!=="__o"||!y.$$typeof)&&!k(y[D[_]],S[D[_]]))return!1;return!0}return y!=y&&S!=S}h.exports=function(y,S){try{return k(y,S)}catch(R){if((R.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw R}}},359:h=>{h.exports=n}},o={};function u(h){var v=o[h];if(v!==void 0)return v.exports;var x=o[h]={exports:{}};return r[h](x,x.exports,u),x.exports}u.n=h=>{var v=h&&h.__esModule?()=>h.default:()=>h;return u.d(v,{a:v}),v},u.d=(h,v)=>{for(var x in v)u.o(v,x)&&!u.o(h,x)&&Object.defineProperty(h,x,{enumerable:!0,get:v[x]})},u.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),u.o=(h,v)=>Object.prototype.hasOwnProperty.call(h,v),u.r=h=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(h,"__esModule",{value:!0})};var d={};return(()=>{function h(g){var p,E,j="";if(typeof g=="string"||typeof g=="number")j+=g;else if(typeof g=="object")if(Array.isArray(g))for(p=0;p<g.length;p++)g[p]&&(E=h(g[p]))&&(j&&(j+=" "),j+=E);else for(p in g)g[p]&&(j&&(j+=" "),j+=p);return j}function v(){for(var g,p,E=0,j="";E<arguments.length;)(g=arguments[E++])&&(p=h(g))&&(j&&(j+=" "),j+=p);return j}u.r(d),u.d(d,{default:()=>Ra});var x=u(359),s=u.n(x);const a=function(g){var p=typeof g;return g!=null&&(p=="object"||p=="function")},k=typeof Ee=="object"&&Ee&&Ee.Object===Object&&Ee;var y=typeof self=="object"&&self&&self.Object===Object&&self;const S=k||y||Function("return this")(),R=function(){return S.Date.now()};var _=/\s/,D=/^\s+/;const H=function(g){return g&&g.slice(0,function(p){for(var E=p.length;E--&&_.test(p.charAt(E)););return E}(g)+1).replace(D,"")},z=S.Symbol;var X=Object.prototype,O=X.hasOwnProperty,q=X.toString,Z=z?z.toStringTag:void 0,F=Object.prototype.toString,ce=z?z.toStringTag:void 0;const Y=function(g){return g==null?g===void 0?"[object Undefined]":"[object Null]":ce&&ce in Object(g)?function(p){var E=O.call(p,Z),j=p[Z];try{p[Z]=void 0;var U=!0}catch{}var ne=q.call(p);return U&&(E?p[Z]=j:delete p[Z]),ne}(g):function(p){return F.call(p)}(g)};var oe=/^[-+]0x[0-9a-f]+$/i,Se=/^0b[01]+$/i,Fe=/^0o[0-7]+$/i,$e=parseInt;const it=function(g){if(typeof g=="number")return g;if(function(j){return typeof j=="symbol"||function(U){return U!=null&&typeof U=="object"}(j)&&Y(j)=="[object Symbol]"}(g))return NaN;if(a(g)){var p=typeof g.valueOf=="function"?g.valueOf():g;g=a(p)?p+"":p}if(typeof g!="string")return g===0?g:+g;g=H(g);var E=Se.test(g);return E||Fe.test(g)?$e(g.slice(2),E?2:8):oe.test(g)?NaN:+g};var ee=Math.max,pe=Math.min;const K=function(g,p,E){var j,U,ne,fe,m,f,I=0,M=!1,W=!1,B=!0;if(typeof g!="function")throw new TypeError("Expected a function");function le(re){var he=j,ye=U;return j=U=void 0,I=re,fe=g.apply(ye,he)}function ae(re){return I=re,m=setTimeout(V,p),M?le(re):fe}function de(re){var he=re-f;return f===void 0||he>=p||he<0||W&&re-I>=ne}function V(){var re=R();if(de(re))return G(re);m=setTimeout(V,function(he){var ye=p-(he-f);return W?pe(ye,ne-(he-I)):ye}(re))}function G(re){return m=void 0,B&&j?le(re):(j=U=void 0,fe)}function J(){var re=R(),he=de(re);if(j=arguments,U=this,f=re,he){if(m===void 0)return ae(f);if(W)return clearTimeout(m),m=setTimeout(V,p),le(f)}return m===void 0&&(m=setTimeout(V,p)),fe}return p=it(p)||0,a(E)&&(M=!!E.leading,ne=(W="maxWait"in E)?ee(it(E.maxWait)||0,p):ne,B="trailing"in E?!!E.trailing:B),J.cancel=function(){m!==void 0&&clearTimeout(m),I=0,j=f=U=m=void 0},J.flush=function(){return m===void 0?fe:G(R())},J},Te=function(g,p,E){var j=!0,U=!0;if(typeof g!="function")throw new TypeError("Expected a function");return a(E)&&(j="leading"in E?!!E.leading:j,U="trailing"in E?!!E.trailing:U),K(g,p,{leading:j,maxWait:p,trailing:U})};var ie=u(590),pt=u.n(ie),xe=function(){if(typeof Map<"u")return Map;function g(p,E){var j=-1;return p.some(function(U,ne){return U[0]===E&&(j=ne,!0)}),j}return function(){function p(){this.__entries__=[]}return Object.defineProperty(p.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),p.prototype.get=function(E){var j=g(this.__entries__,E),U=this.__entries__[j];return U&&U[1]},p.prototype.set=function(E,j){var U=g(this.__entries__,E);~U?this.__entries__[U][1]=j:this.__entries__.push([E,j])},p.prototype.delete=function(E){var j=this.__entries__,U=g(j,E);~U&&j.splice(U,1)},p.prototype.has=function(E){return!!~g(this.__entries__,E)},p.prototype.clear=function(){this.__entries__.splice(0)},p.prototype.forEach=function(E,j){j===void 0&&(j=null);for(var U=0,ne=this.__entries__;U<ne.length;U++){var fe=ne[U];E.call(j,fe[1],fe[0])}},p}()}(),Je=typeof window<"u"&&typeof document<"u"&&window.document===document,ze=u.g!==void 0&&u.g.Math===Math?u.g:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")(),Pt=typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ze):function(g){return setTimeout(function(){return g(Date.now())},1e3/60)},Kt=["top","right","bottom","left","width","height","size","weight"],Ft=typeof MutationObserver<"u",Vt=function(){function g(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(p,E){var j=!1,U=!1,ne=0;function fe(){j&&(j=!1,p()),U&&f()}function m(){Pt(fe)}function f(){var I=Date.now();if(j){if(I-ne<2)return;U=!0}else j=!0,U=!1,setTimeout(m,20);ne=I}return f}(this.refresh.bind(this))}return g.prototype.addObserver=function(p){~this.observers_.indexOf(p)||this.observers_.push(p),this.connected_||this.connect_()},g.prototype.removeObserver=function(p){var E=this.observers_,j=E.indexOf(p);~j&&E.splice(j,1),!E.length&&this.connected_&&this.disconnect_()},g.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},g.prototype.updateObservers_=function(){var p=this.observers_.filter(function(E){return E.gatherActive(),E.hasActive()});return p.forEach(function(E){return E.broadcastActive()}),p.length>0},g.prototype.connect_=function(){Je&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ft?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},g.prototype.disconnect_=function(){Je&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},g.prototype.onTransitionEnd_=function(p){var E=p.propertyName,j=E===void 0?"":E;Kt.some(function(U){return!!~j.indexOf(U)})&&this.refresh()},g.getInstance=function(){return this.instance_||(this.instance_=new g),this.instance_},g.instance_=null,g}(),Le=function(g,p){for(var E=0,j=Object.keys(p);E<j.length;E++){var U=j[E];Object.defineProperty(g,U,{value:p[U],enumerable:!1,writable:!1,configurable:!0})}return g},_e=function(g){return g&&g.ownerDocument&&g.ownerDocument.defaultView||ze},Oe=ke(0,0,0,0);function ve(g){return parseFloat(g)||0}function St(g){for(var p=[],E=1;E<arguments.length;E++)p[E-1]=arguments[E];return p.reduce(function(j,U){return j+ve(g["border-"+U+"-width"])},0)}var Gt=typeof SVGGraphicsElement<"u"?function(g){return g instanceof _e(g).SVGGraphicsElement}:function(g){return g instanceof _e(g).SVGElement&&typeof g.getBBox=="function"};function Ht(g){return Je?Gt(g)?function(p){var E=p.getBBox();return ke(0,0,E.width,E.height)}(g):function(p){var E=p.clientWidth,j=p.clientHeight;if(!E&&!j)return Oe;var U=_e(p).getComputedStyle(p),ne=function(B){for(var le={},ae=0,de=["top","right","bottom","left"];ae<de.length;ae++){var V=de[ae],G=B["padding-"+V];le[V]=ve(G)}return le}(U),fe=ne.left+ne.right,m=ne.top+ne.bottom,f=ve(U.width),I=ve(U.height);if(U.boxSizing==="border-box"&&(Math.round(f+fe)!==E&&(f-=St(U,"left","right")+fe),Math.round(I+m)!==j&&(I-=St(U,"top","bottom")+m)),!function(B){return B===_e(B).document.documentElement}(p)){var M=Math.round(f+fe)-E,W=Math.round(I+m)-j;Math.abs(M)!==1&&(f-=M),Math.abs(W)!==1&&(I-=W)}return ke(ne.left,ne.top,f,I)}(g):Oe}function ke(g,p,E,j){return{x:g,y:p,width:E,height:j}}var In=function(){function g(p){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ke(0,0,0,0),this.target=p}return g.prototype.isActive=function(){var p=Ht(this.target);return this.contentRect_=p,p.width!==this.broadcastWidth||p.height!==this.broadcastHeight},g.prototype.broadcastRect=function(){var p=this.contentRect_;return this.broadcastWidth=p.width,this.broadcastHeight=p.height,p},g}(),Qe=function(g,p){var E,j,U,ne,fe,m,f,I=(j=(E=p).x,U=E.y,ne=E.width,fe=E.height,m=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,f=Object.create(m.prototype),Le(f,{x:j,y:U,width:ne,height:fe,top:U,right:j+ne,bottom:fe+U,left:j}),f);Le(this,{target:g,contentRect:I})},vn=function(){function g(p,E,j){if(this.activeObservations_=[],this.observations_=new xe,typeof p!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=p,this.controller_=E,this.callbackCtx_=j}return g.prototype.observe=function(p){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(p instanceof _e(p).Element))throw new TypeError('parameter 1 is not of type "Element".');var E=this.observations_;E.has(p)||(E.set(p,new In(p)),this.controller_.addObserver(this),this.controller_.refresh())}},g.prototype.unobserve=function(p){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(typeof Element<"u"&&Element instanceof Object){if(!(p instanceof _e(p).Element))throw new TypeError('parameter 1 is not of type "Element".');var E=this.observations_;E.has(p)&&(E.delete(p),E.size||this.controller_.removeObserver(this))}},g.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},g.prototype.gatherActive=function(){var p=this;this.clearActive(),this.observations_.forEach(function(E){E.isActive()&&p.activeObservations_.push(E)})},g.prototype.broadcastActive=function(){if(this.hasActive()){var p=this.callbackCtx_,E=this.activeObservations_.map(function(j){return new Qe(j.target,j.broadcastRect())});this.callback_.call(p,E,p),this.clearActive()}},g.prototype.clearActive=function(){this.activeObservations_.splice(0)},g.prototype.hasActive=function(){return this.activeObservations_.length>0},g}(),Xt=typeof WeakMap<"u"?new WeakMap:new xe,Yt=function g(p){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var E=Vt.getInstance(),j=new vn(p,E,this);Xt.set(this,j)};["observe","unobserve","disconnect"].forEach(function(g){Yt.prototype[g]=function(){var p;return(p=Xt.get(this))[g].apply(p,arguments)}});const Ze=ze.ResizeObserver!==void 0?ze.ResizeObserver:Yt,ot="Left",bt="Right",Tt="Up",st="Down",ft={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Ue={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},yn="mousemove",Jt="mouseup";function Qt(g,p){if(p===0)return g;const E=Math.PI/180*p;return[g[0]*Math.cos(E)+g[1]*Math.sin(E),g[1]*Math.cos(E)-g[0]*Math.sin(E)]}function bn(g){const{trackMouse:p}=g,E=x.useRef(Object.assign({},Ue)),j=x.useRef(Object.assign({},ft)),U=x.useRef(Object.assign({},j.current));let ne;for(ne in U.current=Object.assign({},j.current),j.current=Object.assign(Object.assign({},ft),g),ft)j.current[ne]===void 0&&(j.current[ne]=ft[ne]);const[fe,m]=x.useMemo(()=>function(f,I){const M=V=>{const G="touches"in V;G&&V.touches.length>1||f((J,re)=>{re.trackMouse&&!G&&(document.addEventListener(yn,W),document.addEventListener(Jt,le));const{clientX:he,clientY:ye}=G?V.touches[0]:V,Ne=Qt([he,ye],re.rotationAngle);return re.onTouchStartOrOnMouseDown&&re.onTouchStartOrOnMouseDown({event:V}),Object.assign(Object.assign(Object.assign({},J),Ue),{initial:Ne.slice(),xy:Ne,start:V.timeStamp||0})})},W=V=>{f((G,J)=>{const re="touches"in V;if(re&&V.touches.length>1)return G;if(V.timeStamp-G.start>J.swipeDuration)return G.swiping?Object.assign(Object.assign({},G),{swiping:!1}):G;const{clientX:he,clientY:ye}=re?V.touches[0]:V,[Ne,at]=Qt([he,ye],J.rotationAngle),tt=Ne-G.xy[0],qe=at-G.xy[1],Pe=Math.abs(tt),be=Math.abs(qe),$t=(V.timeStamp||0)-G.start,_n=Math.sqrt(Pe*Pe+be*be)/($t||1),Nn=[tt/($t||1),qe/($t||1)],Nt=function(An,Sn,Dn,ct){return An>Sn?Dn>0?bt:ot:ct>0?st:Tt}(Pe,be,tt,qe),ln=typeof J.delta=="number"?J.delta:J.delta[Nt.toLowerCase()]||ft.delta;if(Pe<ln&&be<ln&&!G.swiping)return G;const Rt={absX:Pe,absY:be,deltaX:tt,deltaY:qe,dir:Nt,event:V,first:G.first,initial:G.initial,velocity:_n,vxvy:Nn};Rt.first&&J.onSwipeStart&&J.onSwipeStart(Rt),J.onSwiping&&J.onSwiping(Rt);let En=!1;return(J.onSwiping||J.onSwiped||J[`onSwiped${Nt}`])&&(En=!0),En&&J.preventScrollOnSwipe&&J.trackTouch&&V.cancelable&&V.preventDefault(),Object.assign(Object.assign({},G),{first:!1,eventData:Rt,swiping:!0})})},B=V=>{f((G,J)=>{let re;if(G.swiping&&G.eventData){if(V.timeStamp-G.start<J.swipeDuration){re=Object.assign(Object.assign({},G.eventData),{event:V}),J.onSwiped&&J.onSwiped(re);const he=J[`onSwiped${re.dir}`];he&&he(re)}}else J.onTap&&J.onTap({event:V});return J.onTouchEndOrOnMouseUp&&J.onTouchEndOrOnMouseUp({event:V}),Object.assign(Object.assign(Object.assign({},G),Ue),{eventData:re})})},le=V=>{document.removeEventListener(yn,W),document.removeEventListener(Jt,le),B(V)},ae=(V,G)=>{let J=()=>{};if(V&&V.addEventListener){const re=Object.assign(Object.assign({},ft.touchEventOptions),G.touchEventOptions),he=[["touchstart",M,re],["touchmove",W,Object.assign(Object.assign({},re),G.preventScrollOnSwipe?{passive:!1}:{})],["touchend",B,re]];he.forEach(([ye,Ne,at])=>V.addEventListener(ye,Ne,at)),J=()=>he.forEach(([ye,Ne])=>V.removeEventListener(ye,Ne))}return J},de={ref:V=>{V!==null&&f((G,J)=>{if(G.el===V)return G;const re={};return G.el&&G.el!==V&&G.cleanUpTouch&&(G.cleanUpTouch(),re.cleanUpTouch=void 0),J.trackTouch&&V&&(re.cleanUpTouch=ae(V,J)),Object.assign(Object.assign(Object.assign({},G),{el:V}),re)})}};return I.trackMouse&&(de.onMouseDown=M),[de,ae]}(f=>E.current=f(E.current,j.current),{trackMouse:p}),[p]);return E.current=function(f,I,M,W){return I.trackTouch&&f.el?f.cleanUpTouch?I.preventScrollOnSwipe!==M.preventScrollOnSwipe||I.touchEventOptions.passive!==M.touchEventOptions.passive?(f.cleanUpTouch(),Object.assign(Object.assign({},f),{cleanUpTouch:W(f.el,I)})):f:Object.assign(Object.assign({},f),{cleanUpTouch:W(f.el,I)}):(f.cleanUpTouch&&f.cleanUpTouch(),Object.assign(Object.assign({},f),{cleanUpTouch:void 0}))}(E.current,j.current,U.current,m),fe}var P=u(697);function mt(g){return mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},mt(g)}function Zt(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(g);p&&(j=j.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,j)}return E}function Lt(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?Zt(Object(E),!0).forEach(function(j){l(g,j,E[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):Zt(Object(E)).forEach(function(j){Object.defineProperty(g,j,Object.getOwnPropertyDescriptor(E,j))})}return g}function l(g,p,E){return(p=function(j){var U=function(ne,fe){if(mt(ne)!=="object"||ne===null)return ne;var m=ne[Symbol.toPrimitive];if(m!==void 0){var f=m.call(ne,fe);if(mt(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ne)}(j,"string");return mt(U)==="symbol"?U:String(U)}(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}var b={description:"",fullscreen:"",isFullscreen:!1,originalAlt:"",originalHeight:"",originalWidth:"",originalTitle:"",sizes:"",srcSet:"",loading:"eager"},w=s().memo(function(g){var p=Lt(Lt({},b),g),E=p.description,j=p.fullscreen,U=p.handleImageLoaded,ne=p.isFullscreen,fe=p.onImageError,m=p.original,f=p.originalAlt,I=p.originalHeight,M=p.originalWidth,W=p.originalTitle,B=p.sizes,le=p.srcSet,ae=p.loading,de=ne&&j||m;return s().createElement(s().Fragment,null,s().createElement("img",{className:"image-gallery-image",src:de,alt:f,srcSet:le,height:I,width:M,sizes:B,title:W,onLoad:function(V){return U(V,m)},onError:fe,loading:ae}),E&&s().createElement("span",{className:"image-gallery-description"},E))});w.displayName="Item",w.propTypes={description:P.string,fullscreen:P.string,handleImageLoaded:P.func.isRequired,isFullscreen:P.bool,onImageError:P.func.isRequired,original:P.string.isRequired,originalAlt:P.string,originalHeight:P.string,originalWidth:P.string,originalTitle:P.string,sizes:P.string,srcSet:P.string,loading:P.string};const T=w;function C(g){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},C(g)}function A(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(g);p&&(j=j.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,j)}return E}function $(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?A(Object(E),!0).forEach(function(j){ue(g,j,E[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):A(Object(E)).forEach(function(j){Object.defineProperty(g,j,Object.getOwnPropertyDescriptor(E,j))})}return g}function ue(g,p,E){return(p=function(j){var U=function(ne,fe){if(C(ne)!=="object"||ne===null)return ne;var m=ne[Symbol.toPrimitive];if(m!==void 0){var f=m.call(ne,fe);if(C(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ne)}(j,"string");return C(U)==="symbol"?U:String(U)}(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}var se={left:s().createElement("polyline",{points:"15 18 9 12 15 6"}),right:s().createElement("polyline",{points:"9 18 15 12 9 6"}),maximize:s().createElement("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"}),minimize:s().createElement("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"}),play:s().createElement("polygon",{points:"5 3 19 12 5 21 5 3"}),pause:s().createElement(s().Fragment,null,s().createElement("rect",{x:"6",y:"4",width:"4",height:"16"}),s().createElement("rect",{x:"14",y:"4",width:"4",height:"16"}))},De={strokeWidth:1,viewBox:"0 0 24 24"},Ce=function(g){var p=$($({},De),g),E=p.strokeWidth,j=p.viewBox,U=p.icon;return s().createElement("svg",{className:"image-gallery-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:j,fill:"none",stroke:"currentColor",strokeWidth:E,strokeLinecap:"round",strokeLinejoin:"round"},se[U])};Ce.propTypes={strokeWidth:P.number,viewBox:P.string,icon:(0,P.oneOf)(["left","right","maximize","minimize","play","pause"]).isRequired};const je=Ce;var Ie=s().memo(function(g){var p=g.isFullscreen,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-fullscreen-button",onClick:E,"aria-label":"Open Fullscreen"},s().createElement(je,{strokeWidth:2,icon:p?"minimize":"maximize"}))});Ie.displayName="Fullscreen",Ie.propTypes={isFullscreen:P.bool.isRequired,onClick:P.func.isRequired};const Ge=Ie;var en=s().memo(function(g){var p=g.disabled,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-left-nav",disabled:p,onClick:E,"aria-label":"Previous Slide"},s().createElement(je,{icon:"left",viewBox:"6 0 12 24"}))});en.displayName="LeftNav",en.propTypes={disabled:P.bool.isRequired,onClick:P.func.isRequired};const tn=en;var He=s().memo(function(g){var p=g.disabled,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-right-nav",disabled:p,onClick:E,"aria-label":"Next Slide"},s().createElement(je,{icon:"right",viewBox:"6 0 12 24"}))});He.displayName="RightNav",He.propTypes={disabled:P.bool.isRequired,onClick:P.func.isRequired};const xn=He;var jt=s().memo(function(g){var p=g.isPlaying,E=g.onClick;return s().createElement("button",{type:"button",className:"image-gallery-icon image-gallery-play-button",onClick:E,"aria-label":"Play or Pause Slideshow"},s().createElement(je,{strokeWidth:2,icon:p?"pause":"play"}))});jt.displayName="PlayPause",jt.propTypes={isPlaying:P.bool.isRequired,onClick:P.func.isRequired};const Bt=jt;function Xe(g){return Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},Xe(g)}function Ot(){return Ot=Object.assign?Object.assign.bind():function(g){for(var p=1;p<arguments.length;p++){var E=arguments[p];for(var j in E)Object.prototype.hasOwnProperty.call(E,j)&&(g[j]=E[j])}return g},Ot.apply(this,arguments)}function wn(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(g);p&&(j=j.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,j)}return E}function nn(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?wn(Object(E),!0).forEach(function(j){Yn(g,j,E[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):wn(Object(E)).forEach(function(j){Object.defineProperty(g,j,Object.getOwnPropertyDescriptor(E,j))})}return g}function Yn(g,p,E){return(p=function(j){var U=function(ne,fe){if(Xe(ne)!=="object"||ne===null)return ne;var m=ne[Symbol.toPrimitive];if(m!==void 0){var f=m.call(ne,fe);if(Xe(f)!=="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ne)}(j,"string");return Xe(U)==="symbol"?U:String(U)}(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}var Jn={className:"",delta:0,onSwiping:function(){},onSwiped:function(){}},Pn=function(g){var p=nn(nn({},Jn),g),E=p.children,j=p.className,U=bn({delta:p.delta,onSwiping:p.onSwiping,onSwiped:p.onSwiped});return s().createElement("div",Ot({},U,{className:j}),E)};Pn.propTypes={children:P.node.isRequired,className:P.string,delta:P.number,onSwiped:P.func,onSwiping:P.func};const et=Pn;function kt(g){return kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p},kt(g)}function rn(g,p){var E=Object.keys(g);if(Object.getOwnPropertySymbols){var j=Object.getOwnPropertySymbols(g);p&&(j=j.filter(function(U){return Object.getOwnPropertyDescriptor(g,U).enumerable})),E.push.apply(E,j)}return E}function on(g){for(var p=1;p<arguments.length;p++){var E=arguments[p]!=null?arguments[p]:{};p%2?rn(Object(E),!0).forEach(function(j){an(g,j,E[j])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(E)):rn(Object(E)).forEach(function(j){Object.defineProperty(g,j,Object.getOwnPropertyDescriptor(E,j))})}return g}function Ln(g,p){for(var E=0;E<p.length;E++){var j=p[E];j.enumerable=j.enumerable||!1,j.configurable=!0,"value"in j&&(j.writable=!0),Object.defineProperty(g,Zn(j.key),j)}}function sn(g,p){return sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(E,j){return E.__proto__=j,E},sn(g,p)}function Qn(g,p){if(p&&(kt(p)==="object"||typeof p=="function"))return p;if(p!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return we(g)}function we(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}function _t(g){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(p){return p.__proto__||Object.getPrototypeOf(p)},_t(g)}function an(g,p,E){return(p=Zn(p))in g?Object.defineProperty(g,p,{value:E,enumerable:!0,configurable:!0,writable:!0}):g[p]=E,g}function Zn(g){var p=function(E,j){if(kt(E)!=="object"||E===null)return E;var U=E[Symbol.toPrimitive];if(U!==void 0){var ne=U.call(E,j);if(kt(ne)!=="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(E)}(g,"string");return kt(p)==="symbol"?p:String(p)}var Hi=["fullscreenchange","MSFullscreenChange","mozfullscreenchange","webkitfullscreenchange"],ka=(0,P.arrayOf)((0,P.shape)({srcSet:P.string,media:P.string}));function Xi(g){var p=parseInt(g.keyCode||g.which||0,10);return p===66||p===62}var wr=function(g){(function(m,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");m.prototype=Object.create(f&&f.prototype,{constructor:{value:m,writable:!0,configurable:!0}}),Object.defineProperty(m,"prototype",{writable:!1}),f&&sn(m,f)})(fe,g);var p,E,j,U,ne=(j=fe,U=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var m,f=_t(j);if(U){var I=_t(this).constructor;m=Reflect.construct(f,arguments,I)}else m=f.apply(this,arguments);return Qn(this,m)});function fe(m){var f;return function(I,M){if(!(I instanceof M))throw new TypeError("Cannot call a class as a function")}(this,fe),an(we(f=ne.call(this,m)),"onBulletClick",function(I,M){var W=f.props,B=W.onBulletClick,le=W.items,ae=f.state.currentIndex;I.target.blur(),ae!==M&&(le.length===2?f.slideToIndexWithStyleReset(M,I):f.slideToIndex(M,I)),B&&B(I,M)}),f.state={currentIndex:m.startIndex,thumbsTranslate:0,thumbsSwipedTranslate:0,currentSlideOffset:0,galleryWidth:0,thumbnailsWrapperWidth:0,thumbnailsWrapperHeight:0,thumbsStyle:{transition:"all ".concat(m.slideDuration,"ms ease-out")},isFullscreen:!1,isSwipingThumbnail:!1,isPlaying:!1},f.loadedImages={},f.imageGallery=s().createRef(),f.thumbnailsWrapper=s().createRef(),f.thumbnails=s().createRef(),f.imageGallerySlideWrapper=s().createRef(),f.handleImageLoaded=f.handleImageLoaded.bind(we(f)),f.handleKeyDown=f.handleKeyDown.bind(we(f)),f.handleMouseDown=f.handleMouseDown.bind(we(f)),f.handleResize=f.handleResize.bind(we(f)),f.handleTouchMove=f.handleTouchMove.bind(we(f)),f.handleOnSwiped=f.handleOnSwiped.bind(we(f)),f.handleScreenChange=f.handleScreenChange.bind(we(f)),f.handleSwiping=f.handleSwiping.bind(we(f)),f.handleThumbnailSwiping=f.handleThumbnailSwiping.bind(we(f)),f.handleOnThumbnailSwiped=f.handleOnThumbnailSwiped.bind(we(f)),f.onThumbnailMouseLeave=f.onThumbnailMouseLeave.bind(we(f)),f.handleImageError=f.handleImageError.bind(we(f)),f.pauseOrPlay=f.pauseOrPlay.bind(we(f)),f.renderThumbInner=f.renderThumbInner.bind(we(f)),f.renderItem=f.renderItem.bind(we(f)),f.slideLeft=f.slideLeft.bind(we(f)),f.slideRight=f.slideRight.bind(we(f)),f.toggleFullScreen=f.toggleFullScreen.bind(we(f)),f.togglePlay=f.togglePlay.bind(we(f)),f.unthrottledSlideToIndex=f.slideToIndex,f.slideToIndex=Te(f.unthrottledSlideToIndex,m.slideDuration,{trailing:!1}),m.lazyLoad&&(f.lazyLoaded=[]),f}return p=fe,E=[{key:"componentDidMount",value:function(){var m=this.props,f=m.autoPlay,I=m.useWindowKeyDown;f&&this.play(),I?window.addEventListener("keydown",this.handleKeyDown):this.imageGallery.current.addEventListener("keydown",this.handleKeyDown),window.addEventListener("mousedown",this.handleMouseDown),window.addEventListener("touchmove",this.handleTouchMove,{passive:!1}),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),this.addScreenChangeEvent()}},{key:"componentDidUpdate",value:function(m,f){var I=this.props,M=I.items,W=I.lazyLoad,B=I.slideDuration,le=I.slideInterval,ae=I.startIndex,de=I.thumbnailPosition,V=I.showThumbnails,G=I.useWindowKeyDown,J=this.state,re=J.currentIndex,he=J.isPlaying,ye=m.items.length!==M.length,Ne=!pt()(m.items,M),at=m.startIndex!==ae,tt=m.thumbnailPosition!==de,qe=m.showThumbnails!==V;le===m.slideInterval&&B===m.slideDuration||he&&(this.pause(),this.play()),tt&&(this.removeResizeObserver(),this.initSlideWrapperResizeObserver(this.imageGallerySlideWrapper),this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper)),qe&&V&&this.initThumbnailWrapperResizeObserver(this.thumbnailsWrapper),qe&&!V&&this.removeThumbnailsResizeObserver(),(ye||qe)&&this.handleResize(),f.currentIndex!==re&&this.slideThumbnailBar(),m.slideDuration!==B&&(this.slideToIndex=Te(this.unthrottledSlideToIndex,B,{trailing:!1})),!W||m.lazyLoad&&!Ne||(this.lazyLoaded=[]),G!==m.useWindowKeyDown&&(G?(this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown),window.addEventListener("keydown",this.handleKeyDown)):(window.removeEventListener("keydown",this.handleKeyDown),this.imageGallery.current.addEventListener("keydown",this.handleKeyDown))),(at||Ne)&&this.setState({currentIndex:ae,slideStyle:{transition:"none"}})}},{key:"componentWillUnmount",value:function(){var m=this.props.useWindowKeyDown;window.removeEventListener("mousedown",this.handleMouseDown),window.removeEventListener("touchmove",this.handleTouchMove),this.removeScreenChangeEvent(),this.removeResizeObserver(),this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null),this.transitionTimer&&window.clearTimeout(this.transitionTimer),m?window.removeEventListener("keydown",this.handleKeyDown):this.imageGallery.current.removeEventListener("keydown",this.handleKeyDown)}},{key:"onSliding",value:function(){var m=this,f=this.state,I=f.currentIndex,M=f.isTransitioning,W=this.props,B=W.onSlide,le=W.slideDuration;this.transitionTimer=window.setTimeout(function(){M&&(m.setState({isTransitioning:!M,isSwipingThumbnail:!1}),B&&B(I))},le+50)}},{key:"onThumbnailClick",value:function(m,f){var I=this.props,M=I.onThumbnailClick,W=I.items,B=this.state.currentIndex;m.target.parentNode.parentNode.blur(),B!==f&&(W.length===2?this.slideToIndexWithStyleReset(f,m):this.slideToIndex(f,m)),M&&M(m,f)}},{key:"onThumbnailMouseOver",value:function(m,f){var I=this;this.thumbnailMouseOverTimer&&(window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null),this.thumbnailMouseOverTimer=window.setTimeout(function(){I.slideToIndex(f),I.pause()},300)}},{key:"onThumbnailMouseLeave",value:function(){if(this.thumbnailMouseOverTimer){var m=this.props.autoPlay;window.clearTimeout(this.thumbnailMouseOverTimer),this.thumbnailMouseOverTimer=null,m&&this.play()}}},{key:"setThumbsTranslate",value:function(m){this.setState({thumbsTranslate:m})}},{key:"setModalFullscreen",value:function(m){var f=this.props.onScreenChange;this.setState({modalFullscreen:m}),f&&f(m)}},{key:"getThumbsTranslate",value:function(m){var f,I=this.props,M=I.disableThumbnailScroll,W=I.items,B=this.state,le=B.thumbnailsWrapperWidth,ae=B.thumbnailsWrapperHeight,de=this.thumbnails&&this.thumbnails.current;if(M)return 0;if(de){if(this.isThumbnailVertical()){if(de.scrollHeight<=ae)return 0;f=de.scrollHeight-ae}else{if(de.scrollWidth<=le||le<=0)return 0;f=de.scrollWidth-le}return m*(f/(W.length-1))}return 0}},{key:"getThumbnailPositionClassName",value:function(m){switch(m){case"left":m=" ".concat("image-gallery-thumbnails-left");break;case"right":m=" ".concat("image-gallery-thumbnails-right");break;case"bottom":m=" ".concat("image-gallery-thumbnails-bottom");break;case"top":m=" ".concat("image-gallery-thumbnails-top")}return m}},{key:"getAlignmentClassName",value:function(m){var f=this.state.currentIndex,I=this.props,M=I.infinite,W=I.items,B="",le="image-gallery-left",ae="image-gallery-right";switch(m){case f-1:B=" ".concat(le);break;case f:B=" ".concat("image-gallery-center");break;case f+1:B=" ".concat(ae)}return W.length>=3&&M&&(m===0&&f===W.length-1?B=" ".concat(ae):m===W.length-1&&f===0&&(B=" ".concat(le))),B}},{key:"getTranslateXForTwoSlide",value:function(m){var f=this.state,I=f.currentIndex,M=f.currentSlideOffset,W=f.previousIndex,B=I!==W,le=m===0&&W===0,ae=m===1&&W===1,de=m===0&&I===1,V=m===1&&I===0,G=M===0,J=-100*I+100*m+M;return M>0?this.direction="left":M<0&&(this.direction="right"),V&&M>0&&(J=-100+M),de&&M<0&&(J=100+M),B?le&&G&&this.direction==="left"?J=100:ae&&G&&this.direction==="right"&&(J=-100):(V&&G&&this.direction==="left"&&(J=-100),de&&G&&this.direction==="right"&&(J=100)),J}},{key:"getThumbnailBarHeight",value:function(){return this.isThumbnailVertical()?{height:this.state.gallerySlideWrapperHeight}:{}}},{key:"getSlideStyle",value:function(m){var f=this.state,I=f.currentIndex,M=f.currentSlideOffset,W=f.slideStyle,B=this.props,le=B.infinite,ae=B.items,de=B.useTranslate3D,V=B.isRTL,G=-100*I,J=ae.length-1,re=(G+100*m)*(V?-1:1)+M;le&&ae.length>2&&(I===0&&m===J?re=-100*(V?-1:1)+M:I===J&&m===0&&(re=100*(V?-1:1)+M)),le&&ae.length===2&&(re=this.getTranslateXForTwoSlide(m));var he="translate(".concat(re,"%, 0)");return de&&(he="translate3d(".concat(re,"%, 0, 0)")),on({display:this.isSlideVisible(m)?"inherit":"none",WebkitTransform:he,MozTransform:he,msTransform:he,OTransform:he,transform:he},W)}},{key:"getCurrentIndex",value:function(){return this.state.currentIndex}},{key:"getThumbnailStyle",value:function(){var m,f=this.props,I=f.useTranslate3D,M=f.isRTL,W=this.state,B=W.thumbsTranslate,le=W.thumbsStyle,ae=M?-1*B:B;return this.isThumbnailVertical()?(m="translate(0, ".concat(B,"px)"),I&&(m="translate3d(0, ".concat(B,"px, 0)"))):(m="translate(".concat(ae,"px, 0)"),I&&(m="translate3d(".concat(ae,"px, 0, 0)"))),on({WebkitTransform:m,MozTransform:m,msTransform:m,OTransform:m,transform:m},le)}},{key:"getSlideItems",value:function(){var m=this,f=this.state.currentIndex,I=this.props,M=I.items,W=I.slideOnThumbnailOver,B=I.onClick,le=I.lazyLoad,ae=I.onTouchMove,de=I.onTouchEnd,V=I.onTouchStart,G=I.onMouseOver,J=I.onMouseLeave,re=I.renderItem,he=I.renderThumbInner,ye=I.showThumbnails,Ne=I.showBullets,at=[],tt=[],qe=[];return M.forEach(function(Pe,be){var $t=m.getAlignmentClassName(be),_n=Pe.originalClass?" ".concat(Pe.originalClass):"",Nn=Pe.thumbnailClass?" ".concat(Pe.thumbnailClass):"",Nt=Pe.renderItem||re||m.renderItem,ln=Pe.renderThumbInner||he||m.renderThumbInner,Rt=!le||$t||m.lazyLoaded[be];Rt&&le&&!m.lazyLoaded[be]&&(m.lazyLoaded[be]=!0);var En=m.getSlideStyle(be),An=s().createElement("div",{"aria-label":"Go to Slide ".concat(be+1),key:"slide-".concat(be),tabIndex:"-1",className:"image-gallery-slide ".concat($t," ").concat(_n),style:En,onClick:B,onKeyUp:m.handleSlideKeyUp,onTouchMove:ae,onTouchEnd:de,onTouchStart:V,onMouseOver:G,onFocus:G,onMouseLeave:J,role:"button"},Rt?Nt(Pe):s().createElement("div",{style:{height:"100%"}}));if(at.push(An),ye&&Pe.thumbnail){var Sn=v("image-gallery-thumbnail",Nn,{active:f===be});tt.push(s().createElement("button",{key:"thumbnail-".concat(be),type:"button",tabIndex:"0","aria-pressed":f===be?"true":"false","aria-label":"Go to Slide ".concat(be+1),className:Sn,onMouseLeave:W?m.onThumbnailMouseLeave:null,onMouseOver:function(ct){return m.handleThumbnailMouseOver(ct,be)},onFocus:function(ct){return m.handleThumbnailMouseOver(ct,be)},onKeyUp:function(ct){return m.handleThumbnailKeyUp(ct,be)},onClick:function(ct){return m.onThumbnailClick(ct,be)}},ln(Pe)))}if(Ne){var Dn=v("image-gallery-bullet",Pe.bulletClass,{active:f===be});qe.push(s().createElement("button",{type:"button",key:"bullet-".concat(be),className:Dn,onClick:function(ct){return m.onBulletClick(ct,be)},"aria-pressed":f===be?"true":"false","aria-label":"Go to Slide ".concat(be+1)}))}}),{slides:at,thumbnails:tt,bullets:qe}}},{key:"ignoreIsTransitioning",value:function(){var m=this.props.items,f=this.state,I=f.previousIndex,M=f.currentIndex,W=m.length-1;return Math.abs(I-M)>1&&!(I===0&&M===W)&&!(I===W&&M===0)}},{key:"isFirstOrLastSlide",value:function(m){return m===this.props.items.length-1||m===0}},{key:"slideIsTransitioning",value:function(m){var f=this.state,I=f.isTransitioning,M=f.previousIndex,W=f.currentIndex;return I&&!(m===M||m===W)}},{key:"isSlideVisible",value:function(m){return!this.slideIsTransitioning(m)||this.ignoreIsTransitioning()&&!this.isFirstOrLastSlide(m)}},{key:"slideThumbnailBar",value:function(){var m=this.state,f=m.currentIndex,I=m.isSwipingThumbnail,M=-this.getThumbsTranslate(f);I||(f===0?this.setState({thumbsTranslate:0,thumbsSwipedTranslate:0}):this.setState({thumbsTranslate:M,thumbsSwipedTranslate:M}))}},{key:"canSlide",value:function(){return this.props.items.length>=2}},{key:"canSlideLeft",value:function(){return this.props.infinite||this.canSlidePrevious()}},{key:"canSlideRight",value:function(){return this.props.infinite||this.canSlideNext()}},{key:"canSlidePrevious",value:function(){return this.state.currentIndex>0}},{key:"canSlideNext",value:function(){return this.state.currentIndex<this.props.items.length-1}},{key:"handleSwiping",value:function(m){var f=m.event,I=m.absX,M=m.dir,W=this.props,B=W.disableSwipe,le=W.stopPropagation,ae=this.state,de=ae.galleryWidth,V=ae.isTransitioning,G=ae.swipingUpDown,J=ae.swipingLeftRight;if(M!==Tt&&M!==st&&!G||J){if(M!==ot&&M!==bt||J||this.setState({swipingLeftRight:!0}),!B){var re=this.props.swipingTransitionDuration;if(le&&f.preventDefault(),V)this.setState({currentSlideOffset:0});else{var he=M===bt?1:-1,ye=I/de*100;Math.abs(ye)>=100&&(ye=100);var Ne={transition:"transform ".concat(re,"ms ease-out")};this.setState({currentSlideOffset:he*ye,slideStyle:Ne})}}}else G||this.setState({swipingUpDown:!0})}},{key:"handleThumbnailSwiping",value:function(m){var f=m.event,I=m.absX,M=m.absY,W=m.dir,B=this.props,le=B.stopPropagation,ae=B.swipingThumbnailTransitionDuration,de=this.state,V=de.thumbsSwipedTranslate,G=de.thumbnailsWrapperHeight,J=de.thumbnailsWrapperWidth,re=de.swipingUpDown,he=de.swipingLeftRight;if(this.isThumbnailVertical()){if((W===ot||W===bt||he)&&!re)return void(he||this.setState({swipingLeftRight:!0}));W!==Tt&&W!==st||re||this.setState({swipingUpDown:!0})}else{if((W===Tt||W===st||re)&&!he)return void(re||this.setState({swipingUpDown:!0}));W!==ot&&W!==bt||he||this.setState({swipingLeftRight:!0})}var ye,Ne,at,tt,qe,Pe=this.thumbnails&&this.thumbnails.current;if(this.isThumbnailVertical()?(ye=V+(W===st?M:-M),Ne=Pe.scrollHeight-G+20,at=Math.abs(ye)>Ne,tt=ye>20,qe=Pe.scrollHeight<=G):(ye=V+(W===bt?I:-I),Ne=Pe.scrollWidth-J+20,at=Math.abs(ye)>Ne,tt=ye>20,qe=Pe.scrollWidth<=J),!qe&&(W!==ot&&W!==Tt||!at)&&(W!==bt&&W!==st||!tt)){le&&f.stopPropagation();var be={transition:"transform ".concat(ae,"ms ease-out")};this.setState({thumbsTranslate:ye,thumbsStyle:be})}}},{key:"handleOnThumbnailSwiped",value:function(){var m=this.state.thumbsTranslate,f=this.props.slideDuration;this.resetSwipingDirection(),this.setState({isSwipingThumbnail:!0,thumbsSwipedTranslate:m,thumbsStyle:{transition:"all ".concat(f,"ms ease-out")}})}},{key:"sufficientSwipe",value:function(){var m=this.state.currentSlideOffset,f=this.props.swipeThreshold;return Math.abs(m)>f}},{key:"resetSwipingDirection",value:function(){var m=this.state,f=m.swipingUpDown,I=m.swipingLeftRight;f&&this.setState({swipingUpDown:!1}),I&&this.setState({swipingLeftRight:!1})}},{key:"handleOnSwiped",value:function(m){var f=m.event,I=m.dir,M=m.velocity,W=this.props,B=W.disableSwipe,le=W.stopPropagation,ae=W.flickThreshold;if(!B){var de=this.props.isRTL;le&&f.stopPropagation(),this.resetSwipingDirection();var V=(I===ot?1:-1)*(de?-1:1),G=M>ae&&!(I===Tt||I===st);this.handleOnSwipedTo(V,G)}}},{key:"handleOnSwipedTo",value:function(m,f){var I=this.state,M=I.currentIndex,W=I.isTransitioning,B=M;!this.sufficientSwipe()&&!f||W||(B+=m),(m===-1&&!this.canSlideLeft()||m===1&&!this.canSlideRight())&&(B=M),this.unthrottledSlideToIndex(B)}},{key:"handleTouchMove",value:function(m){this.state.swipingLeftRight&&m.preventDefault()}},{key:"handleMouseDown",value:function(){this.imageGallery.current.classList.add("image-gallery-using-mouse")}},{key:"handleKeyDown",value:function(m){var f=this.props,I=f.disableKeyDown,M=f.useBrowserFullscreen,W=this.state.isFullscreen;if(this.imageGallery.current.classList.remove("image-gallery-using-mouse"),!I)switch(parseInt(m.keyCode||m.which||0,10)){case 37:this.canSlideLeft()&&!this.playPauseIntervalId&&this.slideLeft(m);break;case 39:this.canSlideRight()&&!this.playPauseIntervalId&&this.slideRight(m);break;case 27:W&&!M&&this.exitFullScreen()}}},{key:"handleImageError",value:function(m){var f=this.props.onErrorImageURL;f&&m.target.src.indexOf(f)===-1&&(m.target.src=f)}},{key:"removeThumbnailsResizeObserver",value:function(){this.resizeThumbnailWrapperObserver&&this.thumbnailsWrapper&&this.thumbnailsWrapper.current&&(this.resizeThumbnailWrapperObserver.unobserve(this.thumbnailsWrapper.current),this.resizeThumbnailWrapperObserver=null)}},{key:"removeResizeObserver",value:function(){this.resizeSlideWrapperObserver&&this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&(this.resizeSlideWrapperObserver.unobserve(this.imageGallerySlideWrapper.current),this.resizeSlideWrapperObserver=null),this.removeThumbnailsResizeObserver()}},{key:"handleResize",value:function(){var m=this.state.currentIndex;this.imageGallery&&(this.imageGallery&&this.imageGallery.current&&this.setState({galleryWidth:this.imageGallery.current.offsetWidth}),this.imageGallerySlideWrapper&&this.imageGallerySlideWrapper.current&&this.setState({gallerySlideWrapperHeight:this.imageGallerySlideWrapper.current.offsetHeight}),this.setThumbsTranslate(-this.getThumbsTranslate(m)))}},{key:"initSlideWrapperResizeObserver",value:function(m){var f=this;m&&!m.current||(this.resizeSlideWrapperObserver=new Ze(K(function(I){I&&I.forEach(function(M){f.setState({thumbnailsWrapperWidth:M.contentRect.width},f.handleResize)})},50)),this.resizeSlideWrapperObserver.observe(m.current))}},{key:"initThumbnailWrapperResizeObserver",value:function(m){var f=this;m&&!m.current||(this.resizeThumbnailWrapperObserver=new Ze(K(function(I){I&&I.forEach(function(M){f.setState({thumbnailsWrapperHeight:M.contentRect.height},f.handleResize)})},50)),this.resizeThumbnailWrapperObserver.observe(m.current))}},{key:"toggleFullScreen",value:function(){this.state.isFullscreen?this.exitFullScreen():this.fullScreen()}},{key:"togglePlay",value:function(){this.playPauseIntervalId?this.pause():this.play()}},{key:"handleScreenChange",value:function(){var m=this.props,f=m.onScreenChange,I=m.useBrowserFullscreen,M=document.fullscreenElement||document.msFullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement,W=this.imageGallery.current===M;f&&f(W),I&&this.setState({isFullscreen:W})}},{key:"slideToIndex",value:function(m,f){var I=this.state,M=I.currentIndex,W=I.isTransitioning,B=this.props,le=B.items,ae=B.slideDuration,de=B.onBeforeSlide;if(!W){f&&this.playPauseIntervalId&&(this.pause(!1),this.play(!1));var V=le.length-1,G=m;m<0?G=V:m>V&&(G=0),de&&G!==M&&de(G),this.setState({previousIndex:M,currentIndex:G,isTransitioning:G!==M,currentSlideOffset:0,slideStyle:{transition:"all ".concat(ae,"ms ease-out")}},this.onSliding)}}},{key:"slideLeft",value:function(m){var f=this.props.isRTL;this.slideTo(m,f?"right":"left")}},{key:"slideRight",value:function(m){var f=this.props.isRTL;this.slideTo(m,f?"left":"right")}},{key:"slideTo",value:function(m,f){var I=this.state,M=I.currentIndex,W=I.isTransitioning,B=this.props.items,le=M+(f==="left"?-1:1);W||(B.length===2?this.slideToIndexWithStyleReset(le,m):this.slideToIndex(le,m))}},{key:"slideToIndexWithStyleReset",value:function(m,f){var I=this,M=this.state,W=M.currentIndex,B=M.currentSlideOffset;this.setState({currentSlideOffset:B+(W>m?.001:-.001),slideStyle:{transition:"none"}},function(){window.setTimeout(function(){return I.slideToIndex(m,f)},25)})}},{key:"handleThumbnailMouseOver",value:function(m,f){this.props.slideOnThumbnailOver&&this.onThumbnailMouseOver(m,f)}},{key:"handleThumbnailKeyUp",value:function(m,f){Xi(m)&&this.onThumbnailClick(m,f)}},{key:"handleSlideKeyUp",value:function(m){Xi(m)&&(0,this.props.onClick)(m)}},{key:"isThumbnailVertical",value:function(){var m=this.props.thumbnailPosition;return m==="left"||m==="right"}},{key:"addScreenChangeEvent",value:function(){var m=this;Hi.forEach(function(f){document.addEventListener(f,m.handleScreenChange)})}},{key:"removeScreenChangeEvent",value:function(){var m=this;Hi.forEach(function(f){document.removeEventListener(f,m.handleScreenChange)})}},{key:"fullScreen",value:function(){var m=this.props.useBrowserFullscreen,f=this.imageGallery.current;m?f.requestFullscreen?f.requestFullscreen():f.msRequestFullscreen?f.msRequestFullscreen():f.mozRequestFullScreen?f.mozRequestFullScreen():f.webkitRequestFullscreen?f.webkitRequestFullscreen():this.setModalFullscreen(!0):this.setModalFullscreen(!0),this.setState({isFullscreen:!0})}},{key:"exitFullScreen",value:function(){var m=this.state.isFullscreen,f=this.props.useBrowserFullscreen;m&&(f?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():this.setModalFullscreen(!1):this.setModalFullscreen(!1),this.setState({isFullscreen:!1}))}},{key:"pauseOrPlay",value:function(){var m=this.props.infinite,f=this.state.currentIndex;m||this.canSlideRight()?this.slideToIndex(f+1):this.pause()}},{key:"play",value:function(){var m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],f=this.props,I=f.onPlay,M=f.slideInterval,W=f.slideDuration,B=this.state.currentIndex;this.playPauseIntervalId||(this.setState({isPlaying:!0}),this.playPauseIntervalId=window.setInterval(this.pauseOrPlay,Math.max(M,W)),I&&m&&I(B))}},{key:"pause",value:function(){var m=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],f=this.props.onPause,I=this.state.currentIndex;this.playPauseIntervalId&&(window.clearInterval(this.playPauseIntervalId),this.playPauseIntervalId=null,this.setState({isPlaying:!1}),f&&m&&f(I))}},{key:"isImageLoaded",value:function(m){return!!this.loadedImages[m.original]||(this.loadedImages[m.original]=!0,!1)}},{key:"handleImageLoaded",value:function(m,f){var I=this.props.onImageLoad;!this.loadedImages[f]&&I&&(this.loadedImages[f]=!0,I(m))}},{key:"renderItem",value:function(m){var f=this.state.isFullscreen,I=this.props.onImageError||this.handleImageError;return s().createElement(T,{description:m.description,fullscreen:m.fullscreen,handleImageLoaded:this.handleImageLoaded,isFullscreen:f,onImageError:I,original:m.original,originalAlt:m.originalAlt,originalHeight:m.originalHeight,originalWidth:m.originalWidth,originalTitle:m.originalTitle,sizes:m.sizes,loading:m.loading,srcSet:m.srcSet})}},{key:"renderThumbInner",value:function(m){var f=this.props.onThumbnailError||this.handleImageError;return s().createElement("span",{className:"image-gallery-thumbnail-inner"},s().createElement("img",{className:"image-gallery-thumbnail-image",src:m.thumbnail,height:m.thumbnailHeight,width:m.thumbnailWidth,alt:m.thumbnailAlt,title:m.thumbnailTitle,loading:m.thumbnailLoading,onError:f}),m.thumbnailLabel&&s().createElement("div",{className:"image-gallery-thumbnail-label"},m.thumbnailLabel))}},{key:"render",value:function(){var m=this.state,f=m.currentIndex,I=m.isFullscreen,M=m.modalFullscreen,W=m.isPlaying,B=this.props,le=B.additionalClass,ae=B.disableThumbnailSwipe,de=B.indexSeparator,V=B.isRTL,G=B.items,J=B.thumbnailPosition,re=B.renderFullscreenButton,he=B.renderCustomControls,ye=B.renderLeftNav,Ne=B.renderRightNav,at=B.showBullets,tt=B.showFullscreenButton,qe=B.showIndex,Pe=B.showThumbnails,be=B.showNav,$t=B.showPlayButton,_n=B.renderPlayPauseButton,Nn=this.getThumbnailStyle(),Nt=this.getSlideItems(),ln=Nt.slides,Rt=Nt.thumbnails,En=Nt.bullets,An=v("image-gallery-slide-wrapper",this.getThumbnailPositionClassName(J),{"image-gallery-rtl":V}),Sn=s().createElement("div",{ref:this.imageGallerySlideWrapper,className:An},he&&he(),this.canSlide()?s().createElement(s().Fragment,null,be&&s().createElement(s().Fragment,null,ye(this.slideLeft,!this.canSlideLeft()),Ne(this.slideRight,!this.canSlideRight())),s().createElement(et,{className:"image-gallery-swipe",delta:0,onSwiping:this.handleSwiping,onSwiped:this.handleOnSwiped},s().createElement("div",{className:"image-gallery-slides"},ln))):s().createElement("div",{className:"image-gallery-slides"},ln),$t&&_n(this.togglePlay,W),at&&s().createElement("div",{className:"image-gallery-bullets"},s().createElement("div",{className:"image-gallery-bullets-container",role:"navigation","aria-label":"Bullet Navigation"},En)),tt&&re(this.toggleFullScreen,I),qe&&s().createElement("div",{className:"image-gallery-index"},s().createElement("span",{className:"image-gallery-index-current"},f+1),s().createElement("span",{className:"image-gallery-index-separator"},de),s().createElement("span",{className:"image-gallery-index-total"},G.length))),Dn=v("image-gallery",le,{"fullscreen-modal":M}),ct=v("image-gallery-content",this.getThumbnailPositionClassName(J),{fullscreen:I}),Ca=v("image-gallery-thumbnails-wrapper",this.getThumbnailPositionClassName(J),{"thumbnails-wrapper-rtl":!this.isThumbnailVertical()&&V},{"thumbnails-swipe-horizontal":!this.isThumbnailVertical()&&!ae},{"thumbnails-swipe-vertical":this.isThumbnailVertical()&&!ae});return s().createElement("div",{ref:this.imageGallery,className:Dn,"aria-live":"polite"},s().createElement("div",{className:ct},(J==="bottom"||J==="right")&&Sn,Pe&&Rt.length>0?s().createElement(et,{className:Ca,delta:0,onSwiping:!ae&&this.handleThumbnailSwiping,onSwiped:!ae&&this.handleOnThumbnailSwiped},s().createElement("div",{className:"image-gallery-thumbnails",ref:this.thumbnailsWrapper,style:this.getThumbnailBarHeight()},s().createElement("nav",{ref:this.thumbnails,className:"image-gallery-thumbnails-container",style:Nn,"aria-label":"Thumbnail Navigation"},Rt))):null,(J==="top"||J==="left")&&Sn))}}],E&&Ln(p.prototype,E),Object.defineProperty(p,"prototype",{writable:!1}),fe}(s().Component);wr.propTypes={flickThreshold:P.number,items:(0,P.arrayOf)((0,P.shape)({bulletClass:P.string,bulletOnClick:P.func,description:P.string,original:P.string,originalHeight:P.number,originalWidth:P.number,loading:P.string,thumbnailHeight:P.number,thumbnailWidth:P.number,thumbnailLoading:P.string,fullscreen:P.string,originalAlt:P.string,originalTitle:P.string,thumbnail:P.string,thumbnailAlt:P.string,thumbnailLabel:P.string,thumbnailTitle:P.string,originalClass:P.string,thumbnailClass:P.string,renderItem:P.func,renderThumbInner:P.func,imageSet:ka,srcSet:P.string,sizes:P.string})).isRequired,showNav:P.bool,autoPlay:P.bool,lazyLoad:P.bool,infinite:P.bool,showIndex:P.bool,showBullets:P.bool,showThumbnails:P.bool,showPlayButton:P.bool,showFullscreenButton:P.bool,disableThumbnailScroll:P.bool,disableKeyDown:P.bool,disableSwipe:P.bool,disableThumbnailSwipe:P.bool,useBrowserFullscreen:P.bool,onErrorImageURL:P.string,indexSeparator:P.string,thumbnailPosition:(0,P.oneOf)(["top","bottom","left","right"]),startIndex:P.number,slideDuration:P.number,slideInterval:P.number,slideOnThumbnailOver:P.bool,swipeThreshold:P.number,swipingTransitionDuration:P.number,swipingThumbnailTransitionDuration:P.number,onSlide:P.func,onBeforeSlide:P.func,onScreenChange:P.func,onPause:P.func,onPlay:P.func,onClick:P.func,onImageLoad:P.func,onImageError:P.func,onTouchMove:P.func,onTouchEnd:P.func,onTouchStart:P.func,onMouseOver:P.func,onMouseLeave:P.func,onBulletClick:P.func,onThumbnailError:P.func,onThumbnailClick:P.func,renderCustomControls:P.func,renderLeftNav:P.func,renderRightNav:P.func,renderPlayPauseButton:P.func,renderFullscreenButton:P.func,renderItem:P.func,renderThumbInner:P.func,stopPropagation:P.bool,additionalClass:P.string,useTranslate3D:P.bool,isRTL:P.bool,useWindowKeyDown:P.bool},wr.defaultProps={onErrorImageURL:"",additionalClass:"",showNav:!0,autoPlay:!1,lazyLoad:!1,infinite:!0,showIndex:!1,showBullets:!1,showThumbnails:!0,showPlayButton:!0,showFullscreenButton:!0,disableThumbnailScroll:!1,disableKeyDown:!1,disableSwipe:!1,disableThumbnailSwipe:!1,useTranslate3D:!0,isRTL:!1,useBrowserFullscreen:!0,flickThreshold:.4,stopPropagation:!1,indexSeparator:" / ",thumbnailPosition:"bottom",startIndex:0,slideDuration:450,swipingTransitionDuration:0,swipingThumbnailTransitionDuration:0,onSlide:null,onBeforeSlide:null,onScreenChange:null,onPause:null,onPlay:null,onClick:null,onImageLoad:null,onImageError:null,onTouchMove:null,onTouchEnd:null,onTouchStart:null,onMouseOver:null,onMouseLeave:null,onBulletClick:null,onThumbnailError:null,onThumbnailClick:null,renderCustomControls:null,renderThumbInner:null,renderItem:null,slideInterval:3e3,slideOnThumbnailOver:!1,swipeThreshold:30,renderLeftNav:function(g,p){return s().createElement(tn,{onClick:g,disabled:p})},renderRightNav:function(g,p){return s().createElement(xn,{onClick:g,disabled:p})},renderPlayPauseButton:function(g,p){return s().createElement(Bt,{onClick:g,isPlaying:p})},renderFullscreenButton:function(g,p){return s().createElement(Ge,{onClick:g,isFullscreen:p})},useWindowKeyDown:!0};const Ra=wr})(),d})())})(la);var ih=la.exports;const oh=ei(ih);function sh(){var e=new Map;function t(n){var r=n.root,o=n.rootMargin,u=n.threshold,d=e.get(r);d||(d=new Map,e.set(r,d));var h=JSON.stringify({rootMargin:o,threshold:u}),v=d.get(h);if(!v){var x=new Map,s=new IntersectionObserver(function(a){a.forEach(function(k){var y=x.get(k.target);y==null||y(k)})},{root:r,rootMargin:o,threshold:u});v={observer:s,entryCallbacks:x},d.set(h,v)}return{observe:function(k,y){var S,R;(S=v)==null||S.entryCallbacks.set(k,y),(R=v)==null||R.observer.observe(k)},unobserve:function(k){var y,S;(y=v)==null||y.entryCallbacks.delete(k),(S=v)==null||S.observer.unobserve(k)}}}return{getObserver:t}}var ah="0px",lh=[0],ch=sh();function uh(e){var t,n,r=(t=e==null?void 0:e.rootMargin)!=null?t:ah,o=(n=e==null?void 0:e.threshold)!=null?n:lh,u=N.useRef(null),d=N.useRef(null),h=N.useRef(null),v=N.useState(),x=v[0],s=v[1],a=N.useCallback(function(){var R=u.current;if(!R){s(void 0);return}var _=ch.getObserver({root:d.current,rootMargin:r,threshold:o});_.observe(R,function(D){s(D)}),h.current=_},[r,o]),k=N.useCallback(function(){var R=h.current,_=u.current;_&&(R==null||R.unobserve(_)),h.current=null},[]),y=N.useCallback(function(R){k(),u.current=R,a()},[a,k]),S=N.useCallback(function(R){k(),d.current=R,a()},[a,k]);return[y,{entry:x,rootRef:S}]}function Gr(){return Gr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gr.apply(this,arguments)}function dh(e){var t,n=uh(e),r=n[0],o=n[1],u=!!((t=o.entry)!=null&&t.isIntersecting),d=N.useState(u),h=d[0],v=d[1];return u&&!h&&v(!0),[r,Gr({},o,{isVisible:u,wasEverVisible:h})]}var hh=100;function ph(e){var t=e.loading,n=e.hasNextPage,r=e.onLoadMore,o=e.rootMargin,u=e.disabled,d=e.delayInMs,h=d===void 0?hh:d,v=dh({rootMargin:o}),x=v[0],s=v[1],a=s.rootRef,k=s.isVisible,y=!u&&!t&&k&&n;return N.useEffect(function(){if(y){var S=setTimeout(function(){r()},h);return function(){clearTimeout(S)}}},[r,y,h]),[x,{rootRef:a}]}const fh={width:24,height:24,body:'<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>'},mh={width:24,height:24,body:'<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M0 0h24v24H0z"/><path fill="currentColor" d="M18.333 2c1.96 0 3.56 1.537 3.662 3.472l.005.195v12.666c0 1.96-1.537 3.56-3.472 3.662l-.195.005H5.667a3.667 3.667 0 0 1-3.662-3.472L2 18.333V5.667c0-1.96 1.537-3.56 3.472-3.662L5.667 2h12.666zm-2.626 7.293a1 1 0 0 0-1.414 0L11 12.585l-1.293-1.292l-.094-.083a1 1 0 0 0-1.32 1.497l2 2l.094.083a1 1 0 0 0 1.32-.083l4-4l.083-.094a1 1 0 0 0-.083-1.32z"/></g>'};var Cr=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function Ir(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function ca(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function ua(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function gh(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,o=!0,u=0;u<n.length;u++)r.indexOf(n[u])===-1&&(o=!1);return o}var Bi={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":Cr?173:189,"=":Cr?61:187,";":Cr?59:186,"'":222,"[":219,"]":221,"\\":220},zt={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},Hr={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Ke={16:!1,18:!1,17:!1,91:!1},Me={};for(var nr=1;nr<20;nr++)Bi["f".concat(nr)]=111+nr;var Re=[],Io=!1,da="all",ha=[],xr=function(t){return Bi[t.toLowerCase()]||zt[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function pa(e){da=e||"all"}function Vn(){return da||"all"}function vh(){return Re.slice(0)}function yh(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function bh(e){return typeof e=="string"&&(e=xr(e)),Re.indexOf(e)!==-1}function xh(e,t){var n,r;e||(e=Vn());for(var o in Me)if(Object.prototype.hasOwnProperty.call(Me,o))for(n=Me[o],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;Vn()===e&&pa(t||"all")}function wh(e){var t=e.keyCode||e.which||e.charCode,n=Re.indexOf(t);if(n>=0&&Re.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Re.splice(0,Re.length),(t===93||t===224)&&(t=91),t in Ke){Ke[t]=!1;for(var r in zt)zt[r]===t&&(ht[r]=!1)}}function Eh(e){if(typeof e>"u")Object.keys(Me).forEach(function(d){return delete Me[d]});else if(Array.isArray(e))e.forEach(function(d){d.key&&Pr(d)});else if(typeof e=="object")e.key&&Pr(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=n[0],u=n[1];typeof o=="function"&&(u=o,o=""),Pr({key:e,scope:o,method:u,splitKey:"+"})}}var Pr=function(t){var n=t.key,r=t.scope,o=t.method,u=t.splitKey,d=u===void 0?"+":u,h=ua(n);h.forEach(function(v){var x=v.split(d),s=x.length,a=x[s-1],k=a==="*"?"*":xr(a);if(Me[k]){r||(r=Vn());var y=s>1?ca(zt,x):[];Me[k]=Me[k].filter(function(S){var R=o?S.method===o:!0;return!(R&&S.scope===r&&gh(S.mods,y))})}})};function Po(e,t,n,r){if(t.element===r){var o;if(t.scope===n||t.scope==="all"){o=t.mods.length>0;for(var u in Ke)Object.prototype.hasOwnProperty.call(Ke,u)&&(!Ke[u]&&t.mods.indexOf(+u)>-1||Ke[u]&&t.mods.indexOf(+u)===-1)&&(o=!1);(t.mods.length===0&&!Ke[16]&&!Ke[18]&&!Ke[17]&&!Ke[91]||o||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function Lo(e,t){var n=Me["*"],r=e.keyCode||e.which||e.charCode;if(ht.filter.call(this,e)){if((r===93||r===224)&&(r=91),Re.indexOf(r)===-1&&r!==229&&Re.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(S){var R=Hr[S];e[S]&&Re.indexOf(R)===-1?Re.push(R):!e[S]&&Re.indexOf(R)>-1?Re.splice(Re.indexOf(R),1):S==="metaKey"&&e[S]&&Re.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Re=Re.slice(Re.indexOf(R))))}),r in Ke){Ke[r]=!0;for(var o in zt)zt[o]===r&&(ht[o]=!0);if(!n)return}for(var u in Ke)Object.prototype.hasOwnProperty.call(Ke,u)&&(Ke[u]=e[Hr[u]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Re.indexOf(17)===-1&&Re.push(17),Re.indexOf(18)===-1&&Re.push(18),Ke[17]=!0,Ke[18]=!0);var d=Vn();if(n)for(var h=0;h<n.length;h++)n[h].scope===d&&(e.type==="keydown"&&n[h].keydown||e.type==="keyup"&&n[h].keyup)&&Po(e,n[h],d,t);if(r in Me){for(var v=0;v<Me[r].length;v++)if((e.type==="keydown"&&Me[r][v].keydown||e.type==="keyup"&&Me[r][v].keyup)&&Me[r][v].key){for(var x=Me[r][v],s=x.splitKey,a=x.key.split(s),k=[],y=0;y<a.length;y++)k.push(xr(a[y]));k.sort().join("")===Re.sort().join("")&&Po(e,x,d,t)}}}}function Sh(e){return ha.indexOf(e)>-1}function ht(e,t,n){Re=[];var r=ua(e),o=[],u="all",d=document,h=0,v=!1,x=!0,s="+",a=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(u=t.scope),t.element&&(d=t.element),t.keyup&&(v=t.keyup),t.keydown!==void 0&&(x=t.keydown),t.capture!==void 0&&(a=t.capture),typeof t.splitKey=="string"&&(s=t.splitKey)),typeof t=="string"&&(u=t);h<r.length;h++)e=r[h].split(s),o=[],e.length>1&&(o=ca(zt,e)),e=e[e.length-1],e=e==="*"?"*":xr(e),e in Me||(Me[e]=[]),Me[e].push({keyup:v,keydown:x,scope:u,mods:o,shortcut:r[h],method:n,key:r[h],splitKey:s,element:d});typeof d<"u"&&!Sh(d)&&window&&(ha.push(d),Ir(d,"keydown",function(k){Lo(k,d)},a),Io||(Io=!0,Ir(window,"focus",function(){Re=[]},a)),Ir(d,"keyup",function(k){Lo(k,d),wh(k)},a))}function Th(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Me).forEach(function(n){var r=Me[n].find(function(o){return o.scope===t&&o.shortcut===e});r&&r.method&&r.method()})}var Lr={setScope:pa,getScope:Vn,deleteScope:xh,getPressedKeyCodes:vh,isPressed:bh,filter:yh,trigger:Th,unbind:Eh,keyMap:Bi,modifier:zt,modifierMap:Hr};for(var _r in Lr)Object.prototype.hasOwnProperty.call(Lr,_r)&&(ht[_r]=Lr[_r]);if(typeof window<"u"){var jh=window.hotkeys;ht.noConflict=function(e){return e&&window.hotkeys===ht&&(window.hotkeys=jh),ht},window.hotkeys=ht}ht.filter=function(){return!0};var fa=function(t,n){var r=t.target,o=r&&r.tagName;return!!(o&&n&&n.includes(o))},Oh=function(t){return fa(t,["INPUT","TEXTAREA","SELECT"])};function kh(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var o=n||{},u=o.enableOnTags,d=o.filter,h=o.keyup,v=o.keydown,x=o.filterPreventDefault,s=x===void 0?!0:x,a=o.enabled,k=a===void 0?!0:a,y=o.enableOnContentEditable,S=y===void 0?!1:y,R=N.useRef(null),_=N.useCallback(function(D,H){var z,X;return d&&!d(D)?!s:Oh(D)&&!fa(D,u)||(z=D.target)!=null&&z.isContentEditable&&!S?!0:R.current===null||document.activeElement===R.current||(X=R.current)!=null&&X.contains(document.activeElement)?(t(D,H),!0):!1},r?[R,u,d].concat(r):[R,u,d]);return N.useEffect(function(){if(!k){ht.unbind(e,_);return}return h&&v!==!0&&(n.keydown=!1),ht(e,n||{},_),function(){return ht.unbind(e,_)}},[_,e,k]),R}ht.isPressed;const ma=N.createContext({open:!1,toggleOpen:e=>{}});function Rh({children:e}){const[t,n]=N.useState(!1),r=u=>{n(u??!u)},o=N.useMemo(()=>({open:t,toggleOpen:r}),[t]);return i.jsx(ma.Provider,{value:o,children:e})}function $i(){return N.useContext(ma)}const gt={nameAsc:"title",nameDesc:"title",popularity:"stats.downloads",publishAt:"lastPublishedAt",mobilePageSize:10,pageSize:18,currentPage:1,defaultCurrentPage:1,blockletsPath:"/api/v2/blocklets.json",categoriesPath:"/api/blocklets/categories",explorePath:"/api/blocklets/explore",exploreDidsPath:"/api/blocklets/dids",cacheSize:100},Ch=e=>Xn(async()=>{const{data:t}=await e.get(gt.categoriesPath);return Array.isArray(t)?t:[]},{manual:!0});function Ih(e,t){const n=e.menu?{sortBy:"popularity",sortDirection:"desc",showResources:"true",...Pl(e,["sortBy","sortDirection","showResources"])}:{sortBy:"popularity",sortDirection:"desc",showResources:"true",...e,menu:void 0},{onFilterChange:r,onSearchSelect:o=h=>{t.onFilterChange({...n,keyword:h.title})},emptyCategory:u}=t;!n.category&&!u&&(n.category="All");const d=h=>{const v={...n,...h};r(Er(v,x=>x===""||x===void 0))};return{filters:e,cleanFilter:h=>{const v=h?Er(n,(x,s)=>h.includes(s)):{};r(Er(v,x=>x===""||x===void 0))},handleActiveMenu:h=>{h!==e.menu&&r({menu:h})},handleSort:(h,v)=>{d({sortBy:h,sortDirection:v||h==="nameAsc"?"asc":"desc"})},handleKeyword:h=>{d({category:void 0,keyword:h||void 0})},handlePrice:h=>{d({price:h===e.price?void 0:h})},handleCategory:h=>{d({category:h===e.category?"":h})},handleDeveloper:h=>{d({owner:h||void 0})},handlePage:h=>{d({currentPage:h})},handleSwitchShowResources:h=>{d({showResources:h})},handleSearchSelect:h=>{o(h)}}}const Ph=(e,t,n)=>e&&t||!n,ga=e=>[{name:e("sort.popularity"),value:"popularity"},{name:e("sort.lastPublished"),value:"publishAt"}],va=(e,t,n)=>{var r,o;const u=Ll(e),d=_l(u.search);if((r=Nl(e,{strict:!0}))!=null&&r.endsWith(".gif"))return d.imageFilter?Al({...u,search:""}):e;if(d.imageFilter)return e;const h=n||((o=window.blocklet)==null?void 0:o.version),{w:v,h:x}=typeof t=="object"?{w:t.w,h:t.h}:{w:t,h:t};return si(e,{...v||x?{imageFilter:"resize",w:v,h:x}:{},v:h})},Lh=e=>[{name:e("blocklet.free"),value:"free"},{name:e("blocklet.payment"),value:"payment"}],_h=(e=[],t="en")=>e.map(n=>({name:n.locales[t]||n.locales.en,value:n._id})),Nh=(e,t)=>e==null?void 0:e.replace(/{(\w*)}/g,(n,r)=>t.hasOwnProperty(r)?t[r]:""),Ah=()=>window.innerWidth<=600,Dh={common:{title:"Blocklet Store",searchStore:"Search Blocklet",showResources:"Show extensions",price:"Price",category:"Category",categories:"Categories",resourceType:"Resource Type",clear:"Clear",cancel:"Cancel",search:"Search",fetchError:"Failed to fetch data, please try again later"},explore:{title:"Explore",trending:"Trending",topRated:"Top Rated",recentlyUpdated:"Recently Updated",viewDetail:"View Details"},sort:{sort:"Sort",rating:"Rating",popularity:"Most Popular",lastPublished:"Latest Published"},category:{all:"All",placeholder:"Category name",helperText:"Please select a category"},blocklet:{noResults:"No blocklet found.",free:"Free",search:'Results for "{keyword}"',authorTag:"Blocklet by {name}",resourceTag:"Extensions for {name}",resultCount:"{count} Blocklets",emptyTip:"Tips:",filterTip:"Appropriately reduce the filter conditions",keywordTip:"Try other keywords",owner:"Blocklets from {name}",noBlockletPart1:'No Blocklets associated with"',noBlockletPart2:'"were found',noCategoryResults1:'No "',noCategoryResults2:'" Blocklets'},autocomplete:{expandResult:'View all search results for "{name}"'}},Mh={common:{title:"Blocklet 商店",searchStore:"搜索 Blocklet",showResources:"显示扩展",price:"价格",category:"类别",categories:"类别",resourceType:"资源类型",clear:"清除",cancel:"取消",search:"搜索",fetchError:"获取数据失败, 请稍后再试"},explore:{title:"探索",trending:"趋势",topRated:"评分最高",recentlyUpdated:"最近更新",viewDetail:"查看详情"},sort:{sort:"排序",rating:"评分",popularity:"最热门",lastPublished:"最新发布"},category:{all:"全部",placeholder:"分类名称",helperText:"请选择分类"},blocklet:{noResults:"未搜索到 Blocklet",free:"免费",search:'搜索 "{keyword}" 的结果',authorTag:"{name} 的 Blocklet",resourceTag:"{name} 的拓展",resultCount:"{count} 个 Blocklet",emptyTip:"建议:",filterTip:"适当减少筛选条件",keywordTip:"尝试其他关键字",owner:"来自 {name} 的 Blocklets",noBlockletPart1:'没有找到与"',noBlockletPart2:'"相关的 Blocklets',noCategoryResults1:'无 "',noCategoryResults2:'" 类别的 Blocklets'},autocomplete:{expandResult:"查看 “{name}” 的所有搜索结果"}},Nr={en:to(Dh),zh:to(Mh)},ya=(e,t)=>{const n={};return e&&(n["x-blocklet-server-version"]=e),t&&(n["x-blocklet-store-version"]=t),n},Fh=e=>(t,n)=>{const r=Nr[e]?Nr[e][t]:Nr.en[t];return Nh(r,n)||t},ba={errors:{fetchCategoriesError:null},loadings:{fetchCategoriesLoading:!1},endpoint:"",wrapChildren:()=>null,t:e=>e,storeVersion:"",minItemWidth:350,serverVersion:"",layout:{},selectedCategory:void 0,categoryList:[],blockletRender:()=>null,locale:"en",categoryOptions:[],priceOptions:[],storeApi:null,baseSearch:!1,showResourcesSwitch:!1,showCategory:!1,tagFilters:[],developerName:"",onFilterChange:()=>{},updateDeveloperName:()=>{},getCategoryLocale:()=>null,search:{filters:{},cleanFilter:()=>{},handleActiveMenu:()=>{},handleSort:()=>{},handleKeyword:()=>{},handlePrice:()=>{},handleCategory:()=>{},handleDeveloper:()=>{},handleSwitchShowResources:()=>{},handleSearchSelect:()=>{},handlePage:()=>{}}},xa=N.createContext(ba),{Provider:Bh,Consumer:df}=xa;function $h(e){const{locale:t="zh",filters:n={},serverVersion:r="",onFilterChange:o=()=>{},minItemWidth:u=350,queryFilter:d=!0,layout:h={},wrapChildren:v=K=>K,extraFilter:x=K=>K,baseSearch:s=!1,fetchCategoryDelay:a=0,showResourcesSwitch:k=!1,showCategory:y=!0,tagFilters:S=[],children:R,storeVersion:_,onSearchSelect:D=()=>{},endpoint:H,blockletRender:z}=e,X=ya(r,_),O=N.useMemo(()=>rs({baseURL:H,headers:X}),[H]),q=Ih(n,{onFilterChange:o,emptyCategory:!h.showExplore,onSearchSelect:D}),[Z,F]=N.useState(""),{data:ce=[],error:Y,loading:oe,run:Se}=Ch(O),Fe=N.useMemo(()=>{const K=Il(ce,[ie=>ie.name],["asc"]),Te=K.findIndex(ie=>ie.name==="All"||ie.locales.en==="All");return Te>-1?[{...K[Te],_id:"All"},...K.slice(0,Te),...K.slice(Te+1)]:K},[ce]),$e=N.useCallback(Fh(t),[t]),it=N.useMemo(()=>_h(Fe,t),[Fe,t]),ee=Lh($e),pe={search:q,errors:{fetchCategoriesError:Y},loadings:{fetchCategoriesLoading:oe},extraFilter:x,endpoint:H,queryFilter:d,layout:{showExplore:h.showExplore??!1,showCategory:h.showCategory??!0,showTitle:h.showTitle??!0,showSearch:h.showSearch??!0},minItemWidth:u,wrapChildren:v,t:$e,storeVersion:_,serverVersion:r,selectedCategory:q.filters.category||(h.showExplore?"":"All"),categoryList:Fe,blockletRender:z,locale:t,categoryOptions:it,priceOptions:ee,storeApi:O,baseSearch:s,showResourcesSwitch:k,showCategory:y,tagFilters:S,onFilterChange:o,getCategoryLocale:K=>{if(!K)return null;const Te=ce.find(ie=>ie._id===K||ie.locales.en==="All");return Te?Te.locales[t]||Te.locales.en:null},get developerName(){return Z},updateDeveloperName:F};return N.useEffect(()=>{setTimeout(Se,a||0)},[H,Se,a]),i.jsx(Bh,{value:pe,children:R})}function rt(){return N.useContext(xa)||ba}function wa({children:e,onClick:t,size:n=32,...r}){return i.jsx(Hn,{...r,onClick:t,variant:"outlined",sx:[{minWidth:n,height:n,p:0,borderColor:"divider","&:hover":{borderColor:"divider"},borderRadius:2,color:"text.secondary"},...Array.isArray(r.sx)?r.sx:[r.sx]],children:e})}function rr(e,t){return e===void 0?t:e}function Ui({xs:e,sm:t,md:n,lg:r,xl:o,exact:u}){const d=Gn(),h=Wt(d.breakpoints.down("sm")),v=Wt(d.breakpoints.between("sm","md")),x=Wt(d.breakpoints.between("md","lg")),s=Wt(d.breakpoints.between("lg","xl"));if(u)return h?e||null:v?t||null:x?n||null:s?r||null:o||null;let a=e;return h||(a=rr(t,a),v)||(a=rr(n,a),x)||(a=rr(r,a),s)?a:rr(o,a)}function Uh({children:e}){const{open:t,toggleOpen:n}=$i();return i.jsx(Ui,{xs:i.jsx(Ua,{open:t,onClose:()=>n(!1),children:e}),md:i.jsx(Q,{children:e})})}const Wh=N.forwardRef(({loading:e,disabled:t,...n},r)=>i.jsx(Hn,{ref:r,disableElevation:!0,disabled:t||e,...n,sx:[{borderRadius:"4px"},...Array.isArray(n.sx)?n.sx:[n.sx]],startIcon:e&&i.jsx(vt,{size:"1em"})}));function Ea({value:e,options:t,onChange:n,placeholder:r,...o}){var u;const d=N.useRef(null),h=Gn(),[v,x]=N.useState(!1),[s,a]=N.useState(e!==null?e:""),k=Wt(h.breakpoints.down("sm"));N.useEffect(()=>{a(e!==null?e:"")},[e]);const y=N.useCallback(()=>{x(!1)},[]),S=N.useCallback(()=>{x(!0)},[]);function R(D){a(D.value),n(D.value),k&&y()}function _(D){return D===s}return i.jsxs(i.Fragment,{children:[i.jsxs(zh,{ref:d,onClick:S,variant:"outlined",size:"medium",className:["my-select__selector",Un(s)?"":"my-select__selector--active"].join(" "),sx:{minWidth:"auto",color:"text.primary",borderRadius:"8px"},...o,children:[((u=t.find(D=>D.value===s))==null?void 0:u.name)||r,i.jsx(Wa,{className:"my-select__arrowdown",component:aa,sx:{width:18,height:18}})]}),i.jsx(za,{open:v,anchorEl:d.current,transition:!0,sx:{zIndex:"9999"},children:({TransitionProps:D,placement:H})=>i.jsx(qa,{...D,style:{transformOrigin:H==="bottom"?"center top":"center bottom"},children:i.jsx(Ka,{children:i.jsx(Va,{onClickAway:y,children:i.jsx(qh,{autoFocusItem:v,onMouseEnter:S,onMouseLeave:y,children:t.map(z=>i.jsxs(Zr,{onClick:()=>R(z),sx:{fontSize:14},children:[i.jsx(os,{sx:{mr:1,fontSize:16,visibility:_(z.value)?"visible":"hidden"}}),z.name]},z.value))})})})})})]})}const zh=qt(Wh)`
|
|
486
|
+
border: 1px solid #f0f0f0;
|
|
487
|
+
padding: 6px 8px 6px 12px;
|
|
488
|
+
font-weight: ${e=>e.theme.typography.fontWeightRegular};
|
|
489
|
+
font-size: 14px;
|
|
490
|
+
color: #666;
|
|
491
|
+
line-height: 1;
|
|
492
|
+
text-transform: none;
|
|
493
|
+
& + & {
|
|
494
|
+
margin-left: 10px;
|
|
495
|
+
}
|
|
496
|
+
&.my-select__selector--active {
|
|
497
|
+
&,
|
|
498
|
+
.my-select__arrowdown,
|
|
499
|
+
}
|
|
500
|
+
.my-select__arrowdown {
|
|
501
|
+
color: #999;
|
|
502
|
+
font-size: 14px;
|
|
503
|
+
margin-left: 6px;
|
|
504
|
+
}
|
|
505
|
+
.my-select__icon {
|
|
506
|
+
font-size: 0;
|
|
507
|
+
svg {
|
|
508
|
+
color: #999;
|
|
509
|
+
font-size: 18px;
|
|
510
|
+
margin-right: 3px;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
`,qh=qt(Yo)`
|
|
514
|
+
.my-select__option__icon {
|
|
515
|
+
color: transparent;
|
|
516
|
+
font-size: 14px;
|
|
517
|
+
margin: 0 3px 0 -5px;
|
|
518
|
+
}
|
|
519
|
+
.my-select__option {
|
|
520
|
+
font-size: 14px;
|
|
521
|
+
color: #999;
|
|
522
|
+
}
|
|
523
|
+
.my-select__option--active {
|
|
524
|
+
&,
|
|
525
|
+
.my-select__option__icon {
|
|
526
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
`;function Sa(){const{search:e,t}=rt(),{filters:n,handleSort:r,handlePrice:o}=e,u=ga(t);return i.jsxs(nt,{direction:{xs:"row",md:"column"},alignItems:{xs:"center",md:"flex-start"},gap:{xs:1,md:2},width:{xs:"100%",md:"auto"},justifyContent:"space-between",children:[i.jsx(Jr,{control:i.jsx(Qr,{checked:n.price==="free",size:"small",sx:{"& .MuiSvgIcon-fontSizeSmall":{fontSize:16,color:"text.lighter"}},onChange:d=>o(d.target.checked?"free":"")}),label:t("blocklet.free")}),i.jsx(Ea,{value:n.sortBy||u[0].value,options:u,onChange:d=>r(d),placeholder:t("sort.sort")})]})}function Kh({menus:e}){const{selectedCategory:t,search:n,t:r,categoryOptions:o,loadings:u,layout:d,baseSearch:h}=rt(),{filters:v,handleActiveMenu:x,handleCategory:s,cleanFilter:a}=n,{toggleOpen:k}=$i();N.useEffect(()=>{k(!1)},[Object.values(v).join("")]);const y=Ph(h,d.showSearch,v.keyword);return d.showCategory?i.jsxs(Uh,{children:[i.jsx(Ui,{xs:i.jsxs(nt,{direction:"row",justifyContent:"space-between",alignItems:"center",p:2,mb:.5,gap:2,borderBottom:1,borderColor:"divider",children:[i.jsx(wa,{onClick:()=>k(!1),children:i.jsx(oi,{})}),i.jsx(me,{flex:1,variant:"body1",fontWeight:"fontWeightMedium",children:r("common.category")})]}),md:null}),i.jsx(nt,{visibility:u.fetchCategoriesLoading?"hidden":"visible",width:{xs:268,md:200},boxSizing:"content-box",p:{xs:2,md:0},pr:{md:6},children:y?i.jsxs(i.Fragment,{children:[d.showExplore&&i.jsxs(Q,{mb:3,pb:3,borderBottom:1,borderColor:"divider",children:[i.jsxs(Q,{display:"flex",alignItems:"center",gap:1,children:[i.jsx(lt,{icon:eh,width:20,height:20}),i.jsx(me,{variant:"body1",color:!t&&!v.menu?"text.primary":"text.lighter",fontWeight:!t&&!v.menu?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{k(!1),a()},children:r("explore.title")})]}),e==null?void 0:e.map(S=>i.jsxs(Q,{display:"flex",alignItems:"center",mt:2,gap:1,children:[typeof S.icon=="string"?i.jsx(lt,{icon:S.icon,width:20,height:20}):S.icon,i.jsx(me,{variant:"body1",color:v.menu===S.key?"text.primary":"text.lighter",fontWeight:v.menu===S.key?"fontWeightMedium":void 0,sx:{cursor:"pointer"},onClick:()=>{var R;k(!1),x(S.key),(R=S.onClick)==null||R.call(S)},children:S.title})]},S.key))]}),!!o.length&&i.jsx(nt,{gap:2,children:o.map(S=>i.jsx(me,{variant:"body1",title:S.name,sx:{cursor:"pointer"},"data-cy":"filter",color:t===S.value?"text.primary":"text.lighter",textTransform:"capitalize",onClick:()=>{t===S.value?a():s(S.value),k(!1)},children:S.name},S.value))})]}):i.jsx(Sa,{})})]}):null}function Wi(){const{endpoint:e,serverVersion:t,storeVersion:n}=rt(),r=ya(t,n),o=N.useMemo(()=>rs({baseURL:e,headers:r}),[e]);return{get:async u=>{const{data:d}=await o.get(u);return d},post:async(u,d)=>{const{data:h}=await o.post(u,d);return h}}}const Ta=N.memo(function(e){return i.jsx(Q,{height:60,display:"flex",alignItems:"center",justifyContent:"center",...e,children:i.jsx(vt,{})})});function _o({icon:e,children:t,maxWidth:n=100,title:r}){return(t===0||t)&&i.jsxs(nt,{direction:"row",alignItems:"center",gap:1,sx:{maxWidth:n,overflow:"hidden"},children:[e,i.jsx(me,{flex:1,variant:"body2",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:r||(typeof t=="string"?t:void 0),children:t})]})}const Vh=16/9,Ar=292,Xr=189,ur=336;function Gh(){var e,t;const{t:n,search:r}=rt(),{get:o}=Wi(),u=Gn(),d=Wt(u.breakpoints.down("md")),h=((t=(e=window.blocklet)==null?void 0:e.preferences)==null?void 0:t.homeBanner)||[],{data:v=[],error:x,loading:s}=Xn(async()=>{const D=await o(si(gt.blockletsPath,{didList:h.map(H=>H.did).join(",")}));return D!=null&&D.dataList?h.map(H=>D.dataList.find(z=>z.did===H.did)):[]});x&&console.error("Get Banner Blocklets error:",x);const a={position:"absolute",top:"50%",transform:"translateY(-50%)",zIndex:100,cursor:"pointer",color:"text.lighter"};return!x&&h.length>0?i.jsxs(i.Fragment,{children:[i.jsx(me,{component:"h2",variant:"h2",mt:{xs:2,md:0},mb:3,children:n("explore.title")}),i.jsx(Q,{height:{xs:"auto",md:Ar},minHeight:Ar,position:"relative",border:1,borderColor:"divider",borderRadius:3,overflow:"hidden",children:s?i.jsxs(Q,{p:5,display:{md:"flex"},gap:5,alignItems:"center",justifyContent:"center",children:[i.jsx(Ut,{variant:"rounded",height:Xr,width:ur}),i.jsxs(Q,{flex:1,height:"100%",children:[i.jsx(Ut,{variant:"text",height:50,width:100}),i.jsx(Ut,{variant:"text",height:40,width:"100%"}),i.jsx(Ut,{variant:"text",height:40,width:300}),i.jsxs(Q,{display:"flex",gap:1,my:2,children:[i.jsx(Ut,{variant:"circular",height:20,width:20}),i.jsx(Ut,{variant:"text",height:20,width:50})]}),i.jsx(Ut,{variant:"rounded",height:30,width:100})]})]}):i.jsx(oh,{showNav:!0,autoPlay:!0,slideDuration:d?500:1e3,slideInterval:5e3,showPlayButton:!1,showIndex:!1,showBullets:!1,showThumbnails:!1,showFullscreenButton:!1,renderLeftNav:D=>i.jsx(Q,{onClick:D,sx:{display:{xs:"none",md:"block"}},children:i.jsx(dc,{sx:{...a,left:5}})}),renderRightNav:D=>i.jsx(Q,{onClick:D,sx:{display:{xs:"none",md:"block"}},children:i.jsx(hc,{sx:{...a,right:5}})}),items:h.map((D,H)=>({original:D.did,renderItem:()=>{var z;const X=v[H]||{},O=D.cover||Xh(D.did,(z=X.screenshots)==null?void 0:z[0]),q=va(O,u.breakpoints.values.md*2);return i.jsxs(nt,{height:{xs:"auto",md:Ar},sx:{cursor:"pointer","&::before":{content:'""',position:"absolute",top:0,left:0,right:0,bottom:0,backgroundImage:`url("${q}")`,backgroundSize:"cover",filter:"blur(50px)",opacity:.15,zIndex:0}},display:"flex",direction:{xs:"column",md:"row"},justifyContent:"center",alignItems:{xs:"flex-start",md:"center"},p:{xs:2,md:5},onClick:()=>r.handleSearchSelect(X),gap:{xs:2,md:5},children:[k(q),i.jsxs(nt,{flex:1,height:"100%",gap:3,children:[i.jsxs(Q,{flex:1,children:[y(D.name||X.title||D.name),S(D.desc||X.description)]}),X.did&&R(X,D.baseNum),_(X)]})]})}}))})})]}):null;function k(D){return i.jsx(Q,{borderRadius:2,overflow:"hidden",position:"relative",width:{xs:"100%",md:ur},children:i.jsx(Yh,{url:D})})}function y(D){return i.jsx(me,{variant:"h2",width:"100%",children:D})}function S(D){return i.jsx(me,{variant:"body2",color:"text.secondary",textAlign:"left",width:"100%",minHeight:70,maxHeight:70,pt:1,sx:{display:"-webkit-box",lineClamp:3,WebkitLineClamp:3,maxHeight:71,textWrap:"wrap",overflow:"hidden",WebkitBoxOrient:"vertical"},children:D})}function R(D,H=0){const{did:z,owner:X,stats:O}=D;return i.jsxs(Q,{display:"flex",alignItems:"center",gap:2,color:"text.secondary",children:[i.jsx(_o,{icon:i.jsx(lr,{src:X.avatar,did:z,size:20,variant:"circle"}),children:X.fullName}),i.jsx(_o,{icon:i.jsx(lt,{icon:sa}),title:`${O.downloads+H}`,children:Hh(O.downloads+H)})]})}function _(D){return i.jsx(Hn,{variant:"outlined",size:"small",onClick:()=>r.handleSearchSelect(D),sx:{width:"fit-content",textTransform:"none",bgcolor:"white",borderRadius:"8px",borderColor:"divider","&:hover":{borderColor:"divider"}},children:n("explore.viewDetail")})}}const Hh=e=>Number.isNaN(e)?0:e<1e3?e:e<1e6?`${(e/1e3).toFixed(1)}k`:e<1e9?`${(e/1e6).toFixed(1)}m`:`${(e/1e9).toFixed(1)}b`,Xh=(e,t)=>e&&t?`/assets/${e}/screenshots/${t}`:"";function Yh({url:e}){const[t,n]=N.useState(!0);return i.jsxs(i.Fragment,{children:[t&&i.jsx(Ut,{variant:"rectangular",sx:{width:{xs:"100%",md:ur},height:{xs:"auto",md:Xr}}}),i.jsx(Q,{display:t?"none":"block",component:"img",src:e,alt:"",width:{xs:"100%",md:ur},height:{xs:"auto",md:Xr},borderRadius:2,border:1,borderColor:"divider",sx:{objectFit:"container",cursor:"pointer",aspectRatio:Vh},onLoad:()=>n(!1),onError:()=>n(!1)})]})}function Jh({title:e,blocklets:t}){const{blockletRender:n,serverVersion:r}=rt();return i.jsxs(Q,{mt:3,children:[i.jsx(me,{component:"h3",variant:"h3",sx:{mb:2},children:e}),i.jsx(Yi,{container:!0,spacing:2,boxSizing:"border-box",maxWidth:"calc(100vw - 16px)",children:t.map(o=>i.jsx(Yi,{item:!0,xs:12,md:6,p:"2px","data-blocklet-did":o.did,children:i.jsx(Q,{padding:"1px",children:n({blocklet:o,blocklets:t,serverVersion:r})})},o.did))})]})}function Qh(){const{get:e}=Wi(),{t}=rt(),{data:n=[],error:r,loading:o}=Xn(async()=>{const u=await e(gt.explorePath);return Array.isArray(u)?u:[]});return r?i.jsx(pr,{error:new Error(`Failed to fetch blocklets from ${gt.explorePath}`)}):o?i.jsx(Ta,{mt:15}):i.jsxs(i.Fragment,{children:[i.jsx(Gh,{}),n.map(u=>{var d;return((d=u.blocklets)==null?void 0:d.length)>0?i.jsx(Jh,{title:t(`explore.${u.type}`),blocklets:u.blocklets},u.type):null})]})}const Dr="__FREE_TEXT__",No="__NO_RESULT__",Mr=40;function Zh({endpoint:e,t,locale:n,filters:r,handleKeyword:o,handleSearchSelect:u,...d}){const h=N.useRef(null),v=N.useRef(!1),[x,s]=N.useState(!1),[a,k]=N.useState(""),[y,S]=N.useState(!1),R=Wi(),[_,D]=N.useState(!1),H=(d==null?void 0:d.placeholder)||t("common.searchStore"),z=async ee=>{D(!0);const pe=await R.get(qn(e,si(gt.blockletsPath,ee)));return D(!1),pe.dataList||[]},{data:X,run:O}=Xn(ee=>ee?z({sortBy:gt.nameDesc,page:1,pageSize:10,keyword:ee,showResources:"true"}):Promise.resolve([]),{manual:!0});N.useEffect(()=>{D(!0),O(r.keyword),k(r.keyword||"")},[r.keyword,O]),kh("ctrl + k, command + k",ee=>{var pe,K;return ee.stopPropagation(),ee.preventDefault(),(K=(pe=h.current)==null?void 0:pe.querySelector("input"))==null||K.focus(),!1},{enableOnTags:["INPUT"]});const q=us(ee=>O(ee),{wait:300}),Z={name:Dr,title:a,did:""};let F=[];return a&&(_?F=[Z]:X!=null&&X.length?F=[Z,...X]:F=[{name:No,title:t("blocklet.noResults"),did:""}]),i.jsxs(i.Fragment,{children:[i.jsxs(Ga,{fullScreen:!0,open:y,sx:{display:{md:"none"}},children:[i.jsxs(Q,{p:2,pb:0,display:"flex",alignItems:"center",gap:2,children:[i.jsx(Jo,{fullWidth:!0,sx:{bgcolor:"#F9FAFB",px:1,py:.5,".MuiInputBase-input":{p:1},".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},autoFocus:!0,placeholder:H,className:"bl-autocomplete-input",value:a,onChange:ee=>ce(ee.target.value),startAdornment:$e(y),endAdornment:it()}),i.jsx(Hn,{variant:"outlined",onClick:()=>{S(!1),k(r.keyword||"")},children:t("common.cancel")})]}),i.jsx(Yo,{sx:{p:.5},children:F.map(ee=>Se(ee))})]}),i.jsx(sr,{sx:{display:{sx:"block",md:"none"},fontSize:28,color:"text.lighter"},onClick:()=>S(!0)}),i.jsx(zo,{ref:h,open:!!a&&x,size:"small",onOpen:()=>s(!0),onClose:(ee,pe)=>{s(!1),pe==="selectOption"&&!v.current&&o(a)},onKeyDown:ee=>{ee.key==="Enter"&&!a&&Y()},disableClearable:!0,inputValue:a,onInputChange:(ee,pe)=>ce(pe),isOptionEqualToValue:(ee,pe)=>ee.name===pe.name,getOptionLabel:ee=>ee.title,getOptionKey:ee=>ee.name,noOptionsText:t("blocklet.noResults"),autoHighlight:!0,forcePopupIcon:!1,slotProps:{paper:{sx:{mt:.5,minWidth:"100%",width:"fit-content","& > ul":{p:.5}}}},renderInput:ee=>i.jsx(dr,{...ee,InputProps:{...ee.InputProps,autoFocus:!0,placeholder:H,className:"bl-autocomplete-input",value:a,startAdornment:$e(x),endAdornment:it()}}),filterOptions:ee=>ee,...d,options:F,renderOption:(ee,pe)=>Se(pe),value:Z,sx:[{bgcolor:"#F9FAFB",borderRadius:"8px",overflow:"hidden",".MuiOutlinedInput-notchedOutline":{borderRadius:"8px",borderColor:"transparent"},"&&:hover .MuiOutlinedInput-notchedOutline, &&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"divider",borderWidth:"1px"}},...Array.isArray(d.sx)?d.sx:[d.sx]]})]});function ce(ee){D(!0),k(ee),v.current=!1,q.run(ee)}function Y(){S(!1),k(""),ce(""),o("")}function oe(ee){ee!=null&&ee.did?(S(!1),v.current=!0,k(""),u(ee)):ee.name===Dr&&(S(!1),o(a))}function Se(ee){var pe,K;return i.jsxs(Zr,{sx:{display:"flex",alignItems:"center",gap:1,p:1.5,borderRadius:"8px"},onClick:()=>oe(ee),children:[Fe(ee),i.jsxs(me,{variant:"body1",children:[i.jsx(me,{fontWeight:"fontWeightMedium",display:"flex",alignItems:"center",gap:1,children:ee.title}),i.jsx(me,{sx:{color:"text.lighter"},fontSize:"13px",children:((K=(pe=ee.category)==null?void 0:pe.locales)==null?void 0:K[n||"en"])||""})]})]},ee.did)}function Fe(ee){if([Dr,No].includes(ee.name))return i.jsx(Q,{width:Mr,p:"6px",display:"flex",justifyContent:"center",alignItems:"center",color:"text.lighter",bgcolor:"#F1F3F5",borderRadius:"8px",children:i.jsx(sr,{sx:{fontSize:28}})});let pe="";return ee.logo&&(pe=qn(e,"assets",ee.did,va(ee.logo,Mr,ee.version))),i.jsx(lr,{src:pe,size:Mr,style:{borderRadius:"8px",overflow:"hidden"}})}function $e(ee=!0){return i.jsx(Q,{sx:{display:"flex",pl:.5,alignItems:"center",color:"text.lighter"},children:ee&&a&&_?i.jsx(vt,{color:"inherit",size:16}):i.jsx(sr,{sx:{fontSize:16,cursor:"default"}})})}function it(){return a?i.jsx(Q,{sx:{display:"flex",alignItems:"center",color:"text.lighter"},children:i.jsx(oi,{sx:{fontSize:20,cursor:"pointer"},onClick:()=>Y()})}):null}}function ep({placeholder:e="Type to search...",...t}){const{search:n}=rt(),{filters:r,handleKeyword:o}=n,[u,d]=N.useState(r.keyword||""),h=us(o,{wait:300}),v=s=>{const{value:a}=s.target;d(a),h.run(a)},x=()=>{d(""),o("")};return N.useEffect(()=>{d(r.keyword||"")},[r.keyword]),i.jsx(tp,{inputProps:{"data-cy":"search-blocklet"},startAdornment:i.jsx(Qi,{position:"start",children:i.jsx(np,{})}),onChange:v,placeholder:e,value:u,title:e,"data-cy":"search",endAdornment:u&&i.jsx(Qi,{position:"end",children:i.jsx(rp,{"data-cy":"search-delete",onClick:x})}),...t})}const tp=qt(Jo)`
|
|
530
|
+
background-color: ${e=>e.theme.palette.grey[50]};
|
|
531
|
+
font-size: 14px;
|
|
532
|
+
border-radius: 6px;
|
|
533
|
+
width: 100%;
|
|
534
|
+
.MuiInputBase-input {
|
|
535
|
+
padding: 8px 0 8px 10px;
|
|
536
|
+
}
|
|
537
|
+
.MuiOutlinedInput-notchedOutline {
|
|
538
|
+
border: none;
|
|
539
|
+
}
|
|
540
|
+
.Mui-focused {
|
|
541
|
+
background-color: #f6f6f6;
|
|
542
|
+
.MuiInputBase-input::placeholder {
|
|
543
|
+
color: transparent;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
`,np=qt(sr)`
|
|
547
|
+
color: ${e=>e.theme.palette.grey[500]};
|
|
548
|
+
font-size: 28px;
|
|
549
|
+
@media (max-width: ${e=>e.theme.breakpoints.values.md}px) {
|
|
550
|
+
font-size: 24px;
|
|
551
|
+
}
|
|
552
|
+
`,rp=qt(oi)`
|
|
553
|
+
color: ${e=>e.theme.palette.grey[500]};
|
|
554
|
+
font-size: 16px;
|
|
555
|
+
cursor: pointer;
|
|
556
|
+
`;function ip(){const{search:e,t,endpoint:n,locale:r,getCategoryLocale:o,developerName:u,showResourcesSwitch:d,layout:h,baseSearch:v}=rt(),{filters:x,handleSort:s,handlePrice:a,handleDeveloper:k,handleSwitchShowResources:y,cleanFilter:S}=e,R=ga(t);return i.jsxs(nt,{className:"filter-bar",direction:{xs:"column",md:"row"},alignItems:{xs:"flex-start",md:"center"},justifyContent:"space-between",gap:2,spacing:{xs:1,md:0},pt:{xs:2,md:0},px:0,pb:3,children:[i.jsx(me,{variant:"h2",textTransform:"capitalize",children:o(x.category)}),i.jsxs(nt,{flex:1,direction:"row",alignItems:"center",width:"100%",justifyContent:{xs:"space-between",md:"flex-end"},gap:2,children:[h.showSearch?i.jsx(Q,{flex:1,children:v?i.jsx(ep,{}):i.jsx(Zh,{locale:r,endpoint:n,sx:{display:{md:"block",xs:"none"},flex:1,mr:1,width:"350px"},t,filters:e.filters,handleKeyword:e.handleKeyword,handleSearchSelect:e.handleSearchSelect})}):null,x.owner&&u&&i.jsx(Ji,{label:t("blocklet.authorTag",{name:u}),size:"small",onDelete:()=>k("")}),x.resourceDid&&x.resourceBlocklet&&i.jsx(Ji,{label:t("blocklet.resourceTag",{name:x.resourceBlocklet}),size:"small",onDelete:()=>S(["resourceDid","resourceBlocklet","showResources"])}),d?i.jsx(Ao,{checked:x.showResources!=="false",onChange:_=>y(_?"true":"false"),label:t("common.showResources")}):null,i.jsx(Ao,{checked:x.price==="free",onChange:_=>a(_?"free":""),label:t("blocklet.free")}),i.jsx(Ea,{value:x.sortBy||R[0].value,options:R,placeholder:t("sort.sort"),onChange:_=>s(_)})]})]})}function Ao({checked:e,onChange:t,label:n}){return i.jsx(Jr,{sx:{m:0,p:0},className:"check-button",control:i.jsx(Qr,{checked:e,icon:i.jsx(lt,{style:{padding:0},icon:fh}),checkedIcon:i.jsx(lt,{style:{padding:0,color:"#3478E2"},icon:mh}),size:"large",sx:{p:0,mr:1},onChange:r=>t(r.target.checked)}),label:n})}function ir({children:e}){return i.jsxs(Q,{display:"flex",mt:2,flexDirection:"column",alignItems:"center",justifyContent:"center",color:"text.lighter",children:[i.jsx(cl,{}),e]})}function Do(){const{t:e}=rt();return i.jsx(me,{style:{textAlign:"center"},variant:"subtitle2",children:e("blocklet.noResults")})}function Fr({filterTip:e,keywordTip:t}){const{t:n,locale:r}=rt(),o=()=>r==="zh"?"、":" , ";return i.jsxs(Q,{mt:1,display:"flex",children:[i.jsx(me,{style:{marginRight:"16px"},children:n("blocklet.emptyTip")}),e&&i.jsx(me,{children:n("blocklet.filterTip")}),e&&t&&o(),t&&i.jsx(me,{children:n("blocklet.keywordTip")})]})}function Br({primaryStart:e,primaryEnd:t,filter:n}){return i.jsxs(me,{variant:"subtitle2",display:"flex",gap:.5,mx:.5,children:[i.jsx(me,{children:e}),i.jsx(me,{color:"primary",children:n}),i.jsxs(me,{children:[t," "]})]})}function op(){const{t:e,search:t,getCategoryLocale:n,selectedCategory:r}=rt(),{filters:o}=t,u=!!r||!!o.price;if(o.keyword&&u)return i.jsxs(ir,{children:[i.jsx(Br,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:o.keyword}),i.jsx(Fr,{keywordTip:!0,filterTip:!0})]});if(o.keyword)return i.jsxs(ir,{children:[i.jsx(Br,{primaryStart:e("blocklet.noBlockletPart1"),primaryEnd:e("blocklet.noBlockletPart2"),filter:o.keyword}),i.jsx(Fr,{keywordTip:!0})]});if(u){const d=n(r);return i.jsxs(ir,{children:[d?i.jsx(Br,{primaryStart:e("blocklet.noCategoryResults1"),primaryEnd:e("blocklet.noCategoryResults2"),filter:d}):i.jsx(Do,{}),i.jsx(Fr,{filterTip:!0})]})}return i.jsx(ir,{children:i.jsx(Do,{})})}const sp=(e,t,n,r)=>Yl(async o=>{o||(n.currentPage=n.defaultCurrentPage);const{currentPage:u,pageSize:d}=n,h={...t,category:t.category==="All"?"":t.category,sortBy:gt[t.sortBy],page:u,pageSize:d};r(null);const{data:v={}}=await e.get(gt.blockletsPath,{params:h});return n.currentPage++,{page:u,pageSize:d,list:(v==null?void 0:v.dataList)||[],total:(v==null?void 0:v.total)||0}},{isNoMore:o=>o?o.page*o.pageSize>=o.total:!1,reloadDeps:[e,ul(t)],onError:r});function ap(){var e;const{storeApi:t,search:n,extraFilter:r,errors:o,updateDeveloperName:u}=rt(),{filters:d}=n,h=Xl({currentPage:gt.currentPage,pageSize:Ah()?gt.mobilePageSize:gt.pageSize,defaultCurrentPage:gt.defaultCurrentPage}),[v,x]=N.useState(null),s=sp(t,d,h,x),a=N.useMemo(()=>{var k,y;return r?r(((k=s.data)==null?void 0:k.list)||[]):((y=s.data)==null?void 0:y.list)||[]},[s.data,r]);return N.useEffect(()=>{const k=a.find(y=>y.owner.did===d.owner);u((k==null?void 0:k.owner.fullName)||(k==null?void 0:k.author.name)||"")},[d.owner,a,u]),{blocklets:a,fetchBlockletsError:v,loadMore:s.loadMore,hasNextPage:!s.noMore,total:((e=s.data)==null?void 0:e.total)||0,loadings:{fetchBlockletsLoading:s.loading,loadingMore:s.loadingMore},errors:{...o,fetchBlockletsError:v}}}function lp(){const{t:e,search:t,endpoint:n,blockletRender:r,serverVersion:o,minItemWidth:u,layout:d,baseSearch:h}=rt(),{filters:v}=t,{blocklets:x,errors:s,loadMore:a,loadings:k,hasNextPage:y,total:S}=ap(),[R]=ph({loading:k.fetchBlockletsLoading||k.loadingMore,hasNextPage:y,onLoadMore:a});if(s.fetchBlockletsError){const z=new Error(`Failed to fetch blocklets from ${n}: ${s.fetchBlockletsError.message}`);return i.jsx(pr,{error:z})}const _=h&&d.showSearch||!v.keyword;return i.jsxs(i.Fragment,{children:[_?i.jsx(ip,{}):i.jsxs(i.Fragment,{children:[i.jsx(Ui,{xs:i.jsx(Sa,{}),md:null}),H()]}),D(),!k.fetchBlockletsLoading&&y&&i.jsx(Q,{height:60,display:"flex",justifyContent:"center",py:2,ref:R,children:i.jsx(vt,{})})]});function D(){return k.fetchBlockletsLoading?i.jsx(Ta,{mt:15}):x.length?i.jsx(Q,{className:"blocklet-list",display:"grid",gridTemplateColumns:{xs:"1fr",sm:`repeat(auto-fill, minmax(${u}px, 1fr))`},p:"2px",gap:2,children:x.map(z=>i.jsx(Q,{"data-blocklet-did":z.did,minWidth:{xs:"100%",sm:u},maxWidth:"calc(100vw - 32px)",children:r({blocklet:z,blocklets:x,serverVersion:o})},z.did))}):i.jsx(op,{})}function H(){return i.jsxs(nt,{direction:"row",className:"search-result-title",alignItems:"center",justifyContent:"space-between",mb:2,mt:{xs:2,md:0},children:[i.jsx(me,{variant:"h3",children:e("blocklet.search",{keyword:v.keyword})}),i.jsx(me,{variant:"body1",color:"text.lighter",fontSize:13,children:e("blocklet.resultCount",{count:S})})]})}}function cp(){const{t:e,selectedCategory:t,getCategoryLocale:n}=rt(),{toggleOpen:r}=$i();return i.jsxs(me,{variant:"body1",display:{xs:"flex",md:"none"},alignItems:"center",gap:1,py:2,fontWeight:"fontWeightMedium",children:[i.jsx(wa,{onClick:()=>r(!0),children:i.jsx(ll,{})}),n(t)||e("common.category")]})}function up({menus:e,children:t}){var n;const{search:r,layout:o}=rt(),{filters:u}=r,d=u.category||u.keyword||u.price,h=(n=e==null?void 0:e.find(v=>v.key===u.menu))==null?void 0:n.key;return i.jsx(Rh,{children:i.jsxs(is,{FallbackComponent:pr,children:[i.jsx(cp,{}),i.jsxs(Q,{display:"flex",height:"100%",className:"list-container",pt:{xs:0,md:5},children:[i.jsx(Kh,{menus:e}),i.jsxs(nt,{height:"100%",position:"relative",flex:1,overflow:"visible",children:[h&&(t==null?void 0:t(h)),!h&&(o.showExplore&&!d?i.jsx(Qh,{}):i.jsx(lp,{}))]})]})]})})}function dp(e){const{menus:t,children:n,...r}=e,o=Gn(),u=Ho(Cl({...o,typography:{h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700}}));return i.jsx(Xo,{theme:u,children:i.jsx($h,{...r,children:i.jsx(up,{menus:t,children:n})})})}const hp={width:24,height:24,body:'<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M22 12.54c-1.804-.345-2.701-1.08-3.523-2.94c-.487.696-1.102 1.568-.92 2.4c.028.238-.32 1-.557 1H3c0 5.208 3.164 7 6.196 7c4.124.022 7.828-1.376 9.854-5c1.146-.101 2.296-1.505 2.95-2.46z"/><path d="M5 10h3v3H5zm3 0h3v3H8zm3 0h3v3h-3zM8 7h3v3H8zm3 0h3v3h-3zm0-3h3v3h-3zM4.571 18c1.5 0 2.047-.074 2.958-.78M10 16v.01"/></g>'},pp=hp;var zi={},fp=Yr;Object.defineProperty(zi,"__esModule",{value:!0});var ja=zi.default=void 0,mp=fp(ni()),gp=i;ja=zi.default=(0,mp.default)((0,gp.jsx)("path",{d:"M16 18v2H8v-2zM11 7.99V16h2V7.99h3L12 4 8 7.99z"}),"Upgrade");const vp=(e,t)=>!t||!e?!0:Ur.satisfies(Ur.coerce(e),t);function qi({children:e,serverVersion:t="",requirementVersion:n="",...r}){const{t:o}=yt();return vp(t,n)?e:i.jsx(Go,{title:o("store.tooltip.upgradeServer",{serverVersion:t,version:n}),arrow:!0,children:i.jsx(me,{children:i.jsx(Hn,{disabled:!0,variant:"outlined",...r,children:o("common.upgradeServer")})})})}qi.propTypes={children:L.node.isRequired,serverVersion:L.string,requirementVersion:L.string};qi.defaultProps={serverVersion:"",requirementVersion:""};const $n=getComputedStyle(document.documentElement),yp=Ho({palette:{primary:{main:"#1DC1C7",contrastText:"#fff"},secondary:{main:"#030712",contrastText:"#fff"},storeSecondary:{main:"#EBFEFF",contrastText:"#fff"},divider:$n.getPropertyValue("--stroke-sep").trim()||"#EFF1F5",text:{primary:$n.getPropertyValue("--foregrounds-fg-base").trim()||"#030712",secondary:$n.getPropertyValue("--foregrounds-fg-subtle").trim()||"#4b5563",lighter:$n.getPropertyValue("--foregrounds-fg-muted").trim()||"#9ca3af",link:$n.getPropertyValue("--foregrounds-fg-interactive").trim()||"#0086FF"}},typography:{fontSize:14,button:{textTransform:"none"},allVariants:{textTransform:"none"},h1:{fontSize:32,fontWeight:700,lineHeight:1.375,textAlign:"left"},h2:{fontSize:24,fontWeight:700,lineHeight:1.3333333,textAlign:"left"},h3:{fontSize:18,fontWeight:600,lineHeight:1.5,textAlign:"left"},fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:500,fontWeightBold:700},overrides:{MuiTableRow:{root:{"&:nth-child(even)":{backgroundColor:"rgba(0, 0, 0, 0.02)"}},head:{backgroundColor:"transparent"}}},breakpoints:{values:{xs:0,sm:600,md:960,lg:1280,xl:1920}}}),bp=(e,t)=>qn(t,`/blocklets/${e.did}`),Mo=({blocklet:e,attribute:t,value:n})=>e._formatted?e._formatted[t]:n,xp=e=>e.inStore&&Mt.isFreeBlocklet(e)===!1;function Ki({blocklet:e,blocklets:t,handleButtonClick:n,endpoint:r,serverVersion:o}){var D,H;const{t:u}=yt();let d=qn(r,El(e.did,e.logo||""));try{const z=new URL(d);z.searchParams.set("v",e.version||+new Date),d=z.href}catch{}const[h,v]=N.useState(!1),x=z=>z.currentTarget.contains(z.target)?!0:(z.preventDefault(),!1),s=async z=>{z.preventDefault(),z.stopPropagation();try{v(!0),await n({meta:e,registryUrl:r,blocklets:t})}catch(X){ii.error(X.message)}finally{v(!1)}},{blocklet:a}=fr(),k=()=>((a==null?void 0:a.children)||[]).find(O=>O.meta.bundleDid===e.did).meta.version,S=(()=>{const z=((a==null?void 0:a.children)||[]).find(X=>X.meta.bundleDid===e.did);if(z){try{const X=z.meta.version,O=e.version;if(Ur.gt(O,X))return"upgrade"}catch{return"install"}return"disable"}return"install"})();let R=u("blocklet.component.choose");S==="upgrade"?R=u("blocklet.component.upgrade"):S==="disable"?R=u("blocklet.component.installed"):xp(e)&&(R=u("common.purchase"));const _=(D=e.requirements)==null?void 0:D.server;return i.jsx(Ha,{href:bp(e,r),style:{color:"initial",textDecoration:"none"},onClick:x,target:"_blank",children:i.jsx(wp,{title:Mo({blocklet:e,attribute:"title",value:e.title||e.name}),did:e.did,description:Mo({blocklet:e,attribute:"description",value:e.description}),cover:e.logo?d:"",version:e.version,onButtonClick:null,icons:(H=e.docker)!=null&&H.image?[{key:"docker",icon:i.jsx(Q,{display:"flex",color:"primary.main",children:i.jsx(lt,{icon:pp})}),title:u("blocklet.dockerImage")}]:[],button:i.jsx(qi,{serverVersion:o,requirementVersion:_,size:"small",children:i.jsx("div",{style:{display:"flex",alignItems:"center"},children:i.jsx(Jd,{children:i.jsxs(dt,{onClick:s,size:"small",disabled:h||S==="disable",variant:"outlined",color:"primary","data-cy":"install-blocklet",title:S==="upgrade"?`${k()} -> ${e.version}`:"",children:[h?i.jsxs(i.Fragment,{children:[i.jsx(vt,{size:16,style:{marginRight:3}}),R]}):R,S==="upgrade"?i.jsx(ja,{style:{fontSize:"1.2rem"}}):null]},e.did)})})})})})}Ki.propTypes={blocklet:L.object.isRequired,blocklets:L.array,handleButtonClick:L.func,endpoint:L.string,serverVersion:L.string};Ki.defaultProps={handleButtonClick:null,endpoint:"",blocklets:[],serverVersion:""};function Vi({handleButtonClick:e,handleSearchSelect:t,storeUrl:n,handleBlockletRender:r,extraFilter:o,serverVersion:u,resourceType:d,resourceDid:h,showResourcesSwitch:v,showCategory:x,...s}){const{locale:a}=yt(),[k,y]=N.useState(!1),[S,R]=N.useState({}),_=H=>{R(H)},D=n;return N.useEffect(()=>{R({showResources:!0,resourceType:d,resourceDid:h})},[D,d,h]),N.useEffect(()=>{y(!0),R({showResources:!0,resourceType:d,resourceDid:h})},[]),i.jsx(Xo,{theme:yp,children:i.jsx(is,{FallbackComponent:pr,resetKeys:[D],children:i.jsxs(Q,{...s,sx:[{overflow:"auto",".title-bar + div":{height:"unset"}},Array.isArray(s.sx)?s.sx:[s.sx]],children:[k&&i.jsx(dp,{showCategory:x,showResourcesSwitch:v,blockletRender:H=>{const z={...H,handleButtonClick:e,endpoint:D};return r({...H,defaultRender:i.jsx(Ki,{...z})})},baseSearch:!0,endpoint:D,locale:a,onFilterChange:_,onSearchSelect:t,filters:S,extraFilter:o,serverVersion:u,fetchCategoryDelay:500}),i.jsx(Q,{sx:{mt:2},children:" "})]})})})}Vi.propTypes={storeUrl:L.string.isRequired,handleButtonClick:L.func,handleSearchSelect:L.func,handleBlockletRender:L.func,extraFilter:L.func,serverVersion:L.string,resourceType:L.string,resourceDid:L.string,showResourcesSwitch:L.bool,showCategory:L.bool};Vi.defaultProps={handleButtonClick:null,handleSearchSelect:null,handleBlockletRender:null,extraFilter:void 0,serverVersion:"",resourceType:"",resourceDid:"",showResourcesSwitch:!0,showCategory:!0};const wp=Ve(Zd)`
|
|
557
|
+
.ms-highlight {
|
|
558
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
559
|
+
}
|
|
560
|
+
`,Gi=N.forwardRef(({meta:e,isMobile:t,onStepChange:n},r)=>{const{steps:o,activeStep:u,setActiveStepByKey:d,setActiveStepByIndex:h}=dl(),{t:v,locale:x}=yt(),s=o[u];return N.useEffect(()=>{n(u)},[n,u]),N.useImperativeHandle(r,()=>({setActiveStepByKey:d,setActiveStepByIndex:h})),i.jsx(Sp,{component:"div",className:t?"mobileStyle":"",sx:{height:"calc(100% - 56px)","&>div>div>div:first-child":{flex:{md:1}}},children:i.jsx(hl,{locale:x,blockletMeta:{title:" ",...e},pcWidth:"100%",pcHeight:"100%",logoUrl:e&&e.logo&&e.registryUrl?Sl({did:e.did,version:e.version,baseUrl:e.registryUrl,logoPath:e.logo}):null,stepTip:v("blocklet.component.add"),children:i.jsx(Ep,{children:typeof(s==null?void 0:s.body)=="function"?s.body():s==null?void 0:s.body})})})});Gi.propTypes={meta:L.any,onStepChange:L.func.isRequired,isMobile:L.bool.isRequired};Gi.defaultProps={meta:null};const Fo=e=>e.isMobile?`
|
|
561
|
+
height: calc(100vh - 56px - 64px - 48px);
|
|
562
|
+
`:"",Ep=Ve.div`
|
|
563
|
+
width: 100%;
|
|
564
|
+
height: 100%;
|
|
565
|
+
display: flex;
|
|
566
|
+
flex-direction: column;
|
|
567
|
+
justify-content: flex-start;
|
|
568
|
+
align-items: flex-start;
|
|
569
|
+
|
|
570
|
+
.bottom-button {
|
|
571
|
+
min-width: 200px;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
// blocklet-select-side
|
|
575
|
+
aside {
|
|
576
|
+
width: 140px;
|
|
577
|
+
}
|
|
578
|
+
`,Sp=Ve(Q)`
|
|
579
|
+
${({className:e})=>e==="mobileStyle"?`
|
|
580
|
+
& > div{
|
|
581
|
+
height: 100%;
|
|
582
|
+
}
|
|
583
|
+
.root-header {
|
|
584
|
+
.app-name-content {
|
|
585
|
+
display: none;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
// content-panel
|
|
590
|
+
.root-header + div{
|
|
591
|
+
padding-top: 0;
|
|
592
|
+
position: relative;
|
|
593
|
+
& > div {
|
|
594
|
+
padding-top: 0;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
header + div {
|
|
599
|
+
padding-top: 0;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
header {
|
|
603
|
+
.header-title {
|
|
604
|
+
margin-left: 0;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.header-title-name {
|
|
608
|
+
max-width: 100% !important;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
.app-content {
|
|
612
|
+
padding: 0!important;
|
|
613
|
+
}
|
|
614
|
+
`:`
|
|
615
|
+
position: relative;
|
|
616
|
+
.ll-container { // 通过 Launcher Layout 组件约定的 .ll-container class 自定义 Layout 样式
|
|
617
|
+
width: 100%;
|
|
618
|
+
height: 100%;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.root-header {
|
|
622
|
+
z-index: auto !important;
|
|
623
|
+
position: fixed !important;
|
|
624
|
+
}
|
|
625
|
+
& > div {
|
|
626
|
+
height: 100%;
|
|
627
|
+
width: 100%;
|
|
628
|
+
max-width: 100%;
|
|
629
|
+
& > div {
|
|
630
|
+
max-height: unset !important;
|
|
631
|
+
max-width: 100%;
|
|
632
|
+
& > div {
|
|
633
|
+
// left-panel
|
|
634
|
+
&:first-child {
|
|
635
|
+
padding: 0;
|
|
636
|
+
width: 20%;
|
|
637
|
+
min-width: 180px;
|
|
638
|
+
|
|
639
|
+
& > div:first-child {
|
|
640
|
+
display: none;
|
|
641
|
+
}
|
|
642
|
+
// step
|
|
643
|
+
& > div:last-child {
|
|
644
|
+
// margin-top: 32px;
|
|
645
|
+
margin-top: 0;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
// right-panel
|
|
649
|
+
&:last-child {
|
|
650
|
+
padding-top: 0;
|
|
651
|
+
padding-right: 0px;
|
|
652
|
+
overflow-y: hidden;
|
|
653
|
+
.app-content {
|
|
654
|
+
padding: 0 0 24px 0;
|
|
655
|
+
}
|
|
656
|
+
.button-container {
|
|
657
|
+
padding-right: 0;
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
`}
|
|
665
|
+
|
|
666
|
+
& .app-overview {
|
|
667
|
+
margin-left: 0 !important;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
& .flex-justify-center {
|
|
671
|
+
display: flex;
|
|
672
|
+
justify-content: center;
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
& .flex-align-center {
|
|
676
|
+
display: flex;
|
|
677
|
+
height: 100%;
|
|
678
|
+
align-items: center;
|
|
679
|
+
${e=>Fo(e)}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
& .agreement-wrapper {
|
|
683
|
+
${e=>Fo(e)}
|
|
684
|
+
max-height: 60vh;
|
|
685
|
+
.eula-trigger {
|
|
686
|
+
padding-right: 0;
|
|
687
|
+
}
|
|
688
|
+
.next-button {
|
|
689
|
+
display: none;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
& .connect {
|
|
694
|
+
background: white;
|
|
695
|
+
}
|
|
696
|
+
`,Tp=Gi,jp=e=>e.inStore&&Mt.isFreeBlocklet(e)===!1,Op=e=>{var t;return[wt.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED,wt.BLOCKLET_APP_SPACE_REQUIREMENT.REQUIRED_ON_SETUP].includes((t=e==null?void 0:e.capabilities)==null?void 0:t.didSpace)},$r=e=>{var t,n;return((n=(t=e==null?void 0:e.configs)==null?void 0:t.find(r=>r.key===wt.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_SPACE_ENDPOINT))==null?void 0:n.value)||null},kp=e=>(e.environments||[]).some(t=>t.required),Bo=(e,t)=>e==null?void 0:e.some(n=>n.required&&!t[n.key]),Rp=({params:e,blocklet:t,t:n})=>{const r=e.title||e.name;return r?((t==null?void 0:t.children)||[]).find(u=>u.meta.bundleDid===e.bundleDid)?n("blocklet.component.upgradeNext",{name:r}):n("blocklet.component.addNext",{name:r}):n("common.next")},$o=({componentDid:e,timeout:t=1e3,manual:n=!1}={})=>{setTimeout(()=>{window.parent.postMessage({event:"component.installed",componentDid:e,manual:n},"*")},t)};function Oa({onClose:e,mode:t,stores:n,resourceType:r,resourceDid:o,storageKey:u,inDialog:d,selectedMeta:h,storeUrl:v,showResourcesSwitch:x,showFromUrl:s,enableRunBackground:a,showCategory:k}){var Jt,Qt,bn,P,mt,Zt,Lt,l,b,w;const{t:y,locale:S}=yt(),[R,_]=N.useState(!1),[D,H]=N.useState(null),[z,X]=N.useState(""),[O,q]=N.useState(""),{api:Z,ws:{useSubscription:F},inService:ce,info:Y}=Rn(),{blocklet:oe,actions:{refreshBlocklet:Se}}=fr(),[Fe,$e]=N.useState(null),[it,ee]=N.useState(!1),pe={bundleDid:"",componentDid:"",componentName:"",pathPrefix:"",name:"",title:"",configsList:[],configsValue:{},hasMissRequiredConfigs:!1,hasEnvironmentsStep:!1,hasRequiredEnvironments:!1,requirePurchase:!1,didSpaceIsRequiredSetup:null,installResultProps:{},purchaseResultProps:{},showFromUrlDialog:!1},[K,Te]=N.useState(pe),[ie,pt]=N.useState(0),xe=N.useRef({}),Je=N.useRef({}),ze=N.useRef({}),Pt=Wt(T=>T.breakpoints.down("md")),Kt=Qa(),[Ft,Vt]=N.useState(!0),{meta:Le}=xe.current,_e=ws(Le),Oe=T=>Te(C=>({...C,...T}));N.useEffect(()=>{if(K.pathPrefix){const{errMsg:T}=Yt({...K,pathPrefix:K.pathPrefix,locale:S});X(T)}},[K.pathPrefix]),N.useEffect(()=>{ie===0&&Te(pe)},[ie]);const ve=()=>{const T=$r(oe)??"";Oe({didSpaceEndpoint:T})},St=()=>{var T;return(T=xe==null?void 0:xe.current)!=null&&T.meta?Mt.getDisplayName(xe.current):""},Gt=()=>{_(!1),Te({}),xe.current={},e()},Ht=T=>{const C=A=>{Oe({installResultProps:{variant:"error",title:St(),subTitle:T,footer:i.jsx(dt,{className:"bottom-button",disabled:A,"data-cy":"retry-install-component",onClick:async()=>{C(!0),await Xt(xe.current.installInput)},children:i.jsxs(Q,{display:"flex",alignItems:"center",children:[A&&i.jsx(vt,{size:16,style:{marginRight:8}}),y("common.retry")]})})}})};C()},ke=T=>C=>{var A,$;(((A=C==null?void 0:C.meta)==null?void 0:A.did)||(C==null?void 0:C.meta))===(($=oe==null?void 0:oe.meta)==null?void 0:$.did)&&T(C)},In=()=>{$o({timeout:0,componentDid:Kt.componentDid,manual:!0}),Gt(),setTimeout(()=>{const T=document.getElementsByClassName("dashboard-main")[0];T&&(T.scrollTop=T.scrollHeight)},200)};F(wt.BlockletEvents.statusChange,ke(T=>{switch(T.status){case wt.BlockletStatus.upgrading:Oe({installResultProps:{variant:"success",title:St(),subTitle:y("blocklet.component.installSuccessTip")}}),$o({componentDid:Kt.componentDid});break}const C=$r(oe);Oe(A=>({...A,didSpaceEndpoint:C}))}),[(Jt=oe==null?void 0:oe.meta)==null?void 0:Jt.did]),F(wt.BlockletEvents.downloadFailed,ke(()=>{Ht(y("blocklet.component.installComponentError"))}),[(Qt=oe==null?void 0:oe.meta)==null?void 0:Qt.did]),F(wt.BlockletEvents.installFailed,ke(()=>{Ht(y("blocklet.component.installComponentError"))}),[(bn=oe==null?void 0:oe.meta)==null?void 0:bn.did]),F(wt.BlockletEvents.componentInstalled,ke(()=>{Oe({installResultProps:{variant:"success",title:St(),subTitle:y("blocklet.component.installSuccessTip")}})}),[(P=oe==null?void 0:oe.meta)==null?void 0:P.did]);const Qe=[],vn=T=>((oe==null?void 0:oe.children)||[]).find(C=>C.meta.did===T),Xt=async T=>{var jt,Bt;const{pathPrefix:C,bundleDid:A,title:$,componentName:ue="",componentDid:se=""}=K,De=((jt=xe.current)==null?void 0:jt.meta)||{},{configs:Ce=[],registryUrl:je,inStore:Ie,inputUrl:Ge,dist:en}=De,tn=(Bt=xe.current)==null?void 0:Bt.downloadTokenList,He=Ge||(Ie?no(je,A,en):"");_(!0);const xn={rootDid:oe.meta.did,url:He,mountPoint:C?er(C):`/${er(De.title||De.name)}`,title:$,name:ue,did:se,onlyRequired:!Ft,...K.hasEnvironmentsStep&&Ce.length>0?{configs:Ce.map(Xe=>({...Xe,value:K.configsValue[Xe.key]||""}))}:{},...tn?{downloadTokenList:tn}:{},...T};try{if(await Z.installComponent({input:xn}),je){const{teamDid:Xe,storeList:Ot}=ss({fromBlocklet:ce,nodeInfo:Y,blocklet:oe}),{isNew:wn,decoded:nn}=Ol(je,Ot);wn&&await Z.addBlockletStore({input:{teamDid:Xe,url:nn}})}Oe({installResultProps:{}}),Se({showError:!1,attachRuntimeInfo:!1})}catch(Xe){const Ot=hs(Xe);ii.error(Ot),console.error("installComponent error: ",Xe),Ht(Ot)}finally{_(!1),xe.current.installInput=xn}},Yt=T=>{const C=ic({params:{...T,did:T.bundleDid},blocklets:[oe],blocklet:oe,locale:S});if(C){const A=vn(T.bundleDid),$=oc({params:{...T,did:T.bundleDid},blocklet:oe});if(A&&A.mountPoint===$)return{errMsg:""}}return{errMsg:C}},Ze=async T=>{var A,$;const{errMsg:C}=Yt({...K,locale:S});X(C),ie===Qe.length-2&&await Xt(T),($=(A=Je.current)==null?void 0:A.setActiveStepByIndex)==null||$.call(A,ue=>ue+1)},ot=()=>{var T,C;(C=(T=Je.current)==null?void 0:T.setActiveStepByIndex)==null||C.call(T,A=>A-1)},bt=()=>{const{pathPrefix:T,bundleDid:C,title:A,componentName:$="",componentDid:ue=""}=K,{meta:se={}}=xe.current||{},{registryUrl:De,inStore:Ce,inputUrl:je,dist:Ie}=se,Ge=Ce?no(De,C,Ie):je;$e({meta:se,installOpts:{type:"component",rootDid:oe.meta.did,mountPoint:T,url:Ge,title:A,name:$,did:ue}})},Tt=T=>{ee(!1),Oe({purchaseResultProps:{variant:"error",title:St(),subTitle:T,style:{paddingTop:120},footer:i.jsx(dt,{className:"bottom-button","data-cy":"retry-purchase-component",onClick:()=>{Oe({purchaseResultProps:{}})},children:y("common.retry")})}})},st=({downloadTokenList:T})=>{xe.current.downloadTokenList=T,ee(!1),Ze()},ft=({chooseParams:T=xe.current,componentDid:C,isInit:A=!1})=>{var nn,Yn,Jn,Pn;const{meta:$,registryUrl:ue,inStore:se,inputUrl:De}=T,{did:Ce,title:je,name:Ie}=$,Ge=(((nn=oe.settings)==null?void 0:nn.children)||[]).filter(et=>et.status==="deleted"&&et.meta.bundleDid===Ce),en=C||"",tn=(Yn=$.environments)==null?void 0:Yn.map(et=>{const{name:kt,validation:rn,...on}=et,Ln={validation:Ml(rn)?"":rn};return{...on,key:kt,...Ln}});xe.current={...T,meta:{...$,configs:tn,registryUrl:ue,inStore:se,inputUrl:De}};let He={};if(A){const et=[oe],kt=tn||[],rn=[],on=ls(Dl([...kt,...rn]),"key").filter(we=>!!we.key).sort((we,_t)=>we.required&&!_t.required?-1:_t.required&&!we.required?1:0),Ln=Mt.getSharedConfigObj(et[0],{configs:on}),sn={},Qn=on.map(we=>{const{default:_t,key:an,...Zn}=we;return sn[an]=Ln[an]||_t,{...Zn,key:an,hidden:!!wt.BLOCKLET_CONFIGURABLE_KEY[an]}});He={...He,configsList:Qn,configsValue:sn,hasMissRequiredConfigs:Bo(Qn,sn)}}const xn=oe.children.some(et=>et.mountPoint==="/"),jt=Ge.find(et=>et.meta.bundleDid===Ce),Bt=oe.children.find(et=>et.meta.bundleDid===Ce);He.title=je||"",jt?He={...He,pathPrefix:jt.mountPoint||"",componentName:jt.meta.name,hasEnvironmentsStep:!1}:Bt?He={...He,pathPrefix:Bt.mountPoint||"",componentName:Bt.meta.name,hasEnvironmentsStep:!1}:He={...He,pathPrefix:xn?`/${er(je)||er(Ie)}`.toLowerCase():"/",componentName:"",hasEnvironmentsStep:((Pn=(Jn=xe.current.meta)==null?void 0:Jn.environments)==null?void 0:Pn.length)>0};const Xe=jp(xe.current.meta),Ot=Op(xe.current.meta),wn=$r(oe);Oe({bundleDid:Ce,componentDid:en,...He,hasRequiredEnvironments:kp(xe.current.meta),requirePurchase:Xe,didSpaceIsRequiredSetup:Ot,didSpaceEndpoint:wn}),A&&Xe&&bt()};N.useEffect(()=>{!h||ie!==0||!oe||(ft({chooseParams:{blocklets:[h],meta:h,registryUrl:v||h.homepage,inStore:!0},isInit:!0}),Oe({showFromUrlDialog:!1}),Ze())},[h,ie,oe]),Qe.push({key:"selectComponent",name:y("blocklet.component.selectComponent"),body:i.jsxs(cn,{sx:{width:400},component:"div",children:[s&&K.showFromUrlDialog&&i.jsx(Li,{mode:"component",onCancel:()=>{Oe({showFromUrlDialog:!1})},onSuccess:({meta:T,inputUrl:C,inStore:A,registryUrl:$})=>{ft({chooseParams:{meta:T,inputUrl:C,inStore:A,registryUrl:$},isInit:!0}),Oe({showFromUrlDialog:!1}),Ze()},handleText:{title:y("blocklet.component.addComponentTip.fromUrl"),confirm:y("blocklet.component.choose")}}),i.jsx(Mi,{stores:n,extra:Zo.isInServerlessMode(Y)?null:s?i.jsxs(dt,{variant:"text",color:"primary","data-cy":"add-component-from-url",onClick:()=>{Oe({showFromUrlDialog:!0})},style:{padding:"0 2px"},children:[i.jsx(fs,{style:{fontSize:20,marginRight:4}})," ",y("blocklet.component.addComponentTip.fromUrl")," "]}):null,loading:R,onChange:()=>{Te({}),xe.current={}},storageKey:u,children:({currentRegistry:T})=>i.jsx(Vi,{showResourcesSwitch:x,showCategory:k,serverVersion:Y==null?void 0:Y.version,style:Pt?{height:"calc(100vh - 56px - 80px - 32px - 10px )"}:{height:"calc(100% - 10px)"},storeUrl:T.url,resourceType:r,resourceDid:o,handleButtonClick:C=>{ft({chooseParams:{...C,inStore:!0},isInit:!0})},handleBlockletRender:({blocklet:C,defaultRender:A})=>{const $=(K==null?void 0:K.bundleDid)&&(K==null?void 0:K.bundleDid)===(C==null?void 0:C.did);return i.jsxs(Ip,{children:[$&&i.jsx("div",{className:"check-container",children:i.jsx(os,{className:"check-icon"})}),i.jsx("div",{className:$?"choose-blocklet":"",style:{marginLeft:16},children:A})]})}})})]}),cancel:t==="embed"?void 0:y("common.cancel"),confirm:Rp({params:K,blocklet:oe,t:y}),onCancel:Gt,onConfirm:()=>{Ze()}}),Qe.push({key:"agreement",name:y("launchBlocklet.introduction"),body:i.jsxs(cn,{component:"div",className:"agreement-wrapper",children:[i.jsx(as,{title:y("launchBlocklet.introduction"),subTitle:y("blocklet.component.addComponentTip.introduction")}),i.jsx(fi,{meta:Le,onClickNext:Ze,installRelated:Ft,onChangeInstallRelated:Vt,handleDescEle:i.jsx("p",{children:y("blocklet.component.addComponentTip.belowInformation")})})]}),cancel:h?void 0:y("common.pre"),disabled:!_e,confirm:y(_e?"launchBlocklet.next":"launchBlocklet.canNotInstall"),onCancel:h?Gt:ot,onConfirm:()=>{ee(!1),Ze()}}),Le&&K.requirePurchase&&Qe.push({key:"purchase",name:i.jsxs(i.Fragment,{children:[y("common.verifyNFT"),i.jsx(Sr,{})]}),body:i.jsxs(cn,{component:"div",className:"flex-align-center",style:{flexDirection:"column"},children:[!(((Zt=(mt=ze.current)==null?void 0:mt.getCurrentStep)==null?void 0:Zt.call(mt))===2||it)&&i.jsx(or,{title:y("common.verifyNFT"),subTitle:y("blocklet.component.addComponentTip.verifyNFT")}),Un(K.purchaseResultProps)?Fe&&i.jsx(Kd,{ref:ze,meta:Fe.meta,mode:K.componentDid?"verify":"both",onCancel:Tt,installOpts:Fe.installOpts,handlePaySuccess:st}):i.jsx("div",{className:"flex-align-center flex-justify-center",children:i.jsx(ro,{...K.purchaseResultProps})})]}),disabled:((l=(Lt=ze.current)==null?void 0:Lt.getCurrentStep)==null?void 0:l.call(Lt))===2||it,cancel:y("common.pre"),confirm:y("common.next"),onConfirm:()=>{typeof ze.current.onNext=="function"&&(ze.current.onNext(),ee(!0))},onCancel:()=>{ot()}}),Mt.hasStartEngine(Le)&&Tl.hasMountPoint(Le)?Qe.push({key:"config",name:y("common.config"),error:z,body:i.jsxs(cn,{component:"div",children:[i.jsx(or,{title:y("common.config"),subTitle:y("blocklet.component.addComponentTip.config")}),i.jsx(dr,{label:y("blocklet.component.mountPoint"),autoComplete:"off",variant:"outlined",name:"pathPrefix",inputProps:{"data-cy":"mount-point-input"},fullWidth:!0,helperText:O||y("blocklet.component.mountPointTip"),style:{marginBottom:32},margin:"normal",value:K.pathPrefix,onChange:T=>{const C=T.target.value;Oe({pathPrefix:C}),q(y("common.slugifyHint",{value:jl(C)}))}}),!!z&&i.jsx(Vo,{severity:"error",style:{width:"100%",marginTop:8},children:z})]}),cancel:y("common.pre"),confirm:y("common.next"),onCancel:ot,onConfirm:()=>{Ze()}}):Le&&(K.pathPrefix=((w=(b=Le.interfaces)==null?void 0:b[0])==null?void 0:w.path)||`/${Le.did}`),Le&&(K!=null&&K.hasEnvironmentsStep)&&Qe.push({key:"environment",name:i.jsxs(i.Fragment,{children:[y("common.environment")," ",K.hasRequiredEnvironments&&i.jsx(Sr,{})]}),disabled:!!D||(K==null?void 0:K.hasMissRequiredConfigs),body:()=>i.jsxs(cn,{component:"div",style:{overflowY:"auto"},children:[i.jsx(or,{title:y("common.environment"),subTitle:y("blocklet.component.addComponentTip.environment")}),i.jsx($l,{style:{marginTop:-12,width:"100%"},schema:K.configsList,defaultValue:K.configsValue,onChange:(T,{action:C,currentItem:A,allValues:$})=>{C==="confirm"&&Oe({hasMissRequiredConfigs:Bo(K.configsList,$),configsValue:$}),C==="edit"?H(A):["cancel","confirm"].includes(C)&&H(null)}})]}),cancel:y("common.pre"),confirm:y("common.next"),onCancel:ot,onConfirm:Ze}),Le&&(K!=null&&K.didSpaceIsRequiredSetup)&&Qe.push({key:"didSpace",name:i.jsxs(i.Fragment,{children:[y("blocklet.component.didSpaceConfig")," ",K.didSpaceIsRequiredSetup==="required"&&i.jsx(Sr,{})]}),disabled:(K==null?void 0:K.didSpaceIsRequiredSetup)&&!K.didSpaceEndpoint,body:()=>i.jsx(Bl,{children:i.jsxs(cn,{component:"div",children:[i.jsx(or,{title:y("blocklet.component.didSpaceConfig"),subTitle:y("blocklet.component.didSpaceConfigTip")}),i.jsx(Q,{sx:{mt:"36px","& > div":{maxWidth:"unset !important","& .MuiAutocomplete-root":{maxWidth:"unset !important"}}},children:i.jsx(Di,{blockletMeta:xe.current.meta,onNext:()=>{Ze()},onEndpointUpdate:ve})})]})}),cancel:y("common.pre"),confirm:y("common.next"),onCancel:ot,onConfirm:Ze}),Qe.push({key:"install",name:vn(Le==null?void 0:Le.did)?y("common.upgrade"):y("common.install"),disabled:a?!1:Un(K.installResultProps),loading:a?!1:Un(K.installResultProps),body:i.jsx(cn,{component:"div",className:"flex-justify-center flex-align-center",style:{flexDirection:"column"},children:Un(K.installResultProps)?i.jsx(pl,{message:i.jsx(Pp,{children:y(a?"blocklet.component.installingCanCloseWindowTip":"blocklet.component.installingTip")}),increaseSpeed:.3,messageLoop:!1}):i.jsx("div",{style:{marginTop:120},children:i.jsx(ro,{...K.installResultProps})})}),confirm:y("common.complete"),onConfirm:In});const Ue=Qe[ie]||{},yn=()=>R||Ue.error||!K.bundleDid?!0:ie>1?!K.pathPrefix:!1;return oe?i.jsxs(Cp,{sx:{width:"100%",height:Pt?window.innerHeight:d?"72vh":"100vh"},children:[i.jsx(fl,{steps:Qe,mode:"memory",children:i.jsx(Tp,{ref:Je,meta:Le,isMobile:Pt,onStepChange:T=>{pt(T)}})}),i.jsxs(Q,{className:"action-bar",children:[Ue.cancel&&i.jsx(dt,{onClick:T=>{T.stopPropagation(),Ue.onCancel()},disabled:ie===Qe.length-2&&R,color:"inherit",children:Ue.cancel||y("common.cancel")}),Ue.confirm&&i.jsx(dt,{onClick:T=>{T.stopPropagation(),Ue.onConfirm()},color:"primary","data-cy":"submit-confirm-next",disabled:R||(typeof Ue.disabled=="boolean"?Ue.disabled:yn()),variant:"contained",autoFocus:!0,title:Ue.confirm,style:{marginLeft:8,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:"140px",maxWidth:"280px",textAlign:"center"},children:i.jsxs(Q,{display:"flex",alignItems:"center",children:[(typeof Ue.loading=="boolean"?Ue.loading:R)&&i.jsx(vt,{style:{marginRight:8},size:16}),Ue.confirm]})})]})]}):null}Oa.propTypes={onClose:L.func,mode:L.oneOf(["normal","embed"]),inDialog:L.bool,stores:L.arrayOf(L.string),storeUrl:L.string,resourceType:L.string,resourceDid:L.string,storageKey:L.string,selectedMeta:L.object,showResourcesSwitch:L.bool,showFromUrl:L.bool,enableRunBackground:L.bool,showCategory:L.bool};Oa.defaultProps={onClose:()=>{},mode:"normal",stores:[],storeUrl:"",resourceType:"",resourceDid:"",storageKey:"",inDialog:!0,selectedMeta:null,showResourcesSwitch:!0,showFromUrl:!0,enableRunBackground:!0,showCategory:!0};const Cp=Ve(Q)`
|
|
697
|
+
.action-bar {
|
|
698
|
+
display: flex;
|
|
699
|
+
justify-content: flex-end;
|
|
700
|
+
position: sticky;
|
|
701
|
+
bottom: 0;
|
|
702
|
+
padding-top: 16px;
|
|
703
|
+
z-index: 100;
|
|
704
|
+
width: 100%;
|
|
705
|
+
background: #fff;
|
|
706
|
+
border-top: 1px solid #eee;
|
|
707
|
+
}
|
|
708
|
+
`,cn=Ve(me)`
|
|
709
|
+
width: 100%;
|
|
710
|
+
height: 100%;
|
|
711
|
+
`,or=Ve(as)`
|
|
712
|
+
margin-bottom: 24px;
|
|
713
|
+
`,Ip=Ve.div`
|
|
714
|
+
position: relative;
|
|
715
|
+
|
|
716
|
+
.choose-blocklet {
|
|
717
|
+
background-color: rgb(236, 251, 253);
|
|
718
|
+
border-color: rgb(236, 251, 253);
|
|
719
|
+
border-radius: 8px;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.check-container {
|
|
723
|
+
position: absolute;
|
|
724
|
+
right: 0;
|
|
725
|
+
bottom: 0;
|
|
726
|
+
display: flex;
|
|
727
|
+
justify-content: flex-end;
|
|
728
|
+
align-items: flex-end;
|
|
729
|
+
width: 30px;
|
|
730
|
+
height: 30px;
|
|
731
|
+
border-radius: 0 0 8px 0;
|
|
732
|
+
color: ${e=>e.theme.palette.common.white};
|
|
733
|
+
overflow: hidden;
|
|
734
|
+
transition: all ease 0.3s;
|
|
735
|
+
&:after {
|
|
736
|
+
position: absolute;
|
|
737
|
+
z-index: 0;
|
|
738
|
+
display: block;
|
|
739
|
+
width: 0;
|
|
740
|
+
height: 0;
|
|
741
|
+
border-top: transparent solid 15px;
|
|
742
|
+
border-left: transparent solid 15px;
|
|
743
|
+
border-bottom: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
744
|
+
border-right: ${e=>e.theme.palette.primary.main} solid 15px;
|
|
745
|
+
transition: all ease 0.1s;
|
|
746
|
+
content: '';
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
.check-icon {
|
|
750
|
+
position: relative;
|
|
751
|
+
z-index: 2;
|
|
752
|
+
margin: 0 1px 1px 0;
|
|
753
|
+
font-size: 16px;
|
|
754
|
+
transition: all ease 0.2s;
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
`,Pp=Ve.div`
|
|
758
|
+
color: ${e=>e.theme.palette.primary.main};
|
|
759
|
+
.msg-before {
|
|
760
|
+
display: inline-block;
|
|
761
|
+
color: #aaa;
|
|
762
|
+
font-size: 14px;
|
|
763
|
+
margin-right: 6px;
|
|
764
|
+
}
|
|
765
|
+
`;export{Oa as A,ra as B,uf as S,lf as a,cf as b,pp as c,fs as d,Es as f};
|