@blocklet/pages-kit-inner-components 0.6.22 → 0.6.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/add-component.js +2 -2
- package/lib/cjs/chunks/{home-CmcR9R89.js → home-BUhkvEa6.js} +2 -2
- package/lib/cjs/chunks/index-BIQBchDT.js +475 -0
- package/lib/cjs/chunks/{publish-button-CuIP1HAR.js → publish-button-BAFrnjhg.js} +1 -1
- package/lib/cjs/home.js +1 -1
- package/lib/es/add-component.js +2 -2
- package/lib/es/chunks/{home-pT8D7Ttx.js → home-8eDa8KD4.js} +2 -2
- package/lib/es/chunks/{index-BHQcp5eX.js → index-MrU6URFS.js} +832 -799
- package/lib/es/chunks/{publish-button-CIVPDQb7.js → publish-button-CaPZ_kmc.js} +2 -2
- package/lib/es/home.js +2 -2
- package/package.json +8 -8
- package/lib/cjs/chunks/index-7_tPWvdE.js +0 -475
package/lib/cjs/add-component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),v=require("./chunks/state-tEydRMV8.js"),Y=require("@arcblock/ux/lib/Empty"),N=require("@arcblock/ux/lib/Locale/context"),O=require("@iconify-icon/react"),K=require("@mui/icons-material/Check"),e=require("@mui/material"),D=require("ahooks"),u=require("react"),S=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),v=require("./chunks/state-tEydRMV8.js"),Y=require("@arcblock/ux/lib/Empty"),N=require("@arcblock/ux/lib/Locale/context"),O=require("@iconify-icon/react"),K=require("@mui/icons-material/Check"),e=require("@mui/material"),D=require("ahooks"),u=require("react"),S=require("./chunks/index-BIQBchDT.js"),m=require("@arcblock/ux/lib/Theme");require("@blocklet/pages-kit/builtin/color-picker");require("@blocklet/pages-kit/utils/style");require("@emotion/css");require("lodash/without");const p=require("@mui/material/colors");require("@blocklet/pages-kit/builtin/uploader");require("react-use");require("lodash/cloneDeep");require("@mui/icons-material");require("react-dnd");require("@mui/lab");require("immer");require("lodash/omit");require("react-router-dom");require("@arcblock/ux/lib/Button");require("is-uri");require("@arcblock/ux/lib/Toast");require("@mui/material/Tooltip");require("@mui/icons-material/KeyboardArrowLeft");const J=require("@mui/material/Box");require("@mui/material/DialogTitle");require("@mui/material/IconButton");require("@mui/material/Dialog");require("@mui/material/useMediaQuery");const Z=require("@emotion/react");require("@mui/material/Alert");require("@mui/material/AlertTitle");require("react-error-boundary");require("ufo");require("lodash/isEmpty");require("yaml");require("@mui/material/Typography");require("joi");const A=require("@blocklet/aigne-hub/api"),ee=require("@blocklet/js-sdk");require("@mui/x-date-pickers");require("@mui/x-date-pickers/AdapterDayjs");require("@mui/x-date-pickers/LocalizationProvider");require("circular-natal-horoscope-js/dist");const te=require("dayjs"),oe=require("dayjs/plugin/timezone"),re=require("dayjs/plugin/utc");require("fast-deep-equal");require("lodash/isNil");require("tz-lookup");require("@mui/icons-material/CheckCircleOutline");require("lodash/uniq");require("lodash/get");require("lodash/set");const G=require("@blocklet/pages-kit/utils/common"),ie=require("@blocklet/pages-kit/components"),_=o=>o&&o.__esModule?o:{default:o},$=_(Y),ne=_(K),se=_(J),W=_(te),ae=_(oe),le=_(re);p.red[300],p.pink[300],p.purple[300],p.indigo[300],p.blue[300],p.cyan[300],p.teal[300],p.green[300],p.lime[300],p.yellow[300],p.amber[300],p.orange[300],p.brown[300],p.grey[300],p.blueGrey[300];m.styled(e.Box)`
|
|
2
2
|
.color-item {
|
|
3
3
|
position: relative;
|
|
4
4
|
}
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
.label-box__label,
|
|
128
128
|
.label-box__actions {
|
|
129
129
|
position: absolute;
|
|
130
|
-
background: ${({theme:o})=>o.palette.background.
|
|
130
|
+
background: ${({theme:o})=>o.palette.background.paper};
|
|
131
131
|
overflow: visible;
|
|
132
132
|
display: inline-block;
|
|
133
133
|
top: 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),k=require("./state-tEydRMV8.js"),$=require("@arcblock/ux/lib/Locale/context"),te=require("@arcblock/ux/lib/Result"),M=require("@arcblock/ux/lib/Theme"),ne=require("@blocklet/pages-kit/builtin/page/header"),oe=require("@blocklet/pages-kit/contexts/color"),G=require("@blocklet/pages-kit/utils/data-source"),re=require("@blocklet/pages-kit/utils/route"),se=require("@blocklet/ui-react/lib/Header"),ae=require("@emotion/css"),B=require("@emotion/react"),y=require("@mui/material"),F=require("ahooks"),ie=require("isomorphic-dompurify"),ce=require("lodash/cloneDeep"),le=require("lodash/isEmpty"),ue=require("lodash/isEqual"),p=require("react"),de=require("react-helmet"),v=require("react-router-dom"),W=require("react-use"),S=require("ufo"),_=require("./index-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),k=require("./state-tEydRMV8.js"),$=require("@arcblock/ux/lib/Locale/context"),te=require("@arcblock/ux/lib/Result"),M=require("@arcblock/ux/lib/Theme"),ne=require("@blocklet/pages-kit/builtin/page/header"),oe=require("@blocklet/pages-kit/contexts/color"),G=require("@blocklet/pages-kit/utils/data-source"),re=require("@blocklet/pages-kit/utils/route"),se=require("@blocklet/ui-react/lib/Header"),ae=require("@emotion/css"),B=require("@emotion/react"),y=require("@mui/material"),F=require("ahooks"),ie=require("isomorphic-dompurify"),ce=require("lodash/cloneDeep"),le=require("lodash/isEmpty"),ue=require("lodash/isEqual"),p=require("react"),de=require("react-helmet"),v=require("react-router-dom"),W=require("react-use"),S=require("ufo"),_=require("./index-BIQBchDT.js"),pe=require("@blocklet/ui-react/lib/Footer");require("webfontloader");const z=require("./session-BRtsDvA-.js"),R=t=>t&&t.__esModule?t:{default:t},K=R(te),ge=R(se),me=R(ie),L=R(ce),he=R(le),Y=R(ue),fe=R(pe),xe=M.styled(y.Box)`
|
|
2
2
|
display: contents;
|
|
3
3
|
& > div > div > .MuiContainer-root {
|
|
4
4
|
max-width: unset;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
font-family: ${a};
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
`})}function V(t){return t!=null}function we(){const[t]=v.useSearchParams(),{session:n}=z.useSessionContext(),c=z.useIsRoleOrMultiTenant("owner","admin","pagesEditor","member"),r=p.useMemo(()=>{const o=t.get("mode");return _.STATE_MODES.includes(o)?o:"production"},[t]),a=r==="production"?r:n.user?c?r:"production":null;return a?e.jsx(Q,{mode:a}):null}function Q({mode:t}){if(t!=="draft"){const n=window.__PAGE_STATE__;return n?e.jsx(E,{mode:t,state:n}):e.jsx(Re,{mode:t,children:({state:c})=>e.jsx(E,{mode:t,state:c})})}return e.jsx(Se,{children:({state:n})=>e.jsx(E,{mode:t,state:n})})}const ke=p.lazy(()=>Promise.resolve().then(()=>require("./publish-button-
|
|
30
|
+
`})}function V(t){return t!=null}function we(){const[t]=v.useSearchParams(),{session:n}=z.useSessionContext(),c=z.useIsRoleOrMultiTenant("owner","admin","pagesEditor","member"),r=p.useMemo(()=>{const o=t.get("mode");return _.STATE_MODES.includes(o)?o:"production"},[t]),a=r==="production"?r:n.user?c?r:"production":null;return a?e.jsx(Q,{mode:a}):null}function Q({mode:t}){if(t!=="draft"){const n=window.__PAGE_STATE__;return n?e.jsx(E,{mode:t,state:n}):e.jsx(Re,{mode:t,children:({state:c})=>e.jsx(E,{mode:t,state:c})})}return e.jsx(Se,{children:({state:n})=>e.jsx(E,{mode:t,state:n})})}const ke=p.lazy(()=>Promise.resolve().then(()=>require("./publish-button-BAFrnjhg.js"))),Se=p.lazy(()=>Promise.resolve().then(()=>require("./draft-data-BM4piqW0.js")));function Re({mode:t,children:n}){const r=document.querySelector('meta[property="pages:version"]')?.content,a=k.useProjectId(),o=p.useMemo(()=>{if(r==="{{pagesPublishedAt}}"){const l=localStorage.getItem(k.getProjectPageVersionKey(a??""));return Number(l)?Number(l):new Date().getTime()}return Number(r)},[r]),{loading:g,value:i}=W.useAsync(()=>_.getPages({mode:t,version:o}),[t,o]);return g?e.jsx(J,{}):i?n({state:i}):null}function E({mode:t,state:n}){const{t:c,locale:r}=$.useLocaleContext(),[a]=v.useSearchParams(),o=k.useProjectId(),g=k.useProjectSlug(),i=a.get("hiddenBadge")==="true",l=a.get("showPublish")==="true",{pageIds:h,pages:u,routeIds:d,routes:j,supportedLocales:b,config:{defaultLocale:P},resources:C}=n,x=k.getAllComponents(n),f=p.useMemo(()=>b?.some(m=>m.locale===r)?r:void 0,[r,b]),q=Object.values(j||{}).find(m=>m?.path==="/")||Object.values(u).find(m=>m?.slug==="/")?void 0:Object.values(u)[0],O=p.useMemo(()=>t==="production"?h.map(m=>{const s=u[m];return s&&{id:s.id,path:S.joinURL("/",g||o||"",s.slug)}}).filter(V):d.map(m=>{const s=j[m];return s?{id:s.id,path:S.joinURL("/",g||o||"",s.path,`?mode=${t}&showPublish=true`)}:null}).filter(V),[h,u,t,j,d,o,g]),T=([...m])=>(t!=="production"&&l&&m.unshift(e.jsx(p.Suspense,{fallback:e.jsx("div",{}),children:e.jsx(ke,{ref:{current:null},mode:"production",state:n})})),m);return e.jsxs(_.Provider,{value:{pages:O},children:[e.jsxs(v.Routes,{children:[q&&e.jsx(v.Route,{index:!0,element:e.jsx(v.Navigate,{to:S.joinURL("/",f||"",q.slug)})}),d?.map(m=>{const s=j?.[m];if(!s||!s.displayTemplateId)return null;const A=u[s.displayTemplateId];if(!A)return null;let D=[];return s.params&&s.params.length>0&&(D=re.generateParamCombinations({basePath:s.path,params:s.params,routeId:s.id,paramsOptions:s.paramsOptions,currentIndex:0,currentParams:[],currentOptionIds:[],result:[]})?.map(H=>{const N=H.paramOptionIds.join("-");return e.jsx(v.Route,{path:S.joinURL(":projectIdOrSlug?",H.path),element:e.jsx(U,{mode:t,components:x,page:A,locale:f,defaultLocale:P,headerAddons:T,state:n,pageData:s.dataSource?.pathDataMappings?.[N]?.dataCache?.[f||P||"en"]})},N)})),D.push(e.jsx(v.Route,{path:S.joinURL(":projectIdOrSlug?",s.path),element:e.jsx(U,{mode:t,components:x,page:A,locale:f,defaultLocale:P,headerAddons:T,state:n,pageData:s.dataSource?.pathDataMappings?.[s.id]?.dataCache?.[f||P||"en"]})},s.id)),D}),h.map(m=>{const s=u[m];return s?e.jsx(v.Route,{path:S.joinURL(":projectIdOrSlug?",s.slug),element:e.jsx(I,{mode:t,components:x,page:s,locale:f,defaultLocale:P,headerAddons:T})},s.id):null}),C.pages&&Object.values(C.pages).map(({blockletId:m,page:s})=>e.jsx(v.Route,{path:S.joinURL("/",`@${m}`,s.slug),element:e.jsx(I,{mode:t,components:x,page:s,locale:f,defaultLocale:P,headerAddons:T})},s.id)),e.jsx(v.Route,{path:"*",element:e.jsx(y.Box,{sx:{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(K.default,{status:404,extra:e.jsx(ee,{href:"/",children:c("common.back")}),sx:{bgcolor:"transparent",width:"100%",height:"100%"}})})})]}),t!=="production"&&!i&&e.jsx(ye,{sx:{bgcolor:"info.light"},children:t}),e.jsx(ve,{})]})}function U({mode:t,pageData:n,components:c,page:r,locale:a,defaultLocale:o,headerAddons:g,state:i}){const l=F.useReactive({page:null});p.useEffect(()=>{const u=r||null;u?l.page=L.default(u):l.page=null},[r,JSON.stringify(r),l]);const h=p.useRef(void 0);return p.useEffect(()=>{Y.default(n,h.current)||n&&l.page&&(G.setPageDataSource(l.page,i,a,n),h.current=L.default(n))},[l.page,n,a,i]),l.page?e.jsx(I,{mode:t,components:c,page:l.page,locale:a,defaultLocale:o,headerAddons:g}):null}function Ce({mode:t,state:n,path:c,pageData:r}){const{t:a,locale:o}=$.useLocaleContext(),{pages:g,supportedLocales:i,config:{defaultLocale:l},resources:h}=n,u=Object.values(g).find(x=>x?.slug===c),d=Object.values(h.pages||{}).find(x=>x.page.slug===c),j=p.useMemo(()=>i?.some(x=>x.locale===o)?o:void 0,[o,i]),b=F.useReactive({page:null});p.useEffect(()=>{const x=u||d?.page||null;x?b.page=L.default(x):b.page=null},[u,d]);const P=p.useRef(void 0);if(p.useEffect(()=>{Y.default(r,P.current)||r&&b.page&&(G.setPageDataSource(b.page,n,j,r),P.current=L.default(r))},[{}]),!u&&!d?.page)return e.jsx(y.Box,{sx:{width:"100vw",height:"100vh",display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(K.default,{style:{background:"inherit"},status:404,extra:e.jsx(ee,{href:"/",children:a("common.back")})})});const C=k.getAllComponents(n);return b.page?e.jsx(I,{mode:t,components:C,page:b.page,locale:j,defaultLocale:l}):null}function I({mode:t,components:n,page:c,locale:r,defaultLocale:a,headerAddons:o}){const g=oe.useColorConvert(),i=c.locales?.[r]??c.locales?.[a]??{},l=i.title||window.blocklet?.appName,h=i.description||window.blocklet?.appDescription,u=k.autoResizeImage(k.getImageAbsoluteUrl(i.image),540),{logo:d,brand:j,description:b,...P}=ne.useHeaderState(),C=p.useMemo(()=>f=>{let w=o?.(f)??f;return w=P.addons?.(w)??w,w},[P.addons,o]),x=p.useMemo(()=>i.header?.translucent?Z:X,[i.header?.translucent]);return e.jsxs(_.PageProvider,{page:c,defaultLocale:a,currentLocale:r,children:[e.jsx(B.Global,{styles:B.css`
|
|
31
31
|
body {
|
|
32
32
|
background-color: ${g(!i.backgroundColor||i.backgroundColor==="transparent"?"background.default":i.backgroundColor)} !important;
|
|
33
33
|
}
|
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
"use strict";var He=Object.create;var pe=Object.defineProperty;var Je=Object.getOwnPropertyDescriptor;var Ye=Object.getOwnPropertyNames;var Ke=Object.getPrototypeOf,Xe=Object.prototype.hasOwnProperty;var Qe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ye(t))!Xe.call(e,i)&&i!==n&&pe(e,i,{get:()=>t[i],enumerable:!(r=Je(t,i))||r.enumerable});return e};var Ze=(e,t,n)=>(n=e!=null?He(Ke(e)):{},Qe(t||!e||!e.__esModule?pe(n,"default",{value:e,enumerable:!0}):n,e));const o=require("react/jsx-runtime"),et=require("@mui/icons-material"),u=require("@mui/material"),tt=require("lodash/isEmpty"),ot=require("lodash/pick"),g=require("react"),nt=require("lodash/keyBy"),_=require("@arcblock/ux/lib/Theme"),b=require("@emotion/css"),rt=require("lodash/omit"),se=require("react-router-dom"),it=require("@arcblock/ux/lib/Button"),st=require("is-uri"),Be=require("@iconify-icon/react"),j=require("./state-tEydRMV8.js"),at=require("@blocklet/pages-kit/builtin/markdown/markdown-renderer"),Ce=require("@blocklet/pages-kit/contexts/color"),lt=require("react-syntax-highlighter/dist/esm/styles/prism"),ct=require("@arcblock/react-hooks/lib/useBrowser"),dt=require("@arcblock/ux/lib/Colors"),ae=require("@blocklet/pages-kit/components"),he=require("@blocklet/pages-kit/utils/style"),ut=require("@mui/material/useMediaQuery"),H=require("pathe"),O=require("ufo"),xt=require("@blocklet/embed/message"),mt=require("ahooks"),pt=require("lodash/isEqual"),ht=require("@blocklet/embed/react"),gt=require("@arcblock/ux/lib/Locale/context"),ft=require("@arcblock/ux/lib/Screenshot"),yt=require("react-twitter-embed"),ge=require("react-use"),S=e=>e&&e.__esModule?e:{default:e},bt=S(tt),Y=S(ot),vt=S(g),R=S(nt),I=S(rt),wt=S(it),re=S(st),jt=S(at),kt=S(ct),fe=S(dt),Se=S(ut),_t=S(pt),$e=S(ft),K="{{CUSTOM_VALUE}}",Bt=[{title:"None",value:"none",sx:{}},{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}}}],Ct=[{title:"None",value:"none",sx:{}},{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}}}],St=[{title:"None",value:"none",sx:{}},{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}}}],J=(e,t,n)=>{const r=e.breakpoints.values[n];return`${t}${r?` (${r}px)`:""}`},$t=[{title:"100%",value:"full",sx:{maxWidth:"100%"}},{title:e=>J(e,"Small","sm"),value:"sm",sx:{maxWidth:e=>e.breakpoints.values.sm,width:"100%",mx:"auto"}},{title:e=>J(e,"Normal","md"),value:"md",sx:{maxWidth:e=>e.breakpoints.values.md,width:"100%",mx:"auto"}},{title:e=>J(e,"Large","lg"),value:"lg",sx:{maxWidth:e=>e.breakpoints.values.lg,width:"100%",mx:"auto"}},{title:e=>J(e,"Extra Large","xl"),value:"xl",sx:{maxWidth:e=>e.breakpoints.values.xl,width:"100%",mx:"auto"}},{title:"Custom",value:"custom",sx:{maxWidth:K,width:"100%",mx:"auto"}}],Nt=[{title:"None",value:"none",sx:{gap:0}},{title:"Small",value:"small",sx:{gap:{xs:1,md:2,lg:2,xl:3}}},{title:"Normal",value:"normal",sx:{gap:{xs:2,md:3.5,lg:3.5,xl:5}}},{title:"Large",value:"large",sx:{gap:{xs:3,md:5,lg:5,xl:6.5}}}],Mt=[{title:"None",value:"none",sx:{}},{title:"Small",value:"small",sx:{p:{xs:1,md:2,lg:2,xl:3}}},{title:"Normal",value:"normal",sx:{p:{xs:2.5,md:5,lg:5,xl:7.5}}},{title:"Large",value:"large",sx:{p:{xs:3,md:6,lg:6,xl:9}}}],Rt=[{title:"Start",value:"start",sx:{alignContent:"start"}},{title:"Center",value:"center",sx:{alignContent:"center"}},{title:"End",value:"end",sx:{alignContent:"end"}},{title:"Space Between",value:"space-between",sx:{alignContent:"space-between"}},{title:"Space Around",value:"space-around",sx:{alignContent:"space-around"}},{title:"Space Evenly",value:"space-evenly",sx:{alignContent:"space-evenly"}}],It=[{title:"Start",value:"start",sx:{justifyContent:"start"}},{title:"Center",value:"center",sx:{justifyContent:"center"}},{title:"End",value:"end",sx:{justifyContent:"end"}},{title:"Space Between",value:"space-between",sx:{justifyContent:"space-between"}},{title:"Space Around",value:"space-around",sx:{justifyContent:"space-around"}},{title:"Space Evenly",value:"space-evenly",sx:{justifyContent:"space-evenly"}}],Pt=[{title:"Solid",value:"solid",sx:{border:"1px solid",borderColor:"divider"},group:"borderFrame"},{title:"Dashed",value:"dashed",sx:{border:"1px dashed",borderColor:"divider"},group:"borderFrame"},{title:"Dotted",value:"dotted",sx:{border:"1px dotted",borderColor:"divider"},group:"borderFrame"},{title:"Custom",value:"custom",sx:{border:K},group:"borderFrame"}],Ne=[{value:"macbook",title:"MacBook",group:"deviceFrame"},{value:"phone",title:"Phone",group:"deviceFrame"}],Et=e=>Ne.some(t=>t.value===e),At=e=>Me.some(t=>t.value===e),Me=[{value:"chrome",title:"Chrome",group:"browserFrame",sx:{}},{value:"chrome-with-url",title:"Chrome (With URL)",group:"browserFrame",sx:{}}],Lt=[{value:"shadow-sm",title:"Shadow Low Elevation",group:"shadowFrame",sx:{boxShadow:e=>e.shadows[2]}},{value:"shadow-md",title:"Shadow Medium Elevation",group:"shadowFrame",sx:{boxShadow:e=>e.shadows[6]}},{value:"shadow-lg",title:"Shadow High Elevation",group:"shadowFrame",sx:{boxShadow:e=>e.shadows[12]}},{value:"shadow-xl",title:"Shadow Extra High Elevation",group:"shadowFrame",sx:{boxShadow:e=>e.shadows[16]}},{value:"shadow-max",title:"Shadow Max Elevation",group:"shadowFrame",sx:{boxShadow:e=>e.shadows[24]}}],Tt=[{title:"None",value:"none",sx:{border:"none"},group:"commonFrame"},...Pt,...Me,...Lt,...Ne],Wt=[{title:"None",value:"none",sx:{borderRadius:0}},{title:"Small",value:"small",sx:{borderRadius:1}},{title:"Medium",value:"medium",sx:{borderRadius:2}},{title:"Large",value:"large",sx:{borderRadius:3}},{title:"Extra Large",value:"xl",sx:{borderRadius:4}},{title:"Rounded",value:"rounded",sx:{borderRadius:"50%"}},{title:"Custom",value:"custom",sx:{borderRadius:K}}],Ft=R.default(Bt,"value"),zt=R.default(Ct,"value"),Ut=R.default(St,"value"),Ot=R.default($t,"value"),qt=R.default(Nt,"value"),Dt=R.default(Mt,"value"),Gt=R.default(Rt,"value"),Vt=R.default(It,"value"),Ht=R.default(Tt,"value"),Jt=R.default(Wt,"value"),Yt=new Map([["baseSectionPaddingY",Ft],["maxWidth",Ot],["paddingY",zt],["paddingX",Ut],["layoutBlockGap",qt],["layoutBlockPadding",Dt],["layoutBlockAlignContent",Gt],["layoutBlockJustifyContent",Vt],["layoutBlockBorder",Ht],["layoutBlockBorderRadius",Jt]]);function A(e){const{type:t,value:n,format:r="sx",defaultValue:i=null}=e,s=Yt.get(t);if(!s||typeof n!="string"||!n)return i;const l=n.startsWith("custom:"),a=l?"custom":n;if(s?.[a]&&s?.[a]?.[r]){const c=s[a][r];if(l){const d=n.replace("custom:","");try{return JSON.parse(JSON.stringify(c||{}).replaceAll(K,d))}catch{}}return c}return i}const Re=g.createContext({page:null,getPageMeta:()=>({}),getPageMetaStyle:()=>({})});function Kt(){return g.useContext(Re)}function Xt({page:e,children:t,defaultLocale:n="en",currentLocale:r}){const i=g.useMemo(()=>e?JSON.parse(JSON.stringify(e)):null,[JSON.stringify(e)]),s=g.useCallback(()=>{if(!i)return{};const c=r||n;return i.locales?.[c]??{}},[i,n,r]),l=g.useCallback((c="sx")=>{const d=s();return!d||!d.style?{}:Object.entries(d.style||{}).reduce((m,[h,p])=>{if(!p)return m;const v=`${h}Custom`;d.style[v];const f=A({type:h,value:p,format:c});return f?{...m,...f}:m},{})},[s]),a=g.useMemo(()=>({page:i,getPageMeta:s,getPageMetaStyle:l}),[i,s,l]);return o.jsx(Re.Provider,{value:a,children:t})}const X=["editing","height","locale","dev","sx"];function Qt(e){const{className:t,...n}=e;return o.jsx(Zt,{...n,className:b.cx("BlockBase-root",t)})}const Zt=_.styled(u.Box)`
|
|
2
|
+
position: relative;
|
|
3
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
4
|
+
`,Ie=g.createContext({pages:[],project:void 0}),{Provider:eo,Consumer:Cn}=Ie;function Pe(){return g.useContext(Ie)}function to({icon:e,...t}){return o.jsx(Be.Icon,{icon:e,...t,ref:null})}function oo({icon:e,className:t="",size:n="1rem",...r}){return o.jsx(no,{component:to,className:b.cx("css-icon",t),size:n,...r,icon:e})}const no=_.styled(u.Box)`
|
|
5
|
+
&.css-icon {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
width: ${({size:e})=>e};
|
|
8
|
+
height: ${({size:e})=>e};
|
|
9
|
+
}
|
|
10
|
+
`;function ro({icon:e,className:t="",size:n="1rem",imageMeta:r,...i}){const s=j.autoResizeImage(j.getImageAbsoluteUrl(e),540),[l,a]=g.useState(!1),c=_.useTheme();return l?o.jsx(oo,{icon:"i-mdi:image",color:c.palette.grey[500],size:n,className:t,...i}):o.jsx(io,{className:b.cx("image-icon",t),size:n,...i,children:o.jsx("img",{className:"image-icon__image",src:s,onError:()=>a(!0),width:r?.naturalWidth,height:r?.naturalHeight,alt:r?.filename||"card-icon",loading:"lazy"})})}const io=_.styled(u.Box)`
|
|
11
|
+
display: inline-block;
|
|
12
|
+
width: ${({size:e})=>e};
|
|
13
|
+
height: ${({size:e})=>e};
|
|
14
|
+
.image-icon__image {
|
|
15
|
+
object-fit: contain;
|
|
16
|
+
height: 100%;
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
`,le=e=>typeof e=="string"&&/^[\w-_]+:[\w-_]+$/.test(e);function ie({icon:e,size:t="1rem",imageMeta:n,...r}){const i=window.isNaN(t)?t:`${t}px`;return le(e)?o.jsx(Be.Icon,{icon:e}):o.jsx(so,{component:ro,imageMeta:n,className:"base-icon",icon:e,size:i,...r})}const so=_.styled(u.Box)`
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
`;function D({text:e,children:t,icon:n="",endIcon:r,color:i="primary",link:s="",href:l="",...a}){const c=n?o.jsx(ie,{icon:n}):null,d=r?o.jsx(ie,{icon:r}):null,x=s||l,m={...a};return x&&(m.href=x,re.default(x)&&(m.target=m.target||"_blank")),o.jsx(wt.default,{startIcon:c,endIcon:d,color:i,...m,children:e||t})}function Ee({editing:e,text:t,...n}){const{pages:r=[]}=Pe(),i=r.find(s=>s.id===(n.link||n.linkId));if(e)return o.jsx(D,{...I.default(n,["link","linkId"]),children:t});if(i){const s=i.path||"/";return o.jsx(se.Link,{to:s,children:o.jsx(D,{...I.default(n,["link","linkId"]),children:t})})}return o.jsx(D,{...I.default(n,"linkId"),children:t})}function F({actions:e,center:t,className:n,align:r}){return e&&e?.length?o.jsx(u.Box,{className:b.cx("flex gap-4 flex-wrap","lg:flex-row lg:gap-8",(t||r==="center")&&"justify-center",!t&&r==="right"&&"justify-end",!t&&r==="left"&&"justify-start",n),sx:{alignItems:"center"},children:e}):null}const ao="section",lo=u.styled(u.Box)`
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
|
|
24
|
+
.section__title {
|
|
25
|
+
margin-top: 0;
|
|
26
|
+
font-weight: 700;
|
|
27
|
+
}
|
|
28
|
+
.section__title_non_big {
|
|
29
|
+
font-size: 32px;
|
|
30
|
+
@media (max-width: 600px) {
|
|
31
|
+
font-size: 24px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
&.base-info .section__tag {
|
|
35
|
+
margin-top: 0;
|
|
36
|
+
margin-bottom: 2vw;
|
|
37
|
+
background-color: ${({theme:e})=>e.palette.primary.main};
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
display: inline-block;
|
|
41
|
+
padding: 0 10px;
|
|
42
|
+
justify-content: flex-start;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
font-size: 12px;
|
|
46
|
+
color: #fff;
|
|
47
|
+
border-radius: 4px;
|
|
48
|
+
line-height: 20px;
|
|
49
|
+
}
|
|
50
|
+
.section__title {
|
|
51
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
52
|
+
a {
|
|
53
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
54
|
+
}
|
|
55
|
+
p {
|
|
56
|
+
margin-top: 0;
|
|
57
|
+
margin-bottom: 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
.section__description {
|
|
61
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
62
|
+
margin-bottom: 4vw;
|
|
63
|
+
margin-top: 0;
|
|
64
|
+
a {
|
|
65
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
66
|
+
}
|
|
67
|
+
p {
|
|
68
|
+
margin-top: 0;
|
|
69
|
+
margin-bottom: 0.5rem;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
@media (min-width: ${({theme:e})=>e.breakpoints.values[ao]}px) {
|
|
73
|
+
.section__tag {
|
|
74
|
+
margin-bottom: 32px;
|
|
75
|
+
}
|
|
76
|
+
.section__title {
|
|
77
|
+
margin-bottom: 32px;
|
|
78
|
+
}
|
|
79
|
+
.section__description {
|
|
80
|
+
margin-bottom: 40px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
`;function Q({title:e,description:t,descriptionMarkdown:n,actions:r,className:i="",classes:s={},prepend:l,append:a,level:c=2,tag:d,badge:x,center:m,logo:h,titleAppearance:p,descriptionAppearance:v,...f}){const w=Ce.useColorConvert();if(!e&&!t&&!r&&!x&&!d&&!l&&!a&&!h)return null;const k=Math.max(Math.min(5,c+1),1),C={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"},N=c===0?"big":`h${k}`,M=c===0;return o.jsxs(lo,{className:b.cx("base-info","lg:text-left",m&&"!text-center",i),...f,children:[l&&o.jsx("div",{children:l}),(d||x)&&o.jsx("div",{className:b.cx("section__tag",s?.tag||s?.badge),children:d||x}),h&&o.jsx("img",{className:"w-[120px] m-auto mb-8",src:h,alt:"info",loading:"lazy"}),e&&o.jsx(u.Typography,{sx:{whiteSpace:"pre-wrap",mb:t?"2vw":0,...p?.color&&{color:`${w(p.color)} !important`}},className:b.cx("section__title","text-gray-800","dark:text-gray-50",s.title,"page-kit-section__title",M?"":"section__title_non_big"),component:`h${Math.max(c,1)}`,variant:N,children:e}),t&&(n?o.jsx(u.Box,{sx:{...v?.color&&{color:`${w(v.color)} !important`}},className:b.cx("section__description","text-gray-800","dark:text-gray-100",C[k],s.description,"page-kit-section__description"),children:o.jsx(jt.default,{codeOptions:{showActionButton:!1,theme:lt.materialDark},children:t})}):o.jsx(u.Typography,{sx:{whiteSpace:"pre-wrap",...v?.color&&{color:`${w(v.color)} !important`}},className:b.cx("section__description","text-gray-800","dark:text-gray-100",C[k],s.description,"page-kit-section__description"),component:"div",variant:"body1",gutterBottom:!0,children:t})),o.jsx(F,{actions:r,center:m,className:"mt-8"}),a&&o.jsx("div",{children:a})]})}const Z=["actions","append","badge","tag","center","description","descriptionMarkdown","level","logo","prepend","title","titleAppearance","descriptionAppearance"];function co(){const e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")}function uo(e=""){if(e.startsWith("data:image/svg+xml,"))return!0;const t=/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/,n=/^(\/|\.\/|\.\.\/)(?:[^/]+\/)*[^/]+$/;return t.test(e)||n.test(e)}function q(e){return e?.endsWith(".mp4")||e?.endsWith(".m4v")||e?.endsWith(".webm")}function xo(e){return e?.endsWith(".mp4")||e?.endsWith(".m4v")?"video/mp4":e?.endsWith(".webm")?"video/webm":void 0}function mo(e){let t={};return typeof e=="string"?he.isGradient(e)?t.image=e:(t.image=j.getImageAbsoluteUrl(e),he.isColorString(e)&&(t.color=e,t.image="")):t=e,t}function po(){const[e,t]=g.useState(Date.now());return g.useEffect(()=>{const n=()=>{t(Date.now())};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n)}},[]),e}function ye(e,t,n,r,i){let s=null;const{color:l="",image:a}=mo(t);if(a&&uo(a)){delete n.backgroundColor;const c=!(e.mobile.apple.device||co())&&q(a),d=q(a)&&r?j.autoResizeImage(j.getImageAbsoluteUrl(r),1200,"quality"):"";c?s=o.jsx(u.Box,{component:"video",className:"section-bg",autoPlay:!0,loop:!0,muted:!0,controls:!1,playsInline:!0,poster:d,src:q(a)?a:j.autoResizeImage(a,1200,"quality"),sx:{width:"100%",position:"absolute",zIndex:-9999,right:0,left:0,top:0,height:"100%",objectFit:"cover"}},a):s=o.jsx(ae.ResponsiveImage,{src:q(a)&&r?d: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"}},i||a)}else a?n.backgroundImage=`${a} !important`:l&&(n.backgroundColor=`${l} !important`);return s}function ho({autoWidth:e,children:t,...n}){return e?o.jsx(u.Box,{...n,sx:[{display:"flex"},...Array.isArray(n.sx)?n.sx:[n.sx]],children:t}):o.jsx(u.Container,{...n,children:t})}function ee({dark:e=!1,children:t,className:n,sx:r={},boxed:i={show:!1},padding:s="normal",boxProps:l,type:a,...c}){const d={...r},x=Se.default(p=>p.breakpoints.down("md"));e&&(d.color=fe.default.common.white,d.backgroundColor=`${fe.default.grey[900]} !important`),i.show&&(d.display="flex");const m=g.useMemo(()=>!Number(c.boxMaxWidth)||x?{width:"100%"}:a==="wall"&&c.boxMaxWidth?{maxWidth:`${c.boxMaxWidth}px !important`,width:"100%"}:{width:"100%"},[c.boxMaxWidth,x,a]),h=A({type:"baseSectionPaddingY",value:s||"normal",defaultValue:""});return o.jsx(go,{component:"section",styles:{...d,...h},className:b.cx("base-section","px-2 md:px-5 lg:px-5 xl:px-10",n,{dark:e}),...I.default(c,"hoverStyle","boxMaxWidth","embedUrl","autoWidth","paddingXY","iframeHeight","titleAppearance","descriptionAppearance"),children:o.jsx(ho,{autoWidth:c?.autoWidth,className:b.cx("section-content h-full"),sx:m,children:i.show?o.jsx(ce,{...l,boxed:i,children:t}):t})})}function ce({background:e="",backgroundVideoPoster:t,children:n,sx:r={},boxed:i={show:!1},className:s="",styles:l={},...a}){const c={...l,...r},d=Ce.useColorConvert();let x=null;const m=Se.default(v=>v.breakpoints.up("sm")),h=kt.default(),p=po();return e&&(x=ye(h,typeof e=="string"?d(e):e,c,t,p)),i.show&&(c.borderRadius="10px",c.padding===void 0&&(c.padding=m?"50px":"20px"),i?.border&&(c.border="1px solid #c0c0c0"),i?.background&&(x=ye(h,typeof i?.background=="string"?d(i?.background):i?.background,c,i?.backgroundVideoPoster,p))),o.jsxs(u.Box,{...a,sx:{...c,...x?{position:"relative",overflow:"hidden",zIndex:0}:{}},className:b.cx(s,i?.boxShadow&&"shadow-xl"),children:[x,n]})}const go=_.styled(ce)`
|
|
84
|
+
&:nth-of-type(even) {
|
|
85
|
+
background: #f8f8f8;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@media (max-width: 600px) {
|
|
89
|
+
.section__title {
|
|
90
|
+
font-size: 24px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.base-info {
|
|
94
|
+
> *:last-child {
|
|
95
|
+
margin-bottom: 0;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`;function Ae(e){if(e.type===g.Fragment){const n=(e.props.children||[]).filter(r=>g.isValidElement(r));return n.length===1?Ae(n[0]):n.length>1}return Array.isArray(e)}const E="&>*";function Le({children:e,col:t,gap:n,className:r,align:i,sx:s,type:l,...a}={children:null,className:"",col:3,gap:void 0,sx:{},align:"center",type:"default"}){const c=_.useTheme(),d=Number(Math.floor(100/t*100)/100),x={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=x[i]||x.center;let p=n??({2:6,3:4,4:4,5:3,6:3}[t]||0);Ae(e)||(p=0);const f=(t-1)*p/t;let w={...s,gap:`${p}rem`};const k={[E]:{width:"100%"}},C={},N={},M={};switch(k.gap="1rem",C.gap=`${p/2}rem`,t){case 3:case 4:C[E]={width:`calc(50% - ${p/2}rem)`};break;case 5:case 6:k[E]={width:`calc(50% - ${p/2/2}rem)`},C[E]={width:`calc(50% - ${p/2/2}rem)`},N[E]={width:`calc(33.33% - ${p*2/3}rem)`};break}return w[E]={width:`calc(${d}% - ${f}rem)`},w[`@media (max-width: ${c.breakpoints.values.xl}px)`]=M,w[`@media (max-width: ${c.breakpoints.values.lg}px)`]=N,w[`@media (max-width: ${c.breakpoints.values.md}px)`]=C,w[`@media (max-width: ${c.breakpoints.values.sm}px)`]=k,l==="wall"&&(w={...s,gap:`${p}rem`},w[E]={width:`calc(${d}% - ${f}rem)`},k[E]={width:`calc(45% - ${p/2/2}rem)`},w[`@media (max-width: ${c.breakpoints.values.sm}px)`]=k),o.jsx(u.Box,{className:b.cx("flex flex-wrap flex-row h-full",m,r),sx:w,...a,children:e})}function z({type:e="",icon:t="",size:n="3rem",className:r="",...i}){return o.jsx(ie,{icon:t||e,size:n,className:b.cx("content-icon",r),...i,color:typeof i.color>"u"?"inherit":i.color})}function fo({to:e,base:t,children:n,className:r,activeClassName:i="active",target:s="auto",autoExternalMark:l=!1,useRouterLink:a,...c}){const{pages:d=[],locale:x=""}={},m=t?H.join("/",t):t||"";let h=s==="auto"?"_self":s,p=H.join(m,e);const v=l?re.default(p):!1;if(t)return p=H.join(m,x,e),o.jsx("a",{className:`no-underline ${r}`,href:O.withoutTrailingSlash(p),rel:"noreferrer noopener",target:h,...c,children:n});if(re.default(e))s==="auto"&&(h="_blank"),p=e;else{O.isRelative(p)&&(p=H.join(window.location.pathname,p));const f=O.parseURL(`${window.location.origin}${p}`),w=d.some(k=>k.pathname===f.pathname);if(a||w)return o.jsx(se.NavLink,{end:!0,to:O.withoutTrailingSlash(p),className:({isActive:k})=>b.cx(r,k?i:""),...c,children:n})}return o.jsxs("a",{className:`no-underline ${r}`,href:O.withoutTrailingSlash(p),rel:"noreferrer noopener",target:h,...c,children:[n,v&&o.jsx(z,{icon:"i-mdi:arrow-top-right",size:"0.9em",className:"smart-link__mark",style:{marginLeft:5}})]})}function G({prepend:e,append:t,children:n,className:r="",dark:i=!1,border:s=!0,...l}){let a={};const{pages:c=[]}=Pe(),d=c.find(h=>h.id===l.link),x=!n||vt.default.Children.toArray(n).every(h=>h===null);l.link&&(a={component:fo,to:d?.path||l.link,useRouterLink:!0});const m=u.useTheme();return o.jsxs(yo,{className:b.cx("base-card card",{dark:i,"border-transparent":!s},r),sx:{borderColor:m.palette.divider},...a,...I.default(l,["listType","dark","iconColor","link","hoverStyle","imageSize"]),children:[e,!x&&o.jsx("div",{className:"card__body",children:n}),t]})}const yo=_.styled(u.Box)`
|
|
100
|
+
&.base-card {
|
|
101
|
+
text-align: left;
|
|
102
|
+
border-width: 1px;
|
|
103
|
+
border-style: solid;
|
|
104
|
+
border-radius: 12px;
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
&,
|
|
107
|
+
&:hover {
|
|
108
|
+
text-decoration: none;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
.card__body {
|
|
112
|
+
padding: 15px 15px;
|
|
113
|
+
}
|
|
114
|
+
`;function V({align:e="left",title:t,titleProps:n={},description:r,descriptionProps:i={}}){return o.jsxs(o.Fragment,{children:[t&&o.jsx(u.Typography,{className:b.cx("card__title text-gray-800","dark:text-gray-50"),component:"h5",variant:"h5",gutterBottom:!0,align:e,...n,children:t}),r&&o.jsx(u.Typography,{className:b.cx("card__description","text-gray-500","dark:text-gray-400"),component:"div",variant:"body1",gutterBottom:!0,align:e,...i,children:r})]})}function bo({image:e,title:t,description:n,imageProps:r={},imageMeta:i,imageSize:s,titleProps:l={},descriptionProps:a={},actions:c,align:d,...x}){const m=le(e),h=j.autoResizeImage(j.getImageAbsoluteUrl(e),540);return o.jsxs(vo,{className:"card-article",...x,prepend:o.jsx("div",{className:"card__image__wrap",children:m&&e?o.jsx(u.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:o.jsx(z,{icon:e,color:"primary.main"})}):h&&o.jsx("img",{className:"card__image",src:h,...r,alt:r.alt||i?.filename||"card-image",width:i?.naturalWidth,height:i?.naturalHeight,style:{width:"100%",height:"100%",objectFit:s||"cover",objectPosition:"center"},loading:"lazy"})}),children:[t||n?o.jsx(V,{align:d,title:t,titleProps:l,description:n,descriptionProps:a}):null,c?.length?o.jsx(F,{align:d,actions:c,className:"mt-4"}):null]})}const vo=_.styled(G)`
|
|
115
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
116
|
+
&:hover {
|
|
117
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
118
|
+
}`:""}
|
|
119
|
+
|
|
120
|
+
.card__title {
|
|
121
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
122
|
+
a {
|
|
123
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
.card__description {
|
|
127
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
128
|
+
a {
|
|
129
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.card__image__wrap {
|
|
134
|
+
padding-top: 61.8%;
|
|
135
|
+
width: 100%;
|
|
136
|
+
position: relative;
|
|
137
|
+
}
|
|
138
|
+
.card__image {
|
|
139
|
+
position: absolute;
|
|
140
|
+
top: 0;
|
|
141
|
+
left: 0;
|
|
142
|
+
bottom: 0;
|
|
143
|
+
right: 0;
|
|
144
|
+
width: 100%;
|
|
145
|
+
height: 100%;
|
|
146
|
+
object-position: top center;
|
|
147
|
+
}
|
|
148
|
+
`,be="section";function ve({title:e,image:t,imageMeta:n,description:r,actions:i,align:s,listType:l="",className:a="",...c}){return o.jsxs(wo,{className:b.cx("card",`list-type-${l}`,a),align:s,...c,children:[t&&o.jsx(z,{icon:t,color:"primary.main",size:l==="icon-title"?"1.2rem":"3rem",imageMeta:n}),e||r?o.jsx(V,{align:s,title:e,description:r}):null,i?.length?o.jsx(F,{align:s,actions:i,className:"mt-4"}):null]})}const wo=_.styled(G)`
|
|
149
|
+
padding: 5vw 4vw;
|
|
150
|
+
box-sizing: border-box;
|
|
151
|
+
/* min-height: 320px; */
|
|
152
|
+
color: inherit !important;
|
|
153
|
+
border-radius: 0.5rem;
|
|
154
|
+
/* ${({dark:e,theme:t})=>`background-color:${e?t.palette.grey[900]:t.palette.common.white};`} */
|
|
155
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values[be]}px) {
|
|
156
|
+
padding: 1.5rem 2rem;
|
|
157
|
+
}
|
|
158
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values.sm}px) {
|
|
159
|
+
height: auto;
|
|
160
|
+
min-height: unset;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
164
|
+
&:hover {
|
|
165
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
166
|
+
}`:""}
|
|
167
|
+
|
|
168
|
+
.card__title {
|
|
169
|
+
font-weight: 700;
|
|
170
|
+
margin-top: 24px;
|
|
171
|
+
margin-bottom: 12px;
|
|
172
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
173
|
+
a {
|
|
174
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
.card__description {
|
|
178
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
179
|
+
a {
|
|
180
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
.card__body {
|
|
184
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
185
|
+
padding: 0;
|
|
186
|
+
${({align:e})=>`text-align:${e||"left"};`}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&.list-type-icon-title {
|
|
190
|
+
padding: 1.2rem;
|
|
191
|
+
.title-line {
|
|
192
|
+
display: flex;
|
|
193
|
+
}
|
|
194
|
+
.card__title {
|
|
195
|
+
margin: 0;
|
|
196
|
+
font-size: 1em;
|
|
197
|
+
}
|
|
198
|
+
.css-icon {
|
|
199
|
+
margin-right: 0.5rem;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@media (min-width: ${({theme:e})=>e.breakpoints.values[be]}px) {
|
|
204
|
+
padding: 2rem 2rem;
|
|
205
|
+
text-align: left;
|
|
206
|
+
box-sizing: border-box;
|
|
207
|
+
}
|
|
208
|
+
`;function jo({image:e,title:t,description:n,imageProps:r={},imageMeta:i,imageSize:s,titleProps:l={},descriptionProps:a={},actions:c,align:d,...x}){const m=le(e),h=j.autoResizeImage(j.getImageAbsoluteUrl(e),540);return o.jsxs(ko,{className:"card-article",...x,prepend:o.jsx("div",{className:"card__image__wrap",children:m&&e?o.jsx(u.Box,{sx:{position:"absolute",left:0,top:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center"},children:o.jsx(z,{icon:e,color:"primary.main"})}):h&&o.jsx(u.Box,{component:"img",className:"card__image",src:h,...r,alt:r.alt||i?.filename||"card-image",style:{width:"100%",height:"100%",objectFit:s||"contain",objectPosition:"center"},loading:"lazy",sx:[{width:i?.naturalWidth,height:i?.naturalHeight},...Array.isArray(r.sx)?r.sx:[r.sx]]})}),children:[t||n?o.jsx(V,{align:d,title:t,titleProps:l,description:n,descriptionProps:a}):null,c?.length?o.jsx(F,{align:d,actions:c,className:"mt-4"}):null]})}const ko=_.styled(G)`
|
|
209
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
210
|
+
&:hover {
|
|
211
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
212
|
+
}`:""}
|
|
213
|
+
|
|
214
|
+
border-radius: 0 !important;
|
|
215
|
+
|
|
216
|
+
.card__body {
|
|
217
|
+
${({align:e})=>`text-align:${e||"left"};`}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.card__image__wrap {
|
|
221
|
+
width: 100%;
|
|
222
|
+
height: 100%;
|
|
223
|
+
position: relative;
|
|
224
|
+
display: flex;
|
|
225
|
+
justify-content: center;
|
|
226
|
+
align-items: center;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.card__image {
|
|
230
|
+
max-height: 60px;
|
|
231
|
+
}
|
|
232
|
+
`,we="section";function _o({title:e,image:t,imageMeta:n,iconSize:r=100,description:i,actions:s,align:l,className:a="",...c}){return o.jsx(Bo,{className:b.cx("card",a),...c,children:o.jsxs(u.Box,{className:"flex items-center",children:[t&&o.jsx(z,{icon:t,color:"primary.main",size:r,imageMeta:n}),o.jsxs(u.Box,{className:"flex-1 ml-4",children:[o.jsx(V,{align:l,title:e,description:i}),o.jsx(F,{align:l,actions:s,className:"mt-4"})]})]})})}const Bo=_.styled(G)`
|
|
233
|
+
padding: 5vw 4vw;
|
|
234
|
+
text-align: left;
|
|
235
|
+
box-sizing: border-box;
|
|
236
|
+
/* min-height: 320px; */
|
|
237
|
+
color: inherit !important;
|
|
238
|
+
border-radius: 0.5rem;
|
|
239
|
+
/* ${({dark:e,theme:t})=>`background-color:${e?t.palette.grey[900]:t.palette.common.white};`} */
|
|
240
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values[we]}px) {
|
|
241
|
+
padding: 1.5rem 2rem;
|
|
242
|
+
}
|
|
243
|
+
@media (max-width: ${({theme:e})=>e.breakpoints.values.sm}px) {
|
|
244
|
+
height: auto;
|
|
245
|
+
min-height: unset;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
${e=>e.hoverStyle==="none"?"":e.link?`transition: box-shadow ease .3s;
|
|
249
|
+
&:hover {
|
|
250
|
+
box-shadow: 0 0 10px rgba(95, 142, 244, 0.42);
|
|
251
|
+
}`:""}
|
|
252
|
+
|
|
253
|
+
.card__title {
|
|
254
|
+
font-weight: 700;
|
|
255
|
+
margin-bottom: 12px;
|
|
256
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
257
|
+
a {
|
|
258
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
.card__description {
|
|
262
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
263
|
+
a {
|
|
264
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
.card__body {
|
|
268
|
+
padding: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&.list-type-icon-title {
|
|
272
|
+
padding: 1.2rem;
|
|
273
|
+
.title-line {
|
|
274
|
+
display: flex;
|
|
275
|
+
}
|
|
276
|
+
.card__title {
|
|
277
|
+
margin: 0;
|
|
278
|
+
font-size: 1em;
|
|
279
|
+
}
|
|
280
|
+
.css-icon {
|
|
281
|
+
margin-right: 0.5rem;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@media (min-width: ${({theme:e})=>e.breakpoints.values[we]}px) {
|
|
286
|
+
padding: 2rem 2rem;
|
|
287
|
+
text-align: left;
|
|
288
|
+
box-sizing: border-box;
|
|
289
|
+
}
|
|
290
|
+
`;function Co({title:e,titleProps:t={},description:n,descriptionProps:r={},image:i,imageMeta:s,className:l="",align:a,hoverStyle:c,...d}){return o.jsxs(So,{className:b.cx("card-simple",l,`hover-style__${c}`),align:a,...d,children:[i&&o.jsx(z,{icon:i,color:"primary.main",imageMeta:s}),e||n?o.jsx(V,{align:a,title:e,titleProps:t,description:n,descriptionProps:r}):null]})}const So=_.styled(G)`
|
|
291
|
+
.card__title {
|
|
292
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
293
|
+
a {
|
|
294
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
.card__description {
|
|
298
|
+
color: ${({theme:e})=>e.palette.text.primary};
|
|
299
|
+
a {
|
|
300
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
&.hover-style__default {
|
|
305
|
+
&.card-simple {
|
|
306
|
+
&:hover {
|
|
307
|
+
border-top-right-radius: 36px;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
.card__body {
|
|
311
|
+
&:hover {
|
|
312
|
+
&::before {
|
|
313
|
+
width: 42px;
|
|
314
|
+
height: 42px;
|
|
315
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
316
|
+
}
|
|
317
|
+
&::after {
|
|
318
|
+
transform: none;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
&.card-simple {
|
|
325
|
+
border-radius: 8px;
|
|
326
|
+
border-top-right-radius: 26px;
|
|
327
|
+
|
|
328
|
+
.card__body {
|
|
329
|
+
${({align:e})=>`text-align:${e||"left"};`}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
${e=>e.link?`
|
|
333
|
+
cursor: pointer;
|
|
334
|
+
`:""}
|
|
335
|
+
/* cursor: pointer; */
|
|
336
|
+
/* &:hover {
|
|
337
|
+
border-top-right-radius: 36px;
|
|
338
|
+
} */
|
|
339
|
+
transition: all 180ms ease 0s;
|
|
340
|
+
overflow: visible;
|
|
341
|
+
.card__title {
|
|
342
|
+
margin: 12px 0;
|
|
343
|
+
}
|
|
344
|
+
.card__body {
|
|
345
|
+
position: relative;
|
|
346
|
+
padding: 20px 16px 18px;
|
|
347
|
+
overflow: hidden;
|
|
348
|
+
transition: all 180ms ease 0s;
|
|
349
|
+
/* &:hover {
|
|
350
|
+
&::before {
|
|
351
|
+
width: 42px;
|
|
352
|
+
height: 42px;
|
|
353
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
354
|
+
}
|
|
355
|
+
&::after {
|
|
356
|
+
transform: none;
|
|
357
|
+
}
|
|
358
|
+
} */
|
|
359
|
+
&::before,
|
|
360
|
+
&::after {
|
|
361
|
+
content: ${({border:e})=>e?'""':""};
|
|
362
|
+
transition: inherit;
|
|
363
|
+
position: absolute;
|
|
364
|
+
top: 0px;
|
|
365
|
+
right: 0px;
|
|
366
|
+
}
|
|
367
|
+
&::before {
|
|
368
|
+
z-index: 3;
|
|
369
|
+
background: #fff;
|
|
370
|
+
width: 30px;
|
|
371
|
+
height: 30px;
|
|
372
|
+
transform: translate(50%, -50%) rotate(45deg);
|
|
373
|
+
box-shadow: 0 1px 0 0 #e9eaec;
|
|
374
|
+
}
|
|
375
|
+
&::after {
|
|
376
|
+
z-index: 2;
|
|
377
|
+
width: 28px;
|
|
378
|
+
height: 28px;
|
|
379
|
+
border-bottom-left-radius: 6px;
|
|
380
|
+
background: #fcfcfd;
|
|
381
|
+
box-shadow: -1px 1px 0 0 #e9eaec;
|
|
382
|
+
transform: translate(8px, -8px);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
`;function $o({type:e="default",...t}){const r={article:bo,simple:Co,news:_o,default:ve,wall:jo}[e]||ve;return o.jsx(r,{...e==="news"?t:I.default(t,"iconSize")})}function No({list:e=[],align:t="top",cards:n,listBorder:r=!0,listType:i="",col:s=3,gap:l,iconColor:a,className:c="",type:d="default",dark:x=!1,textAlign:m="left",hoverStyle:h,...p}){return o.jsx(Le,{type:d,className:b.cx("card-list py-1",c,"items-stretch"),col:s,gap:l,align:t,...p,children:n||e.map(v=>o.jsx($o,{borderColor:r,iconColor:a,type:d,listType:i,dark:x,...v,align:m,style:l===0&&e.length>1?{borderRadius:0,marginRight:"-1px",marginBottom:"-1px"}:{}},v.id))})}const Mo=["align","cards","list","listBorder","listType","col","gap","iconColor","type","textAlign"];function P(e,t){const n=Y.default(e,t),r=I.default(e,t);return[n,r]}const Ro=_.styled(ee)`
|
|
387
|
+
a .card {
|
|
388
|
+
color: #404040;
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
}
|
|
391
|
+
a:not(.MuiButton-root) {
|
|
392
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
393
|
+
&:hover,
|
|
394
|
+
&:active {
|
|
395
|
+
color: ${({theme:e})=>e.palette.primary.main};
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
a:hover .card {
|
|
399
|
+
color: #404040;
|
|
400
|
+
}
|
|
401
|
+
`;function Io({className:e,...t}){const[n,r]=P(t,Z),[i,s]=P(r,Mo);return o.jsxs(Ro,{className:b.cx("section--card-list",e),type:t.type,...s,children:[Object.keys(n).length>0&&o.jsx(Q,{center:!0,...n,className:"mb-[2.5vw]"}),o.jsx(No,{...i,dark:!!t.dark})]})}const Po=_.styled(Io)`
|
|
402
|
+
.card__description {
|
|
403
|
+
white-space: pre-wrap;
|
|
404
|
+
}
|
|
405
|
+
.section__description {
|
|
406
|
+
}
|
|
407
|
+
.card {
|
|
408
|
+
/* background: inherit !important; */
|
|
409
|
+
}
|
|
410
|
+
&.dark .card-simple .card__body::before {
|
|
411
|
+
background: #212121 !important;
|
|
412
|
+
}
|
|
413
|
+
.card-simple .card__body::after {
|
|
414
|
+
background: inherit !important;
|
|
415
|
+
}
|
|
416
|
+
`;function Eo({section:e,...t}){const[{editing:n},r]=P(t,X),i=g.useMemo(()=>({...I.default(r,["listBorder","list","iconSize","imageSize"]),list:r.list?.map(s=>({...I.default(s,"icon","iconColor"),image:["news","simple","default"].includes(r.type)&&s.icon?s.icon:s.image,actions:s.actions?.map?.(l=>o.jsx(Ee,{...l,editing:n},l.id)),border:r.listBorder,iconSize:r.iconSize,imageSize:r.imageSize,hoverStyle:r.hoverStyle}))}),[r]);return o.jsx(Po,{style:n?{pointerEvents:"none"}:{},...i})}function Ao({properties:e,section:t,locale:n,dev:r}){return t?.config?.componentId?o.jsx(ae.CustomComponentRenderer,{instanceId:t.id,componentId:t.config.componentId,blockletId:t.config.blockletId,blockletTitle:t.config.blockletTitle,componentName:t.config.componentName,locale:n,properties:e,dev:r}):o.jsx(u.Box,{sx:{textAlign:"center",py:2},children:o.jsx(u.Typography,{variant:"caption",sx:{color:"text.secondary"},children:"Please select component to render"})})}function Lo({src:e,dataId:t,isEdit:n=!1,height:r="100%",onLoad:i=()=>{}}){return o.jsx(ht.EmbedIframe,{isEdit:n,embedId:t,src:e,height:r,onLoad:()=>{i()}})}function To({dataId:e,src:t,actions:n,center:r,onLoad:i,...s}){const[l,a]=P(s,Z);return o.jsxs(ee,{...a,children:[Object.keys(l).length>0&&o.jsx(Q,{center:r,...l}),o.jsx(Lo,{dataId:e,src:t,onLoad:i,height:s.iframeHeight?`${s.iframeHeight}px`:"100%"}),o.jsx(F,{actions:n,center:r})]})}const Wo={src:"",embedUrl:"",title:"",description:"",dark:!1,background:"",center:!0,config:{},id:""};function Fo({section:e,id:t,src:n,...r}){const i=`${t}-${r.locale}`,[{editing:s},l]=P(r,X),a=g.useRef({}),c=JSON.parse(JSON.stringify(l)),{message:d}=xt.useMessage(i,"server"),x=mt.useLatest(JSON.parse(JSON.stringify(l.config)||"{}"));return g.useEffect(()=>{d&&d.onInit(()=>x.current)},[d]),g.useEffect(()=>{const m=JSON.parse(JSON.stringify(l.config)||"{}");_t.default(a.current,m)||(a.current=m,d?.send("config-set",m))},[d,l.config]),n?o.jsx(To,{...c,dataId:i,src:n,style:s?{pointerEvents:"none"}:{}}):o.jsx(zo,{children:'Please set the "src" attribute for this block'})}const zo=_.styled("div")`
|
|
417
|
+
user-select: none;
|
|
418
|
+
color: #999;
|
|
419
|
+
padding: 8px;
|
|
420
|
+
height: 200px;
|
|
421
|
+
`,je={width:"1px",style:"solid",color:"divider"};function Te(e){return typeof e=="string"&&e.startsWith("custom:")}function Uo(e){if(!Te(e))return je;try{const t=e?.substring(7)||"",[n="1px",r="solid",...i]=t.split(" ");return{width:n,style:r,color:i.join(" ")||"divider"}}catch{return je}}function Oo(e){if(!e||e==="none")return{border:"none"};if(Te(e)){const{width:t,style:n,color:r}=Uo(e);return{border:"none",borderWidth:t,borderStyle:n,borderColor:r}}return{}}function We(e){return typeof e=="string"&&e.startsWith("custom:")}function qo(e){if(!We(e))return"0";try{return e?.substring(7)||"0"}catch{return"0"}}function Do(e){return!e||e==="none"?{borderRadius:0}:We(e)?{borderRadius:qo(e)}:{}}function Go({ref:e=void 0,type:t,sx:n,children:r,...i}){const s={overflow:"hidden !important",display:"grid !important"},l=[s,...Array.isArray(n)?n:[n]];return g.useCallback(()=>{const c=Et(t||""),d=At(t||"");return c?(l.push({img:{objectFit:"contain !important",bgcolor:x=>x.palette.background.default,borderRadius:"0 !important",position:"relative"}}),o.jsx($e.default,{type:t,sx:[{".screenshot--container":{...s,...Y.default(n,["p","px","py","pl","pr","pt","pb","ml","mr","mt","mb","alignItems"])}}],children:r})):d?o.jsxs(u.Box,{sx:{width:"100%",height:"100%",border:1,borderColor:"divider",overflow:"hidden"},children:[o.jsxs(u.Box,{sx:{height:"30px",backgroundColor:"divider",display:"flex",alignItems:"center",px:1.5},children:[o.jsxs(u.Box,{sx:{display:"flex",gap:.7,alignItems:"center"},children:[o.jsx(u.Box,{sx:{width:12,height:12,borderRadius:"50%",backgroundColor:"#ff5f57"}}),o.jsx(u.Box,{sx:{width:12,height:12,borderRadius:"50%",backgroundColor:"#febc2e"}}),o.jsx(u.Box,{sx:{width:12,height:12,borderRadius:"50%",backgroundColor:"#28c840"}})]}),t==="chrome-with-url"&&o.jsx(u.Box,{sx:{ml:2,height:"18px",width:"calc(100% - 80px)",backgroundColor:"white",borderRadius:.5}})]}),o.jsx(u.Box,{ref:e,sx:[...l,{position:"relative",height:"calc(100% - 30px)"}],...i,children:r})]}):o.jsx(u.Box,{ref:e,sx:l,...i,children:r})},[t,r,l])()}const Vo="none",Ho="none",Jo="center",Yo="start",Ko="none",Xo="none",Qo=12,Zo=({gridSettings:e,section:t,index:n,columns:r,simulateMode:i="desktop",isBackground:s})=>{const l=e?.[i]??{},a=l[t.id],c=en(l);return{i:t.id,static:t?.locked||s,...s?{x:0,y:0,w:r,h:1,isResizable:!1}:{x:a?.x??0,y:a?.y??n,w:a?.w??r,h:a?.h??1,isResizable:!0},minH:1,maxH:1,maxY:c}},en=e=>Object.values(e).reduce((t,n)=>Math.max(t,n.y||0),0)||0,tn=e=>{const{dev:t,id:n,section:r,onBlockRender:i}=e,s=t?.mode,l=u.useMediaQuery(y=>y.breakpoints.down("sm")),{t:a}=gt.useLocaleContext(),{sections:c,sectionIds:d,config:x}=r,{columns:m=Qo,gridSettings:h,gap:p,padding:v,background:f,backgroundVideoPoster:w,alignContent:k,justifyContent:C,border:N,borderRadius:M,ignoreMaxWidth:de}=x||{},te=g.useMemo(()=>{const B=A({type:"layoutBlockGap",value:p??Vo,format:"sx"}),L={...B,gap:Object.keys(B.gap||{}).reduce((T,$)=>(T[$]=-B.gap[$],T),{})};return{item:B,container:L}},[p]),ze=g.useMemo(()=>A({type:"layoutBlockPadding",value:v??Ho,format:"sx"}),[v]),oe=g.useMemo(()=>A({type:"layoutBlockAlignContent",value:k??Jo,format:"sx"}),[k]),ne=g.useMemo(()=>A({type:"layoutBlockJustifyContent",value:C??Yo,format:"sx"}),[C]),Ue=g.useMemo(()=>{const y=N??Ko,B=Oo(y);return Object.keys(B).length>0?B:A({type:"layoutBlockBorder",value:y,format:"sx"})},[N]),Oe=g.useMemo(()=>{const y=M??Xo,B=Do(y);return Object.keys(B).length>0?B:A({type:"layoutBlockBorderRadius",value:y,format:"sx"})},[M]),ue=g.useCallback((y,B=!1,L=0,T)=>{if(!i||!y||!y.component||y.visibility==="hidden")return null;const $=Zo({gridSettings:h,section:y,index:L,columns:m,simulateMode:l?"mobile":"desktop",isBackground:B}),U=$?.x??0,W=$?.y??0,qe=$?.w??m,De=$?.h??1,Ge=$?.maxY??0,Ve=!!r?.config?.backgroundSectionId;return o.jsx(u.Box,{className:B?"layout-block-background":"layout-block-component",sx:{...B?{gridColumn:"1 / -1",gridRow:`1 / ${Ge+1}`,zIndex:0,width:"100%",height:"100%","& > .BlockBase-root":{width:"100%",height:"100%"}}:{position:"relative",gridColumn:`${U+1} / span ${qe}`,gridRow:`${W+(Ve?0:1)} / span ${De}`,zIndex:1,minWidth:0,minHeight:0,...W>0?{mt:te?.item?.gap}:{},...U>0?{ml:te?.item?.gap}:{},"& > .BlockBase-root":{height:"100%",width:"100%",boxSizing:"border-box",position:"relative",...oe,...ne}}},children:T||i({id:y.id,type:y.component,config:{},section:{...y},mode:s})},y.id)},[n,s,i,h,m,l,te,oe,ne,de]),{backgroundElements:xe,contentElements:me}=g.useMemo(()=>{const y=[],B=[];return d?.forEach((L,T)=>{const $=c?.[L];if(!$)return;const U=r?.config?.backgroundSectionId===L,W=ue($,U,T);W&&(U?y.push(W):B.push(W))}),{backgroundElements:y||[],contentElements:B||[]}},[ue,c,d,f,w]);return s==="draft"&&!xe?.length&&!me?.length?o.jsxs(u.Box,{sx:{gridColumn:"1 / -1",gridRow:"1",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,border:y=>`2px dashed ${y.palette.divider}`,borderRadius:2,padding:4,color:"text.secondary",textAlign:"center",minHeight:"160px",position:"relative"},children:[o.jsx(u.Box,{sx:{fontSize:"48px",opacity:.5},children:"📐"}),o.jsx(u.Box,{sx:{fontSize:"16px",fontWeight:500,marginBottom:1},children:"Section Layout"}),o.jsx(u.Box,{sx:{opacity:.7,whiteSpace:"pre-line"},children:a("maker.layoutBlock.draftPlaceholder")}),o.jsx(u.Box,{sx:{position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",opacity:.1,background:y=>`
|
|
422
|
+
repeating-linear-gradient(
|
|
423
|
+
90deg,
|
|
424
|
+
transparent,
|
|
425
|
+
transparent calc(100% / ${m} - 1px),
|
|
426
|
+
${y.palette.grey[400]} calc(100% / ${m} - 1px),
|
|
427
|
+
${y.palette.grey[400]} calc(100% / ${m})
|
|
428
|
+
)
|
|
429
|
+
`}})]}):o.jsxs(Go,{type:N,sx:{position:"relative",display:"grid",gridTemplateColumns:`repeat(${m}, minmax(0, 1fr))`,alignItems:"stretch",width:"100%",height:"100%",minWidth:0,boxSizing:"border-box",overflow:"hidden",...ze,...oe,...ne},children:[f&&o.jsx(u.Box,{sx:{position:"absolute",zIndex:-1,top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",overflow:"hidden"},children:o.jsx(ce,{background:f,backgroundVideoPoster:w,sx:{width:"inherit",height:"inherit"}})}),o.jsxs(o.Fragment,{children:[r?.id&&o.jsx(u.GlobalStyles,{styles:y=>y.unstable_sx({[`#BlockBase-${r.id}`]:{...de&&{maxWidth:"unset !important",px:0},"& > div":{...Ue,...Oe,overflow:"hidden"}}})}),xe,me]})]})},on=["title","description","actions","badge","tag","prepend","append","logo"];function nn({image:e,imageBorder:t,imageShadow:n,className:r,reverse:i=!1,fullSizeImage:s,...l}){const[a,c]=P(l,Z),d=Object.keys(a).length>0&&Object.values(Y.default(a,on)).filter(Boolean).length>0&&o.jsx(Q,{...a}),x=g.isValidElement(e)?e:o.jsx(u.Box,{component:"img",src:e,alt:"",className:"block"}),m=["phone","macbook"].includes(t),h=e&&o.jsx(u.Box,{className:b.cx("section__image","m-auto, leading-[1] text-center",n&&"shadow-xl",a?.center?"flex justify-center items-center":""),sx:{border:t===!0?"1px solid #c0c0c0":void 0,borderRadius:2,overflow:"hidden","> div":m?{width:"100%",video:{borderRadius:"0 !important"}}:void 0},children:m?o.jsx($e.default,{type:t,sx:{width:"100%"},children:x}):x});return o.jsx(ee,{className:b.cx("section--block",r,s&&!i&&b.css`
|
|
430
|
+
.section-bg {
|
|
431
|
+
height: 80%;
|
|
432
|
+
}
|
|
433
|
+
`),...c,boxProps:s?{sx:{padding:0,overflow:"hidden"}}:void 0,children:o.jsx(Le,{col:e?2:1,className:s?b.css`
|
|
434
|
+
display: flex;
|
|
435
|
+
flex-direction: column;
|
|
436
|
+
|
|
437
|
+
> .base-info,
|
|
438
|
+
> .section__image {
|
|
439
|
+
width: 100%;
|
|
440
|
+
|
|
441
|
+
> img,
|
|
442
|
+
> video {
|
|
443
|
+
width: 100%;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
`:void 0,children:i?o.jsxs(o.Fragment,{children:[h,d]}):o.jsxs(o.Fragment,{children:[d,h]})})})}const rn=[/youtu\.be\/([^#&?]{11})/,/\?v=([^#&?]{11})/,/&v=([^#&?]{11})/,/embed\/([^#&?]{11})/,/\/v\/([^#&?]{11})/];function sn(e){if(/youtu\.?be/.test(e))for(const t of rn){const n=t.exec(e)?.[1];if(n)return n}}function an(e){const t=sn(e);if(t)return`https://youtube.com/embed/${t}`}function ln({src:e}){return g.useEffect(()=>{import("@lottiefiles/lottie-player")},[]),o.jsx("lottie-player",{autoplay:!0,loop:!0,mode:"normal",src:e})}function cn(e){return o.jsx(u.Box,{sx:{maxHeight:400,overflow:"hidden auto"},children:o.jsx(yt.TwitterTimelineEmbed,{...e})})}function dn({url:e}){const t=g.useRef(null),n=495,[r,i]=g.useState(t.current?t.current.offsetWidth*.5625:n),s=g.useCallback(()=>{const l=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,a=t.current?t.current.offsetWidth*.5625:n;return i(Math.floor(a*l))},[]);return g.useEffect(()=>{window.addEventListener("resize",s);const l=window.innerWidth>990?1:window.innerWidth>522?1.2:window.innerWidth>400?1.45:1.85,a=t.current?t.current.offsetWidth*.5625:n;return i(Math.floor(a*l)),function(){window.removeEventListener("resize",s)}},[r,s]),o.jsx(u.Box,{component:"iframe",ref:t,title:"youtube",src:e,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,sx:{width:"100%",height:`${r}px`,display:"block"}})}const un={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},xn=_.styled(nn)`
|
|
447
|
+
.section__description {
|
|
448
|
+
}
|
|
449
|
+
`;function mn({hasImage:e,fullSizeImage:t,boxed:n,videoPoster:r,imageMeta:i,imageOptimization:s,imageSize:l,section:a,...c}){const[{editing:d},x]=P({...c,boxed:t?void 0:n},X);let m=pn(x.image,r,t,i,s,l);e||(m=null);let h=null;return x.actions&&(h=x.actions?.map?.((p,v)=>o.jsx(Ee,{...p,editing:d},v))),o.jsx(xn,{...x,style:d?{pointerEvents:"none"}:{},image:m,fullSizeImage:e&&t,actions:h})}function pn(e,t,n,r,i,s){if(e){if(e.endsWith(".json"))return o.jsx(ln,{src:e});if(e.indexOf("twitter.com")!==-1)return o.jsx(cn,{sourceType:"url",url:e});const l=an(e);if(l)return o.jsx(dn,{url:l});const{naturalWidth:a,naturalHeight:c,filename:d}=r||{};if(q(e))return o.jsx("video",{width:a&&`${a}px`,height:c&&`${c}px`,controls:!0,autoPlay:!0,muted:!0,style:{display:"block",objectFit:s||"contain",borderRadius:"8px",width:"100%",height:"100%"},poster:j.autoResizeImage(j.getImageAbsoluteUrl(t),n?1200:540,i),children:o.jsx("source",{src:j.getImageAbsoluteUrl(e),type:xo(e)})},e);const x=i==="quality"?1:.6;return o.jsx(ae.ResponsiveImage,{src:j.getImageAbsoluteUrl(e),sizesAttr:{sm:600*x,md:450*x,lg:540*x,...n&&{md:900*x,lg:1200*x}},width:a&&`${a}px`,height:c&&`${c}px`,alt:d??e,style:{objectFit:s||"contain",display:"block",width:"100%",height:"100%"},loading:"lazy"})}return null}const hn=["production","draft"];function gn({mode:e,version:t}={}){const n=t&&typeof t=="number"?{mode:e,version:t}:{mode:e};return j.api.get(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages`,{params:n}).then(r=>r.data)}function fn({mode:e,routes:t}){return j.api.post(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages/publish`,{mode:e,routes:t}).then(n=>n.data)}function yn({locale:e,sort:t,page:n,limit:r,mode:i}={}){return j.api.get(`/api/${j.getProjectIdFromPathnameOrWindow()}/pages/toc`,{params:{locale:e,sort:t,page:n,limit:r,mode:i}}).then(s=>s.data)}const bn={style:"list",sort:"-updatedAt"},ke=20;function vn({style:e,sort:t,section:n,...r}){const[{editing:i,locale:s},l]=P(r,X),[a,c]=P(l,Z),[d,x]=g.useState(),m=g.useRef(!1),h=ge.useUpdate(),p=se.useNavigate(),v=g.useCallback(async()=>{if(!m.current){m.current=!0,h();try{const f=d?Math.floor(d.list.length/ke)+1:1,{list:w,total:k}=await yn({locale:s,sort:t,page:f,limit:ke});x(C=>({list:(C?.list??[]).concat(w),total:k}))}finally{m.current=!1,h()}}},[d,s,t,h]);return ge.useMount(()=>{v()}),o.jsxs(ee,{...c,sx:i?{pointerEvents:"none"}:{},children:[Object.keys(a).length>0&&o.jsx(Q,{...a}),d?o.jsxs(o.Fragment,{children:[o.jsx(u.Grid,{container:!0,spacing:2,sx:{justifyContent:"center"},children:d?.list.map(f=>o.jsx(u.Grid,{size:{xs:12,sm:e==="card"?6:12,md:e==="card"?3:12},children:o.jsxs(wn,{elevation:0,className:b.cx(e==="card"&&"style-card"),onClick:i?void 0:()=>p(f.slug),children:[!!f.image&&o.jsx(u.CardMedia,{component:"img",alt:"",image:j.autoResizeImage(j.getImageAbsoluteUrl(f.image),540),loading:"lazy"}),o.jsxs(u.CardContent,{children:[o.jsx(u.Typography,{variant:"h6",component:"div",className:_e,children:f.title||f.id}),o.jsx(u.Typography,{variant:"body2",className:_e,children:f.description})]})]})},f.id))}),o.jsx(u.Box,{sx:{textAlign:"center",mt:2},children:d.total>d.list.length?o.jsx(D,{variant:"outlined",color:"secondary",onClick:v,loading:m.current,children:"More"}):o.jsx(D,{variant:"outlined",color:"secondary",disabled:!0,children:"No More"})})]}):o.jsx(u.Box,{sx:{p:2,textAlign:"center"},children:o.jsx(u.CircularProgress,{size:24})})]})}const _e=b.css`
|
|
450
|
+
display: -webkit-box;
|
|
451
|
+
-webkit-box-orient: vertical;
|
|
452
|
+
-webkit-line-clamp: 2;
|
|
453
|
+
overflow: hidden;
|
|
454
|
+
text-overflow: ellipsis;
|
|
455
|
+
`,wn=_.styled(u.Card)`
|
|
456
|
+
border: 1px solid #e0e0e0;
|
|
457
|
+
background-color: transparent;
|
|
458
|
+
cursor: pointer;
|
|
459
|
+
display: flex;
|
|
460
|
+
color: inherit;
|
|
461
|
+
|
|
462
|
+
> .MuiCardMedia-root {
|
|
463
|
+
width: 30vw;
|
|
464
|
+
max-height: 50vw;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
&.style-card {
|
|
468
|
+
display: block;
|
|
469
|
+
|
|
470
|
+
> .MuiCardMedia-root {
|
|
471
|
+
width: 100%;
|
|
472
|
+
max-height: 50vw;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
`,jn={iframe:Fo,section:mn,"section-card-list":Eo,toc:vn,"custom-component":Ao,"layout-block":tn};function Fe({id:e,type:t,mode:n,config:r,section:i,ignorePageMetaStyle:s,page:l,...a}){const c=jn[t],{getPageMetaStyle:d}=Kt(),x=g.useMemo(()=>{const{height:p,...v}=r;return t==="layout-block"&&(v.onBlockRender=f=>{const w={...r?.dev,...f?.config?.dev},{defaultLocale:k}=w,C={...Y.default(r,["locale","editing"]),...f?.config,dev:w},{locale:N}=C;let M=l?.dataSource?.[f?.id]?.[N];return bt.default(M)&&(M=l?.dataSource?.[f?.id]?.[k??"en"]),o.jsx(Fe,{...f,config:{...f?.section?.properties,...M,...C},page:l,ignorePageMetaStyle:!0})}),v},[r,t]),m=g.useMemo(()=>{const p={};return t!=="custom-component"&&(p.height=r.height),p.sx=s?void 0:d("sx"),p.id=`BlockBase-${e}`,p},[r.height,s,t,d]),h=c&&o.jsx(c,{mode:n,...x,id:e,section:i});return h?o.jsx(Qt,{...a,...m,children:h}):o.jsx(kn,{type:t})}function kn({type:e}){return o.jsx(u.Box,{sx:{p:2},children:o.jsxs(u.Alert,{icon:o.jsx(et.ErrorOutline,{}),color:"error",children:["Unsupported Block `",e,"`"]})})}exports.BlockRenderer=Fe;exports.IFrameBlockDefaultProps=Wo;exports.PageProvider=Xt;exports.Provider=eo;exports.STATE_MODES=hn;exports.SectionBlockDefaultProps=un;exports.TocDefaultProps=bn;exports.getPages=gn;exports.publishPages=fn;
|