@blocklet/pages-kit-inner-components 0.5.15 → 0.5.17

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.
@@ -1,4 +1,4 @@
1
- "use strict";var TI=Object.create;var gI=Object.defineProperty;var WI=Object.getOwnPropertyDescriptor;var xI=Object.getOwnPropertyNames;var YI=Object.getPrototypeOf,rI=Object.prototype.hasOwnProperty;var hI=(C,s,w,i)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of xI(s))!rI.call(C,o)&&o!==w&&gI(C,o,{get:()=>s[o],enumerable:!(i=WI(s,o))||i.enumerable});return C};var ZI=(C,s,w)=>(w=C!=null?TI(YI(C)):{},hI(s||!C||!C.__esModule?gI(w,"default",{value:C,enumerable:!0}):w,C));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const I=require("react/jsx-runtime"),H=require("./chunks/state-D4MG-uJB.js"),QI=require("@arcblock/ux/lib/Empty"),T=require("@arcblock/ux/lib/Locale/context"),p=require("@iconify-icon/react"),kI=require("@mui/icons-material/Check"),A=require("@mui/material"),u=require("ahooks"),m=require("react"),h=require("./chunks/array-DOh_uyzM.js"),G=require("@arcblock/ux/lib/Theme");require("@blocklet/pages-kit/builtin/color-picker");require("@blocklet/pages-kit/utils/style");const RI=require("@emotion/css");require("lodash/without");const X=require("@mui/material/colors"),f=require("./chunks/config-string-DnwpUGUo.js"),pI=require("lodash/cloneDeep"),r=require("@mui/icons-material"),AI=require("react-dnd");require("@arcblock/ux/lib/Tabs");require("lodash/pick");const UI=require("@mui/lab"),a=require("immer"),fI=require("./theme.js"),_=require("react-use"),mI=require("@arcblock/ux/lib/Toast"),GI=require("@mui/material/Tooltip"),VI=require("@mui/icons-material/KeyboardArrowLeft"),vI=require("@mui/material/Box"),_I=require("@mui/material/DialogTitle"),PI=require("@mui/material/IconButton"),qI=require("@mui/material/Dialog"),$I=require("@mui/material/useMediaQuery"),SI=require("@emotion/react"),IC=require("@mui/material/Alert"),CC=require("@mui/material/AlertTitle"),gC=require("react-error-boundary"),AC=require("ufo"),iC=require("@emotion/styled"),sC=require("@mui/material/Typography"),oC=require("joi"),P=require("@blocklet/ai-kit/api"),wC=require("@blocklet/js-sdk"),BI=require("@mui/x-date-pickers"),MC=require("@mui/x-date-pickers/AdapterDayjs"),LC=require("@mui/x-date-pickers/LocalizationProvider"),iI=require("circular-natal-horoscope-js/dist"),jC=require("dayjs"),JC=require("dayjs/plugin/timezone"),OC=require("dayjs/plugin/utc"),mC=require("fast-deep-equal"),SC=require("lodash/isNil"),BC=require("tz-lookup"),yC=require("@mui/icons-material/CheckCircleOutline"),DC=require("lodash/uniq"),eC=require("lodash/get"),bC=require("lodash/set"),NC=require("@blocklet/pages-kit/components"),F=C=>C&&C.__esModule?C:{default:C},yI=F(QI),KC=F(kI),DI=F(m),dC=F(pI),eI=F(mI),cC=F(GI),q=F(VI),Y=F(vI),$=F(_I),II=F(PI),zC=F(qI),FC=F($I),aC=F(IC),lC=F(CC),Q=F(iC),sI=F(sC),E=F(oC),Z=F(jC),tC=F(JC),HC=F(OC),EC=F(mC),uC=F(SC),bI=F(BC),nC=F(yC),oI=F(DC),XC=F(eC),TC=F(bC);X.red[300],X.pink[300],X.purple[300],X.indigo[300],X.blue[300],X.cyan[300],X.teal[300],X.green[300],X.lime[300],X.yellow[300],X.amber[300],X.orange[300],X.brown[300],X.grey[300],X.blueGrey[300];G.styled(A.Box)`
1
+ "use strict";var TI=Object.create;var gI=Object.defineProperty;var WI=Object.getOwnPropertyDescriptor;var xI=Object.getOwnPropertyNames;var YI=Object.getPrototypeOf,rI=Object.prototype.hasOwnProperty;var hI=(C,s,w,i)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of xI(s))!rI.call(C,o)&&o!==w&&gI(C,o,{get:()=>s[o],enumerable:!(i=WI(s,o))||i.enumerable});return C};var ZI=(C,s,w)=>(w=C!=null?TI(YI(C)):{},hI(s||!C||!C.__esModule?gI(w,"default",{value:C,enumerable:!0}):w,C));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const I=require("react/jsx-runtime"),H=require("./chunks/state-D4MG-uJB.js"),QI=require("@arcblock/ux/lib/Empty"),T=require("@arcblock/ux/lib/Locale/context"),p=require("@iconify-icon/react"),kI=require("@mui/icons-material/Check"),A=require("@mui/material"),u=require("ahooks"),m=require("react"),h=require("./chunks/array-BChVGKFh.js"),G=require("@arcblock/ux/lib/Theme");require("@blocklet/pages-kit/builtin/color-picker");require("@blocklet/pages-kit/utils/style");const RI=require("@emotion/css");require("lodash/without");const X=require("@mui/material/colors"),f=require("./chunks/config-string-DnwpUGUo.js"),pI=require("lodash/cloneDeep"),r=require("@mui/icons-material"),AI=require("react-dnd");require("@arcblock/ux/lib/Tabs");require("lodash/pick");const UI=require("@mui/lab"),a=require("immer"),fI=require("./theme.js"),_=require("react-use"),mI=require("@arcblock/ux/lib/Toast"),GI=require("@mui/material/Tooltip"),VI=require("@mui/icons-material/KeyboardArrowLeft"),vI=require("@mui/material/Box"),_I=require("@mui/material/DialogTitle"),PI=require("@mui/material/IconButton"),qI=require("@mui/material/Dialog"),$I=require("@mui/material/useMediaQuery"),SI=require("@emotion/react"),IC=require("@mui/material/Alert"),CC=require("@mui/material/AlertTitle"),gC=require("react-error-boundary"),AC=require("ufo"),iC=require("@emotion/styled"),sC=require("@mui/material/Typography"),oC=require("joi"),P=require("@blocklet/ai-kit/api"),wC=require("@blocklet/js-sdk"),BI=require("@mui/x-date-pickers"),MC=require("@mui/x-date-pickers/AdapterDayjs"),LC=require("@mui/x-date-pickers/LocalizationProvider"),iI=require("circular-natal-horoscope-js/dist"),jC=require("dayjs"),JC=require("dayjs/plugin/timezone"),OC=require("dayjs/plugin/utc"),mC=require("fast-deep-equal"),SC=require("lodash/isNil"),BC=require("tz-lookup"),yC=require("@mui/icons-material/CheckCircleOutline"),DC=require("lodash/uniq"),eC=require("lodash/get"),bC=require("lodash/set"),NC=require("@blocklet/pages-kit/components"),F=C=>C&&C.__esModule?C:{default:C},yI=F(QI),KC=F(kI),DI=F(m),dC=F(pI),eI=F(mI),cC=F(GI),q=F(VI),Y=F(vI),$=F(_I),II=F(PI),zC=F(qI),FC=F($I),aC=F(IC),lC=F(CC),Q=F(iC),sI=F(sC),E=F(oC),Z=F(jC),tC=F(JC),HC=F(OC),EC=F(mC),uC=F(SC),bI=F(BC),nC=F(yC),oI=F(DC),XC=F(eC),TC=F(bC);X.red[300],X.pink[300],X.purple[300],X.indigo[300],X.blue[300],X.cyan[300],X.teal[300],X.green[300],X.lime[300],X.yellow[300],X.amber[300],X.orange[300],X.brown[300],X.grey[300],X.blueGrey[300];G.styled(A.Box)`
2
2
  .color-item {
3
3
  position: relative;
4
4
  }
@@ -1,4 +1,4 @@
1
- "use strict";var kt=Object.create;var ot=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var St=Object.getOwnPropertyNames;var Nt=Object.getPrototypeOf,Ct=Object.prototype.hasOwnProperty;var Bt=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of St(e))!Ct.call(t,r)&&r!==n&&ot(t,r,{get:()=>e[r],enumerable:!(i=$t(e,r))||i.enumerable});return t};var Pt=(t,e,n)=>(n=t!=null?kt(Nt(t)):{},Bt(e||!t||!t.__esModule?ot(n,"default",{value:t,enumerable:!0}):n,t));const o=require("react/jsx-runtime");require("@mui/icons-material");const x=require("@mui/material"),f=require("react"),It=require("lodash/keyBy"),j=require("./state-D4MG-uJB.js"),F=require("@blocklet/ai-runtime/components"),Rt=require("@mui/utils"),Wt=require("lodash/pick"),Tt=require("react-error-boundary"),zt=require("@blocklet/pages-kit/builtin/markdown/markdown-renderer"),mt=require("@blocklet/pages-kit/contexts/color"),g=require("@emotion/css"),Et=require("react-syntax-highlighter/dist/esm/styles/prism"),k=require("@arcblock/ux/lib/Theme"),qt=require("@arcblock/react-hooks/lib/useBrowser"),Lt=require("@arcblock/ux/lib/Colors"),J=require("@blocklet/pages-kit/components"),rt=require("@blocklet/pages-kit/utils/style"),At=require("@mui/material/useMediaQuery"),Ot=require("lodash/omit"),pt=require("@iconify-icon/react"),Ut=require("@arcblock/ux/lib/Screenshot"),G=require("react-router-dom"),Ft=require("@arcblock/ux/lib/Button"),Dt=require("is-uri"),D=require("pathe"),W=require("ufo"),Mt=require("@blocklet/embed/message"),Vt=require("ahooks"),Ht=require("lodash/isEqual"),Yt=require("@blocklet/embed/react"),Jt=require("react-twitter-embed"),nt=require("react-use"),$=t=>t&&t.__esModule?t:{default:t},Gt=$(f),V=$(It),K=$(Wt),Kt=$(zt),Xt=$(qt),it=$(Lt),xt=$(At),N=$(Ot),Qt=$(Ut),Zt=$(Ft),H=$(Dt),te=$(Ht),ht="{{CUSTOM_VALUE}}",ee=[{title:"None",value:"none",sx:{py:0}},{title:"Small",value:"small",sx:{py:{xs:2.5,md:4,lg:4,xl:6}}},{title:"Normal",value:"normal",sx:{py:{xs:5,md:7.5,lg:10,xl:12.5}}},{title:"Large",value:"large",sx:{py:{xs:7.5,md:10,lg:12.5,xl:15}}}],oe=[{title:"None",value:"none",sx:{py:0}},{title:"Small",value:"small",sx:{py:{xs:2.5,md:4,lg:4,xl:6}}},{title:"Normal",value:"normal",sx:{py:{xs:5,md:7,lg:7,xl:9}}},{title:"Large",value:"large",sx:{py:{xs:6,md:9,lg:9,xl:11}}}],re=[{title:"None",value:"none",sx:{px:0}},{title:"Small",value:"small",sx:{px:{xs:2,md:4,lg:4,xl:6}}},{title:"Normal",value:"normal",sx:{px:{xs:2.5,md:7.5,lg:10,xl:12.5}}},{title:"Large",value:"large",sx:{px:{xs:2.5,md:10,lg:12.5,xl:15}}}],M=(t,e,n)=>{const i=t.breakpoints.values[n];return`${e}${i?` (${i}px)`:""}`},ne=[{title:"100%",value:"full",sx:{maxWidth:"100%"}},{title:t=>M(t,"Small","sm"),value:"sm",sx:{maxWidth:t=>t.breakpoints.values.sm,width:"100%",mx:"auto"}},{title:t=>M(t,"Normal","md"),value:"md",sx:{maxWidth:t=>t.breakpoints.values.md,width:"100%",mx:"auto"}},{title:t=>M(t,"Large","lg"),value:"lg",sx:{maxWidth:t=>t.breakpoints.values.lg,width:"100%",mx:"auto"}},{title:t=>M(t,"Extra Large","xl"),value:"xl",sx:{maxWidth:t=>t.breakpoints.values.xl,width:"100%",mx:"auto"}},{title:"Custom",value:"custom",sx:{maxWidth:ht,width:"100%",mx:"auto"}}],ie=V.default(ee,"value"),se=V.default(oe,"value"),ae=V.default(re,"value"),le=V.default(ne,"value"),ce=new Map([["baseSectionPaddingY",ie],["maxWidth",le],["paddingY",se],["paddingX",ae]]);function ft(t){var l;const{type:e,value:n,format:i="sx",defaultValue:r=null}=t,s=ce.get(e);if(!s)return r;const d=n.startsWith("custom:"),a=d?"custom":n;if(s!=null&&s[a]&&((l=s==null?void 0:s[a])!=null&&l[i])){const c=s[a][i];if(d){const u=n.replace("custom:","");try{return JSON.parse(JSON.stringify(c||{}).replaceAll(ht,u))}catch{}}return c}return r}const gt=f.createContext({page:null,getPageMeta:()=>({}),getPageMetaStyle:()=>({})});function de(){return f.useContext(gt)}function ue({page:t,children:e,defaultLocale:n="en",currentLocale:i}){const r=f.useMemo(()=>t?JSON.parse(JSON.stringify(t)):null,[JSON.stringify(t)]),s=f.useCallback(()=>{var c;if(!r)return{};const l=i||n;return((c=r.locales)==null?void 0:c[l])??{}},[r,n,i]),d=f.useCallback((l="sx")=>{const c=s();return!c||!c.style?{}:Object.entries(c.style||{}).reduce((m,[h,p])=>{if(!p)return m;const y=`${h}Custom`;c.style[y];const w=ft({type:h,value:p,format:l});return w?{...m,...w}:m},{})},[s]),a=f.useMemo(()=>({page:r,getPageMeta:s,getPageMetaStyle:d}),[r,s,d]);return o.jsx(gt.Provider,{value:a,children:e})}function R({actions:t,center:e,className:n,align:i}){return t&&(t!=null&&t.length)?o.jsx(x.Box,{className:g.cx("flex gap-4 flex-wrap","lg:flex-row lg:gap-8",(e||i==="center")&&"justify-center",!e&&i==="right"&&"justify-end",!e&&i==="left"&&"justify-start",n),sx:{alignItems:"center"},children:t}):null}const me="section",pe=x.styled(x.Box)`
1
+ "use strict";var kt=Object.create;var ot=Object.defineProperty;var $t=Object.getOwnPropertyDescriptor;var St=Object.getOwnPropertyNames;var Ct=Object.getPrototypeOf,Nt=Object.prototype.hasOwnProperty;var Bt=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of St(e))!Nt.call(t,r)&&r!==n&&ot(t,r,{get:()=>e[r],enumerable:!(i=$t(e,r))||i.enumerable});return t};var Pt=(t,e,n)=>(n=t!=null?kt(Ct(t)):{},Bt(e||!t||!t.__esModule?ot(n,"default",{value:t,enumerable:!0}):n,t));const o=require("react/jsx-runtime");require("@mui/icons-material");const p=require("@mui/material"),f=require("react"),It=require("lodash/keyBy"),j=require("./state-D4MG-uJB.js"),F=require("@blocklet/ai-runtime/components"),Rt=require("@mui/utils"),Tt=require("lodash/pick"),Wt=require("react-error-boundary"),zt=require("@blocklet/pages-kit/builtin/markdown/markdown-renderer"),mt=require("@blocklet/pages-kit/contexts/color"),g=require("@emotion/css"),Et=require("react-syntax-highlighter/dist/esm/styles/prism"),k=require("@arcblock/ux/lib/Theme"),qt=require("@arcblock/react-hooks/lib/useBrowser"),Lt=require("@arcblock/ux/lib/Colors"),J=require("@blocklet/pages-kit/components"),rt=require("@blocklet/pages-kit/utils/style"),At=require("@mui/material/useMediaQuery"),Ot=require("lodash/omit"),pt=require("@iconify-icon/react"),Ut=require("@arcblock/ux/lib/Screenshot"),G=require("react-router-dom"),Ft=require("@arcblock/ux/lib/Button"),Dt=require("is-uri"),D=require("pathe"),T=require("ufo"),Mt=require("@blocklet/embed/message"),Vt=require("ahooks"),Ht=require("lodash/isEqual"),Yt=require("@blocklet/embed/react"),Jt=require("react-twitter-embed"),nt=require("react-use"),$=t=>t&&t.__esModule?t:{default:t},Gt=$(f),V=$(It),K=$(Tt),Kt=$(zt),Xt=$(qt),it=$(Lt),xt=$(At),C=$(Ot),Qt=$(Ut),Zt=$(Ft),H=$(Dt),te=$(Ht),ht="{{CUSTOM_VALUE}}",ee=[{title:"None",value:"none",sx:{py:0}},{title:"Small",value:"small",sx:{py:{xs:2.5,md:4,lg:4,xl:6}}},{title:"Normal",value:"normal",sx:{py:{xs:5,md:7.5,lg:10,xl:12.5}}},{title:"Large",value:"large",sx:{py:{xs:7.5,md:10,lg:12.5,xl:15}}}],oe=[{title:"None",value:"none",sx:{py:0}},{title:"Small",value:"small",sx:{py:{xs:2.5,md:4,lg:4,xl:6}}},{title:"Normal",value:"normal",sx:{py:{xs:5,md:7,lg:7,xl:9}}},{title:"Large",value:"large",sx:{py:{xs:6,md:9,lg:9,xl:11}}}],re=[{title:"None",value:"none",sx:{px:0}},{title:"Small",value:"small",sx:{px:{xs:2,md:4,lg:4,xl:6}}},{title:"Normal",value:"normal",sx:{px:{xs:2.5,md:7.5,lg:10,xl:12.5}}},{title:"Large",value:"large",sx:{px:{xs:2.5,md:10,lg:12.5,xl:15}}}],M=(t,e,n)=>{const i=t.breakpoints.values[n];return`${e}${i?` (${i}px)`:""}`},ne=[{title:"100%",value:"full",sx:{maxWidth:"100%"}},{title:t=>M(t,"Small","sm"),value:"sm",sx:{maxWidth:t=>t.breakpoints.values.sm,width:"100%",mx:"auto"}},{title:t=>M(t,"Normal","md"),value:"md",sx:{maxWidth:t=>t.breakpoints.values.md,width:"100%",mx:"auto"}},{title:t=>M(t,"Large","lg"),value:"lg",sx:{maxWidth:t=>t.breakpoints.values.lg,width:"100%",mx:"auto"}},{title:t=>M(t,"Extra Large","xl"),value:"xl",sx:{maxWidth:t=>t.breakpoints.values.xl,width:"100%",mx:"auto"}},{title:"Custom",value:"custom",sx:{maxWidth:ht,width:"100%",mx:"auto"}}],ie=V.default(ee,"value"),se=V.default(oe,"value"),ae=V.default(re,"value"),le=V.default(ne,"value"),ce=new Map([["baseSectionPaddingY",ie],["maxWidth",le],["paddingY",se],["paddingX",ae]]);function ft(t){var l;const{type:e,value:n,format:i="sx",defaultValue:r=null}=t,s=ce.get(e);if(!s)return r;const d=n.startsWith("custom:"),a=d?"custom":n;if(s!=null&&s[a]&&((l=s==null?void 0:s[a])!=null&&l[i])){const c=s[a][i];if(d){const u=n.replace("custom:","");try{return JSON.parse(JSON.stringify(c||{}).replaceAll(ht,u))}catch{}}return c}return r}const gt=f.createContext({page:null,getPageMeta:()=>({}),getPageMetaStyle:()=>({})});function de(){return f.useContext(gt)}function ue({page:t,children:e,defaultLocale:n="en",currentLocale:i}){const r=f.useMemo(()=>t?JSON.parse(JSON.stringify(t)):null,[JSON.stringify(t)]),s=f.useCallback(()=>{var c;if(!r)return{};const l=i||n;return((c=r.locales)==null?void 0:c[l])??{}},[r,n,i]),d=f.useCallback((l="sx")=>{const c=s();return!c||!c.style?{}:Object.entries(c.style||{}).reduce((m,[h,x])=>{if(!x)return m;const y=`${h}Custom`;c.style[y];const w=ft({type:h,value:x,format:l});return w?{...m,...w}:m},{})},[s]),a=f.useMemo(()=>({page:r,getPageMeta:s,getPageMetaStyle:d}),[r,s,d]);return o.jsx(gt.Provider,{value:a,children:e})}function R({actions:t,center:e,className:n,align:i}){return t&&(t!=null&&t.length)?o.jsx(p.Box,{className:g.cx("flex gap-4 flex-wrap","lg:flex-row lg:gap-8",(e||i==="center")&&"justify-center",!e&&i==="right"&&"justify-end",!e&&i==="left"&&"justify-start",n),sx:{alignItems:"center"},children:t}):null}const me="section",pe=p.styled(p.Box)`
2
2
  overflow: hidden;
3
3
 
4
4
  .section__title {
@@ -60,7 +60,7 @@
60
60
  margin-bottom: 40px;
61
61
  }
62
62
  }
63
- `;function E({title:t,description:e,descriptionMarkdown:n,actions:i,className:r="",classes:s={},prepend:d,append:a,level:l=2,tag:c,badge:u,center:m,logo:h,titleAppearance:p,descriptionAppearance:y,...w}){const b=mt.useColorConvert();if(!t&&!e&&!i&&!u&&!c&&!d&&!a&&!h)return null;const v=Math.max(Math.min(5,l+1),1),_={1:"xl:!text-3xl lg:!text-2xl md:!text-xl",2:"xl:!text-2xl lg:!text-xl md:!text-lg",3:"xl:!text-2xl lg:!text-xl md:!text-lg",4:"xl:!text-xl lg:!text-lg md:!text-md",5:"xl:!text-lg md:!text-md sm:!text-sm",6:"!text-sm"},P=l===0?"big":`h${v}`,I=l===0;return o.jsxs(pe,{className:g.cx("base-info","lg:text-left",m&&"!text-center",r),...w,children:[d&&o.jsx("div",{children:d}),(c||u)&&o.jsx("div",{className:g.cx("section__tag",(s==null?void 0:s.tag)||(s==null?void 0:s.badge)),children:c||u}),h&&o.jsx("img",{className:"w-[120px] m-auto mb-8",src:h,alt:"info",loading:"lazy"}),t&&o.jsx(x.Typography,{sx:{whiteSpace:"pre-wrap",mb:e?"2vw":0,...(p==null?void 0:p.color)&&{color:`${b(p.color)} !important`}},className:g.cx("section__title","text-gray-800","dark:text-gray-50",s.title,"page-kit-section__title",I?"":"section__title_non_big"),component:`h${Math.max(l,1)}`,variant:P,children:t}),e&&(n?o.jsx(x.Box,{sx:{...(y==null?void 0:y.color)&&{color:`${b(y.color)} !important`}},className:g.cx("section__description","text-gray-800","dark:text-gray-100",_[v],s.description,"page-kit-section__description"),children:o.jsx(Kt.default,{codeOptions:{showActionButton:!1,theme:Et.materialDark},children:e})}):o.jsx(x.Typography,{sx:{whiteSpace:"pre-wrap",...(y==null?void 0:y.color)&&{color:`${b(y.color)} !important`}},className:g.cx("section__description","text-gray-800","dark:text-gray-100",_[v],s.description,"page-kit-section__description"),component:"div",variant:"body1",gutterBottom:!0,children:e})),o.jsx(R,{actions:i,center:m,className:"mt-8"}),a&&o.jsx("div",{children:a})]})}const q=["actions","append","badge","tag","center","description","descriptionMarkdown","level","logo","prepend","title","titleAppearance","descriptionAppearance"];function yt(t){if(t.type===f.Fragment){const n=(t.props.children||[]).filter(i=>f.isValidElement(i));return n.length===1?yt(n[0]):n.length>1}return Array.isArray(t)}const C="&>*";function X({children:t,col:e,gap:n,className:i,align:r,sx:s,type:d,...a}={children:null,className:"",col:3,gap:void 0,sx:{},align:"center",type:"default"}){const l=k.useTheme(),c=Number(Math.floor(100/e*100)/100),u={center:"justify-center items-center",left:"justify-start items-center",right:"justify-end items-center",top:"justify-center items-start",bottom:"justify-center items-end","top-left":"justify-start items-start","top-right":"justify-end items-start","bottom-left":"justify-start items-end","bottom-right":"justify-end items-end"},m=u[r]||u.center;let p=n??({2:6,3:4,4:4,5:3,6:3}[e]||0);yt(t)||(p=0);const w=(e-1)*p/e;let b={...s,gap:`${p}rem`};const v={[C]:{width:"100%"}},_={},P={},I={};switch(v.gap="1rem",_.gap=`${p/2}rem`,e){case 3:case 4:_[C]={width:`calc(50% - ${p/2}rem)`};break;case 5:case 6:v[C]={width:`calc(50% - ${p/2/2}rem)`},_[C]={width:`calc(50% - ${p/2/2}rem)`},P[C]={width:`calc(33.33% - ${p*2/3}rem)`};break}return b[C]={width:`calc(${c}% - ${w}rem)`},b[`@media (max-width: ${l.breakpoints.values.xl}px)`]=I,b[`@media (max-width: ${l.breakpoints.values.lg}px)`]=P,b[`@media (max-width: ${l.breakpoints.values.md}px)`]=_,b[`@media (max-width: ${l.breakpoints.values.sm}px)`]=v,d==="wall"&&(b={...s,gap:`${p}rem`},b[C]={width:`calc(${c}% - ${w}rem)`},v[C]={width:`calc(45% - ${p/2/2}rem)`},b[`@media (max-width: ${l.breakpoints.values.sm}px)`]=v),o.jsx(x.Box,{className:g.cx("flex flex-wrap flex-row h-full",m,i),sx:b,...a,children:t})}function xe(){const t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")}function he(t=""){if(t.startsWith("data:image/svg+xml,"))return!0;const e=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,n=/^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;return e.test(t)||n.test(t)}function T(t){return(t==null?void 0:t.endsWith(".mp4"))||(t==null?void 0:t.endsWith(".m4v"))||(t==null?void 0:t.endsWith(".webm"))}function fe(t){return t!=null&&t.endsWith(".mp4")||t!=null&&t.endsWith(".m4v")?"video/mp4":t!=null&&t.endsWith(".webm")?"video/webm":void 0}function ge(t){let e={};return typeof t=="string"?rt.isGradient(t)?e.image=t:(e.image=j.getImageAbsoluteUrl(t),rt.isColorString(t)&&(e.color=t,e.image="")):e=t,e}function ye(){const[t,e]=f.useState(Date.now());return f.useEffect(()=>{const n=()=>{e(Date.now())};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}},[]),t}function st(t,e,n,i,r){let s=null;const{color:d="",image:a}=ge(e);if(a&&he(a)){delete n.backgroundColor;const l=!(t.mobile.apple.device||xe())&&T(a),c=T(a)&&i?j.autoResizeImage(j.getImageAbsoluteUrl(i),1200,"quality"):"";l?s=o.jsx(x.Box,{component:"video",className:"section-bg",width:"100%",autoPlay:!0,loop:!0,muted:!0,controls:!1,playsInline:!0,poster:c,src:T(a)?a:j.autoResizeImage(a,1200,"quality"),sx:{position:"absolute",zIndex:-9999,right:0,left:0,top:0,width:"100%",height:"100%",objectFit:"cover"}},a):s=o.jsx(J.ResponsiveImage,{src:T(a)&&i?c:a,sizesAttr:{sm:600,md:900,lg:1200},className:"section-bg",alt:"",width:"100%",loading:"lazy",sx:{position:"absolute",zIndex:-9999,right:0,left:0,top:0,width:"100%",height:"100%",objectFit:"cover"}},r||a)}else a?n.backgroundImage=`${a} !important`:d&&(n.backgroundColor=`${d} !important`);return s}function be({autoWidth:t,children:e,...n}){return t?o.jsx(x.Box,{display:"flex",...n,children:e}):o.jsx(x.Container,{...n,children:e})}function L({dark:t=!1,children:e,className:n,sx:i={},boxed:r={show:!1},padding:s="normal",boxProps:d,type:a,...l}){const c={...i},u=xt.default(p=>p.breakpoints.down("md"));t&&(c.color=it.default.common.white,c.backgroundColor=`${it.default.grey[900]} !important`),r.show&&(c.display="flex");const m=f.useMemo(()=>!Number(l.boxMaxWidth)||u?{width:"100%"}:a==="wall"&&l.boxMaxWidth?{maxWidth:`${l.boxMaxWidth}px !important`,width:"100%"}:{width:"100%"},[l.boxMaxWidth,u,a]),h=ft({type:"baseSectionPaddingY",value:s||"normal",defaultValue:""});return o.jsx(we,{component:"section",styles:{...c,...h},className:g.cx("base-section","px-2 md:px-5 lg:px-5 xl:px-10",n,{dark:t}),...N.default(l,"hoverStyle","boxMaxWidth","embedUrl","autoWidth","paddingXY","iframeHeight","titleAppearance","descriptionAppearance"),children:o.jsx(be,{autoWidth:l==null?void 0:l.autoWidth,className:g.cx("section-content h-full"),sx:m,children:r.show?o.jsx(bt,{...d,boxed:r,children:e}):e})})}function bt({background:t="",backgroundVideoPoster:e,children:n,sx:i={},boxed:r={show:!1},className:s="",styles:d={},...a}){const l={...d,...i},c=mt.useColorConvert();let u=null;const m=xt.default(y=>y.breakpoints.up("sm")),h=Xt.default(),p=ye();return t&&(u=st(h,typeof t=="string"?c(t):t,l,e,p)),r.show&&(l.borderRadius="10px",l.padding===void 0&&(l.padding=m?"50px":"20px"),r!=null&&r.border&&(l.border="1px solid #c0c0c0"),r!=null&&r.background&&(u=st(h,typeof(r==null?void 0:r.background)=="string"?c(r==null?void 0:r.background):r==null?void 0:r.background,l,r==null?void 0:r.backgroundVideoPoster,p))),o.jsxs(x.Box,{...a,sx:{...l,...u?{position:"relative",overflow:"hidden",zIndex:0}:{}},className:g.cx(s,(r==null?void 0:r.boxShadow)&&"shadow-xl"),children:[u,n]})}const we=k.styled(bt)`
63
+ `;function E({title:t,description:e,descriptionMarkdown:n,actions:i,className:r="",classes:s={},prepend:d,append:a,level:l=2,tag:c,badge:u,center:m,logo:h,titleAppearance:x,descriptionAppearance:y,...w}){const b=mt.useColorConvert();if(!t&&!e&&!i&&!u&&!c&&!d&&!a&&!h)return null;const v=Math.max(Math.min(5,l+1),1),_={1:"xl:!text-3xl lg:!text-2xl md:!text-xl",2:"xl:!text-2xl lg:!text-xl md:!text-lg",3:"xl:!text-2xl lg:!text-xl md:!text-lg",4:"xl:!text-xl lg:!text-lg md:!text-md",5:"xl:!text-lg md:!text-md sm:!text-sm",6:"!text-sm"},P=l===0?"big":`h${v}`,I=l===0;return o.jsxs(pe,{className:g.cx("base-info","lg:text-left",m&&"!text-center",r),...w,children:[d&&o.jsx("div",{children:d}),(c||u)&&o.jsx("div",{className:g.cx("section__tag",(s==null?void 0:s.tag)||(s==null?void 0:s.badge)),children:c||u}),h&&o.jsx("img",{className:"w-[120px] m-auto mb-8",src:h,alt:"info",loading:"lazy"}),t&&o.jsx(p.Typography,{sx:{whiteSpace:"pre-wrap",mb:e?"2vw":0,...(x==null?void 0:x.color)&&{color:`${b(x.color)} !important`}},className:g.cx("section__title","text-gray-800","dark:text-gray-50",s.title,"page-kit-section__title",I?"":"section__title_non_big"),component:`h${Math.max(l,1)}`,variant:P,children:t}),e&&(n?o.jsx(p.Box,{sx:{...(y==null?void 0:y.color)&&{color:`${b(y.color)} !important`}},className:g.cx("section__description","text-gray-800","dark:text-gray-100",_[v],s.description,"page-kit-section__description"),children:o.jsx(Kt.default,{codeOptions:{showActionButton:!1,theme:Et.materialDark},children:e})}):o.jsx(p.Typography,{sx:{whiteSpace:"pre-wrap",...(y==null?void 0:y.color)&&{color:`${b(y.color)} !important`}},className:g.cx("section__description","text-gray-800","dark:text-gray-100",_[v],s.description,"page-kit-section__description"),component:"div",variant:"body1",gutterBottom:!0,children:e})),o.jsx(R,{actions:i,center:m,className:"mt-8"}),a&&o.jsx("div",{children:a})]})}const q=["actions","append","badge","tag","center","description","descriptionMarkdown","level","logo","prepend","title","titleAppearance","descriptionAppearance"];function yt(t){if(t.type===f.Fragment){const n=(t.props.children||[]).filter(i=>f.isValidElement(i));return n.length===1?yt(n[0]):n.length>1}return Array.isArray(t)}const N="&>*";function X({children:t,col:e,gap:n,className:i,align:r,sx:s,type:d,...a}={children:null,className:"",col:3,gap:void 0,sx:{},align:"center",type:"default"}){const l=k.useTheme(),c=Number(Math.floor(100/e*100)/100),u={center:"justify-center items-center",left:"justify-start items-center",right:"justify-end items-center",top:"justify-center items-start",bottom:"justify-center items-end","top-left":"justify-start items-start","top-right":"justify-end items-start","bottom-left":"justify-start items-end","bottom-right":"justify-end items-end"},m=u[r]||u.center;let x=n??({2:6,3:4,4:4,5:3,6:3}[e]||0);yt(t)||(x=0);const w=(e-1)*x/e;let b={...s,gap:`${x}rem`};const v={[N]:{width:"100%"}},_={},P={},I={};switch(v.gap="1rem",_.gap=`${x/2}rem`,e){case 3:case 4:_[N]={width:`calc(50% - ${x/2}rem)`};break;case 5:case 6:v[N]={width:`calc(50% - ${x/2/2}rem)`},_[N]={width:`calc(50% - ${x/2/2}rem)`},P[N]={width:`calc(33.33% - ${x*2/3}rem)`};break}return b[N]={width:`calc(${c}% - ${w}rem)`},b[`@media (max-width: ${l.breakpoints.values.xl}px)`]=I,b[`@media (max-width: ${l.breakpoints.values.lg}px)`]=P,b[`@media (max-width: ${l.breakpoints.values.md}px)`]=_,b[`@media (max-width: ${l.breakpoints.values.sm}px)`]=v,d==="wall"&&(b={...s,gap:`${x}rem`},b[N]={width:`calc(${c}% - ${w}rem)`},v[N]={width:`calc(45% - ${x/2/2}rem)`},b[`@media (max-width: ${l.breakpoints.values.sm}px)`]=v),o.jsx(p.Box,{className:g.cx("flex flex-wrap flex-row h-full",m,i),sx:b,...a,children:t})}function xe(){const t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")}function he(t=""){if(t.startsWith("data:image/svg+xml,"))return!0;const e=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,n=/^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;return e.test(t)||n.test(t)}function W(t){return(t==null?void 0:t.endsWith(".mp4"))||(t==null?void 0:t.endsWith(".m4v"))||(t==null?void 0:t.endsWith(".webm"))}function fe(t){return t!=null&&t.endsWith(".mp4")||t!=null&&t.endsWith(".m4v")?"video/mp4":t!=null&&t.endsWith(".webm")?"video/webm":void 0}function ge(t){let e={};return typeof t=="string"?rt.isGradient(t)?e.image=t:(e.image=j.getImageAbsoluteUrl(t),rt.isColorString(t)&&(e.color=t,e.image="")):e=t,e}function ye(){const[t,e]=f.useState(Date.now());return f.useEffect(()=>{const n=()=>{e(Date.now())};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}},[]),t}function st(t,e,n,i,r){let s=null;const{color:d="",image:a}=ge(e);if(a&&he(a)){delete n.backgroundColor;const l=!(t.mobile.apple.device||xe())&&W(a),c=W(a)&&i?j.autoResizeImage(j.getImageAbsoluteUrl(i),1200,"quality"):"";l?s=o.jsx(p.Box,{component:"video",className:"section-bg",width:"100%",autoPlay:!0,loop:!0,muted:!0,controls:!1,playsInline:!0,poster:c,src:W(a)?a:j.autoResizeImage(a,1200,"quality"),sx:{position:"absolute",zIndex:-9999,right:0,left:0,top:0,width:"100%",height:"100%",objectFit:"cover"}},a):s=o.jsx(J.ResponsiveImage,{src:W(a)&&i?c:a,sizesAttr:{sm:600,md:900,lg:1200},className:"section-bg",alt:"",width:"100%",loading:"lazy",sx:{position:"absolute",zIndex:-9999,right:0,left:0,top:0,width:"100%",height:"100%",objectFit:"cover"}},r||a)}else a?n.backgroundImage=`${a} !important`:d&&(n.backgroundColor=`${d} !important`);return s}function be({autoWidth:t,children:e,...n}){return t?o.jsx(p.Box,{display:"flex",...n,children:e}):o.jsx(p.Container,{...n,children:e})}function L({dark:t=!1,children:e,className:n,sx:i={},boxed:r={show:!1},padding:s="normal",boxProps:d,type:a,...l}){const c={...i},u=xt.default(x=>x.breakpoints.down("md"));t&&(c.color=it.default.common.white,c.backgroundColor=`${it.default.grey[900]} !important`),r.show&&(c.display="flex");const m=f.useMemo(()=>!Number(l.boxMaxWidth)||u?{width:"100%"}:a==="wall"&&l.boxMaxWidth?{maxWidth:`${l.boxMaxWidth}px !important`,width:"100%"}:{width:"100%"},[l.boxMaxWidth,u,a]),h=ft({type:"baseSectionPaddingY",value:s||"normal",defaultValue:""});return o.jsx(we,{component:"section",styles:{...c,...h},className:g.cx("base-section","px-2 md:px-5 lg:px-5 xl:px-10",n,{dark:t}),...C.default(l,"hoverStyle","boxMaxWidth","embedUrl","autoWidth","paddingXY","iframeHeight","titleAppearance","descriptionAppearance"),children:o.jsx(be,{autoWidth:l==null?void 0:l.autoWidth,className:g.cx("section-content h-full"),sx:m,children:r.show?o.jsx(bt,{...d,boxed:r,children:e}):e})})}function bt({background:t="",backgroundVideoPoster:e,children:n,sx:i={},boxed:r={show:!1},className:s="",styles:d={},...a}){const l={...d,...i},c=mt.useColorConvert();let u=null;const m=xt.default(y=>y.breakpoints.up("sm")),h=Xt.default(),x=ye();return t&&(u=st(h,typeof t=="string"?c(t):t,l,e,x)),r.show&&(l.borderRadius="10px",l.padding===void 0&&(l.padding=m?"50px":"20px"),r!=null&&r.border&&(l.border="1px solid #c0c0c0"),r!=null&&r.background&&(u=st(h,typeof(r==null?void 0:r.background)=="string"?c(r==null?void 0:r.background):r==null?void 0:r.background,l,r==null?void 0:r.backgroundVideoPoster,x))),o.jsxs(p.Box,{...a,sx:{...l,...u?{position:"relative",overflow:"hidden",zIndex:0}:{}},className:g.cx(s,(r==null?void 0:r.boxShadow)&&"shadow-xl"),children:[u,n]})}const we=k.styled(bt)`
64
64
  &:nth-of-type(even) {
65
65
  background: #f8f8f8;
66
66
  }
@@ -76,7 +76,7 @@
76
76
  }
77
77
  }
78
78
  }
79
- `;function Q({icon:t,...e}){return o.jsx(pt.Icon,{icon:t,...e,ref:null})}function S(t,e){const n=K.default(t,e),i=N.default(t,e);return[n,i]}const wt=["title","description","actions","badge","tag","prepend","append","logo"];function je({image:t,imageBorder:e,imageShadow:n,className:i,reverse:r=!1,fullSizeImage:s,...d}){const[a,l]=S(d,q),c=Object.keys(a).length>0&&Object.values(K.default(a,wt)).filter(Boolean).length>0&&o.jsx(E,{...a}),u=f.isValidElement(t)?t:o.jsx(x.Box,{component:"img",src:t,alt:"",className:"block"}),m=["phone","macbook"].includes(e),h=t&&o.jsx(x.Box,{className:g.cx("section__image","m-auto, leading-[1] text-center",n&&"shadow-xl",a!=null&&a.center?"flex justify-center items-center":""),sx:{border:e===!0?"1px solid #c0c0c0":void 0,borderRadius:2,overflow:"hidden","> div":m?{width:"100%",video:{borderRadius:"0 !important"}}:void 0},children:m?o.jsx(Qt.default,{type:e,sx:{width:"100%"},children:u}):u});return o.jsx(L,{className:g.cx("section--block",i,s&&!r&&g.css`
79
+ `;function Q({icon:t,...e}){return o.jsx(pt.Icon,{icon:t,...e,ref:null})}function S(t,e){const n=K.default(t,e),i=C.default(t,e);return[n,i]}const wt=["title","description","actions","badge","tag","prepend","append","logo"];function je({image:t,imageBorder:e,imageShadow:n,className:i,reverse:r=!1,fullSizeImage:s,...d}){const[a,l]=S(d,q),c=Object.keys(a).length>0&&Object.values(K.default(a,wt)).filter(Boolean).length>0&&o.jsx(E,{...a}),u=f.isValidElement(t)?t:o.jsx(p.Box,{component:"img",src:t,alt:"",className:"block"}),m=["phone","macbook"].includes(e),h=t&&o.jsx(p.Box,{className:g.cx("section__image","m-auto, leading-[1] text-center",n&&"shadow-xl",a!=null&&a.center?"flex justify-center items-center":""),sx:{border:e===!0?"1px solid #c0c0c0":void 0,borderRadius:2,overflow:"hidden","> div":m?{width:"100%",video:{borderRadius:"0 !important"}}:void 0},children:m?o.jsx(Qt.default,{type:e,sx:{width:"100%"},children:u}):u});return o.jsx(L,{className:g.cx("section--block",i,s&&!r&&g.css`
80
80
  .section-bg {
81
81
  height: 80%;
82
82
  }
@@ -93,16 +93,16 @@
93
93
  width: 100%;
94
94
  }
95
95
  }
96
- `:void 0,children:r?o.jsxs(o.Fragment,{children:[h,c]}):o.jsxs(o.Fragment,{children:[c,h]})})})}const A=["editing","height","locale","dev","sx"];function _e(t){const{className:e,...n}=t;return o.jsx(ve,{...n,className:g.cx("BlockBase-root",e)})}const ve=k.styled(x.Box)`
96
+ `:void 0,children:r?o.jsxs(o.Fragment,{children:[h,c]}):o.jsxs(o.Fragment,{children:[c,h]})})})}const A=["editing","height","locale","dev","sx"];function _e(t){const{className:e,...n}=t;return o.jsx(ve,{...n,className:g.cx("BlockBase-root",e)})}const ve=k.styled(p.Box)`
97
97
  position: relative;
98
98
  color: ${({theme:t})=>t.palette.text.primary};
99
- `;function ke({widget:t,reverse:e,projectId:n,assistantId:i,working:r,submitTitle:s,submitIcon:d,submitColor:a,placeholder:l,loadingIndicator:c,section:u,...m}){const[{editing:h},p]=S(m,A),[y,w]=S(p,q),b=n&&i?{projectId:n,gitRef:"main",assistantId:i,working:!0}:void 0,v={children:s,endIcon:d?o.jsx(Q,{icon:d}):void 0,sx:{background:a||void 0,":hover":{background:a||void 0,opacity:.8}}},_=[],P=l&&o.jsx(x.Typography,{variant:"caption",color:"text.disabled",children:l}),I=c&&o.jsx(x.Typography,{variant:"caption",color:"text.disabled",children:c});Object.keys(y).length>0&&Object.values(K.default(y,wt)).filter(Boolean).length>0&&_.push(o.jsx(E,{...y},"base-info")),b&&(t==="form"?_.push(o.jsx(F.AIForm,{identifier:b,SubmitProps:v},"form")):t==="result"?_.push(o.jsx(F.AIFormResult,{identifier:b,placeholder:P,loadingIndicator:I},"result")):_.push(o.jsxs(x.Stack,{width:"100%",gap:2,direction:"row",children:[o.jsx(F.AIForm,{identifier:b,BoxProps:{flex:1},SubmitProps:v}),o.jsx(F.AIFormResult,{identifier:b,BoxProps:{flex:1},placeholder:P,loadingIndicator:I})]},"form-result"))),e&&_.reverse();const et=x.useTheme(),vt=f.useMemo(()=>x.createTheme(Rt.deepmerge(et,{palette:{primary:a?{main:a}:void 0}})),[a,et]);return o.jsx(Tt.ErrorBoundary,{fallbackRender:j.ErrorView,children:o.jsx(x.ThemeProvider,{theme:vt,children:o.jsx(L,{...w,sx:h?{pointerEvents:"none"}:{},children:o.jsx(X,{col:_.length,children:_})})})})}const jt=f.createContext({pages:[],project:void 0}),{Provider:$e,Consumer:vo}=jt;function _t(){return f.useContext(jt)}function Se({icon:t,className:e="",size:n="1rem",...i}){return o.jsx(Ne,{component:Q,className:g.cx("css-icon",e),size:n,...i,icon:t})}const Ne=k.styled(x.Box)`
99
+ `;function ke({widget:t,reverse:e,projectId:n,assistantId:i,working:r,submitTitle:s,submitIcon:d,submitColor:a,placeholder:l,loadingIndicator:c,section:u,...m}){const[{editing:h},x]=S(m,A),[y,w]=S(x,q),b=n&&i?{projectId:n,gitRef:"main",assistantId:i,working:!0}:void 0,v={children:s,endIcon:d?o.jsx(Q,{icon:d}):void 0,sx:{background:a||void 0,":hover":{background:a||void 0,opacity:.8}}},_=[],P=l&&o.jsx(p.Typography,{variant:"caption",color:"text.disabled",children:l}),I=c&&o.jsx(p.Typography,{variant:"caption",color:"text.disabled",children:c});Object.keys(y).length>0&&Object.values(K.default(y,wt)).filter(Boolean).length>0&&_.push(o.jsx(E,{...y},"base-info")),b&&(t==="form"?_.push(o.jsx(F.AIForm,{identifier:b,SubmitProps:v},"form")):t==="result"?_.push(o.jsx(F.AIFormResult,{identifier:b,placeholder:P,loadingIndicator:I},"result")):_.push(o.jsxs(p.Stack,{width:"100%",gap:2,direction:"row",children:[o.jsx(F.AIForm,{identifier:b,BoxProps:{flex:1},SubmitProps:v}),o.jsx(F.AIFormResult,{identifier:b,BoxProps:{flex:1},placeholder:P,loadingIndicator:I})]},"form-result"))),e&&_.reverse();const et=p.useTheme(),vt=f.useMemo(()=>p.createTheme(Rt.deepmerge(et,{palette:{primary:a?{main:a}:void 0}})),[a,et]);return o.jsx(Wt.ErrorBoundary,{fallbackRender:j.ErrorView,children:o.jsx(p.ThemeProvider,{theme:vt,children:o.jsx(L,{...w,sx:h?{pointerEvents:"none"}:{},children:o.jsx(X,{col:_.length,children:_})})})})}const jt=f.createContext({pages:[],project:void 0}),{Provider:$e,Consumer:vo}=jt;function _t(){return f.useContext(jt)}function Se({icon:t,className:e="",size:n="1rem",...i}){return o.jsx(Ce,{component:Q,className:g.cx("css-icon",e),size:n,...i,icon:t})}const Ce=k.styled(p.Box)`
100
100
  &.css-icon {
101
101
  display: inline-block;
102
102
  width: ${({size:t})=>t};
103
103
  height: ${({size:t})=>t};
104
104
  }
105
- `;function Ce({icon:t,className:e="",size:n="1rem",imageMeta:i,...r}){const s=j.autoResizeImage(j.getImageAbsoluteUrl(t),540),[d,a]=f.useState(!1),l=k.useTheme();return d?o.jsx(Se,{icon:"i-mdi:image",color:l.palette.grey[500],size:n,className:e,...r}):o.jsx(Be,{className:g.cx("image-icon",e),size:n,...r,children:o.jsx("img",{className:"image-icon__image",src:s,onError:()=>a(!0),width:i==null?void 0:i.naturalWidth,height:i==null?void 0:i.naturalHeight,alt:(i==null?void 0:i.filename)||"card-icon",loading:"lazy"})})}const Be=k.styled(x.Box)`
105
+ `;function Ne({icon:t,className:e="",size:n="1rem",imageMeta:i,...r}){const s=j.autoResizeImage(j.getImageAbsoluteUrl(t),540),[d,a]=f.useState(!1),l=k.useTheme();return d?o.jsx(Se,{icon:"i-mdi:image",color:l.palette.grey[500],size:n,className:e,...r}):o.jsx(Be,{className:g.cx("image-icon",e),size:n,...r,children:o.jsx("img",{className:"image-icon__image",src:s,onError:()=>a(!0),width:i==null?void 0:i.naturalWidth,height:i==null?void 0:i.naturalHeight,alt:(i==null?void 0:i.filename)||"card-icon",loading:"lazy"})})}const Be=k.styled(p.Box)`
106
106
  display: inline-block;
107
107
  width: ${({size:t})=>t};
108
108
  height: ${({size:t})=>t};
@@ -111,9 +111,9 @@
111
111
  height: 100%;
112
112
  width: 100%;
113
113
  }
114
- `,Z=t=>typeof t=="string"&&/^[\w-_]+:[\w-_]+$/.test(t);function Y({icon:t,size:e="1rem",imageMeta:n,...i}){const r=window.isNaN(e)?e:`${e}px`;return Z(t)?o.jsx(pt.Icon,{icon:t}):o.jsx(Pe,{component:Ce,imageMeta:n,className:"base-icon",icon:t,size:r,...i})}const Pe=k.styled(x.Box)`
114
+ `,Z=t=>typeof t=="string"&&/^[\w-_]+:[\w-_]+$/.test(t);function Y({icon:t,size:e="1rem",imageMeta:n,...i}){const r=window.isNaN(e)?e:`${e}px`;return Z(t)?o.jsx(pt.Icon,{icon:t}):o.jsx(Pe,{component:Ne,imageMeta:n,className:"base-icon",icon:t,size:r,...i})}const Pe=k.styled(p.Box)`
115
115
  flex-shrink: 0;
116
- `;function z({text:t,children:e,icon:n="",endIcon:i,color:r="primary",link:s="",href:d="",...a}){const l=n?o.jsx(Y,{icon:n}):null,c=i?o.jsx(Y,{icon:i}):null,u=s||d,m={...a};return u&&(m.href=u,H.default(u)&&(m.target=m.target||"_blank")),o.jsx(Zt.default,{startIcon:l,endIcon:c,color:r,...m,children:t||e})}function tt({editing:t,text:e,...n}){const{pages:i=[]}=_t(),r=i.find(s=>s.id===(n.link||n.linkId));if(t)return o.jsx(z,{...N.default(n,["link","linkId"]),children:e});if(r){const s=r.path||"/";return o.jsx(G.Link,{to:s,children:o.jsx(z,{...N.default(n,["link","linkId"]),children:e})})}return o.jsx(z,{...N.default(n,"linkId"),children:e})}function B({type:t="",icon:e="",size:n="3rem",className:i="",...r}){return o.jsx(Y,{icon:e||t,size:n,className:g.cx("content-icon",i),...r})}B.propTypes={};B.defaultProps={type:"",icon:"",size:"3rem",color:"inherit",className:""};function Ie({to:t,base:e,children:n,className:i,activeClassName:r="active",target:s="auto",autoExternalMark:d=!1,useRouterLink:a,...l}){const{pages:c=[],locale:u=""}={},m=e?D.join("/",e):e||"";let h=s==="auto"?"_self":s,p=D.join(m,t);const y=d?H.default(p):!1;if(e)return p=D.join(m,u,t),o.jsx("a",{className:`no-underline ${i}`,href:W.withoutTrailingSlash(p),rel:"noreferrer noopener",target:h,...l,children:n});if(H.default(t))s==="auto"&&(h="_blank"),p=t;else{W.isRelative(p)&&(p=D.join(window.location.pathname,p));const w=W.parseURL(`${window.location.origin}${p}`),b=c.some(v=>v.pathname===w.pathname);if(a||b)return o.jsx(G.NavLink,{end:!0,to:W.withoutTrailingSlash(p),className:({isActive:v})=>g.cx(i,v?r:""),...l,children:n})}return o.jsxs("a",{className:`no-underline ${i}`,href:W.withoutTrailingSlash(p),rel:"noreferrer noopener",target:h,...l,children:[n,y&&o.jsx(B,{icon:"i-mdi:arrow-top-right",size:"0.9em",className:"smart-link__mark",style:{marginLeft:5}})]})}function O({prepend:t,append:e,children:n,className:i="",dark:r=!1,border:s=!0,...d}){let a={};const{pages:l=[]}=_t(),c=l.find(h=>h.id===d.link),u=!n||Gt.default.Children.toArray(n).every(h=>h===null);d.link&&(a={component:Ie,to:(c==null?void 0:c.path)||d.link,useRouterLink:!0});const m=r&&s;return o.jsxs(Re,{className:g.cx("base-card card",{"border-gray-200":s},{"dark:border-gray-500":m},{dark:r,"border-transparent":!s},i),...a,...N.default(d,["listType","dark","iconColor","link","hoverStyle","imageSize"]),children:[t,!u&&o.jsx("div",{className:"card__body",children:n}),e]})}const Re=k.styled(x.Box)`
116
+ `;function z({text:t,children:e,icon:n="",endIcon:i,color:r="primary",link:s="",href:d="",...a}){const l=n?o.jsx(Y,{icon:n}):null,c=i?o.jsx(Y,{icon:i}):null,u=s||d,m={...a};return u&&(m.href=u,H.default(u)&&(m.target=m.target||"_blank")),o.jsx(Zt.default,{startIcon:l,endIcon:c,color:r,...m,children:t||e})}function tt({editing:t,text:e,...n}){const{pages:i=[]}=_t(),r=i.find(s=>s.id===(n.link||n.linkId));if(t)return o.jsx(z,{...C.default(n,["link","linkId"]),children:e});if(r){const s=r.path||"/";return o.jsx(G.Link,{to:s,children:o.jsx(z,{...C.default(n,["link","linkId"]),children:e})})}return o.jsx(z,{...C.default(n,"linkId"),children:e})}function B({type:t="",icon:e="",size:n="3rem",className:i="",...r}){return o.jsx(Y,{icon:e||t,size:n,className:g.cx("content-icon",i),...r})}B.propTypes={};B.defaultProps={type:"",icon:"",size:"3rem",color:"inherit",className:""};function Ie({to:t,base:e,children:n,className:i,activeClassName:r="active",target:s="auto",autoExternalMark:d=!1,useRouterLink:a,...l}){const{pages:c=[],locale:u=""}={},m=e?D.join("/",e):e||"";let h=s==="auto"?"_self":s,x=D.join(m,t);const y=d?H.default(x):!1;if(e)return x=D.join(m,u,t),o.jsx("a",{className:`no-underline ${i}`,href:T.withoutTrailingSlash(x),rel:"noreferrer noopener",target:h,...l,children:n});if(H.default(t))s==="auto"&&(h="_blank"),x=t;else{T.isRelative(x)&&(x=D.join(window.location.pathname,x));const w=T.parseURL(`${window.location.origin}${x}`),b=c.some(v=>v.pathname===w.pathname);if(a||b)return o.jsx(G.NavLink,{end:!0,to:T.withoutTrailingSlash(x),className:({isActive:v})=>g.cx(i,v?r:""),...l,children:n})}return o.jsxs("a",{className:`no-underline ${i}`,href:T.withoutTrailingSlash(x),rel:"noreferrer noopener",target:h,...l,children:[n,y&&o.jsx(B,{icon:"i-mdi:arrow-top-right",size:"0.9em",className:"smart-link__mark",style:{marginLeft:5}})]})}function O({prepend:t,append:e,children:n,className:i="",dark:r=!1,border:s=!0,...d}){let a={};const{pages:l=[]}=_t(),c=l.find(h=>h.id===d.link),u=!n||Gt.default.Children.toArray(n).every(h=>h===null);d.link&&(a={component:Ie,to:(c==null?void 0:c.path)||d.link,useRouterLink:!0});const m=p.useTheme();return o.jsxs(Re,{className:g.cx("base-card card",{dark:r,"border-transparent":!s},i),sx:{borderColor:m.palette.divider},...a,...C.default(d,["listType","dark","iconColor","link","hoverStyle","imageSize"]),children:[t,!u&&o.jsx("div",{className:"card__body",children:n}),e]})}const Re=k.styled(p.Box)`
117
117
  &.base-card {
118
118
  text-align: left;
119
119
  border-width: 1px;
@@ -128,7 +128,7 @@
128
128
  .card__body {
129
129
  padding: 15px 15px;
130
130
  }
131
- `;function U({align:t="left",title:e,titleProps:n={},description:i,descriptionProps:r={}}){return o.jsxs(o.Fragment,{children:[e&&o.jsx(x.Typography,{className:g.cx("card__title text-gray-800","dark:text-gray-50"),component:"h5",variant:"h5",gutterBottom:!0,align:t,...n,children:e}),i&&o.jsx(x.Typography,{className:g.cx("card__description","text-gray-500","dark:text-gray-400"),component:"div",variant:"body1",gutterBottom:!0,align:t,...r,children:i})]})}function We({image:t,title:e,description:n,imageProps:i={},imageMeta:r,imageSize:s,titleProps:d={},descriptionProps:a={},actions:l,align:c,...u}){const m=Z(t),h=j.autoResizeImage(j.getImageAbsoluteUrl(t),540);return o.jsxs(Te,{className:"card-article",...u,prepend:o.jsx("div",{className:"card__image__wrap",children:m&&t?o.jsx(x.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:o.jsx(B,{icon:t,color:"primary.main"})}):h&&o.jsx("img",{className:"card__image",src:h,...i,alt:i.alt||(r==null?void 0:r.filename)||"card-image",width:r==null?void 0:r.naturalWidth,height:r==null?void 0:r.naturalHeight,style:{width:"100%",height:"100%",objectFit:s||"cover",objectPosition:"center"},loading:"lazy"})}),children:[e||n?o.jsx(U,{align:c,title:e,titleProps:d,description:n,descriptionProps:a}):null,l!=null&&l.length?o.jsx(R,{align:c,actions:l,className:"mt-4"}):null]})}const Te=k.styled(O)`
131
+ `;function U({align:t="left",title:e,titleProps:n={},description:i,descriptionProps:r={}}){return o.jsxs(o.Fragment,{children:[e&&o.jsx(p.Typography,{className:g.cx("card__title text-gray-800","dark:text-gray-50"),component:"h5",variant:"h5",gutterBottom:!0,align:t,...n,children:e}),i&&o.jsx(p.Typography,{className:g.cx("card__description","text-gray-500","dark:text-gray-400"),component:"div",variant:"body1",gutterBottom:!0,align:t,...r,children:i})]})}function Te({image:t,title:e,description:n,imageProps:i={},imageMeta:r,imageSize:s,titleProps:d={},descriptionProps:a={},actions:l,align:c,...u}){const m=Z(t),h=j.autoResizeImage(j.getImageAbsoluteUrl(t),540);return o.jsxs(We,{className:"card-article",...u,prepend:o.jsx("div",{className:"card__image__wrap",children:m&&t?o.jsx(p.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:o.jsx(B,{icon:t,color:"primary.main"})}):h&&o.jsx("img",{className:"card__image",src:h,...i,alt:i.alt||(r==null?void 0:r.filename)||"card-image",width:r==null?void 0:r.naturalWidth,height:r==null?void 0:r.naturalHeight,style:{width:"100%",height:"100%",objectFit:s||"cover",objectPosition:"center"},loading:"lazy"})}),children:[e||n?o.jsx(U,{align:c,title:e,titleProps:d,description:n,descriptionProps:a}):null,l!=null&&l.length?o.jsx(R,{align:c,actions:l,className:"mt-4"}):null]})}const We=k.styled(O)`
132
132
  ${t=>t.hoverStyle==="none"?"":t.link?`transition: box-shadow ease .3s;
133
133
  &:hover {
134
134
  box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
@@ -222,7 +222,7 @@
222
222
  text-align: left;
223
223
  box-sizing: border-box;
224
224
  }
225
- `;function Ee({image:t,title:e,description:n,imageProps:i={},imageMeta:r,imageSize:s,titleProps:d={},descriptionProps:a={},actions:l,align:c,...u}){const m=Z(t),h=j.autoResizeImage(j.getImageAbsoluteUrl(t),540);return o.jsxs(qe,{className:"card-article",...u,prepend:o.jsx("div",{className:"card__image__wrap",children:m&&t?o.jsx(x.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:o.jsx(B,{icon:t,color:"primary.main"})}):h&&o.jsx(x.Box,{component:"img",className:"card__image",src:h,...i,alt:i.alt||(r==null?void 0:r.filename)||"card-image",width:r==null?void 0:r.naturalWidth,height:r==null?void 0:r.naturalHeight,style:{width:"100%",height:"100%",objectFit:s||"contain",objectPosition:"center"},loading:"lazy"})}),children:[e||n?o.jsx(U,{align:c,title:e,titleProps:d,description:n,descriptionProps:a}):null,l!=null&&l.length?o.jsx(R,{align:c,actions:l,className:"mt-4"}):null]})}const qe=k.styled(O)`
225
+ `;function Ee({image:t,title:e,description:n,imageProps:i={},imageMeta:r,imageSize:s,titleProps:d={},descriptionProps:a={},actions:l,align:c,...u}){const m=Z(t),h=j.autoResizeImage(j.getImageAbsoluteUrl(t),540);return o.jsxs(qe,{className:"card-article",...u,prepend:o.jsx("div",{className:"card__image__wrap",children:m&&t?o.jsx(p.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:o.jsx(B,{icon:t,color:"primary.main"})}):h&&o.jsx(p.Box,{component:"img",className:"card__image",src:h,...i,alt:i.alt||(r==null?void 0:r.filename)||"card-image",width:r==null?void 0:r.naturalWidth,height:r==null?void 0:r.naturalHeight,style:{width:"100%",height:"100%",objectFit:s||"contain",objectPosition:"center"},loading:"lazy"})}),children:[e||n?o.jsx(U,{align:c,title:e,titleProps:d,description:n,descriptionProps:a}):null,l!=null&&l.length?o.jsx(R,{align:c,actions:l,className:"mt-4"}):null]})}const qe=k.styled(O)`
226
226
  ${t=>t.hoverStyle==="none"?"":t.link?`transition: box-shadow ease .3s;
227
227
  &:hover {
228
228
  box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
@@ -246,7 +246,7 @@
246
246
  .card__image {
247
247
  max-height: 60px;
248
248
  }
249
- `,ct="section";function Le({title:t,image:e,imageMeta:n,iconSize:i=100,description:r,actions:s,align:d,className:a="",...l}){return o.jsx(Ae,{className:g.cx("card",a),...l,children:o.jsxs(x.Box,{className:"flex items-center",children:[e&&o.jsx(B,{icon:e,color:"primary.main",size:i,imageMeta:n}),o.jsxs(x.Box,{className:"flex-1 ml-4",children:[o.jsx(U,{align:d,title:t,description:r}),o.jsx(R,{align:d,actions:s,className:"mt-4"})]})]})})}const Ae=k.styled(O)`
249
+ `,ct="section";function Le({title:t,image:e,imageMeta:n,iconSize:i=100,description:r,actions:s,align:d,className:a="",...l}){return o.jsx(Ae,{className:g.cx("card",a),...l,children:o.jsxs(p.Box,{className:"flex items-center",children:[e&&o.jsx(B,{icon:e,color:"primary.main",size:i,imageMeta:n}),o.jsxs(p.Box,{className:"flex-1 ml-4",children:[o.jsx(U,{align:d,title:t,description:r}),o.jsx(R,{align:d,actions:s,className:"mt-4"})]})]})})}const Ae=k.styled(O)`
250
250
  padding: 5vw 4vw;
251
251
  text-align: left;
252
252
  box-sizing: border-box;
@@ -400,7 +400,7 @@
400
400
  }
401
401
  }
402
402
  }
403
- `;function Fe({type:t="default",...e}){const i={article:We,simple:Oe,news:Le,default:lt,wall:Ee}[t]||lt;return o.jsx(i,{...t==="news"?e:N.default(e,"iconSize")})}function De({list:t=[],align:e="top",cards:n,listBorder:i=!0,listType:r="",col:s=3,gap:d,iconColor:a,className:l="",type:c="default",dark:u=!1,textAlign:m="left",hoverStyle:h,...p}){return o.jsx(X,{type:c,className:g.cx("card-list py-1",l,"items-stretch"),col:s,gap:d,align:e,...p,children:n||t.map(y=>o.jsx(Fe,{borderColor:i,iconColor:a,type:c,listType:r,dark:u,...y,align:m,style:d===0&&t.length>1?{borderRadius:0,marginRight:"-1px",marginBottom:"-1px"}:{}},y.id))})}const Me=["align","cards","list","listBorder","listType","col","gap","iconColor","type","textAlign"],Ve=k.styled(L)`
403
+ `;function Fe({type:t="default",...e}){const i={article:Te,simple:Oe,news:Le,default:lt,wall:Ee}[t]||lt;return o.jsx(i,{...t==="news"?e:C.default(e,"iconSize")})}function De({list:t=[],align:e="top",cards:n,listBorder:i=!0,listType:r="",col:s=3,gap:d,iconColor:a,className:l="",type:c="default",dark:u=!1,textAlign:m="left",hoverStyle:h,...x}){return o.jsx(X,{type:c,className:g.cx("card-list py-1",l,"items-stretch"),col:s,gap:d,align:e,...x,children:n||t.map(y=>o.jsx(Fe,{borderColor:i,iconColor:a,type:c,listType:r,dark:u,...y,align:m,style:d===0&&t.length>1?{borderRadius:0,marginRight:"-1px",marginBottom:"-1px"}:{}},y.id))})}const Me=["align","cards","list","listBorder","listType","col","gap","iconColor","type","textAlign"],Ve=k.styled(L)`
404
404
  a .card {
405
405
  color: #404040;
406
406
  cursor: pointer;
@@ -430,21 +430,21 @@
430
430
  .card-simple .card__body::after {
431
431
  background: inherit !important;
432
432
  }
433
- `;function Je({section:t,...e}){const[{editing:n},i]=S(e,A),r=f.useMemo(()=>{var s;return{...N.default(i,["listBorder","list","iconSize","imageSize"]),list:(s=i.list)==null?void 0:s.map(d=>{var a,l;return{...N.default(d,"icon","iconColor"),image:["news","simple","default"].includes(i.type)&&d.icon?d.icon:d.image,actions:(l=(a=d.actions)==null?void 0:a.map)==null?void 0:l.call(a,c=>o.jsx(tt,{...c,editing:n},c.id)),border:i.listBorder,iconSize:i.iconSize,imageSize:i.imageSize,hoverStyle:i.hoverStyle}})}},[i]);return o.jsx(Ye,{style:n?{pointerEvents:"none"}:{},...r})}function Ge({properties:t,section:e,locale:n,dev:i}){var r;return(r=e==null?void 0:e.config)!=null&&r.componentId?o.jsx(J.CustomComponentRenderer,{instanceId:e.id,componentId:e.config.componentId,blockletId:e.config.blockletId,blockletTitle:e.config.blockletTitle,componentName:e.config.componentName,locale:n,properties:t,dev:i}):o.jsx(x.Box,{textAlign:"center",py:2,children:o.jsx(x.Typography,{variant:"caption",color:"text.secondary",children:"Please select component to render"})})}function Ke({src:t,dataId:e,isEdit:n=!1,height:i="100%",onLoad:r=()=>{}}){return o.jsx(Yt.EmbedIframe,{isEdit:n,embedId:e,src:t,height:i,onLoad:()=>{r()}})}function Xe({dataId:t,src:e,actions:n,center:i,onLoad:r,...s}){const[d,a]=S(s,q);return o.jsxs(L,{...a,children:[Object.keys(d).length>0&&o.jsx(E,{center:i,...d}),o.jsx(Ke,{dataId:t,src:e,onLoad:r,height:s.iframeHeight?`${s.iframeHeight}px`:"100%"}),o.jsx(R,{actions:n,center:i})]})}const Qe={src:"",embedUrl:"",title:"",description:"",dark:!1,background:"",center:!0,config:{},id:""};function Ze({section:t,id:e,src:n,...i}){const r=`${e}-${i.locale}`,[{editing:s},d]=S(i,A),a=f.useRef({}),l=JSON.parse(JSON.stringify(d)),{message:c}=Mt.useMessage(r,"server"),u=Vt.useLatest(JSON.parse(JSON.stringify(d.config)||"{}"));return f.useEffect(()=>{c&&c.onInit(()=>u.current)},[c]),f.useEffect(()=>{const m=JSON.parse(JSON.stringify(d.config)||"{}");te.default(a.current,m)||(a.current=m,c==null||c.send("config-set",m))},[c,d.config]),n?o.jsx(Xe,{...l,dataId:r,src:n,style:s?{pointerEvents:"none"}:{}}):o.jsx(to,{children:'Please set the "src" attribute for this block'})}const to=k.styled("div")`
433
+ `;function Je({section:t,...e}){const[{editing:n},i]=S(e,A),r=f.useMemo(()=>{var s;return{...C.default(i,["listBorder","list","iconSize","imageSize"]),list:(s=i.list)==null?void 0:s.map(d=>{var a,l;return{...C.default(d,"icon","iconColor"),image:["news","simple","default"].includes(i.type)&&d.icon?d.icon:d.image,actions:(l=(a=d.actions)==null?void 0:a.map)==null?void 0:l.call(a,c=>o.jsx(tt,{...c,editing:n},c.id)),border:i.listBorder,iconSize:i.iconSize,imageSize:i.imageSize,hoverStyle:i.hoverStyle}})}},[i]);return o.jsx(Ye,{style:n?{pointerEvents:"none"}:{},...r})}function Ge({properties:t,section:e,locale:n,dev:i}){var r;return(r=e==null?void 0:e.config)!=null&&r.componentId?o.jsx(J.CustomComponentRenderer,{instanceId:e.id,componentId:e.config.componentId,blockletId:e.config.blockletId,blockletTitle:e.config.blockletTitle,componentName:e.config.componentName,locale:n,properties:t,dev:i}):o.jsx(p.Box,{textAlign:"center",py:2,children:o.jsx(p.Typography,{variant:"caption",color:"text.secondary",children:"Please select component to render"})})}function Ke({src:t,dataId:e,isEdit:n=!1,height:i="100%",onLoad:r=()=>{}}){return o.jsx(Yt.EmbedIframe,{isEdit:n,embedId:e,src:t,height:i,onLoad:()=>{r()}})}function Xe({dataId:t,src:e,actions:n,center:i,onLoad:r,...s}){const[d,a]=S(s,q);return o.jsxs(L,{...a,children:[Object.keys(d).length>0&&o.jsx(E,{center:i,...d}),o.jsx(Ke,{dataId:t,src:e,onLoad:r,height:s.iframeHeight?`${s.iframeHeight}px`:"100%"}),o.jsx(R,{actions:n,center:i})]})}const Qe={src:"",embedUrl:"",title:"",description:"",dark:!1,background:"",center:!0,config:{},id:""};function Ze({section:t,id:e,src:n,...i}){const r=`${e}-${i.locale}`,[{editing:s},d]=S(i,A),a=f.useRef({}),l=JSON.parse(JSON.stringify(d)),{message:c}=Mt.useMessage(r,"server"),u=Vt.useLatest(JSON.parse(JSON.stringify(d.config)||"{}"));return f.useEffect(()=>{c&&c.onInit(()=>u.current)},[c]),f.useEffect(()=>{const m=JSON.parse(JSON.stringify(d.config)||"{}");te.default(a.current,m)||(a.current=m,c==null||c.send("config-set",m))},[c,d.config]),n?o.jsx(Xe,{...l,dataId:r,src:n,style:s?{pointerEvents:"none"}:{}}):o.jsx(to,{children:'Please set the "src" attribute for this block'})}const to=k.styled("div")`
434
434
  user-select: none;
435
435
  color: #999;
436
436
  padding: 8px;
437
437
  height: 200px;
438
- `,eo=[/youtu\.be\/([^#&?]{11})/,/\?v=([^#&?]{11})/,/&v=([^#&?]{11})/,/embed\/([^#&?]{11})/,/\/v\/([^#&?]{11})/];function oo(t){var e;if(/youtu\.?be/.test(t))for(const n of eo){const i=(e=n.exec(t))==null?void 0:e[1];if(i)return i}}function ro(t){const e=oo(t);if(e)return`https://youtube.com/embed/${e}`}function no({src:t}){return f.useEffect(()=>{import("@lottiefiles/lottie-player")},[]),o.jsx("lottie-player",{autoplay:!0,loop:!0,mode:"normal",src:t})}function io(t){return o.jsx(x.Box,{maxHeight:400,overflow:"hidden auto",children:o.jsx(Jt.TwitterTimelineEmbed,{...t})})}function so({url:t}){const e=f.useRef(null),n=495,[i,r]=f.useState(e.current?e.current.offsetWidth*.5625:n),s=f.useCallback(()=>{const d=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,a=e.current?e.current.offsetWidth*.5625:n;return r(Math.floor(a*d))},[]);return f.useEffect(()=>{window.addEventListener("resize",s);const d=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,a=e.current?e.current.offsetWidth*.5625:n;return r(Math.floor(a*d)),function(){window.removeEventListener("resize",s)}},[i,s]),o.jsx(x.Box,{component:"iframe",ref:e,title:"youtube",width:"100%",height:`${i}px`,src:t,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sx:{display:"block"}})}const ao={image:"https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",badge:"Develop · Deploy · Run",title:"The Future is Here: Blockchain and Decentralized Application Development",description:"ArcBlock, your exclusive new decentralized development platform, makes developing decentralized applications, blockchain, and distributed ledger technology straightforward.",reverse:!1,dark:!1,background:"",actions:void 0,hasImage:!0,center:!1},lo=k.styled(je)`
438
+ `,eo=[/youtu\.be\/([^#&?]{11})/,/\?v=([^#&?]{11})/,/&v=([^#&?]{11})/,/embed\/([^#&?]{11})/,/\/v\/([^#&?]{11})/];function oo(t){var e;if(/youtu\.?be/.test(t))for(const n of eo){const i=(e=n.exec(t))==null?void 0:e[1];if(i)return i}}function ro(t){const e=oo(t);if(e)return`https://youtube.com/embed/${e}`}function no({src:t}){return f.useEffect(()=>{import("@lottiefiles/lottie-player")},[]),o.jsx("lottie-player",{autoplay:!0,loop:!0,mode:"normal",src:t})}function io(t){return o.jsx(p.Box,{maxHeight:400,overflow:"hidden auto",children:o.jsx(Jt.TwitterTimelineEmbed,{...t})})}function so({url:t}){const e=f.useRef(null),n=495,[i,r]=f.useState(e.current?e.current.offsetWidth*.5625:n),s=f.useCallback(()=>{const d=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,a=e.current?e.current.offsetWidth*.5625:n;return r(Math.floor(a*d))},[]);return f.useEffect(()=>{window.addEventListener("resize",s);const d=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,a=e.current?e.current.offsetWidth*.5625:n;return r(Math.floor(a*d)),function(){window.removeEventListener("resize",s)}},[i,s]),o.jsx(p.Box,{component:"iframe",ref:e,title:"youtube",width:"100%",height:`${i}px`,src:t,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sx:{display:"block"}})}const ao={image:"https://www.arcblock.io/static/ead0cabde7f2b7ff34db8f3e8ceca271/afc4b/builder.png",badge:"Develop · Deploy · Run",title:"The Future is Here: Blockchain and Decentralized Application Development",description:"ArcBlock, your exclusive new decentralized development platform, makes developing decentralized applications, blockchain, and distributed ledger technology straightforward.",reverse:!1,dark:!1,background:"",actions:void 0,hasImage:!0,center:!1},lo=k.styled(je)`
439
439
  .section__description {
440
440
  }
441
- `;function co({hasImage:t,fullSizeImage:e,boxed:n,videoPoster:i,imageMeta:r,imageOptimization:s,imageSize:d,section:a,...l}){var p,y;const[{editing:c},u]=S({...l,boxed:e?void 0:n},A);let m=uo(u.image,i,e,r,s,d);t||(m=null);let h=null;return u.actions&&(h=(y=(p=u.actions)==null?void 0:p.map)==null?void 0:y.call(p,(w,b)=>o.jsx(tt,{...w,editing:c},b))),o.jsx(lo,{...u,style:c?{pointerEvents:"none"}:{},image:m,fullSizeImage:t&&e,actions:h})}function uo(t,e,n,i,r,s){if(t){if(t.endsWith(".json"))return o.jsx(no,{src:t});if(t.indexOf("twitter.com")!==-1)return o.jsx(io,{sourceType:"url",url:t});const d=ro(t);if(d)return o.jsx(so,{url:d});const{naturalWidth:a,naturalHeight:l,filename:c}=i||{};if(T(t))return o.jsx("video",{width:a&&`${a}px`,height:l&&`${l}px`,controls:!0,autoPlay:!0,muted:!0,style:{display:"block",objectFit:s||"contain",borderRadius:"8px",width:"100%",height:"100%"},poster:j.autoResizeImage(j.getImageAbsoluteUrl(e),n?1200:540,r),children:o.jsx("source",{src:j.getImageAbsoluteUrl(t),type:fe(t)})},t);const u=r==="quality"?1:.6;return o.jsx(J.ResponsiveImage,{src:j.getImageAbsoluteUrl(t),sizesAttr:{sm:600*u,md:450*u,lg:540*u,...n&&{md:900*u,lg:1200*u}},width:a&&`${a}px`,height:l&&`${l}px`,alt:c??t,style:{objectFit:s||"contain",display:"block",width:"100%",height:"100%"},loading:"lazy"})}return null}const mo=["production","draft"];function po({mode:t,version:e}={}){const n=e&&typeof e=="number"?{mode:t,version:e}:{mode:t};return j.api.get(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages`,{params:n}).then(i=>i.data)}function xo({mode:t,routes:e}){return j.api.post(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages/publish`,{mode:t,routes:e}).then(n=>n.data)}function ho({locale:t,sort:e,page:n,limit:i,mode:r}={}){return j.api.get(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages/toc`,{params:{locale:t,sort:e,page:n,limit:i,mode:r}}).then(s=>s.data)}const fo={style:"list",sort:"-updatedAt"},dt=20;function go({style:t,sort:e,section:n,...i}){const[{editing:r,locale:s},d]=S(i,A),[a,l]=S(d,q),[c,u]=f.useState(),m=f.useRef(!1),h=nt.useUpdate(),p=G.useNavigate(),y=f.useCallback(async()=>{if(!m.current){m.current=!0,h();try{const w=c?Math.floor(c.list.length/dt)+1:1,{list:b,total:v}=await ho({locale:s,sort:e,page:w,limit:dt});u(_=>({list:((_==null?void 0:_.list)??[]).concat(b),total:v}))}finally{m.current=!1,h()}}},[c,s,e,h]);return nt.useMount(()=>{y()}),o.jsxs(L,{...l,sx:r?{pointerEvents:"none"}:{},children:[Object.keys(a).length>0&&o.jsx(E,{...a}),c?o.jsxs(o.Fragment,{children:[o.jsx(x.Grid,{container:!0,spacing:2,justifyContent:"center",children:c==null?void 0:c.list.map(w=>o.jsx(x.Grid,{item:!0,xs:12,sm:t==="card"?6:12,md:t==="card"?3:12,children:o.jsxs(yo,{elevation:0,className:g.cx(t==="card"&&"style-card"),onClick:r?void 0:()=>p(w.slug),children:[!!w.image&&o.jsx(x.CardMedia,{component:"img",alt:"",image:j.autoResizeImage(j.getImageAbsoluteUrl(w.image),540),loading:"lazy"}),o.jsxs(x.CardContent,{children:[o.jsx(x.Typography,{variant:"h6",component:"div",className:ut,children:w.title||w.id}),o.jsx(x.Typography,{variant:"body2",className:ut,children:w.description})]})]})},w.id))}),o.jsx(x.Box,{textAlign:"center",mt:2,children:c.total>c.list.length?o.jsx(z,{variant:"outlined",color:"secondary",onClick:y,loading:m.current,children:"More"}):o.jsx(z,{variant:"outlined",color:"secondary",disabled:!0,children:"No More"})})]}):o.jsx(x.Box,{p:2,textAlign:"center",children:o.jsx(x.CircularProgress,{size:24})})]})}const ut=g.css`
441
+ `;function co({hasImage:t,fullSizeImage:e,boxed:n,videoPoster:i,imageMeta:r,imageOptimization:s,imageSize:d,section:a,...l}){var x,y;const[{editing:c},u]=S({...l,boxed:e?void 0:n},A);let m=uo(u.image,i,e,r,s,d);t||(m=null);let h=null;return u.actions&&(h=(y=(x=u.actions)==null?void 0:x.map)==null?void 0:y.call(x,(w,b)=>o.jsx(tt,{...w,editing:c},b))),o.jsx(lo,{...u,style:c?{pointerEvents:"none"}:{},image:m,fullSizeImage:t&&e,actions:h})}function uo(t,e,n,i,r,s){if(t){if(t.endsWith(".json"))return o.jsx(no,{src:t});if(t.indexOf("twitter.com")!==-1)return o.jsx(io,{sourceType:"url",url:t});const d=ro(t);if(d)return o.jsx(so,{url:d});const{naturalWidth:a,naturalHeight:l,filename:c}=i||{};if(W(t))return o.jsx("video",{width:a&&`${a}px`,height:l&&`${l}px`,controls:!0,autoPlay:!0,muted:!0,style:{display:"block",objectFit:s||"contain",borderRadius:"8px",width:"100%",height:"100%"},poster:j.autoResizeImage(j.getImageAbsoluteUrl(e),n?1200:540,r),children:o.jsx("source",{src:j.getImageAbsoluteUrl(t),type:fe(t)})},t);const u=r==="quality"?1:.6;return o.jsx(J.ResponsiveImage,{src:j.getImageAbsoluteUrl(t),sizesAttr:{sm:600*u,md:450*u,lg:540*u,...n&&{md:900*u,lg:1200*u}},width:a&&`${a}px`,height:l&&`${l}px`,alt:c??t,style:{objectFit:s||"contain",display:"block",width:"100%",height:"100%"},loading:"lazy"})}return null}const mo=["production","draft"];function po({mode:t,version:e}={}){const n=e&&typeof e=="number"?{mode:t,version:e}:{mode:t};return j.api.get(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages`,{params:n}).then(i=>i.data)}function xo({mode:t,routes:e}){return j.api.post(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages/publish`,{mode:t,routes:e}).then(n=>n.data)}function ho({locale:t,sort:e,page:n,limit:i,mode:r}={}){return j.api.get(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages/toc`,{params:{locale:t,sort:e,page:n,limit:i,mode:r}}).then(s=>s.data)}const fo={style:"list",sort:"-updatedAt"},dt=20;function go({style:t,sort:e,section:n,...i}){const[{editing:r,locale:s},d]=S(i,A),[a,l]=S(d,q),[c,u]=f.useState(),m=f.useRef(!1),h=nt.useUpdate(),x=G.useNavigate(),y=f.useCallback(async()=>{if(!m.current){m.current=!0,h();try{const w=c?Math.floor(c.list.length/dt)+1:1,{list:b,total:v}=await ho({locale:s,sort:e,page:w,limit:dt});u(_=>({list:((_==null?void 0:_.list)??[]).concat(b),total:v}))}finally{m.current=!1,h()}}},[c,s,e,h]);return nt.useMount(()=>{y()}),o.jsxs(L,{...l,sx:r?{pointerEvents:"none"}:{},children:[Object.keys(a).length>0&&o.jsx(E,{...a}),c?o.jsxs(o.Fragment,{children:[o.jsx(p.Grid,{container:!0,spacing:2,justifyContent:"center",children:c==null?void 0:c.list.map(w=>o.jsx(p.Grid,{item:!0,xs:12,sm:t==="card"?6:12,md:t==="card"?3:12,children:o.jsxs(yo,{elevation:0,className:g.cx(t==="card"&&"style-card"),onClick:r?void 0:()=>x(w.slug),children:[!!w.image&&o.jsx(p.CardMedia,{component:"img",alt:"",image:j.autoResizeImage(j.getImageAbsoluteUrl(w.image),540),loading:"lazy"}),o.jsxs(p.CardContent,{children:[o.jsx(p.Typography,{variant:"h6",component:"div",className:ut,children:w.title||w.id}),o.jsx(p.Typography,{variant:"body2",className:ut,children:w.description})]})]})},w.id))}),o.jsx(p.Box,{textAlign:"center",mt:2,children:c.total>c.list.length?o.jsx(z,{variant:"outlined",color:"secondary",onClick:y,loading:m.current,children:"More"}):o.jsx(z,{variant:"outlined",color:"secondary",disabled:!0,children:"No More"})})]}):o.jsx(p.Box,{p:2,textAlign:"center",children:o.jsx(p.CircularProgress,{size:24})})]})}const ut=g.css`
442
442
  display: -webkit-box;
443
443
  -webkit-box-orient: vertical;
444
444
  -webkit-line-clamp: 2;
445
445
  overflow: hidden;
446
446
  text-overflow: ellipsis;
447
- `,yo=k.styled(x.Card)`
447
+ `,yo=k.styled(p.Card)`
448
448
  border: 1px solid #e0e0e0;
449
449
  background-color: transparent;
450
450
  cursor: pointer;
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("react/jsx-runtime"),M=require("./state-D4MG-uJB.js"),Y=require("@arcblock/ux/lib/Locale/context"),le=require("@arcblock/ux/lib/Result"),ue=require("@blocklet/pages-kit/builtin/page/header"),de=require("@blocklet/pages-kit/contexts/color"),J=require("@blocklet/pages-kit/utils/data-source"),pe=require("@blocklet/pages-kit/utils/route"),ge=require("@blocklet/ui-react/lib/Header"),Z=require("@emotion/css"),N=require("@emotion/react"),me=require("@emotion/styled"),b=require("@mui/material"),G=require("ahooks"),fe=require("isomorphic-dompurify"),he=require("lodash/cloneDeep"),xe=require("lodash/isEmpty"),je=require("lodash/isEqual"),m=require("react"),ye=require("react-helmet"),P=require("react-router-dom"),ee=require("react-use"),E=require("ufo"),I=require("./array-DOh_uyzM.js"),W=require("@arcblock/ux/lib/Theme"),be=require("@blocklet/ui-react/lib/Footer");require("webfontloader");const X=require("./session-BA7Qrcia.js"),S=t=>t&&t.__esModule?t:{default:t},te=S(le),ve=S(ge),ne=S(me),we=S(fe),V=S(he),Pe=S(xe),oe=S(je),ke=S(be),Re=W.styled(ke.default,{shouldForwardProp:t=>!!t})`
1
+ "use strict";const e=require("react/jsx-runtime"),M=require("./state-D4MG-uJB.js"),Y=require("@arcblock/ux/lib/Locale/context"),le=require("@arcblock/ux/lib/Result"),ue=require("@blocklet/pages-kit/builtin/page/header"),de=require("@blocklet/pages-kit/contexts/color"),J=require("@blocklet/pages-kit/utils/data-source"),pe=require("@blocklet/pages-kit/utils/route"),ge=require("@blocklet/ui-react/lib/Header"),Z=require("@emotion/css"),N=require("@emotion/react"),me=require("@emotion/styled"),b=require("@mui/material"),G=require("ahooks"),fe=require("isomorphic-dompurify"),he=require("lodash/cloneDeep"),xe=require("lodash/isEmpty"),je=require("lodash/isEqual"),m=require("react"),ye=require("react-helmet"),P=require("react-router-dom"),ee=require("react-use"),E=require("ufo"),I=require("./array-BChVGKFh.js"),W=require("@arcblock/ux/lib/Theme"),be=require("@blocklet/ui-react/lib/Footer");require("webfontloader");const X=require("./session-BA7Qrcia.js"),S=t=>t&&t.__esModule?t:{default:t},te=S(le),ve=S(ge),ne=S(me),we=S(fe),V=S(he),Pe=S(xe),oe=S(je),ke=S(be),Re=W.styled(ke.default,{shouldForwardProp:t=>!!t})`
2
2
  & > div > .MuiContainer-root {
3
3
  max-width: unset;
4
4
  }
@@ -30,7 +30,7 @@
30
30
  body {
31
31
  background-color: ${g(!a.backgroundColor||a.backgroundColor==="transparent"?"background.default":a.backgroundColor)} !important;
32
32
  }
33
- `}),e.jsx(y,{hideNavMenu:!!((_=a.header)!=null&&_.hideNavMenus),translucentTextColor:(C=a.header)==null?void 0:C.translucentTextColor,...p?{logo:p}:{},...h?{brand:h}:{},...v?{description:v}:{},className:Z.cx(((T=a.header)==null?void 0:T.sticky)&&"sticky","page-header"),maxWidth:!1,addons:j}),e.jsx(P.ScrollRestoration,{}),e.jsxs(ye.Helmet,{children:[e.jsx("title",{children:l}),e.jsx("meta",{name:"og:title",content:l}),e.jsx("meta",{name:"og:description",content:f}),e.jsx("meta",{name:"og:image",content:d}),e.jsx("meta",{name:"twitter:image:src",content:d}),e.jsx("meta",{name:"twitter:image",content:d}),e.jsx("meta",{property:"twitter:description",content:f}),e.jsx("meta",{property:"twitter:title",content:l}),e.jsx("meta",{name:"description",content:f})]}),e.jsx(b.Stack,{flexGrow:1,className:"PageView-root",sx:{"& .BlockBase-root:first-child":{pt:"0 !important"}},children:r.sectionIds.map(k=>{var D,O;const x=r.sections[k];if(!x||x.visibility==="hidden")return null;const R=(D=x.locales)==null?void 0:D[s],U=((O=x.locales)==null?void 0:O[i])??{};return e.jsx(I.BlockRenderer,{id:k,type:x.component,mode:t,section:x,config:{...Pe.default(R)?U:R,locale:s,dev:t==="draft"?{mode:t,components:o,defaultLocale:i}:{mode:t}}},k)})}),!((L=a.footer)!=null&&L.hidden)&&e.jsx(Se,{})]})}const Le=m.lazy(()=>Promise.resolve().then(()=>require("./publish-button-H5zinlnz.js"))),ae=ne.default(ve.default)`
33
+ `}),e.jsx(y,{hideNavMenu:!!((_=a.header)!=null&&_.hideNavMenus),translucentTextColor:(C=a.header)==null?void 0:C.translucentTextColor,...p?{logo:p}:{},...h?{brand:h}:{},...v?{description:v}:{},className:Z.cx(((T=a.header)==null?void 0:T.sticky)&&"sticky","page-header"),maxWidth:!1,addons:j}),e.jsx(P.ScrollRestoration,{}),e.jsxs(ye.Helmet,{children:[e.jsx("title",{children:l}),e.jsx("meta",{name:"og:title",content:l}),e.jsx("meta",{name:"og:description",content:f}),e.jsx("meta",{name:"og:image",content:d}),e.jsx("meta",{name:"twitter:image:src",content:d}),e.jsx("meta",{name:"twitter:image",content:d}),e.jsx("meta",{property:"twitter:description",content:f}),e.jsx("meta",{property:"twitter:title",content:l}),e.jsx("meta",{name:"description",content:f})]}),e.jsx(b.Stack,{flexGrow:1,className:"PageView-root",sx:{"& .BlockBase-root:first-child":{pt:"0 !important"}},children:r.sectionIds.map(k=>{var D,O;const x=r.sections[k];if(!x||x.visibility==="hidden")return null;const R=(D=x.locales)==null?void 0:D[s],U=((O=x.locales)==null?void 0:O[i])??{};return e.jsx(I.BlockRenderer,{id:k,type:x.component,mode:t,section:x,config:{...Pe.default(R)?U:R,locale:s,dev:t==="draft"?{mode:t,components:o,defaultLocale:i}:{mode:t}}},k)})}),!((L=a.footer)!=null&&L.hidden)&&e.jsx(Se,{})]})}const Le=m.lazy(()=>Promise.resolve().then(()=>require("./publish-button-DvXGUgra.js"))),ae=ne.default(ve.default)`
34
34
  &.sticky {
35
35
  position: sticky;
36
36
  top: 0;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),F=require("./state-D4MG-uJB.js"),$=require("@arcblock/ux/lib/Locale/context"),ee=require("@arcblock/ux/lib/Toast"),te=require("@blocklet/pages-kit/utils/route"),P=require("@mui/icons-material"),J=require("@mui/lab"),s=require("@mui/material"),se=require("immer"),ne=require("lodash/difference"),l=require("react"),ie=require("react-use"),re=require("./home-4CkDQ2Eu.js"),U=require("./array-DOh_uyzM.js"),G=r=>r&&r.__esModule?r:{default:r},W=G(ee),H=G(ne);function oe(r){const[j,k]=l.useState(!1);return e.jsx(J.LoadingButton,{...r,loading:r.loading||j,onClick:u=>{var b;const p=(b=r.onClick)==null?void 0:b.call(r,u);p instanceof Promise&&(k(!0),p.finally(()=>{k(!1)}))}})}const ae=s.createSvgIcon(e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M7.75732 16.2426L16.2426 7.75736",stroke:"#4B5563",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16.2426 16.2426L7.75732 7.75735",stroke:"#4B5563",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Close");function le(){const[r,j]=l.useState(),k=l.useMemo(()=>r?e.jsx(s.Dialog,{...r}):null,[r]),u=l.useCallback(()=>{j(void 0)},[]),p=l.useCallback(({title:b,content:d,cancelText:S="Cancel",okText:f="Ok",onOk:g,onClose:c,okIcon:O,okColor:w="primary",cancelColor:y="primary",DialogContentProps:A,form:M,...z})=>{j({...z,open:!0,children:e.jsxs("form",{onSubmit:R=>R.preventDefault(),children:[b&&e.jsxs(s.DialogTitle,{className:"between",zIndex:"appBar",bgcolor:"background.paper",sx:{borderBottom:"1px solid #E5E7EB"},children:[e.jsx(s.Box,{children:b}),e.jsx(s.IconButton,{size:"small",onClick:async()=>{u(),c==null||c()},children:e.jsx(ae,{})})]}),d&&e.jsx(s.DialogContent,{...A,sx:{mt:-3,...A==null?void 0:A.sx},children:e.jsx(s.Box,{pt:3,children:d})}),e.jsxs(s.DialogActions,{children:[e.jsx(s.Button,{variant:"outlined",color:y||"primary",onClick:c??u,children:S}),e.jsx(oe,{variant:"contained",color:w||"primary",startIcon:O,loadingPosition:O?"start":"center",onClick:async()=>{await(g==null?void 0:g()),u()},type:"submit",children:f})]})]}),onClose:c??u})},[u]);return{dialog:k,showDialog:p,closeDialog:u}}const ce=l.forwardRef(({mode:r,state:j},k)=>{const{t:u}=$.useLocaleContext(),[p,b]=l.useState(!1),{dialog:d,showDialog:S}=le(),f=F.useProjectId(),g=l.useCallback(O=>{let w=[];S({title:u("maker.publishToProduction"),content:e.jsxs(s.Box,{sx:{minWidth:300},children:[e.jsx(s.Alert,{color:"warning",icon:e.jsx(P.Warning,{}),children:u("maker.publishToProductionTip")}),e.jsx(s.Box,{maxHeight:"50vh",overflow:"auto",mt:2,children:e.jsx(de,{state:j,toMode:r,onChange:y=>w=y,defaultRouteIds:O})})]}),okText:u("maker.publish"),cancelText:u("common.cancel"),onOk:async()=>{if((w==null?void 0:w.length)===0){const y=u("maker.publishSelectPagesMessage");throw W.default.error(y),new Error(y)}localStorage.setItem(F.getProjectPageVersionKey(f??""),String(new Date().getTime())),b(!0);try{await U.publishPages({mode:r,routes:w}),W.default.success(u("maker.publishSuccessMessage"))}catch(y){throw W.default.error(y.message),y}finally{b(!1)}}})},[r,j,u,f,S]);l.useImperativeHandle(k,()=>({openPublishDialog:g}));const c=l.useCallback(()=>{g()},[g]);return e.jsxs(e.Fragment,{children:[e.jsx(J.LoadingButton,{color:"primary",variant:"contained",size:"small",sx:{mr:1},onClick:c,loading:p,disabled:p,children:u("maker.publishToProduction")}),d]})});function ue({routePathInfo:r,checked:j,onClick:k,route:u}){var d,S,f,g,c;const{t:p}=$.useLocaleContext(),b=!((d=r.routeMetaData)!=null&&d.publishedAt)||((S=r.routeMetaData)==null?void 0:S.updatedAt)&&new Date((f=r.routeMetaData)==null?void 0:f.updatedAt)>new Date((g=r.routeMetaData)==null?void 0:g.publishedAt);return e.jsx(s.ListItem,{sx:{pl:4,pr:3},disablePadding:!0,secondaryAction:e.jsxs(s.Box,{display:"flex",alignItems:"center",sx:{minWidth:"auto"},children:[b&&e.jsx(s.Box,{mr:.35,className:"visible",color:"warning.main",sx:{display:"flex",alignItems:"center"},title:p("maker.pages.needPublish"),children:e.jsx(s.Tooltip,{title:p("maker.pages.needPublish"),children:e.jsx(P.Sync,{fontSize:"small",sx:{fontSize:"16px"}})})}),(!((c=r.routeMetaData)!=null&&c.isPublic)||!u.isPublic)&&e.jsx(s.Box,{className:"visible",color:"warning.main",children:e.jsx(s.Tooltip,{title:p("maker.pages.notPublic"),children:e.jsx(P.VisibilityOff,{fontSize:"small",sx:{fontSize:"16px"}})})})]}),children:e.jsxs(s.ListItemButton,{onClick:k,dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:j,tabIndex:-1})}),e.jsx(s.ListItemText,{primary:r.path,primaryTypographyProps:{fontSize:"0.8rem",fontStyle:"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",pr:1}})]})})}function de({state:r,toMode:j,onChange:k,defaultRouteIds:u}){const{t:p,locale:b}=$.useLocaleContext(),[d,S]=l.useState(!1),[f,g]=l.useState(()=>u?Object.fromEntries(u.filter(t=>!t.includes("-")).map(t=>[t,!0])):{}),[c,O]=l.useState({}),[w,y]=l.useState(()=>u?Object.fromEntries(u.filter(t=>t.includes("-")).map(t=>[t,!0])):{}),[A,M]=l.useState({}),{loading:z,error:R,value:x}=ie.useAsync(()=>U.getPages({mode:j}),[j]);if(R)throw R;const T=l.useMemo(()=>r.routeIds||[],[r]),I=l.useMemo(()=>(x==null?void 0:x.pageIds)||[],[x]),D=l.useMemo(()=>!T||!r.routes?[]:JSON.parse(JSON.stringify(T)).sort((o,i)=>{var h,m;const n=(h=r.routes)==null?void 0:h[o],a=(m=r.routes)==null?void 0:m[i];return n!=null&&n.publishedAt&&new Date(n.publishedAt).getTime()<new Date(n.updatedAt).getTime()?-1:a!=null&&a.publishedAt&&new Date(a.publishedAt).getTime()<new Date(a.updatedAt).getTime()?1:new Date((n==null?void 0:n.updatedAt)??"").getTime()-new Date((a==null?void 0:a.updatedAt)??"").getTime()}),[r,T]),q=l.useMemo(()=>{if(!D)return[];if(!c)return D;const t=[...D].filter(o=>!c[o]);return Object.values(c).forEach(o=>{o.forEach(i=>{t.push(`${i.originalRouteId}-${i.paramOptionIds.join("-")}`)})}),t},[D,c]),L=l.useMemo(()=>!x||!I||!q?[]:H.default(I,q),[q,x,I]),C=l.useMemo(()=>T?[...T].concat(L):L,[T,L]),_=l.useCallback(()=>{const t={};D==null||D.forEach(o=>{var n;const i=(n=r.routes)==null?void 0:n[o];if(i&&i.params&&i.params.length>0&&i.paramsOptions&&i.paramsOptions.length>0){const a=te.generateParamCombinations({basePath:i.path,params:i.params,routeId:i.id,paramsOptions:i.paramsOptions,currentIndex:0,currentParams:[],currentOptionIds:[],result:[]});a.length>0&&(t[i.id]=a)}}),O(t)},[D,r.routes]);l.useEffect(()=>{_()},[_]),l.useEffect(()=>{M(t=>{const o={...t};return Object.keys(c).forEach(i=>{var n;c[i]&&((n=c[i])==null?void 0:n.length)>0&&o[i]===void 0&&(o[i]=!0)}),o})},[c]);const K=l.useRef(!0);l.useEffect(()=>{y(t=>{const o={...t};return Object.keys(c).length===0||(Object.keys(c).forEach(i=>{const n=c[i]||[],a=d||!!f[i];n.forEach(h=>{const m=`${i}-${h.paramOptionIds.join("-")}`;K.current?o[m]=a||t[m]||!1:o[m]=a})}),K.current=!1),o})},[f,c,d]);const Q=(t,o)=>{o.stopPropagation(),M(i=>{const n={...i};return n[t]=!n[t],n})},N=l.useCallback(t=>{g(o=>{const i=se.produce(o,n=>{d?(Object.assign(n,Object.fromEntries(C.map(a=>[a,!0]))),delete n[t]):n[t]?(delete n[t],L.includes(t)&&(T||[]).filter(a=>{var h,m;return((h=r.pages[a])==null?void 0:h.slug)===((m=x==null?void 0:x.pages[t])==null?void 0:m.slug)}).forEach(a=>{delete n[a]})):(n[t]=!0,T&&T.includes(t)&&L.filter(a=>{var h,m;return((h=x==null?void 0:x.pages[a])==null?void 0:h.slug)===((m=r.pages[t])==null?void 0:m.slug)}).forEach(a=>{n[a]=!0}))});return S(H.default(C,Object.keys(i)).length===0),i})},[d,C,L,r,x,T]),X=l.useCallback((t,o)=>{const i=`${t}-${o.paramOptionIds.join("-")}`;y(n=>{var m;const a={...n};a[i]=!a[i];const h=((m=c[t])==null?void 0:m.every(B=>a[`${t}-${B.paramOptionIds.join("-")}`]))??!1;return g(B=>{if(h&&!B[t])return{...B,[t]:!0};if(!h&&B[t]){const v={...B};return delete v[t],v}return B}),a})},[c]),Y=l.useCallback(()=>{S(t=>(t&&g({}),!t))},[]);return l.useEffect(()=>{const t=d?C:Object.keys(f),o=Object.entries(w).filter(([,n])=>n).map(([n])=>n).filter(n=>n!==void 0),i=Array.from(new Set([...t,...o]));k(d?null:i)},[d,f,w,C,k]),z?e.jsx(re.Loading,{sx:{my:4}}):e.jsxs(s.List,{disablePadding:!0,sx:{maxWidth:700},children:[e.jsx(s.ListItem,{sx:{position:"sticky",top:0,bgcolor:"background.paper",zIndex:1},disablePadding:!0,children:e.jsxs(s.ListItemButton,{onClick:Y,dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:d,tabIndex:-1})}),e.jsx(s.ListItemText,{primary:p("common.all")})]})}),D.map(t=>{var B,v;const o=(B=r.routes)==null?void 0:B[t];if(!o)return null;const i=!1,n=c&&c[t]&&((v=c[t])==null?void 0:v.length)>0,a=A[t]!==!1,h=c[t]||[],m=!o.publishedAt||o.updatedAt&&new Date(o.updatedAt).getTime()>new Date(o.publishedAt).getTime();return e.jsxs(s.Box,{children:[e.jsx(s.ListItem,{sx:{pr:4},disablePadding:!0,secondaryAction:e.jsxs(s.Box,{sx:{display:"flex",alignItems:"center"},children:[m&&e.jsx(s.Tooltip,{title:p("maker.pages.needPublish"),children:e.jsx(P.Sync,{fontSize:"small",sx:{color:"warning.main",fontSize:16,mr:.35}})}),!o.isPublic&&e.jsx(s.Tooltip,{title:p("maker.pages.notPublic"),children:e.jsx(P.VisibilityOff,{fontSize:"small",sx:{color:"warning.main",fontSize:16,mr:.35}})}),i,n&&e.jsx(s.Box,{onClick:E=>Q(t,E),sx:{display:"inline-flex",alignItems:"center",mr:.35,cursor:"pointer",color:"info.main"},children:a?e.jsx(P.KeyboardArrowDown,{fontSize:"small",sx:{fontSize:"18px"}}):e.jsx(P.KeyboardArrowRight,{fontSize:"small",sx:{fontSize:"18px"}})})]}),children:e.jsxs(s.ListItemButton,{onClick:()=>N(t),dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:d||!!f[t],tabIndex:-1})}),e.jsx(s.ListItemText,{primary:o.path,primaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"},secondaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"}})]})}),n&&e.jsx(s.Collapse,{in:a,children:e.jsx(s.Box,{children:h.map(E=>{const V=`${t}-${E.paramOptionIds.join("-")}`,Z=w[V]||!1;return e.jsx(ue,{routePathInfo:E,checked:d||Z,onClick:()=>X(t,E),route:o},V)})})})]},t)}),L.map(t=>{var i,n;const o=x==null?void 0:x.pages[t];return o?e.jsx(s.ListItem,{disablePadding:!0,secondaryAction:e.jsx(s.Chip,{color:"warning",label:"deleted",size:"small"}),children:e.jsxs(s.ListItemButton,{onClick:()=>N(t),dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:d||!!f[t],tabIndex:-1})}),e.jsx(s.ListItemText,{primary:o.slug,secondary:(n=(i=o.locales)==null?void 0:i[b])==null?void 0:n.title,primaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"},secondaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"}})]})},t):null})]})}exports.default=ce;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),F=require("./state-D4MG-uJB.js"),$=require("@arcblock/ux/lib/Locale/context"),ee=require("@arcblock/ux/lib/Toast"),te=require("@blocklet/pages-kit/utils/route"),P=require("@mui/icons-material"),J=require("@mui/lab"),s=require("@mui/material"),se=require("immer"),ne=require("lodash/difference"),l=require("react"),ie=require("react-use"),re=require("./home-BkGblT4S.js"),U=require("./array-BChVGKFh.js"),G=r=>r&&r.__esModule?r:{default:r},W=G(ee),H=G(ne);function oe(r){const[j,k]=l.useState(!1);return e.jsx(J.LoadingButton,{...r,loading:r.loading||j,onClick:u=>{var b;const p=(b=r.onClick)==null?void 0:b.call(r,u);p instanceof Promise&&(k(!0),p.finally(()=>{k(!1)}))}})}const ae=s.createSvgIcon(e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M7.75732 16.2426L16.2426 7.75736",stroke:"#4B5563",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M16.2426 16.2426L7.75732 7.75735",stroke:"#4B5563",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),"Close");function le(){const[r,j]=l.useState(),k=l.useMemo(()=>r?e.jsx(s.Dialog,{...r}):null,[r]),u=l.useCallback(()=>{j(void 0)},[]),p=l.useCallback(({title:b,content:d,cancelText:S="Cancel",okText:f="Ok",onOk:g,onClose:c,okIcon:O,okColor:w="primary",cancelColor:y="primary",DialogContentProps:A,form:M,...z})=>{j({...z,open:!0,children:e.jsxs("form",{onSubmit:R=>R.preventDefault(),children:[b&&e.jsxs(s.DialogTitle,{className:"between",zIndex:"appBar",bgcolor:"background.paper",sx:{borderBottom:"1px solid #E5E7EB"},children:[e.jsx(s.Box,{children:b}),e.jsx(s.IconButton,{size:"small",onClick:async()=>{u(),c==null||c()},children:e.jsx(ae,{})})]}),d&&e.jsx(s.DialogContent,{...A,sx:{mt:-3,...A==null?void 0:A.sx},children:e.jsx(s.Box,{pt:3,children:d})}),e.jsxs(s.DialogActions,{children:[e.jsx(s.Button,{variant:"outlined",color:y||"primary",onClick:c??u,children:S}),e.jsx(oe,{variant:"contained",color:w||"primary",startIcon:O,loadingPosition:O?"start":"center",onClick:async()=>{await(g==null?void 0:g()),u()},type:"submit",children:f})]})]}),onClose:c??u})},[u]);return{dialog:k,showDialog:p,closeDialog:u}}const ce=l.forwardRef(({mode:r,state:j},k)=>{const{t:u}=$.useLocaleContext(),[p,b]=l.useState(!1),{dialog:d,showDialog:S}=le(),f=F.useProjectId(),g=l.useCallback(O=>{let w=[];S({title:u("maker.publishToProduction"),content:e.jsxs(s.Box,{sx:{minWidth:300},children:[e.jsx(s.Alert,{color:"warning",icon:e.jsx(P.Warning,{}),children:u("maker.publishToProductionTip")}),e.jsx(s.Box,{maxHeight:"50vh",overflow:"auto",mt:2,children:e.jsx(de,{state:j,toMode:r,onChange:y=>w=y,defaultRouteIds:O})})]}),okText:u("maker.publish"),cancelText:u("common.cancel"),onOk:async()=>{if((w==null?void 0:w.length)===0){const y=u("maker.publishSelectPagesMessage");throw W.default.error(y),new Error(y)}localStorage.setItem(F.getProjectPageVersionKey(f??""),String(new Date().getTime())),b(!0);try{await U.publishPages({mode:r,routes:w}),W.default.success(u("maker.publishSuccessMessage"))}catch(y){throw W.default.error(y.message),y}finally{b(!1)}}})},[r,j,u,f,S]);l.useImperativeHandle(k,()=>({openPublishDialog:g}));const c=l.useCallback(()=>{g()},[g]);return e.jsxs(e.Fragment,{children:[e.jsx(J.LoadingButton,{color:"primary",variant:"contained",size:"small",sx:{mr:1},onClick:c,loading:p,disabled:p,children:u("maker.publishToProduction")}),d]})});function ue({routePathInfo:r,checked:j,onClick:k,route:u}){var d,S,f,g,c;const{t:p}=$.useLocaleContext(),b=!((d=r.routeMetaData)!=null&&d.publishedAt)||((S=r.routeMetaData)==null?void 0:S.updatedAt)&&new Date((f=r.routeMetaData)==null?void 0:f.updatedAt)>new Date((g=r.routeMetaData)==null?void 0:g.publishedAt);return e.jsx(s.ListItem,{sx:{pl:4,pr:3},disablePadding:!0,secondaryAction:e.jsxs(s.Box,{display:"flex",alignItems:"center",sx:{minWidth:"auto"},children:[b&&e.jsx(s.Box,{mr:.35,className:"visible",color:"warning.main",sx:{display:"flex",alignItems:"center"},title:p("maker.pages.needPublish"),children:e.jsx(s.Tooltip,{title:p("maker.pages.needPublish"),children:e.jsx(P.Sync,{fontSize:"small",sx:{fontSize:"16px"}})})}),(!((c=r.routeMetaData)!=null&&c.isPublic)||!u.isPublic)&&e.jsx(s.Box,{className:"visible",color:"warning.main",children:e.jsx(s.Tooltip,{title:p("maker.pages.notPublic"),children:e.jsx(P.VisibilityOff,{fontSize:"small",sx:{fontSize:"16px"}})})})]}),children:e.jsxs(s.ListItemButton,{onClick:k,dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:j,tabIndex:-1})}),e.jsx(s.ListItemText,{primary:r.path,primaryTypographyProps:{fontSize:"0.8rem",fontStyle:"italic",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",pr:1}})]})})}function de({state:r,toMode:j,onChange:k,defaultRouteIds:u}){const{t:p,locale:b}=$.useLocaleContext(),[d,S]=l.useState(!1),[f,g]=l.useState(()=>u?Object.fromEntries(u.filter(t=>!t.includes("-")).map(t=>[t,!0])):{}),[c,O]=l.useState({}),[w,y]=l.useState(()=>u?Object.fromEntries(u.filter(t=>t.includes("-")).map(t=>[t,!0])):{}),[A,M]=l.useState({}),{loading:z,error:R,value:x}=ie.useAsync(()=>U.getPages({mode:j}),[j]);if(R)throw R;const T=l.useMemo(()=>r.routeIds||[],[r]),I=l.useMemo(()=>(x==null?void 0:x.pageIds)||[],[x]),D=l.useMemo(()=>!T||!r.routes?[]:JSON.parse(JSON.stringify(T)).sort((o,i)=>{var h,m;const n=(h=r.routes)==null?void 0:h[o],a=(m=r.routes)==null?void 0:m[i];return n!=null&&n.publishedAt&&new Date(n.publishedAt).getTime()<new Date(n.updatedAt).getTime()?-1:a!=null&&a.publishedAt&&new Date(a.publishedAt).getTime()<new Date(a.updatedAt).getTime()?1:new Date((n==null?void 0:n.updatedAt)??"").getTime()-new Date((a==null?void 0:a.updatedAt)??"").getTime()}),[r,T]),q=l.useMemo(()=>{if(!D)return[];if(!c)return D;const t=[...D].filter(o=>!c[o]);return Object.values(c).forEach(o=>{o.forEach(i=>{t.push(`${i.originalRouteId}-${i.paramOptionIds.join("-")}`)})}),t},[D,c]),L=l.useMemo(()=>!x||!I||!q?[]:H.default(I,q),[q,x,I]),C=l.useMemo(()=>T?[...T].concat(L):L,[T,L]),_=l.useCallback(()=>{const t={};D==null||D.forEach(o=>{var n;const i=(n=r.routes)==null?void 0:n[o];if(i&&i.params&&i.params.length>0&&i.paramsOptions&&i.paramsOptions.length>0){const a=te.generateParamCombinations({basePath:i.path,params:i.params,routeId:i.id,paramsOptions:i.paramsOptions,currentIndex:0,currentParams:[],currentOptionIds:[],result:[]});a.length>0&&(t[i.id]=a)}}),O(t)},[D,r.routes]);l.useEffect(()=>{_()},[_]),l.useEffect(()=>{M(t=>{const o={...t};return Object.keys(c).forEach(i=>{var n;c[i]&&((n=c[i])==null?void 0:n.length)>0&&o[i]===void 0&&(o[i]=!0)}),o})},[c]);const K=l.useRef(!0);l.useEffect(()=>{y(t=>{const o={...t};return Object.keys(c).length===0||(Object.keys(c).forEach(i=>{const n=c[i]||[],a=d||!!f[i];n.forEach(h=>{const m=`${i}-${h.paramOptionIds.join("-")}`;K.current?o[m]=a||t[m]||!1:o[m]=a})}),K.current=!1),o})},[f,c,d]);const Q=(t,o)=>{o.stopPropagation(),M(i=>{const n={...i};return n[t]=!n[t],n})},N=l.useCallback(t=>{g(o=>{const i=se.produce(o,n=>{d?(Object.assign(n,Object.fromEntries(C.map(a=>[a,!0]))),delete n[t]):n[t]?(delete n[t],L.includes(t)&&(T||[]).filter(a=>{var h,m;return((h=r.pages[a])==null?void 0:h.slug)===((m=x==null?void 0:x.pages[t])==null?void 0:m.slug)}).forEach(a=>{delete n[a]})):(n[t]=!0,T&&T.includes(t)&&L.filter(a=>{var h,m;return((h=x==null?void 0:x.pages[a])==null?void 0:h.slug)===((m=r.pages[t])==null?void 0:m.slug)}).forEach(a=>{n[a]=!0}))});return S(H.default(C,Object.keys(i)).length===0),i})},[d,C,L,r,x,T]),X=l.useCallback((t,o)=>{const i=`${t}-${o.paramOptionIds.join("-")}`;y(n=>{var m;const a={...n};a[i]=!a[i];const h=((m=c[t])==null?void 0:m.every(B=>a[`${t}-${B.paramOptionIds.join("-")}`]))??!1;return g(B=>{if(h&&!B[t])return{...B,[t]:!0};if(!h&&B[t]){const v={...B};return delete v[t],v}return B}),a})},[c]),Y=l.useCallback(()=>{S(t=>(t&&g({}),!t))},[]);return l.useEffect(()=>{const t=d?C:Object.keys(f),o=Object.entries(w).filter(([,n])=>n).map(([n])=>n).filter(n=>n!==void 0),i=Array.from(new Set([...t,...o]));k(d?null:i)},[d,f,w,C,k]),z?e.jsx(re.Loading,{sx:{my:4}}):e.jsxs(s.List,{disablePadding:!0,sx:{maxWidth:700},children:[e.jsx(s.ListItem,{sx:{position:"sticky",top:0,bgcolor:"background.paper",zIndex:1},disablePadding:!0,children:e.jsxs(s.ListItemButton,{onClick:Y,dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:d,tabIndex:-1})}),e.jsx(s.ListItemText,{primary:p("common.all")})]})}),D.map(t=>{var B,v;const o=(B=r.routes)==null?void 0:B[t];if(!o)return null;const i=!1,n=c&&c[t]&&((v=c[t])==null?void 0:v.length)>0,a=A[t]!==!1,h=c[t]||[],m=!o.publishedAt||o.updatedAt&&new Date(o.updatedAt).getTime()>new Date(o.publishedAt).getTime();return e.jsxs(s.Box,{children:[e.jsx(s.ListItem,{sx:{pr:4},disablePadding:!0,secondaryAction:e.jsxs(s.Box,{sx:{display:"flex",alignItems:"center"},children:[m&&e.jsx(s.Tooltip,{title:p("maker.pages.needPublish"),children:e.jsx(P.Sync,{fontSize:"small",sx:{color:"warning.main",fontSize:16,mr:.35}})}),!o.isPublic&&e.jsx(s.Tooltip,{title:p("maker.pages.notPublic"),children:e.jsx(P.VisibilityOff,{fontSize:"small",sx:{color:"warning.main",fontSize:16,mr:.35}})}),i,n&&e.jsx(s.Box,{onClick:E=>Q(t,E),sx:{display:"inline-flex",alignItems:"center",mr:.35,cursor:"pointer",color:"info.main"},children:a?e.jsx(P.KeyboardArrowDown,{fontSize:"small",sx:{fontSize:"18px"}}):e.jsx(P.KeyboardArrowRight,{fontSize:"small",sx:{fontSize:"18px"}})})]}),children:e.jsxs(s.ListItemButton,{onClick:()=>N(t),dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:d||!!f[t],tabIndex:-1})}),e.jsx(s.ListItemText,{primary:o.path,primaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"},secondaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"}})]})}),n&&e.jsx(s.Collapse,{in:a,children:e.jsx(s.Box,{children:h.map(E=>{const V=`${t}-${E.paramOptionIds.join("-")}`,Z=w[V]||!1;return e.jsx(ue,{routePathInfo:E,checked:d||Z,onClick:()=>X(t,E),route:o},V)})})})]},t)}),L.map(t=>{var i,n;const o=x==null?void 0:x.pages[t];return o?e.jsx(s.ListItem,{disablePadding:!0,secondaryAction:e.jsx(s.Chip,{color:"warning",label:"deleted",size:"small"}),children:e.jsxs(s.ListItemButton,{onClick:()=>N(t),dense:!0,children:[e.jsx(s.ListItemIcon,{children:e.jsx(s.Checkbox,{edge:"start",checked:d||!!f[t],tabIndex:-1})}),e.jsx(s.ListItemText,{primary:o.slug,secondary:(n=(i=o.locales)==null?void 0:i[b])==null?void 0:n.title,primaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"},secondaryTypographyProps:{noWrap:!0,textOverflow:"ellipsis"}})]})},t):null})]})}exports.default=ce;
package/lib/cjs/home.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react/jsx-runtime");require("./chunks/state-D4MG-uJB.js");require("@arcblock/ux/lib/Locale/context");require("@arcblock/ux/lib/Result");require("@blocklet/pages-kit/builtin/page/header");require("@blocklet/pages-kit/contexts/color");require("@blocklet/pages-kit/utils/data-source");require("@blocklet/pages-kit/utils/route");require("@blocklet/ui-react/lib/Header");require("@emotion/css");require("@emotion/react");require("@emotion/styled");require("@mui/material");require("ahooks");require("isomorphic-dompurify");require("lodash/cloneDeep");require("lodash/isEmpty");require("lodash/isEqual");require("react");require("react-helmet");require("react-router-dom");require("react-use");require("ufo");require("./chunks/array-DOh_uyzM.js");const e=require("./chunks/home-4CkDQ2Eu.js");require("./chunks/session-BA7Qrcia.js");exports.HomeView=e.HomeView;exports.PageRoutes=e.PageRoutes;exports.PageView=e.PageView;exports.PageViewByPath=e.PageViewByPath;exports.PageViewWithDataSource=e.PageViewWithDataSource;exports.TranslucentHeader=e.TranslucentHeader;exports.default=e.Home;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require("react/jsx-runtime");require("./chunks/state-D4MG-uJB.js");require("@arcblock/ux/lib/Locale/context");require("@arcblock/ux/lib/Result");require("@blocklet/pages-kit/builtin/page/header");require("@blocklet/pages-kit/contexts/color");require("@blocklet/pages-kit/utils/data-source");require("@blocklet/pages-kit/utils/route");require("@blocklet/ui-react/lib/Header");require("@emotion/css");require("@emotion/react");require("@emotion/styled");require("@mui/material");require("ahooks");require("isomorphic-dompurify");require("lodash/cloneDeep");require("lodash/isEmpty");require("lodash/isEqual");require("react");require("react-helmet");require("react-router-dom");require("react-use");require("ufo");require("./chunks/array-BChVGKFh.js");const e=require("./chunks/home-BkGblT4S.js");require("./chunks/session-BA7Qrcia.js");exports.HomeView=e.HomeView;exports.PageRoutes=e.PageRoutes;exports.PageView=e.PageView;exports.PageViewByPath=e.PageViewByPath;exports.PageViewWithDataSource=e.PageViewWithDataSource;exports.TranslucentHeader=e.TranslucentHeader;exports.default=e.Home;
@@ -7,7 +7,7 @@ import oC from "@mui/icons-material/Check";
7
7
  import { Box as D, styled as lI, InputLabel as EI, TextField as h, IconButton as G, Autocomplete as tI, FormControl as wC, Select as sC, MenuItem as Q, ListItemText as nI, Typography as k, OutlinedInput as MC, useTheme as LC, CircularProgress as gI, InputAdornment as jC, Button as X, Grid as V, Stack as uI, Input as XI, CssBaseline as JC, Menu as OC, Dialog as wI, DialogTitle as sI, DialogContent as MI, DialogActions as LI, Tabs as mC, Tab as SC, Card as BC, CardMedia as yC, CardContent as DC, Skeleton as eC } from "@mui/material";
8
8
  import { useRequest as bC, useReactive as v, useUpdate as WI, useThrottleFn as TI, useGetState as NC, useAsyncEffect as YI, useBoolean as xI } from "ahooks";
9
9
  import rI, { useState as c, useEffect as t, useMemo as E, createContext as jI, useContext as KC, useRef as Z, useCallback as T, createElement as dC, forwardRef as JI, useImperativeHandle as OI } from "react";
10
- import { I as zC, n as DI, A as cC, b as FC, T as aC, c as HC, B as lC } from "./chunks/array-CO3-y-Ol.js";
10
+ import { I as zC, n as DI, A as cC, b as FC, T as aC, c as HC, B as lC } from "./chunks/array-DcMaqKTM.js";
11
11
  import { styled as AI } from "@arcblock/ux/lib/Theme";
12
12
  import "@blocklet/pages-kit/builtin/color-picker";
13
13
  import "@blocklet/pages-kit/utils/style";
@@ -1,7 +1,7 @@
1
1
  import { jsx as i, jsxs as w, Fragment as J } from "react/jsx-runtime";
2
2
  import "@mui/icons-material";
3
- import { Box as y, styled as Tt, Typography as C, Container as Et, Stack as Ot, useTheme as At, createTheme as Ft, ThemeProvider as Ut, Card as Vt, CircularProgress as Dt, Grid as st, CardMedia as Ht, CardContent as Yt } from "@mui/material";
4
- import Jt, { createContext as xt, useMemo as W, useCallback as M, useContext as yt, Fragment as Mt, isValidElement as bt, useState as K, useEffect as E, useRef as tt } from "react";
3
+ import { Box as y, styled as Et, Typography as C, Container as Ot, Stack as At, useTheme as xt, createTheme as Ft, ThemeProvider as Ut, Card as Vt, CircularProgress as Dt, Grid as st, CardMedia as Ht, CardContent as Yt } from "@mui/material";
4
+ import Jt, { createContext as yt, useMemo as W, useCallback as M, useContext as bt, Fragment as Mt, isValidElement as wt, useState as K, useEffect as E, useRef as tt } from "react";
5
5
  import G from "lodash/keyBy";
6
6
  import { e as j, g as N, E as Kt, h as et, l as ot } from "./state-BcZbsEn6.js";
7
7
  import { AIForm as lt, AIFormResult as ct } from "@blocklet/ai-runtime/components";
@@ -9,17 +9,17 @@ import { deepmerge as Gt } from "@mui/utils";
9
9
  import rt from "lodash/pick";
10
10
  import { ErrorBoundary as Xt } from "react-error-boundary";
11
11
  import qt from "@blocklet/pages-kit/builtin/markdown/markdown-renderer";
12
- import { useColorConvert as wt } from "@blocklet/pages-kit/contexts/color";
12
+ import { useColorConvert as vt } from "@blocklet/pages-kit/contexts/color";
13
13
  import { cx as g, css as q } from "@emotion/css";
14
14
  import { materialDark as Qt } from "react-syntax-highlighter/dist/esm/styles/prism";
15
- import { useTheme as vt, styled as _ } from "@arcblock/ux/lib/Theme";
15
+ import { useTheme as kt, styled as _ } from "@arcblock/ux/lib/Theme";
16
16
  import Zt from "@arcblock/react-hooks/lib/useBrowser";
17
17
  import dt from "@arcblock/ux/lib/Colors";
18
- import { ResponsiveImage as kt, CustomComponentRenderer as te } from "@blocklet/pages-kit/components";
18
+ import { ResponsiveImage as _t, CustomComponentRenderer as te } from "@blocklet/pages-kit/components";
19
19
  import { isGradient as ee, isColorString as oe } from "@blocklet/pages-kit/utils/style";
20
- import _t from "@mui/material/useMediaQuery";
20
+ import $t from "@mui/material/useMediaQuery";
21
21
  import S from "lodash/omit";
22
- import { Icon as $t } from "@iconify-icon/react";
22
+ import { Icon as Nt } from "@iconify-icon/react";
23
23
  import re from "@arcblock/ux/lib/Screenshot";
24
24
  import { Link as ne, NavLink as ie, useNavigate as ae } from "react-router-dom";
25
25
  import se from "@arcblock/ux/lib/Button";
@@ -32,7 +32,7 @@ import pe from "lodash/isEqual";
32
32
  import { EmbedIframe as ue } from "@blocklet/embed/react";
33
33
  import { TwitterTimelineEmbed as he } from "react-twitter-embed";
34
34
  import { useUpdate as fe, useMount as ge } from "react-use";
35
- const Nt = "{{CUSTOM_VALUE}}", xe = [
35
+ const St = "{{CUSTOM_VALUE}}", xe = [
36
36
  {
37
37
  title: "None",
38
38
  value: "none",
@@ -132,7 +132,7 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
132
132
  title: "Custom",
133
133
  value: "custom",
134
134
  sx: {
135
- maxWidth: Nt,
135
+ maxWidth: St,
136
136
  width: "100%",
137
137
  mx: "auto"
138
138
  }
@@ -143,7 +143,7 @@ const Nt = "{{CUSTOM_VALUE}}", xe = [
143
143
  ["paddingY", ke],
144
144
  ["paddingX", _e]
145
145
  ]);
146
- function St(t) {
146
+ function Ct(t) {
147
147
  var l;
148
148
  const { type: e, value: n, format: r = "sx", defaultValue: o = null } = t, a = Ne.get(e);
149
149
  if (!a)
@@ -154,7 +154,7 @@ function St(t) {
154
154
  if (d) {
155
155
  const m = n.replace("custom:", "");
156
156
  try {
157
- return JSON.parse(JSON.stringify(c || {}).replaceAll(Nt, m));
157
+ return JSON.parse(JSON.stringify(c || {}).replaceAll(St, m));
158
158
  } catch {
159
159
  }
160
160
  }
@@ -162,13 +162,13 @@ function St(t) {
162
162
  }
163
163
  return o;
164
164
  }
165
- const Ct = xt({
165
+ const Pt = yt({
166
166
  page: null,
167
167
  getPageMeta: () => ({}),
168
168
  getPageMetaStyle: () => ({})
169
169
  });
170
170
  function Se() {
171
- return yt(Ct);
171
+ return bt(Pt);
172
172
  }
173
173
  function lr({
174
174
  page: t,
@@ -188,7 +188,7 @@ function lr({
188
188
  if (!u) return p;
189
189
  const f = `${h}Custom`;
190
190
  c.style[f];
191
- const b = St({
191
+ const b = Ct({
192
192
  type: h,
193
193
  value: u,
194
194
  format: l
@@ -205,7 +205,7 @@ function lr({
205
205
  }),
206
206
  [o, a, d]
207
207
  );
208
- return /* @__PURE__ */ i(Ct.Provider, { value: s, children: e });
208
+ return /* @__PURE__ */ i(Pt.Provider, { value: s, children: e });
209
209
  }
210
210
  function z({ actions: t, center: e, className: n, align: r }) {
211
211
  return t && (t != null && t.length) ? /* @__PURE__ */ i(
@@ -224,7 +224,7 @@ function z({ actions: t, center: e, className: n, align: r }) {
224
224
  }
225
225
  ) : null;
226
226
  }
227
- const Ce = "section", Pe = Tt(y)`
227
+ const Ce = "section", Pe = Et(y)`
228
228
  overflow: hidden;
229
229
 
230
230
  .section__title {
@@ -305,7 +305,7 @@ function O({
305
305
  descriptionAppearance: f,
306
306
  ...b
307
307
  }) {
308
- const x = wt();
308
+ const x = vt();
309
309
  if (!t && !e && !r && !m && !c && !d && !s && !h) return null;
310
310
  const k = Math.max(Math.min(5, l + 1), 1), v = {
311
311
  1: "xl:!text-3xl lg:!text-2xl md:!text-xl",
@@ -396,10 +396,10 @@ const A = [
396
396
  "titleAppearance",
397
397
  "descriptionAppearance"
398
398
  ];
399
- function Pt(t) {
399
+ function Bt(t) {
400
400
  if (t.type === Mt) {
401
- const n = (t.props.children || []).filter((r) => bt(r));
402
- return n.length === 1 ? Pt(n[0]) : n.length > 1;
401
+ const n = (t.props.children || []).filter((r) => wt(r));
402
+ return n.length === 1 ? Bt(n[0]) : n.length > 1;
403
403
  }
404
404
  return Array.isArray(t);
405
405
  }
@@ -413,7 +413,7 @@ function nt({ children: t, col: e, gap: n, className: r, align: o, sx: a, type:
413
413
  align: "center",
414
414
  type: "default"
415
415
  }) {
416
- const l = vt(), c = Number(Math.floor(100 / e * 100) / 100), m = {
416
+ const l = kt(), c = Number(Math.floor(100 / e * 100) / 100), m = {
417
417
  center: "justify-center items-center",
418
418
  left: "justify-start items-center",
419
419
  right: "justify-end items-center",
@@ -431,7 +431,7 @@ function nt({ children: t, col: e, gap: n, className: r, align: o, sx: a, type:
431
431
  5: 3,
432
432
  6: 3
433
433
  }[e] || 0);
434
- Pt(t) || (u = 0);
434
+ Bt(t) || (u = 0);
435
435
  const b = (e - 1) * u / e;
436
436
  let x = { ...a, gap: `${u}rem` };
437
437
  const k = { [P]: { width: "100%" } }, v = {}, I = {}, R = {};
@@ -517,7 +517,7 @@ function mt(t, e, n, r, o) {
517
517
  },
518
518
  s
519
519
  ) : a = /* @__PURE__ */ i(
520
- kt,
520
+ _t,
521
521
  {
522
522
  src: L(s) && r ? c : s,
523
523
  sizesAttr: {
@@ -546,7 +546,7 @@ function mt(t, e, n, r, o) {
546
546
  return a;
547
547
  }
548
548
  function ze({ autoWidth: t, children: e, ...n }) {
549
- return t ? /* @__PURE__ */ i(y, { display: "flex", ...n, children: e }) : /* @__PURE__ */ i(Et, { ...n, children: e });
549
+ return t ? /* @__PURE__ */ i(y, { display: "flex", ...n, children: e }) : /* @__PURE__ */ i(Ot, { ...n, children: e });
550
550
  }
551
551
  function F({
552
552
  dark: t = !1,
@@ -559,7 +559,7 @@ function F({
559
559
  type: s,
560
560
  ...l
561
561
  }) {
562
- const c = { ...r }, m = _t((u) => u.breakpoints.down("md"));
562
+ const c = { ...r }, m = $t((u) => u.breakpoints.down("md"));
563
563
  t && (c.color = dt.common.white, c.backgroundColor = `${dt.grey[900]} !important`), o.show && (c.display = "flex");
564
564
  const p = W(() => !Number(l.boxMaxWidth) || m ? {
565
565
  width: "100%"
@@ -568,7 +568,7 @@ function F({
568
568
  width: "100%"
569
569
  } : {
570
570
  width: "100%"
571
- }, [l.boxMaxWidth, m, s]), h = St({
571
+ }, [l.boxMaxWidth, m, s]), h = Ct({
572
572
  type: "baseSectionPaddingY",
573
573
  value: a || "normal",
574
574
  // section default is normal
@@ -593,11 +593,11 @@ function F({
593
593
  "titleAppearance",
594
594
  "descriptionAppearance"
595
595
  ),
596
- children: /* @__PURE__ */ i(ze, { autoWidth: l == null ? void 0 : l.autoWidth, className: g("section-content h-full"), sx: p, children: o.show ? /* @__PURE__ */ i(Bt, { ...d, boxed: o, children: e }) : e })
596
+ children: /* @__PURE__ */ i(ze, { autoWidth: l == null ? void 0 : l.autoWidth, className: g("section-content h-full"), sx: p, children: o.show ? /* @__PURE__ */ i(It, { ...d, boxed: o, children: e }) : e })
597
597
  }
598
598
  );
599
599
  }
600
- function Bt({
600
+ function It({
601
601
  background: t = "",
602
602
  backgroundVideoPoster: e,
603
603
  children: n,
@@ -607,9 +607,9 @@ function Bt({
607
607
  styles: d = {},
608
608
  ...s
609
609
  }) {
610
- const l = { ...d, ...r }, c = wt();
610
+ const l = { ...d, ...r }, c = vt();
611
611
  let m = null;
612
- const p = _t((f) => f.breakpoints.up("sm")), h = Zt(), u = Re();
612
+ const p = $t((f) => f.breakpoints.up("sm")), h = Zt(), u = Re();
613
613
  return t && (m = mt(
614
614
  h,
615
615
  typeof t == "string" ? c(t) : t,
@@ -638,7 +638,7 @@ function Bt({
638
638
  }
639
639
  );
640
640
  }
641
- const Le = _(Bt)`
641
+ const Le = _(It)`
642
642
  &:nth-of-type(even) {
643
643
  background: #f8f8f8;
644
644
  }
@@ -655,14 +655,14 @@ const Le = _(Bt)`
655
655
  }
656
656
  }
657
657
  `;
658
- function It({ icon: t, ...e }) {
659
- return /* @__PURE__ */ i($t, { icon: t, ...e, ref: null });
658
+ function Wt({ icon: t, ...e }) {
659
+ return /* @__PURE__ */ i(Nt, { icon: t, ...e, ref: null });
660
660
  }
661
661
  function $(t, e) {
662
662
  const n = rt(t, e), r = S(t, e);
663
663
  return [n, r];
664
664
  }
665
- const Wt = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
665
+ const jt = ["title", "description", "actions", "badge", "tag", "prepend", "append", "logo"];
666
666
  function Te({
667
667
  image: t,
668
668
  imageBorder: e,
@@ -672,7 +672,7 @@ function Te({
672
672
  fullSizeImage: a,
673
673
  ...d
674
674
  }) {
675
- const [s, l] = $(d, A), c = Object.keys(s).length > 0 && Object.values(rt(s, Wt)).filter(Boolean).length > 0 && /* @__PURE__ */ i(O, { ...s }), m = bt(t) ? t : /* @__PURE__ */ i(y, { component: "img", src: t, alt: "", className: "block" }), p = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ i(
675
+ const [s, l] = $(d, A), c = Object.keys(s).length > 0 && Object.values(rt(s, jt)).filter(Boolean).length > 0 && /* @__PURE__ */ i(O, { ...s }), m = wt(t) ? t : /* @__PURE__ */ i(y, { component: "img", src: t, alt: "", className: "block" }), p = ["phone", "macbook"].includes(e), h = t && /* @__PURE__ */ i(
676
676
  y,
677
677
  {
678
678
  className: g(
@@ -763,7 +763,7 @@ function Ae({
763
763
  }) {
764
764
  const [{ editing: h }, u] = $(p, U), [f, b] = $(u, A), x = n && r ? { projectId: n, gitRef: "main", assistantId: r, working: !0 } : void 0, k = {
765
765
  children: a,
766
- endIcon: d ? /* @__PURE__ */ i(It, { icon: d }) : void 0,
766
+ endIcon: d ? /* @__PURE__ */ i(Wt, { icon: d }) : void 0,
767
767
  sx: {
768
768
  background: s || void 0,
769
769
  ":hover": {
@@ -772,7 +772,7 @@ function Ae({
772
772
  }
773
773
  }
774
774
  }, v = [], I = l && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: l }), R = c && /* @__PURE__ */ i(C, { variant: "caption", color: "text.disabled", children: c });
775
- Object.keys(f).length > 0 && Object.values(rt(f, Wt)).filter(Boolean).length > 0 && v.push(/* @__PURE__ */ i(O, { ...f }, "base-info")), x && (t === "form" ? v.push(/* @__PURE__ */ i(lt, { identifier: x, SubmitProps: k }, "form")) : t === "result" ? v.push(
775
+ Object.keys(f).length > 0 && Object.values(rt(f, jt)).filter(Boolean).length > 0 && v.push(/* @__PURE__ */ i(O, { ...f }, "base-info")), x && (t === "form" ? v.push(/* @__PURE__ */ i(lt, { identifier: x, SubmitProps: k }, "form")) : t === "result" ? v.push(
776
776
  /* @__PURE__ */ i(
777
777
  ct,
778
778
  {
@@ -783,7 +783,7 @@ function Ae({
783
783
  "result"
784
784
  )
785
785
  ) : v.push(
786
- /* @__PURE__ */ w(Ot, { width: "100%", gap: 2, direction: "row", children: [
786
+ /* @__PURE__ */ w(At, { width: "100%", gap: 2, direction: "row", children: [
787
787
  /* @__PURE__ */ i(lt, { identifier: x, BoxProps: { flex: 1 }, SubmitProps: k }),
788
788
  /* @__PURE__ */ i(
789
789
  ct,
@@ -796,21 +796,21 @@ function Ae({
796
796
  )
797
797
  ] }, "form-result")
798
798
  )), e && v.reverse();
799
- const at = At(), Lt = W(
799
+ const at = xt(), Tt = W(
800
800
  () => Ft(Gt(at, { palette: { primary: s ? { main: s } : void 0 } })),
801
801
  [s, at]
802
802
  );
803
- return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Ut, { theme: Lt, children: /* @__PURE__ */ i(F, { ...b, sx: h ? { pointerEvents: "none" } : {}, children: /* @__PURE__ */ i(nt, { col: v.length, children: v }) }) }) });
803
+ return /* @__PURE__ */ i(Xt, { fallbackRender: Kt, children: /* @__PURE__ */ i(Ut, { theme: Tt, children: /* @__PURE__ */ i(F, { ...b, sx: h ? { pointerEvents: "none" } : {}, children: /* @__PURE__ */ i(nt, { col: v.length, children: v }) }) }) });
804
804
  }
805
- const jt = xt({
805
+ const Rt = yt({
806
806
  pages: [],
807
807
  project: void 0
808
- }), { Provider: cr, Consumer: dr } = jt;
809
- function Rt() {
810
- return yt(jt);
808
+ }), { Provider: cr, Consumer: dr } = Rt;
809
+ function zt() {
810
+ return bt(Rt);
811
811
  }
812
812
  function Fe({ icon: t, className: e = "", size: n = "1rem", ...r }) {
813
- return /* @__PURE__ */ i(Ue, { component: It, className: g("css-icon", e), size: n, ...r, icon: t });
813
+ return /* @__PURE__ */ i(Ue, { component: Wt, className: g("css-icon", e), size: n, ...r, icon: t });
814
814
  }
815
815
  const Ue = _(y)`
816
816
  &.css-icon {
@@ -820,7 +820,7 @@ const Ue = _(y)`
820
820
  }
821
821
  `;
822
822
  function Ve({ icon: t, className: e = "", size: n = "1rem", imageMeta: r, ...o }) {
823
- const a = j(N(t), 540), [d, s] = K(!1), l = vt();
823
+ const a = j(N(t), 540), [d, s] = K(!1), l = kt();
824
824
  return d ? /* @__PURE__ */ i(Fe, { icon: "i-mdi:image", color: l.palette.grey[500], size: n, className: e, ...o }) : /* @__PURE__ */ i(De, { className: g("image-icon", e), size: n, ...o, children: /* @__PURE__ */ i(
825
825
  "img",
826
826
  {
@@ -846,7 +846,7 @@ const De = _(y)`
846
846
  `, it = (t) => typeof t == "string" && /^[\w-_]+:[\w-_]+$/.test(t);
847
847
  function Z({ icon: t, size: e = "1rem", imageMeta: n, ...r }) {
848
848
  const o = window.isNaN(e) ? e : `${e}px`;
849
- return it(t) ? /* @__PURE__ */ i($t, { icon: t }) : /* @__PURE__ */ i(He, { component: Ve, imageMeta: n, className: "base-icon", icon: t, size: o, ...r });
849
+ return it(t) ? /* @__PURE__ */ i(Nt, { icon: t }) : /* @__PURE__ */ i(He, { component: Ve, imageMeta: n, className: "base-icon", icon: t, size: o, ...r });
850
850
  }
851
851
  const He = _(y)`
852
852
  flex-shrink: 0;
@@ -855,8 +855,8 @@ function T({ text: t, children: e, icon: n = "", endIcon: r, color: o = "primary
855
855
  const l = n ? /* @__PURE__ */ i(Z, { icon: n }) : null, c = r ? /* @__PURE__ */ i(Z, { icon: r }) : null, m = a || d, p = { ...s };
856
856
  return m && (p.href = m, Q(m) && (p.target = p.target || "_blank")), /* @__PURE__ */ i(se, { startIcon: l, endIcon: c, color: o, ...p, children: t || e });
857
857
  }
858
- function zt({ editing: t, text: e, ...n }) {
859
- const { pages: r = [] } = Rt(), o = r.find((a) => a.id === (n.link || n.linkId));
858
+ function Lt({ editing: t, text: e, ...n }) {
859
+ const { pages: r = [] } = zt(), o = r.find((a) => a.id === (n.link || n.linkId));
860
860
  if (t)
861
861
  return /* @__PURE__ */ i(T, { ...S(n, ["link", "linkId"]), children: e });
862
862
  if (o) {
@@ -944,21 +944,20 @@ function V({
944
944
  ...d
945
945
  }) {
946
946
  let s = {};
947
- const { pages: l = [] } = Rt(), c = l.find((h) => h.id === d.link), m = !n || Jt.Children.toArray(n).every((h) => h === null);
948
- return d.link && (s = {
947
+ const { pages: l = [] } = zt(), c = l.find((h) => h.id === d.link), m = !n || Jt.Children.toArray(n).every((h) => h === null);
948
+ d.link && (s = {
949
949
  component: Ye,
950
950
  to: (c == null ? void 0 : c.path) || d.link,
951
951
  useRouterLink: !0
952
- }), /* @__PURE__ */ w(
952
+ });
953
+ const p = xt();
954
+ return /* @__PURE__ */ w(
953
955
  Je,
954
956
  {
955
- className: g(
956
- "base-card card",
957
- { "border-gray-200": a },
958
- { "dark:border-gray-500": o && a },
959
- { dark: o, "border-transparent": !a },
960
- r
961
- ),
957
+ className: g("base-card card", { dark: o, "border-transparent": !a }, r),
958
+ sx: {
959
+ borderColor: p.palette.divider
960
+ },
962
961
  ...s,
963
962
  ...S(d, ["listType", "dark", "iconColor", "link", "hoverStyle", "imageSize"]),
964
963
  children: [
@@ -1609,7 +1608,7 @@ function lo({ section: t, ...e }) {
1609
1608
  return {
1610
1609
  ...S(d, "icon", "iconColor"),
1611
1610
  image: ["news", "simple", "default"].includes(r.type) && d.icon ? d.icon : d.image,
1612
- actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(zt, { ...c, editing: n }, c.id)),
1611
+ actions: (l = (s = d.actions) == null ? void 0 : s.map) == null ? void 0 : l.call(s, (c) => /* @__PURE__ */ i(Lt, { ...c, editing: n }, c.id)),
1613
1612
  border: r.listBorder,
1614
1613
  iconSize: r.iconSize,
1615
1614
  imageSize: r.imageSize,
@@ -1797,7 +1796,7 @@ function ko({
1797
1796
  let p = _o(m.image, r, e, o, a, d);
1798
1797
  t || (p = null);
1799
1798
  let h = null;
1800
- return m.actions && (h = (f = (u = m.actions) == null ? void 0 : u.map) == null ? void 0 : f.call(u, (b, x) => /* @__PURE__ */ i(zt, { ...b, editing: c }, x))), /* @__PURE__ */ i(
1799
+ return m.actions && (h = (f = (u = m.actions) == null ? void 0 : u.map) == null ? void 0 : f.call(u, (b, x) => /* @__PURE__ */ i(Lt, { ...b, editing: c }, x))), /* @__PURE__ */ i(
1801
1800
  vo,
1802
1801
  {
1803
1802
  ...m,
@@ -1841,7 +1840,7 @@ function _o(t, e, n, r, o, a) {
1841
1840
  );
1842
1841
  const m = o === "quality" ? 1 : 0.6;
1843
1842
  return /* @__PURE__ */ i(
1844
- kt,
1843
+ _t,
1845
1844
  {
1846
1845
  src: N(t),
1847
1846
  sizesAttr: {
@@ -1979,9 +1978,9 @@ function yr(t) {
1979
1978
  return t != null;
1980
1979
  }
1981
1980
  export {
1982
- zt as A,
1981
+ Lt as A,
1983
1982
  xr as B,
1984
- It as I,
1983
+ Wt as I,
1985
1984
  cr as P,
1986
1985
  ur as S,
1987
1986
  gr as T,
@@ -21,7 +21,7 @@ import { Helmet as Re } from "react-helmet";
21
21
  import { useSearchParams as se, Routes as Ee, Route as I, Navigate as Te, ScrollRestoration as Me } from "react-router-dom";
22
22
  import { useAsync as ie } from "react-use";
23
23
  import { joinURL as j } from "ufo";
24
- import { S as Be, n as Oe, P as Fe, a as Le, B as _e, g as De } from "./array-CO3-y-Ol.js";
24
+ import { S as Be, n as Oe, P as Fe, a as Le, B as _e, g as De } from "./array-DcMaqKTM.js";
25
25
  import { styled as le, useTheme as Ne } from "@arcblock/ux/lib/Theme";
26
26
  import $e from "@blocklet/ui-react/lib/Footer";
27
27
  import "webfontloader";
@@ -420,7 +420,7 @@ function A({
420
420
  !((M = s.footer) != null && M.hidden) && /* @__PURE__ */ e(Ve, {})
421
421
  ] });
422
422
  }
423
- const Je = re(() => import("./publish-button-BZZOvMB8.js")), ce = ee(ye)`
423
+ const Je = re(() => import("./publish-button-BxpOFbAK.js")), ce = ee(ye)`
424
424
  &.sticky {
425
425
  position: sticky;
426
426
  top: 0;
@@ -10,8 +10,8 @@ import { produce as Oe } from "immer";
10
10
  import ee from "lodash/difference";
11
11
  import { useState as T, useMemo as R, useCallback as j, forwardRef as Te, useImperativeHandle as je, useEffect as W, useRef as ve } from "react";
12
12
  import { useAsync as Re } from "react-use";
13
- import { L as Ee } from "./home-ngRf6bmH.js";
14
- import { p as ze, g as Be } from "./array-CO3-y-Ol.js";
13
+ import { L as Ee } from "./home-CYM8qSuo.js";
14
+ import { p as ze, g as Be } from "./array-DcMaqKTM.js";
15
15
  function Le(s) {
16
16
  const [y, w] = T(!1);
17
17
  return /* @__PURE__ */ t(
package/lib/es/home.js CHANGED
@@ -21,8 +21,8 @@ import "react-helmet";
21
21
  import "react-router-dom";
22
22
  import "react-use";
23
23
  import "ufo";
24
- import "./chunks/array-CO3-y-Ol.js";
25
- import { a as R, P as S, d as W, c as j, b as k, T as q, H as v } from "./chunks/home-ngRf6bmH.js";
24
+ import "./chunks/array-DcMaqKTM.js";
25
+ import { a as R, P as S, d as W, c as j, b as k, T as q, H as v } from "./chunks/home-CYM8qSuo.js";
26
26
  import "./chunks/session-CVblGhSp.js";
27
27
  export {
28
28
  R as HomeView,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/pages-kit-inner-components",
3
- "version": "0.5.15",
3
+ "version": "0.5.17",
4
4
  "description": "Pages Kit inner components library",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -205,8 +205,8 @@
205
205
  "yaml": "^2.5.0",
206
206
  "yjs": "^13.6.18",
207
207
  "zustand": "^4.5.5",
208
- "@blocklet/pages-kit": "^0.5.15",
209
- "@blocklet/pages-kit-block-studio": "^0.5.15"
208
+ "@blocklet/pages-kit": "^0.5.17",
209
+ "@blocklet/pages-kit-block-studio": "^0.5.17"
210
210
  },
211
211
  "devDependencies": {
212
212
  "@trivago/prettier-plugin-sort-imports": "^5.2.1",