@abtnode/blocklet-services 1.16.37-beta-20250107-235521-f1778ec0 → 1.16.37-beta-20250108-010153-e4bcd256
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/Add-WwBlcqNF.js +1 -0
- package/dist/assets/{ArrowDropDown-BPjEGMbu.js → ArrowDropDown-B6VSNrNX.js} +1 -1
- package/dist/assets/{CheckCircle-B4plT5R4.js → CheckCircle-n23HoB1l.js} +1 -1
- package/dist/assets/{ChevronLeft-B9PQ366h.js → ChevronLeft-DV-sPxhr.js} +1 -1
- package/dist/assets/{ChevronRight-D6hU6q5w.js → ChevronRight-UF0hSKpL.js} +1 -1
- package/dist/assets/{DeleteOutline-CW6vHyu2.js → DeleteOutline-1Utxk_IX.js} +1 -1
- package/dist/assets/{Done-CbA_lc17.js → Done-BbnQSLvu.js} +1 -1
- package/dist/assets/{Download-D114STME.js → Download-DRJvwpLt.js} +1 -1
- package/dist/assets/{Error-CspIR8wP.js → Error-CL8m4Xu6.js} +1 -1
- package/dist/assets/{Google-Bzqa7SGD.js → Google-CSKRQW0F.js} +1 -1
- package/dist/assets/{InfoOutlined-CQX14YIV.js → InfoOutlined-7hC78o3_.js} +1 -1
- package/dist/assets/{Launch-C1MUjdbY.js → Launch-D9iyATKb.js} +1 -1
- package/dist/assets/{LaunchOutlined-CeuwA75K.js → LaunchOutlined-D37WOXmf.js} +1 -1
- package/dist/assets/{Loop-CRiiMs26.js → Loop-Clmz6DRv.js} +1 -1
- package/dist/assets/{MoreHoriz-CyRd8YYN.js → MoreHoriz-CtnQ7uqf.js} +1 -1
- package/dist/assets/{PlayArrow-CpIW2rO1.js → PlayArrow-IJdeSlbo.js} +1 -1
- package/dist/assets/{ViewList-VFshTvAg.js → ViewList-B-HVv7GT.js} +1 -1
- package/dist/assets/_createAggregator-BgG70oKG.js +1 -0
- package/dist/assets/{access-control-CaDZstFX.js → access-control-BP0rhxZ_.js} +1 -1
- package/dist/assets/{actions-BQfRapcY.js → actions-DsY16tuf.js} +1 -1
- package/dist/assets/{add-component-core-B6O0kJAO.js → add-component-core-C8hvHJq0.js} +4 -4
- package/dist/assets/{add-resource-DVAwgArl.js → add-resource-DZFTdNIy.js} +1 -1
- package/dist/assets/{addon-B934EFnq.js → addon-DUnQ9eC0.js} +1 -1
- package/dist/assets/{analytics-DxPeznyU.js → analytics-Cym7YiQM.js} +3 -3
- package/dist/assets/{audit-logs-Cw_LCWlO.js → audit-logs-DtJdynVz.js} +2 -2
- package/dist/assets/base32-DZ5GWnEl.js +1 -0
- package/dist/assets/{branding-CVf-84lW.js → branding-DEKXfpdd.js} +2 -2
- package/dist/assets/{bundle-avatar-CZnIDw9E.js → bundle-avatar-CtN88KlG.js} +1 -1
- package/dist/assets/button-CPeDg26t.js +1 -0
- package/dist/assets/{click-to-copy-DPKm1p6d.js → click-to-copy-D-rDpTU1.js} +1 -1
- package/dist/assets/{complete-Bf8ALY2S.js → complete-DfhluUOU.js} +1 -1
- package/dist/assets/{component-ChxoGFx9.js → component-DET9TWBv.js} +1 -1
- package/dist/assets/{config-BUjuVbbC.js → config-Bh1NLHps.js} +1 -1
- package/dist/assets/{config-D3mUi5yh.js → config-Dx3rVqe3.js} +2 -2
- package/dist/assets/{config-navigation-Bjlh79gM.js → config-navigation-Cn0fwBBG.js} +3 -3
- package/dist/assets/{config-space-B_9C2jTG.js → config-space-CT9a0s7Q.js} +1 -1
- package/dist/assets/{confirm-CVFWPron.js → confirm-DhCXP8vW.js} +1 -1
- package/dist/assets/connect-CA2-olTo.js +5 -0
- package/dist/assets/connect-GHQ2pLWc.js +1 -0
- package/dist/assets/connect-to-kYFiSkqc.js +1 -0
- package/dist/assets/{dashboard-Dff3slpj.js → dashboard-B3UhGh-u.js} +7 -7
- package/dist/assets/{did-address-DqD0tKOY.js → did-address-B-umhomj.js} +1 -1
- package/dist/assets/domain-DzFcoe7i.js +9 -0
- package/dist/assets/{domain-list-jO4zHESZ.js → domain-list-C9eJrdcx.js} +2 -2
- package/dist/assets/email-BEr-8TYu.js +18 -0
- package/dist/assets/{exchange-passport-BMjrpZst.js → exchange-passport-DGUT_ZCy.js} +1 -1
- package/dist/assets/{form-text-input-ClGC4JKP.js → form-text-input-E0Z0s35O.js} +2 -2
- package/dist/assets/{fuel-2t6oVtfW.js → fuel-alylOU0b.js} +1 -1
- package/dist/assets/{fullpage-BiUo6gQd.js → fullpage-DZPI7F_L.js} +1 -1
- package/dist/assets/{get-safe-url-BtfNFuK0.js → get-safe-url-ByH0hntp.js} +1 -1
- package/dist/assets/{get-safe-url-CV9wUymi.js → get-safe-url-yHkHYeNB.js} +1 -1
- package/dist/assets/{home-BpXMOH1X.js → home-DG81Vlwd.js} +1 -1
- package/dist/assets/{iframe-03f6PMsP.js → iframe-BB-pL0gd.js} +1 -1
- package/dist/assets/{index-C89HTHWf.js → index-B-0OFwWF.js} +1 -1
- package/dist/assets/{index-DOWnRwIi.js → index-B8B9jSby.js} +7 -7
- package/dist/assets/{index-BvpWi6M_.js → index-BaA1-UNL.js} +1 -1
- package/dist/assets/{index-D3rhPCZn.js → index-CU_Y2Ics.js} +41 -41
- package/dist/assets/{index-XlyOkzy1.js → index-CYh2QqLk.js} +1 -1
- package/dist/assets/{index-1yj7N3BD.js → index-CxWy6IEg.js} +1 -1
- package/dist/assets/{index-BgE0mEyw.js → index-DHmJ4NAw.js} +8 -8
- package/dist/assets/{index-DQR2LIPC.js → index-DNd_40WG.js} +2 -2
- package/dist/assets/{index-kGLQpRJK.js → index-DjDooCTg.js} +14 -14
- package/dist/assets/{index-DPyw3Xwp.js → index-Dk8-Ibsd.js} +1 -1
- package/dist/assets/{index-CTEk7-E8.js → index-SrY9WLdy.js} +1 -1
- package/dist/assets/{index-BqtzbaK6.js → index-e4kRKwa5.js} +1 -1
- package/dist/assets/index-jViTGvBx.js +5 -0
- package/dist/assets/{index-ChdU5l0G.js → index-tDqjC_e2.js} +38 -38
- package/dist/assets/{invitation-C8ZNSJG7.js → invitation-BNOVM03D.js} +7 -7
- package/dist/assets/invite-CDXZxcmB.js +5 -0
- package/dist/assets/{issue-passport-CIaz_hk6.js → issue-passport-1v1d15DW.js} +1 -1
- package/dist/assets/{item-wwVikGMU.js → item-DoetJFaA.js} +1 -1
- package/dist/assets/{layout-DBXEc_NJ.js → layout-PlCf3Rtw.js} +1 -1
- package/dist/assets/{list-header-BA3DiTcf.js → list-header-DdT6PG1D.js} +1 -1
- package/dist/assets/localization-Cm0dNj2B.js +1 -0
- package/dist/assets/{log-Dc1jxENK.js → log-B5iPDWZ_.js} +1 -1
- package/dist/assets/login-DvM79Mfd.js +1 -0
- package/dist/assets/{login-oauth-callback-nhEQq-XX.js → login-oauth-callback-CO19RzCL.js} +1 -1
- package/dist/assets/{logo-uploader-yBugHtcG.js → logo-uploader-CNnYMPxh.js} +3 -3
- package/dist/assets/{lost-passport-DAsg20NY.js → lost-passport-DsG6aS5u.js} +2 -2
- package/dist/assets/{open-window-CVrMznBr.js → open-window-Km_9DMrz.js} +1 -1
- package/dist/assets/{overview-Dc2oVKWy.js → overview-Dc_26DuW.js} +1 -1
- package/dist/assets/{page-header-Htib6ejn.js → page-header-B3m4UCOV.js} +1 -1
- package/dist/assets/{permission-Bz0PVI3J.js → permission-C7OYX2OJ.js} +1 -1
- package/dist/assets/{preferences-BVtsOmzg.js → preferences-Ci4dS6YC.js} +1 -1
- package/dist/assets/publish-resource-BumbS1yx.js +1 -0
- package/dist/assets/{react-beautiful-dnd.esm-BPPmOpgZ.js → react-beautiful-dnd.esm-D6d5Zfr8.js} +4 -4
- package/dist/assets/{relative-time-D13g3uDZ.js → relative-time-BHAJs1ji.js} +1 -1
- package/dist/assets/sdk-0UwYHc-i.js +1 -0
- package/dist/assets/session-UImnJahL.js +1 -0
- package/dist/assets/{setup-B2Eq0dKO.js → setup-LHpIYQbe.js} +3 -3
- package/dist/assets/{start-DcyUXnHe.js → start-DxAs4dHz.js} +1 -1
- package/dist/assets/{step-actions-BdC024Vn.js → step-actions-FdD-71wr.js} +1 -1
- package/dist/assets/{studio-BSlFbK1F.js → studio-g2uaz9WG.js} +1 -1
- package/dist/assets/{switch-control-DOeNAipI.js → switch-control-BMO1MVhi.js} +1 -1
- package/dist/assets/{toUpper-CPtwa1LG.js → toUpper-DUImrX4s.js} +1 -1
- package/dist/assets/{transfer-l-kgY192.js → transfer-Bq5kjW_S.js} +1 -1
- package/dist/assets/{unsubscribe-Bn1ZPibc.js → unsubscribe-DUmfJRPR.js} +1 -1
- package/dist/assets/{useAsync-Barwm_ml.js → useAsync-BfmmMB4I.js} +1 -1
- package/dist/assets/{useAsyncRetry-Ct0h3JKq.js → useAsyncRetry-m5oMMmVh.js} +1 -1
- package/dist/assets/{useLocalStorage-Bkgi6BS3.js → useLocalStorage-ganqTrK6.js} +1 -1
- package/dist/assets/user-center-CYnDNkIf.js +202 -0
- package/dist/assets/{util-Cd3QOWLR.js → util-CmcVraD_.js} +1 -1
- package/dist/assets/{vendor-arcblock-oreSqNjg.js → vendor-arcblock-Dn16DH88.js} +209 -206
- package/dist/assets/{vendor-hooks-DHHsWSqV.js → vendor-hooks-DzETutIU.js} +1 -1
- package/dist/assets/{wrap-locale-Dajt8i2A.js → wrap-locale-DTO386nY.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/service-worker.js +1 -1
- package/package.json +39 -39
- package/dist/assets/Add-XINWD-cR.js +0 -1
- package/dist/assets/_createAggregator-sgAa2ai2.js +0 -1
- package/dist/assets/base32-CdGlYCm2.js +0 -1
- package/dist/assets/button-DSj-WxvW.js +0 -1
- package/dist/assets/connect-Bw02nhZ6.js +0 -5
- package/dist/assets/connect-to-DL42-aQK.js +0 -1
- package/dist/assets/connect-whKFDq3K.js +0 -1
- package/dist/assets/domain-CI3XUHBW.js +0 -9
- package/dist/assets/email-DZG9lqBd.js +0 -18
- package/dist/assets/index-qpaXqEVJ.js +0 -5
- package/dist/assets/invite-wHYq3NmE.js +0 -5
- package/dist/assets/localization-DHa_wuSk.js +0 -1
- package/dist/assets/login-BSMkjZ2F.js +0 -1
- package/dist/assets/publish-resource-6mtBRA7-.js +0 -1
- package/dist/assets/sdk-BU36VFtK.js +0 -1
- package/dist/assets/session-6sDuFWud.js +0 -1
- package/dist/assets/user-center-tko9eOwU.js +0 -202
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{cr as Xt,a1 as pe,j as d,a3 as U,v as Qt,bN as S,ah as jt,T as W,L as ge,z as ye,bq as xe,I as ut,bE as Bt,aP as Ut,al as Wt,_ as De,E as b,aa as ft,am as Me,ao as be,a2 as ve,ad as Te,x as ke,aj as je,a4 as Q}from"./vendor-mui-core-COxJgW9_.js";import{g as pt,b as f,r as C,e as Yt,u as we}from"./vendor-react-D-afvo_7.js";import{cN as Se,aC as Ce,aO as Ee,ah as Oe,cO as Ye,g as gt,d as Le,aj as te,aQ as Re,b7 as Ie,bE as Pe,aK as Ne}from"./vendor-arcblock-oreSqNjg.js";import{E as G,y as Ae,G as _t,aB as Z,ax as ee,B as Fe,f as wt,aG as ze,o as He}from"./index-ChdU5l0G.js";import{d as F,j as $e}from"./vendor-utils-CV7RLr7b.js";import{_ as Be}from"./useAsyncRetry-Ct0h3JKq.js";import{I as Ue}from"./iframe-03f6PMsP.js";import{d as We}from"./LaunchOutlined-CeuwA75K.js";import{d as _e}from"./ChevronLeft-B9PQ366h.js";import{d as Ve}from"./ChevronRight-D6hU6q5w.js";import{r as Lt,b as ne,G as q,C as X,B as _,y as qe,D as Ze,H as Rt,z as Ct,L as nt,M as st,A as K,K as rt,e as at,I as dt,J as ht,d as Je,P as Et,F as et,E as Vt,Q as It,R as Ge,S as Ke,N as Xe,U as Qe,O as tn}from"./index-BRPzwIuP.js";import{k as en,o as nn}from"./vendor-hooks-DHHsWSqV.js";import{f as sn}from"./format-error-C0Ke3VXF.js";import{b as rn,L as an,D as on}from"./vendor-mui-x-Be0GxtOJ.js";import{p as ln}from"./index-XlyOkzy1.js";import{B as cn}from"./bundle-avatar-CZnIDw9E.js";import{B as un}from"./dashboard-Dff3slpj.js";import"./useAsync-Barwm_ml.js";import"./useLocalStorage-Bkgi6BS3.js";import"./confirm-CVFWPron.js";import"./PlayArrow-CpIW2rO1.js";import"./get-safe-url-BtfNFuK0.js";import"./session-6sDuFWud.js";import"./useSetState-Crt4S51m.js";var dn=Se;function hn(e,r){var a=e.length;if(a)return r+=r<0?a:0,dn(r,a)?e[r]:void 0}var mn=hn,fn=mn,pn=Ce,gn=Ee;function yn(e){return e=gn(e),pn(function(r){return fn(r,e)})}var xn=yn;const Dn=pt(xn);function se(e){Lt(1,arguments);var r;if(e&&typeof e.forEach=="function")r=e;else if(Xt(e)==="object"&&e!==null)r=Array.prototype.slice.call(e);else return new Date(NaN);var a;return r.forEach(function(l){var u=ne(l);(a===void 0||a<u||isNaN(Number(u)))&&(a=u)}),a||new Date(NaN)}function re(e){Lt(1,arguments);var r;if(e&&typeof e.forEach=="function")r=e;else if(Xt(e)==="object"&&e!==null)r=Array.prototype.slice.call(e);else return new Date(NaN);var a;return r.forEach(function(l){var u=ne(l);(a===void 0||a>u||isNaN(u.getDate()))&&(a=u)}),a||new Date(NaN)}function Mn(e){return Lt(1,arguments),q(e,Date.now())}var Pt={},bn=pe;Object.defineProperty(Pt,"__esModule",{value:!0});var ae=Pt.default=void 0,vn=bn(Oe()),Tn=d;ae=Pt.default=(0,vn.default)((0,Tn.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const kn=(e,r)=>Array.from({length:Math.ceil(e.length/r)},(a,l)=>e.slice(l*r,l*r+r)),jn=(e,r)=>{const a=nt(rt(e),{locale:r}),l=st(at(e),{locale:r}),u=[];for(let t=a;et(t,l);)u.push(t),t=Ct(t,1);return u},wn=({startDate:e},r)=>e&&q(r,e),Sn=({endDate:e},r)=>e&&q(r,e),Cn=({startDate:e,endDate:r},a)=>e&&r&&(It(a,{start:e,end:r})||q(a,e)||q(a,r)),En=({startDate:e,endDate:r})=>e&&r?q(e,r):!1,qt=(e,r)=>{if(e){const a=e instanceof Date?e:qe(e);if(Ze(a))return a}return r},On=(e,r,a)=>{const{startDate:l,endDate:u}=e;if(l&&u){const t=se([l,r]),n=re([u,a]);return[t,Rt(t,n)?_(t,1):n]}return[l,u]},Yn=(e,r)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:Ct(e,-1),endDate:Ct(e,-1)},{label:"This Week",startDate:nt(e,{locale:r}),endDate:st(e,{locale:r})},{label:"Last Week",startDate:nt(K(e,-1),{locale:r}),endDate:st(K(e,-1),{locale:r})},{label:"Last 7 Days",startDate:K(e,-1),endDate:e},{label:"This Month",startDate:rt(e),endDate:at(e)},{label:"Last Month",startDate:rt(_(e,-1)),endDate:at(_(e,-1))},{label:"This Year",startDate:dt(e),endDate:ht(e)},{label:"Last Year",startDate:dt(X(e,-1)),endDate:ht(X(e,-1))}],Ln=(e,r)=>{const a=Math.floor(r/2);return Array(r).fill(0).map((l,u)=>e.getFullYear()-a+u)},Rn=({date:e,setDate:r,nextDisabled:a,prevDisabled:l,onClickNext:u,onClickPrevious:t,locale:n})=>{const o=typeof n<"u"?[...Array(12).keys()].map(s=>{var p;return(p=n.localize)===null||p===void 0?void 0:p.month(s,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],c=s=>{r(Qe(e,parseInt(s.target.value,10)))},i=s=>{r(tn(e,parseInt(s.target.value,10)))};return f.createElement(S,{container:!0,justifyContent:"space-between",alignItems:"center"},f.createElement(S,{item:!0,sx:{padding:"5px"}},f.createElement(ut,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:l,onClick:t},f.createElement(_e,{color:l?"disabled":"action"}))),f.createElement(S,{item:!0},f.createElement(Bt,{variant:"standard"},f.createElement(Ut,{value:Ke(e),onChange:c,MenuProps:{disablePortal:!0}},o.map((s,p)=>f.createElement(Wt,{key:s,value:p},s))))),f.createElement(S,{item:!0},f.createElement(Bt,{variant:"standard"},f.createElement(Ut,{value:Xe(e),onChange:i,MenuProps:{disablePortal:!0}},Ln(e,30).map(s=>f.createElement(Wt,{key:s,value:s},s))))),f.createElement(S,{item:!0,sx:{padding:"5px"}},f.createElement(ut,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:a,onClick:u},f.createElement(Ve,{color:a?"disabled":"action"}))))},In=({startOfRange:e,endOfRange:r,disabled:a,highlighted:l,outlined:u,filled:t,onClick:n,onHover:o,value:c})=>f.createElement(U,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":r?"0 50% 50% 0":void 0,backgroundColor:i=>!a&&l?i.palette.primary.light:void 0}},f.createElement(ut,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:i=>!a&&u?`1px solid ${i.palette.primary.dark}`:void 0},!a&&t?{"&:hover":{backgroundColor:i=>i.palette.primary.dark},backgroundColor:i=>i.palette.primary.dark}:{}),disabled:a,onClick:n,onMouseOver:o},f.createElement(W,{sx:{lineHeight:1.6,color:i=>a?i.palette.text.secondary:t?i.palette.primary.contrastText:i.palette.text.primary},variant:"body2"},c)));var mt;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(mt||(mt={}));const Zt=e=>{var r;const{helpers:a,handlers:l,value:u,dateRange:t,marker:n,setValue:o,minDate:c,maxDate:i,locale:s}=e,p=((r=s==null?void 0:s.options)===null||r===void 0?void 0:r.weekStartsOn)||0,g=typeof s<"u"?[...Array(7).keys()].map(k=>{var h;return(h=s.localize)===null||h===void 0?void 0:h.day((k+p)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[v,O]=e.navState;return f.createElement(Qt,{square:!0,elevation:0,sx:{width:290}},f.createElement(S,{container:!0},f.createElement(Rn,{date:u,setDate:o,nextDisabled:!O,prevDisabled:!v,onClickPrevious:()=>l.onMonthNavigate(n,mt.Previous),onClickNext:()=>l.onMonthNavigate(n,mt.Next),locale:s}),f.createElement(S,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},g.map((k,h)=>f.createElement(W,{color:"textSecondary",key:h,variant:"caption"},k))),f.createElement(S,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},kn(jn(u,s),7).map((k,h)=>f.createElement(S,{key:h,container:!0,direction:"row",justifyContent:"center"},k.map(m=>{const D=wn(t,m),M=Sn(t,m),T=En(t),j=Cn(t,m)||a.inHoverRange(m);return f.createElement(In,{key:Et(m,"dd-MM-yyyy"),filled:D||M,outlined:Mn(m),highlighted:j&&!T,disabled:!Rt(u,m)||!It(m,{start:c,end:i}),startOfRange:D&&!T,endOfRange:M&&!T,onClick:()=>l.onDayClick(m),onHover:()=>l.onDayHover(m),value:Ge(m)})}))))))},Jt=(e,r)=>{const{startDate:a,endDate:l}=e,{startDate:u,endDate:t}=r;return a&&u&&l&&t?q(a,u)&&q(l,t):!1},Pn=({ranges:e,setRange:r,selectedRange:a})=>f.createElement(ge,null,e.map((l,u)=>f.createElement(ye,{button:!0,key:u,onClick:()=>r(l),sx:[Jt(l,a)&&{backgroundColor:t=>t.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},f.createElement(xe,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:Jt(l,a)?"bold":"normal"}}},l.label)))),Ot={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Nn=e=>{const{ranges:r,dateRange:a,minDate:l,maxDate:u,firstMonth:t,setFirstMonth:n,secondMonth:o,setSecondMonth:c,setDateRange:i,helpers:s,handlers:p,locale:g}=e,{startDate:v,endDate:O}=a,k=Je(o,t)>=2,h={dateRange:a,minDate:l,maxDate:u,helpers:s,handlers:p};return f.createElement(Qt,{elevation:5,square:!0},f.createElement(S,{container:!0,direction:"row",wrap:"nowrap"},f.createElement(S,null,f.createElement(Pn,{selectedRange:a,ranges:r,setRange:i})),f.createElement(jt,{orientation:"vertical",flexItem:!0}),f.createElement(S,null,f.createElement(S,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},f.createElement(S,{item:!0,sx:{flex:1,textAlign:"center"}},f.createElement(W,{variant:"subtitle1"},v?Et(v,"dd MMMM yyyy",{locale:g}):"Start Date")),f.createElement(S,{item:!0,sx:{flex:1,textAlign:"center"}},f.createElement(ae,{color:"action"})),f.createElement(S,{item:!0,sx:{flex:1,textAlign:"center"}},f.createElement(W,{variant:"subtitle1"},O?Et(O,"dd MMMM yyyy",{locale:g}):"End Date"))),f.createElement(jt,null),f.createElement(S,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},f.createElement(Zt,Object.assign({},h,{value:t,setValue:n,navState:[!0,k],marker:Ot.FIRST_MONTH,locale:g})),f.createElement(jt,{orientation:"vertical",flexItem:!0}),f.createElement(Zt,Object.assign({},h,{value:o,setValue:c,navState:[k,!0],marker:Ot.SECOND_MONTH,locale:g}))))))},An=e=>{const r=new Date,{open:a,onChange:l,initialDateRange:u,minDate:t,maxDate:n,definedRanges:o=Yn(new Date,e.locale),locale:c}=e,i=qt(t,X(r,-10)),s=qt(n,X(r,10)),[p,g]=On(u||{},i,s),[v,O]=C.useState(Object.assign({},u)),[k,h]=C.useState(),[m,D]=C.useState(p||r),[M,T]=C.useState(g||_(m,1)),{startDate:j,endDate:N}=v,B=x=>{et(x,M)&&D(x)},z=x=>{Vt(x,m)&&T(x)},A=x=>{let{startDate:w,endDate:E}=x;if(w&&E)x.startDate=w=se([w,i]),x.endDate=E=re([E,s]),O(x),l(x),D(w),T(Rt(w,E)?_(w,1):E);else{const H={};O(H),l(H),D(r),T(_(m,1))}},I=x=>{if(j&&!N&&!et(x,j)){const w={startDate:j,endDate:x};l(w),O(w)}else O({startDate:x,endDate:void 0});h(x)},P=(x,w)=>{if(x===Ot.FIRST_MONTH){const E=_(m,w);et(E,M)&&D(E)}else{const E=_(M,w);et(m,E)&&T(E)}},R=x=>{j&&!N&&(!k||!q(x,k))&&h(x)},Y={inHoverRange:x=>j&&!N&&k&&Vt(k,j)&&It(x,{start:j,end:k})},L={onDayClick:I,onDayHover:R,onMonthNavigate:P};return a?C.createElement(Nn,{dateRange:v,minDate:i,maxDate:s,ranges:o,firstMonth:m,secondMonth:M,setFirstMonth:B,setSecondMonth:z,setDateRange:A,helpers:Y,handlers:L,locale:c}):null},Fn=e=>{const{closeOnClickOutside:r,wrapperClassName:a,toggle:l,open:u}=e,t=()=>{r!==!1&&l()},n=o=>(o==null?void 0:o.key)==="Escape"&&t();return f.createElement(U,{sx:{position:"relative"}},u&&f.createElement(U,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:n,onClick:t}),f.createElement(U,{sx:{position:"relative",zIndex:1},className:a},f.createElement(An,Object.assign({},e))))},zn=e=>f.createElement(Fn,Object.assign({},e));var ie={exports:{}};(function(e,r){(function(a,l){e.exports=l()})(Yt,function(){var a="week",l="year";return function(u,t,n){var o=t.prototype;o.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var i=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var s=n(this).startOf(l).add(1,l).date(i),p=n(this).endOf(a);if(s.isBefore(p))return 1}var g=n(this).startOf(l).date(i).startOf(a).subtract(1,"millisecond"),v=this.diff(g,a,!0);return v<0?n(this).startOf("week").week():Math.ceil(v)},o.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(ie);var Hn=ie.exports;const $n=pt(Hn);var oe={exports:{}};(function(e,r){(function(a,l){e.exports=l()})(Yt,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,u=/\d/,t=/\d\d/,n=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,c={},i=function(h){return(h=+h)+(h>68?1900:2e3)},s=function(h){return function(m){this[h]=+m}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(m){if(!m||m==="Z")return 0;var D=m.match(/([+-]|\d\d)/g),M=60*D[1]+(+D[2]||0);return M===0?0:D[0]==="+"?-M:M}(h)}],g=function(h){var m=c[h];return m&&(m.indexOf?m:m.s.concat(m.f))},v=function(h,m){var D,M=c.meridiem;if(M){for(var T=1;T<=24;T+=1)if(h.indexOf(M(T,0,m))>-1){D=T>12;break}}else D=h===(m?"pm":"PM");return D},O={A:[o,function(h){this.afternoon=v(h,!1)}],a:[o,function(h){this.afternoon=v(h,!0)}],Q:[u,function(h){this.month=3*(h-1)+1}],S:[u,function(h){this.milliseconds=100*+h}],SS:[t,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[n,s("seconds")],ss:[n,s("seconds")],m:[n,s("minutes")],mm:[n,s("minutes")],H:[n,s("hours")],h:[n,s("hours")],HH:[n,s("hours")],hh:[n,s("hours")],D:[n,s("day")],DD:[t,s("day")],Do:[o,function(h){var m=c.ordinal,D=h.match(/\d+/);if(this.day=D[0],m)for(var M=1;M<=31;M+=1)m(M).replace(/\[|\]/g,"")===h&&(this.day=M)}],w:[n,s("week")],ww:[t,s("week")],M:[n,s("month")],MM:[t,s("month")],MMM:[o,function(h){var m=g("months"),D=(g("monthsShort")||m.map(function(M){return M.slice(0,3)})).indexOf(h)+1;if(D<1)throw new Error;this.month=D%12||D}],MMMM:[o,function(h){var m=g("months").indexOf(h)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,s("year")],YY:[t,function(h){this.year=i(h)}],YYYY:[/\d{4}/,s("year")],Z:p,ZZ:p};function k(h){var m,D;m=h,D=c&&c.formats;for(var M=(h=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,P,R){var y=R&&R.toUpperCase();return P||D[R]||a[R]||D[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,L,x){return L||x.slice(1)})})).match(l),T=M.length,j=0;j<T;j+=1){var N=M[j],B=O[N],z=B&&B[0],A=B&&B[1];M[j]=A?{regex:z,parser:A}:N.replace(/^\[|\]$/g,"")}return function(I){for(var P={},R=0,y=0;R<T;R+=1){var Y=M[R];if(typeof Y=="string")y+=Y.length;else{var L=Y.regex,x=Y.parser,w=I.slice(y),E=L.exec(w)[0];x.call(P,E),I=I.replace(E,"")}}return function(H){var J=H.afternoon;if(J!==void 0){var $=H.hours;J?$<12&&(H.hours+=12):$===12&&(H.hours=0),delete H.afternoon}}(P),P}}return function(h,m,D){D.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(i=h.parseTwoDigitYear);var M=m.prototype,T=M.parse;M.parse=function(j){var N=j.date,B=j.utc,z=j.args;this.$u=B;var A=z[1];if(typeof A=="string"){var I=z[2]===!0,P=z[3]===!0,R=I||P,y=z[2];P&&(y=z[2]),c=this.$locale(),!I&&y&&(c=D.Ls[y]),this.$d=function(w,E,H,J){try{if(["x","X"].indexOf(E)>-1)return new Date((E==="X"?1e3:1)*w);var $=k(E)(w),yt=$.year,ot=$.month,ue=$.day,de=$.hours,he=$.minutes,me=$.seconds,fe=$.milliseconds,Ht=$.zone,$t=$.week,xt=new Date,Dt=ue||(yt||ot?1:xt.getDate()),Mt=yt||xt.getFullYear(),lt=0;yt&&!ot||(lt=ot>0?ot-1:xt.getMonth());var ct,bt=de||0,vt=he||0,Tt=me||0,kt=fe||0;return Ht?new Date(Date.UTC(Mt,lt,Dt,bt,vt,Tt,kt+60*Ht.offset*1e3)):H?new Date(Date.UTC(Mt,lt,Dt,bt,vt,Tt,kt)):(ct=new Date(Mt,lt,Dt,bt,vt,Tt,kt),$t&&(ct=J(ct).week($t).toDate()),ct)}catch{return new Date("")}}(N,A,B,D),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),R&&N!=this.format(A)&&(this.$d=new Date("")),c={}}else if(A instanceof Array)for(var Y=A.length,L=1;L<=Y;L+=1){z[1]=A[L-1];var x=D.apply(this,z);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}L===Y&&(this.$d=new Date(""))}else T.call(this,j)}}})})(oe);var Bn=oe.exports;const Un=pt(Bn);var le={exports:{}};(function(e,r){(function(a,l){e.exports=l()})(Yt,function(){return function(a,l,u){l.prototype.isBetween=function(t,n,o,c){var i=u(t),s=u(n),p=(c=c||"()")[0]==="(",g=c[1]===")";return(p?this.isAfter(i,o):!this.isBefore(i,o))&&(g?this.isBefore(s,o):!this.isAfter(s,o))||(p?this.isBefore(i,o):!this.isAfter(i,o))&&(g?this.isAfter(s,o):!this.isBefore(s,o))}}})})(le);var Wn=le.exports;const _n=pt(Wn);F.extend(Un);F.extend(Ye);F.extend(_n);const Vn=rn(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),qn={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Zn={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},St=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
|
|
1
|
+
import{cr as Xt,a1 as pe,j as d,a3 as U,v as Qt,bN as S,ah as wt,T as W,L as ge,z as ye,bq as xe,I as ut,bE as Bt,aP as Ut,al as Wt,_ as De,E as b,aa as ft,am as Me,ao as be,a2 as ve,ad as Te,x as ke,aj as we,a4 as Q}from"./vendor-mui-core-COxJgW9_.js";import{g as pt,b as f,r as C,e as Yt,u as je}from"./vendor-react-D-afvo_7.js";import{cG as Se,ay as Ce,aK as Ee,ad as Oe,cH as Ye,g as gt,d as Le,af as te,aM as Re,b2 as Ie,bz as Pe,aG as Ne}from"./vendor-arcblock-Dn16DH88.js";import{E as G,y as Ae,G as _t,aA as Z,aw as ee,B as Fe,f as jt,aF as ze,o as He}from"./index-tDqjC_e2.js";import{d as F,j as $e}from"./vendor-utils-CV7RLr7b.js";import{_ as Be}from"./useAsyncRetry-m5oMMmVh.js";import{I as Ue}from"./iframe-BB-pL0gd.js";import{d as We}from"./LaunchOutlined-D37WOXmf.js";import{d as _e}from"./ChevronLeft-DV-sPxhr.js";import{d as Ve}from"./ChevronRight-UF0hSKpL.js";import{r as Lt,b as ne,G as q,C as X,B as _,y as qe,D as Ze,H as Rt,z as Ct,L as nt,M as st,A as K,K as rt,e as at,I as dt,J as ht,d as Je,P as Et,F as et,E as Vt,Q as It,R as Ge,S as Ke,N as Xe,U as Qe,O as tn}from"./index-BRPzwIuP.js";import{k as en,n as nn}from"./vendor-hooks-DzETutIU.js";import{f as sn}from"./format-error-C0Ke3VXF.js";import{b as rn,L as an,D as on}from"./vendor-mui-x-Be0GxtOJ.js";import{p as ln}from"./index-CYh2QqLk.js";import{B as cn}from"./bundle-avatar-CtN88KlG.js";import{B as un}from"./dashboard-B3UhGh-u.js";import"./useAsync-BfmmMB4I.js";import"./useLocalStorage-ganqTrK6.js";import"./confirm-DhCXP8vW.js";import"./PlayArrow-IJdeSlbo.js";import"./get-safe-url-ByH0hntp.js";import"./session-UImnJahL.js";import"./useSetState-Crt4S51m.js";var dn=Se;function hn(e,r){var a=e.length;if(a)return r+=r<0?a:0,dn(r,a)?e[r]:void 0}var mn=hn,fn=mn,pn=Ce,gn=Ee;function yn(e){return e=gn(e),pn(function(r){return fn(r,e)})}var xn=yn;const Dn=pt(xn);function se(e){Lt(1,arguments);var r;if(e&&typeof e.forEach=="function")r=e;else if(Xt(e)==="object"&&e!==null)r=Array.prototype.slice.call(e);else return new Date(NaN);var a;return r.forEach(function(l){var u=ne(l);(a===void 0||a<u||isNaN(Number(u)))&&(a=u)}),a||new Date(NaN)}function re(e){Lt(1,arguments);var r;if(e&&typeof e.forEach=="function")r=e;else if(Xt(e)==="object"&&e!==null)r=Array.prototype.slice.call(e);else return new Date(NaN);var a;return r.forEach(function(l){var u=ne(l);(a===void 0||a>u||isNaN(u.getDate()))&&(a=u)}),a||new Date(NaN)}function Mn(e){return Lt(1,arguments),q(e,Date.now())}var Pt={},bn=pe;Object.defineProperty(Pt,"__esModule",{value:!0});var ae=Pt.default=void 0,vn=bn(Oe()),Tn=d;ae=Pt.default=(0,vn.default)((0,Tn.jsx)("path",{d:"M16.01 11H4v2h12.01v3L20 12l-3.99-4z"}),"ArrowRightAlt");const kn=(e,r)=>Array.from({length:Math.ceil(e.length/r)},(a,l)=>e.slice(l*r,l*r+r)),wn=(e,r)=>{const a=nt(rt(e),{locale:r}),l=st(at(e),{locale:r}),u=[];for(let t=a;et(t,l);)u.push(t),t=Ct(t,1);return u},jn=({startDate:e},r)=>e&&q(r,e),Sn=({endDate:e},r)=>e&&q(r,e),Cn=({startDate:e,endDate:r},a)=>e&&r&&(It(a,{start:e,end:r})||q(a,e)||q(a,r)),En=({startDate:e,endDate:r})=>e&&r?q(e,r):!1,qt=(e,r)=>{if(e){const a=e instanceof Date?e:qe(e);if(Ze(a))return a}return r},On=(e,r,a)=>{const{startDate:l,endDate:u}=e;if(l&&u){const t=se([l,r]),n=re([u,a]);return[t,Rt(t,n)?_(t,1):n]}return[l,u]},Yn=(e,r)=>[{label:"Today",startDate:e,endDate:e},{label:"Yesterday",startDate:Ct(e,-1),endDate:Ct(e,-1)},{label:"This Week",startDate:nt(e,{locale:r}),endDate:st(e,{locale:r})},{label:"Last Week",startDate:nt(K(e,-1),{locale:r}),endDate:st(K(e,-1),{locale:r})},{label:"Last 7 Days",startDate:K(e,-1),endDate:e},{label:"This Month",startDate:rt(e),endDate:at(e)},{label:"Last Month",startDate:rt(_(e,-1)),endDate:at(_(e,-1))},{label:"This Year",startDate:dt(e),endDate:ht(e)},{label:"Last Year",startDate:dt(X(e,-1)),endDate:ht(X(e,-1))}],Ln=(e,r)=>{const a=Math.floor(r/2);return Array(r).fill(0).map((l,u)=>e.getFullYear()-a+u)},Rn=({date:e,setDate:r,nextDisabled:a,prevDisabled:l,onClickNext:u,onClickPrevious:t,locale:n})=>{const o=typeof n<"u"?[...Array(12).keys()].map(s=>{var p;return(p=n.localize)===null||p===void 0?void 0:p.month(s,{width:"abbreviated",context:"standalone"})}):["Jan","Feb","Mar","Apr","May","June","July","Aug","Sept","Oct","Nov","Dec"],c=s=>{r(Qe(e,parseInt(s.target.value,10)))},i=s=>{r(tn(e,parseInt(s.target.value,10)))};return f.createElement(S,{container:!0,justifyContent:"space-between",alignItems:"center"},f.createElement(S,{item:!0,sx:{padding:"5px"}},f.createElement(ut,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:l,onClick:t},f.createElement(_e,{color:l?"disabled":"action"}))),f.createElement(S,{item:!0},f.createElement(Bt,{variant:"standard"},f.createElement(Ut,{value:Ke(e),onChange:c,MenuProps:{disablePortal:!0}},o.map((s,p)=>f.createElement(Wt,{key:s,value:p},s))))),f.createElement(S,{item:!0},f.createElement(Bt,{variant:"standard"},f.createElement(Ut,{value:Xe(e),onChange:i,MenuProps:{disablePortal:!0}},Ln(e,30).map(s=>f.createElement(Wt,{key:s,value:s},s))))),f.createElement(S,{item:!0,sx:{padding:"5px"}},f.createElement(ut,{sx:{padding:"10px","&:hover":{background:"none"}},disabled:a,onClick:u},f.createElement(Ve,{color:a?"disabled":"action"}))))},In=({startOfRange:e,endOfRange:r,disabled:a,highlighted:l,outlined:u,filled:t,onClick:n,onHover:o,value:c})=>f.createElement(U,{sx:{display:"flex",borderRadius:e?"50% 0 0 50%":r?"0 50% 50% 0":void 0,backgroundColor:i=>!a&&l?i.palette.primary.light:void 0}},f.createElement(ut,{sx:Object.assign({height:"36px",width:"36px",padding:0,border:i=>!a&&u?`1px solid ${i.palette.primary.dark}`:void 0},!a&&t?{"&:hover":{backgroundColor:i=>i.palette.primary.dark},backgroundColor:i=>i.palette.primary.dark}:{}),disabled:a,onClick:n,onMouseOver:o},f.createElement(W,{sx:{lineHeight:1.6,color:i=>a?i.palette.text.secondary:t?i.palette.primary.contrastText:i.palette.text.primary},variant:"body2"},c)));var mt;(function(e){e[e.Previous=-1]="Previous",e[e.Next=1]="Next"})(mt||(mt={}));const Zt=e=>{var r;const{helpers:a,handlers:l,value:u,dateRange:t,marker:n,setValue:o,minDate:c,maxDate:i,locale:s}=e,p=((r=s==null?void 0:s.options)===null||r===void 0?void 0:r.weekStartsOn)||0,g=typeof s<"u"?[...Array(7).keys()].map(k=>{var h;return(h=s.localize)===null||h===void 0?void 0:h.day((k+p)%7,{width:"short",context:"standalone"})}):["Su","Mo","Tu","We","Th","Fr","Sa"],[v,O]=e.navState;return f.createElement(Qt,{square:!0,elevation:0,sx:{width:290}},f.createElement(S,{container:!0},f.createElement(Rn,{date:u,setDate:o,nextDisabled:!O,prevDisabled:!v,onClickPrevious:()=>l.onMonthNavigate(n,mt.Previous),onClickNext:()=>l.onMonthNavigate(n,mt.Next),locale:s}),f.createElement(S,{item:!0,container:!0,direction:"row",justifyContent:"space-between",sx:{marginTop:"10px",paddingLeft:"30px",paddingRight:"30px"}},g.map((k,h)=>f.createElement(W,{color:"textSecondary",key:h,variant:"caption"},k))),f.createElement(S,{item:!0,container:!0,direction:"column",justifyContent:"space-between",sx:{paddingLeft:"15px",paddingRight:"15px",marginTop:"15px",marginBottom:"20px"}},kn(wn(u,s),7).map((k,h)=>f.createElement(S,{key:h,container:!0,direction:"row",justifyContent:"center"},k.map(m=>{const D=jn(t,m),M=Sn(t,m),T=En(t),w=Cn(t,m)||a.inHoverRange(m);return f.createElement(In,{key:Et(m,"dd-MM-yyyy"),filled:D||M,outlined:Mn(m),highlighted:w&&!T,disabled:!Rt(u,m)||!It(m,{start:c,end:i}),startOfRange:D&&!T,endOfRange:M&&!T,onClick:()=>l.onDayClick(m),onHover:()=>l.onDayHover(m),value:Ge(m)})}))))))},Jt=(e,r)=>{const{startDate:a,endDate:l}=e,{startDate:u,endDate:t}=r;return a&&u&&l&&t?q(a,u)&&q(l,t):!1},Pn=({ranges:e,setRange:r,selectedRange:a})=>f.createElement(ge,null,e.map((l,u)=>f.createElement(ye,{button:!0,key:u,onClick:()=>r(l),sx:[Jt(l,a)&&{backgroundColor:t=>t.palette.primary.dark,color:"primary.contrastText","&:hover":{color:"inherit"}}]},f.createElement(xe,{primaryTypographyProps:{variant:"body2",sx:{fontWeight:Jt(l,a)?"bold":"normal"}}},l.label)))),Ot={FIRST_MONTH:Symbol("firstMonth"),SECOND_MONTH:Symbol("secondMonth")},Nn=e=>{const{ranges:r,dateRange:a,minDate:l,maxDate:u,firstMonth:t,setFirstMonth:n,secondMonth:o,setSecondMonth:c,setDateRange:i,helpers:s,handlers:p,locale:g}=e,{startDate:v,endDate:O}=a,k=Je(o,t)>=2,h={dateRange:a,minDate:l,maxDate:u,helpers:s,handlers:p};return f.createElement(Qt,{elevation:5,square:!0},f.createElement(S,{container:!0,direction:"row",wrap:"nowrap"},f.createElement(S,null,f.createElement(Pn,{selectedRange:a,ranges:r,setRange:i})),f.createElement(wt,{orientation:"vertical",flexItem:!0}),f.createElement(S,null,f.createElement(S,{container:!0,sx:{padding:"20px 70px"},alignItems:"center"},f.createElement(S,{item:!0,sx:{flex:1,textAlign:"center"}},f.createElement(W,{variant:"subtitle1"},v?Et(v,"dd MMMM yyyy",{locale:g}):"Start Date")),f.createElement(S,{item:!0,sx:{flex:1,textAlign:"center"}},f.createElement(ae,{color:"action"})),f.createElement(S,{item:!0,sx:{flex:1,textAlign:"center"}},f.createElement(W,{variant:"subtitle1"},O?Et(O,"dd MMMM yyyy",{locale:g}):"End Date"))),f.createElement(wt,null),f.createElement(S,{container:!0,direction:"row",justifyContent:"center",wrap:"nowrap"},f.createElement(Zt,Object.assign({},h,{value:t,setValue:n,navState:[!0,k],marker:Ot.FIRST_MONTH,locale:g})),f.createElement(wt,{orientation:"vertical",flexItem:!0}),f.createElement(Zt,Object.assign({},h,{value:o,setValue:c,navState:[k,!0],marker:Ot.SECOND_MONTH,locale:g}))))))},An=e=>{const r=new Date,{open:a,onChange:l,initialDateRange:u,minDate:t,maxDate:n,definedRanges:o=Yn(new Date,e.locale),locale:c}=e,i=qt(t,X(r,-10)),s=qt(n,X(r,10)),[p,g]=On(u||{},i,s),[v,O]=C.useState(Object.assign({},u)),[k,h]=C.useState(),[m,D]=C.useState(p||r),[M,T]=C.useState(g||_(m,1)),{startDate:w,endDate:N}=v,B=x=>{et(x,M)&&D(x)},z=x=>{Vt(x,m)&&T(x)},A=x=>{let{startDate:j,endDate:E}=x;if(j&&E)x.startDate=j=se([j,i]),x.endDate=E=re([E,s]),O(x),l(x),D(j),T(Rt(j,E)?_(j,1):E);else{const H={};O(H),l(H),D(r),T(_(m,1))}},I=x=>{if(w&&!N&&!et(x,w)){const j={startDate:w,endDate:x};l(j),O(j)}else O({startDate:x,endDate:void 0});h(x)},P=(x,j)=>{if(x===Ot.FIRST_MONTH){const E=_(m,j);et(E,M)&&D(E)}else{const E=_(M,j);et(m,E)&&T(E)}},R=x=>{w&&!N&&(!k||!q(x,k))&&h(x)},Y={inHoverRange:x=>w&&!N&&k&&Vt(k,w)&&It(x,{start:w,end:k})},L={onDayClick:I,onDayHover:R,onMonthNavigate:P};return a?C.createElement(Nn,{dateRange:v,minDate:i,maxDate:s,ranges:o,firstMonth:m,secondMonth:M,setFirstMonth:B,setSecondMonth:z,setDateRange:A,helpers:Y,handlers:L,locale:c}):null},Fn=e=>{const{closeOnClickOutside:r,wrapperClassName:a,toggle:l,open:u}=e,t=()=>{r!==!1&&l()},n=o=>(o==null?void 0:o.key)==="Escape"&&t();return f.createElement(U,{sx:{position:"relative"}},u&&f.createElement(U,{sx:{position:"fixed",height:"100vh",width:"100vw",bottom:0,zIndex:0,right:0,left:0,top:0},onKeyPress:n,onClick:t}),f.createElement(U,{sx:{position:"relative",zIndex:1},className:a},f.createElement(An,Object.assign({},e))))},zn=e=>f.createElement(Fn,Object.assign({},e));var ie={exports:{}};(function(e,r){(function(a,l){e.exports=l()})(Yt,function(){var a="week",l="year";return function(u,t,n){var o=t.prototype;o.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var i=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var s=n(this).startOf(l).add(1,l).date(i),p=n(this).endOf(a);if(s.isBefore(p))return 1}var g=n(this).startOf(l).date(i).startOf(a).subtract(1,"millisecond"),v=this.diff(g,a,!0);return v<0?n(this).startOf("week").week():Math.ceil(v)},o.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(ie);var Hn=ie.exports;const $n=pt(Hn);var oe={exports:{}};(function(e,r){(function(a,l){e.exports=l()})(Yt,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,u=/\d/,t=/\d\d/,n=/\d\d?/,o=/\d*[^-_:/,()\s\d]+/,c={},i=function(h){return(h=+h)+(h>68?1900:2e3)},s=function(h){return function(m){this[h]=+m}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(m){if(!m||m==="Z")return 0;var D=m.match(/([+-]|\d\d)/g),M=60*D[1]+(+D[2]||0);return M===0?0:D[0]==="+"?-M:M}(h)}],g=function(h){var m=c[h];return m&&(m.indexOf?m:m.s.concat(m.f))},v=function(h,m){var D,M=c.meridiem;if(M){for(var T=1;T<=24;T+=1)if(h.indexOf(M(T,0,m))>-1){D=T>12;break}}else D=h===(m?"pm":"PM");return D},O={A:[o,function(h){this.afternoon=v(h,!1)}],a:[o,function(h){this.afternoon=v(h,!0)}],Q:[u,function(h){this.month=3*(h-1)+1}],S:[u,function(h){this.milliseconds=100*+h}],SS:[t,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[n,s("seconds")],ss:[n,s("seconds")],m:[n,s("minutes")],mm:[n,s("minutes")],H:[n,s("hours")],h:[n,s("hours")],HH:[n,s("hours")],hh:[n,s("hours")],D:[n,s("day")],DD:[t,s("day")],Do:[o,function(h){var m=c.ordinal,D=h.match(/\d+/);if(this.day=D[0],m)for(var M=1;M<=31;M+=1)m(M).replace(/\[|\]/g,"")===h&&(this.day=M)}],w:[n,s("week")],ww:[t,s("week")],M:[n,s("month")],MM:[t,s("month")],MMM:[o,function(h){var m=g("months"),D=(g("monthsShort")||m.map(function(M){return M.slice(0,3)})).indexOf(h)+1;if(D<1)throw new Error;this.month=D%12||D}],MMMM:[o,function(h){var m=g("months").indexOf(h)+1;if(m<1)throw new Error;this.month=m%12||m}],Y:[/[+-]?\d+/,s("year")],YY:[t,function(h){this.year=i(h)}],YYYY:[/\d{4}/,s("year")],Z:p,ZZ:p};function k(h){var m,D;m=h,D=c&&c.formats;for(var M=(h=m.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,P,R){var y=R&&R.toUpperCase();return P||D[R]||a[R]||D[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,L,x){return L||x.slice(1)})})).match(l),T=M.length,w=0;w<T;w+=1){var N=M[w],B=O[N],z=B&&B[0],A=B&&B[1];M[w]=A?{regex:z,parser:A}:N.replace(/^\[|\]$/g,"")}return function(I){for(var P={},R=0,y=0;R<T;R+=1){var Y=M[R];if(typeof Y=="string")y+=Y.length;else{var L=Y.regex,x=Y.parser,j=I.slice(y),E=L.exec(j)[0];x.call(P,E),I=I.replace(E,"")}}return function(H){var J=H.afternoon;if(J!==void 0){var $=H.hours;J?$<12&&(H.hours+=12):$===12&&(H.hours=0),delete H.afternoon}}(P),P}}return function(h,m,D){D.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(i=h.parseTwoDigitYear);var M=m.prototype,T=M.parse;M.parse=function(w){var N=w.date,B=w.utc,z=w.args;this.$u=B;var A=z[1];if(typeof A=="string"){var I=z[2]===!0,P=z[3]===!0,R=I||P,y=z[2];P&&(y=z[2]),c=this.$locale(),!I&&y&&(c=D.Ls[y]),this.$d=function(j,E,H,J){try{if(["x","X"].indexOf(E)>-1)return new Date((E==="X"?1e3:1)*j);var $=k(E)(j),yt=$.year,ot=$.month,ue=$.day,de=$.hours,he=$.minutes,me=$.seconds,fe=$.milliseconds,Ht=$.zone,$t=$.week,xt=new Date,Dt=ue||(yt||ot?1:xt.getDate()),Mt=yt||xt.getFullYear(),lt=0;yt&&!ot||(lt=ot>0?ot-1:xt.getMonth());var ct,bt=de||0,vt=he||0,Tt=me||0,kt=fe||0;return Ht?new Date(Date.UTC(Mt,lt,Dt,bt,vt,Tt,kt+60*Ht.offset*1e3)):H?new Date(Date.UTC(Mt,lt,Dt,bt,vt,Tt,kt)):(ct=new Date(Mt,lt,Dt,bt,vt,Tt,kt),$t&&(ct=J(ct).week($t).toDate()),ct)}catch{return new Date("")}}(N,A,B,D),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),R&&N!=this.format(A)&&(this.$d=new Date("")),c={}}else if(A instanceof Array)for(var Y=A.length,L=1;L<=Y;L+=1){z[1]=A[L-1];var x=D.apply(this,z);if(x.isValid()){this.$d=x.$d,this.$L=x.$L,this.init();break}L===Y&&(this.$d=new Date(""))}else T.call(this,w)}}})})(oe);var Bn=oe.exports;const Un=pt(Bn);var le={exports:{}};(function(e,r){(function(a,l){e.exports=l()})(Yt,function(){return function(a,l,u){l.prototype.isBetween=function(t,n,o,c){var i=u(t),s=u(n),p=(c=c||"()")[0]==="(",g=c[1]===")";return(p?this.isAfter(i,o):!this.isBefore(i,o))&&(g?this.isBefore(s,o):!this.isAfter(s,o))||(p?this.isBefore(i,o):!this.isAfter(i,o))&&(g?this.isAfter(s,o):!this.isBefore(s,o))}}})})(le);var Wn=le.exports;const _n=pt(Wn);F.extend(Un);F.extend(Ye);F.extend(_n);const Vn=rn(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),qn={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Zn={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},St=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
|
|
2
2
|
`),Gt=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
|
|
3
|
-
`),Jn=(e,r)=>r?(...a)=>e(...a).locale(r):e;class Gn{constructor({locale:r,formats:a,instance:l}={}){var u;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=qn,this.setLocaleToValue=t=>{const n=this.getCurrentLocaleCode();return n===t.locale()?t:t.locale(n)},this.hasUTCPlugin=()=>typeof F.utc<"u",this.hasTimezonePlugin=()=>typeof F.tz<"u",this.isSame=(t,n,o)=>{const c=this.setTimezone(n,this.getTimezone(t));return t.format(o)===c.format(o)},this.cleanTimezone=t=>{switch(t){case"default":return;case"system":return F.tz.guess();default:return t}},this.createSystemDate=t=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(t);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const n=F.tz.guess();return n!=="UTC"?F.tz(t,n):F(t)}return F(t)},this.createUTCDate=t=>{if(!this.hasUTCPlugin())throw new Error(St);return F.utc(t)},this.createTZDate=(t,n)=>{if(!this.hasUTCPlugin())throw new Error(St);if(!this.hasTimezonePlugin())throw new Error(Gt);const o=t!==void 0&&!t.endsWith("Z");return F(t).tz(this.cleanTimezone(n),o)},this.getLocaleFormats=()=>{const t=F.Ls,n=this.locale||"en";let o=t[n];return o===void 0&&(Vn(),o=t.en),o.formats},this.adjustOffset=t=>{if(!this.hasTimezonePlugin())return t;const n=this.getTimezone(t);if(n!=="UTC"){var o,c;const i=t.tz(this.cleanTimezone(n),!0);if(((o=i.$offset)!=null?o:0)===((c=t.$offset)!=null?c:0))return t;t.$offset=i.$offset}return t},this.date=t=>t===null?null:this.dayjs(t),this.dateWithTimezone=(t,n)=>{if(t===null)return null;let o;return n==="UTC"?o=this.createUTCDate(t):n==="system"||n==="default"&&!this.hasTimezonePlugin()?o=this.createSystemDate(t):o=this.createTZDate(t,n),this.locale===void 0?o:o.locale(this.locale)},this.getTimezone=t=>{if(this.hasTimezonePlugin()){var n;const o=(n=t.$x)==null?void 0:n.$timezone;if(o)return o}return this.hasUTCPlugin()&&t.isUTC()?"UTC":"system"},this.setTimezone=(t,n)=>{if(this.getTimezone(t)===n)return t;if(n==="UTC"){if(!this.hasUTCPlugin())throw new Error(St);return t.utc()}if(n==="system")return t.local();if(!this.hasTimezonePlugin()){if(n==="default")return t;throw new Error(Gt)}return F.tz(t,this.cleanTimezone(n))},this.toJsDate=t=>t.toDate(),this.parseISO=t=>this.dayjs(t),this.toISO=t=>t.toISOString(),this.parse=(t,n)=>t===""?null:this.dayjs(t,n,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=t=>{const n=this.getLocaleFormats(),o=c=>c.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(i,s,p)=>s||p.slice(1));return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(c,i,s)=>{const p=s&&s.toUpperCase();return i||n[s]||o(n[p])})},this.getFormatHelperText=t=>this.expandFormat(t).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=t=>t===null,this.isValid=t=>this.dayjs(t).isValid(),this.format=(t,n)=>this.formatByString(t,this.formats[n]),this.formatByString=(t,n)=>this.dayjs(t).format(n),this.formatNumber=t=>t,this.getDiff=(t,n,o)=>t.diff(n,o),this.isEqual=(t,n)=>t===null&&n===null?!0:this.dayjs(t).toDate().getTime()===this.dayjs(n).toDate().getTime(),this.isSameYear=(t,n)=>this.isSame(t,n,"YYYY"),this.isSameMonth=(t,n)=>this.isSame(t,n,"YYYY-MM"),this.isSameDay=(t,n)=>this.isSame(t,n,"YYYY-MM-DD"),this.isSameHour=(t,n)=>t.isSame(n,"hour"),this.isAfter=(t,n)=>t>n,this.isAfterYear=(t,n)=>this.hasUTCPlugin()?!this.isSameYear(t,n)&&t.utc()>n.utc():t.isAfter(n,"year"),this.isAfterDay=(t,n)=>this.hasUTCPlugin()?!this.isSameDay(t,n)&&t.utc()>n.utc():t.isAfter(n,"day"),this.isBefore=(t,n)=>t<n,this.isBeforeYear=(t,n)=>this.hasUTCPlugin()?!this.isSameYear(t,n)&&t.utc()<n.utc():t.isBefore(n,"year"),this.isBeforeDay=(t,n)=>this.hasUTCPlugin()?!this.isSameDay(t,n)&&t.utc()<n.utc():t.isBefore(n,"day"),this.isWithinRange=(t,[n,o])=>t>=n&&t<=o,this.startOfYear=t=>this.adjustOffset(t.startOf("year")),this.startOfMonth=t=>this.adjustOffset(t.startOf("month")),this.startOfWeek=t=>this.adjustOffset(t.startOf("week")),this.startOfDay=t=>this.adjustOffset(t.startOf("day")),this.endOfYear=t=>this.adjustOffset(t.endOf("year")),this.endOfMonth=t=>this.adjustOffset(t.endOf("month")),this.endOfWeek=t=>this.adjustOffset(t.endOf("week")),this.endOfDay=t=>this.adjustOffset(t.endOf("day")),this.addYears=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"year"):t.add(n,"year")),this.addMonths=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"month"):t.add(n,"month")),this.addWeeks=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"week"):t.add(n,"week")),this.addDays=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"day"):t.add(n,"day")),this.addHours=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"hour"):t.add(n,"hour")),this.addMinutes=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"minute"):t.add(n,"minute")),this.addSeconds=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"second"):t.add(n,"second")),this.getYear=t=>t.year(),this.getMonth=t=>t.month(),this.getDate=t=>t.date(),this.getHours=t=>t.hour(),this.getMinutes=t=>t.minute(),this.getSeconds=t=>t.second(),this.getMilliseconds=t=>t.millisecond(),this.setYear=(t,n)=>this.adjustOffset(t.set("year",n)),this.setMonth=(t,n)=>this.adjustOffset(t.set("month",n)),this.setDate=(t,n)=>this.adjustOffset(t.set("date",n)),this.setHours=(t,n)=>this.adjustOffset(t.set("hour",n)),this.setMinutes=(t,n)=>this.adjustOffset(t.set("minute",n)),this.setSeconds=(t,n)=>this.adjustOffset(t.set("second",n)),this.setMilliseconds=(t,n)=>this.adjustOffset(t.set("millisecond",n)),this.getDaysInMonth=t=>t.daysInMonth(),this.getNextMonth=t=>this.addMonths(t,1),this.getPreviousMonth=t=>this.addMonths(t,-1),this.getMonthArray=t=>{const o=[t.startOf("year")];for(;o.length<12;){const c=o[o.length-1];o.push(this.addMonths(c,1))}return o},this.mergeDateAndTime=(t,n)=>t.hour(n.hour()).minute(n.minute()).second(n.second()),this.getWeekdays=()=>{const t=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(n=>this.formatByString(this.addDays(t,n),"dd"))},this.getWeekArray=t=>{const n=this.setLocaleToValue(t),o=n.startOf("month").startOf("week"),c=n.endOf("month").endOf("week");let i=0,s=o;const p=[];for(;s<c;){const g=Math.floor(i/7);p[g]=p[g]||[],p[g].push(s),s=this.addDays(s,1),i+=1}return p},this.getWeekNumber=t=>t.week(),this.getYearRange=(t,n)=>{const o=t.startOf("year"),c=n.endOf("year"),i=[];let s=o;for(;s<c;)i.push(s),s=this.addYears(s,1);return i},this.getMeridiemText=t=>t==="am"?"AM":"PM",this.rawDayJsInstance=l,this.dayjs=Jn((u=this.rawDayJsInstance)!=null?u:F,r),this.locale=r,this.formats=De({},Zn,a),F.extend($n)}}function Kt(e,r,a,l){return parseFloat((r-l*r/e+a).toFixed(2))}function Kn(e){[...e.querySelectorAll("*")].forEach(r=>e.removeChild(r))}function Xn(e){return e.value}function tt(e,r){const a=document.createElementNS("http://www.w3.org/2000/svg",e);for(const l in r)a.setAttribute(l,r[l]);return a}function Qn(e,r=[],a={}){if(Kn(e),r.length<=1)return;let l=[];typeof r[0]=="number"?l=r.map(y=>({value:y})):l=r;const{onmousemove:u}=a,{onmouseout:t}=a,n="interactive"in a?a.interactive:!!u,o=a.spotRadius||2,c=o*2,i=a.cursorWidth||2,s=parseFloat(e.attributes["stroke-width"].value),p=a.fetch||Xn,g=l.map(y=>p(y)),v=parseFloat(e.attributes.width.value)-c*2,O=parseFloat(e.attributes.height.value),k=O-s*2-c,h=Math.max(...g)===0?1:Math.max(...g),m=-1e3,D=g.length-1,M=v/D,T=[],
|
|
3
|
+
`),Jn=(e,r)=>r?(...a)=>e(...a).locale(r):e;class Gn{constructor({locale:r,formats:a,instance:l}={}){var u;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=qn,this.setLocaleToValue=t=>{const n=this.getCurrentLocaleCode();return n===t.locale()?t:t.locale(n)},this.hasUTCPlugin=()=>typeof F.utc<"u",this.hasTimezonePlugin=()=>typeof F.tz<"u",this.isSame=(t,n,o)=>{const c=this.setTimezone(n,this.getTimezone(t));return t.format(o)===c.format(o)},this.cleanTimezone=t=>{switch(t){case"default":return;case"system":return F.tz.guess();default:return t}},this.createSystemDate=t=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(t);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const n=F.tz.guess();return n!=="UTC"?F.tz(t,n):F(t)}return F(t)},this.createUTCDate=t=>{if(!this.hasUTCPlugin())throw new Error(St);return F.utc(t)},this.createTZDate=(t,n)=>{if(!this.hasUTCPlugin())throw new Error(St);if(!this.hasTimezonePlugin())throw new Error(Gt);const o=t!==void 0&&!t.endsWith("Z");return F(t).tz(this.cleanTimezone(n),o)},this.getLocaleFormats=()=>{const t=F.Ls,n=this.locale||"en";let o=t[n];return o===void 0&&(Vn(),o=t.en),o.formats},this.adjustOffset=t=>{if(!this.hasTimezonePlugin())return t;const n=this.getTimezone(t);if(n!=="UTC"){var o,c;const i=t.tz(this.cleanTimezone(n),!0);if(((o=i.$offset)!=null?o:0)===((c=t.$offset)!=null?c:0))return t;t.$offset=i.$offset}return t},this.date=t=>t===null?null:this.dayjs(t),this.dateWithTimezone=(t,n)=>{if(t===null)return null;let o;return n==="UTC"?o=this.createUTCDate(t):n==="system"||n==="default"&&!this.hasTimezonePlugin()?o=this.createSystemDate(t):o=this.createTZDate(t,n),this.locale===void 0?o:o.locale(this.locale)},this.getTimezone=t=>{if(this.hasTimezonePlugin()){var n;const o=(n=t.$x)==null?void 0:n.$timezone;if(o)return o}return this.hasUTCPlugin()&&t.isUTC()?"UTC":"system"},this.setTimezone=(t,n)=>{if(this.getTimezone(t)===n)return t;if(n==="UTC"){if(!this.hasUTCPlugin())throw new Error(St);return t.utc()}if(n==="system")return t.local();if(!this.hasTimezonePlugin()){if(n==="default")return t;throw new Error(Gt)}return F.tz(t,this.cleanTimezone(n))},this.toJsDate=t=>t.toDate(),this.parseISO=t=>this.dayjs(t),this.toISO=t=>t.toISOString(),this.parse=(t,n)=>t===""?null:this.dayjs(t,n,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=t=>{const n=this.getLocaleFormats(),o=c=>c.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(i,s,p)=>s||p.slice(1));return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(c,i,s)=>{const p=s&&s.toUpperCase();return i||n[s]||o(n[p])})},this.getFormatHelperText=t=>this.expandFormat(t).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=t=>t===null,this.isValid=t=>this.dayjs(t).isValid(),this.format=(t,n)=>this.formatByString(t,this.formats[n]),this.formatByString=(t,n)=>this.dayjs(t).format(n),this.formatNumber=t=>t,this.getDiff=(t,n,o)=>t.diff(n,o),this.isEqual=(t,n)=>t===null&&n===null?!0:this.dayjs(t).toDate().getTime()===this.dayjs(n).toDate().getTime(),this.isSameYear=(t,n)=>this.isSame(t,n,"YYYY"),this.isSameMonth=(t,n)=>this.isSame(t,n,"YYYY-MM"),this.isSameDay=(t,n)=>this.isSame(t,n,"YYYY-MM-DD"),this.isSameHour=(t,n)=>t.isSame(n,"hour"),this.isAfter=(t,n)=>t>n,this.isAfterYear=(t,n)=>this.hasUTCPlugin()?!this.isSameYear(t,n)&&t.utc()>n.utc():t.isAfter(n,"year"),this.isAfterDay=(t,n)=>this.hasUTCPlugin()?!this.isSameDay(t,n)&&t.utc()>n.utc():t.isAfter(n,"day"),this.isBefore=(t,n)=>t<n,this.isBeforeYear=(t,n)=>this.hasUTCPlugin()?!this.isSameYear(t,n)&&t.utc()<n.utc():t.isBefore(n,"year"),this.isBeforeDay=(t,n)=>this.hasUTCPlugin()?!this.isSameDay(t,n)&&t.utc()<n.utc():t.isBefore(n,"day"),this.isWithinRange=(t,[n,o])=>t>=n&&t<=o,this.startOfYear=t=>this.adjustOffset(t.startOf("year")),this.startOfMonth=t=>this.adjustOffset(t.startOf("month")),this.startOfWeek=t=>this.adjustOffset(t.startOf("week")),this.startOfDay=t=>this.adjustOffset(t.startOf("day")),this.endOfYear=t=>this.adjustOffset(t.endOf("year")),this.endOfMonth=t=>this.adjustOffset(t.endOf("month")),this.endOfWeek=t=>this.adjustOffset(t.endOf("week")),this.endOfDay=t=>this.adjustOffset(t.endOf("day")),this.addYears=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"year"):t.add(n,"year")),this.addMonths=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"month"):t.add(n,"month")),this.addWeeks=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"week"):t.add(n,"week")),this.addDays=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"day"):t.add(n,"day")),this.addHours=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"hour"):t.add(n,"hour")),this.addMinutes=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"minute"):t.add(n,"minute")),this.addSeconds=(t,n)=>this.adjustOffset(n<0?t.subtract(Math.abs(n),"second"):t.add(n,"second")),this.getYear=t=>t.year(),this.getMonth=t=>t.month(),this.getDate=t=>t.date(),this.getHours=t=>t.hour(),this.getMinutes=t=>t.minute(),this.getSeconds=t=>t.second(),this.getMilliseconds=t=>t.millisecond(),this.setYear=(t,n)=>this.adjustOffset(t.set("year",n)),this.setMonth=(t,n)=>this.adjustOffset(t.set("month",n)),this.setDate=(t,n)=>this.adjustOffset(t.set("date",n)),this.setHours=(t,n)=>this.adjustOffset(t.set("hour",n)),this.setMinutes=(t,n)=>this.adjustOffset(t.set("minute",n)),this.setSeconds=(t,n)=>this.adjustOffset(t.set("second",n)),this.setMilliseconds=(t,n)=>this.adjustOffset(t.set("millisecond",n)),this.getDaysInMonth=t=>t.daysInMonth(),this.getNextMonth=t=>this.addMonths(t,1),this.getPreviousMonth=t=>this.addMonths(t,-1),this.getMonthArray=t=>{const o=[t.startOf("year")];for(;o.length<12;){const c=o[o.length-1];o.push(this.addMonths(c,1))}return o},this.mergeDateAndTime=(t,n)=>t.hour(n.hour()).minute(n.minute()).second(n.second()),this.getWeekdays=()=>{const t=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(n=>this.formatByString(this.addDays(t,n),"dd"))},this.getWeekArray=t=>{const n=this.setLocaleToValue(t),o=n.startOf("month").startOf("week"),c=n.endOf("month").endOf("week");let i=0,s=o;const p=[];for(;s<c;){const g=Math.floor(i/7);p[g]=p[g]||[],p[g].push(s),s=this.addDays(s,1),i+=1}return p},this.getWeekNumber=t=>t.week(),this.getYearRange=(t,n)=>{const o=t.startOf("year"),c=n.endOf("year"),i=[];let s=o;for(;s<c;)i.push(s),s=this.addYears(s,1);return i},this.getMeridiemText=t=>t==="am"?"AM":"PM",this.rawDayJsInstance=l,this.dayjs=Jn((u=this.rawDayJsInstance)!=null?u:F,r),this.locale=r,this.formats=De({},Zn,a),F.extend($n)}}function Kt(e,r,a,l){return parseFloat((r-l*r/e+a).toFixed(2))}function Kn(e){[...e.querySelectorAll("*")].forEach(r=>e.removeChild(r))}function Xn(e){return e.value}function tt(e,r){const a=document.createElementNS("http://www.w3.org/2000/svg",e);for(const l in r)a.setAttribute(l,r[l]);return a}function Qn(e,r=[],a={}){if(Kn(e),r.length<=1)return;let l=[];typeof r[0]=="number"?l=r.map(y=>({value:y})):l=r;const{onmousemove:u}=a,{onmouseout:t}=a,n="interactive"in a?a.interactive:!!u,o=a.spotRadius||2,c=o*2,i=a.cursorWidth||2,s=parseFloat(e.attributes["stroke-width"].value),p=a.fetch||Xn,g=l.map(y=>p(y)),v=parseFloat(e.attributes.width.value)-c*2,O=parseFloat(e.attributes.height.value),k=O-s*2-c,h=Math.max(...g)===0?1:Math.max(...g),m=-1e3,D=g.length-1,M=v/D,T=[],w=Kt(h,k,s+o,g[0]);let N=`M${c} ${w}`;g.forEach((y,Y)=>{const L=Y*M+c,x=Kt(h,k,s+o,y);T.push(Object.assign({},l[Y],{index:Y,x:L,y:x})),N+=` L ${L} ${x}`});const B=tt("path",{class:"sparkline--line",d:N,fill:"none"}),z=`${N} V ${O} L ${c} ${O} Z`,A=tt("path",{class:"sparkline--fill",d:z,stroke:"none"});if(e.appendChild(A),e.appendChild(B),!n)return;const I=tt("line",{class:"sparkline--cursor",x1:m,x2:m,y1:0,y2:O,"stroke-width":i}),P=tt("circle",{class:"sparkline--spot",cx:m,cy:m,r:o});e.appendChild(I),e.appendChild(P);const R=tt("rect",{width:e.attributes.width.value,height:e.attributes.height.value,style:"fill: transparent; stroke: transparent",class:"sparkline--interaction-layer"});e.appendChild(R),R.addEventListener("mouseout",y=>{I.setAttribute("x1",m.toString()),I.setAttribute("x2",m.toString()),P.setAttribute("cx",m.toString()),t&&t(y)}),R.addEventListener("mousemove",y=>{const Y=y.offsetX;let L=T.find($=>$.x>=Y);L||(L=T[D]);const x=T[T.indexOf(L)-1];let j,E;x?(E=x.x+(L.x-x.x)/2,j=Y>=E?L:x):j=L;const{x:H}=j,{y:J}=j;P.setAttribute("cx",H.toString()),P.setAttribute("cy",J.toString()),I.setAttribute("x1",H.toString()),I.setAttribute("x2",H.toString()),u&&u(y,j)})}function Nt({style:e,title:r,value:a,graph:l,description:u,empty:t}){return d.jsx(ts,{children:d.jsxs(be,{style:{...e},children:[d.jsx(W,{sx:{fontSize:14},color:"text.secondary",children:r}),t&&f.isValidElement(t)?d.jsx(U,{color:"text.secondary",display:"flex",justifyContent:"center",alignItems:"center",style:{height:150},children:t}):d.jsxs(d.Fragment,{children:[d.jsx(W,{variant:"h5",component:"div",mt:1,children:a}),l,!!u&&d.jsx(U,{display:"flex",sx:{fontSize:12,marginTop:3},color:"text.secondary",children:u})]})]})})}Nt.propTypes={style:b.object,title:b.node,value:b.node,graph:b.node,description:b.any,empty:b.node};Nt.defaultProps={style:{},title:null,value:null,graph:null,empty:null,description:null};const ts=ft(Me)`
|
|
4
4
|
.card-content {
|
|
5
5
|
height: 150px;
|
|
6
6
|
}
|
|
@@ -34,7 +34,7 @@ import{cr as Xt,a1 as pe,j as d,a3 as U,v as Qt,bN as S,ah as jt,T as W,L as ge,
|
|
|
34
34
|
fill: red;
|
|
35
35
|
stroke: red;
|
|
36
36
|
}
|
|
37
|
-
`;function it({id:e,title:r,current:a,description:l,data:u,dateFn:t,valueFn:n,empty:o}){const c=C.useRef(null),i=C.useRef(null),s=en({style:{top:0,left:0},hidden:!0,textContent:""}),[p,g]=C.useState(null),v=nn(p),O={onmousemove(k,h){const{date:m,value:D}=h;s.textContent=`${t(m)}: ${n(D)}`,s.style.top=-30,s.style.left=80,s.hidden=!1},onmouseout(){s.hidden=!0}};return C.useEffect(()=>{setTimeout(()=>{g(document.querySelector(`.${e}`)),setTimeout(()=>{c.current&&Qn(c.current,u||[],O)},400)})},[u]),d.jsx(Nt,{title:r,value:a,empty:o,graph:d.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[d.jsx("svg",{ref:c,className:"sparkline",width:(v==null?void 0:v.width)||100,height:30,strokeWidth:"2"}),d.jsx("span",{className:"tooltip",ref:i,hidden:s.hidden,style:{...s.style},children:s.textContent})]}),description:l})}it.propTypes={id:b.string.isRequired,title:b.string.isRequired,current:b.any.isRequired,description:b.any,data:b.array,dateFn:b.func,valueFn:b.func,empty:b.node};it.defaultProps={description:null,empty:null,data:[],dateFn:e=>e,valueFn:e=>e};const V=Dn(0),es=(e,r)=>[{label:"This Week",startDate:nt(e,{locale:r}),endDate:st(e,{locale:r})},{label:"Last Week",startDate:nt(K(e,-1),{locale:r}),endDate:st(K(e,-1),{locale:r})},{label:"Last 7 Days",startDate:K(e,-1),endDate:e},{label:"This Month",startDate:rt(e),endDate:at(e)},{label:"Last Month",startDate:rt(_(e,-1)),endDate:at(_(e,-1))},{label:"This Year",startDate:dt(e),endDate:ht(e)},{label:"Last Year",startDate:dt(X(e,-1)),endDate:ht(X(e,-1))}];function ns({client:e,did:r}){const a=G().subtract(1,"day").toDate(),{info:l,inService:u}=Ae(),{t,locale:n}=gt(),[o,c]=C.useState(null),[i,s]=C.useState(!1),[p,g]=C.useState(a),[v,O]=C.useState({startDate:G().subtract(30,"day").toDate(),endDate:a}),k=Be(async()=>(await e.getTrafficInsights({input:{did:r,startDate:G(v.startDate).format("YYYY-MM-DD"),endDate:G(v.endDate).format("YYYY-MM-DD")}})).list);C.useEffect(()=>{k.loading||v.startDate&&v.endDate&&k.retry()},[v]);const h=y=>{c(o?null:y.currentTarget)},m=k.value||[],{loading:D,error:M}=k;if(!m.length&&D)return d.jsx(ve,{});if(M)return d.jsx(Te,{severity:"error",children:sn(M)});const T={totalRequests:V,validRequests:V,failedRequests:V,uniqueVisitors:V,uniqueFiles:V,uniqueReferrers:V,uniqueNotFound:V,uniqueStaticFiles:V,logSize:Z,bandwidth:Z},
|
|
37
|
+
`;function it({id:e,title:r,current:a,description:l,data:u,dateFn:t,valueFn:n,empty:o}){const c=C.useRef(null),i=C.useRef(null),s=en({style:{top:0,left:0},hidden:!0,textContent:""}),[p,g]=C.useState(null),v=nn(p),O={onmousemove(k,h){const{date:m,value:D}=h;s.textContent=`${t(m)}: ${n(D)}`,s.style.top=-30,s.style.left=80,s.hidden=!1},onmouseout(){s.hidden=!0}};return C.useEffect(()=>{setTimeout(()=>{g(document.querySelector(`.${e}`)),setTimeout(()=>{c.current&&Qn(c.current,u||[],O)},400)})},[u]),d.jsx(Nt,{title:r,value:a,empty:o,graph:d.jsxs("div",{className:`card-sparkline ${e}`,style:{marginTop:16},children:[d.jsx("svg",{ref:c,className:"sparkline",width:(v==null?void 0:v.width)||100,height:30,strokeWidth:"2"}),d.jsx("span",{className:"tooltip",ref:i,hidden:s.hidden,style:{...s.style},children:s.textContent})]}),description:l})}it.propTypes={id:b.string.isRequired,title:b.string.isRequired,current:b.any.isRequired,description:b.any,data:b.array,dateFn:b.func,valueFn:b.func,empty:b.node};it.defaultProps={description:null,empty:null,data:[],dateFn:e=>e,valueFn:e=>e};const V=Dn(0),es=(e,r)=>[{label:"This Week",startDate:nt(e,{locale:r}),endDate:st(e,{locale:r})},{label:"Last Week",startDate:nt(K(e,-1),{locale:r}),endDate:st(K(e,-1),{locale:r})},{label:"Last 7 Days",startDate:K(e,-1),endDate:e},{label:"This Month",startDate:rt(e),endDate:at(e)},{label:"Last Month",startDate:rt(_(e,-1)),endDate:at(_(e,-1))},{label:"This Year",startDate:dt(e),endDate:ht(e)},{label:"Last Year",startDate:dt(X(e,-1)),endDate:ht(X(e,-1))}];function ns({client:e,did:r}){const a=G().subtract(1,"day").toDate(),{info:l,inService:u}=Ae(),{t,locale:n}=gt(),[o,c]=C.useState(null),[i,s]=C.useState(!1),[p,g]=C.useState(a),[v,O]=C.useState({startDate:G().subtract(30,"day").toDate(),endDate:a}),k=Be(async()=>(await e.getTrafficInsights({input:{did:r,startDate:G(v.startDate).format("YYYY-MM-DD"),endDate:G(v.endDate).format("YYYY-MM-DD")}})).list);C.useEffect(()=>{k.loading||v.startDate&&v.endDate&&k.retry()},[v]);const h=y=>{c(o?null:y.currentTarget)},m=k.value||[],{loading:D,error:M}=k;if(!m.length&&D)return d.jsx(ve,{});if(M)return d.jsx(Te,{severity:"error",children:sn(M)});const T={totalRequests:V,validRequests:V,failedRequests:V,uniqueVisitors:V,uniqueFiles:V,uniqueReferrers:V,uniqueNotFound:V,uniqueStaticFiles:V,logSize:Z,bandwidth:Z},w=Object.keys(T).map(y=>({id:`${y}_chart`,title:t(`analytics.traffic.${y}`),current:m.length?T[y](m[0][y]):0,data:m.map(Y=>({date:Y.date,value:Y[y]})).reverse(),dateFn:V,valueFn:T[y]})),N=!!o,B=N?"date-range-picker-popover":void 0,z=u?Le.WELLKNOWN_SERVICE_PATH_PREFIX:l.routing.adminPath,A=$e(window.location.origin,z,`/api/analytics/traffic?date=${G(p).format("YYYY-MM-DD")}&did=${r}`),I=y=>{O(y),c(null)},P=y=>{g(y.toDate()),s(!1)},R=()=>{window.open(A)};return d.jsxs("div",{children:[d.jsxs(W,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:[t("analytics.trend"),d.jsxs(ke,{onClick:h,variant:"outlined",size:"small",color:"secondary",children:[_t(v.startDate,n)," - ",_t(v.endDate,n)]})]}),d.jsx(we,{id:B,open:N,anchorEl:o,onClose:()=>c(null),anchorOrigin:{vertical:"bottom",horizontal:"left"},children:d.jsx(zn,{open:!0,toggle:h,maxDate:a,definedRanges:es(p),onChange:I})}),d.jsx(S,{container:!0,spacing:4,children:w.map(y=>d.jsx(S,{item:!0,lg:3,md:6,sm:6,xs:12,children:d.jsx(it,{...y})},y.id))}),d.jsxs(W,{component:"div",variant:"h5",className:"page-header",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mt:4,mb:1,children:[t("analytics.detail"),d.jsxs("span",{children:[i&&d.jsx(ut,{onClick:R,style:{marginRight:32},children:d.jsx(We,{})}),d.jsx(an,{dateAdapter:Gn,children:d.jsx(on,{disableFuture:!0,format:"ll",value:G(p),onChange:P,slotProps:{textField:{size:"small"}}})})]})]}),d.jsx(Ue,{url:A,width:"100%",height:"100%",frameBorder:0,onLoad:()=>s(!0),styles:{border:0,minHeight:"400vh"}})]})}const ss=e=>`${e}%`;function At({cpus:e,currentLoad:r,history:a,empty:l}){const{t:u,locale:t}=C.useContext(te);return d.jsx(it,{id:"cpu-sparkline",title:u("common.cpu"),current:`${Math.floor(r||0)}%`,data:a,description:`${u("system.cores")}: ${(e==null?void 0:e.length)||0}`,dateFn:n=>ee(n,"HH:mm:ss",t),valueFn:ss,empty:l})}At.propTypes={cpus:b.array,currentLoad:b.number,history:b.array,empty:b.node};At.defaultProps={cpus:[],currentLoad:0,history:[],empty:null};function Ft({instanceCount:e,title:r,total:a,used:l,history:u,empty:t}){const{t:n,locale:o}=gt(),c=!!a,i=a-l,s=c?`(${Math.floor(l/a*100)}%)`:"",p=[];return e&&p.push({title:n("system.instances"),metric:e}),p.push({title:n("system.used"),metric:Z(l)}),c&&p.push({title:n("system.free"),metric:Z(i)},{title:n("system.total"),metric:Z(a)}),d.jsx(it,{id:"mem-sparkline",title:r||n("common.memory"),current:`${Z(Math.floor(l||0))} ${s}`,empty:t,data:u,description:p.map((g,v)=>d.jsxs(U,{sx:{marginLeft:v===0?0:2},children:[g.title,": ",g.metric]},g.title)),dateFn:g=>ee(g,"HH:mm:ss",o),valueFn:Z})}Ft.propTypes={title:b.string,instanceCount:b.number,total:b.number,used:b.number,history:b.array,empty:b.node};Ft.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[],empty:null};function zt({blocklet:e,cpuHistory:r,memoryHistory:a,...l}){const{t:u}=gt(),t=e.appRuntimeInfo||{},n=C.useCallback(o=>e.status!=="running"?d.jsx(W,{children:u("blocklet.runtimeInfo.noRunning")}):o.length?null:d.jsx(Re,{children:u("common.empty")}),[e.status,u]);return d.jsx(rs,{component:"div",...l,children:d.jsxs(S,{className:"page-metrics",container:!0,spacing:5,children:[d.jsx(S,{item:!0,lg:4,md:6,sm:6,xs:12,children:d.jsx(At,{empty:n(r),currentLoad:t.cpuUsage||0,history:r,style:{height:150}})},"cpu"),d.jsx(S,{item:!0,lg:4,md:6,sm:6,xs:12,children:d.jsx(Ft,{empty:n(a),used:t.memoryUsage||0,history:a,style:{height:150}})},"memory")]})})}zt.propTypes={blocklet:b.object.isRequired,cpuHistory:b.arrayOf(b.shape({date:b.number,value:b.number})),memoryHistory:b.arrayOf(b.shape({date:b.number,value:b.number}))};zt.defaultProps={cpuHistory:[],memoryHistory:[]};const rs=ft(W)``;function ce(){const{t:e,locale:r}=gt(),{blocklet:a,runtimeHistory:l,actions:{refreshBlocklet:u}}=Fe(),t=C.useMemo(()=>{const c=[];return jt.forEachBlockletSync(a,(i,{ancestors:s,id:p,level:g})=>{var v;(v=i==null?void 0:i.meta)!=null&&v.did&&i.meta.did!==a.meta.did&&c.push({type:"blocklet",groupId:a.meta.did,groupName:jt.getDisplayName(a),id:p,name:jt.getDisplayName(i,!0),blocklet:a,component:i,level:g-1>=0?g-1:0,runtimeInfo:i.runtimeInfo,ancestors:s})}),c},[a]);C.useEffect(()=>{const c=setInterval(()=>{u()},1e4);return()=>{clearInterval(c)}},[]);const n=c=>ln(Number(c||0),{locale:ze(r)}),o=[{label:e("common.name"),name:"name",options:{customBodyRenderLite(c){const{name:i,component:s,level:p,ancestors:g}=t[c];return d.jsxs(U,{display:"flex",alignItems:"center",pl:p*2,children:[d.jsx(cn,{size:20,blocklet:s,ancestors:g}),d.jsx(U,{ml:1,children:i}),d.jsx(un,{variant:"pin",style:{marginLeft:8},status:s.status,source:s.source,progress:s.progress})]})}}},{label:e("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(c){const{runtimeInfo:i,component:s}=t[c];return!(s!=null&&s.status)||s.status!=="running"?d.jsx(Q,{title:e("common.noData"),children:"--"}):n(i==null?void 0:i.uptime)}}},{label:e("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(c){const{runtimeInfo:i,component:s}=t[c];return!(s!=null&&s.status)||s.status!=="running"?d.jsx(Q,{title:e("common.noData"),children:"--"}):Z((i==null?void 0:i.memoryUsage)||0)}}},{label:e("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(c){const{runtimeInfo:i,component:s}=t[c];return!(s!=null&&s.status)||s.status!=="running"?d.jsx(Q,{title:e("common.noData"),children:"--"}):`${((i==null?void 0:i.cpuUsage)||0).toFixed(1)}%`}}},{label:e("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(c){const{runtimeInfo:i}=t[c];return i!=null&&i.uptime?d.jsxs(U,{display:"flex",alignItems:"center",children:[d.jsx(Ie,{icon:i!=null&&i.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),d.jsx(U,{ml:1,children:i!=null&&i.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:e("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(c){const{runtimeInfo:i,component:s}=t[c];return!(s!=null&&s.status)||s.status!=="running"?d.jsx(Q,{title:e("common.noData"),children:"--"}):i==null?void 0:i.pid}}},{label:e("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(c){const{runtimeInfo:i,component:s}=t[c];return!(s!=null&&s.status)||s.status!=="running"?d.jsx(Q,{title:e("common.noData"),children:"--"}):i==null?void 0:i.port}}}];return d.jsxs(as,{component:"div",children:[d.jsx(W,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:e("analytics.trend")}),d.jsx(U,{children:d.jsx(zt,{blocklet:a,cpuHistory:l.cpu,memoryHistory:l.memory})}),d.jsx(U,{mt:3,children:d.jsx(Pe,{title:e("analytics.detail"),className:"monitor-table",locale:r,data:t,columns:o,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}ce.propTypes={};const as=ft(W)``;function Ls(){const{t:e}=C.useContext(te),{did:r,client:a}=He(),[l,u]=je(),[t,n]=C.useState(l.get("tab")||"traffic"),o=p=>{n(p)};C.useEffect(()=>{l.set("tab",t),u(l,{replace:!0})},[t]);const c=[{label:e("common.traffic"),value:"traffic"},{label:e("common.runtime"),value:"runtime"}],i={traffic:ns,runtime:ce},s=i[t]||i.traffic;return d.jsxs(is,{children:[d.jsx(Ne,{tabs:c,current:t,onChange:o}),d.jsx("div",{className:"page-content",children:C.isValidElement(s)?s:d.jsx(s,{client:a,did:r})})]},t)}const is=ft.main`
|
|
38
38
|
.page-header {
|
|
39
39
|
display: flex;
|
|
40
40
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t,a2 as P,a3 as x,bE as M,bF as T,aP as B,al as I,cm as _,aa as W,T as d}from"./vendor-mui-core-COxJgW9_.js";import{r as s,L as b}from"./vendor-react-D-afvo_7.js";import{M as z}from"./index-7gknQYQQ.js";import{z as F,g as R,
|
|
1
|
+
import{j as t,a2 as P,a3 as x,bE as M,bF as T,aP as B,al as I,cm as _,aa as W,T as d}from"./vendor-mui-core-COxJgW9_.js";import{r as s,L as b}from"./vendor-react-D-afvo_7.js";import{M as z}from"./index-7gknQYQQ.js";import{z as F,g as R,aM as D,Q as L,aq as K,d as O}from"./vendor-arcblock-Dn16DH88.js";import{_ as U}from"./useLocalStorage-ganqTrK6.js";import{y as C}from"./index-tDqjC_e2.js";import{R as q}from"./relative-time-BHAJs1ji.js";import{r as G}from"./index-CEyrfuix.js";import"./vendor-utils-CV7RLr7b.js";import"./vendor-hooks-DzETutIU.js";import"./index-CYh2QqLk.js";const w=s.createContext({}),{Provider:H,Consumer:pe}=w;function Q({children:e,scope:r="",categories:o=[],showScope:n,scopeFormatter:p}){const{api:i,info:l}=C(),[c,a]=s.useState([]),[h,k]=s.useState({total:0,pageSize:20,pageCount:0,page:1}),[j,f]=s.useState(!1),[m,A]=U(`audit-log-category-${r}`,"all"),N=[{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(g=>o.length?g.value==="all"||o.includes(g.value):!0),y=async({page:g=1,silent:E=!0}={})=>{if(!j){E||f(!0);try{const u=await i.getAuditLogs({input:{paging:{page:g},category:m==="all"?"":m,scope:r}});n&&(u.list||[]).forEach(v=>{v.scope!==l.did&&(v.link=`/blocklets/${v.scope}/components`)}),a(u.list),k(u.paging),f(!1)}catch(u){F.error(u.message),f(!1)}}};s.useEffect(()=>{y({page:1,silent:!1})},[]),s.useEffect(()=>{y({page:1,silent:!1})},[m]);const $={loading:j,fetch:y,filter:{category:m,scope:r},categories:N,setCategory:A,data:c,paging:h,showScope:n,scopeFormatter:p};return t.jsx(H,{value:{auditLogs:$},children:e})}function S(){const{auditLogs:e}=s.useContext(w);return e}const J=({log:e,info:r,inService:o})=>o?`${O.WELLKNOWN_BLOCKLET_ADMIN_PATH}/members?did=${e.actor.did}`:e.scope===r.did?`/team/members?did=${e.actor.did}`:`/blocklets/${e.scope}/members?did=${e.actor.did}`;function V({log:e}){var l,c;const{inService:r,info:o}=C(),{showScope:n,scopeFormatter:p=a=>a}=S();if(!e.actor.did)return null;const i=!["blocklet",""].includes(e.actor.role);return t.jsxs(x,{className:"log-entry","data-cy":"log-entry",children:[t.jsx("div",{className:"log-author",children:i?t.jsx(L,{did:e.actor.did,size:36,shape:"circle"}):t.jsx(L,{did:e.actor.did,size:36})}),t.jsxs("div",{className:"log-body",children:[t.jsxs(d,{className:"log-header",color:"textSecondary",component:"p",gutterBottom:!0,display:"flex",alignItems:"center",children:[n&&t.jsx(b,{to:e.link,children:t.jsx(K,{style:{marginRight:8},children:p(e.scope)})}),i?t.jsxs(b,{to:J({log:e,inService:r,info:o}),target:"_blank",children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]}):t.jsxs("span",{children:[e.actor.fullName,e.actor.role?`(${e.actor.role})`:""]})," ",t.jsx("span",{style:{margin:"0 4px"},children:"-"})," ",e.action]}),t.jsx(d,{className:"log-content",maxWidth:"lg",color:"textPrimary",component:"div","data-color-mode":"light",gutterBottom:!0,children:t.jsx(z,{source:e.content,rehypePlugins:[[G,{target:"_blank"}]]})}),t.jsxs(x,{className:"log-meta",variant:"body2",children:[!!e.ip&&t.jsx(d,{component:"span",color:"textSecondary",children:`IP: ${e.ip}`}),!!((l=e.env.os)!=null&&l.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.os.name,"(",e.env.os.version,")"]}),!!((c=e.env.browser)!=null&&c.name)&&t.jsxs(d,{component:"span",color:"textSecondary",children:[e.env.browser.name,"(",e.env.browser.version,")"]}),t.jsx(d,{component:"span",color:"textSecondary",children:t.jsx(q,{value:e.createdAt})})]})]})]})}function X(){const{t:e}=R(),{data:r,loading:o,paging:n,filter:p,categories:i,setCategory:l,fetch:c}=S();return o?t.jsx("div",{style:{textAlign:"center",marginTop:"50px"},children:t.jsx(P,{})}):t.jsxs(Y,{"data-cy":"audit-logs",children:[t.jsx(x,{className:"log-controls",children:t.jsxs(M,{style:{width:"240px"},variant:"outlined",children:[t.jsx(T,{children:e("common.filter")}),t.jsx(B,{"data-cy":"filter-by-category-trigger",value:p.category,onChange:a=>l(a.target.value),fullWidth:!0,label:e("common.category"),disabled:o,children:i.map(a=>t.jsx(I,{value:a.value,"data-cy":`filter-by-category-${a.value}`,children:t.jsx(x,{children:t.jsx("span",{children:a.label})})},a.label))})]})}),r.length===0&&t.jsx(D,{children:e("common.empty")}),r.length>0&&r.map(a=>t.jsx(V,{log:a},a.id)),n.pageCount>1&&t.jsx(_,{page:n.page,count:n.pageCount,onChange:(a,h)=>c({page:h}),showFirstButton:!0,showLastButton:!0})]})}function ue({scope:e,categories:r,showScope:o,scopeFormatter:n}){return t.jsx(Q,{scope:e,categories:r,showScope:o,scopeFormatter:n,children:t.jsx(X,{})})}const Y=W.div`
|
|
2
2
|
.log-controls {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -55,4 +55,4 @@ import{j as t,a2 as P,a3 as x,bE as M,bF as T,aP as B,al as I,cm as _,aa as W,T
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`;export{
|
|
58
|
+
`;export{ue as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as l}from"./vendor-arcblock-Dn16DH88.js";import{a as x}from"./vendor-react-D-afvo_7.js";class m{constructor(e,t,o){this.name=e,this.prefix=t,this.baseEncode=o}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class w{constructor(e,t,o){if(this.name=e,this.prefix=t,t.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=t.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 f(this,e)}}class g{constructor(e){this.decoders=e}or(e){return f(this,e)}decode(e){const t=e[0],o=this.decoders[t];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 f=(r,e)=>new g({...r.decoders||{[r.prefix]:r},...e.decoders||{[e.prefix]:e}});class y{constructor(e,t,o,s){this.name=e,this.prefix=t,this.baseEncode=o,this.baseDecode=s,this.encoder=new m(e,t,o),this.decoder=new w(e,t,s)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}const E=({name:r,prefix:e,encode:t,decode:o})=>new y(r,e,t,o),$=(r,e,t,o)=>{const s={};for(let p=0;p<e.length;++p)s[e[p]]=p;let c=r.length;for(;r[c-1]==="=";)--c;const i=new Uint8Array(c*t/8|0);let n=0,d=0,u=0;for(let p=0;p<c;++p){const h=s[r[p]];if(h===void 0)throw new SyntaxError(`Non-${o} character`);d=d<<t|h,n+=t,n>=8&&(n-=8,i[u++]=255&d>>n)}if(n>=t||255&d<<8-n)throw new SyntaxError("Unexpected end of data");return i},A=(r,e,t)=>{const o=e[e.length-1]==="=",s=(1<<t)-1;let c="",i=0,n=0;for(let d=0;d<r.length;++d)for(n=n<<8|r[d],i+=8;i>t;)i-=t,c+=e[s&n>>i];if(i&&(c+=e[s&n<<t-i]),o)for(;c.length*t&7;)c+="=";return c},a=({name:r,prefix:e,bitsPerChar:t,alphabet:o})=>E({prefix:e,name:r,encode(s){return A(s,o,t)},decode(s){return $(s,o,t,r)}}),C=a({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),P=a({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),S=a({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),U=a({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),v=a({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),D=a({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),O=a({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),j=a({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),k=a({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),N=Object.freeze(Object.defineProperty({__proto__:null,base32:C,base32hex:v,base32hexpad:O,base32hexpadupper:j,base32hexupper:D,base32pad:S,base32padupper:U,base32upper:P,base32z:k},Symbol.toStringTag,{value:"Module"})),B=x(N),{toBuffer:q,toAddress:z,toBase58:J,toHex:T}=l,{base32:b}=B,H=r=>{if(!r)return r;const e=q(z(r));return b.encode(e)},I=r=>{if(!r)return r;const e=b.decode(r),t=J(e);return t.length>30?t:T(e)};var V={encode:H,decode:I};export{V as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{_ as Se}from"./index-ChdU5l0G.js";import{a1 as Ie,j as e,ac as z,T as P,a3 as m,aM as Pe,a4 as re,I as F,D as ue,E as w,ab as Re,r as ke,bH as Ee,K as oe,y as _e,x as $,aa as Oe}from"./vendor-mui-core-COxJgW9_.js";import{ah as De,g as Le,aS as Ve,d as L}from"./vendor-arcblock-oreSqNjg.js";import{E as M,D as ie,C as se,P as ne}from"./react-beautiful-dnd.esm-BPPmOpgZ.js";import{d as ae}from"./DeleteOutline-CW6vHyu2.js";import{B as Te,q as $e}from"./vendor-hooks-DHHsWSqV.js";import{r as h}from"./vendor-react-D-afvo_7.js";import{S as K}from"./studio-BSlFbK1F.js";import"./vendor-utils-CV7RLr7b.js";import"./raf-schd.esm-Cxhj8umC.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=qe;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=He;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,x;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(x=t.split("vimeo.com/")[1])==null?void 0:x.split("?")[0]:""}const U={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),U[t])}const k={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(k[i]!==void 0)return k[i];const[a,u]=V(i);return u==="youtube"?k[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?k[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:k[i]="",k[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function qe(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function He(r){const t=r.trim();return V(t).length>0}var X={},Ne=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=Ne(De()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Se(()=>import("./index-kGLQpRJK.js").then(r=>r.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(r=>({default:r.Uploader}))),Me=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function lt(){var ee;const{t:r,locale:t}=Le(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[x,j]=h.useState([]),[f,S]=h.useState(""),[T,_]=h.useState(""),[q,H]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),R=h.useRef(null),g=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},N=async o=>{const n=Array.from(x),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},xe=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await xe(o):o.source.droppableId==="videos"&&await N(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?x.map(d=>d===n?o.trim():d):x.filter(d=>d!==n):o&&(c=[...x,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},fe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Pe,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${q}`,onClick:()=>{var c;return(c=R.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(ie,{onDragEnd:J,children:e.jsx(se,{droppableId:"screenshots",direction:"horizontal",children:(d,O)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:O.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:O.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ne,{draggableId:b,index:B,children:(I,D)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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:te,onClick:()=>fe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ae,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=g.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{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"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(ie,{onDragEnd:J,children:e.jsx(se,{droppableId:"videos",direction:"horizontal",children:(d,O)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:O.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:O.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[x.map((b,B)=>e.jsx(ne,{draggableId:b,index:B,children:(I,D)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(ge,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ae,{})})})]})},b)),d.placeholder,x.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:x})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${f}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:R,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),H(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","application/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(le,{ref:g,popup:!0,onUploadFinish:()=>{var o;(o=g.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},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,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var R;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[x,j]=h.useState(!1),f=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==f.current||u),q=!!((R=navigator.clipboard)!=null&&R.readText),{run:H}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(Re,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(ke,{children:[e.jsx(Ee,{fullWidth:!0,value:i,onChange:g=>{const v=g.target.value.trim();a(v),v?H(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(Ve,{})})}):q&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const g=(await navigator.clipboard.readText()||"").trim();a(g),p(g)}catch(g){console.error(g)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&x&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),f.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${f.current}`,src:Ue(f.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(ge,{})})})]}),e.jsxs(_e,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{variant:"contained",onClick:()=>r(f.current),disabled:!f.current||s===f.current||S,children:t("studio.confirm")})]})]});function p(g){f.current="";const v=Ae(g);j(g?!v:!1),v&&(y(!0),fetch(v).then(N=>{N.ok?(f.current=g,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function ge(){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 Ze=Oe.div`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DjDooCTg.js","assets/vendor-arcblock-Dn16DH88.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-CV7RLr7b.js","assets/vendor-hooks-DzETutIU.js","assets/vendor-mui-core-COxJgW9_.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-Cp3ZCh7o.js","assets/index-tDqjC_e2.js","assets/_createAggregator-BgG70oKG.js","assets/index-DoZ2YM4T.js","assets/toUpper-DUImrX4s.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Se}from"./index-tDqjC_e2.js";import{a1 as Ie,j as e,ac as z,T as P,a3 as m,aM as Pe,a4 as re,I as F,D as ue,E as w,ab as Re,r as ke,bH as Ee,K as oe,y as _e,x as $,aa as Oe}from"./vendor-mui-core-COxJgW9_.js";import{ad as De,g as Le,aO as Ve,d as L}from"./vendor-arcblock-Dn16DH88.js";import{E as M,D as ie,C as se,P as ne}from"./react-beautiful-dnd.esm-D6d5Zfr8.js";import{d as ae}from"./DeleteOutline-1Utxk_IX.js";import{B as Te,q as $e}from"./vendor-hooks-DzETutIU.js";import{r as h}from"./vendor-react-D-afvo_7.js";import{S as K}from"./studio-g2uaz9WG.js";import"./vendor-utils-CV7RLr7b.js";import"./raf-schd.esm-Cxhj8umC.js";var C={};Object.defineProperty(C,"__esModule",{value:!0});C.getVideoId=V;var Ue=C.getEmbedUrl=ze,We=C.getVideoCoverUrl=Fe,Ae=C.getVideoCheckUrl=qe;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=He;function pe(r){var s,l,i;const t=r.trim();return t.includes("youtu.be/")?(s=t.split("youtu.be/")[1])==null?void 0:s.split("?")[0]:t.includes("/embed/")?(l=t.split("/embed/")[1])==null?void 0:l.split("?")[0]:t.includes("youtube.com/watch")?new URL(t).searchParams.get("v"):t.includes("youtube.com/shorts/")?(i=t.split("/shorts/")[1])==null?void 0:i.split("?")[0]:""}function he(r){var s,l,i,a,u,y,x;const t=r.trim();return t.includes("/embed/")?(s=t.split("/embed/")[1])==null?void 0:s.split("?")[0]:t.includes("vimeo.com/video/")?(l=t.split("/video/")[1])==null?void 0:l.split("?")[0]:t.includes("vimeo.com/channels/")?(a=(i=t.split("/channels/")[1])==null?void 0:i.split("/")[1])==null?void 0:a.split("?")[0]:t.includes("vimeo.com/groups/")?(y=(u=t.split("/groups/")[1])==null?void 0:u.split("/")[1])==null?void 0:y.split("?")[0]:t.includes("vimeo.com/")?(x=t.split("vimeo.com/")[1])==null?void 0:x.split("?")[0]:""}const U={};function V(r){const t=r.trim();return!t||!/^https?:\/\/.+\..+/.test(t)?[]:(U[t]||(U[t]=(()=>{const s=new URL(t);return s.host.includes("youtube.com")||s.host.includes("youtu.be")?[pe(t),"youtube"]:s.host.includes("vimeo.com")?[he(t),"vimeo"]:[]})()),U[t])}const k={};function ze(r,{modestbranding:t=1,controls:s=0,autoplay:l=0}={}){const i=r.trim();if(!i)return"";if(k[i]!==void 0)return k[i];const[a,u]=V(i);return u==="youtube"?k[i]=`https://www.youtube.com/embed/${a}?modestbranding=${t}&controls=${s}&autoplay=${l}`:u==="vimeo"?k[i]=`https://player.vimeo.com/video/${a}?autoplay=${l}`:k[i]="",k[i]}const E={};function Fe(r){const t=r.trim();if(!t)return"";if(E[t]!==void 0)return E[t];const[s,l]=V(t);return l==="youtube"?E[t]=`https://img.youtube.com/vi/${s}/mqdefault.jpg`:l==="vimeo"?E[t]=`https://i.vimeocdn.com/${s}/1000x563`:E[t]="",E[t]}function qe(r){const t=r.trim();if(!t)return"";const[s,l]=V(t);return l==="youtube"?`https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=${s}&format=json`:l==="vimeo"?`https://vimeo.com/api/oembed.json?url=https://vimeo.com/${s}`:""}function He(r){const t=r.trim();return V(t).length>0}var X={},Ne=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=Ne(De()),Ke=e;me=X.default=(0,Be.default)((0,Ke.jsx)("path",{d:"M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"}),"ContentPaste");const le=h.lazy(()=>Se(()=>import("./index-DjDooCTg.js").then(r=>r.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])).then(r=>({default:r.Uploader}))),Me=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo/upload`,Xe=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots/upload`,Ye=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/logo`,W=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/screenshots`,Je=`${L.WELLKNOWN_SERVICE_PATH_PREFIX}/api/studio/videos`,ce=5,de=3;function lt(){var ee;const{t:r,locale:t}=Le(),[s,l]=h.useState(!1),[i,a]=h.useState(!1),[u,y]=h.useState([]),[x,j]=h.useState([]),[f,S]=h.useState(""),[T,_]=h.useState(""),[q,H]=h.useState(Date.now()),p=Te(async()=>{var c;const n=await(await fetch(W)).json();return y(n.screenshots||[]),j(((c=n.videos)==null?void 0:c.filter(d=>!!d))||[]),n}),R=h.useRef(null),g=h.useRef(null);if(p.loading&&!p.data)return e.jsx(K,{children:e.jsx(M,{size:40})});if(p.error)return e.jsx(K,{children:e.jsx(z,{direction:"column",spacing:1,sx:{mb:3},children:e.jsx(P,{color:"error.main",sx:{fontWeight:"bold"},children:p.error.message})})});const v=async o=>{const n=o.filter(c=>!!c);j(n),await fetch(Je,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({videos:n})})},N=async o=>{const n=Array.from(x),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),await v(n)},xe=async o=>{const n=Array.from(u),[c]=n.splice(o.source.index,1);n.splice(o.destination.index,0,c),y(n),await fetch(`${W}/reorder`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({screenshots:n})})},J=async o=>{o.destination&&(o.source.droppableId==="screenshots"?await xe(o):o.source.droppableId==="videos"&&await N(o),p.runAsync())},Z=o=>{_(o.trim()),a(!0)},G=async(o,n="")=>{let c=[];n?c=o?x.map(d=>d===n?o.trim():d):x.filter(d=>d!==n):o&&(c=[...x,o.trim()]),_(""),a(!1),(o||n)&&await v(c),p.runAsync()},fe=o=>{l(!0),S(o)},Q=()=>{l(!1),S("")};function be(){const o=[{label:r("studio.type"),value:"png, jpg, webp, svg"},{label:r("studio.ratio"),value:"256x256"},{label:r("studio.size"),value:"<500KB"}],n=[{label:r("studio.tip"),value:r("studio.change")}];return e.jsx(A,{title:r("common.logo"),rules:o,tips:n,children:e.jsx(m,{sx:{flex:1,cursor:"pointer"},children:e.jsx(Pe,{variant:"square",sx:{width:128,height:128},alt:"Blocklet Logo",src:`${Ye}?t=${q}`,onClick:()=>{var c;return(c=R.current)==null?void 0:c.open()}})})})}function ve(){const o=[{label:r("studio.ratio"),value:"16 / 9"},{label:r("studio.count"),value:`1~${ce}`},{label:r("studio.size"),value:"<5MB"}],n=[{label:r("studio.tip"),value:r("studio.orderTipLong")}];return e.jsx(A,{title:r("common.screenshot"),tips:n,rules:o,children:e.jsx(ie,{onDragEnd:J,children:e.jsx(se,{droppableId:"screenshots",direction:"horizontal",children:(d,O)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:O.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:O.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[u.map((b,B)=>e.jsx(ne,{draggableId:b,index:B,children:(I,D)=>{const te=`${W}/${b}`;return e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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:te,onClick:()=>fe(b),style:{cursor:"pointer"}}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:async()=>{await fetch(te,{method:"DELETE"}),p.runAsync()},children:e.jsx(ae,{})})})]})}},b)),d.placeholder,u.length<ce&&c()]})})})});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>{var d;return(d=g.current)==null?void 0:d.open()},children:"+"})}}function je(){const o=[{label:r("studio.count"),value:`1~${de}`},{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"})]})}],n=[{label:`${r("studio.tip")}`,value:r("studio.videoTipLong")}];return e.jsxs(A,{title:r("studio.video"),tips:n,rules:o,children:[e.jsx(ie,{onDragEnd:J,children:e.jsx(se,{droppableId:"videos",direction:"horizontal",children:(d,O)=>e.jsxs(m,{display:"flex",alignItems:"center",sx:{flex:1,mt:1,flexWrap:"wrap",minHeight:225,background:O.isDraggingOver?"#f5f5f5":"transparent",transition:"background-color 0.2s ease",border:O.isDraggingOver?"2px dashed #999":"none",borderRadius:"4px"},ref:d.innerRef,...d.droppableProps,children:[x.map((b,B)=>e.jsx(ne,{draggableId:b,index:B,children:(I,D)=>e.jsxs(m,{ref:I.innerRef,...I.draggableProps,...I.dragHandleProps,className:"image-wrapper",sx:{transform:D.isDragging?"scale(1.05)":"none",boxShadow:D.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:We(b),onClick:()=>Z(b),style:{cursor:"pointer"}}),e.jsx(m,{sx:{position:"absolute",cursor:"pointer",fontSize:"3rem"},onClick:()=>Z(b),children:e.jsx(ge,{})}),e.jsx(re,{title:r("studio.deleteTooltip"),children:e.jsx(F,{className:"action",style:{top:10,color:"white",background:"red"},onClick:()=>G(null,b),children:e.jsx(ae,{})})})]})},b)),d.placeholder,x.length<de&&c()]})})}),i&&e.jsx(Y,{t:r,handleOperateVideo:G,defaultUrl:T,videos:x})]});function c(){return e.jsx(m,{display:"flex",justifyContent:"center",alignItems:"center",mb:2,width:400,height:225,fontSize:40,sx:{background:"#eee",cursor:"pointer",color:"#999"},onClick:()=>a(!0),children:"+"})}}function ye(){return e.jsx(ue,{open:s,onClose:Q,maxWidth:"xl",PaperProps:{style:{backgroundColor:"transparent",boxShadow:"none"}},children:e.jsx("img",{src:`${W}/${f}`,alt:"Screenshot Full",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain"},onClick:Q})})}function we(){return e.jsxs(h.Suspense,{fallback:e.jsx(M,{size:40}),children:[e.jsx(le,{ref:R,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),H(Date.now()),p.runAsync()},plugins:["ImageEditor"],installerProps:{disabled:!0},apiPathProps:{uploader:Me,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/png","image/jpeg","image/webp","application/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(le,{ref:g,popup:!0,onUploadFinish:()=>{var o;(o=g.current)==null||o.close(),p.runAsync()},installerProps:{disabled:!0},plugins:["ImageEditor"],apiPathProps:{uploader:Xe,disableMediaKitPrefix:!0,disableMediaKitStatus:!0},coreProps:{restrictions:{allowedFileTypes:["image/*","application/svg+xml"],maxFileSize:1024*1024*5,maxNumberOfFiles:5-u.length}},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,autoCropArea:1,aspectRatio:16/9,initialAspectRatio:16/9,croppedCanvasOptions:{minWidth:1280,minHeight:720,maxWidth:1280*2,maxHeight:720*2}}}},"uploader-screenshot")]})}const Ce=`https://www.arcblock.io/docs/blocklet-store/${t}/supplying-images`;return e.jsx(K,{children:e.jsxs(Ze,{children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:3},children:[e.jsx(P,{variant:"h5",sx:{fontWeight:"bold"},children:r("studio.title",{title:(ee=p.data)==null?void 0:ee.title})}),e.jsxs(P,{variant:"body2",color:"text.secondary",children:[r("studio.description")," ",e.jsx("a",{href:Ce,target:"_blank",rel:"noreferrer",children:r("studio.documentation")})]})]}),be(),ve(),je(),ye(),we()]})})}function A({title:r,rules:t,tips:s,children:l}){return e.jsxs(m,{display:"flex",flexDirection:"column",sx:{mb:4},children:[e.jsxs(z,{direction:"column",spacing:1,sx:{mb:2},children:[e.jsx(P,{variant:"h6",sx:{fontWeight:"bold"},children:r}),e.jsx(z,{direction:"row",spacing:2,sx:{fontSize:"13px",opacity:.8},children:t.map(a=>i(a.label,a.value))}),s.map(a=>e.jsx(m,{sx:{fontSize:"13px",opacity:.8},children:i(a.label,a.value)}))]}),l]});function i(a,u){return e.jsxs(m,{component:"span",children:[e.jsxs(m,{component:"span",sx:{color:"#555",mr:.5},children:[a,":"]}),e.jsx(m,{component:"span",sx:{color:"#007ec6"},children:u})]})}}A.propTypes={title:w.string.isRequired,rules:w.array.isRequired,tips:w.array.isRequired,children:w.node.isRequired};function Y({handleOperateVideo:r,t,defaultUrl:s="",videos:l}){var R;const[i,a]=h.useState(s),[u,y]=h.useState(!1),[x,j]=h.useState(!1),f=h.useRef(i),S=i!==s&&l.includes(i),T=!i&&s,_=!S&&(i&&i!==f.current||u),q=!!((R=navigator.clipboard)!=null&&R.readText),{run:H}=$e(p,{wait:500,leading:!0});return e.jsxs(ue,{open:!0,fullWidth:!0,maxWidth:"sm",children:[e.jsx(Re,{children:t(s?"studio.videoDialogEditTitle":"studio.videoDialogTitle")}),e.jsxs(ke,{children:[e.jsx(Ee,{fullWidth:!0,value:i,onChange:g=>{const v=g.target.value.trim();a(v),v?H(v):j(!1)},placeholder:t("studio.videoInputLabel"),endAdornment:i?e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:()=>{a(""),p("")},children:e.jsx(Ve,{})})}):q&&e.jsx(oe,{position:"end",children:e.jsx(F,{onClick:async()=>{try{const g=(await navigator.clipboard.readText()||"").trim();a(g),p(g)}catch(g){console.error(g)}},children:e.jsx(me,{})})})}),e.jsxs(m,{mb:2,mt:.5,children:[S&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.duplicateVideo")}),!S&&x&&e.jsx(P,{variant:"body2",color:"error",children:t("studio.videoDialogNoSrc")})]}),f.current?e.jsx("iframe",{width:"100%",height:"315",title:`video-${f.current}`,src:Ue(f.current),allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0,border:"1px solid #eee"}):e.jsx(m,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:315,width:"100%",border:"1px solid #eee"},children:u?e.jsx(M,{size:40}):e.jsx(P,{variant:"h5",color:"text.secondary",children:e.jsx(ge,{})})})]}),e.jsxs(_e,{children:[e.jsx($,{onClick:()=>r(),children:t("studio.cancel")}),T&&e.jsx($,{variant:"contained",color:"error",onClick:()=>r(null,s),children:t("studio.delete")}),_&&e.jsx($,{variant:"contained",onClick:()=>p(i),disabled:!i||u,children:t("studio.preview")}),!T&&!_&&e.jsx($,{variant:"contained",onClick:()=>r(f.current),disabled:!f.current||s===f.current||S,children:t("studio.confirm")})]})]});function p(g){f.current="";const v=Ae(g);j(g?!v:!1),v&&(y(!0),fetch(v).then(N=>{N.ok?(f.current=g,j(!1)):j(!0)}).catch(()=>{j(!0)}).finally(()=>y(!1)))}}Y.propTypes={handleOperateVideo:w.func.isRequired,t:w.func.isRequired,defaultUrl:w.string,videos:w.array.isRequired};Y.defaultProps={defaultUrl:""};function ge(){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 Ze=Oe.div`
|
|
3
3
|
margin-top: 24px;
|
|
4
4
|
.image-wrapper {
|
|
5
5
|
margin-bottom: 16px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f,aM as x,E as a}from"./vendor-mui-core-COxJgW9_.js";import{d as j,
|
|
1
|
+
import{j as f,aM as x,E as a}from"./vendor-mui-core-COxJgW9_.js";import{d as j,Q as E}from"./vendor-arcblock-Dn16DH88.js";import{j as g}from"./vendor-utils-CV7RLr7b.js";import{y,z as P,V as $,W as h,X as R}from"./index-tDqjC_e2.js";function A({blocklet:r,ancestors:p=[]}){var i;const s=y(),{inService:n}=s,e=P(r==null?void 0:r.status)||$(r==null?void 0:r.status),o=`?v=${(i=r==null?void 0:r.meta)==null?void 0:i.version}${e?"~":""}`;let t=n?`${g(R,j.WELLKNOWN_SERVICE_PATH_PREFIX,"/blocklet/logo-bundle")}${o}`:g(s.imgPrefix,"blocklet.png");if(r.source==="registry"&&r.deployedFrom&&r.meta.logo)t=`${g(r.deployedFrom,h(r.meta.bundleDid,r.meta.logo))}${o}`;else{const u=window.env.apiPrefix||"/",d=p.concat(r),m=n?d.slice(1):d;t=`${g(u,`/blocklet/logo-bundle${m.map(c=>`/${c.meta.did}`).join("")}`)}${o}`}return{logoUrl:t,inService:n}}function v({blocklet:r,style:p,size:s,ancestors:n,...e}){const o=y(),{logoUrl:t,inService:i}=A({blocklet:r,ancestors:n}),{variant:u}=e,d=i?()=>{}:c=>{c.target.src=`${o.imgPrefix}/blocklet.png`};let m=f.jsx("img",{src:t,onError:d,alt:r.meta.name,style:{width:s}});return r.meta.logo||(m=f.jsx(E,{did:r.meta.did||"",responsive:!0})),f.jsx(x,{variant:u||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},p),...e,children:m})}v.propTypes={blocklet:a.object.isRequired,style:a.object,size:a.oneOfType([a.number,a.string]),ancestors:a.array};v.defaultProps={style:{},size:40,ancestors:[]};export{v as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./vendor-mui-core-COxJgW9_.js";import{ag as n}from"./vendor-arcblock-Dn16DH88.js";function m({...t}){return o.jsx(n,{className:"bottom-button",variant:"contained",color:"primary",...t})}export{m as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i}from"./vendor-react-D-afvo_7.js";import{j as t,E as e}from"./vendor-mui-core-COxJgW9_.js";import{
|
|
1
|
+
import{r as i}from"./vendor-react-D-afvo_7.js";import{j as t,E as e}from"./vendor-mui-core-COxJgW9_.js";import{af as s,bx as c}from"./vendor-arcblock-Dn16DH88.js";function n({children:p,...r}){const{t:o}=i.useContext(s);return t.jsx(c,{tip:o("common.copyTip"),copiedTip:o("common.copiedTip"),...r,children:p})}n.propTypes={children:e.any.isRequired};export{n as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aa as d,j as e,a2 as P,a3 as h,E as T}from"./vendor-mui-core-COxJgW9_.js";import{g as B,
|
|
1
|
+
import{aa as d,j as e,a2 as P,a3 as h,E as T}from"./vendor-mui-core-COxJgW9_.js";import{g as B,aa as _,z as v,d as $}from"./vendor-arcblock-Dn16DH88.js";import{C as A}from"./vendor-hooks-DzETutIU.js";import{r as a}from"./vendor-react-D-afvo_7.js";import{j as F}from"./vendor-utils-CV7RLr7b.js";import{o as I,p as M,d as N,e as z,af as W,ao as O,P as V}from"./index-tDqjC_e2.js";import{L as X}from"./launch-result-message-BEuCq9h1.js";import{g as H}from"./get-safe-url-yHkHYeNB.js";import{S as E}from"./button-CPeDg26t.js";import{S as K}from"./layout-PlCf3Rtw.js";import"./content-layout-C8ThavEP.js";const Q=d(X)`
|
|
2
2
|
&& .result-footer {
|
|
3
3
|
height: 120px;
|
|
4
4
|
> div {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Sw=Object.defineProperty;var Pw=(e,t,n)=>t in e?Sw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Uo=(e,t,n)=>Pw(e,typeof t!="symbol"?t+"":t,n);import{a1 as Se,j as w,a3 as Re,a4 as Fn,E as ie,cC as Qb,cD as Zb,cE as Tw,bs as Jb,aa as Lt,cF as Js,bR as Gt,H as el,cG as di,br as Xn,c2 as ut,aw as Ot,cH as kw,cI as Dw,cJ as Rw,cp as Te,co as Ze,cr as Ew,c as Pe,_ as L,cK as gr,cL as Ke,cM as Mw,cN as bs,b as zn,cO as Ka,cP as $w,c3 as Ow,cQ as Iw,bS as _w,ck as Aw,cR as Bw,c4 as jw,g as ze,a as Le,k as Fe,cS as ev,u as Ht,cT as Lw,d as tn,cU as tl,cV as Mp,o as rn,cW as tv,i as jr,cX as Nw,cY as fi,cZ as Fw,c_ as $p,f as hd,c$ as nv,d0 as zw,d1 as Ww,p as nl,J as Vw,d2 as Uw,bm as Op,ad as Ip,M as Zt,I as bn,t as qw,al as Hn,T as vs,a2 as Lr,e as Hw,aM as Gw,aQ as rl,d3 as Kw,bx as Yw,aN as Su,by as _p,aK as rv,x as Xw,D as Ap,ab as Bp,r as jp,bJ as Lp,bN as Bi,y as Qw,aO as Zw}from"./vendor-mui-core-COxJgW9_.js";import{j as ov}from"./vendor-utils-CV7RLr7b.js";import{r as S,R as Jw,d as pi,a as $e,g as gd,b as tt,e as av,c as eS,k as iv}from"./vendor-react-D-afvo_7.js";import{ah as wr,g as Xt,z as ot,cJ as tS,cK as nS,ct as Ce,b1 as Np,b2 as rS,b3 as oS,b4 as aS,bk as iS,as as mi,aS as Fp,bg as sS,cL as lS,cM as cS,aj as Sr,aK as uS,ap as bd,d as je,ae as dS,au as fS,b7 as Yn,ak as ji,aQ as pS}from"./vendor-arcblock-oreSqNjg.js";import{d as sv}from"./Add-XINWD-cR.js";import{F as mS,d as vd}from"./form-text-input-ClGC4JKP.js";import{y as Kt,B as Wr,L as Ya,h as Gn,f as mt,am as bo,aC as hS,a6 as Nr,a5 as yd,ab as Pu,ap as lv,aD as cv,aE as gS,b as $a,m as oc,aF as bS}from"./index-ChdU5l0G.js";import{b as vS,W as vo,c as yS,e as Cd,B as uv,f as CS}from"./dashboard-Dff3slpj.js";import{S as xS}from"./switch-control-DOeNAipI.js";import{P as Tu,w as Do}from"./permission-Bz0PVI3J.js";import{r as wS}from"./index-DcfIKM1A.js";import{o as SS,e as PS,i as TS,p as kS,g as DS,d as zp,c as RS,b as nt,_ as Je,r as Pr}from"./slicedToArray-BPEJIbVV.js";import{r as Ye,a as xd,t as Yt,b as qe,e as ku,d as ES,s as ys,g as Du,m as dv,c as fv,f as MS,h as $S,i as Ru,j as pv,k as OS,l as IS,n as mv,o as wd,p as Wp,q as _S,u as Vp,v as AS,w as BS,x as ar,y as jS,z as Up,A as LS,B as ac,C as qp,D as NS,E as Li,F as Yr,G as FS,H as zS,I as Ni,J as ic,K as Fi,L as sc,M as lc,N as WS,O as VS,P as US,Q as qS,R as HS,S as GS,T as KS,U as YS,V as XS,W as QS}from"./index-BRPzwIuP.js";import{a as Qe,u as Me,r as Xa,d as Vr,b as ZS,w as Cs,g as hv,e as gv,c as JS,o as Eu}from"./raf-schd.esm-Cxhj8umC.js";import{C as Hp}from"./click-to-copy-DPKm1p6d.js";import{d as Gp}from"./ChevronRight-D6hU6q5w.js";import{d as e1}from"./ChevronLeft-B9PQ366h.js";import{d as t1}from"./ArrowDropDown-BPjEGMbu.js";import{f as fn}from"./format-error-C0Ke3VXF.js";import{A as n1,a as r1,b as o1,d as bv,B as a1,f as i1}from"./add-component-core-B6O0kJAO.js";import{C as Ro}from"./confirm-CVFWPron.js";import{v as s1,a as xs}from"./util-Cd3QOWLR.js";import{d as l1}from"./LockIcon-BIlUQ2kd.js";import{d as vv}from"./Launch-C1MUjdbY.js";import{C as c1}from"./item-wwVikGMU.js";import{d as u1}from"./InfoOutlined-CQX14YIV.js";import{B as d1}from"./bundle-avatar-CZnIDw9E.js";import{d as f1}from"./PlayArrow-CpIW2rO1.js";import{A as yv}from"./actions-BQfRapcY.js";import{I as cc}from"./index-DPyw3Xwp.js";import{W as p1}from"./did-address-DqD0tKOY.js";import{t as m1}from"./toUpper-CPtwa1LG.js";import"./vendor-hooks-DHHsWSqV.js";import"./Done-CbA_lc17.js";import"./logo-uploader-yBugHtcG.js";import"./index-DoZ2YM4T.js";import"./EditIcon-DDucSncy.js";import"./useLocalStorage-Bkgi6BS3.js";import"./get-safe-url-BtfNFuK0.js";import"./index-XlyOkzy1.js";import"./session-6sDuFWud.js";import"./useAsyncRetry-Ct0h3JKq.js";import"./useAsync-Barwm_ml.js";import"./useSetState-Crt4S51m.js";import"./launch-result-message-BEuCq9h1.js";import"./page-header-Htib6ejn.js";import"./config-space-B_9C2jTG.js";import"./api-C7qcY4XU.js";import"./index-DQR2LIPC.js";import"./Google-Bzqa7SGD.js";import"./index-7gknQYQQ.js";import"./index-Cp3ZCh7o.js";import"./use-mobile-DOkke39c.js";import"./content-layout-C8ThavEP.js";import"./connect-to-DL42-aQK.js";import"./DeleteOutline-CW6vHyu2.js";import"./shorten-label-CKNjZbhF.js";import"./MoreHoriz-CyRd8YYN.js";var Sd={},h1=Se;Object.defineProperty(Sd,"__esModule",{value:!0});var Cv=Sd.default=void 0,g1=h1(wr()),b1=w;Cv=Sd.default=(0,g1.default)((0,b1.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");var Pd={},v1=Se;Object.defineProperty(Pd,"__esModule",{value:!0});var xv=Pd.default=void 0,y1=v1(wr()),C1=w;xv=Pd.default=(0,y1.default)((0,C1.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");function Td({children:e,...t}){var l;const{t:n}=Xt(),{api:r}=Kt(),{blocklet:o}=Wr(),a=(l=o==null?void 0:o.settings)==null?void 0:l.autoCheckUpdate,i=async d=>{await r.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:d}})},s=async()=>{try{const d=!(a!=null&&a.enabled);await i({enabled:d}),ot.success(n(d?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(d){ot.error(d.message)}},c=!!(a!=null&&a.enabled);return w.jsxs(Re,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,w.jsx(Fn,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:w.jsx("div",{children:w.jsx(xS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Td.propTypes={children:ie.any};Td.defaultProps={children:null};var kd={},x1=Se;Object.defineProperty(kd,"__esModule",{value:!0});var ol=kd.default=void 0,w1=x1(wr()),S1=w;ol=kd.default=(0,w1.default)((0,S1.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");var wv={},qo={},uc={};function Sv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Sv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ye(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sv(e))&&(r&&(r+=" "),r+=t);return r}function Ne(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let c=0;c<a.length;c+=1){const l=a[c];l&&(i+=(s===!0?"":" ")+t(l),s=!1,n&&n[l]&&(i+=" "+n[l]))}r[o]=i}return r}function ws(e){return typeof e=="string"}function Mu(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Pv(e){if(typeof e!="string")throw new Error(Mu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function fr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Tv(e){if(!fr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Tv(e[n])}),t}function Br(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return fr(e)&&fr(t)&&Object.keys(t).forEach(o=>{fr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&fr(e[o])?r[o]=Br(e[o],t[o],n):n.clone?r[o]=fr(t[o])?Tv(t[o]):t[o]:r[o]=t[o]}),r}function La(e,t){return t?Br(e,t,{clone:!1}):e}function P1(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,s;const a=/min-width:\s*([0-9.]+)/;return+(((i=r.match(a))==null?void 0:i[1])||0)-+(((s=o.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function T1(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function k1(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function D1(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const al={xs:0,sm:600,md:900,lg:1200,xl:1536},Kp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${al[e]}px)`},R1={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:al[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Qn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||Kp;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||Kp;return Object.keys(t).reduce((i,s)=>{if(T1(a.keys,s)){const c=k1(r.containerQueries?r:R1,s);c&&(i[c]=n(t[s],s))}else if(Object.keys(a.values||al).includes(s)){const c=a.up(s);i[c]=n(t[s],s)}else{const c=s;i[c]=t[c]}return i},{})}return n(t)}function E1(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function M1(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function il(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Ss(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=il(e,n)||r,t&&(o=t(o,r,e)),o}function Et(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],c=i.theme,l=il(c,r)||{};return Qn(i,s,u=>{let f=Ss(l,o,u);return u===f&&typeof u=="string"&&(f=Ss(l,o,`${t}${u==="default"?"":Pv(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function $1(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const O1={m:"margin",p:"padding"},I1={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Yp={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_1=$1(e=>{if(e.length>2)if(Yp[e])e=Yp[e];else return[e];const[t,n]=e.split(""),r=O1[t],o=I1[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),Dd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Dd,...Rd];function hi(e,t,n,r){const o=il(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function Ed(e){return hi(e,"spacing",8)}function gi(e,t){return typeof t=="string"||t==null?t:e(t)}function A1(e,t){return n=>e.reduce((r,o)=>(r[o]=gi(t,n),r),{})}function B1(e,t,n,r){if(!t.includes(n))return null;const o=_1(n),a=A1(o,r),i=e[n];return Qn(e,i,a)}function kv(e,t){const n=Ed(e.theme);return Object.keys(e).map(r=>B1(e,t,r,n)).reduce(La,{})}function Ct(e){return kv(e,Dd)}Ct.propTypes={};Ct.filterProps=Dd;function xt(e){return kv(e,Rd)}xt.propTypes={};xt.filterProps=Rd;function sl(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?La(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function pn(e){return typeof e!="number"?e:`${e}px solid`}function Pn(e,t){return Et({prop:e,themeKey:"borders",transform:t})}const j1=Pn("border",pn),L1=Pn("borderTop",pn),N1=Pn("borderRight",pn),F1=Pn("borderBottom",pn),z1=Pn("borderLeft",pn),W1=Pn("borderColor"),V1=Pn("borderTopColor"),U1=Pn("borderRightColor"),q1=Pn("borderBottomColor"),H1=Pn("borderLeftColor"),G1=Pn("outline",pn),K1=Pn("outlineColor"),ll=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=hi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:gi(t,r)});return Qn(e,e.borderRadius,n)}return null};ll.propTypes={};ll.filterProps=["borderRadius"];sl(j1,L1,N1,F1,z1,W1,V1,U1,q1,H1,ll,G1,K1);const cl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=hi(e.theme,"spacing",8),n=r=>({gap:gi(t,r)});return Qn(e,e.gap,n)}return null};cl.propTypes={};cl.filterProps=["gap"];const ul=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=hi(e.theme,"spacing",8),n=r=>({columnGap:gi(t,r)});return Qn(e,e.columnGap,n)}return null};ul.propTypes={};ul.filterProps=["columnGap"];const dl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=hi(e.theme,"spacing",8),n=r=>({rowGap:gi(t,r)});return Qn(e,e.rowGap,n)}return null};dl.propTypes={};dl.filterProps=["rowGap"];const Y1=Et({prop:"gridColumn"}),X1=Et({prop:"gridRow"}),Q1=Et({prop:"gridAutoFlow"}),Z1=Et({prop:"gridAutoColumns"}),J1=Et({prop:"gridAutoRows"}),eP=Et({prop:"gridTemplateColumns"}),tP=Et({prop:"gridTemplateRows"}),nP=Et({prop:"gridTemplateAreas"}),rP=Et({prop:"gridArea"});sl(cl,ul,dl,Y1,X1,Q1,Z1,J1,eP,tP,nP,rP);function fo(e,t){return t==="grey"?t:e}const oP=Et({prop:"color",themeKey:"palette",transform:fo}),aP=Et({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:fo}),iP=Et({prop:"backgroundColor",themeKey:"palette",transform:fo});sl(oP,aP,iP);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const sP=Et({prop:"width",transform:Jt}),Md=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,a,i,s,c;const r=((i=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:i[n])||al[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Jt(n)}};return Qn(e,e.maxWidth,t)}return null};Md.filterProps=["maxWidth"];const lP=Et({prop:"minWidth",transform:Jt}),cP=Et({prop:"height",transform:Jt}),uP=Et({prop:"maxHeight",transform:Jt}),dP=Et({prop:"minHeight",transform:Jt});Et({prop:"size",cssProperty:"width",transform:Jt});Et({prop:"size",cssProperty:"height",transform:Jt});const fP=Et({prop:"boxSizing"});sl(sP,Md,lP,cP,uP,dP,fP);const bi={border:{themeKey:"borders",transform:pn},borderTop:{themeKey:"borders",transform:pn},borderRight:{themeKey:"borders",transform:pn},borderBottom:{themeKey:"borders",transform:pn},borderLeft:{themeKey:"borders",transform:pn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:pn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ll},color:{themeKey:"palette",transform:fo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:fo},backgroundColor:{themeKey:"palette",transform:fo},p:{style:xt},pt:{style:xt},pr:{style:xt},pb:{style:xt},pl:{style:xt},px:{style:xt},py:{style:xt},padding:{style:xt},paddingTop:{style:xt},paddingRight:{style:xt},paddingBottom:{style:xt},paddingLeft:{style:xt},paddingX:{style:xt},paddingY:{style:xt},paddingInline:{style:xt},paddingInlineStart:{style:xt},paddingInlineEnd:{style:xt},paddingBlock:{style:xt},paddingBlockStart:{style:xt},paddingBlockEnd:{style:xt},m:{style:Ct},mt:{style:Ct},mr:{style:Ct},mb:{style:Ct},ml:{style:Ct},mx:{style:Ct},my:{style:Ct},margin:{style:Ct},marginTop:{style:Ct},marginRight:{style:Ct},marginBottom:{style:Ct},marginLeft:{style:Ct},marginX:{style:Ct},marginY:{style:Ct},marginInline:{style:Ct},marginInlineStart:{style:Ct},marginInlineEnd:{style:Ct},marginBlock:{style:Ct},marginBlockStart:{style:Ct},marginBlockEnd:{style:Ct},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:cl},rowGap:{style:dl},columnGap:{style:ul},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Jt},maxWidth:{style:Md},minWidth:{transform:Jt},height:{transform:Jt},maxHeight:{transform:Jt},minHeight:{transform:Jt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function pP(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function mP(e,t){return typeof e=="function"?e(t):e}function hP(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:d,style:u}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const f=il(o,l)||{};return u?u(i):Qn(i,r,b=>{let h=Ss(f,d,b);return b===h&&typeof b=="string"&&(h=Ss(f,d,`${n}${b==="default"?"":Pv(b)}`,b)),c===!1?h:{[c]:h}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const a=o.unstable_sxConfig??bi;function i(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const l=E1(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=mP(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=La(u,e(f,m,o,a));else{const b=Qn({theme:o},m,h=>({[f]:h}));pP(b,m)?u[f]=t({sx:m,theme:o}):u=La(u,b)}else u=La(u,e(f,m,o,a))}),P1(o,M1(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Ur=hP();Ur.filterProps=["sx"];const gP=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??bi;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Dv(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=gP(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return fr(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}const bP=e=>{const t=Zb(e);class n extends Tw{constructor(o){super(o),this.prepend=t.sheet.prepend}}return t.sheet=new n({key:t.key,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy,prepend:t.sheet.prepend,insertionPoint:t.sheet.insertionPoint}),t};let $u;typeof document=="object"&&($u=bP({key:"css",prepend:!0}));function vP(e){const{injectFirst:t,children:n}=e;return t&&$u?w.jsx(Qb,{value:$u,children:n}):n}function yP(e){return e==null||Object.keys(e).length===0}function Rv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(yP(o)?n:o):t;return w.jsx(Jb,{styles:r})}/**
|
|
1
|
+
var Sw=Object.defineProperty;var Pw=(e,t,n)=>t in e?Sw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Uo=(e,t,n)=>Pw(e,typeof t!="symbol"?t+"":t,n);import{a1 as Se,j as w,a3 as Re,a4 as Fn,E as ie,cC as Qb,cD as Zb,cE as Tw,bs as Jb,aa as Lt,cF as Js,bR as Gt,H as el,cG as di,br as Xn,c2 as ut,aw as Ot,cH as kw,cI as Dw,cJ as Rw,cp as Te,co as Ze,cr as Ew,c as Pe,_ as L,cK as gr,cL as Ke,cM as Mw,cN as bs,b as zn,cO as Ka,cP as $w,c3 as Ow,cQ as Iw,bS as _w,ck as Aw,cR as Bw,c4 as jw,g as ze,a as Le,k as Fe,cS as ev,u as Ht,cT as Lw,d as tn,cU as tl,cV as Mp,o as rn,cW as tv,i as jr,cX as Nw,cY as fi,cZ as Fw,c_ as $p,f as hd,c$ as nv,d0 as zw,d1 as Ww,p as nl,J as Vw,d2 as Uw,bm as Op,ad as Ip,M as Zt,I as bn,t as qw,al as Hn,T as vs,a2 as Lr,e as Hw,aM as Gw,aQ as rl,d3 as Kw,bx as Yw,aN as Su,by as _p,aK as rv,x as Xw,D as Ap,ab as Bp,r as jp,bJ as Lp,bN as Bi,y as Qw,aO as Zw}from"./vendor-mui-core-COxJgW9_.js";import{j as ov}from"./vendor-utils-CV7RLr7b.js";import{r as S,R as Jw,d as pi,a as $e,g as gd,b as tt,e as av,c as eS,k as iv}from"./vendor-react-D-afvo_7.js";import{ad as wr,g as Xt,z as ot,cC as tS,cD as nS,cm as Ce,aY as Np,aZ as rS,a_ as oS,a$ as aS,bf as iS,ao as mi,aO as Fp,bb as sS,cE as lS,cF as cS,af as Sr,aG as uS,al as bd,d as je,aa as dS,aq as fS,b2 as Yn,ag as ji,aM as pS}from"./vendor-arcblock-Dn16DH88.js";import{d as sv}from"./Add-WwBlcqNF.js";import{F as mS,d as vd}from"./form-text-input-E0Z0s35O.js";import{y as Kt,B as Wr,L as Ya,h as Gn,f as mt,al as bo,aB as hS,a5 as Nr,a4 as yd,aa as Pu,ao as lv,aC as cv,aD as gS,b as $a,m as oc,aE as bS}from"./index-tDqjC_e2.js";import{b as vS,W as vo,c as yS,e as Cd,B as uv,f as CS}from"./dashboard-B3UhGh-u.js";import{S as xS}from"./switch-control-BMO1MVhi.js";import{P as Tu,w as Do}from"./permission-C7OYX2OJ.js";import{r as wS}from"./index-DcfIKM1A.js";import{o as SS,e as PS,i as TS,p as kS,g as DS,d as zp,c as RS,b as nt,_ as Je,r as Pr}from"./slicedToArray-BPEJIbVV.js";import{r as Ye,a as xd,t as Yt,b as qe,e as ku,d as ES,s as ys,g as Du,m as dv,c as fv,f as MS,h as $S,i as Ru,j as pv,k as OS,l as IS,n as mv,o as wd,p as Wp,q as _S,u as Vp,v as AS,w as BS,x as ar,y as jS,z as Up,A as LS,B as ac,C as qp,D as NS,E as Li,F as Yr,G as FS,H as zS,I as Ni,J as ic,K as Fi,L as sc,M as lc,N as WS,O as VS,P as US,Q as qS,R as HS,S as GS,T as KS,U as YS,V as XS,W as QS}from"./index-BRPzwIuP.js";import{a as Qe,u as Me,r as Xa,d as Vr,b as ZS,w as Cs,g as hv,e as gv,c as JS,o as Eu}from"./raf-schd.esm-Cxhj8umC.js";import{C as Hp}from"./click-to-copy-D-rDpTU1.js";import{d as Gp}from"./ChevronRight-UF0hSKpL.js";import{d as e1}from"./ChevronLeft-DV-sPxhr.js";import{d as t1}from"./ArrowDropDown-B6VSNrNX.js";import{f as fn}from"./format-error-C0Ke3VXF.js";import{A as n1,a as r1,b as o1,d as bv,B as a1,f as i1}from"./add-component-core-C8hvHJq0.js";import{C as Ro}from"./confirm-DhCXP8vW.js";import{v as s1,a as xs}from"./util-CmcVraD_.js";import{d as l1}from"./LockIcon-BIlUQ2kd.js";import{d as vv}from"./Launch-D9iyATKb.js";import{C as c1}from"./item-DoetJFaA.js";import{d as u1}from"./InfoOutlined-7hC78o3_.js";import{B as d1}from"./bundle-avatar-CtN88KlG.js";import{d as f1}from"./PlayArrow-IJdeSlbo.js";import{A as yv}from"./actions-DsY16tuf.js";import{I as cc}from"./index-Dk8-Ibsd.js";import{W as p1}from"./did-address-B-umhomj.js";import{t as m1}from"./toUpper-DUImrX4s.js";import"./vendor-hooks-DzETutIU.js";import"./Done-BbnQSLvu.js";import"./logo-uploader-CNnYMPxh.js";import"./index-DoZ2YM4T.js";import"./EditIcon-DDucSncy.js";import"./useLocalStorage-ganqTrK6.js";import"./get-safe-url-ByH0hntp.js";import"./index-CYh2QqLk.js";import"./session-UImnJahL.js";import"./useAsyncRetry-m5oMMmVh.js";import"./useAsync-BfmmMB4I.js";import"./useSetState-Crt4S51m.js";import"./launch-result-message-BEuCq9h1.js";import"./page-header-B3m4UCOV.js";import"./config-space-CT9a0s7Q.js";import"./api-C7qcY4XU.js";import"./index-DNd_40WG.js";import"./Google-CSKRQW0F.js";import"./index-7gknQYQQ.js";import"./index-Cp3ZCh7o.js";import"./use-mobile-DOkke39c.js";import"./content-layout-C8ThavEP.js";import"./connect-to-kYFiSkqc.js";import"./DeleteOutline-1Utxk_IX.js";import"./shorten-label-CKNjZbhF.js";import"./MoreHoriz-CtnQ7uqf.js";var Sd={},h1=Se;Object.defineProperty(Sd,"__esModule",{value:!0});var Cv=Sd.default=void 0,g1=h1(wr()),b1=w;Cv=Sd.default=(0,g1.default)((0,b1.jsx)("path",{d:"M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"}),"Update");var Pd={},v1=Se;Object.defineProperty(Pd,"__esModule",{value:!0});var xv=Pd.default=void 0,y1=v1(wr()),C1=w;xv=Pd.default=(0,y1.default)((0,C1.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");function Td({children:e,...t}){var l;const{t:n}=Xt(),{api:r}=Kt(),{blocklet:o}=Wr(),a=(l=o==null?void 0:o.settings)==null?void 0:l.autoCheckUpdate,i=async d=>{await r.updateAutoCheckUpdate({input:{did:o.meta.did,autoCheckUpdate:d}})},s=async()=>{try{const d=!(a!=null&&a.enabled);await i({enabled:d}),ot.success(n(d?"storage.spaces.autoCheckUpdate.enabled":"storage.spaces.autoCheckUpdate.disabled"))}catch(d){ot.error(d.message)}},c=!!(a!=null&&a.enabled);return w.jsxs(Re,{display:"flex",flexDirection:"row",alignItems:"center",children:[e,w.jsx(Fn,{title:n("storage.spaces.autoCheckUpdate.title"),arrow:!0,placement:"right",children:w.jsx("div",{children:w.jsx(xS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Td.propTypes={children:ie.any};Td.defaultProps={children:null};var kd={},x1=Se;Object.defineProperty(kd,"__esModule",{value:!0});var ol=kd.default=void 0,w1=x1(wr()),S1=w;ol=kd.default=(0,w1.default)((0,S1.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit");var wv={},qo={},uc={};function Sv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Sv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ye(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sv(e))&&(r&&(r+=" "),r+=t);return r}function Ne(e,t,n=void 0){const r={};for(const o in e){const a=e[o];let i="",s=!0;for(let c=0;c<a.length;c+=1){const l=a[c];l&&(i+=(s===!0?"":" ")+t(l),s=!1,n&&n[l]&&(i+=" "+n[l]))}r[o]=i}return r}function ws(e){return typeof e=="string"}function Mu(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function Pv(e){if(typeof e!="string")throw new Error(Mu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function fr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Tv(e){if(!fr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Tv(e[n])}),t}function Br(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return fr(e)&&fr(t)&&Object.keys(t).forEach(o=>{fr(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&fr(e[o])?r[o]=Br(e[o],t[o],n):n.clone?r[o]=fr(t[o])?Tv(t[o]):t[o]:r[o]=t[o]}),r}function La(e,t){return t?Br(e,t,{clone:!1}):e}function P1(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,o)=>{var i,s;const a=/min-width:\s*([0-9.]+)/;return+(((i=r.match(a))==null?void 0:i[1])||0)-+(((s=o.match(a))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const a=t[o];return delete r[o],r[o]=a,r},{...t}):t}function T1(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function k1(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,a=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(a)}function D1(e){const t=(a,i)=>a.replace("@media",i?`@container ${i}`:"@container");function n(a,i){a.up=(...s)=>t(e.breakpoints.up(...s),i),a.down=(...s)=>t(e.breakpoints.down(...s),i),a.between=(...s)=>t(e.breakpoints.between(...s),i),a.only=(...s)=>t(e.breakpoints.only(...s),i),a.not=(...s)=>{const c=t(e.breakpoints.not(...s),i);return c.includes("not all and")?c.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):c}}const r={},o=a=>(n(r,a),r);return n(o),{...e,containerQueries:o}}const al={xs:0,sm:600,md:900,lg:1200,xl:1536},Kp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${al[e]}px)`},R1={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:al[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Qn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const a=r.breakpoints||Kp;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||Kp;return Object.keys(t).reduce((i,s)=>{if(T1(a.keys,s)){const c=k1(r.containerQueries?r:R1,s);c&&(i[c]=n(t[s],s))}else if(Object.keys(a.values||al).includes(s)){const c=a.up(s);i[c]=n(t[s],s)}else{const c=s;i[c]=t[c]}return i},{})}return n(t)}function E1(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function M1(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function il(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,a)=>o&&o[a]?o[a]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Ss(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=il(e,n)||r,t&&(o=t(o,r,e)),o}function Et(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,a=i=>{if(i[t]==null)return null;const s=i[t],c=i.theme,l=il(c,r)||{};return Qn(i,s,u=>{let f=Ss(l,o,u);return u===f&&typeof u=="string"&&(f=Ss(l,o,`${t}${u==="default"?"":Pv(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function $1(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const O1={m:"margin",p:"padding"},I1={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Yp={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},_1=$1(e=>{if(e.length>2)if(Yp[e])e=Yp[e];else return[e];const[t,n]=e.split(""),r=O1[t],o=I1[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),Dd=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rd=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Dd,...Rd];function hi(e,t,n,r){const o=il(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?a=>typeof a=="string"?a:typeof o=="string"?`calc(${a} * ${o})`:o*a:Array.isArray(o)?a=>{if(typeof a=="string")return a;const i=Math.abs(a),s=o[i];return a>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function Ed(e){return hi(e,"spacing",8)}function gi(e,t){return typeof t=="string"||t==null?t:e(t)}function A1(e,t){return n=>e.reduce((r,o)=>(r[o]=gi(t,n),r),{})}function B1(e,t,n,r){if(!t.includes(n))return null;const o=_1(n),a=A1(o,r),i=e[n];return Qn(e,i,a)}function kv(e,t){const n=Ed(e.theme);return Object.keys(e).map(r=>B1(e,t,r,n)).reduce(La,{})}function Ct(e){return kv(e,Dd)}Ct.propTypes={};Ct.filterProps=Dd;function xt(e){return kv(e,Rd)}xt.propTypes={};xt.filterProps=Rd;function sl(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(a=>{r[a]=o}),r),{}),n=r=>Object.keys(r).reduce((o,a)=>t[a]?La(o,t[a](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function pn(e){return typeof e!="number"?e:`${e}px solid`}function Pn(e,t){return Et({prop:e,themeKey:"borders",transform:t})}const j1=Pn("border",pn),L1=Pn("borderTop",pn),N1=Pn("borderRight",pn),F1=Pn("borderBottom",pn),z1=Pn("borderLeft",pn),W1=Pn("borderColor"),V1=Pn("borderTopColor"),U1=Pn("borderRightColor"),q1=Pn("borderBottomColor"),H1=Pn("borderLeftColor"),G1=Pn("outline",pn),K1=Pn("outlineColor"),ll=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=hi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:gi(t,r)});return Qn(e,e.borderRadius,n)}return null};ll.propTypes={};ll.filterProps=["borderRadius"];sl(j1,L1,N1,F1,z1,W1,V1,U1,q1,H1,ll,G1,K1);const cl=e=>{if(e.gap!==void 0&&e.gap!==null){const t=hi(e.theme,"spacing",8),n=r=>({gap:gi(t,r)});return Qn(e,e.gap,n)}return null};cl.propTypes={};cl.filterProps=["gap"];const ul=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=hi(e.theme,"spacing",8),n=r=>({columnGap:gi(t,r)});return Qn(e,e.columnGap,n)}return null};ul.propTypes={};ul.filterProps=["columnGap"];const dl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=hi(e.theme,"spacing",8),n=r=>({rowGap:gi(t,r)});return Qn(e,e.rowGap,n)}return null};dl.propTypes={};dl.filterProps=["rowGap"];const Y1=Et({prop:"gridColumn"}),X1=Et({prop:"gridRow"}),Q1=Et({prop:"gridAutoFlow"}),Z1=Et({prop:"gridAutoColumns"}),J1=Et({prop:"gridAutoRows"}),eP=Et({prop:"gridTemplateColumns"}),tP=Et({prop:"gridTemplateRows"}),nP=Et({prop:"gridTemplateAreas"}),rP=Et({prop:"gridArea"});sl(cl,ul,dl,Y1,X1,Q1,Z1,J1,eP,tP,nP,rP);function fo(e,t){return t==="grey"?t:e}const oP=Et({prop:"color",themeKey:"palette",transform:fo}),aP=Et({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:fo}),iP=Et({prop:"backgroundColor",themeKey:"palette",transform:fo});sl(oP,aP,iP);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const sP=Et({prop:"width",transform:Jt}),Md=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,a,i,s,c;const r=((i=(a=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:a.values)==null?void 0:i[n])||al[n];return r?((c=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:c.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Jt(n)}};return Qn(e,e.maxWidth,t)}return null};Md.filterProps=["maxWidth"];const lP=Et({prop:"minWidth",transform:Jt}),cP=Et({prop:"height",transform:Jt}),uP=Et({prop:"maxHeight",transform:Jt}),dP=Et({prop:"minHeight",transform:Jt});Et({prop:"size",cssProperty:"width",transform:Jt});Et({prop:"size",cssProperty:"height",transform:Jt});const fP=Et({prop:"boxSizing"});sl(sP,Md,lP,cP,uP,dP,fP);const bi={border:{themeKey:"borders",transform:pn},borderTop:{themeKey:"borders",transform:pn},borderRight:{themeKey:"borders",transform:pn},borderBottom:{themeKey:"borders",transform:pn},borderLeft:{themeKey:"borders",transform:pn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:pn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:ll},color:{themeKey:"palette",transform:fo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:fo},backgroundColor:{themeKey:"palette",transform:fo},p:{style:xt},pt:{style:xt},pr:{style:xt},pb:{style:xt},pl:{style:xt},px:{style:xt},py:{style:xt},padding:{style:xt},paddingTop:{style:xt},paddingRight:{style:xt},paddingBottom:{style:xt},paddingLeft:{style:xt},paddingX:{style:xt},paddingY:{style:xt},paddingInline:{style:xt},paddingInlineStart:{style:xt},paddingInlineEnd:{style:xt},paddingBlock:{style:xt},paddingBlockStart:{style:xt},paddingBlockEnd:{style:xt},m:{style:Ct},mt:{style:Ct},mr:{style:Ct},mb:{style:Ct},ml:{style:Ct},mx:{style:Ct},my:{style:Ct},margin:{style:Ct},marginTop:{style:Ct},marginRight:{style:Ct},marginBottom:{style:Ct},marginLeft:{style:Ct},marginX:{style:Ct},marginY:{style:Ct},marginInline:{style:Ct},marginInlineStart:{style:Ct},marginInlineEnd:{style:Ct},marginBlock:{style:Ct},marginBlockStart:{style:Ct},marginBlockEnd:{style:Ct},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:cl},rowGap:{style:dl},columnGap:{style:ul},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Jt},maxWidth:{style:Md},minWidth:{transform:Jt},height:{transform:Jt},maxHeight:{transform:Jt},minHeight:{transform:Jt},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function pP(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function mP(e,t){return typeof e=="function"?e(t):e}function hP(){function e(n,r,o,a){const i={[n]:r,theme:o},s=a[n];if(!s)return{[n]:r};const{cssProperty:c=n,themeKey:l,transform:d,style:u}=s;if(r==null)return null;if(l==="typography"&&r==="inherit")return{[n]:r};const f=il(o,l)||{};return u?u(i):Qn(i,r,b=>{let h=Ss(f,d,b);return b===h&&typeof b=="string"&&(h=Ss(f,d,`${n}${b==="default"?"":Pv(b)}`,b)),c===!1?h:{[c]:h}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const a=o.unstable_sxConfig??bi;function i(s){let c=s;if(typeof s=="function")c=s(o);else if(typeof s!="object")return s;if(!c)return null;const l=E1(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=mP(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=La(u,e(f,m,o,a));else{const b=Qn({theme:o},m,h=>({[f]:h}));pP(b,m)?u[f]=t({sx:m,theme:o}):u=La(u,b)}else u=La(u,e(f,m,o,a))}),P1(o,M1(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Ur=hP();Ur.filterProps=["sx"];const gP=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??bi;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function Dv(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=gP(n);let a;return Array.isArray(t)?a=[r,...t]:typeof t=="function"?a=(...i)=>{const s=t(...i);return fr(s)?{...r,...s}:r}:a={...r,...t},{...o,sx:a}}const bP=e=>{const t=Zb(e);class n extends Tw{constructor(o){super(o),this.prepend=t.sheet.prepend}}return t.sheet=new n({key:t.key,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy,prepend:t.sheet.prepend,insertionPoint:t.sheet.insertionPoint}),t};let $u;typeof document=="object"&&($u=bP({key:"css",prepend:!0}));function vP(e){const{injectFirst:t,children:n}=e;return t&&$u?w.jsx(Qb,{value:$u,children:n}):n}function yP(e){return e==null||Object.keys(e).length===0}function Rv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(yP(o)?n:o):t;return w.jsx(Jb,{styles:r})}/**
|
|
2
2
|
* @mui/styled-engine v6.1.0
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a1 as t,j as a}from"./vendor-mui-core-COxJgW9_.js";import{
|
|
1
|
+
import{a1 as t,j as a}from"./vendor-mui-core-COxJgW9_.js";import{ad as c,d as e}from"./vendor-arcblock-Dn16DH88.js";var r={},p=t;Object.defineProperty(r,"__esModule",{value:!0});var l=r.default=void 0,_=p(c()),f=a;l=r.default=(0,_.default)((0,f.jsx)("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2m-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2m3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1z"}),"Lock");var o={},h=t;Object.defineProperty(o,"__esModule",{value:!0});var u=o.default=void 0,m=h(c()),s=a;u=o.default=(0,m.default)([(0,s.jsx)("path",{d:"M18 11c.7 0 1.37.1 2 .29V10c0-1.1-.9-2-2-2h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h6.26c-.79-1.13-1.26-2.51-1.26-4 0-3.87 3.13-7 7-7M8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9z"},"0"),(0,s.jsx)("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m0 2c.83 0 1.5.67 1.5 1.5S18.83 18 18 18s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5m0 6c-1.03 0-1.94-.52-2.48-1.32.73-.42 1.57-.68 2.48-.68s1.75.26 2.48.68c-.54.8-1.45 1.32-2.48 1.32"},"1")],"LockPerson");var n={},C=t;Object.defineProperty(n,"__esModule",{value:!0});var v=n.default=void 0,S=C(c()),j=a;v=n.default=(0,S.default)((0,j.jsx)("path",{d:"M21 8V7l-3 2-3-2v1l3 2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2M8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3m6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1zm8-6h-8V6h8z"}),"ContactMail");var i={},O=t;Object.defineProperty(i,"__esModule",{value:!0});var d=i.default=void 0,z=O(c()),A=a;d=i.default=(0,z.default)((0,A.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39"}),"Public");const $=[{value:e.WHO_CAN_ACCESS.ALL,icon:d,title:{zh:"所有人可访问",en:"Accessible to all"},description:{zh:"向所有人开放,无需通行证即可访问应用",en:"Open to the world anyone can access without passport"}},{value:e.WHO_CAN_ACCESS.INVITED,icon:v,title:{zh:"只有被邀请的人可以访问",en:"Only invited people can access"},description:{zh:"稍后您可以在管理页面中邀请成员",en:"You can invite members later in the admin page"}},{value:e.WHO_CAN_ACCESS.ADMIN,icon:u,title:{zh:"只有管理员可以访问",en:"Only Owner or Admin of the blocklet can access"},description:{zh:"必须提供管理员通行证才能访问应用",en:"You must provide owner or admin passport to access this application"}},{value:e.WHO_CAN_ACCESS.OWNER,icon:l,title:{zh:"只有应用所有者可以访问",en:"Only Owner of the blocklet can access"},description:{zh:"必须提供所有者通行证才能访问应用",en:"You must provide owner passport to access this application"}}];export{$ as A,l as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,aa as I,E as g,t as U}from"./vendor-mui-core-COxJgW9_.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{j as q}from"./vendor-utils-CV7RLr7b.js";import{g as F,d as G,
|
|
1
|
+
import{j as n,aa as I,E as g,t as U}from"./vendor-mui-core-COxJgW9_.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{j as q}from"./vendor-utils-CV7RLr7b.js";import{g as F,d as G,b6 as z,bk as H,bA as M,z as D}from"./vendor-arcblock-Dn16DH88.js";import{S as Y}from"./index-DNd_40WG.js";import{P as Q}from"./page-header-B3m4UCOV.js";import{o as $,H as V,h as u,f as T}from"./index-tDqjC_e2.js";import{S as W}from"./layout-PlCf3Rtw.js";import{S as X}from"./step-actions-FdD-71wr.js";import{S as J}from"./button-CPeDg26t.js";import"./vendor-hooks-DzETutIU.js";import"./Done-BbnQSLvu.js";import"./Google-CSKRQW0F.js";import"./logo-uploader-CNnYMPxh.js";import"./index-DoZ2YM4T.js";import"./content-layout-C8ThavEP.js";function x({children:C,bottom:E,onBottomFix:f}){const i=l.useRef(null),s=l.useRef(null),m=l.useRef(null),r=l.useRef(null),[L,h]=l.useState(!1);return l.useEffect(()=>{let t;const a=()=>{t||(t=setTimeout(()=>{s.current&&(s.current.scrollHeight>i.current.clientHeight-m.current.clientHeight?(r.current!=="fix"&&(f("fix"),r.current="fix"),h(!0)):(r.current!=="scroll"&&(f("scroll"),r.current="scroll"),h(!1))),t=null},50))};let d;return window.ResizeObserver?d=new ResizeObserver(a):window.addEventListener("resize",a),d.observe(i.current),d.observe(s.current),()=>{d?d.disconnect():window.removeEventListener("resize",a),t&&clearTimeout(t)}},[f]),n.jsxs(Z,{ref:i,className:`${L?"scroll-mode":""}`,children:[n.jsx("div",{className:"compact-context",ref:s,children:C}),n.jsx("div",{className:"fix-container",ref:m,children:E})]})}const Z=I.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -29,4 +29,4 @@ import{j as n,aa as I,E as g,t as U}from"./vendor-mui-core-COxJgW9_.js";import{r
|
|
|
29
29
|
opacity: 1;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
`;x.propTypes={children:g.any,bottom:g.element.isRequired,onBottomFix:g.func};x.defaultProps={children:[],onBottomFix:()=>{}};function P({onNext:C,onPrevious:E}){var _;const f=U(e=>e.breakpoints.down("md")),{t:i}=F(),[s,m]=l.useState(!1),[r,L]=l.useState(null),{did:h,blocklet:t,actions:a}=$(),{prefix:d,getSessionInHeader:S}=V();let y=(t.configs||[]).filter(e=>!u.BLOCKLET_CONFIGURABLE_KEY[e.key]);const O=t.environments.find(e=>e.key==="BLOCKLET_PASSPORT_COLOR"),B=q(G.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${t==null?void 0:t.updatedAt}`),R=[{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,description:i("blocklet.config.logoSquare"),value:(_=t.environments.find(e=>e.key==="BLOCKLET_APP_LOGO_SQUARE"))==null?void 0:_.value,componentType:"uploader",solo:!0,componentProps:{url:B,height:120,width:120,type:"square",did:h,prefix:d,headers:S,onUploaded:a.refreshBlocklet}},{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:i("blocklet.config.name"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_NAME").value},{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:i("blocklet.config.description"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_DESCRIPTION").value},{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:i("blocklet.config.passportColor"),value:O?O.value:"auto",hidden:!0,componentType:"passport",componentProps:{blocklet:t}}],v=[];T.forEachChildSync(t,(e,{ancestors:o})=>{const c=o.slice(1).map(p=>p.meta.did);v.push((e.configs||[]).map(p=>({...p,childDid:c.concat(e.meta.did)})))}),t.meta.group===u.BlockletGroup.gateway&&(y=y.filter(e=>!e.secure&&e.shared));const
|
|
32
|
+
`;x.propTypes={children:g.any,bottom:g.element.isRequired,onBottomFix:g.func};x.defaultProps={children:[],onBottomFix:()=>{}};function P({onNext:C,onPrevious:E}){var _;const f=U(e=>e.breakpoints.down("md")),{t:i}=F(),[s,m]=l.useState(!1),[r,L]=l.useState(null),{did:h,blocklet:t,actions:a}=$(),{prefix:d,getSessionInHeader:S}=V();let y=(t.configs||[]).filter(e=>!u.BLOCKLET_CONFIGURABLE_KEY[e.key]);const O=t.environments.find(e=>e.key==="BLOCKLET_PASSPORT_COLOR"),B=q(G.WELLKNOWN_SERVICE_PATH_PREFIX,`/blocklet/logo?v=${t==null?void 0:t.updatedAt}`),R=[{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_LOGO_SQUARE,description:i("blocklet.config.logoSquare"),value:(_=t.environments.find(e=>e.key==="BLOCKLET_APP_LOGO_SQUARE"))==null?void 0:_.value,componentType:"uploader",solo:!0,componentProps:{url:B,height:120,width:120,type:"square",did:h,prefix:d,headers:S,onUploaded:a.refreshBlocklet}},{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_NAME,description:i("blocklet.config.name"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_NAME").value},{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_APP_DESCRIPTION,description:i("blocklet.config.description"),value:t.environments.find(e=>e.key==="BLOCKLET_APP_DESCRIPTION").value},{key:u.BLOCKLET_CONFIGURABLE_KEY.BLOCKLET_PASSPORT_COLOR,description:i("blocklet.config.passportColor"),value:O?O.value:"auto",hidden:!0,componentType:"passport",componentProps:{blocklet:t}}],v=[];T.forEachChildSync(t,(e,{ancestors:o})=>{const c=o.slice(1).map(p=>p.meta.did);v.push((e.configs||[]).map(p=>({...p,childDid:c.concat(e.meta.did)})))}),t.meta.group===u.BlockletGroup.gateway&&(y=y.filter(e=>!e.secure&&e.shared));const A=z(H([...y,...v]),"key").filter(e=>!!e.key).sort((e,o)=>e.required&&!o.required?-1:o.required&&!e.required?1:0),b=T.getAppMissingConfigs(t).length,N=async e=>{const{childDid:o,...c}=r,p=[{...M(c,["key","value","description"]),value:e}];try{m(!0),await a.configBlocklet({configs:p,childDid:o})}catch(j){D.error(j.message)}finally{m(!1)}},k={},K=[...R,...A].map(e=>{const{value:o,...c}=e;return k[e.key]=o,{...c}}),w=()=>{E()};return n.jsxs(W,{children:[n.jsx("div",{className:"header",style:{marginBottom:16},children:n.jsx(Q,{title:i("setup.config.title"),subTitle:i("setup.config.subTitle"),onClickBack:w})}),n.jsx("div",{className:"container-main",children:n.jsx("div",{className:"container-inner",children:n.jsx(x,{bottom:n.jsx(X,{mt:8,disabled:s||r,blocklet:t,onStartNow:()=>C("complete"),children:n.jsx(J,{variant:"contained",disabled:s||b||r,onClick:()=>{a.refreshFuel({showError:!1}),C()},children:i("setup.next")})}),children:n.jsx(Y,{style:{margin:"0 auto 20px",paddingTop:f?0:38},loading:s,schema:K,defaultValue:k,onChange:(e,{action:o,currentItem:c})=>{o==="edit"?L(c):["cancel","confirm"].includes(o)&&L(null),o==="confirm"&&N(e[c.key])}})})})})]})}P.propTypes={onNext:g.func,onPrevious:g.func};P.defaultProps={onNext:()=>{},onPrevious:()=>{}};export{P as default};
|