@abtnode/blocklet-services 1.16.39-beta-20250210-090045-0b8f243f → 1.16.39-beta-20250211-013701-5e3d1ce3
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/{access-control-DdXj5niw.js → access-control-Cvyyosl7.js} +1 -1
- package/dist/assets/{add-component-core-BtRcqhKo.js → add-component-core-DlH-ksP3.js} +1 -1
- package/dist/assets/{add-resource-nU5RWMls.js → add-resource-Bi7DpPfy.js} +1 -1
- package/dist/assets/{analytics-X9VRwkzm.js → analytics-D5Wg9yw6.js} +1 -1
- package/dist/assets/{audit-logs-BJdGmYfI.js → audit-logs-CpENNExh.js} +1 -1
- package/dist/assets/{branding-DzXJA2pJ.js → branding-D_9x1yUc.js} +2 -2
- package/dist/assets/{bundle-avatar-CYdInmjR.js → bundle-avatar-3QSGrsNA.js} +1 -1
- package/dist/assets/{complete-DtNcnxdf.js → complete-DWza6ypd.js} +1 -1
- package/dist/assets/{component-DOOz4rgK.js → component-CMPB9eGw.js} +1 -1
- package/dist/assets/{config-navigation-B5FcBZZN.js → config-navigation-D-th1tcR.js} +3 -3
- package/dist/assets/{config-space-Y_f6nwhj.js → config-space-DQcEAb4q.js} +1 -1
- package/dist/assets/{config-CSlXpbL2.js → config-wRVMZtMQ.js} +1 -1
- package/dist/assets/{confirm-CpCj_oj-.js → confirm-dIU5y9cG.js} +1 -1
- package/dist/assets/{connect-BprUwdvy.js → connect-BCsAv_0T.js} +1 -1
- package/dist/assets/connect-Bzzh-qas.js +1 -0
- package/dist/assets/{connect-to-BYvNqC5N.js → connect-to-BzwS4rD2.js} +1 -1
- package/dist/assets/{dashboard-Cgj1BkGn.js → dashboard-DEaIei4u.js} +3 -3
- package/dist/assets/{domain-BD1Bntmg.js → domain-SUtQ2mKp.js} +1 -1
- package/dist/assets/{domain-list-h_f8stui.js → domain-list-C6MW__fO.js} +1 -1
- package/dist/assets/{email-BaNlnEr5.js → email-C1qoJ5wN.js} +1 -1
- package/dist/assets/{exchange-passport-CjaHJzsV.js → exchange-passport-DN1dbwCF.js} +1 -1
- package/dist/assets/{form-text-input-DS_PVT1r.js → form-text-input-DixVGGLY.js} +1 -1
- package/dist/assets/{fuel-BM8_TX9D.js → fuel-DbSYx7td.js} +1 -1
- package/dist/assets/{index-DRwuz-J9.js → index-B19CQ2ic.js} +1 -1
- package/dist/assets/{index-D6IQwB0H.js → index-BkTpbxSu.js} +1 -1
- package/dist/assets/{index-PcImULKW.js → index-Bv_3agvW.js} +1 -1
- package/dist/assets/{index-BMWG7Eya.js → index-Bwql_DnM.js} +1 -1
- package/dist/assets/{index-LIf2LIyz.js → index-C85gVBzh.js} +2 -2
- package/dist/assets/{index-0u5pzPhR.js → index-Cld1HWxz.js} +1 -1
- package/dist/assets/{index-Cqc33Ts_.js → index-DUoD69VU.js} +1 -1
- package/dist/assets/{index-C7dWd4bS.js → index-Dz_dMBd6.js} +4 -4
- package/dist/assets/{index-DF1jJ-bb.js → index-_suzTPHn.js} +3 -3
- package/dist/assets/{index-BA_7CRkd.js → index-aIv-YSXW.js} +1 -1
- package/dist/assets/{index-Dzj545ro.js → index-bmafJpME.js} +1 -1
- package/dist/assets/{index-ee8g6Cmz.js → index-sPEpq71V.js} +1 -1
- package/dist/assets/{index-DzU25sJ1.js → index-xXoK_djD.js} +1 -1
- package/dist/assets/{invitation-DSIQ2w-K.js → invitation-CBTcflFA.js} +1 -1
- package/dist/assets/{invite-C4uHXoFz.js → invite-BX9Ow66V.js} +1 -1
- package/dist/assets/{issue-passport-Dq9lOjJK.js → issue-passport-CgO1vOso.js} +1 -1
- package/dist/assets/{item-Ba7fzXuK.js → item-IntWv1pk.js} +1 -1
- package/dist/assets/{layout-BwWrVSXk.js → layout-DNDd_arD.js} +1 -1
- package/dist/assets/{list-DI-9r9EP.js → list-Cy1my35m.js} +1 -1
- package/dist/assets/{log-D4hWjoeK.js → log-BQgDF08N.js} +1 -1
- package/dist/assets/{login-DnwZJEBm.js → login-BUeQyCFg.js} +1 -1
- package/dist/assets/{logo-uploader-DbSGPbXh.js → logo-uploader-lx0oUxRg.js} +3 -3
- package/dist/assets/{lost-passport-Cqpxv9tR.js → lost-passport-C-DfyBDR.js} +1 -1
- package/dist/assets/open-window-BCSIX9-I.js +1 -1
- package/dist/assets/{overview-DMjokddi.js → overview-BZ7IJTY1.js} +1 -1
- package/dist/assets/{publish-resource-BeEqCNhj.js → publish-resource-C6LjZThR.js} +1 -1
- package/dist/assets/{relative-time-DpRjdL5Z.js → relative-time-ChYpdg43.js} +1 -1
- package/dist/assets/{setup-hqq9REGL.js → setup-BlbLoMQQ.js} +3 -3
- package/dist/assets/{start-C1K4M5DN.js → start-C_qLBKVg.js} +1 -1
- package/dist/assets/{step-actions-BJ9p7QSx.js → step-actions-BYvMcDu2.js} +1 -1
- package/dist/assets/{traffic-DelPjTGb.js → traffic-CctA2CCp.js} +1 -1
- package/dist/assets/{transfer-Dqy9gGzf.js → transfer-D5wgUCh5.js} +1 -1
- package/dist/assets/{unsubscribe-Bq-uODgj.js → unsubscribe-Fvp6J_a-.js} +1 -1
- package/dist/assets/{user-center-D0eTpKkD.js → user-center-BPnFfNIW.js} +1 -1
- package/dist/assets/{util-BpKZM3xV.js → util-XV_5OnOm.js} +1 -1
- package/dist/assets/{wrap-locale-oTlFUOZf.js → wrap-locale-BQ1e-7Pm.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/service-worker.js +1 -1
- package/package.json +21 -21
- package/dist/assets/connect-ByH0XoiE.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as E,j as t,bH as h,bx as L,a3 as p,aN as N,by as g,E as y,aa as I}from"./vendor-mui-core-xF5F4eT7.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{e as j,b as o,j as O}from"./vendor-arcblock-DZrZ_x_3.js";import{A as b}from"./config-DjozEU7w.js";import{P}from"./page-header-xWImGBdx.js";import{o as R,f as v,e as T}from"./index-
|
|
1
|
+
import{e as E,j as t,bH as h,bx as L,a3 as p,aN as N,by as g,E as y,aa as I}from"./vendor-mui-core-xF5F4eT7.js";import{r as l}from"./vendor-react-D-afvo_7.js";import{e as j,b as o,j as O}from"./vendor-arcblock-DZrZ_x_3.js";import{A as b}from"./config-DjozEU7w.js";import{P}from"./page-header-xWImGBdx.js";import{o as R,f as v,e as T}from"./index-C85gVBzh.js";import{S as Y}from"./layout-DNDd_arD.js";import{S as H}from"./step-actions-BYvMcDu2.js";import{S as D}from"./button-BZmMffY2.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";import"./content-layout-cWwRTmIc.js";function C({onNext:s}){const S=E(),{t:c,locale:m}=j(),[i,n]=l.useState(!1),[f,d]=l.useState(""),{blocklet:r}=R();l.useEffect(()=>{var a;const e=v.findServiceFromMeta(r.meta,o.NODE_SERVICES.AUTH);d(((a=e==null?void 0:e.config)==null?void 0:a.whoCanAccess)||o.WHO_CAN_ACCESS.ALL)},[r]);const u=async e=>{let a=o.ACCESS_POLICY_PUBLIC;e===o.WHO_CAN_ACCESS.ALL?a=o.ACCESS_POLICY_PUBLIC:e===o.WHO_CAN_ACCESS.INVITED?a=o.ACCESS_POLICY_INVITED_ONLY:e===o.WHO_CAN_ACCESS.OWNER?a=o.ACCESS_POLICY_OWNER_ONLY:e===o.WHO_CAN_ACCESS.ADMIN&&(a=o.ACCESS_POLICY_ADMIN_ONLY);try{n(!0),await T.updateBlockletSecurityRule({input:{did:r.meta.did,data:{id:o.SECURITY_RULE_DEFAULT_ID,accessPolicyId:a}}}),n(!1)}catch(A){n(!1),O.error(A.message)}},x=async e=>{i||(d(e.target.value),await u(e.target.value))},_={marginRight:4,fontSize:18,verticalAlign:"text-bottom",color:S.palette.text.secondary};return t.jsxs(W,{children:[t.jsx("div",{className:"header",children:t.jsx(P,{title:c("blocklet.config.access.description")})}),t.jsx(h,{component:"fieldset",children:t.jsx(L,{name:"inherit",value:f,onChange:x,children:b.map(e=>t.jsxs(p,{sx:{mb:2},children:[t.jsx(N,{value:e.value,control:t.jsx(g,{size:"small",color:"primary"}),label:t.jsxs("span",{children:[t.jsx(e.icon,{style:_}),e.title[m]]})}),t.jsx(p,{className:"tip",children:e.description[m]})]},e.value))})}),t.jsx(H,{mt:8,disabled:i,blocklet:r,onStartNow:()=>s("complete"),children:t.jsx(D,{loading:i,variant:"contained",disabled:i,onClick:()=>s(),children:c("setup.continue")})})]})}C.propTypes={onNext:y.func};C.defaultProps={onNext:()=>{}};const W=I(Y)`
|
|
2
2
|
height: 100%;
|
|
3
3
|
overflow-y: auto;
|
|
4
4
|
.header {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a1 as cr,j as i,E as _,a2 as ft,aa as Ve,a3 as Q,T as me,t as zt,aN as Yr,bL as Jr,I as Uo,bA as Wo,bM as zo,z as qo,aJ as Pa,bn as Ko,bN as _a,M as ur,bt as La,bu as Na,bv as Aa,br as Da,ad as Vo,L as Ma,bm as Fa,aw as Ba,al as Qr,a4 as Go,a6 as $a,ac as et,e as Gn,am as Ua,x as Hn,R as Ho,V as Xo,ar as Yo,bK as Jo,aF as Wa,as as Wt,bO as Yi,A as Ji,Z as za,P as qa,G as Ka,v as Va,$ as Ga,D as Ha,K as Qi,bp as Xa}from"./vendor-mui-core-xF5F4eT7.js";import{r as N,g as Zr,u as Ya,k as Ja,a as ei,e as Ee,b as Qa,l as Za}from"./vendor-react-D-afvo_7.js";import{j as Qo,d as el,S as tl,s as Zo,A as nl}from"./item-
|
|
1
|
+
import{a1 as cr,j as i,E as _,a2 as ft,aa as Ve,a3 as Q,T as me,t as zt,aN as Yr,bL as Jr,I as Uo,bA as Wo,bM as zo,z as qo,aJ as Pa,bn as Ko,bN as _a,M as ur,bt as La,bu as Na,bv as Aa,br as Da,ad as Vo,L as Ma,bm as Fa,aw as Ba,al as Qr,a4 as Go,a6 as $a,ac as et,e as Gn,am as Ua,x as Hn,R as Ho,V as Xo,ar as Yo,bK as Jo,aF as Wa,as as Wt,bO as Yi,A as Ji,Z as za,P as qa,G as Ka,v as Va,$ as Ga,D as Ha,K as Qi,bp as Xa}from"./vendor-mui-core-xF5F4eT7.js";import{r as N,g as Zr,u as Ya,k as Ja,a as ei,e as Ee,b as Qa,l as Za}from"./vendor-react-D-afvo_7.js";import{j as Qo,d as el,S as tl,s as Zo,A as nl}from"./item-IntWv1pk.js";import{$ as dr,a2 as ct,a6 as ti,D as es,aA as Zi,b as ts,e as mt,aB as st,o as rl,m as il,n as hr,a9 as ol,Z as ns,aC as eo,aD as sl,j as ni,C as al,aE as Kt,B as sr,aF as ll,f as to,aG as rs,aH as ir,ae as ri,aj as is,U as pr,aI as cl,aJ as os,au as ul,aK as dl,aL as Ur,aM as hl,a5 as pl,aN as fl,a4 as ml}from"./vendor-arcblock-DZrZ_x_3.js";import{f as At,y as Cn,Y as gl,Z as vl,h as kt,$ as yl,C as bl,a0 as xl,a1 as wl,a2 as El,B as fr,a3 as ss,W as Sl,a4 as Tl,a5 as jl,a6 as Ol,a7 as Qn,a8 as no,a9 as kl}from"./index-C85gVBzh.js";import{L as ro}from"./launch-result-message-keU5grqY.js";import{P as as}from"./page-header-xWImGBdx.js";import{b as lt,p as Rl,B as Cl,C as io,x as qn,U as ls,Z as Il,a8 as Pl,K as Er,w as ii,a9 as _l,aa as Ll,ab as Nl,ac as Al,y as Un,ad as Dl,c as Ml}from"./vendor-utils-5TjOM6td.js";import{u as Fl,C as Bl}from"./config-space-DQcEAb4q.js";import{R as Sr}from"./logo-uploader-lx0oUxRg.js";import{S as $l}from"./index-Bwql_DnM.js";import{s as cs,h as Ul,w as Wl,f as zl,a as ql,b as Kl,c as Vl,M as Gl}from"./index-ChSPqVLh.js";import{n as Xn,d as Hl,a as Xl,e as us,v as Yl}from"./vendor-hooks-BKxTDk_P.js";import{g as Jl}from"./get-safe-url-Du4BhDgB.js";import{p as Ql}from"./index-C2fPoxDR.js";import{r as Zl}from"./cloneDeep-BRiLvZjr.js";import{I as oo}from"./index-DGzAI_hi.js";import{u as ec}from"./session-CM1ewS-k.js";import{W as tc}from"./did-address-D0Fo5eTl.js";import{_ as ds}from"./useLocalStorage-DV4AIe5L.js";import{f as hs}from"./format-error-C0Ke3VXF.js";import{a as so}from"./api-K65cLqol.js";import{d as nc,v as rc,e as ic}from"./util-XV_5OnOm.js";import{u as ps}from"./use-mobile-DnWfrhc7.js";import{C as oc}from"./content-layout-cWwRTmIc.js";import{C as sc,D as ac,a as lc}from"./connect-to-BzwS4rD2.js";import{d as cc}from"./ArrowDropDown-DM9y1OaN.js";import{d as uc}from"./ChevronLeft-CmbkC1dP.js";import{d as dc}from"./ChevronRight-DlIj8Fj2.js";const uf="blocklet-add-component-registry",df="server-add-registry",hf=e=>`resource-${e}-add-registry`;var oi={},hc=cr;Object.defineProperty(oi,"__esModule",{value:!0});var fs=oi.default=void 0,pc=hc(dr()),fc=i;fs=oi.default=(0,pc.default)((0,fc.jsx)("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link");function si({disabled:e,children:t,onConfirm:n}){return N.useEffect(()=>{if(e)return()=>{};const r=o=>{o.code==="Enter"&&(o.metaKey===!0||o.ctrlKey===!0)&&(o.preventDefault(),o.stopPropagation(),n())};return document.addEventListener("keydown",r),()=>{document.removeEventListener("keydown",r)}},[e,n]),t}si.propTypes={disabled:_.bool,children:_.any.isRequired,onConfirm:_.func.isRequired};si.defaultProps={disabled:!1};function ai({onContinue:e,nextDisabled:t,launching:n,texts:r,description:o}){const[c,d]=N.useState(!1),h=()=>d(b=>!b);return i.jsxs(i.Fragment,{children:[i.jsx(mc,{children:i.jsxs(si,{disabled:t,onConfirm:e,children:[i.jsx("div",{className:"eula-trigger",onClick:h,children:r.listenName}),i.jsx(ct,{disabled:t,color:"primary",variant:"contained",className:"next-button",onClick:e,children:n?i.jsxs(i.Fragment,{children:[i.jsx(ft,{size:14}),r.launchingText]}):r.buttonNext})]})}),i.jsx(ti,{open:c,title:r.listenName,onClose:()=>d(!1),children:o})]})}ai.propTypes={onContinue:_.func.isRequired,nextDisabled:_.bool,launching:_.bool,description:_.any,texts:_.object};ai.defaultProps={nextDisabled:!1,launching:!1,description:"",texts:{listenName:"",launchingText:"",buttonNext:""}};const mc=Ve.div`
|
|
2
2
|
margin: 0 auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as v,j as h}from"./vendor-mui-core-xF5F4eT7.js";import{l as B,r}from"./vendor-react-D-afvo_7.js";import{x as W,C as O}from"./vendor-utils-5TjOM6td.js";import{e as A,a6 as T}from"./vendor-arcblock-DZrZ_x_3.js";import{k as w,u as _,o as F}from"./vendor-hooks-BKxTDk_P.js";import{A as K,S as $}from"./add-component-core-
|
|
1
|
+
import{t as v,j as h}from"./vendor-mui-core-xF5F4eT7.js";import{l as B,r}from"./vendor-react-D-afvo_7.js";import{x as W,C as O}from"./vendor-utils-5TjOM6td.js";import{e as A,a6 as T}from"./vendor-arcblock-DZrZ_x_3.js";import{k as w,u as _,o as F}from"./vendor-hooks-BKxTDk_P.js";import{A as K,S as $}from"./add-component-core-DlH-ksP3.js";import{o as z,L as G}from"./index-C85gVBzh.js";import"./item-IntWv1pk.js";import"./Add-DSPtuudj.js";import"./format-error-C0Ke3VXF.js";import"./Launch-BX35m3eH.js";import"./Done-DJfjmlFC.js";import"./DeleteOutline-BzV7E1BM.js";import"./click-to-copy-Bu9H6mvL.js";import"./shorten-label-J69eHfMN.js";import"./confirm-dIU5y9cG.js";import"./session-CM1ewS-k.js";import"./get-safe-url-Du4BhDgB.js";import"./did-address-D0Fo5eTl.js";import"./launch-result-message-keU5grqY.js";import"./page-header-xWImGBdx.js";import"./config-space-DQcEAb4q.js";import"./api-K65cLqol.js";import"./logo-uploader-lx0oUxRg.js";import"./index-DoZ2YM4T.js";import"./index-Bwql_DnM.js";import"./Google-DTKsjoGP.js";import"./cloneDeep-BRiLvZjr.js";import"./index-ChSPqVLh.js";import"./index-C2fPoxDR.js";import"./index-DGzAI_hi.js";import"./useLocalStorage-DV4AIe5L.js";import"./util-XV_5OnOm.js";import"./use-mobile-DnWfrhc7.js";import"./content-layout-cWwRTmIc.js";import"./connect-to-BzwS4rD2.js";import"./ArrowDropDown-DM9y1OaN.js";import"./ChevronLeft-CmbkC1dP.js";import"./ChevronRight-DlIj8Fj2.js";function Me(){var u;const{t:f}=A(),{blocklet:i}=z(),{componentDid:s}=B(),g=v(e=>e.breakpoints.down("md")),o=new URL(window.location.href),C=o.searchParams.get("mode")==="dialog",c=o.searchParams.get("resourceType")||"",l=o.searchParams.get("resourceDid")||s,R=o.searchParams.get("store")||"",S=o.searchParams.get("showFromUrl")!=="false",y=o.searchParams.get("showResourcesSwitch")!=="false",E=o.searchParams.get("enableRunBackground")!=="false",P=o.searchParams.get("showCategory")!=="false",n=(u=i==null?void 0:i.meta)==null?void 0:u.did,m=R.split(",").filter(Boolean).map(e=>{try{return new URL(e.startsWith("http")?e:`https://${e}`).origin}catch(t){return console.error(t),null}}).filter(Boolean),[D,x]=r.useState(m.map(e=>({url:e,name:e.replace("https://","")}))),[U,b]=r.useState(null),[j,M]=r.useState("");r.useEffect(()=>{(async()=>{try{const e=await Promise.all(m.map(async t=>{const a=W(t,"/api/store.json"),{data:L}=await O.get(a);return{url:t,name:L.name}}));x(e||[])}catch(e){console.error(e)}})()},[m.join(",")]);const k=()=>{window.parent.postMessage({event:"resourceDialog.close",componentDid:s},"*")};r.useEffect(()=>{const e=G();return n&&e.connect(),()=>{n&&e.isConnected()&&e.disconnect()}},[n]),w(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:s},"*")});const p=_(e=>{var t,a;((t=e.data)==null?void 0:t.event)==="resourceDialog.select"&&((a=e.data)==null?void 0:a.componentDid)===s&&(b(e.data.data),M(e.data.storeUrl))});w(()=>{window.addEventListener("message",p)}),F(()=>{window.removeEventListener("message",p)});const d=({inDialog:e=!0}={})=>h.jsx(K,{stores:D,selectedMeta:U,storeUrl:j,resourceType:c,resourceDid:l,mode:"embed",inDialog:e,storageKey:$(`${c}+${l}`),showResourcesSwitch:y,showFromUrl:S,enableRunBackground:E,showCategory:P});return C?h.jsx(T,{className:"resource-dialog",title:f("blocklet.publish.addResource"),maxWidth:!1,fullWidth:!1,PaperProps:{style:g?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:(e,t)=>{t!=="backdropClick"&&k()},showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:d()}):d({inDialog:!1})}export{Me as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as i,j as s,a3 as h,aa as B,T as j,bO as k,a4 as x}from"./vendor-mui-core-xF5F4eT7.js";import{r as f,u as U}from"./vendor-react-D-afvo_7.js";import{a1 as D,e as I,au as $,aB as H,aU as M,am as N}from"./vendor-arcblock-DZrZ_x_3.js";import{I as R,T as w}from"./traffic-
|
|
1
|
+
import{E as i,j as s,a3 as h,aa as B,T as j,bO as k,a4 as x}from"./vendor-mui-core-xF5F4eT7.js";import{r as f,u as U}from"./vendor-react-D-afvo_7.js";import{a1 as D,e as I,au as $,aB as H,aU as M,am as N}from"./vendor-arcblock-DZrZ_x_3.js";import{I as R,T as w}from"./traffic-CctA2CCp.js";import{p as S}from"./index-Cld1HWxz.js";import{ax as P,aw as g,B as F,f as v,aE as z,o as O}from"./index-C85gVBzh.js";import{B as q}from"./bundle-avatar-3QSGrsNA.js";import{B as A}from"./dashboard-DEaIei4u.js";import"./vendor-utils-5TjOM6td.js";import"./vendor-hooks-BKxTDk_P.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./iframe-CU0LfRyS.js";import"./LaunchOutlined-DaJw5LME.js";import"./ChevronLeft-CmbkC1dP.js";import"./ChevronRight-DlIj8Fj2.js";import"./index-C-D-nCB1.js";import"./format-error-C0Ke3VXF.js";import"./vendor-mui-x-CSUdon8K.js";import"./useLocalStorage-DV4AIe5L.js";import"./confirm-dIU5y9cG.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-Du4BhDgB.js";import"./session-CM1ewS-k.js";import"./InfoOutlined-C_J3Y0fX.js";import"./useSetState-Crt4S51m.js";const G=r=>`${r}%`;function L({cpus:r,currentLoad:u,history:a,empty:m}){const{t:c,locale:o}=f.useContext(D);return s.jsx(R,{id:"cpu-sparkline",title:c("common.cpu"),current:`${Math.floor(u||0)}%`,data:a,description:`${c("system.cores")}: ${(r==null?void 0:r.length)||0}`,dateFn:l=>P(l,"HH:mm:ss",o),valueFn:G,empty:m})}L.propTypes={cpus:i.array,currentLoad:i.number,history:i.array,empty:i.node};L.defaultProps={cpus:[],currentLoad:0,history:[],empty:null};function T({instanceCount:r,title:u,total:a,used:m,history:c,empty:o}){const{t:l,locale:y}=I(),n=!!a,t=a-m,e=n?`(${Math.floor(m/a*100)}%)`:"",p=[];return r&&p.push({title:l("system.instances"),metric:r}),p.push({title:l("system.used"),metric:g(m)}),n&&p.push({title:l("system.free"),metric:g(t)},{title:l("system.total"),metric:g(a)}),s.jsx(R,{id:"mem-sparkline",title:u||l("common.memory"),current:`${g(Math.floor(m||0))} ${e}`,empty:o,data:c,description:p.map((d,b)=>s.jsxs(h,{sx:{marginLeft:b===0?0:2},children:[d.title,": ",d.metric]},d.title)),dateFn:d=>P(d,"HH:mm:ss",y),valueFn:g})}T.propTypes={title:i.string,instanceCount:i.number,total:i.number,used:i.number,history:i.array,empty:i.node};T.defaultProps={title:"",instanceCount:null,total:null,used:null,history:[],empty:null};function C({blocklet:r,cpuHistory:u,memoryHistory:a,...m}){const{t:c}=I(),o=r.appRuntimeInfo||{},l=f.useCallback(y=>r.status!=="running"?s.jsx(j,{children:c("blocklet.runtimeInfo.noRunning")}):y.length?null:s.jsx($,{children:c("common.empty")}),[r.status,c]);return s.jsx(V,{component:"div",...m,children:s.jsxs(k,{className:"page-metrics",container:!0,spacing:5,children:[s.jsx(k,{item:!0,lg:4,md:6,sm:6,xs:12,children:s.jsx(L,{empty:l(u),currentLoad:o.cpuUsage||0,history:u,style:{height:150}})},"cpu"),s.jsx(k,{item:!0,lg:4,md:6,sm:6,xs:12,children:s.jsx(T,{empty:l(a),used:o.memoryUsage||0,history:a,style:{height:150}})},"memory")]})})}C.propTypes={blocklet:i.object.isRequired,cpuHistory:i.arrayOf(i.shape({date:i.number,value:i.number})),memoryHistory:i.arrayOf(i.shape({date:i.number,value:i.number}))};C.defaultProps={cpuHistory:[],memoryHistory:[]};const V=B(j)``;function E(){const{t:r,locale:u}=I(),{blocklet:a,runtimeHistory:m,actions:{refreshBlocklet:c}}=F(),o=f.useMemo(()=>{const n=[];return v.forEachBlockletSync(a,(t,{ancestors:e,id:p,level:d})=>{var b;(b=t==null?void 0:t.meta)!=null&&b.did&&t.meta.did!==a.meta.did&&n.push({type:"blocklet",groupId:a.meta.did,groupName:v.getDisplayName(a),id:p,name:v.getDisplayName(t,!0),blocklet:a,component:t,level:d-1>=0?d-1:0,runtimeInfo:t.runtimeInfo,ancestors:e})}),n},[a]);f.useEffect(()=>{const n=setInterval(()=>{c()},1e4);return()=>{clearInterval(n)}},[]);const l=n=>S(Number(n||0),{locale:z(u)}),y=[{label:r("common.name"),name:"name",options:{customBodyRenderLite(n){const{name:t,component:e,level:p,ancestors:d}=o[n];return s.jsxs(h,{display:"flex",alignItems:"center",pl:p*2,children:[s.jsx(q,{size:20,blocklet:e,ancestors:d}),s.jsx(h,{ml:1,children:t}),s.jsx(A,{variant:"pin",style:{marginLeft:8},status:e.status,source:e.source,progress:e.progress})]})}}},{label:r("common.uptime"),name:"runtimeInfo.uptime",options:{customBodyRenderLite(n){const{runtimeInfo:t,component:e}=o[n];return!(e!=null&&e.status)||e.status!=="running"?s.jsx(x,{title:r("common.noData"),children:"--"}):l(t==null?void 0:t.uptime)}}},{label:r("blocklet.runtimeInfo.memoryUsage"),name:"runtimeInfo.memoryUsage",options:{customBodyRenderLite(n){const{runtimeInfo:t,component:e}=o[n];return!(e!=null&&e.status)||e.status!=="running"?s.jsx(x,{title:r("common.noData"),children:"--"}):g((t==null?void 0:t.memoryUsage)||0)}}},{label:r("blocklet.runtimeInfo.cpuUsage"),name:"runtimeInfo.cpuUsage",options:{customBodyRenderLite(n){const{runtimeInfo:t,component:e}=o[n];return!(e!=null&&e.status)||e.status!=="running"?s.jsx(x,{title:r("common.noData"),children:"--"}):`${((t==null?void 0:t.cpuUsage)||0).toFixed(1)}%`}}},{label:r("analytics.runtime"),name:"runtimeInfo.runtime",options:{customBodyRenderLite(n){const{runtimeInfo:t}=o[n];return t!=null&&t.uptime?s.jsxs(h,{display:"flex",alignItems:"center",children:[s.jsx(H,{icon:t!=null&&t.runningDocker?"catppuccin:docker-ignore":"logos:nodejs-icon"}),s.jsx(h,{ml:1,children:t!=null&&t.runningDocker?"Docker":"Nodejs"})]}):null}}},{label:r("blocklet.runtimeInfo.processId"),name:"runtimeInfo.pid",options:{customBodyRenderLite(n){const{runtimeInfo:t,component:e}=o[n];return!(e!=null&&e.status)||e.status!=="running"?s.jsx(x,{title:r("common.noData"),children:"--"}):t==null?void 0:t.pid}}},{label:r("blocklet.runtimeInfo.port"),name:"runtimeInfo.port",options:{customBodyRenderLite(n){const{runtimeInfo:t,component:e}=o[n];return!(e!=null&&e.status)||e.status!=="running"?s.jsx(x,{title:r("common.noData"),children:"--"}):t==null?void 0:t.port}}}];return s.jsxs(W,{component:"div",children:[s.jsx(j,{component:"h3",variant:"h5",color:"textPrimary",style:{fontSize:18,fontWeight:"bold"},mb:2,children:r("analytics.trend")}),s.jsx(h,{children:s.jsx(C,{blocklet:a,cpuHistory:m.cpu,memoryHistory:m.memory})}),s.jsx(h,{mt:3,children:s.jsx(M,{title:r("analytics.detail"),className:"monitor-table",locale:u,data:o,columns:y,options:{search:!1,download:!1,filter:!1,print:!1,viewColumns:!1,pagination:!1,rowsPerPage:100}})})]})}E.propTypes={};const W=B(j)``;function jt(){const{t:r}=f.useContext(D),{did:u,client:a}=O(),[m,c]=U(),[o,l]=f.useState(m.get("tab")||"traffic"),y=p=>{l(p)};f.useEffect(()=>{m.set("tab",o),c(m,{replace:!0})},[o]);const n=[{label:r("common.traffic"),value:"traffic"},{label:r("common.runtime"),value:"runtime"}],t={traffic:w,runtime:E},e=t[o]||t.traffic;return s.jsxs(J,{children:[s.jsx(N,{tabs:n,current:o,onChange:y}),s.jsx("div",{className:"page-content",children:f.isValidElement(e)?e:s.jsx(e,{client:a,did:u})})]},o)}const J=B.main`
|
|
2
2
|
.page-header {
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: space-between;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as D,$ as U,by as W,a_ as N,e as E,bz as H,au as Z,b as F}from"./vendor-arcblock-DZrZ_x_3.js";import{p as G}from"./util-NSOsPZWM.js";import{r as l,L as q}from"./vendor-react-D-afvo_7.js";import{_ as K}from"./useLocalStorage-DV4AIe5L.js";import{y as I}from"./index-
|
|
1
|
+
import{j as D,$ as U,by as W,a_ as N,e as E,bz as H,au as Z,b as F}from"./vendor-arcblock-DZrZ_x_3.js";import{p as G}from"./util-NSOsPZWM.js";import{r as l,L as q}from"./vendor-react-D-afvo_7.js";import{_ as K}from"./useLocalStorage-DV4AIe5L.js";import{y as I}from"./index-C85gVBzh.js";import{j as e,a1 as J,a3 as d,aM as Q,T as j,a4 as X,I as k,a2 as Y,bH as ee,bI as te,aP as re,al as ae,bG as oe}from"./vendor-mui-core-xF5F4eT7.js";import{M as $}from"./index-ChSPqVLh.js";import{d as se}from"./InfoOutlined-C_J3Y0fX.js";import{R as ne}from"./relative-time-ChYpdg43.js";import{S as A}from"./shorten-label-J69eHfMN.js";import{d as ie}from"./vendor-utils-5TjOM6td.js";import{r as M}from"./index-DtwN19zv.js";import{u as le}from"./dashboard-DEaIei4u.js";import"./vendor-hooks-BKxTDk_P.js";import"./index-Cld1HWxz.js";import"./confirm-dIU5y9cG.js";import"./format-error-C0Ke3VXF.js";import"./PlayArrow-DZfknrYj.js";import"./get-safe-url-Du4BhDgB.js";import"./session-CM1ewS-k.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./useSetState-Crt4S51m.js";const V=l.createContext({}),{Provider:ce,Consumer:Ne}=V;function de(){return localStorage.getItem("audit-log-page-size")&&Number(localStorage.getItem("audit-log-page-size"))||10}function pe({children:t,scope:a="",categories:n=[],showScope:c,scopeFormatter:g}){const{api:u,info:v}=I(),[m,x]=l.useState([]),[o,L]=l.useState({total:0,pageSize:de(),pageCount:0,page:1}),[h,f]=l.useState(!1),[r,i]=l.useState(""),[p,y]=K(`audit-log-category-${a}`,"all"),s=[{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(z=>n.length?z.value==="all"||n.includes(z.value):!0),C=async({page:z=1,pageSize:B=20,silent:R=!0}={})=>{if(!h){R||f(!0);try{const S=await u.getAuditLogs({input:{paging:{page:z,pageSize:B},category:p==="all"?"":p,scope:a,actionOrContent:r}});c&&(S.list||[]).forEach(_=>{_.scope!==v.did&&(_.link=`/blocklets/${_.scope}/components`)}),x(S.list),L(S.paging),f(!1)}catch(S){D.error(S.message),f(!1)}}};l.useEffect(()=>{localStorage.setItem("audit-log-page-size",o.pageSize)},[o.pageSize]),l.useEffect(()=>{C({page:1,pageSize:o.pageSize,silent:!1})},[]),l.useEffect(()=>{C({page:1,pageSize:o.pageSize,silent:!1})},[p,r]);const w={loading:h,fetch:C,filter:{category:p,scope:a},categories:s,setCategory:y,data:m,paging:o,setPaging:L,showScope:c,scopeFormatter:g,actionOrContent:r,setActionOrContent:i};return e.jsx(ce,{value:{auditLogs:w},children:t})}function O(){const{auditLogs:t}=l.useContext(V);return t}var P={},ue=J;Object.defineProperty(P,"__esModule",{value:!0});var T=P.default=void 0,fe=ue(U()),ge=e;T=P.default=(0,fe.default)((0,ge.jsx)("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15z"}),"UnfoldMore");const me=`
|
|
2
2
|
<svg style="width:38px;height:38px;" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.152 10.6417L31.72 0L13.288 10.6417V24.7942L1 31.8887V53.1722L19.432 63.8139L31.6902 56.7366L31.72 56.7538L31.7498 56.7366L44.008 63.8139L62.44 53.1722V31.8887L50.152 24.7942V10.6417ZM60.52 32.9972L48.232 25.9027V11.7502L31.72 2.21703L15.208 11.7502V25.9028L2.92 32.9972V52.0636L19.432 61.5968L31.6902 54.5196L31.72 54.5368L31.7498 54.5196L44.008 61.5968L60.52 52.0636V32.9972Z" fill="url(#paint0_linear_606_96)"/>
|
|
4
4
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.1521 24.8307L31.7201 14.189L13.2881 24.8307V46.1141L31.7201 56.7558L50.1521 46.1141V24.8307ZM15.2081 25.9392L31.7201 16.406L48.2321 25.9392V45.0056L31.7201 54.5388L15.2081 45.0056V25.9392ZM28.5464 23.0464C28.6641 22.6342 29.0408 22.3501 29.4695 22.3501H33.9707C34.3993 22.3501 34.776 22.6342 34.8938 23.0464L35.7504 26.0447L37.8696 27.2681L40.8945 26.5109C41.3103 26.4068 41.7447 26.591 41.959 26.9622L44.2096 30.8604C44.424 31.2316 44.3662 31.6998 44.0682 32.0079L41.8999 34.2489V36.6959L44.0682 38.9369C44.3662 39.245 44.424 39.7133 44.2096 40.0845L41.959 43.9827C41.7447 44.3539 41.3103 44.538 40.8945 44.4339L37.8696 43.6767L35.7504 44.9002L34.8938 47.8984C34.776 48.3106 34.3993 48.5947 33.9707 48.5947H29.4695C29.0408 48.5947 28.6641 48.3106 28.5464 47.8984L27.6897 44.9002L25.5706 43.6767L22.5457 44.4339C22.1299 44.538 21.6955 44.3539 21.4812 43.9827L19.2305 40.0845C19.0162 39.7133 19.0739 39.245 19.372 38.9369L21.5402 36.6959V34.2489L19.372 32.0079C19.0739 31.6998 19.0162 31.2316 19.2305 30.8604L21.4812 26.9622C21.6955 26.591 22.1299 26.4068 22.5457 26.5109L25.5706 27.2681L27.6897 26.0447L28.5464 23.0464ZM28.9861 27.5132C29.2018 27.3887 29.3607 27.1851 29.4292 26.9456L30.1936 24.2701H33.2466L34.011 26.9456C34.0794 27.1851 34.2383 27.3887 34.4541 27.5132L37.2459 29.1251C37.4617 29.2497 37.7174 29.2855 37.9591 29.225L40.6583 28.5493L42.1848 31.1932L40.25 33.193C40.0768 33.372 39.9799 33.6114 39.9799 33.8605V37.0843C39.9799 37.3334 40.0768 37.5728 40.25 37.7518L42.1848 39.7516L40.6583 42.3955L37.9591 41.7198C37.7174 41.6593 37.4617 41.6951 37.2459 41.8197L34.4541 43.4316C34.2383 43.5561 34.0794 43.7597 34.011 43.9992L33.2466 46.6747H30.1936L29.4292 43.9992C29.3607 43.7597 29.2018 43.5561 28.9861 43.4316L26.1942 41.8197C25.9785 41.6951 25.7228 41.6593 25.4811 41.7198L22.7819 42.3955L21.2554 39.7516L23.1902 37.7518C23.3634 37.5728 23.4602 37.3334 23.4602 37.0843V33.8605C23.4602 33.6114 23.3634 33.372 23.1902 33.193L21.2554 31.1932L22.7819 28.5493L25.4811 29.225C25.7228 29.2855 25.9785 29.2497 26.1942 29.1251L28.9861 27.5132ZM31.7201 41.6407C28.3134 41.6407 25.5517 38.8791 25.5517 35.4724C25.5517 32.0657 28.3134 29.3041 31.7201 29.3041C35.1268 29.3041 37.8884 32.0657 37.8884 35.4724C37.8884 38.8791 35.1268 41.6407 31.7201 41.6407ZM35.9684 35.4724C35.9684 37.8187 34.0664 39.7207 31.7201 39.7207C29.3738 39.7207 27.4717 37.8187 27.4717 35.4724C27.4717 33.1261 29.3738 31.2241 31.7201 31.2241C34.0664 31.2241 35.9684 33.1261 35.9684 35.4724Z" fill="url(#paint1_linear_606_96)"/>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{_ as Se}from"./index-LIf2LIyz.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,bK as Ee,K as oe,y as _e,x as $,aa as Oe}from"./vendor-mui-core-xF5F4eT7.js";import{$ as De,e as Le,ao as Ve,b as L}from"./vendor-arcblock-DZrZ_x_3.js";import{E as M,D as ie,C as se,P as ne}from"./react-beautiful-dnd.esm-DwxjmShi.js";import{d as ae}from"./DeleteOutline-BzV7E1BM.js";import{n as Te,e as $e}from"./vendor-hooks-BKxTDk_P.js";import{r as h}from"./vendor-react-D-afvo_7.js";import{S as K}from"./studio-DtUwD8m6.js";import"./vendor-utils-5TjOM6td.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=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=qe;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 Ne(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 qe(r){const t=r.trim();return V(t).length>0}var X={},He=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=He(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-DF1jJ-bb.js").then(r=>r.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).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(""),[N,q]=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})})},H=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 H(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=${N}`,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,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),q(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","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(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),N=!!((R=navigator.clipboard)!=null&&R.readText),{run:q}=$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?q(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,{})})}):N&&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(H=>{H.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-_suzTPHn.js","assets/vendor-arcblock-DZrZ_x_3.js","assets/vendor-react-D-afvo_7.js","assets/vendor-utils-5TjOM6td.js","assets/vendor-mui-core-xF5F4eT7.js","assets/vendor-hooks-BKxTDk_P.js","assets/vendor-arcblock-DhgPdlEj.css","assets/index-C2fPoxDR.js","assets/index-C85gVBzh.js","assets/index-DoZ2YM4T.js","assets/index-AgKpYdvC.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Se}from"./index-C85gVBzh.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,bK as Ee,K as oe,y as _e,x as $,aa as Oe}from"./vendor-mui-core-xF5F4eT7.js";import{$ as De,e as Le,ao as Ve,b as L}from"./vendor-arcblock-DZrZ_x_3.js";import{E as M,D as ie,C as se,P as ne}from"./react-beautiful-dnd.esm-DwxjmShi.js";import{d as ae}from"./DeleteOutline-BzV7E1BM.js";import{n as Te,e as $e}from"./vendor-hooks-BKxTDk_P.js";import{r as h}from"./vendor-react-D-afvo_7.js";import{S as K}from"./studio-DtUwD8m6.js";import"./vendor-utils-5TjOM6td.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=Ne;C.getYoutubeId=pe;C.getVimeoId=he;C.isVideoUrl=qe;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 Ne(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 qe(r){const t=r.trim();return V(t).length>0}var X={},He=Ie;Object.defineProperty(X,"__esModule",{value:!0});var me=X.default=void 0,Be=He(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-_suzTPHn.js").then(r=>r.i),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).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(""),[N,q]=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})})},H=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 H(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=${N}`,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,locale:t,popup:!0,onUploadFinish:()=>{var o;(o=R.current)==null||o.close(),q(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","image/svg+xml"],maxFileSize:1024*1024*.5,maxNumberOfFiles:1}},dashboardProps:{autoOpen:"imageEditor"},imageEditorProps:{actions:{revert:!0,rotate:!0,granularRotate:!0,flip:!0,zoomIn:!0,zoomOut:!0,cropSquare:!1,cropWidescreen:!1,cropWidescreenVertical:!1},cropperOptions:{autoCrop:!0,aspectRatio:1,initialAspectRatio:1,autoCropArea:1,croppedCanvasOptions:{minWidth:256,minHeight:256}}}},"uploader-logo"),e.jsx(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),N=!!((R=navigator.clipboard)!=null&&R.readText),{run:q}=$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?q(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,{})})}):N&&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(H=>{H.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 v,E as a}from"./vendor-mui-core-xF5F4eT7.js";import{b as E,B as P}from"./vendor-arcblock-DZrZ_x_3.js";import{x as g}from"./vendor-utils-5TjOM6td.js";import{y,z as $,V as j,W as h,X as R}from"./index-
|
|
1
|
+
import{j as f,aM as v,E as a}from"./vendor-mui-core-xF5F4eT7.js";import{b as E,B as P}from"./vendor-arcblock-DZrZ_x_3.js";import{x as g}from"./vendor-utils-5TjOM6td.js";import{y,z as $,V as j,W as h,X as R}from"./index-C85gVBzh.js";function A({blocklet:r,ancestors:p=[]}){var i;const s=y(),{inService:n}=s,e=$(r==null?void 0:r.status)||j(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,E.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 x({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(P,{did:r.meta.did||"",responsive:!0})),f.jsx(v,{variant:u||"square",style:Object.assign({backgroundColor:"transparent",width:s,height:s,borderRadius:10},p),...e,children:m})}x.propTypes={blocklet:a.object.isRequired,style:a.object,size:a.oneOfType([a.number,a.string]),ancestors:a.array};x.defaultProps={style:{},size:40,ancestors:[]};export{x as B};
|
|
@@ -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-xF5F4eT7.js";import{e as B,Y as _,j as v,b as $}from"./vendor-arcblock-DZrZ_x_3.js";import{C as A}from"./vendor-hooks-BKxTDk_P.js";import{r as a}from"./vendor-react-D-afvo_7.js";import{x as F}from"./vendor-utils-5TjOM6td.js";import{o as I,p as M,d as N,e as W,ag as z,ao as O,P as V}from"./index-
|
|
1
|
+
import{aa as d,j as e,a2 as P,a3 as h,E as T}from"./vendor-mui-core-xF5F4eT7.js";import{e as B,Y as _,j as v,b as $}from"./vendor-arcblock-DZrZ_x_3.js";import{C as A}from"./vendor-hooks-BKxTDk_P.js";import{r as a}from"./vendor-react-D-afvo_7.js";import{x as F}from"./vendor-utils-5TjOM6td.js";import{o as I,p as M,d as N,e as W,ag as z,ao as O,P as V}from"./index-C85gVBzh.js";import{L as X}from"./launch-result-message-keU5grqY.js";import{g as H}from"./get-safe-url-DDeO6YpV.js";import{S as E}from"./button-BZmMffY2.js";import{S as K}from"./layout-DNDd_arD.js";import"./content-layout-cWwRTmIc.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{cD as Tw,cr as Te,cq as Ze,co as kw,a1 as Se,j as w,a3 as Re,a4 as Fn,E as ie,cE as Qb,cF as Zb,cG as Dw,bs as Jb,aa as Lt,cH as Js,bS as Gt,H as el,cI as di,bo as Xn,c3 as ut,aw as Ot,cJ as Rw,cK as Ew,c as Pe,_ as L,cL as gr,cM as Ke,cN as Mw,cO as bs,b as zn,cP as Ka,cQ as $w,c4 as Ow,cR as Iw,bT as _w,cl as Aw,cS as Bw,c5 as jw,g as ze,a as Le,k as Fe,cT as ev,u as Ht,cU as Lw,d as tn,cV as tl,cW as Mp,o as rn,cX as tv,i as jr,cY as Nw,cZ as fi,c_ as Fw,c$ as $p,f as hd,d0 as nv,d1 as zw,d2 as Ww,p as nl,J as Vw,d3 as Uw,bj 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,bp as rl,d4 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,bL as Lp,bO as Bi,y as Qw,aO as Zw}from"./vendor-mui-core-xF5F4eT7.js";import{$ as Jw,az as eS,x as ov}from"./vendor-utils-5TjOM6td.js";import{r as S,R as tS,d as pi,a as $e,g as gd,b as tt,e as av,c as nS,k as iv}from"./vendor-react-D-afvo_7.js";import{bD as Ce,$ as wr,e as Xt,j as ot,bP as rS,bQ as oS,aw as Np,ax as aS,ay as iS,az as sS,aJ as lS,a9 as mi,ao as Fp,aH as cS,bR as uS,bS as dS,a1 as Sr,am as fS,a6 as bd,b as je,Y as pS,ab as mS,aB as Yn,a2 as ji,au as hS}from"./vendor-arcblock-DZrZ_x_3.js";import{d as sv}from"./Add-DSPtuudj.js";import{F as gS,d as vd}from"./form-text-input-
|
|
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{cD as Tw,cr as Te,cq as Ze,co as kw,a1 as Se,j as w,a3 as Re,a4 as Fn,E as ie,cE as Qb,cF as Zb,cG as Dw,bs as Jb,aa as Lt,cH as Js,bS as Gt,H as el,cI as di,bo as Xn,c3 as ut,aw as Ot,cJ as Rw,cK as Ew,c as Pe,_ as L,cL as gr,cM as Ke,cN as Mw,cO as bs,b as zn,cP as Ka,cQ as $w,c4 as Ow,cR as Iw,bT as _w,cl as Aw,cS as Bw,c5 as jw,g as ze,a as Le,k as Fe,cT as ev,u as Ht,cU as Lw,d as tn,cV as tl,cW as Mp,o as rn,cX as tv,i as jr,cY as Nw,cZ as fi,c_ as Fw,c$ as $p,f as hd,d0 as nv,d1 as zw,d2 as Ww,p as nl,J as Vw,d3 as Uw,bj 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,bp as rl,d4 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,bL as Lp,bO as Bi,y as Qw,aO as Zw}from"./vendor-mui-core-xF5F4eT7.js";import{$ as Jw,az as eS,x as ov}from"./vendor-utils-5TjOM6td.js";import{r as S,R as tS,d as pi,a as $e,g as gd,b as tt,e as av,c as nS,k as iv}from"./vendor-react-D-afvo_7.js";import{bD as Ce,$ as wr,e as Xt,j as ot,bP as rS,bQ as oS,aw as Np,ax as aS,ay as iS,az as sS,aJ as lS,a9 as mi,ao as Fp,aH as cS,bR as uS,bS as dS,a1 as Sr,am as fS,a6 as bd,b as je,Y as pS,ab as mS,aB as Yn,a2 as ji,au as hS}from"./vendor-arcblock-DZrZ_x_3.js";import{d as sv}from"./Add-DSPtuudj.js";import{F as gS,d as vd}from"./form-text-input-DixVGGLY.js";import{y as Kt,B as Wr,O as Ya,h as Gn,f as mt,M as bo,aB as bS,a7 as Nr,a6 as yd,a5 as Pu,ao as lv,aC as cv,b as $a,m as oc,aD as vS}from"./index-C85gVBzh.js";import{c as yS,W as vo,e as CS,f as Cd,B as uv,b as xS}from"./dashboard-DEaIei4u.js";import{S as wS}from"./switch-control-D2qynQm8.js";import{P as Tu,w as Do}from"./permission-C0p6f4_S.js";import{r as SS}from"./index-DcfIKM1A.js";import{d as zp,c as PS,b as nt,_ as Je,o as TS,e as kS,i as DS,p as RS,g as ES,r as Pr}from"./slicedToArray-CXBLQZX4.js";import{r as Ye,A as xd,B as Yt,C as ys,D as ku,t as qe,E as dv,F as fv,j as Du,m as MS,G as ar,H as $S,I as OS,J as Ru,K as pv,L as IS,M as _S,N as mv,O as wd,P as Wp,Q as AS,R as Vp,S as BS,T as jS,p as LS,e as Up,g as NS,b as ac,a as qp,c as FS,q as Li,o as Yr,i as zS,d as WS,k as Ni,l as ic,h as Fi,s as sc,f as lc,x as VS,z as US,n as qS,u as HS,v as GS,w as KS,U as YS,y as XS,V as QS,W as ZS}from"./index-C-D-nCB1.js";import{a as Qe,u as Me,r as Xa,d as Vr,b as JS,w as Cs,g as hv,e as gv,c as e1,o as Eu}from"./raf-schd.esm-Cxhj8umC.js";import{C as Hp}from"./click-to-copy-Bu9H6mvL.js";import{d as Gp}from"./ChevronRight-DlIj8Fj2.js";import{d as t1}from"./ChevronLeft-CmbkC1dP.js";import{d as n1}from"./ArrowDropDown-DM9y1OaN.js";import{f as fn}from"./format-error-C0Ke3VXF.js";import{A as r1,a as o1,b as a1,d as bv,B as i1,f as s1,c as l1}from"./add-component-core-DlH-ksP3.js";import{C as Ro}from"./confirm-dIU5y9cG.js";import{v as c1,a as xs}from"./util-XV_5OnOm.js";import{d as u1}from"./LockIcon-D-W4Rph6.js";import{d as vv}from"./Launch-BX35m3eH.js";import{C as d1}from"./item-IntWv1pk.js";import{d as f1}from"./InfoOutlined-C_J3Y0fX.js";import{B as p1}from"./bundle-avatar-3QSGrsNA.js";import{d as m1}from"./PlayArrow-DZfknrYj.js";import{A as yv}from"./actions-CPjP-DJ-.js";import{I as cc}from"./index-DGzAI_hi.js";import{W as h1}from"./did-address-D0Fo5eTl.js";import"./vendor-hooks-BKxTDk_P.js";import"./Done-DJfjmlFC.js";import"./logo-uploader-lx0oUxRg.js";import"./index-DoZ2YM4T.js";import"./EditIcon-BOr0kf6I.js";import"./useLocalStorage-DV4AIe5L.js";import"./get-safe-url-Du4BhDgB.js";import"./index-Cld1HWxz.js";import"./session-CM1ewS-k.js";import"./useAsyncRetry-Bmo6a1Zp.js";import"./useAsync-Ua5iss51.js";import"./useSetState-Crt4S51m.js";import"./launch-result-message-keU5grqY.js";import"./page-header-xWImGBdx.js";import"./config-space-DQcEAb4q.js";import"./api-K65cLqol.js";import"./index-Bwql_DnM.js";import"./Google-DTKsjoGP.js";import"./cloneDeep-BRiLvZjr.js";import"./index-ChSPqVLh.js";import"./index-C2fPoxDR.js";import"./use-mobile-DnWfrhc7.js";import"./content-layout-cWwRTmIc.js";import"./connect-to-BzwS4rD2.js";import"./DeleteOutline-BzV7E1BM.js";import"./shorten-label-J69eHfMN.js";import"./MoreHoriz-JX8PbVXG.js";var g1=36e5;function b1(e,t){Ye(2,arguments);var n=Yt(t);return xd(e,n*g1)}var v1=864e5;function y1(e,t){Ye(2,arguments);var n=ys(e),r=ys(t),o=n.getTime()-ku(n),a=r.getTime()-ku(r);return Math.round((o-a)/v1)}var C1=6e4;function x1(e,t){Ye(2,arguments);var n=Yt(t);return xd(e,n*C1)}function w1(e,t){Ye(2,arguments);var n=Yt(t);return xd(e,n*1e3)}function La(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function S1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()-r.getFullYear()}function Kp(e,t){var n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function Cv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=Kp(n,r),a=Math.abs(y1(n,r));n.setDate(n.getDate()-o*a);var i=+(Kp(n,r)===-o),s=o*(a-i);return s===0?0:s}function ol(e,t){return Ye(2,arguments),qe(e).getTime()-qe(t).getTime()}var Yp={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},P1="trunc";function hi(e){return e?Yp[e]:Yp[P1]}function T1(e,t,n){Ye(2,arguments);var r=ol(e,t)/dv;return hi(void 0)(r)}function k1(e,t,n){Ye(2,arguments);var r=ol(e,t)/fv;return hi(void 0)(r)}function Mu(e){Ye(1,arguments);var t=qe(e);return t.setHours(23,59,59,999),t}function D1(e){Ye(1,arguments);var t=qe(e);return Mu(t).getTime()===Du(t).getTime()}function xv(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=La(n,r),a=Math.abs(MS(n,r)),i;if(a<1)i=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-o*a);var s=La(n,r)===-o;D1(qe(e))&&a===1&&La(e,r)===1&&(s=!1),i=o*(a-Number(s))}return i===0?0:i}function R1(e,t,n){Ye(2,arguments);var r=xv(e,t)/3;return hi(void 0)(r)}function E1(e,t,n){Ye(2,arguments);var r=ol(e,t)/1e3;return hi(void 0)(r)}function M1(e,t,n){Ye(2,arguments);var r=Cv(e,t)/7;return hi(void 0)(r)}function $1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t),o=La(n,r),a=Math.abs(S1(n,r));n.setFullYear(1584),r.setFullYear(1584);var i=La(n,r)===-o,s=o*(a-Number(i));return s===0?0:s}function O1(e,t){var n;Ye(1,arguments);var r=e||{},o=qe(r.start),a=qe(r.end),i=a.getTime();if(!(o.getTime()<=i))throw new RangeError("Invalid interval");var s=[],c=o;c.setHours(0,0,0,0);var l=Number((n=void 0)!==null&&n!==void 0?n:1);if(l<1||isNaN(l))throw new RangeError("`options.step` must be a number greater than 1");for(;c.getTime()<=i;)s.push(qe(c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return s}function I1(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function _1(e,t){var n,r;Ye(1,arguments);var o=qe(e);if(isNaN(o.getTime()))throw new RangeError("Invalid time value");var a=String((n=t==null?void 0:t.format)!==null&&n!==void 0?n:"extended"),i=String((r=t==null?void 0:t.representation)!==null&&r!==void 0?r:"complete");if(a!=="extended"&&a!=="basic")throw new RangeError("format must be 'extended' or 'basic'");if(i!=="date"&&i!=="time"&&i!=="complete")throw new RangeError("representation must be 'date', 'time', or 'complete'");var s="",c="",l=a==="extended"?"-":"",d=a==="extended"?":":"";if(i!=="time"){var u=ar(o.getDate(),2),f=ar(o.getMonth()+1,2),m=ar(o.getFullYear(),4);s="".concat(m).concat(l).concat(f).concat(l).concat(u)}if(i!=="date"){var b=o.getTimezoneOffset();if(b!==0){var h=Math.abs(b),x=ar(Math.floor(h/60),2),v=ar(h%60,2),g=b<0?"+":"-";c="".concat(g).concat(x,":").concat(v)}else c="Z";var p=ar(o.getHours(),2),y=ar(o.getMinutes(),2),D=ar(o.getSeconds(),2),P=s===""?"":"T",T=[p,y,D].join(d);s="".concat(s).concat(P).concat(T).concat(c)}return s}function A1(e){Ye(1,arguments);var t=qe(e),n=t.getDay();return n}function B1(e){Ye(1,arguments);var t=qe(e),n=t.getHours();return n}function j1(e){Ye(1,arguments);var t=qe(e),n=t.getMinutes();return n}function L1(e){Ye(1,arguments);var t=qe(e),n=t.getSeconds();return n}function N1(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getTime()===r.getTime()}function Xp(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Tw(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){s=!0,a=l},f:function(){try{i||n.return==null||n.return()}finally{if(s)throw a}}}}function wv(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wv=function(){return!!e})()}function rt(e){var t=wv();return function(){var n,r=zp(e);if(t){var o=zp(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return PS(this,n)}}var F1=10,Sv=function(){function e(){Je(this,e),Ce(this,"priority",void 0),Ce(this,"subPriority",0)}return Ze(e,[{key:"validate",value:function(n,r){return!0}}]),e}(),z1=function(e){nt(n,e);var t=rt(n);function n(r,o,a,i,s){var c;return Je(this,n),c=t.call(this),c.value=r,c.validateValue=o,c.setValue=a,c.priority=i,s&&(c.subPriority=s),c}return Ze(n,[{key:"validate",value:function(o,a){return this.validateValue(o,this.value,a)}},{key:"set",value:function(o,a,i){return this.setValue(o,a,this.value,i)}}]),n}(Sv),W1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",F1),Ce(Te(r),"subPriority",-1),r}return Ze(n,[{key:"set",value:function(o,a){if(a.timestampIsSet)return o;var i=new Date(0);return i.setFullYear(o.getUTCFullYear(),o.getUTCMonth(),o.getUTCDate()),i.setHours(o.getUTCHours(),o.getUTCMinutes(),o.getUTCSeconds(),o.getUTCMilliseconds()),i}}]),n}(Sv),at=function(){function e(){Je(this,e),Ce(this,"incompatibleTokens",void 0),Ce(this,"priority",void 0),Ce(this,"subPriority",void 0)}return Ze(e,[{key:"run",value:function(n,r,o,a){var i=this.parse(n,r,o,a);return i?{setter:new z1(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}},{key:"validate",value:function(n,r,o){return!0}}]),e}(),V1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",140),Ce(Te(r),"incompatibleTokens",["R","u","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"});case"GGGGG":return i.era(o,{width:"narrow"});case"GGGG":default:return i.era(o,{width:"wide"})||i.era(o,{width:"abbreviated"})||i.era(o,{width:"narrow"})}}},{key:"set",value:function(o,a,i){return a.era=i,o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),kt={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},jn={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Dt(e,t){return e&&{value:t(e.value),rest:e.rest}}function bt(e,t){var n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function Ln(e,t){var n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};var r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,a=n[3]?parseInt(n[3],10):0,i=n[5]?parseInt(n[5],10):0;return{value:r*(o*dv+a*fv+i*$S),rest:t.slice(n[0].length)}}function Pv(e){return bt(kt.anyDigitsSigned,e)}function Tt(e,t){switch(e){case 1:return bt(kt.singleDigit,t);case 2:return bt(kt.twoDigits,t);case 3:return bt(kt.threeDigits,t);case 4:return bt(kt.fourDigits,t);default:return bt(new RegExp("^\\d{1,"+e+"}"),t)}}function ws(e,t){switch(e){case 1:return bt(kt.singleDigitSigned,t);case 2:return bt(kt.twoDigitsSigned,t);case 3:return bt(kt.threeDigitsSigned,t);case 4:return bt(kt.fourDigitsSigned,t);default:return bt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function Sd(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Tv(e,t){var n=t>0,r=n?t:1-t,o;if(r<=50)o=e||100;else{var a=r+50,i=Math.floor(a/100)*100,s=e>=a%100;o=e+i-(s?100:0)}return n?o:1-o}function kv(e){return e%400===0||e%4===0&&e%100!==0}var U1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="yy"}};switch(a){case"y":return Dt(Tt(4,o),s);case"yo":return Dt(i.ordinalNumber(o,{unit:"year"}),s);default:return Dt(Tt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i){var s=o.getUTCFullYear();if(i.isTwoDigitYear){var c=Tv(i.year,s);return o.setUTCFullYear(c,0,1),o.setUTCHours(0,0,0,0),o}var l=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(l,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),q1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return{year:l,isTwoDigitYear:a==="YY"}};switch(a){case"Y":return Dt(Tt(4,o),s);case"Yo":return Dt(i.ordinalNumber(o,{unit:"year"}),s);default:return Dt(Tt(a.length,o),s)}}},{key:"validate",value:function(o,a){return a.isTwoDigitYear||a.year>0}},{key:"set",value:function(o,a,i,s){var c=OS(o,s);if(i.isTwoDigitYear){var l=Tv(i.year,c);return o.setUTCFullYear(l,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Ru(o,s)}var d=!("era"in a)||a.era===1?i.year:1-i.year;return o.setUTCFullYear(d,0,s.firstWeekContainsDate),o.setUTCHours(0,0,0,0),Ru(o,s)}}]),n}(at),H1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return ws(a==="R"?4:a.length,o)}},{key:"set",value:function(o,a,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),pv(s)}}]),n}(at),G1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",130),Ce(Te(r),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){return ws(a==="u"?4:a.length,o)}},{key:"set",value:function(o,a,i){return o.setUTCFullYear(i,0,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),K1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"Q":case"QQ":return Tt(a.length,o);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(o,{width:"wide",context:"formatting"})||i.quarter(o,{width:"abbreviated",context:"formatting"})||i.quarter(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),Y1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",120),Ce(Te(r),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"q":case"qq":return Tt(a.length,o);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(o,{width:"wide",context:"standalone"})||i.quarter(o,{width:"abbreviated",context:"standalone"})||i.quarter(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=1&&a<=4}},{key:"set",value:function(o,a,i){return o.setUTCMonth((i-1)*3,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),X1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Ce(Te(r),"priority",110),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"M":return Dt(bt(kt.month,o),s);case"MM":return Dt(Tt(2,o),s);case"Mo":return Dt(i.ordinalNumber(o,{unit:"month"}),s);case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(o,{width:"wide",context:"formatting"})||i.month(o,{width:"abbreviated",context:"formatting"})||i.month(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at),Q1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",110),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l-1};switch(a){case"L":return Dt(bt(kt.month,o),s);case"LL":return Dt(Tt(2,o),s);case"Lo":return Dt(i.ordinalNumber(o,{unit:"month"}),s);case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(o,{width:"wide",context:"standalone"})||i.month(o,{width:"abbreviated",context:"standalone"})||i.month(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){return o.setUTCMonth(i,1),o.setUTCHours(0,0,0,0),o}}]),n}(at);function Z1(e,t,n){Ye(2,arguments);var r=qe(e),o=Yt(t),a=IS(r,n)-o;return r.setUTCDate(r.getUTCDate()-a*7),r}var J1=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"w":return bt(kt.week,o);case"wo":return i.ordinalNumber(o,{unit:"week"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i,s){return Ru(Z1(o,i,s),s)}}]),n}(at);function eP(e,t){Ye(2,arguments);var n=qe(e),r=Yt(t),o=_S(n)-r;return n.setUTCDate(n.getUTCDate()-o*7),n}var tP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",100),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"I":return bt(kt.week,o);case"Io":return i.ordinalNumber(o,{unit:"week"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=53}},{key:"set",value:function(o,a,i){return pv(eP(o,i))}}]),n}(at),nP=[31,28,31,30,31,30,31,31,30,31,30,31],rP=[31,29,31,30,31,30,31,31,30,31,30,31],oP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subPriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"d":return bt(kt.date,o);case"do":return i.ordinalNumber(o,{unit:"date"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=kv(i),c=o.getUTCMonth();return s?a>=1&&a<=rP[c]:a>=1&&a<=nP[c]}},{key:"set",value:function(o,a,i){return o.setUTCDate(i),o.setUTCHours(0,0,0,0),o}}]),n}(at),aP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"subpriority",1),Ce(Te(r),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"D":case"DD":return bt(kt.dayOfYear,o);case"Do":return i.ordinalNumber(o,{unit:"date"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){var i=o.getUTCFullYear(),s=kv(i);return s?a>=1&&a<=366:a>=1&&a<=365}},{key:"set",value:function(o,a,i){return o.setUTCMonth(0,i),o.setUTCHours(0,0,0,0),o}}]),n}(at);function Pd(e,t,n){var r,o,a,i,s,c,l,d;Ye(2,arguments);var u=mv(),f=Yt((r=(o=(a=(i=n==null?void 0:n.weekStartsOn)!==null&&i!==void 0?i:n==null||(s=n.locale)===null||s===void 0||(c=s.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&o!==void 0?o:(l=u.locale)===null||l===void 0||(d=l.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=qe(e),b=Yt(t),h=m.getUTCDay(),x=b%7,v=(x+7)%7,g=(v<f?7:0)+b-h;return m.setUTCDate(m.getUTCDate()+g),m}var iP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["D","i","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Pd(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),sP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"e":case"ee":return Dt(Tt(a.length,o),c);case"eo":return Dt(i.ordinalNumber(o,{unit:"day"}),c);case"eee":return i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Pd(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at),lP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i,s){var c=function(d){var u=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+u};switch(a){case"c":case"cc":return Dt(Tt(a.length,o),c);case"co":return Dt(i.ordinalNumber(o,{unit:"day"}),c);case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(o,{width:"wide",context:"standalone"})||i.day(o,{width:"abbreviated",context:"standalone"})||i.day(o,{width:"short",context:"standalone"})||i.day(o,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(o,a){return a>=0&&a<=6}},{key:"set",value:function(o,a,i,s){return o=Pd(o,i,s),o.setUTCHours(0,0,0,0),o}}]),n}(at);function cP(e,t){Ye(2,arguments);var n=Yt(t);n%7===0&&(n=n-7);var r=1,o=qe(e),a=o.getUTCDay(),i=n%7,s=(i+7)%7,c=(s<r?7:0)+n-a;return o.setUTCDate(o.getUTCDate()+c),o}var uP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",90),Ce(Te(r),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){var s=function(l){return l===0?7:l};switch(a){case"i":case"ii":return Tt(a.length,o);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return Dt(i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiii":return Dt(i.day(o,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Dt(i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Dt(i.day(o,{width:"wide",context:"formatting"})||i.day(o,{width:"abbreviated",context:"formatting"})||i.day(o,{width:"short",context:"formatting"})||i.day(o,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(o,a){return a>=1&&a<=7}},{key:"set",value:function(o,a,i){return o=cP(o,i),o.setUTCHours(0,0,0,0),o}}]),n}(at),dP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["b","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"a":case"aa":case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Sd(i),0,0,0),o}}]),n}(at),fP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","B","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"b":case"bb":case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Sd(i),0,0,0),o}}]),n}(at),pP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",80),Ce(Te(r),"incompatibleTokens",["a","b","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(o,{width:"wide",context:"formatting"})||i.dayPeriod(o,{width:"abbreviated",context:"formatting"})||i.dayPeriod(o,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(o,a,i){return o.setUTCHours(Sd(i),0,0,0),o}}]),n}(at),mP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["H","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"h":return bt(kt.hour12h,o);case"ho":return i.ordinalNumber(o,{unit:"hour"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=12}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):!s&&i===12?o.setUTCHours(0,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),hP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","K","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"H":return bt(kt.hour23h,o);case"Ho":return i.ordinalNumber(o,{unit:"hour"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=23}},{key:"set",value:function(o,a,i){return o.setUTCHours(i,0,0,0),o}}]),n}(at),gP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["h","H","k","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"K":return bt(kt.hour11h,o);case"Ko":return i.ordinalNumber(o,{unit:"hour"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=11}},{key:"set",value:function(o,a,i){var s=o.getUTCHours()>=12;return s&&i<12?o.setUTCHours(i+12,0,0,0):o.setUTCHours(i,0,0,0),o}}]),n}(at),bP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",70),Ce(Te(r),"incompatibleTokens",["a","b","h","H","K","t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"k":return bt(kt.hour24h,o);case"ko":return i.ordinalNumber(o,{unit:"hour"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=1&&a<=24}},{key:"set",value:function(o,a,i){var s=i<=24?i%24:i;return o.setUTCHours(s,0,0,0),o}}]),n}(at),vP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",60),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"m":return bt(kt.minute,o);case"mo":return i.ordinalNumber(o,{unit:"minute"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCMinutes(i,0,0),o}}]),n}(at),yP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",50),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a,i){switch(a){case"s":return bt(kt.second,o);case"so":return i.ordinalNumber(o,{unit:"second"});default:return Tt(a.length,o)}}},{key:"validate",value:function(o,a){return a>=0&&a<=59}},{key:"set",value:function(o,a,i){return o.setUTCSeconds(i,0),o}}]),n}(at),CP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",30),Ce(Te(r),"incompatibleTokens",["t","T"]),r}return Ze(n,[{key:"parse",value:function(o,a){var i=function(c){return Math.floor(c*Math.pow(10,-a.length+3))};return Dt(Tt(a.length,o),i)}},{key:"set",value:function(o,a,i){return o.setUTCMilliseconds(i),o}}]),n}(at),xP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","x"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"X":return Ln(jn.basicOptionalMinutes,o);case"XX":return Ln(jn.basic,o);case"XXXX":return Ln(jn.basicOptionalSeconds,o);case"XXXXX":return Ln(jn.extendedOptionalSeconds,o);case"XXX":default:return Ln(jn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),wP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",10),Ce(Te(r),"incompatibleTokens",["t","T","X"]),r}return Ze(n,[{key:"parse",value:function(o,a){switch(a){case"x":return Ln(jn.basicOptionalMinutes,o);case"xx":return Ln(jn.basic,o);case"xxxx":return Ln(jn.basicOptionalSeconds,o);case"xxxxx":return Ln(jn.extendedOptionalSeconds,o);case"xxx":default:return Ln(jn.extended,o)}}},{key:"set",value:function(o,a,i){return a.timestampIsSet?o:new Date(o.getTime()-i)}}]),n}(at),SP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",40),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return Pv(o)}},{key:"set",value:function(o,a,i){return[new Date(i*1e3),{timestampIsSet:!0}]}}]),n}(at),PP=function(e){nt(n,e);var t=rt(n);function n(){var r;Je(this,n);for(var o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return r=t.call.apply(t,[this].concat(a)),Ce(Te(r),"priority",20),Ce(Te(r),"incompatibleTokens","*"),r}return Ze(n,[{key:"parse",value:function(o){return Pv(o)}},{key:"set",value:function(o,a,i){return[new Date(i),{timestampIsSet:!0}]}}]),n}(at),TP={G:new V1,y:new U1,Y:new q1,R:new H1,u:new G1,Q:new K1,q:new Y1,M:new X1,L:new Q1,w:new J1,I:new tP,d:new oP,D:new aP,E:new iP,e:new sP,c:new lP,i:new uP,a:new dP,b:new fP,B:new pP,h:new mP,H:new hP,K:new gP,k:new bP,m:new vP,s:new yP,S:new CP,X:new xP,x:new wP,t:new SP,T:new PP},kP=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,DP=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,RP=/^'([^]*?)'?$/,EP=/''/g,MP=/\S/,$P=/[a-zA-Z]/;function OP(e,t,n,r){var o,a,i,s,c,l,d,u,f,m,b,h,x,v,g,p,y,D;Ye(3,arguments);var P=String(e),T=String(t),k=mv(),C=(o=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:k.locale)!==null&&o!==void 0?o:wd;if(!C.match)throw new RangeError("locale must contain match property");var R=Yt((i=(s=(c=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(d=r.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&c!==void 0?c:k.firstWeekContainsDate)!==null&&s!==void 0?s:(f=k.locale)===null||f===void 0||(m=f.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var M=Yt((b=(h=(x=(v=r==null?void 0:r.weekStartsOn)!==null&&v!==void 0?v:r==null||(g=r.locale)===null||g===void 0||(p=g.options)===null||p===void 0?void 0:p.weekStartsOn)!==null&&x!==void 0?x:k.weekStartsOn)!==null&&h!==void 0?h:(y=k.locale)===null||y===void 0||(D=y.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&b!==void 0?b:0);if(!(M>=0&&M<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(T==="")return P===""?qe(n):new Date(NaN);var $={firstWeekContainsDate:R,weekStartsOn:M,locale:C},O=[new W1],I=T.match(DP).map(function(H){var K=H[0];if(K in Wp){var Q=Wp[K];return Q(H,C.formatLong)}return H}).join("").match(kP),A=[],B=Xp(I),N;try{var j=function(){var K=N.value;!(r!=null&&r.useAdditionalWeekYearTokens)&&AS(K)&&Vp(K,T,e),!(r!=null&&r.useAdditionalDayOfYearTokens)&&BS(K)&&Vp(K,T,e);var Q=K[0],ae=TP[Q];if(ae){var Y=ae.incompatibleTokens;if(Array.isArray(Y)){var J=A.find(function(be){return Y.includes(be.token)||be.token===Q});if(J)throw new RangeError("The format string mustn't contain `".concat(J.fullToken,"` and `").concat(K,"` at the same time"))}else if(ae.incompatibleTokens==="*"&&A.length>0)throw new RangeError("The format string mustn't contain `".concat(K,"` and any other token at the same time"));A.push({token:Q,fullToken:K});var re=ae.run(P,K,C.match,$);if(!re)return{v:new Date(NaN)};O.push(re.setter),P=re.rest}else{if(Q.match($P))throw new RangeError("Format string contains an unescaped latin alphabet character `"+Q+"`");if(K==="''"?K="'":Q==="'"&&(K=IP(K)),P.indexOf(K)===0)P=P.slice(K.length);else return{v:new Date(NaN)}}};for(B.s();!(N=B.n()).done;){var W=j();if(kw(W)==="object")return W.v}}catch(H){B.e(H)}finally{B.f()}if(P.length>0&&MP.test(P))return new Date(NaN);var G=O.map(function(H){return H.priority}).sort(function(H,K){return K-H}).filter(function(H,K,Q){return Q.indexOf(H)===K}).map(function(H){return O.filter(function(K){return K.priority===H}).sort(function(K,Q){return Q.subPriority-K.subPriority})}).map(function(H){return H[0]}),E=qe(n);if(isNaN(E.getTime()))return new Date(NaN);var U=jS(E,ku(E)),V={},_=Xp(G),z;try{for(_.s();!(z=_.n()).done;){var F=z.value;if(!F.validate(U,$))return new Date(NaN);var q=F.set(U,V,$);Array.isArray(q)?(U=q[0],I1(V,q[1])):U=q}}catch(H){_.e(H)}finally{_.f()}return U}function IP(e){return e.match(RP)[1].replace(EP,"'")}function Qp(e){Ye(1,arguments);var t=qe(e);return t.setMinutes(0,0,0),t}function _P(e,t){Ye(2,arguments);var n=Qp(e),r=Qp(t);return n.getTime()===r.getTime()}function AP(e,t){Ye(2,arguments);var n=qe(e),r=qe(t);return n.getFullYear()===r.getFullYear()}function BP(e,t){Ye(2,arguments);var n=qe(e),r=Yt(t);return n.setDate(r),n}function jP(e,t){Ye(2,arguments);var n=qe(e),r=Yt(t);return n.setHours(r),n}function LP(e,t){Ye(2,arguments);var n=qe(e),r=Yt(t);return n.setMinutes(r),n}function NP(e,t){Ye(2,arguments);var n=qe(e),r=Yt(t);return n.setSeconds(r),n}var Td={},FP=Se;Object.defineProperty(Td,"__esModule",{value:!0});var Dv=Td.default=void 0,zP=FP(wr()),WP=w;Dv=Td.default=(0,zP.default)((0,WP.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 kd={},VP=Se;Object.defineProperty(kd,"__esModule",{value:!0});var Rv=kd.default=void 0,UP=VP(wr()),qP=w;Rv=kd.default=(0,UP.default)((0,qP.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward");function Dd({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(wS,{checked:c,onChange:s,name:"enableWelcomePage",style:{...t.style,zoom:.8}})})})]})}Dd.propTypes={children:ie.any};Dd.defaultProps={children:null};var Rd={},HP=Se;Object.defineProperty(Rd,"__esModule",{value:!0});var al=Rd.default=void 0,GP=HP(wr()),KP=w;al=Rd.default=(0,GP.default)((0,KP.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 Ev={},qo={},uc={};function Mv(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=Mv(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=Mv(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 Ss(e){return typeof e=="string"}function $u(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 $v(e){if(typeof e!="string")throw new Error($u(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 Ov(e){if(!fr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=Ov(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])?Ov(t[o]):t[o]:r[o]=t[o]}),r}function Na(e,t){return t?Br(e,t,{clone:!1}):e}function YP(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 XP(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function QP(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 ZP(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 il={xs:0,sm:600,md:900,lg:1200,xl:1536},Zp={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${il[e]}px)`},JP={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:il[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||Zp;return t.reduce((i,s,c)=>(i[a.up(a.keys[c])]=n(t[c]),i),{})}if(typeof t=="object"){const a=r.breakpoints||Zp;return Object.keys(t).reduce((i,s)=>{if(XP(a.keys,s)){const c=QP(r.containerQueries?r:JP,s);c&&(i[c]=n(t[s],s))}else if(Object.keys(a.values||il).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 eT(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const a=e.up(o);return r[a]={},r},{}))||{}}function tT(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function sl(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 Ps(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=sl(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=sl(c,r)||{};return Qn(i,s,u=>{let f=Ps(l,o,u);return u===f&&typeof u=="string"&&(f=Ps(l,o,`${t}${u==="default"?"":$v(u)}`,u)),n===!1?f:{[n]:f}})};return a.propTypes={},a.filterProps=[t],a}function nT(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const rT={m:"margin",p:"padding"},oT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Jp={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},aT=nT(e=>{if(e.length>2)if(Jp[e])e=Jp[e];else return[e];const[t,n]=e.split(""),r=rT[t],o=oT[n]||"";return Array.isArray(o)?o.map(a=>r+a):[r+o]}),Ed=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Md=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Ed,...Md];function gi(e,t,n,r){const o=sl(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 $d(e){return gi(e,"spacing",8)}function bi(e,t){return typeof t=="string"||t==null?t:e(t)}function iT(e,t){return n=>e.reduce((r,o)=>(r[o]=bi(t,n),r),{})}function sT(e,t,n,r){if(!t.includes(n))return null;const o=aT(n),a=iT(o,r),i=e[n];return Qn(e,i,a)}function Iv(e,t){const n=$d(e.theme);return Object.keys(e).map(r=>sT(e,t,r,n)).reduce(Na,{})}function Ct(e){return Iv(e,Ed)}Ct.propTypes={};Ct.filterProps=Ed;function xt(e){return Iv(e,Md)}xt.propTypes={};xt.filterProps=Md;function ll(...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]?Na(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 lT=Pn("border",pn),cT=Pn("borderTop",pn),uT=Pn("borderRight",pn),dT=Pn("borderBottom",pn),fT=Pn("borderLeft",pn),pT=Pn("borderColor"),mT=Pn("borderTopColor"),hT=Pn("borderRightColor"),gT=Pn("borderBottomColor"),bT=Pn("borderLeftColor"),vT=Pn("outline",pn),yT=Pn("outlineColor"),cl=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=gi(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:bi(t,r)});return Qn(e,e.borderRadius,n)}return null};cl.propTypes={};cl.filterProps=["borderRadius"];ll(lT,cT,uT,dT,fT,pT,mT,hT,gT,bT,cl,vT,yT);const ul=e=>{if(e.gap!==void 0&&e.gap!==null){const t=gi(e.theme,"spacing",8),n=r=>({gap:bi(t,r)});return Qn(e,e.gap,n)}return null};ul.propTypes={};ul.filterProps=["gap"];const dl=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=gi(e.theme,"spacing",8),n=r=>({columnGap:bi(t,r)});return Qn(e,e.columnGap,n)}return null};dl.propTypes={};dl.filterProps=["columnGap"];const fl=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=gi(e.theme,"spacing",8),n=r=>({rowGap:bi(t,r)});return Qn(e,e.rowGap,n)}return null};fl.propTypes={};fl.filterProps=["rowGap"];const CT=Et({prop:"gridColumn"}),xT=Et({prop:"gridRow"}),wT=Et({prop:"gridAutoFlow"}),ST=Et({prop:"gridAutoColumns"}),PT=Et({prop:"gridAutoRows"}),TT=Et({prop:"gridTemplateColumns"}),kT=Et({prop:"gridTemplateRows"}),DT=Et({prop:"gridTemplateAreas"}),RT=Et({prop:"gridArea"});ll(ul,dl,fl,CT,xT,wT,ST,PT,TT,kT,DT,RT);function fo(e,t){return t==="grey"?t:e}const ET=Et({prop:"color",themeKey:"palette",transform:fo}),MT=Et({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:fo}),$T=Et({prop:"backgroundColor",themeKey:"palette",transform:fo});ll(ET,MT,$T);function Jt(e){return e<=1&&e!==0?`${e*100}%`:e}const OT=Et({prop:"width",transform:Jt}),Od=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])||il[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};Od.filterProps=["maxWidth"];const IT=Et({prop:"minWidth",transform:Jt}),_T=Et({prop:"height",transform:Jt}),AT=Et({prop:"maxHeight",transform:Jt}),BT=Et({prop:"minHeight",transform:Jt});Et({prop:"size",cssProperty:"width",transform:Jt});Et({prop:"size",cssProperty:"height",transform:Jt});const jT=Et({prop:"boxSizing"});ll(OT,Od,IT,_T,AT,BT,jT);const vi={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:cl},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:ul},rowGap:{style:fl},columnGap:{style:dl},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:Od},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 LT(...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 NT(e,t){return typeof e=="function"?e(t):e}function FT(){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=sl(o,l)||{};return u?u(i):Qn(i,r,b=>{let h=Ps(f,d,b);return b===h&&typeof b=="string"&&(h=Ps(f,d,`${n}${b==="default"?"":$v(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??vi;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=eT(o.breakpoints),d=Object.keys(l);let u=l;return Object.keys(c).forEach(f=>{const m=NT(c[f],o);if(m!=null)if(typeof m=="object")if(a[f])u=Na(u,e(f,m,o,a));else{const b=Qn({theme:o},m,h=>({[f]:h}));LT(b,m)?u[f]=t({sx:m,theme:o}):u=Na(u,b)}else u=Na(u,e(f,m,o,a))}),YP(o,tT(d,u))}return Array.isArray(r)?r.map(i):i(r)}return t}const Ur=FT();Ur.filterProps=["sx"];const zT=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??vi;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function _v(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=zT(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 WT=e=>{const t=Zb(e);class n extends Dw{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 Ou;typeof document=="object"&&(Ou=WT({key:"css",prepend:!0}));function VT(e){const{injectFirst:t,children:n}=e;return t&&Ou?w.jsx(Qb,{value:Ou,children:n}):n}function UT(e){return e==null||Object.keys(e).length===0}function Av(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?o=>t(UT(o)?n:o):t;return w.jsx(Jb,{styles:r})}/**
|
|
3
3
|
* @mui/styled-engine v6.1.0
|
|
4
4
|
*
|