@abtnode/blocklet-services 1.16.47-beta-20250717-221700-2d886a18 → 1.16.47-beta-20250721-025348-9ccb2d62
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/dist/assets/{AdapterDayjs-BZTfQON9.js → AdapterDayjs-Dc_cn1Wv.js} +1 -1
- package/dist/assets/{Community-CcMMU0U0.js → Community-ClHGTbNM.js} +1 -1
- package/dist/assets/{Google-BdWLCoXr.js → Google-BYGsR9Bd.js} +1 -1
- package/dist/assets/{Holiday-CQ56q1Zn.js → Holiday-D8fmDxt6.js} +1 -1
- package/dist/assets/{Meeting-BloE6sJb.js → Meeting-CF7NtQe5.js} +1 -1
- package/dist/assets/{OffSick-BDgahXbb.js → OffSick-CWwGwWYY.js} +1 -1
- package/dist/assets/{WorkingRemotely-Dy2yEuOf.js → WorkingRemotely-CD8ntsiV.js} +1 -1
- package/dist/assets/{access-control-Ccw74KG_.js → access-control-oCszV5zC.js} +1 -1
- package/dist/assets/{actions-C731b1S-.js → actions-CeSIZN0M.js} +1 -1
- package/dist/assets/{add-component-core-CbHoe5zJ.js → add-component-core-GYYnyhPI.js} +1 -1
- package/dist/assets/{add-resource-Cq_fc1jD.js → add-resource-vcL8WXJK.js} +1 -1
- package/dist/assets/{addon-DZMRJstX.js → addon-m7dEcFSm.js} +1 -1
- package/dist/assets/{advanced-2-zZxGm_.js → advanced-BhS7b_np.js} +1 -1
- package/dist/assets/api-BV16dSSm.js +1 -0
- package/dist/assets/{appearance-DpzMSH9F.js → appearance-BF-F41U0.js} +1 -1
- package/dist/assets/{arrow-down.svg-CAhyD6_b.js → arrow-down.svg-6steA5un.js} +1 -1
- package/dist/assets/{audit-logs-ChoY3Mh6.js → audit-logs-gbfUafHi.js} +1 -1
- package/dist/assets/{authorize-CRwwOLYT.js → authorize-Bfey1QAy.js} +1 -1
- package/dist/assets/{base-chart-ChlMjzcv.js → base-chart-u6OIGONc.js} +1 -1
- package/dist/assets/{base32-CkijRzDY.js → base32-DBDFptL1.js} +1 -1
- package/dist/assets/{branding-BFlQm__X.js → branding-Co1T-6R4.js} +1 -1
- package/dist/assets/{branding-1Tnui43I.js → branding-itFeNCQ6.js} +2 -2
- package/dist/assets/{bundle-avatar-cdYjPEnW.js → bundle-avatar-DkLBEfff.js} +1 -1
- package/dist/assets/button-Cnj6R5bV.js +1 -0
- package/dist/assets/click-to-copy-m7BzOuWH.js +1 -0
- package/dist/assets/cloneDeep-BpNWeRQ9.js +1 -0
- package/dist/assets/{collapse-DGb2BFlZ.js → collapse-DfvukfIl.js} +1 -1
- package/dist/assets/{complete-B-DZw0Xp.js → complete-B4B7REuC.js} +1 -1
- package/dist/assets/{component-B7p437A9.js → component-DMzCzNlm.js} +3 -3
- package/dist/assets/{config-CpnLJaUO.js → config-D-z5vAfP.js} +1 -1
- package/dist/assets/{config-CxEXdwoA.js → config-D3XTFUmZ.js} +1 -1
- package/dist/assets/{config-navigation-CU19NqaO.js → config-navigation-CfGhB5-E.js} +3 -3
- package/dist/assets/{config-space-B6WEaHVR.js → config-space-a6OXiuM7.js} +1 -1
- package/dist/assets/{confirm-B0IPtkVS.js → confirm-B4BzkG04.js} +1 -1
- package/dist/assets/{connect-BOc7_s4F.js → connect-B-9mXcqo.js} +1 -1
- package/dist/assets/{connect-NXiMoe1T.js → connect-JlblxSAY.js} +1 -1
- package/dist/assets/{connect-to-RFZZSI5s.js → connect-to-BL3HAXmC.js} +1 -1
- package/dist/assets/{content-layout-Ctpah7wH.js → content-layout-BaDbLmL5.js} +1 -1
- package/dist/assets/{createClass-Bj7mZfZB.js → createClass-g8bSPTyV.js} +1 -1
- package/dist/assets/{dashboard-ClQmhIHS.js → dashboard-CBpVHcLw.js} +3 -3
- package/dist/assets/{delete-confirm-DeAivjJv.js → delete-confirm-DhfRzwF1.js} +1 -1
- package/dist/assets/{did-address-D7SiJUQw.js → did-address-CdYAzzjR.js} +1 -1
- package/dist/assets/{domain-action-card-BMJauDDL.js → domain-action-card-B-0EUHm9.js} +1 -1
- package/dist/assets/{domain-Cx4UiImS.js → domain-q2p-uq0P.js} +1 -1
- package/dist/assets/domains-BvFskQMv.js +1 -0
- package/dist/assets/{dot-CAD4z94Q.js → dot-OPeVWPUi.js} +1 -1
- package/dist/assets/{edit.svg-D-deOViK.js → edit.svg-DycWG9v3.js} +1 -1
- package/dist/assets/{email-_MWdgnCs.js → email-BTKvn_fl.js} +3 -3
- package/dist/assets/{empty-spinner-DoD2SObf.js → empty-spinner-C6wgiyAQ.js} +1 -1
- package/dist/assets/engine-DHKpyPwC.js +1 -0
- package/dist/assets/{exchange-passport-B5Avk2mv.js → exchange-passport-B-9fNsX9.js} +1 -1
- package/dist/assets/{form-Cfox3G5b.js → form-BX4g8soo.js} +1 -1
- package/dist/assets/{fuel--qkuIoAW.js → fuel-DYTqXaPb.js} +1 -1
- package/dist/assets/{gen-access-key-B4DsFFIf.js → gen-access-key-DVBJadXn.js} +2 -2
- package/dist/assets/get-safe-url-Ce6hawV-.js +1 -0
- package/dist/assets/{home-DIigPTxS.js → home-BL8xoBlc.js} +1 -1
- package/dist/assets/{iframe-CQ_bWNrw.js → iframe-BTaRNGRY.js} +1 -1
- package/dist/assets/{index-8pSMU0so.js → index-5klv_mrK.js} +1 -1
- package/dist/assets/{index-pq4T68Se.js → index-B9-tuTku.js} +4 -4
- package/dist/assets/{index-B_4qd0Ji.js → index-B9GdL3BM.js} +1 -1
- package/dist/assets/{index-CSSFAW5K.js → index-BC395sak.js} +1 -1
- package/dist/assets/{index-MGxe3V9B.js → index-BPy8_fa2.js} +1 -1
- package/dist/assets/{index-Bo6LJIBD.js → index-BUJ5QfC4.js} +3 -3
- package/dist/assets/index-BVPDkm__.js +1 -0
- package/dist/assets/{index-C5pKXOxF.js → index-BaBIefeb.js} +1 -1
- package/dist/assets/{index-D1bv9ooM.js → index-Bo2cFOuR.js} +1 -1
- package/dist/assets/{index-DYbAE8u5.js → index-C-AuC2Mk.js} +1 -1
- package/dist/assets/{index-BEyKlMs9.js → index-CW67obch.js} +1 -1
- package/dist/assets/{index-BsdYXeYP.js → index-C_CqbmyE.js} +1 -1
- package/dist/assets/{index-C0HBWMaK.js → index-Cbxz8oHT.js} +1 -1
- package/dist/assets/{index-CnoeBPbk.js → index-CeczUnUx.js} +1 -1
- package/dist/assets/{index-dIkcxCDN.js → index-CgCJ2qDh.js} +5 -5
- package/dist/assets/{index-DawEtQPD.js → index-CgRDnxac.js} +1 -1
- package/dist/assets/{index-C-vjjw9E.js → index-CgdhTqWX.js} +1 -1
- package/dist/assets/{index-BGTKxy_q.js → index-D3qROm47.js} +1 -1
- package/dist/assets/{index-D27Eda5K.js → index-D6kePAD5.js} +1 -1
- package/dist/assets/{index-BpL1e-bN.js → index-D8X_0Jj0.js} +1 -1
- package/dist/assets/{index-DEPyMifK.js → index-DUnVGFh6.js} +1 -1
- package/dist/assets/{index--E0qCGk-.js → index-D_5DFMMK.js} +1 -1
- package/dist/assets/{index-DdCAwzrE.js → index-DcwzA8G_.js} +1 -1
- package/dist/assets/{index-ChVoQcrO.js → index-DjKmasIZ.js} +1 -1
- package/dist/assets/{index-CQb3b4r6.js → index-DseoFU10.js} +1 -1
- package/dist/assets/{index-b_dnNRMF.js → index-Dy8syryD.js} +1 -1
- package/dist/assets/{index-thbUUXKQ.js → index-DyH1BrER.js} +1 -1
- package/dist/assets/{index-Dl1q-Vpb.js → index-EIX4798q.js} +1 -1
- package/dist/assets/{index-BcuyH8tS.js → index-LvmCZD51.js} +3 -3
- package/dist/assets/{index-Dhyyek4_.js → index-SrN5SE_r.js} +1 -1
- package/dist/assets/{index-BEq2q2jr.js → index-cCGBx0sL.js} +1 -1
- package/dist/assets/{index-CjiaOjxw.js → index-gkhmzgqt.js} +1 -1
- package/dist/assets/{index-Bv6qc7SO.js → index-lf4wyjkd.js} +1 -1
- package/dist/assets/{index-CzB-WPWn.js → index-n78OcMXJ.js} +1 -1
- package/dist/assets/{index.esm-BONQrRCU.js → index.esm-JPZAjt0x.js} +1 -1
- package/dist/assets/{invitation-D4tu3NNd.js → invitation-CC5hPf7T.js} +1 -1
- package/dist/assets/{invite-DdCiERzE.js → invite-CreQ98MA.js} +1 -1
- package/dist/assets/{issue-passport-CmU7CVx7.js → issue-passport-CIYcm6iB.js} +1 -1
- package/dist/assets/{item-7fmoiGq1.js → item-C8OCvu8j.js} +1 -1
- package/dist/assets/{landing-page-DrswynDN.js → landing-page-DOi_4Ca6.js} +1 -1
- package/dist/assets/{launch-result-message-BlpIIvzr.js → launch-result-message-Dwnqr8Lq.js} +1 -1
- package/dist/assets/{layout-u6VjgU9W.js → layout-CIen07bA.js} +1 -1
- package/dist/assets/{list-s4SRm3p5.js → list-B8ZhwNC1.js} +1 -1
- package/dist/assets/{list-DLQOcQSS.js → list-DZy6xsmU.js} +2 -2
- package/dist/assets/{list-header-BROuC1JD.js → list-header-CGX6Hi0X.js} +1 -1
- package/dist/assets/localization-CKs8paiI.js +1 -0
- package/dist/assets/{lock.svg-xPuKHQ-O.js → lock.svg-COUP8tyO.js} +1 -1
- package/dist/assets/{log-BCe-iHkk.js → log-C9DU0cCG.js} +1 -1
- package/dist/assets/logger-BAwrOeMG.js +1 -0
- package/dist/assets/{login-CJ9QT17a.js → login-Bnu0F5eS.js} +1 -1
- package/dist/assets/{login-oauth-callback-Bn54mlE7.js → login-oauth-callback-C2SqP1bW.js} +1 -1
- package/dist/assets/{logo-uploader-Cct_Tgp9.js → logo-uploader-DgG1moIj.js} +3 -3
- package/dist/assets/{lost-passport-JFuuT2LW.js → lost-passport-DtNgA2rm.js} +3 -3
- package/dist/assets/{lottie-react.esm-Bqal_rmd.js → lottie-react.esm-M5fKy3fg.js} +1 -1
- package/dist/assets/omit-CxEI1_wm.js +1 -0
- package/dist/assets/{open-window-okQkGylu.js → open-window-RuAUils2.js} +1 -1
- package/dist/assets/{over-due-invoice-payment-CorS-0Po.js → over-due-invoice-payment-DhK6jNNQ.js} +1 -1
- package/dist/assets/{overview-CDbOiDio.js → overview-BVSh5o7h.js} +1 -1
- package/dist/assets/{page-header-BuVm9h5d.js → page-header-BycH8S9r.js} +1 -1
- package/dist/assets/{passport-item-BejfMK1X.js → passport-item-D7sQ_FxN.js} +1 -1
- package/dist/assets/{permission-B4PsiDVD.js → permission-C79TpiNV.js} +1 -1
- package/dist/assets/preferences-DfEKF75U.js +1 -0
- package/dist/assets/profile-embed-LKUTgx9A.js +1 -0
- package/dist/assets/publish-resource-BzjWpXe-.js +1 -0
- package/dist/assets/{question-mark-circle.svg-YsMacl4Q.js → question-mark-circle.svg-B4stD6SS.js} +1 -1
- package/dist/assets/{raf-schd.esm-BZ5FB5HD.js → raf-schd.esm-CHNehTG3.js} +1 -1
- package/dist/assets/{react-beautiful-dnd.esm-ByowwdW2.js → react-beautiful-dnd.esm-DwkY3sYg.js} +1 -1
- package/dist/assets/{react-stripe.esm-DjDk8Ggj.js → react-stripe.esm-BGPt6Wk8.js} +1 -1
- package/dist/assets/{runtime-DaXsDIcp.js → runtime-Sobb0AXT.js} +1 -1
- package/dist/assets/{sanitize-CCb_t50W.js → sanitize-DSvGhymV.js} +1 -1
- package/dist/assets/sdk-DzqJHXyQ.js +1 -0
- package/dist/assets/{section-BkD2aamt.js → section-BqJWD2MT.js} +1 -1
- package/dist/assets/{security-BGWWSAkV.js → security-BwF3YzTL.js} +1 -1
- package/dist/assets/{server-logo-notext.svg-BqCXmsOm.js → server-logo-notext.svg-CKQB0tIp.js} +1 -1
- package/dist/assets/session-BV5HR2vD.js +1 -0
- package/dist/assets/{setup-9fDp38sd.js → setup-Bll35TpG.js} +3 -3
- package/dist/assets/{shorten-label-BG5illgA.js → shorten-label-BKNhALWt.js} +1 -1
- package/dist/assets/{simple-select-BMWDBGsb.js → simple-select-DiucBfFO.js} +1 -1
- package/dist/assets/{spaces-CISW823t.js → spaces-D2uHzDSf.js} +1 -1
- package/dist/assets/{start-BtjRI2FT.js → start-CCbI2h7_.js} +1 -1
- package/dist/assets/{starting-progress-BvCdculj.js → starting-progress-C2KBufhS.js} +1 -1
- package/dist/assets/{status-kBSo0EE3.js → status-fhCB_pM_.js} +1 -1
- package/dist/assets/{step-actions-CSysf55Z.js → step-actions-C6aMtUZh.js} +1 -1
- package/dist/assets/{studio-DRi8O4nl.js → studio-B-QwZrdc.js} +1 -1
- package/dist/assets/{switch-control-BE5x5QTG.js → switch-control-88oLMAWm.js} +1 -1
- package/dist/assets/{table-tips-BfdUOZWj.js → table-tips-ZIxKRomr.js} +1 -1
- package/dist/assets/{team-DA9xMdEQ.js → team-DplrCM_m.js} +1 -1
- package/dist/assets/{traffic-BQj5L64I.js → traffic-BU5sjdLg.js} +1 -1
- package/dist/assets/{transfer-DQ-esQ54.js → transfer-DWvn8JDa.js} +1 -1
- package/dist/assets/{unsubscribe-dC1x4NuC.js → unsubscribe-DPIGic1H.js} +1 -1
- package/dist/assets/{use-mobile-DHiqEjn5.js → use-mobile-BhzP2Rp3.js} +1 -1
- package/dist/assets/{use-mobile-DapluIyS.js → use-mobile-BtGrkCtZ.js} +1 -1
- package/dist/assets/{use-server-logo-BBlO0k2-.js → use-server-logo-BFuFRBQG.js} +1 -1
- package/dist/assets/useAsync-DGzYJlYv.js +1 -0
- package/dist/assets/{useAsync-Dk1Ydzz6.js → useAsync-DcK0UTnz.js} +1 -1
- package/dist/assets/{useLocalStorage-CVZc_3z4.js → useLocalStorage-BRPtTalQ.js} +1 -1
- package/dist/assets/{useSetState-BWrXo9eH.js → useSetState-DFuQZPPV.js} +1 -1
- package/dist/assets/{user-center-Dx-CKzHU.js → user-center-D4QgyhnU.js} +4 -4
- package/dist/assets/{user-sessions-CP2hMWvQ.js → user-sessions-C2LvHnd6.js} +1 -1
- package/dist/assets/{util-DLU48yb8.js → util-BGfTex9R.js} +1 -1
- package/dist/assets/{util-Cn9ZyU8l.js → util-DtXj9fc3.js} +1 -1
- package/dist/assets/{vendor-arcblock-BEuhHuNQ.js → vendor-arcblock-B78OG6SS.js} +1 -1
- package/dist/assets/{vendor-hooks-uwq5Zgdd.js → vendor-hooks-HB6DqcLv.js} +1 -1
- package/dist/assets/{vendor-mui-core-BwwTYUH3.js → vendor-mui-core-DWYIngcn.js} +1 -1
- package/dist/assets/{vendor-mui-x-DDx3HEvj.js → vendor-mui-x-nEbm5eNb.js} +1 -1
- package/dist/assets/vendor-react-Dvs43sk9.js +37 -0
- package/dist/assets/{vendor-utils-DQY0X1ND.js → vendor-utils-J7aLFpEq.js} +1 -1
- package/dist/assets/{vendor-ux-BglKGRhr.js → vendor-ux-Dln42oC3.js} +1 -1
- package/dist/assets/{wrap-locale-DOTYikON.js → wrap-locale-BylAyLRV.js} +1 -1
- package/dist/assets/{zh-BcwVs5BX.js → zh-C3O8IIjK.js} +1 -1
- package/dist/index.html +7 -7
- package/dist/service-worker.js +1 -1
- package/package.json +24 -24
- package/dist/assets/api-CpymM8cn.js +0 -1
- package/dist/assets/button-CWzJXH1i.js +0 -1
- package/dist/assets/click-to-copy-DPQ0tcO7.js +0 -1
- package/dist/assets/cloneDeep-BnFQZ0zY.js +0 -1
- package/dist/assets/domains-D8HTnCBf.js +0 -1
- package/dist/assets/engine-C3CQWke3.js +0 -1
- package/dist/assets/get-safe-url-Cch2GZCp.js +0 -1
- package/dist/assets/index-C4mYBCsd.js +0 -1
- package/dist/assets/localization-CJSvysj8.js +0 -1
- package/dist/assets/logger-Cf2apEtv.js +0 -1
- package/dist/assets/omit-pzenKe9G.js +0 -1
- package/dist/assets/preferences-DmEdhu1e.js +0 -1
- package/dist/assets/profile-embed-BK2tobXZ.js +0 -1
- package/dist/assets/publish-resource-M4It07oz.js +0 -1
- package/dist/assets/sdk-CzxAlOgp.js +0 -1
- package/dist/assets/session-DgH_dTEB.js +0 -1
- package/dist/assets/useAsync-CQLW7qpa.js +0 -1
- package/dist/assets/vendor-react-x2lQvn4m.js +0 -38
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as E,A as k}from"./vendor-utils-
|
|
1
|
+
import{C as E,A as k}from"./vendor-utils-J7aLFpEq.js";import{O as T,Z as j,c as M}from"./index-CgCJ2qDh.js";import{r as e}from"./vendor-react-Dvs43sk9.js";import{T as B}from"./vendor-ux-Dln42oC3.js";import{u as D}from"./use-mobile-BhzP2Rp3.js";import{D as H,j as o,ak as w,a6 as I}from"./vendor-mui-core-DWYIngcn.js";import"./vendor-arcblock-B78OG6SS.js";import"./vendor-hooks-HB6DqcLv.js";import"./lottie-web-4koyQiv_.js";function K(){const{info:x,inService:g}=T(),{blocklet:y}=j(),{locale:u}=B(),p=e.useRef(null),r=H(),[L,R]=e.useState(0),f=D(),[t,S]=e.useState(!0),s=e.useRef(null);let a="";g?a=M.WELLKNOWN_SERVICE_PATH_PREFIX:a=x.routing.adminPath;const c=new URLSearchParams;g?c.set("appUrl",window.blocklet.appUrl):c.set("authKey","__sst"),c.set("schemaKey",E(window.location.origin,a,`/api/theme?id=${encodeURIComponent(y.meta.did)}`));const l=e.useCallback(()=>{if(s.current){const n=k(JSON.parse(JSON.stringify(r)),["palette","typography","shape","direction","breakpoints","mixins","shadows","transitions","zIndex"]);s.current.contentWindow.postMessage({type:"SEND_THEME",payload:n},window.location.origin)}},[r]),d=e.useCallback(()=>{s.current&&s.current.contentWindow.postMessage({type:"SEND_LOCALE",payload:u},window.location.origin)},[u]);return e.useEffect(()=>{const n=i=>{i.origin===window.location.origin&&(i.data.type==="REQUEST_THEME"&&l(),i.data.type==="THEME_BUILDER_LOADED"&&(d(),S(!1)))};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},[l,d]),e.useEffect(()=>{t===!1&&l()},[r,t,l]),e.useEffect(()=>{t===!1&&d()},[u,t,d]),e.useEffect(()=>{const n=document.querySelector("#arc__dashboard-main"),i=document.querySelector(".dashboard-content"),m=()=>{if(p.current){const{height:b}=n.getBoundingClientRect(),{top:C}=i.getBoundingClientRect(),{top:_}=p.current.getBoundingClientRect();let h=b-_+C-(f?108:164);f&&(h=Math.min(h,600)),R(h)}};return m(),window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m)}},[f,r]),o.jsxs(o.Fragment,{children:[o.jsx(w,{ref:p}),t&&o.jsx(w,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"500px"},children:o.jsx(I,{})}),o.jsx("iframe",{title:"Theme Builder",ref:s,src:`${E(window.location.origin,a,"/hosted/theme-builder/")}?${c.toString()}`,style:{border:0,width:"100%",height:`${L}px`,display:t?"none":"block"}})]})}export{K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cu as o,cv as l,cw as r,cx as n}from"./index-
|
|
1
|
+
import{cu as o,cv as l,cw as r,cx as n}from"./index-CgCJ2qDh.js";import{r as e}from"./vendor-react-Dvs43sk9.js";const i=Object.freeze(Object.defineProperty({__proto__:null,default:o},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,default:l},Symbol.toStringTag,{value:"Module"})),d=Object.freeze(Object.defineProperty({__proto__:null,default:r},Symbol.toStringTag,{value:"Module"})),s=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"})),f=t=>e.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.0608 6.75011L11.5304 7.28044L8.70722 10.1036C8.31669 10.4942 7.68353 10.4942 7.293 10.1036L4.46978 7.28044L3.93945 6.75011L5.00011 5.68945L5.53044 6.21978L8.00011 8.68945L10.4698 6.21978L11.0001 5.68945L12.0608 6.75011Z",fill:"currentColor"}));export{d as E,u as L,i as P,s as T,f as l};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{H as N,T as E,z as U,S as R,M as H,C as F}from"./vendor-ux-
|
|
1
|
+
import{H as N,T as E,z as U,S as R,M as H,C as F}from"./vendor-ux-Dln42oC3.js";import{O as V,c as T}from"./index-CgCJ2qDh.js";import{j as e,D as W,ak as u,b4 as Z,T as y,am as G,bd as K,I as $,bV as X,bW as q,a6 as J,y as Q,x as Y,bb as ee,M as te,bX as oe,at as re}from"./vendor-mui-core-DWYIngcn.js";import{p as ae}from"./util-DtXj9fc3.js";import{r as s,L as se}from"./vendor-react-Dvs43sk9.js";import{u as ne}from"./useLocalStorage-BRPtTalQ.js";import{M as _}from"./index-CW67obch.js";import{d as ie,e as z}from"./vendor-utils-J7aLFpEq.js";import{S as I}from"./shorten-label-BKNhALWt.js";import{r as O}from"./index-BaBIefeb.js";import{u as le}from"./team-DplrCM_m.js";import"./vendor-hooks-HB6DqcLv.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-B78OG6SS.js";import"./base32-DBDFptL1.js";import"./session-BV5HR2vD.js";const B=s.createContext({}),{Provider:ce,Consumer:Oe}=B;function de(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function ue({children:t,scope:l="",categories:o=[],showScope:n,scopeFormatter:p}){const{api:g,info:L}=V(),[m,h]=s.useState([]),[c,x]=s.useState({total:0,pageSize:de(),pageCount:0,page:1}),[f,d]=s.useState(!1),[v,r]=s.useState(""),[i,j]=ne(`audit-log-category-${l}`,"all"),w=[{value:"all",label:"All",description:""},{value:"blocklet",label:"Blocklet Management",description:""},{value:"server",label:"Server Management",description:""},{value:"team",label:"Team Management",description:""},{value:"security",label:"Security",description:""},{value:"certificates",label:"Certificate Management",description:""},{value:"integrations",label:"Integration Management",description:""},{value:"gateway",label:"Gateway",description:""}].filter(b=>o.length?b.value==="all"||o.includes(b.value):!0),S=async({page:b=1,pageSize:a=20,silent:k=!0}={})=>{if(!f){k||d(!0);try{const C=await g.getAuditLogs({input:{paging:{page:b,pageSize:a},category:i==="all"?"":i,scope:l,actionOrContent:v}});n&&(C.list||[]).forEach(A=>{A.scope!==L.did&&(A.link=`/blocklets/${A.scope}/components`)}),h(C.list),x(C.paging),d(!1)}catch(C){N.error(C.message),d(!1)}}};s.useEffect(()=>{localStorage.setItem("audit-log-page-size",c.pageSize)},[c.pageSize]),s.useEffect(()=>{S({page:1,pageSize:c.pageSize,silent:!1})},[]),s.useEffect(()=>{S({page:1,pageSize:c.pageSize,silent:!1})},[i,v]);const P={loading:f,fetch:S,filter:{category:i,scope:l},categories:w,setCategory:j,data:m,paging:c,setPaging:x,showScope:n,scopeFormatter:p,actionOrContent:v,setActionOrContent:r};return e.jsx(ce,{value:{auditLogs:P},children:t})}function D(){const{auditLogs:t}=s.useContext(B);return t}function pe(t){if(!t)return[];const l=/\[([^\]]+)\]\(([^)]+)\)/g,o=[];let n;for(;(n=l.exec(t))!==null;)o.push({text:n[1],url:n[2]});return o}const ge=`
|
|
2
2
|
<svg style="width:38px;height:38px;" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_606_96)"/>
|
|
4
4
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_606_96)"/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{J as A,j as e,ak as t,a6 as E,Q as l,b3 as W,T as o,b4 as z,am as I,b5 as R,b6 as L,a5 as T,a3 as F,a$ as f,b1 as O}from"./vendor-mui-core-
|
|
1
|
+
import{J as A,j as e,ak as t,a6 as E,Q as l,b3 as W,T as o,b4 as z,am as I,b5 as R,b6 as L,a5 as T,a3 as F,a$ as f,b1 as O}from"./vendor-mui-core-DWYIngcn.js";import{r as x}from"./vendor-react-Dvs43sk9.js";import{l as D}from"./vendor-hooks-HB6DqcLv.js";import{C as b}from"./vendor-utils-J7aLFpEq.js";import{a as B,c as u,t as H,H as U,G as K,e as M}from"./index-CgCJ2qDh.js";import{K as p}from"./landing-page-DOi_4Ca6.js";import{T as Q,F as y}from"./vendor-ux-Dln42oC3.js";import{W as $}from"./did-address-CdYAzzjR.js";import"./vendor-arcblock-B78OG6SS.js";import"./lottie-web-4koyQiv_.js";function re(){const{searchParams:r}=new URL(window.location.href),{session:d}=B(),{t:c}=Q(),m=r.get("client_id"),_=r.get("scope")||"profile:read",[g,w]=x.useState(_.split(" ").filter(Boolean)),v=A("(max-width: 600px)"),k=b(window.location.origin,u.WELLKNOWN_SERVICE_PATH_PREFIX,"/oauth/authorize"),C=x.useCallback(i=>i?i.startsWith("http")?i:`${b(u.WELLKNOWN_SERVICE_PATH_PREFIX,"/api/media/upload",window.blocklet.appPid)}/${i}`:"",[]),[h,j]=D({client:null,loading:!0});x.useEffect(()=>{(async()=>{const{data:n}=await M.get("/oauth/client",{params:{clientId:m}});j({client:n,loading:!1})})()},[m,j]);const S=i=>{i!=="profile:read"&&w(n=>n.includes(i)?n.filter(P=>P!==i):[...n,i])};if(h.loading||!d?.user)return e.jsx(p,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(E,{})})});if(!h.client)return e.jsx(p,{did:window.blocklet?.appPid,standalone:!0,children:e.jsx(t,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:e.jsx(H,{style:{backgroundColor:"transparent"},status:"error",title:c("notFoundOauthClient"),extra:e.jsx(l,{variant:"outlined",color:"primary",size:"small",startIcon:e.jsx(W,{}),href:"/",style:{borderRadius:4},children:c("connectCli.home")})})})});const{client:s}=h,{user:a}=d,N=(s.scope||"").split(" ");return e.jsxs(p,{did:window.blocklet?.appPid,standalone:!0,children:[e.jsx(U,{children:e.jsx("title",{children:c("oauth.authorize")})}),e.jsx(K,{hideCloseButton:!0,children:e.jsxs(t,{sx:{display:"flex",flexDirection:"column",p:{xs:2,lg:3,xl:4},pt:{xs:3,xl:4},bgcolor:"background.paper"},className:"page-authorize",children:[e.jsxs(t,{sx:{textAlign:"center",mb:2},children:[e.jsxs(t,{sx:{display:"flex",alignItems:"center",justifyContent:"center",mb:2},children:[e.jsx(y,{src:window.blocklet?.appLogo,alt:"Server",width:48,height:48}),e.jsxs(t,{sx:{mx:2,display:"flex",alignItems:"center","& .dot":{width:8,height:8,borderRadius:"50%",bgcolor:"divider",mx:.5}},children:[e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"}),e.jsx(t,{className:"dot"})]}),e.jsx(y,{src:C(s.logo_uri),alt:s.client_name,width:48,height:48})]}),e.jsxs(o,{sx:{mb:1,fontSize:"1.2rem","& .app-name":{color:"primary.main"}},children:["Authorize ",e.jsx("span",{className:"app-name",children:s.client_name})]})]}),e.jsxs(t,{sx:{display:"flex",alignItems:"center",width:"100%",overflow:"hidden",mb:3,p:2,border:"1px solid",borderColor:"divider",borderRadius:1},className:"info",children:[e.jsx(z,{src:a.avatar,style:{width:48,height:48,backgroundColor:"transparent",marginRight:16}}),e.jsxs(t,{sx:{flex:1,overflow:"hidden"},children:[e.jsx(I,{title:a.fullName,children:e.jsx(t,{className:"name",sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:a.fullName})}),e.jsx(t,{className:"did",children:e.jsx($,{compact:!0,responsive:!1,did:a.did,showQrcode:!v})})]})]}),e.jsxs(o,{variant:"subtitle1",sx:{mb:2,fontWeight:500},children:["Allow ",s.client_name," to do the following on your behalf:"]}),e.jsxs(t,{sx:{border:"1px solid",borderColor:"divider",borderRadius:2,overflow:"hidden"},children:[e.jsx(t,{sx:{p:2},children:e.jsx(R,{children:Object.entries(u.OAUTH_SCOPES).filter(([i])=>N.includes(i)).map(([i,n])=>e.jsx(L,{control:e.jsx(T,{checked:g.includes(i),onChange:()=>S(i),disabled:i==="profile:read"||["blocklet:read","blocklet:write"].includes(i)&&!["owner","admin","member"].includes(a.role),color:"primary",sx:{"&.Mui-checked":{color:"success.main"}}}),label:e.jsx(t,{children:e.jsx(o,{variant:"body1",sx:{fontWeight:500},children:n})}),sx:{mb:0}},i))})}),(s.tos_uri||s.policy_uri)&&e.jsxs(e.Fragment,{children:[e.jsx(F,{}),e.jsx(t,{sx:{height:1,bgcolor:"divider"}}),e.jsx(t,{sx:{p:2,color:"text.secondary"},children:e.jsxs(o,{variant:"body2",children:["By authorize the access, you also agree with the"," ",!!s.tos_uri&&e.jsx(f,{href:s.tos_uri,target:"_blank",children:"Terms of Use"}),!!s.tos_uri&&!!s.policy_uri&&" and ",!!s.policy_uri&&e.jsx(f,{href:s.policy_uri,target:"_blank",children:"Privacy Policy"})]})})]})]}),e.jsxs("form",{method:"POST",action:k,children:[r.get("client_id")&&e.jsx("input",{type:"hidden",name:"client_id",value:r.get("client_id")}),r.get("response_type")&&e.jsx("input",{type:"hidden",name:"response_type",value:r.get("response_type")}),r.get("redirect_uri")&&e.jsx("input",{type:"hidden",name:"redirect_uri",value:r.get("redirect_uri")}),r.get("code_challenge")&&e.jsx("input",{type:"hidden",name:"code_challenge",value:r.get("code_challenge")}),r.get("code_challenge_method")&&e.jsx("input",{type:"hidden",name:"code_challenge_method",value:r.get("code_challenge_method")}),r.get("state")&&e.jsx("input",{type:"hidden",name:"state",value:r.get("state")}),e.jsx("input",{type:"hidden",name:"scope",value:g.join(" ")}),e.jsx(t,{sx:{mt:"auto",pt:3},children:e.jsxs(O,{direction:"row",spacing:2,children:[e.jsx(l,{variant:"outlined",size:"large",fullWidth:!0,type:"submit",name:"action",value:"deny",children:"Cancel"}),e.jsx(l,{variant:"contained",size:"large",fullWidth:!0,type:"submit",name:"action",value:"allow",children:"Authorize"})]})}),r.get("redirect_uri")&&e.jsxs(t,{sx:{mt:3,textAlign:"center"},children:[e.jsx(o,{variant:"body2",sx:{color:"text.secondary"},children:"You will be redirected to"}),e.jsx(o,{variant:"body2",sx:{color:"text.secondary",wordBreak:"break-all"},children:r.get("redirect_uri")})]}),e.jsx(t,{sx:{mt:2,textAlign:"center"},children:e.jsxs(o,{variant:"body2",children:["Not you?"," ",e.jsx(l,{variant:"text",color:"primary",onClick:()=>d.switchDid(),sx:{p:0,minWidth:"auto",textTransform:"none",verticalAlign:"baseline",fontWeight:"inherit",fontSize:"inherit","&:hover":{background:"none",textDecoration:"underline"}},children:"Use another account"})]})})]})]})})]})}export{re as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as p}from"./vendor-react-
|
|
1
|
+
import{r as p}from"./vendor-react-Dvs43sk9.js";import{D as L,j as f,b7 as T,T as j,ak as k,W as t}from"./vendor-mui-core-DWYIngcn.js";import{E as C}from"./index-C-AuC2Mk.js";import{a as D}from"./vendor-utils-J7aLFpEq.js";const A=a=>{const h=new Date(Math.min(...a)),r=(new Date(Math.max(...a))-h)/(1e3*60);return u=>{if(r<=10){const c=(a.length-a.length%r)/r;return u%c===0}const d=(a.length-a.length%6)/6;return u%d===0}};function S({title:a="",total:h=0,history:s=[],valueFn:b=n=>n,xAxisFormat:r=n=>n,visualMapPieces:u=[],markLineData:v={},extraInfo:d=null,empty:w=null,onHover:c=()=>{},hoverIndex:i=null}){const n=L(),o=p.useRef(null),y=p.useMemo(()=>D(s)?[]:s.map(e=>r(e.date)),[s,r]);p.useEffect(()=>{if(!o.current||i?.ref===o)return;const e=o.current.getEchartsInstance(),l=i?.seriesIndex,x=y.findIndex(g=>g===i?.dataValue);i&&x!==-1?e.dispatchAction({type:"showTip",seriesIndex:l,dataIndex:x}):(e.dispatchAction({type:"hideTip"}),e.dispatchAction({type:"showTip",seriesIndex:0,dataIndex:-1}))},[i?.dataIndex]);const m=p.useCallback(()=>{c?.(null)},[c]);if(p.useEffect(()=>{if(o.current){const e=o.current.getEchartsInstance(),l=e.getDom();return l.addEventListener("mouseleave",m),()=>{l.removeEventListener("mouseleave",m),e.dispose()}}},[m]),D(s))return w||null;const E=Math.max(...s.map(e=>e.value),h||0,0),M={tooltip:{trigger:"axis",formatter(e){const l=e[0].data,x=b(l),{seriesIndex:g,dataIndex:I}=e[0];return c?.({seriesIndex:g,dataIndex:I,dataValue:y[I],ref:i?.ref||o}),`${e[0].name}: <b>${x}</b>`},backgroundColor:n.palette.background.paper,borderColor:n.palette.divider,textStyle:{color:n.palette.text.primary},extraCssText:`box-shadow: ${n.shadows[2]}; border-radius: 4px;`},grid:{top:"48px",left:"16px",right:"16px",bottom:"0px",containLabel:!0},xAxis:{type:"category",boundaryGap:!1,data:y,axisTick:{show:!1},splitLine:{show:!1},axisLabel:{interval:A(s.map(e=>new Date(e.date)))}},yAxis:{type:"value",axisTick:{show:!1},splitLine:{show:!1},min:0,max:E,interval:Math.ceil(E/2),axisLabel:{formatter:b,padding:[5,0,0,0]}},visualMap:{show:!1,type:"piecewise",dimension:1,seriesIndex:0,pieces:u},series:[{name:`${a} Usage`,type:"line",smooth:!0,symbol:"none",lineStyle:{color:n.palette.primary.main,width:2.5},areaStyle:{},itemStyle:{},emphasis:{disabled:!0},data:s.map(e=>e.value),markLine:v}]};return f.jsxs(T,{sx:{p:1,position:"relative"},children:[f.jsx(j,{sx:{fontSize:"16px",fontWeight:"bold",color:"text.secondary",position:"absolute",top:8,left:16,zIndex:10},children:a}),f.jsx(C,{ref:o,option:M,style:{width:"100%",height:"200px"},onEvents:{globalout:m}}),d&&f.jsx(k,{sx:{color:"text.secondary",ml:2,mt:1,fontSize:12},children:d})]})}S.propTypes={title:t.string,total:t.number,history:t.array,valueFn:t.func,xAxisFormat:t.func,visualMapPieces:t.array,markLineData:t.object,extraInfo:t.node,empty:t.node,onHover:t.func,hoverIndex:t.object};export{S as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x}from"./vendor-ux-
|
|
1
|
+
import{r as x}from"./vendor-ux-Dln42oC3.js";import{e as m}from"./vendor-react-Dvs43sk9.js";class w{constructor(e,r,o){this.name=e,this.prefix=r,this.baseEncode=o}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class g{constructor(e,r,o){if(this.name=e,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=o}decode(e){if(typeof e=="string"){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(e){return l(this,e)}}class y{constructor(e){this.decoders=e}or(e){return l(this,e)}decode(e){const r=e[0],o=this.decoders[r];if(o)return o.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const l=(t,e)=>new y({...t.decoders||{[t.prefix]:t},...e.decoders||{[e.prefix]:e}});class E{constructor(e,r,o,s){this.name=e,this.prefix=r,this.baseEncode=o,this.baseDecode=s,this.encoder=new w(e,r,o),this.decoder=new g(e,r,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const A=({name:t,prefix:e,encode:r,decode:o})=>new E(t,e,r,o),C=(t,e,r,o)=>{const s={};for(let p=0;p<e.length;++p)s[e[p]]=p;let i=t.length;for(;t[i-1]==="=";)--i;const a=new Uint8Array(i*r/8|0);let n=0,c=0,h=0;for(let p=0;p<i;++p){const u=s[t[p]];if(u===void 0)throw new SyntaxError(`Non-${o} character`);c=c<<r|u,n+=r,n>=8&&(n-=8,a[h++]=255&c>>n)}if(n>=r||255&c<<8-n)throw new SyntaxError("Unexpected end of data");return a},P=(t,e,r)=>{const o=e[e.length-1]==="=",s=(1<<r)-1;let i="",a=0,n=0;for(let c=0;c<t.length;++c)for(n=n<<8|t[c],a+=8;a>r;)a-=r,i+=e[s&n>>a];if(a&&(i+=e[s&n<<r-a]),o)for(;i.length*r&7;)i+="=";return i},d=({name:t,prefix:e,bitsPerChar:r,alphabet:o})=>A({prefix:e,name:t,encode(s){return P(s,o,r)},decode(s){return C(s,o,r,t)}}),$=d({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),v=d({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),S=d({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),U=d({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),q=d({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),B=d({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),O=d({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),j=d({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),k=d({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),D=Object.freeze(Object.defineProperty({__proto__:null,base32:$,base32hex:q,base32hexpad:O,base32hexpadupper:j,base32hexupper:B,base32pad:S,base32padupper:U,base32upper:v,base32z:k},Symbol.toStringTag,{value:"Module"})),N=m(D);var f,b;function R(){if(b)return f;b=1;const{toBuffer:t,toAddress:e,toBase58:r,toHex:o}=x(),{base32:s}=N;return f={encode:n=>{if(!n)return n;const c=t(e(n));return s.encode(c)},decode:n=>{if(!n)return n;const c=s.decode(n),h=r(c);return h.length>30?h:o(c)}},f}export{R as r};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Q,r as x}from"./vendor-react-
|
|
1
|
+
import{a as Q,r as x}from"./vendor-react-Dvs43sk9.js";import{j as e,I as D,bg as j1,Q as T,c0 as y1,O as a1,P as Z1,ai as w1,o as b1,M as k1,W as c,z as l1,ak as i,a6 as i1,bH as c1,aj as Y,b$ as L1,c1 as M1,at as G,U as R1,F as E1,c2 as J,b7 as S1,b4 as _1,ar as C1,T as C,a3 as V,b1 as O1}from"./vendor-mui-core-DWYIngcn.js";import{b as t1,G as B1,F as P1,e as H1,H as A1}from"./vendor-ux-Dln42oC3.js";import{l as I1}from"./vendor-hooks-HB6DqcLv.js";import{O as s1,ax as V1,ay as z1,M as L}from"./index-CgCJ2qDh.js";import{s as F1}from"./sanitize-DSvGhymV.js";import{F as r1,R as o1,L as H}from"./logo-uploader-DgG1moIj.js";import{e as T1}from"./edit.svg-DycWG9v3.js";import{w as h1}from"./permission-C79TpiNV.js";import{a as N1}from"./team-DplrCM_m.js";import{S as z}from"./section-BqJWD2MT.js";import"./vendor-utils-J7aLFpEq.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-B78OG6SS.js";import"./omit-CxEI1_wm.js";import"./index-BPy8_fa2.js";import"./session-BV5HR2vD.js";function n1({triggers:a=[],onEnterEdit:s,disabled:p}){const h=Q.useRef(null),[M,m]=Q.useState(!1),u=f=>{m(!1),f()},l=()=>{m(f=>!f)},o=f=>{h.current&&h.current.contains(f.target)||m(!1)};return a.length===0?e.jsx(D,{"data-cy":"schema-form-item-edit",onClick:s,disabled:p,size:"large",children:e.jsx(T1,{})}):e.jsxs(e.Fragment,{children:[e.jsx(j1,{variant:"outlined",ref:h,"aria-label":"split button",children:e.jsx(T,{size:"large","aria-controls":M?"split-button-menu":void 0,"aria-expanded":M?"true":void 0,sx:{paddingLeft:"12px",paddingRight:"12px"},onClick:l,children:e.jsx(y1,{})})}),e.jsx(a1,{sx:{zIndex:9999},open:M,anchorEl:h.current,role:void 0,placement:"bottom-end",children:e.jsx(Z1,{children:e.jsx(w1,{onClickAway:o,children:e.jsx(b1,{id:"split-button-menu",autoFocusItem:!0,children:a.map(f=>e.jsx(k1,{onClick:()=>u(f.handler),children:f.title},f.key))})})})})]})}n1.propTypes={triggers:c.arrayOf(c.shape({key:c.string.isRequired,title:c.string.isRequired,handler:c.func.isRequired})),onEnterEdit:c.func.isRequired,disabled:c.bool.isRequired};const e1=(a,s,p)=>a===null&&s&&p?"******":a?s?"******":a:"",U1=L1`
|
|
2
2
|
0%, 100% {
|
|
3
3
|
transform: scale(1) translateX(0);
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{T as fe,_ as be}from"./vendor-ux-BglKGRhr.js";import{j as e,b1 as U,T as E,ak as x,b4 as je,am as Y,I as A,bR as J,Y as se,at as ve,bB as ye,$ as we,bv as Ce,A as Z,aJ as Se,bS as Ie,R as ke,Q as W,W as k}from"./vendor-mui-core-BwwTYUH3.js";import{c as D}from"./index-dIkcxCDN.js";import{E as N}from"./empty-spinner-DoD2SObf.js";import{k as Pe,u as Re}from"./vendor-hooks-uwq5Zgdd.js";import{r as m}from"./vendor-react-x2lQvn4m.js";import{D as Q,C as G,P as ee}from"./react-beautiful-dnd.esm-ByowwdW2.js";import{S as F}from"./studio-DRi8O4nl.js";import"./vendor-utils-DQY0X1ND.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-BEuhHuNQ.js";import"./raf-schd.esm-BZ5FB5HD.js";import"./index-BEq2q2jr.js";var I={},te;function Ee(){if(te)return I;te=1,Object.defineProperty(I,"__esModule",{value:!0}),I.getVideoId=b,I.getEmbedUrl=c,I.getVideoCoverUrl=P,I.getVideoCheckUrl=y,I.getYoutubeId=r,I.getVimeoId=a,I.isVideoUrl=w;function r(s){const t=s.trim();return t.includes("youtu.be/")?t.split("youtu.be/")[1]?.split("?")[0]:t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?t.split("/shorts/")[1]?.split("?")[0]:""}function a(s){const t=s.trim();return t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("vimeo.com/video/")?t.split("/video/")[1]?.split("?")[0]:t.includes("vimeo.com/channels/")?t.split("/channels/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/groups/")?t.split("/groups/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/")?t.split("vimeo.com/")[1]?.split("?")[0]:""}const p={};function b(s){const t=s.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(p[t]||(p[t]=(()=>{const u=new URL(t);return u.host.includes("youtube.com")||u.host.includes("youtu.be")?[r(t),"youtube"]:u.host.includes("vimeo.com")?[a(t),"vimeo"]:[]})()),p[t])}const n={};function c(s,{modestbranding:t=1,controls:u=0,autoplay:g=0}={}){const j=s.trim();if(!j)return"";if(n[j]!==void 0)return n[j];const[O,l]=b(j);return l==="youtube"?n[j]=`https://www.youtube.com/embed/${O}?modestbranding=${t}&controls=${u}&autoplay=${g}`:l==="vimeo"?n[j]=`https://player.vimeo.com/video/${O}?autoplay=${g}`:n[j]="",n[j]}const d={};function P(s){const t=s.trim();if(!t)return"";if(d[t]!==void 0)return d[t];const[u,g]=b(t);return g==="youtube"?d[t]=`https://img.youtube.com/vi/${u}/mqdefault.jpg`:g==="vimeo"?d[t]=`https://i.vimeocdn.com/${u}/1000x563`:d[t]="",d[t]}function y(s){const t=s.trim();if(!t)return"";const[u,g]=b(t);return g==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${u}&format=json`:g==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${u}`:""}function w(s){const t=s.trim();return b(t).length>0}return I}var q=Ee();const re=m.lazy(()=>be(()=>import("./index-BcuyH8tS.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Oe=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Le=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ve=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,_=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,De=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,oe=5,ie=3;function Xe(){const{t:r,locale:a}=fe(),[p,b]=m.useState(!1),[n,c]=m.useState(!1),[d,P]=m.useState([]),[y,w]=m.useState([]),[s,t]=m.useState(""),[u,g]=m.useState(""),[j,O]=m.useState(Date.now()),l=Pe(async()=>{const i=await(await fetch(_)).json();return P(i.screenshots||[]),w(i.videos?.filter(h=>!!h)||[]),i}),f=m.useRef(null),C=m.useRef(null);if(l.loading&&!l.data)return e.jsx(F,{children:e.jsx(N,{size:40})});if(l.error)return e.jsx(F,{children:e.jsx(U,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(E,{sx:{color:"error.main",fontWeight:"bold"},children:l.error.message})})});const T=async o=>{const i=o.filter(h=>!!h);w(i),await fetch(De,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:i})})},le=async o=>{const i=Array.from(y),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),await T(i)},ce=async o=>{const i=Array.from(d),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),P(i),await fetch(`${_}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:i})})},B=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ce(o):o.source.droppableId==="videos"&&await le(o),l.runAsync())},H=o=>{g(o.trim()),c(!0)},K=async(o,i="")=>{let h=[];i?h=o?y.map(v=>v===i?o.trim():v):y.filter(v=>v!==i):o&&(h=[...y,o.trim()]),g(""),c(!1),(o||i)&&await T(h),l.runAsync()},de=o=>{b(!0),t(o)},M=()=>{b(!1),t("")};function ue(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],i=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx($,{title:r("common.logo"),rules:o,tips:i,children:e.jsx(x,{sx:{flex:1,cursor:"pointer"},children:e.jsx(je,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ve}?t=${j}`,onClick:()=>f.current?.open()})})})}function pe(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${oe}`},{label:r("studio.size"),value:"<5MB"}],i=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx($,{title:r("common.screenshot"),tips:i,rules:o,children:e.jsx(Q,{onDragEnd:B,children:e.jsx(G,{droppableId:"screenshots",direction:"horizontal",children:(v,L)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:L.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:L.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[d.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,V)=>{const X=`${_}/${S}`;return e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:V.isDragging?"scale(1.05)":"none",boxShadow:V.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:X,onClick:()=>de(S),style:{cursor:"pointer"}}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(X,{method:"DELETE"}),l.runAsync()},children:e.jsx(J,{})})})]})}},S)),v.placeholder,d.length<oe&&h()]})})})});function h(){return e.jsx(x,{onClick:()=>C.current?.open(),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function he(){const o=[{label:r("studio.count"),value:`1~${ie}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],i=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs($,{title:r("studio.video"),tips:i,rules:o,children:[e.jsx(Q,{onDragEnd:B,children:e.jsx(G,{droppableId:"videos",direction:"horizontal",children:(v,L)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:L.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:L.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[y.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,V)=>e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:V.isDragging?"scale(1.05)":"none",boxShadow:V.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:q.getVideoCoverUrl(S),onClick:()=>H(S),style:{cursor:"pointer"}}),e.jsx(x,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>H(S),children:e.jsx(ae,{})}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>K(null,S),children:e.jsx(J,{})})})]})},S)),v.placeholder,y.length<ie&&h()]})})}),n&&e.jsx(ne,{t:r,handleOperateVideo:K,defaultUrl:u,videos:y})]});function h(){return e.jsx(x,{onClick:()=>c(!0),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function me(){return e.jsx(se,{open:p,onClose:M,maxWidth:"xl",slotProps:{paper:{style:{backgroundColor:"transparent",boxShadow:"none"}}},children:e.jsx("img",{src:`${_}/${s}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:M})})}function xe(){return e.jsxs(m.Suspense,{fallback:e.jsx(N,{size:40}),children:[e.jsx(re,{ref:f,locale:a,popup:!0,onUploadFinish:()=>{f.current?.close(),O(Date.now()),l.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Oe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(re,{ref:C,locale:a,popup:!0,onUploadFinish:()=>{C.current?.close(),l.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Le,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-d.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const ge=`https://www.arcblock.io/docs/blocklet-store/${a}/supplying-images`;return e.jsx(F,{children:e.jsxs(Te,{children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(E,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:l.data?.title})}),e.jsxs(E,{variant:"body2",sx:{color:"text.secondary"},children:[r("studio.description")," ",e.jsx("a",{href:ge,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),ue(),pe(),he(),me(),xe()]})})}function $({title:r,rules:a,tips:p,children:b}){return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",mb:4},children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(E,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(U,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:a.map(c=>n(c.label,c.value))}),p.map(c=>e.jsx(x,{sx:{fontSize:"13px",opacity:.8},children:n(c.label,c.value)}))]}),b]});function n(c,d){return e.jsxs(x,{component:"span",children:[e.jsxs(x,{component:"span",sx:{color:"#555",mr:.5},children:[c,":"]}),e.jsx(x,{component:"span",sx:{color:"#007ec6"},children:d})]})}}$.propTypes={title:k.string.isRequired,rules:k.array.isRequired,tips:k.array.isRequired,children:k.node.isRequired};function ne({handleOperateVideo:r,t:a,defaultUrl:p="",videos:b}){const[n,c]=m.useState(p),[d,P]=m.useState(!1),[y,w]=m.useState(!1),s=m.useRef(n),t=n!==p&&b.includes(n),u=!n&&p,g=!t&&(n&&n!==s.current||d),j=!!navigator.clipboard?.readText,{run:O}=Re(l,{wait:500,leading:!0});return e.jsxs(se,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(ye,{children:a(p?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(we,{children:[e.jsx(Ce,{fullWidth:!0,value:n,onChange:f=>{const C=f.target.value.trim();c(C),C?O(C):w(!1)},placeholder:a("studio.videoInputLabel"),endAdornment:n?e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:()=>{c(""),l("")},children:e.jsx(Se,{})})}):j&&e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();c(f),l(f)}catch(f){console.error(f)}},children:e.jsx(Ie,{})})})}),e.jsxs(x,{sx:{mb:2,mt:.5},children:[t&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.duplicateVideo")}),!t&&y&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.videoDialogNoSrc")})]}),s.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${s.current}`,src:q.getEmbedUrl(s.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:d?e.jsx(N,{size:40}):e.jsx(E,{variant:"h5",sx:{color:"text.secondary"},children:e.jsx(ae,{})})})]}),e.jsxs(ke,{children:[e.jsx(W,{onClick:()=>r(),children:a("studio.cancel")}),u&&e.jsx(W,{variant:"contained",color:"error",onClick:()=>r(null,p),children:a("studio.delete")}),g&&e.jsx(W,{variant:"contained",onClick:()=>l(n),disabled:!n||d,children:a("studio.preview")}),!u&&!g&&e.jsx(W,{variant:"contained",onClick:()=>r(s.current),disabled:!s.current||p===s.current||t,children:a("studio.confirm")})]})]});function l(f){s.current="";const C=q.getVideoCheckUrl(f);w(f?!C:!1),C&&(P(!0),fetch(C).then(T=>{T.ok?(s.current=f,w(!1)):w(!0)}).catch(()=>{w(!0)}).finally(()=>P(!1)))}}ne.propTypes={handleOperateVideo:k.func.isRequired,t:k.func.isRequired,defaultUrl:k.string,videos:k.array.isRequired};function ae(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Te=ve.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-LvmCZD51.js","assets/index-CgCJ2qDh.js","assets/vendor-mui-core-DWYIngcn.js","assets/vendor-react-Dvs43sk9.js","assets/vendor-ux-Dln42oC3.js","assets/vendor-utils-J7aLFpEq.js","assets/vendor-hooks-HB6DqcLv.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/vendor-arcblock-B78OG6SS.js","assets/index-DrVXX4fX.css","assets/index-BPy8_fa2.js","assets/index-DRYJ0xIl.js","assets/index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{T as fe,_ as be}from"./vendor-ux-Dln42oC3.js";import{j as e,b1 as U,T as E,ak as x,b4 as je,am as Y,I as A,bR as J,Y as se,at as ve,bB as ye,$ as we,bv as Ce,A as Z,aJ as Se,bS as Ie,R as ke,Q as W,W as k}from"./vendor-mui-core-DWYIngcn.js";import{c as D}from"./index-CgCJ2qDh.js";import{E as N}from"./empty-spinner-C6wgiyAQ.js";import{k as Pe,u as Re}from"./vendor-hooks-HB6DqcLv.js";import{r as m}from"./vendor-react-Dvs43sk9.js";import{D as Q,C as G,P as ee}from"./react-beautiful-dnd.esm-DwkY3sYg.js";import{S as F}from"./studio-B-QwZrdc.js";import"./vendor-utils-J7aLFpEq.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-B78OG6SS.js";import"./raf-schd.esm-CHNehTG3.js";import"./index-cCGBx0sL.js";var I={},te;function Ee(){if(te)return I;te=1,Object.defineProperty(I,"__esModule",{value:!0}),I.getVideoId=b,I.getEmbedUrl=c,I.getVideoCoverUrl=P,I.getVideoCheckUrl=y,I.getYoutubeId=r,I.getVimeoId=a,I.isVideoUrl=w;function r(s){const t=s.trim();return t.includes("youtu.be/")?t.split("youtu.be/")[1]?.split("?")[0]:t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?t.split("/shorts/")[1]?.split("?")[0]:""}function a(s){const t=s.trim();return t.includes("/embed/")?t.split("/embed/")[1]?.split("?")[0]:t.includes("vimeo.com/video/")?t.split("/video/")[1]?.split("?")[0]:t.includes("vimeo.com/channels/")?t.split("/channels/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/groups/")?t.split("/groups/")[1]?.split("/")[1]?.split("?")[0]:t.includes("vimeo.com/")?t.split("vimeo.com/")[1]?.split("?")[0]:""}const p={};function b(s){const t=s.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(p[t]||(p[t]=(()=>{const u=new URL(t);return u.host.includes("youtube.com")||u.host.includes("youtu.be")?[r(t),"youtube"]:u.host.includes("vimeo.com")?[a(t),"vimeo"]:[]})()),p[t])}const n={};function c(s,{modestbranding:t=1,controls:u=0,autoplay:g=0}={}){const j=s.trim();if(!j)return"";if(n[j]!==void 0)return n[j];const[O,l]=b(j);return l==="youtube"?n[j]=`https://www.youtube.com/embed/${O}?modestbranding=${t}&controls=${u}&autoplay=${g}`:l==="vimeo"?n[j]=`https://player.vimeo.com/video/${O}?autoplay=${g}`:n[j]="",n[j]}const d={};function P(s){const t=s.trim();if(!t)return"";if(d[t]!==void 0)return d[t];const[u,g]=b(t);return g==="youtube"?d[t]=`https://img.youtube.com/vi/${u}/mqdefault.jpg`:g==="vimeo"?d[t]=`https://i.vimeocdn.com/${u}/1000x563`:d[t]="",d[t]}function y(s){const t=s.trim();if(!t)return"";const[u,g]=b(t);return g==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${u}&format=json`:g==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${u}`:""}function w(s){const t=s.trim();return b(t).length>0}return I}var q=Ee();const re=m.lazy(()=>be(()=>import("./index-LvmCZD51.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(r=>({default:r.Uploader}))),Oe=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Le=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ve=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,_=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,De=`${D.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,oe=5,ie=3;function Xe(){const{t:r,locale:a}=fe(),[p,b]=m.useState(!1),[n,c]=m.useState(!1),[d,P]=m.useState([]),[y,w]=m.useState([]),[s,t]=m.useState(""),[u,g]=m.useState(""),[j,O]=m.useState(Date.now()),l=Pe(async()=>{const i=await(await fetch(_)).json();return P(i.screenshots||[]),w(i.videos?.filter(h=>!!h)||[]),i}),f=m.useRef(null),C=m.useRef(null);if(l.loading&&!l.data)return e.jsx(F,{children:e.jsx(N,{size:40})});if(l.error)return e.jsx(F,{children:e.jsx(U,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(E,{sx:{color:"error.main",fontWeight:"bold"},children:l.error.message})})});const T=async o=>{const i=o.filter(h=>!!h);w(i),await fetch(De,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:i})})},le=async o=>{const i=Array.from(y),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),await T(i)},ce=async o=>{const i=Array.from(d),[h]=i.splice(o.source.index,1);i.splice(o.destination.index,0,h),P(i),await fetch(`${_}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:i})})},B=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await ce(o):o.source.droppableId==="videos"&&await le(o),l.runAsync())},H=o=>{g(o.trim()),c(!0)},K=async(o,i="")=>{let h=[];i?h=o?y.map(v=>v===i?o.trim():v):y.filter(v=>v!==i):o&&(h=[...y,o.trim()]),g(""),c(!1),(o||i)&&await T(h),l.runAsync()},de=o=>{b(!0),t(o)},M=()=>{b(!1),t("")};function ue(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],i=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx($,{title:r("common.logo"),rules:o,tips:i,children:e.jsx(x,{sx:{flex:1,cursor:"pointer"},children:e.jsx(je,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ve}?t=${j}`,onClick:()=>f.current?.open()})})})}function pe(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${oe}`},{label:r("studio.size"),value:"<5MB"}],i=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx($,{title:r("common.screenshot"),tips:i,rules:o,children:e.jsx(Q,{onDragEnd:B,children:e.jsx(G,{droppableId:"screenshots",direction:"horizontal",children:(v,L)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:L.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:L.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[d.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,V)=>{const X=`${_}/${S}`;return e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:V.isDragging?"scale(1.05)":"none",boxShadow:V.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"screenshot",src:X,onClick:()=>de(S),style:{cursor:"pointer"}}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(X,{method:"DELETE"}),l.runAsync()},children:e.jsx(J,{})})})]})}},S)),v.placeholder,d.length<oe&&h()]})})})});function h(){return e.jsx(x,{onClick:()=>C.current?.open(),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function he(){const o=[{label:r("studio.count"),value:`1~${ie}`},{label:r("studio.videoType"),value:e.jsxs(e.Fragment,{children:[e.jsx("a",{href:"https://www.youtube.com/",target:"_blank",rel:"noreferrer",children:"Youtube"}),","," ",e.jsx("a",{href:"https://vimeo.com/",target:"_blank",rel:"noreferrer",children:"Vimeo"})]})}],i=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs($,{title:r("studio.video"),tips:i,rules:o,children:[e.jsx(Q,{onDragEnd:B,children:e.jsx(G,{droppableId:"videos",direction:"horizontal",children:(v,L)=>e.jsxs(x,{ref:v.innerRef,...v.droppableProps,sx:{display:"flex",alignItems:"center",flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:L.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:L.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},children:[y.map((S,z)=>e.jsx(ee,{draggableId:S,index:z,children:(R,V)=>e.jsxs(x,{ref:R.innerRef,...R.draggableProps,...R.dragHandleProps,className:"image-wrapper",sx:{transform:V.isDragging?"scale(1.05)":"none",boxShadow:V.isDragging?"0 5px 10px rgba(0,0,0,0.15)":"none",transition:"transform 0.2s ease, box-shadow 0.2s ease"},children:[e.jsx("img",{alt:"videos",src:q.getVideoCoverUrl(S),onClick:()=>H(S),style:{cursor:"pointer"}}),e.jsx(x,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>H(S),children:e.jsx(ae,{})}),e.jsx(Y,{title:r("studio.deleteTooltip"),children:e.jsx(A,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>K(null,S),children:e.jsx(J,{})})})]})},S)),v.placeholder,y.length<ie&&h()]})})}),n&&e.jsx(ne,{t:r,handleOperateVideo:K,defaultUrl:u,videos:y})]});function h(){return e.jsx(x,{onClick:()=>c(!0),sx:{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,background:"#eee",cursor:"pointer",color:"#999"},children:"+"})}}function me(){return e.jsx(se,{open:p,onClose:M,maxWidth:"xl",slotProps:{paper:{style:{backgroundColor:"transparent",boxShadow:"none"}}},children:e.jsx("img",{src:`${_}/${s}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:M})})}function xe(){return e.jsxs(m.Suspense,{fallback:e.jsx(N,{size:40}),children:[e.jsx(re,{ref:f,locale:a,popup:!0,onUploadFinish:()=>{f.current?.close(),O(Date.now()),l.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Oe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(re,{ref:C,locale:a,popup:!0,onUploadFinish:()=>{C.current?.close(),l.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Le,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","image/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-d.length}},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const ge=`https://www.arcblock.io/docs/blocklet-store/${a}/supplying-images`;return e.jsx(F,{children:e.jsxs(Te,{children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(E,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:l.data?.title})}),e.jsxs(E,{variant:"body2",sx:{color:"text.secondary"},children:[r("studio.description")," ",e.jsx("a",{href:ge,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),ue(),pe(),he(),me(),xe()]})})}function $({title:r,rules:a,tips:p,children:b}){return e.jsxs(x,{sx:{display:"flex",flexDirection:"column",mb:4},children:[e.jsxs(U,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(E,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(U,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:a.map(c=>n(c.label,c.value))}),p.map(c=>e.jsx(x,{sx:{fontSize:"13px",opacity:.8},children:n(c.label,c.value)}))]}),b]});function n(c,d){return e.jsxs(x,{component:"span",children:[e.jsxs(x,{component:"span",sx:{color:"#555",mr:.5},children:[c,":"]}),e.jsx(x,{component:"span",sx:{color:"#007ec6"},children:d})]})}}$.propTypes={title:k.string.isRequired,rules:k.array.isRequired,tips:k.array.isRequired,children:k.node.isRequired};function ne({handleOperateVideo:r,t:a,defaultUrl:p="",videos:b}){const[n,c]=m.useState(p),[d,P]=m.useState(!1),[y,w]=m.useState(!1),s=m.useRef(n),t=n!==p&&b.includes(n),u=!n&&p,g=!t&&(n&&n!==s.current||d),j=!!navigator.clipboard?.readText,{run:O}=Re(l,{wait:500,leading:!0});return e.jsxs(se,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(ye,{children:a(p?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(we,{children:[e.jsx(Ce,{fullWidth:!0,value:n,onChange:f=>{const C=f.target.value.trim();c(C),C?O(C):w(!1)},placeholder:a("studio.videoInputLabel"),endAdornment:n?e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:()=>{c(""),l("")},children:e.jsx(Se,{})})}):j&&e.jsx(Z,{position:"end",children:e.jsx(A,{onClick:async()=>{try{const f=(await navigator.clipboard.readText()||"").trim();c(f),l(f)}catch(f){console.error(f)}},children:e.jsx(Ie,{})})})}),e.jsxs(x,{sx:{mb:2,mt:.5},children:[t&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.duplicateVideo")}),!t&&y&&e.jsx(E,{variant:"body2",color:"error",children:a("studio.videoDialogNoSrc")})]}),s.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${s.current}`,src:q.getEmbedUrl(s.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(x,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:d?e.jsx(N,{size:40}):e.jsx(E,{variant:"h5",sx:{color:"text.secondary"},children:e.jsx(ae,{})})})]}),e.jsxs(ke,{children:[e.jsx(W,{onClick:()=>r(),children:a("studio.cancel")}),u&&e.jsx(W,{variant:"contained",color:"error",onClick:()=>r(null,p),children:a("studio.delete")}),g&&e.jsx(W,{variant:"contained",onClick:()=>l(n),disabled:!n||d,children:a("studio.preview")}),!u&&!g&&e.jsx(W,{variant:"contained",onClick:()=>r(s.current),disabled:!s.current||p===s.current||t,children:a("studio.confirm")})]})]});function l(f){s.current="";const C=q.getVideoCheckUrl(f);w(f?!C:!1),C&&(P(!0),fetch(C).then(T=>{T.ok?(s.current=f,w(!1)):w(!0)}).catch(()=>{w(!0)}).finally(()=>P(!1)))}}ne.propTypes={handleOperateVideo:k.func.isRequired,t:k.func.isRequired,defaultUrl:k.string,videos:k.array.isRequired};function ae(){return e.jsxs("svg",{viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",height:48,width:48,children:[e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M28 56C43.464 56 56 43.464 56 28C56 12.536 43.464 0 28 0C12.536 0 0 12.536 0 28C0 43.464 12.536 56 28 56Z",fill:"black","fill-opacity":"0.54"}),e.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M39.6667 28L21 17.5V38.5L39.6667 28Z",fill:"white"})]})}const Te=ve.div`
|
|
3
3
|
margin-top: 24px;
|
|
4
4
|
.image-wrapper {
|
|
5
5
|
margin-bottom: 16px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as u,b4 as x,W as e}from"./vendor-mui-core-
|
|
1
|
+
import{j as u,b4 as x,W as e}from"./vendor-mui-core-DWYIngcn.js";import{$}from"./vendor-ux-Dln42oC3.js";import{C as m}from"./vendor-utils-J7aLFpEq.js";import{O as l,a9 as v,aa as j,c as y,ab as E,ac as P}from"./index-CgCJ2qDh.js";function R({blocklet:o,ancestors:d=[]}){const t=l(),{inService:s}=t,n=v(o?.status)||j(o?.status),r=`?v=${o?.meta?.version}${n?"~":""}`;let a=s?`${m(E,y.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${r}`:m(t.imgPrefix,"blocklet.png");if(o.source==="registry"&&o.deployedFrom&&o.meta.logo)a=`${m(o.deployedFrom,P(o.meta.bundleDid,o.meta.logo))}${r}`;else{const g=window.env?.apiPrefix||"/",i=d.concat(o),p=s?i.slice(1):i;a=`${m(g,`/blocklet/logo-bundle${p.map(c=>`/${c.meta.did}`).join("")}`)}${r}`}return{logoUrl:a,inService:s}}function h({blocklet:o,style:d={},size:t=40,ancestors:s=[],...n}){const r=l(),{logoUrl:a,inService:g}=R({blocklet:o,ancestors:s}),{variant:i}=n,p=g?()=>{}:f=>{f.target.src=`${r.imgPrefix}/blocklet.png`};let c=u.jsx("img",{src:a,onError:p,alt:o.meta.name,style:{width:t}});return o.meta.logo||(c=u.jsx($,{did:o.meta.did||"",responsive:!0})),u.jsx(x,{variant:i||"square",style:Object.assign({backgroundColor:"transparent",width:t,height:t,borderRadius:10},d),...n,children:c})}h.propTypes={blocklet:e.object.isRequired,style:e.object,size:e.oneOfType([e.number,e.string]),ancestors:e.array};export{h as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./vendor-mui-core-DWYIngcn.js";import{n as r}from"./vendor-ux-Dln42oC3.js";function m({...t}){return o.jsx(r,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{m as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i}from"./vendor-react-Dvs43sk9.js";import{j as t,W as e}from"./vendor-mui-core-DWYIngcn.js";import{b as s,R as c}from"./vendor-ux-Dln42oC3.js";function m({children:p,...r}){const{t:o}=i.useContext(s);return t.jsx(c,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...r,children:p})}m.propTypes={children:e.any.isRequired};export{m as C};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e}from"./vendor-react-Dvs43sk9.js";import{M as r}from"./vendor-utils-J7aLFpEq.js";const t=e(r);export{t as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./vendor-react-
|
|
1
|
+
import"./vendor-react-Dvs43sk9.js";import{s as a,j as r,bk as e,bl as s,bm as n,bn as i}from"./vendor-mui-core-DWYIngcn.js";const c=a(o=>r.jsx(e,{disableGutters:!0,elevation:0,square:!0,...o}))(({theme:o})=>({border:`1px solid ${o.palette.divider}`,"&:not(:last-child)":{borderBottom:0},"&::before":{display:"none"}})),p=a(o=>r.jsx(s,{expandIcon:r.jsx(n,{sx:{fontSize:"0.9rem"}}),...o}))(({theme:o})=>({backgroundColor:o.palette.mode==="dark"?"rgba(255, 255, 255, .05)":"rgba(0, 0, 0, .03)",flexDirection:"row-reverse","& .MuiAccordionSummary-expandIconWrapper.Mui-expanded":{transform:"rotate(90deg)"},"& .MuiAccordionSummary-content":{marginLeft:o.spacing(1)}})),m=a(i)(({theme:o})=>({padding:o.spacing(2),borderTop:"1px solid rgba(0, 0, 0, .125)"}));export{c as A,p as a,m as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{at as E,j as e,ak as m,W as V}from"./vendor-mui-core-
|
|
1
|
+
import{at as E,j as e,ak as m,W as V}from"./vendor-mui-core-DWYIngcn.js";import{_ as J,m as ne,aj as H,ak as oe,N as ae,al as O,c as ie,e as le,h as ce,am as ue,an as me}from"./index-CgCJ2qDh.js";import{r as u}from"./vendor-react-Dvs43sk9.js";import{J as de,C as Q}from"./vendor-utils-J7aLFpEq.js";import{b as pe,a as L}from"./vendor-hooks-HB6DqcLv.js";import{u as he}from"./launch-result-message-Dwnqr8Lq.js";import{T as fe,o as ge,H as X}from"./vendor-ux-Dln42oC3.js";import{g as we}from"./get-safe-url-Ce6hawV-.js";import{g as xe,a as be}from"./setup-Bll35TpG.js";import{S as q}from"./button-Cnj6R5bV.js";import{S as ke}from"./layout-CIen07bA.js";import{p as ye,P as Ue,S as Se}from"./starting-progress-C2KBufhS.js";import"./vendor-arcblock-B78OG6SS.js";import"./lottie-web-4koyQiv_.js";import"./config-space-a6OXiuM7.js";import"./spaces-D2uHzDSf.js";import"./api-BV16dSSm.js";import"./addon-m7dEcFSm.js";import"./question-mark-circle.svg-B4stD6SS.js";import"./use-server-logo-BFuFRBQG.js";import"./server-logo-notext.svg-CKQB0tIp.js";import"./use-mobile-BhzP2Rp3.js";import"./content-layout-BaDbLmL5.js";const ve=E(he)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{cg as ae,j as P,ak as le,am as Ot,W as K,ax as ze,aD as dt,b as Ve,g as Ue,a as Te,m as zh,s as oe,_ as U,h as We,T as rt,n as ma,u as Fe,dO as Vh,i as dl,k as Sa,E as bf,G as vf,l as xn,B as Uh,H as Wh,D as En,c as Yt,I as tt,t as Gh,q as yf,ar as Hh,bY as Cr,Q as yn,R as Cf,K as Yh,L as Kh,N as no,O as Qh,P as Xh,A as Zh,Y as Vi,Z as Es,$ as Ui,J as ka,a0 as Ms,a1 as Jh,a2 as eg,aH as Os,at as st,aL as tg,dv as ng,dP as rg,c0 as ag,aJ as _s,aI as og,c5 as ig,c6 as Is,dQ as lg,dR as sg,dS as ug,ce as fl,c9 as Fr,an as cg,cd as xf,aX as As,z as mt,b1 as wf,dL as Df,dT as dg,M as Vt,a6 as rn,bc as Pf,dU as fg,b4 as pg,a$ as Ra,dV as mg,bp as hg,b6 as Wi,bq as js,cL as gg,aZ as bg,dW as vg,d0 as Tf,bx as Sf,bd as yg,cP as Cg,dX as xg,bB as Ls,a5 as Bs,dY as wg,be as Dg}from"./vendor-mui-core-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-LvmCZD51.js","assets/index-CgCJ2qDh.js","assets/vendor-mui-core-DWYIngcn.js","assets/vendor-react-Dvs43sk9.js","assets/vendor-ux-Dln42oC3.js","assets/vendor-utils-J7aLFpEq.js","assets/vendor-hooks-HB6DqcLv.js","assets/lottie-web-4koyQiv_.js","assets/vendor-ux-DYcPPYq2.css","assets/vendor-arcblock-B78OG6SS.js","assets/index-DrVXX4fX.css","assets/index-BPy8_fa2.js","assets/index-DRYJ0xIl.js","assets/index-B5LvOF-F.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{cg as ae,j as P,ak as le,am as Ot,W as K,ax as ze,aD as dt,b as Ve,g as Ue,a as Te,m as zh,s as oe,_ as U,h as We,T as rt,n as ma,u as Fe,dO as Vh,i as dl,k as Sa,E as bf,G as vf,l as xn,B as Uh,H as Wh,D as En,c as Yt,I as tt,t as Gh,q as yf,ar as Hh,bY as Cr,Q as yn,R as Cf,K as Yh,L as Kh,N as no,O as Qh,P as Xh,A as Zh,Y as Vi,Z as Es,$ as Ui,J as ka,a0 as Ms,a1 as Jh,a2 as eg,aH as Os,at as st,aL as tg,dv as ng,dP as rg,c0 as ag,aJ as _s,aI as og,c5 as ig,c6 as Is,dQ as lg,dR as sg,dS as ug,ce as fl,c9 as Fr,an as cg,cd as xf,aX as As,z as mt,b1 as wf,dL as Df,dT as dg,M as Vt,a6 as rn,bc as Pf,dU as fg,b4 as pg,a$ as Ra,dV as mg,bp as hg,b6 as Wi,bq as js,cL as gg,aZ as bg,dW as vg,d0 as Tf,bx as Sf,bd as yg,cP as Cg,dX as xg,bB as Ls,a5 as Bs,dY as wg,be as Dg}from"./vendor-mui-core-DWYIngcn.js";import{aw as Ns,n as Fs,C as Rr,ax as Pg,av as Tg}from"./vendor-utils-J7aLFpEq.js";import{d as we,g as pl,a as Me,e as on,r as O,c as ml,b as Sg,i as kf}from"./vendor-react-Dvs43sk9.js";import{aW as ne,K as kg,T as ut,H as je,b2 as re,b3 as Rf,b4 as ln,b5 as Kt,b6 as Tt,b7 as $r,b8 as Ea,b9 as Ye,ba as Ma,bb as Oa,bc as hl,bd as _a,be as Ef,bf as Ia,bg as Aa,bh as Rg,bi as Eg,bj as Mg,bk as Og,bl as _g,bm as Ig,bn as Ag,bo as jg,bp as Lg,bq as Bg,br as Ng,bs as At,bt as _t,bu as ja,bv as sn,bw as Mf,bx as gl,by as Of,bz as Fg,bA as $g,bB as qg,bC as Mn,bD as un,bE as zg,bF as Vg,bG as Ug,bH as Wg,bI as Gg,bJ as Hg,bK as qr,bL as Yg,bM as Kg,bN as Qg,bO as Xg,aa as $s,ab as Zg,ac as Jg,ad as eb,bP as _f,bQ as tb,bR as nb,bS as rb,bT as ab,bU as ob,bV as ib,bW as lb,bX as sb,bY as ub,bZ as cb,b_ as db,b as Qt,a as La,_ as fb,a0 as pb,z as ro,I as Pt,n as ao,C as mb}from"./vendor-ux-Dln42oC3.js";import{O as ft,Z as cn,ay as wn,M as It,f as $e,ax as Er,cr as hb,c as be,cj as Dn,ci as If,am as Af,cs as jf,N as gb,af as xr,aH as bb,ct as vb}from"./index-CgCJ2qDh.js";import{f as Dt}from"./index-DBs9Ljax.js";import{b as yb,W as Pn,u as bl,B as Lf}from"./dashboard-CBpVHcLw.js";import{S as Cb}from"./switch-control-88oLMAWm.js";import{P as Gi,w as Ba}from"./permission-C79TpiNV.js";import{r as Se,A as vl,B as pt,C as ha,D as Hi,t as Pe,E as Bf,F as Nf,c as Yi,o as xb,G as Ft,H as wb,I as Db,J as Ki,K as Ff,L as Pb,M as Tb,N as $f,O as yl,P as qs,Q as Sb,R as zs,S as kb,T as Rb,p as Eb,a as Vs,b as Mb,j as oo,h as Us,m as Ob,k as Qr,u as pn,i as _b,n as Ib,g as Xr,f as io,d as Zr,s as lo,e as so,x as Ab,z as jb,q as Lb,l as Bb,v as Nb,w as Fb,U as $b,y as qb,V as zb,W as Vb}from"./index-Cbxz8oHT.js";import{f as Ub,d as Ws,c as Wb,b as Oe,_ as Re,a as Ee}from"./createClass-g8bSPTyV.js";import{r as Gb}from"./vendor-mui-x-nEbm5eNb.js";import{u as ke,a as ue,r as Mr,w as ga,g as qf,b as dn,e as zf,c as Hb,d as Yb,o as Qi}from"./raf-schd.esm-CHNehTG3.js";import{s as Kb}from"./sanitize-DSvGhymV.js";import{C as Gs}from"./click-to-copy-m7BzOuWH.js";import{v as uo}from"./index-D3qROm47.js";import{A as Qb,a as Xb,b as Zb,I as Jb,f as ev,B as tv,d as nv}from"./add-component-core-GYYnyhPI.js";import{C as On}from"./confirm-B4BzkG04.js";import{a as ba,v as rv}from"./util-BGfTex9R.js";import{C as av}from"./lock.svg-COUP8tyO.js";import{D as ov}from"./delete-confirm-DhfRzwF1.js";import{e as iv}from"./engine-DHKpyPwC.js";import{I as lv}from"./iframe-BTaRNGRY.js";import{B as sv}from"./bundle-avatar-DkLBEfff.js";import{A as Vf}from"./actions-CeSIZN0M.js";import{v as co}from"./index-EIX4798q.js";import{W as uv}from"./did-address-CdYAzzjR.js";import{b as cv}from"./vendor-hooks-HB6DqcLv.js";import"./lottie-web-4koyQiv_.js";import"./vendor-arcblock-B78OG6SS.js";import"./useLocalStorage-BRPtTalQ.js";import"./get-safe-url-Ce6hawV-.js";import"./session-BV5HR2vD.js";import"./team-DplrCM_m.js";import"./dot-OPeVWPUi.js";import"./useAsync-DcK0UTnz.js";import"./useSetState-DFuQZPPV.js";import"./index-cCGBx0sL.js";import"./over-due-invoice-payment-DhK6jNNQ.js";import"./use-mobile-BtGrkCtZ.js";import"./index-SrN5SE_r.js";import"./omit-CxEI1_wm.js";import"./index-BPy8_fa2.js";import"./item-C8OCvu8j.js";import"./launch-result-message-Dwnqr8Lq.js";import"./page-header-BycH8S9r.js";import"./config-space-a6OXiuM7.js";import"./spaces-D2uHzDSf.js";import"./api-BV16dSSm.js";import"./logo-uploader-DgG1moIj.js";import"./index-n78OcMXJ.js";import"./Google-BYGsR9Bd.js";import"./cloneDeep-BpNWeRQ9.js";import"./collapse-DfvukfIl.js";import"./index-CW67obch.js";import"./use-mobile-BhzP2Rp3.js";import"./content-layout-BaDbLmL5.js";import"./connect-to-BL3HAXmC.js";import"./index-Dy8syryD.js";import"./index-DRYJ0xIl.js";import"./index-BojVbZw0.js";import"./search-4YYphs0l.js";var dv=36e5;function fv(e,t){Se(2,arguments);var n=pt(t);return vl(e,n*dv)}var pv=864e5;function mv(e,t){Se(2,arguments);var n=ha(e),a=ha(t),r=n.getTime()-Hi(n),o=a.getTime()-Hi(a);return Math.round((r-o)/pv)}var hv=6e4;function gv(e,t){Se(2,arguments);var n=pt(t);return vl(e,n*hv)}function bv(e,t){Se(2,arguments);var n=pt(t);return vl(e,n*1e3)}function Pr(e,t){Se(2,arguments);var n=Pe(e),a=Pe(t),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}function vv(e,t){Se(2,arguments);var n=Pe(e),a=Pe(t);return n.getFullYear()-a.getFullYear()}function Hs(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Uf(e,t){Se(2,arguments);var n=Pe(e),a=Pe(t),r=Hs(n,a),o=Math.abs(mv(n,a));n.setDate(n.getDate()-r*o);var i=+(Hs(n,a)===-r),l=r*(o-i);return l===0?0:l}function Na(e,t){return Se(2,arguments),Pe(e).getTime()-Pe(t).getTime()}var Ys={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},yv="trunc";function zr(e){return e?Ys[e]:Ys[yv]}function Cv(e,t,n){Se(2,arguments);var a=Na(e,t)/Bf;return zr(void 0)(a)}function xv(e,t,n){Se(2,arguments);var a=Na(e,t)/Nf;return zr(void 0)(a)}function Xi(e){Se(1,arguments);var t=Pe(e);return t.setHours(23,59,59,999),t}function wv(e){Se(1,arguments);var t=Pe(e);return Xi(t).getTime()===Yi(t).getTime()}function Wf(e,t){Se(2,arguments);var n=Pe(e),a=Pe(t),r=Pr(n,a),o=Math.abs(xb(n,a)),i;if(o<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-r*o);var l=Pr(n,a)===-r;wv(Pe(e))&&o===1&&Pr(e,a)===1&&(l=!1),i=r*(o-Number(l))}return i===0?0:i}function Dv(e,t,n){Se(2,arguments);var a=Wf(e,t)/3;return zr(void 0)(a)}function Pv(e,t,n){Se(2,arguments);var a=Na(e,t)/1e3;return zr(void 0)(a)}function Tv(e,t,n){Se(2,arguments);var a=Uf(e,t)/7;return zr(void 0)(a)}function Sv(e,t){Se(2,arguments);var n=Pe(e),a=Pe(t),r=Pr(n,a),o=Math.abs(vv(n,a));n.setFullYear(1584),a.setFullYear(1584);var i=Pr(n,a)===-r,l=r*(o-Number(i));return l===0?0:l}function kv(e,t){var n;Se(1,arguments);var a=e||{},r=Pe(a.start),o=Pe(a.end),i=o.getTime();if(!(r.getTime()<=i))throw new RangeError("Invalid interval");var l=[],u=r;u.setHours(0,0,0,0);var s=Number((n=void 0)!==null&&n!==void 0?n:1);if(s<1||isNaN(s))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=i;)l.push(Pe(u)),u.setDate(u.getDate()+s),u.setHours(0,0,0,0);return l}function Rv(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function Ev(e,t){var n,a;Se(1,arguments);var r=Pe(e);if(isNaN(r.getTime()))throw new RangeError("Invalid time value");var o=String((n=t?.format)!==null&&n!==void 0?n:"extended"),i=String((a=t?.representation)!==null&&a!==void 0?a:"complete");if(o!=="extended"&&o!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var l="",u="",s=o==="extended"?"-":"",d=o==="extended"?":":"";if(i!=="time"){var c=Ft(r.getDate(),2),m=Ft(r.getMonth()+1,2),h=Ft(r.getFullYear(),4);l="".concat(h).concat(s).concat(m).concat(s).concat(c)}if(i!=="date"){var C=r.getTimezoneOffset();if(C!==0){var g=Math.abs(C),y=Ft(Math.floor(g/60),2),b=Ft(g%60,2),p=C<0?"+":"-";u="".concat(p).concat(y,":").concat(b)}else u="Z";var f=Ft(r.getHours(),2),v=Ft(r.getMinutes(),2),k=Ft(r.getSeconds(),2),x=l===""?"":"T",w=[f,v,k].join(d);l="".concat(l).concat(x).concat(w).concat(u)}return l}function Mv(e){Se(1,arguments);var t=Pe(e),n=t.getDay();return n}function Ov(e){Se(1,arguments);var t=Pe(e),n=t.getHours();return n}function _v(e){Se(1,arguments);var t=Pe(e),n=t.getMinutes();return n}function Iv(e){Se(1,arguments);var t=Pe(e),n=t.getSeconds();return n}function Av(e,t){Se(2,arguments);var n=Pe(e),a=Pe(t);return n.getTime()===a.getTime()}function Ks(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ub(e))||t){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(s){throw s},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var s=n.next();return i=s.done,s},e:function(s){l=!0,o=s},f:function(){try{i||n.return==null||n.return()}finally{if(l)throw o}}}}function Gf(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Gf=function(){return!!e})()}function _e(e){var t=Gf();return function(){var n,a=Ws(e);if(t){var r=Ws(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return Wb(this,n)}}var jv=10,Hf=function(){function e(){Ee(this,e),ne(this,"priority",void 0),ne(this,"subPriority",0)}return Re(e,[{key:"validate",value:function(n,a){return!0}}]),e}(),Lv=function(e){Oe(n,e);var t=_e(n);function n(a,r,o,i,l){var u;return Ee(this,n),u=t.call(this),u.value=a,u.validateValue=r,u.setValue=o,u.priority=i,l&&(u.subPriority=l),u}return Re(n,[{key:"validate",value:function(r,o){return this.validateValue(r,this.value,o)}},{key:"set",value:function(r,o,i){return this.setValue(r,o,this.value,i)}}]),n}(Hf),Bv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",jv),ne(ae(a),"subPriority",-1),a}return Re(n,[{key:"set",value:function(r,o){if(o.timestampIsSet)return r;var i=new Date(0);return i.setFullYear(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate()),i.setHours(r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()),i}}]),n}(Hf),Le=function(){function e(){Ee(this,e),ne(this,"incompatibleTokens",void 0),ne(this,"priority",void 0),ne(this,"subPriority",void 0)}return Re(e,[{key:"run",value:function(n,a,r,o){var i=this.parse(n,a,r,o);return i?{setter:new Lv(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,a,r){return!0}}]),e}(),Nv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",140),ne(ae(a),"incompatibleTokens",["R","u","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"})||i.era(r,{width:"narrow"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})||i.era(r,{width:"abbreviated"})||i.era(r,{width:"narrow"})}}},{key:"set",value:function(r,o,i){return o.era=i,r.setUTCFullYear(i,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Ze={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},Rt={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Je(e,t){return e&&{value:t(e.value),rest:e.rest}}function He(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Et(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var a=n[1]==="+"?1:-1,r=n[2]?parseInt(n[2],10):0,o=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:a*(r*Bf+o*Nf+i*wb),rest:t.slice(n[0].length)}}function Yf(e){return He(Ze.anyDigitsSigned,e)}function Xe(e,t){switch(e){case 1:return He(Ze.singleDigit,t);case 2:return He(Ze.twoDigits,t);case 3:return He(Ze.threeDigits,t);case 4:return He(Ze.fourDigits,t);default:return He(new RegExp("^\\d{1,"+e+"}"),t)}}function va(e,t){switch(e){case 1:return He(Ze.singleDigitSigned,t);case 2:return He(Ze.twoDigitsSigned,t);case 3:return He(Ze.threeDigitsSigned,t);case 4:return He(Ze.fourDigitsSigned,t);default:return He(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Cl(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Kf(e,t){var n=t>0,a=n?t:1-t,r;if(a<=50)r=e||100;else{var o=a+50,i=Math.floor(o/100)*100,l=e>=o%100;r=e+i-(l?100:0)}return n?r:1-r}function Qf(e){return e%400===0||e%4===0&&e%100!==0}var Fv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return{year:s,isTwoDigitYear:o==="yy"}};switch(o){case"y":return Je(Xe(4,r),l);case"yo":return Je(i.ordinalNumber(r,{unit:"year"}),l);default:return Je(Xe(o.length,r),l)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,i){var l=r.getUTCFullYear();if(i.isTwoDigitYear){var u=Kf(i.year,l);return r.setUTCFullYear(u,0,1),r.setUTCHours(0,0,0,0),r}var s=!("era"in o)||o.era===1?i.year:1-i.year;return r.setUTCFullYear(s,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),$v=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return{year:s,isTwoDigitYear:o==="YY"}};switch(o){case"Y":return Je(Xe(4,r),l);case"Yo":return Je(i.ordinalNumber(r,{unit:"year"}),l);default:return Je(Xe(o.length,r),l)}}},{key:"validate",value:function(r,o){return o.isTwoDigitYear||o.year>0}},{key:"set",value:function(r,o,i,l){var u=Db(r,l);if(i.isTwoDigitYear){var s=Kf(i.year,u);return r.setUTCFullYear(s,0,l.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ki(r,l)}var d=!("era"in o)||o.era===1?i.year:1-i.year;return r.setUTCFullYear(d,0,l.firstWeekContainsDate),r.setUTCHours(0,0,0,0),Ki(r,l)}}]),n}(Le),qv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o){return va(o==="R"?4:o.length,r)}},{key:"set",value:function(r,o,i){var l=new Date(0);return l.setUTCFullYear(i,0,4),l.setUTCHours(0,0,0,0),Ff(l)}}]),n}(Le),zv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",130),ne(ae(a),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o){return va(o==="u"?4:o.length,r)}},{key:"set",value:function(r,o,i){return r.setUTCFullYear(i,0,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Vv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",120),ne(ae(a),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"Q":case"QQ":return Xe(o.length,r);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"})||i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})||i.quarter(r,{width:"abbreviated",context:"formatting"})||i.quarter(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,i){return r.setUTCMonth((i-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Uv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",120),ne(ae(a),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"q":case"qq":return Xe(o.length,r);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"})||i.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})||i.quarter(r,{width:"abbreviated",context:"standalone"})||i.quarter(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,o){return o>=1&&o<=4}},{key:"set",value:function(r,o,i){return r.setUTCMonth((i-1)*3,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Wv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ne(ae(a),"priority",110),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return s-1};switch(o){case"M":return Je(He(Ze.month,r),l);case"MM":return Je(Xe(2,r),l);case"Mo":return Je(i.ordinalNumber(r,{unit:"month"}),l);case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"})||i.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})||i.month(r,{width:"abbreviated",context:"formatting"})||i.month(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,i){return r.setUTCMonth(i,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le),Gv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",110),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return s-1};switch(o){case"L":return Je(He(Ze.month,r),l);case"LL":return Je(Xe(2,r),l);case"Lo":return Je(i.ordinalNumber(r,{unit:"month"}),l);case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"})||i.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})||i.month(r,{width:"abbreviated",context:"standalone"})||i.month(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,i){return r.setUTCMonth(i,1),r.setUTCHours(0,0,0,0),r}}]),n}(Le);function Hv(e,t,n){Se(2,arguments);var a=Pe(e),r=pt(t),o=Pb(a,n)-r;return a.setUTCDate(a.getUTCDate()-o*7),a}var Yv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",100),ne(ae(a),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"w":return He(Ze.week,r);case"wo":return i.ordinalNumber(r,{unit:"week"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,i,l){return Ki(Hv(r,i,l),l)}}]),n}(Le);function Kv(e,t){Se(2,arguments);var n=Pe(e),a=pt(t),r=Tb(n)-a;return n.setUTCDate(n.getUTCDate()-r*7),n}var Qv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",100),ne(ae(a),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"I":return He(Ze.week,r);case"Io":return i.ordinalNumber(r,{unit:"week"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=53}},{key:"set",value:function(r,o,i){return Ff(Kv(r,i))}}]),n}(Le),Xv=[31,28,31,30,31,30,31,31,30,31,30,31],Zv=[31,29,31,30,31,30,31,31,30,31,30,31],Jv=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"subPriority",1),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"d":return He(Ze.date,r);case"do":return i.ordinalNumber(r,{unit:"date"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){var i=r.getUTCFullYear(),l=Qf(i),u=r.getUTCMonth();return l?o>=1&&o<=Zv[u]:o>=1&&o<=Xv[u]}},{key:"set",value:function(r,o,i){return r.setUTCDate(i),r.setUTCHours(0,0,0,0),r}}]),n}(Le),ey=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"subpriority",1),ne(ae(a),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"D":case"DD":return He(Ze.dayOfYear,r);case"Do":return i.ordinalNumber(r,{unit:"date"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){var i=r.getUTCFullYear(),l=Qf(i);return l?o>=1&&o<=366:o>=1&&o<=365}},{key:"set",value:function(r,o,i){return r.setUTCMonth(0,i),r.setUTCHours(0,0,0,0),r}}]),n}(Le);function xl(e,t,n){var a,r,o,i,l,u,s,d;Se(2,arguments);var c=$f(),m=pt((a=(r=(o=(i=n?.weekStartsOn)!==null&&i!==void 0?i:n==null||(l=n.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&o!==void 0?o:c.weekStartsOn)!==null&&r!==void 0?r:(s=c.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&a!==void 0?a:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Pe(e),C=pt(t),g=h.getUTCDay(),y=C%7,b=(y+7)%7,p=(b<m?7:0)+C-g;return h.setUTCDate(h.getUTCDate()+p),h}var ty=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["D","i","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})||i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,i,l){return r=xl(r,i,l),r.setUTCHours(0,0,0,0),r}}]),n}(Le),ny=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i,l){var u=function(d){var c=Math.floor((d-1)/7)*7;return(d+l.weekStartsOn+6)%7+c};switch(o){case"e":case"ee":return Je(Xe(o.length,r),u);case"eo":return Je(i.ordinalNumber(r,{unit:"day"}),u);case"eee":return i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})||i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,i,l){return r=xl(r,i,l),r.setUTCHours(0,0,0,0),r}}]),n}(Le),ry=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i,l){var u=function(d){var c=Math.floor((d-1)/7)*7;return(d+l.weekStartsOn+6)%7+c};switch(o){case"c":case"cc":return Je(Xe(o.length,r),u);case"co":return Je(i.ordinalNumber(r,{unit:"day"}),u);case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"})||i.day(r,{width:"short",context:"standalone"})||i.day(r,{width:"narrow",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"})||i.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})||i.day(r,{width:"abbreviated",context:"standalone"})||i.day(r,{width:"short",context:"standalone"})||i.day(r,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(r,o){return o>=0&&o<=6}},{key:"set",value:function(r,o,i,l){return r=xl(r,i,l),r.setUTCHours(0,0,0,0),r}}]),n}(Le);function ay(e,t){Se(2,arguments);var n=pt(t);n%7===0&&(n=n-7);var a=1,r=Pe(e),o=r.getUTCDay(),i=n%7,l=(i+7)%7,u=(l<a?7:0)+n-o;return r.setUTCDate(r.getUTCDate()+u),r}var oy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",90),ne(ae(a),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){var l=function(s){return s===0?7:s};switch(o){case"i":case"ii":return Xe(o.length,r);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return Je(i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"}),l);case"iiiii":return Je(i.day(r,{width:"narrow",context:"formatting"}),l);case"iiiiii":return Je(i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"}),l);case"iiii":default:return Je(i.day(r,{width:"wide",context:"formatting"})||i.day(r,{width:"abbreviated",context:"formatting"})||i.day(r,{width:"short",context:"formatting"})||i.day(r,{width:"narrow",context:"formatting"}),l)}}},{key:"validate",value:function(r,o){return o>=1&&o<=7}},{key:"set",value:function(r,o,i){return r=ay(r,i),r.setUTCHours(0,0,0,0),r}}]),n}(Le),iy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",80),ne(ae(a),"incompatibleTokens",["b","B","H","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"a":case"aa":case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})||i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,o,i){return r.setUTCHours(Cl(i),0,0,0),r}}]),n}(Le),ly=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",80),ne(ae(a),"incompatibleTokens",["a","B","H","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"b":case"bb":case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})||i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,o,i){return r.setUTCHours(Cl(i),0,0,0),r}}]),n}(Le),sy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",80),ne(ae(a),"incompatibleTokens",["a","b","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})||i.dayPeriod(r,{width:"abbreviated",context:"formatting"})||i.dayPeriod(r,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(r,o,i){return r.setUTCHours(Cl(i),0,0,0),r}}]),n}(Le),uy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["H","K","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"h":return He(Ze.hour12h,r);case"ho":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=12}},{key:"set",value:function(r,o,i){var l=r.getUTCHours()>=12;return l&&i<12?r.setUTCHours(i+12,0,0,0):!l&&i===12?r.setUTCHours(0,0,0,0):r.setUTCHours(i,0,0,0),r}}]),n}(Le),cy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["a","b","h","K","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"H":return He(Ze.hour23h,r);case"Ho":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=23}},{key:"set",value:function(r,o,i){return r.setUTCHours(i,0,0,0),r}}]),n}(Le),dy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["h","H","k","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"K":return He(Ze.hour11h,r);case"Ko":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=11}},{key:"set",value:function(r,o,i){var l=r.getUTCHours()>=12;return l&&i<12?r.setUTCHours(i+12,0,0,0):r.setUTCHours(i,0,0,0),r}}]),n}(Le),fy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",70),ne(ae(a),"incompatibleTokens",["a","b","h","H","K","t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"k":return He(Ze.hour24h,r);case"ko":return i.ordinalNumber(r,{unit:"hour"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=1&&o<=24}},{key:"set",value:function(r,o,i){var l=i<=24?i%24:i;return r.setUTCHours(l,0,0,0),r}}]),n}(Le),py=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",60),ne(ae(a),"incompatibleTokens",["t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"m":return He(Ze.minute,r);case"mo":return i.ordinalNumber(r,{unit:"minute"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,i){return r.setUTCMinutes(i,0,0),r}}]),n}(Le),my=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",50),ne(ae(a),"incompatibleTokens",["t","T"]),a}return Re(n,[{key:"parse",value:function(r,o,i){switch(o){case"s":return He(Ze.second,r);case"so":return i.ordinalNumber(r,{unit:"second"});default:return Xe(o.length,r)}}},{key:"validate",value:function(r,o){return o>=0&&o<=59}},{key:"set",value:function(r,o,i){return r.setUTCSeconds(i,0),r}}]),n}(Le),hy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",30),ne(ae(a),"incompatibleTokens",["t","T"]),a}return Re(n,[{key:"parse",value:function(r,o){var i=function(u){return Math.floor(u*Math.pow(10,-o.length+3))};return Je(Xe(o.length,r),i)}},{key:"set",value:function(r,o,i){return r.setUTCMilliseconds(i),r}}]),n}(Le),gy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",10),ne(ae(a),"incompatibleTokens",["t","T","x"]),a}return Re(n,[{key:"parse",value:function(r,o){switch(o){case"X":return Et(Rt.basicOptionalMinutes,r);case"XX":return Et(Rt.basic,r);case"XXXX":return Et(Rt.basicOptionalSeconds,r);case"XXXXX":return Et(Rt.extendedOptionalSeconds,r);case"XXX":default:return Et(Rt.extended,r)}}},{key:"set",value:function(r,o,i){return o.timestampIsSet?r:new Date(r.getTime()-i)}}]),n}(Le),by=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",10),ne(ae(a),"incompatibleTokens",["t","T","X"]),a}return Re(n,[{key:"parse",value:function(r,o){switch(o){case"x":return Et(Rt.basicOptionalMinutes,r);case"xx":return Et(Rt.basic,r);case"xxxx":return Et(Rt.basicOptionalSeconds,r);case"xxxxx":return Et(Rt.extendedOptionalSeconds,r);case"xxx":default:return Et(Rt.extended,r)}}},{key:"set",value:function(r,o,i){return o.timestampIsSet?r:new Date(r.getTime()-i)}}]),n}(Le),vy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",40),ne(ae(a),"incompatibleTokens","*"),a}return Re(n,[{key:"parse",value:function(r){return Yf(r)}},{key:"set",value:function(r,o,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),n}(Le),yy=function(e){Oe(n,e);var t=_e(n);function n(){var a;Ee(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return a=t.call.apply(t,[this].concat(o)),ne(ae(a),"priority",20),ne(ae(a),"incompatibleTokens","*"),a}return Re(n,[{key:"parse",value:function(r){return Yf(r)}},{key:"set",value:function(r,o,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(Le),Cy={G:new Nv,y:new Fv,Y:new $v,R:new qv,u:new zv,Q:new Vv,q:new Uv,M:new Wv,L:new Gv,w:new Yv,I:new Qv,d:new Jv,D:new ey,E:new ty,e:new ny,c:new ry,i:new oy,a:new iy,b:new ly,B:new sy,h:new uy,H:new cy,K:new dy,k:new fy,m:new py,s:new my,S:new hy,X:new gy,x:new by,t:new vy,T:new yy},xy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,wy=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Dy=/^'([^]*?)'?$/,Py=/''/g,Ty=/\S/,Sy=/[a-zA-Z]/;function ky(e,t,n,a){var r,o,i,l,u,s,d,c,m,h,C,g,y,b,p,f,v,k;Se(3,arguments);var x=String(e),w=String(t),D=$f(),S=(r=(o=a?.locale)!==null&&o!==void 0?o:D.locale)!==null&&r!==void 0?r:yl;if(!S.match)throw new RangeError("locale must contain match property");var R=pt((i=(l=(u=(s=a?.firstWeekContainsDate)!==null&&s!==void 0?s:a==null||(d=a.locale)===null||d===void 0||(c=d.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&u!==void 0?u:D.firstWeekContainsDate)!==null&&l!==void 0?l:(m=D.locale)===null||m===void 0||(h=m.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var E=pt((C=(g=(y=(b=a?.weekStartsOn)!==null&&b!==void 0?b:a==null||(p=a.locale)===null||p===void 0||(f=p.options)===null||f===void 0?void 0:f.weekStartsOn)!==null&&y!==void 0?y:D.weekStartsOn)!==null&&g!==void 0?g:(v=D.locale)===null||v===void 0||(k=v.options)===null||k===void 0?void 0:k.weekStartsOn)!==null&&C!==void 0?C:0);if(!(E>=0&&E<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(w==="")return x===""?Pe(n):new Date(NaN);var _={firstWeekContainsDate:R,weekStartsOn:E,locale:S},M=[new Bv],A=w.match(wy).map(function(V){var G=V[0];if(G in qs){var J=qs[G];return J(V,S.formatLong)}return V}).join("").match(xy),B=[],q=Ks(A),W;try{var z=function(){var G=W.value;!(a!=null&&a.useAdditionalWeekYearTokens)&&Sb(G)&&zs(G,w,e),!(a!=null&&a.useAdditionalDayOfYearTokens)&&kb(G)&&zs(G,w,e);var J=G[0],fe=Cy[J];if(fe){var Q=fe.incompatibleTokens;if(Array.isArray(Q)){var Z=B.find(function(Ce){return Q.includes(Ce.token)||Ce.token===J});if(Z)throw new RangeError("The format string mustn't contain `".concat(Z.fullToken,"` and `").concat(G,"` at the same time"))}else if(fe.incompatibleTokens==="*"&&B.length>0)throw new RangeError("The format string mustn't contain `".concat(G,"` and any other token at the same time"));B.push({token:J,fullToken:G});var ge=fe.run(x,G,S.match,_);if(!ge)return{v:new Date(NaN)};M.push(ge.setter),x=ge.rest}else{if(J.match(Sy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+J+"`");if(G==="''"?G="'":J==="'"&&(G=Ry(G)),x.indexOf(G)===0)x=x.slice(G.length);else return{v:new Date(NaN)}}};for(q.s();!(W=q.n()).done;){var Y=z();if(kg(Y)==="object")return Y.v}}catch(V){q.e(V)}finally{q.f()}if(x.length>0&&Ty.test(x))return new Date(NaN);var H=M.map(function(V){return V.priority}).sort(function(V,G){return G-V}).filter(function(V,G,J){return J.indexOf(V)===G}).map(function(V){return M.filter(function(G){return G.priority===V}).sort(function(G,J){return J.subPriority-G.subPriority})}).map(function(V){return V[0]}),T=Pe(n);if(isNaN(T.getTime()))return new Date(NaN);var N=Rb(T,Hi(T)),$={},j=Ks(H),I;try{for(j.s();!(I=j.n()).done;){var L=I.value;if(!L.validate(N,_))return new Date(NaN);var F=L.set(N,$,_);Array.isArray(F)?(N=F[0],Rv($,F[1])):N=F}}catch(V){j.e(V)}finally{j.f()}return N}function Ry(e){return e.match(Dy)[1].replace(Py,"'")}function Qs(e){Se(1,arguments);var t=Pe(e);return t.setMinutes(0,0,0),t}function Ey(e,t){Se(2,arguments);var n=Qs(e),a=Qs(t);return n.getTime()===a.getTime()}function My(e,t){Se(2,arguments);var n=Pe(e),a=Pe(t);return n.getFullYear()===a.getFullYear()}function Oy(e,t){Se(2,arguments);var n=Pe(e),a=pt(t);return n.setDate(a),n}function _y(e,t){Se(2,arguments);var n=Pe(e),a=pt(t);return n.setHours(a),n}function Iy(e,t){Se(2,arguments);var n=Pe(e),a=pt(t);return n.setMinutes(a),n}function Ay(e,t){Se(2,arguments);var n=Pe(e),a=pt(t);return n.setSeconds(a),n}function Xf({children:e=null,...t}){const{t:n}=ut(),{api:a}=ft(),{blocklet:r}=cn(),o=r?.settings?.autoCheckUpdate,i=async s=>{await a.updateAutoCheckUpdate({input:{did:r.meta.did,autoCheckUpdate:s}})},l=async()=>{try{const s=!o?.enabled;await i({enabled:s}),je.success(n(s?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(s){je.error(s.message)}},u=!!o?.enabled;return P.jsxs(le,{sx:{display:"flex",flexDirection:"row",alignItems:"center"},children:[e,P.jsx(Ot,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:P.jsx("div",{children:P.jsx(Cb,{checked:u,onChange:l,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Xf.propTypes={children:K.any};var fo={},po={exports:{}},Xs;function Ge(){return Xs||(Xs=1,function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(n){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var o in r)({}).hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(po)),po.exports}var Fn={},mo={},ho={},go={},Zs;function jy(){return Zs||(Zs=1,function(e){var t=re();Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(Ge()),a=t(Rf()),r=t(we()),o=t(ze()),i=ln();function l(s){var d=(0,i.useTheme)();return r.default.createElement("div",{ref:s.forwardedRef,style:{display:"table",width:"100%",height:"100%",backgroundColor:d.palette.background.paper,opacity:.7}},r.default.createElement("div",{style:{display:"table-cell",width:"100%",height:"100%",verticalAlign:"middle",textAlign:"center"}},r.default.createElement(a.default,null)))}l.propTypes={theme:o.default.any};var u=r.default.forwardRef(function(d,c){return r.default.createElement(l,(0,n.default)({},d,{forwardedRef:c}))});e.default=u}(go)),go}var bo={},vo={},wt={},yo={exports:{}},Co={exports:{}},xo={exports:{}},Js;function Ly(){return Js||(Js=1,function(e){var t=Kt().default;function n(a,r){if(t(a)!="object"||!a)return a;var o=a[Symbol.toPrimitive];if(o!==void 0){var i=o.call(a,r||"default");if(t(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(a)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(xo)),xo.exports}var eu;function Zf(){return eu||(eu=1,function(e){var t=Kt().default,n=Ly();function a(r){var o=n(r,"string");return t(o)=="symbol"?o:o+""}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports}(Co)),Co.exports}var tu;function nt(){return tu||(tu=1,function(e){var t=Zf();function n(a,r,o){return(r=t(r))in a?Object.defineProperty(a,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):a[r]=o,a}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(yo)),yo.exports}const By={},nu=e=>{let t;const n=new Set,a=(d,c)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const h=t;t=c??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(C=>C(t,h))}},r=()=>t,u={setState:a,getState:r,getInitialState:()=>s,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(By?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(a,r,u);return u},Jf=e=>e?nu(e):nu;var wo={exports:{}},Do={},Po={exports:{}},To={};/**
|
|
4
4
|
* @license React
|
|
5
5
|
* use-sync-external-store-shim.production.min.js
|
|
@@ -362,7 +362,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
362
362
|
.ux-dialog_closeButton {
|
|
363
363
|
margin: 0;
|
|
364
364
|
}
|
|
365
|
-
`,tO=O.lazy(()=>fb(()=>import("./index-
|
|
365
|
+
`,tO=O.lazy(()=>fb(()=>import("./index-LvmCZD51.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])).then(e=>({default:e.Uploader}))),nO="/blocklet/component/upload",hf=[".html",".htm",".tgz",".zip"],rO=Number(window.env?.MAX_UPLOAD_FILE_SIZE)||be.MAX_UPLOAD_FILE_SIZE,aO=rO*1024*1024;function Sh({did:e,prefix:t,headers:n=()=>({}),onUploaded:a=Fs,open:r=!1,onClose:o=Fs}){const{t:i,locale:l}=ut(),u=O.useRef(null),s=O.useCallback(d=>{const{status:c,data:m}=d;if(c===200){a(m);return}je.error(i("blocklet.component.addComponentTip.uploadFailed"))},[a,i]);return O.useEffect(()=>{r?u.current?.open():u.current?.close()},[r]),P.jsx(oO,{id:`component-uploader-${e}`,children:P.jsx(tO,{ref:u,locale:l,popup:!0,onUploadFinish:s,plugins:[],onClose:o,installerProps:{disabled:!0},apiPathProps:{uploader:Rr(t,nO,e),disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:hf,maxFileSize:aO,maxNumberOfFiles:1}},tusProps:{headers:n},dashboardProps:{note:i("blocklet.component.addComponentTip.allowedFileTypes",{types:hf.map(d=>d.replace(".","")).join(", ")})}})},`component-uploader-${e}`)}Sh.propTypes={did:K.string.isRequired,prefix:K.string.isRequired,open:K.bool,headers:K.func,onUploaded:K.func,onClose:K.func};const oO=oe(le)`
|
|
366
366
|
.uploader-wrapper {
|
|
367
367
|
display: inline-flex;
|
|
368
368
|
position: relative;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r,at as w,W as p}from"./vendor-mui-core-
|
|
1
|
+
import{j as r,at as w,W as p}from"./vendor-mui-core-DWYIngcn.js";import{r as d}from"./vendor-react-Dvs43sk9.js";import{n as U,C as F,R as G,S as q,A as H}from"./vendor-utils-J7aLFpEq.js";import{T as D,H as M}from"./vendor-ux-Dln42oC3.js";import{S as V}from"./index-n78OcMXJ.js";import{a as Y}from"./page-header-BycH8S9r.js";import{m as z,X as W,M as a,c as X,f as B}from"./index-CgCJ2qDh.js";import{S as $}from"./layout-CIen07bA.js";import{S as Q}from"./step-actions-C6aMtUZh.js";import{S as J}from"./button-Cnj6R5bV.js";import"./vendor-hooks-HB6DqcLv.js";import"./lottie-web-4koyQiv_.js";import"./Google-BYGsR9Bd.js";import"./cloneDeep-BpNWeRQ9.js";import"./vendor-arcblock-B78OG6SS.js";import"./logo-uploader-DgG1moIj.js";import"./collapse-DfvukfIl.js";import"./content-layout-BaDbLmL5.js";import"./use-mobile-BtGrkCtZ.js";function A({children:h=[],bottom:O,onBottomFix:m=U}){const i=d.useRef(null),l=d.useRef(null),E=d.useRef(null),c=d.useRef(null),[L,C]=d.useState(!1);return d.useEffect(()=>{let t;const u=()=>{t||(t=setTimeout(()=>{l.current&&(l.current.scrollHeight>i.current.clientHeight-E.current.clientHeight?(c.current!=="fix"&&(m("fix"),c.current="fix"),C(!0)):(c.current!=="scroll"&&(m("scroll"),c.current="scroll"),C(!1))),t=null},50))};let f;return window.ResizeObserver?f=new ResizeObserver(u):window.addEventListener("resize",u),f.observe(i.current),f.observe(l.current),()=>{f?f.disconnect():window.removeEventListener("resize",u),t&&clearTimeout(t)}},[m]),r.jsxs(Z,{ref:i,className:`${L?"scroll-mode":""}`,children:[r.jsx("div",{className:"compact-context",ref:l,children:h}),r.jsx("div",{className:"fix-container",ref:E,children:O})]})}const Z=w.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{br as e,bs as c,bt as t,bu as o}from"./vendor-mui-core-
|
|
1
|
+
import{br as e,bs as c,bt as t,bu as o}from"./vendor-mui-core-DWYIngcn.js";import{c as n}from"./index-CgCJ2qDh.js";const a=[{value:n.WHO_CAN_ACCESS.ALL,icon:e,title:{zh:"面向所有人",en:"Open to Everyone"},description:{zh:"任何人都可以访问应用而不需要身份验证。",en:"Anyone can access this blocklet without authenticating."}},{value:n.WHO_CAN_ACCESS.INVITED,icon:c,title:{zh:"仅限受邀",en:"Invite-Only Access"},description:{zh:"仅限受邀用户可访问应用。",en:"Only invited members can access."}},{value:n.WHO_CAN_ACCESS.ADMIN,icon:t,title:{zh:"仅限拥有者 & 管理员",en:"Owner & Admin Access."},description:{zh:"仅限拥有者或管理员访问应用。",en:"Only the owner or an admin can access it."}},{value:n.WHO_CAN_ACCESS.OWNER,icon:o,title:{zh:"仅限拥有者",en:"Owner-Only Access"},description:{zh:"仅限拥有者访问应用。",en:"Only the blocklet owner can access it."}}];export{a as A};
|