"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[249,795],{94984:(O,y,t)=>{t.d(y,{A:()=>A});var e=t(48322),c=t(67115);const $=c.Ay.div` ${()=>(0,c.AH)``} `;var g=t(33689);const A=({title:_,items:r,className:v})=>!r||r.length<=0?null:e.createElement($,{className:`accordion ${v||""}`},_&&e.createElement("h2",{className:"accordion__title"},_),r.map((p,n)=>e.createElement(g.A,{key:n,title:p.title,canvas:p.canvas,canvasData:p.canvasData},p.children)))},33689:(O,y,t)=>{t.d(y,{A:()=>_});var e=t(48322),c=t(67115);const $=c.Ay.div` ${({theme:{colors:r,spacing:v}})=>(0,c.AH)` width: 100%; &.is-closed { .accordion-item__button { border-bottom: 1px solid ${r.light.brand.lightGold}; background-color: white; } } .accordion-item__button::before, .accordion-item__button::after { content: ''; position: absolute; right: 10px; top: 50%; width: 16px; height: 2px; background-color: currentColor; transition: transform 0.3s ease-in-out; } .accordion-item__button::before { transform: rotate(0); } .accordion-item__button::after { transform: rotate(90deg); } &.is-open .accordion-item__button::before { transform: rotate(180deg); } &.is-open .accordion-item__button::after { transform: rotate(0); } /* &.is-open .accordion-item__button { background-size: 100% 100%; } */ .accordion-item__button { position: relative; padding: ${v.xs} ${v.xxxs}; margin: 0; border: none; border-bottom: 1px transparent; width: 100%; text-align: left; background-color: white; cursor: pointer; background: linear-gradient(to right, #f6f6f6, #f6f6f6) no-repeat; background-size: 0 100%; transition: background-size 0.5s ease-in-out; &:hover { background-size: 100% 100%; } &:hover, &:focus-visible { background-size: 100% 100%; } } .accordion-item__label { display: flex; flex-direction: row; justify-content: space-between; align-items: center; .label { padding-right: ${v.s}; margin: 0; color: ${r.light.brand.darkBlue}; flex-grow: 1; } .accordion-item__icon { color: ${r.light.brand.darkBlue}; min-height: 24px; min-width: 24px; } } .accordion-item__content { max-height: 0; overflow: hidden; transition: max-height 1s ease-out, opacity 1s ease-out; opacity: 0; border-bottom: 1px solid ${r.light.brand.lightGold}; padding: ${v.xs} ${v.xxxs}; &.is-open { max-height: unset; min-height: 100%; opacity: 1; } } `} `;var g=t(12233),i=t(98401);const _=({title:r,children:v,className:p,initialState:n=!1,canvas:u=!1,canvasData:x})=>{const[s,l]=(0,e.useState)(n),E=d=>{d.stopPropagation(),l(!s)};return e.createElement($,{className:`accordion-item ${p||""} ${s?"is-open":"is-closed"}`},e.createElement("button",{className:"accordion-item__button",onClick:d=>E(d),"aria-expanded":!!s,"aria-controls":r?.replace(/\s+/g,"-").toLowerCase()},e.createElement("span",{className:"accordion-item__label"},e.createElement("p",{className:"h6 label"},r))),s?e.createElement("div",{className:`accordion-item__content ${s?"is-open":"is-closed"}`,"aria-labelledby":r,id:r?.replace(/\s+/g,"-").toLowerCase()},u&&x?e.createElement(g.default,{className:"content",data:x}):null,v&&e.createElement(i.VK,{className:"content",text:v})):null)}},12233:(O,y,t)=>{t.r(y),t.d(y,{default:()=>F});var e=t(48322),c=t(76550),f=t(67820);const g=o=>{const{link:k,newTab:L}=o.block.properties||{},K={path:k?.sys?.uri,openInNewWindow:L};return e.createElement(f.A,{...K},e.createElement(c.N_.Children,{block:o.block}))};var i=t(67115),A=t(82472),_=t(85703);const v=i.Ay.div` ${()=>(0,i.AH)` display: flex; flex-direction: column; * { margin-block-start: 1em; &:first-child { margin-block-start: 0; } } .testimonial { margin-block: 2.5em; } .accordion { margin-block: 2em; & > .accordion-item { margin-block-start: 0; &:last-child { margin-block-start: 0; } } .accordion-item { .accordion-item__button { margin-block: 0; .accordion-item__label { .accordion-item__icon { margin-block-start: 0; } } } } } .accordion-item { margin-block-start: 0; } hr { width: 100%; } ul, ol { font-weight: 600; color: ${A.T.light.brand.darkBlue}; li::marker { color: ${A.T.light.brand.gold}; } } a { text-decoration: underline; } ${_.Ju}; .canvas-button { &:hover, &:focus-visible { transform: scale(1); } } img { align-self: center; max-height: 600px; } `} `;var p=t(94984),n=t(93149);const u=o=>{if(!o.block.value)return null;const k=(0,n.e)(o.block.value);return k?e.createElement(p.A,{...k}):null};var x=t(83692);const s=o=>({title:o.title,children:o.content});var l=t(33689);const E=o=>o.block.value?e.createElement(l.A,{...(0,x.mapJson)(o.block.value,s)}):null,d=o=>({label:o.label,buttonTheme:o.buttonTheme,link:o.url});var b=t(69352);const a=o=>o.block.value?e.createElement(b.A,{...(0,x.mapJson)(o.block.value,d),className:"canvas-button"}):null;var h=t(49240),m=t(60554);const w=o=>o.block.value?e.createElement(h.A,{...(0,x.mapJson)(o.block.value,m.T)}):null,M=o=>{const k={data:o?.block?.value?.snippet?.content};return!k.data||k.data.length<=0?null:e.createElement(F,{...k})},B={},C={accordion:u,accordionItem:E,button:a,snippet:M,videoComponent:w};var N=t(95443);const T=({citation:o,quote:k,source:L,url:K})=>(console.log(k),e.createElement(S,{className:"quote flow",cite:K},e.createElement("p",{className:"quote__text h6"},e.createElement(N.A,{icon:"quote",className:"quote__icon",size:24}),typeof k=="string"?e.createElement("span",null,k):e.createElement(e.Fragment,null,k)),(L||o)&&e.createElement("footer",{className:"quote__footer"},L&&e.createElement("span",{className:"quote__source"},L),L&&o&&" ",o&&e.createElement("cite",{className:"quote__cite"},K?e.createElement(f.A,{className:"quote__cite__link",path:K},o):o)))),S=i.Ay.blockquote` padding-block: 1em; padding-inline-start: ${o=>o.theme.spacing.s}; border-left: 6px solid ${o=>o.theme.colors.dark.brand.darkBlue}; .quote__text { color: ${o=>o.theme.colors.dark.neutral.black}; display: flex; align-items: flex-start; gap: ${o=>o.theme.spacing.xxs}; } .quote__icon { flex-shrink: 0; fill: ${o=>o.theme.colors.dark.neutral.black}; } .quote__source, .quote__cite { display: block; margin-block-start: ${o=>o.theme.spacing.xxs}; } .quote__cite a { color: ${o=>o.theme.colors.dark.brand.lightBlue}; } `,R=T,P=o=>{const k={citation:o.block.properties?.citation,source:o.block.properties?.source,url:o.block.properties?.url,quote:o.block.value};return e.createElement(R,{...k})},F=({data:o,className:k})=>o?e.createElement(v,{className:k||""},e.createElement(c.Tz,{blocks:{_link:g,_quote:P},components:C},e.createElement(c.A4,{data:o}))):null},67838:(O,y,t)=>{t.d(y,{A:()=>x});var e=t(48322),c=t(67115),f=t(85703);const g=c.Ay.div` ${({theme:{mq:s,spacing:l},cardRowTheme:E="gold",layout:d})=>{const b=(0,f.DF)(E);return(0,c.AH)` position: relative; &.container { padding-bottom: 28px; @media ${s.min.px.tablet} { padding-bottom: 64px; } } .card-row__wrapper { display: flex; flex-flow: column nowrap; align-items: stretch; position: relative; gap: var(--space-m-l, ${l.s}); &.container { ::before { ${(0,f.uY)(b,"cards")} } } @media ${s.min.px.tablet} { flex-flow: row wrap; } } .card-row__card { margin-inline: auto; width: 100%; flex: 1; @media ${s.min.px.tablet} { margin-inline: 0; flex: ${d==="container"?"1 0 calc(33% - var(--grid-gutter))":"1 0 calc(50% - var(--grid-gutter))"}; } @media ${s.min.px.laptop} { flex: ${d==="container"?"0 0 100%":"1 0 calc(50% - var(--grid-gutter))"}; } @media screen and (min-width: 1200px) { flex: ${d==="container"?"1":"1 0 calc(25% - var(--grid-gutter))"}; } } &.full-width { background-color: ${b}; } `}} `,A=c.Ay.div` ${({theme:{colors:s,mq:l},cardTheme:E="blue",rounded:d,hideDescription:b})=>{const a=(0,f.DF)(E);return(0,c.AH)` position: relative; display: flex; flex-flow: column nowrap; transition: all 1s ease-in-out; cursor: pointer; overflow: hidden; &:hover, &:focus-within { .card__image { transform: scale(1.05); } } .card__media { order: -1; height: 180px; min-height: 180px; width: 100%; overflow: hidden; } .card__image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease-in-out; } .card__content { display: flex; flex-flow: column nowrap; padding: var(--space-m-l) 1.5rem var(--space-3xl-4xl) var(--space-s-m); background-color: ${a}; height: 100%; } .card__category { order: -1; margin-block-end: 0.5em; font-weight: 700; color: ${s.light.neutral.grey80}; @media ${l.min.px.largeMobile} { margin-block-end: 1em; } } .card__title { margin-block-end: 0.5em; font-weight: 700; @media ${l.min.px.largeMobile} { font-weight: 600; } a { color: ${s.light.brand.darkBlue}; text-decoration: none; &::after { ${f.A4}; z-index: 1; } } } ${b&&(0,c.AH)` .card__description { display: none; } .card__content { padding-block-end: ${d==="start"?"2.5rem":"1.5rem"}; } `} ${d==="start"&&(0,c.AH)` .card__image { border-top-right-radius: 50px; @media ${l.min.px.tablet} { border-radius: 0; } } .card__content { @media ${l.min.px.tablet} { border-bottom-left-radius: 50px; } } `} ${d==="end"&&(0,c.AH)` .card__content { border-bottom-left-radius: 50px; @media ${l.min.px.tablet} { border-radius: 0; } } .card__image { @media ${l.min.px.tablet} { border-top-right-radius: 50px; } } `} `}} `;var _=t(42501),r=t(67820);const p=({title:s,image:l,url:E,description:d,category:b,cardTheme:a="blue",rounded:h="none",hideDescription:m=!1,className:w})=>s?e.createElement(A,{className:`card ${w||""}`,cardTheme:a,rounded:h,hideDescription:m},e.createElement("div",{className:"card__content"},e.createElement("h2",{className:"[ h4 ] card__title"},e.createElement(r.A,{path:E},s)),b&&e.createElement("p",{className:"card__category"},b),d&&e.createElement("p",{className:"card__description"},d)),l&&l.src&&e.createElement("div",{className:"card__media"},e.createElement(_.A,{src:l.src,alt:l.alt,width:328,height:180,className:"card__image",id:"card-image"}))):null;var n=t(93216);const x=({cards:s,cardRowTheme:l,layout:E="full-width",className:d,related:b=!1})=>s?e.createElement(g,{cardRowTheme:l,layout:E,className:`card-row ${E} ${d||""}`},e.createElement("div",{className:`card-row__wrapper ${E}`},s.map((a,h,{length:m})=>{let w="none";return m-1===h?w="end":h===0&&(w="start"),b?e.createElement(n.ListingCard,{...a,key:h,className:"card-row__card",borderColor:"gold"}):e.createElement(p,{key:h,...a,rounded:w,className:"card-row__card"})}))):null},92040:(O,y,t)=>{t.d(y,{A:()=>b});var e=t(48322),c=t(67115),f=t(10394);const g=c.Ay.div` ${({theme:{colors:a,mq:h,spacing:m}})=>(0,c.AH)` padding-block: var(--space-m-xl, ${m.xl}); .u-container { display: flex; flex-direction: column-reverse; justify-content: space-between; gap: ${(0,f.A)(36)}; @media ${h.min.px.desktop} { flex-direction: row; } } .course-hero__content-container { display: flex; flex-direction: column; justify-content: space-evenly; height: inherit; gap: ${m.xs}; flex: 1; } .course-hero__text-container { order: 2; } .course-hero__title, .course-hero__award { color: ${a.light.brand.darkBlue}; } .course-hero__title { font-weight: 600; text-wrap: balance; &.course-hero__title--long { font-size: var(--step-4); font-weight: 700; } @media ${h.min.px.desktop} { font-size: 3.75rem; line-height: normal; } } .course-hero__description { padding-top: ${m.xs}; } .course-hero__tag-container { display: flex; gap: ${m.xxs}; order: 1; } .course-hero__approval-tag { &:hover { cursor: pointer; background-color: ${a.light.brand.darkBlue}; } } .course-hero__subject-to-approval-link { color: white; text-decoration: none; } .course-hero__button-container { display: flex; gap: ${m.xxs}; order: 3; align-items: stretch; } .course-hero__button { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 100%; @media ${h.min.px.tablet} { width: 50%; } } .course-hero__image-container { flex: 1; img { width: 100%; height: auto; object-fit: cover; } } .course-hero__options { order: 2; } .course-hero__select { --select-border: ${a.light.neutral.grey80}; --select-focus: ${a.light.brand.burgundy}; --select-arrow: var(--select-border); position: relative; display: grid; grid-template-areas: 'select'; align-items: center; width: 100%; border: 1px solid var(--select-border); border-radius: 4px; padding: 1em; cursor: pointer; background-color: #fff; background-image: linear-gradient(to top, #f9f9f9, #fff 33%); &::after { content: ''; grid-area: select; justify-self: end; width: 0.8em; height: 0.5em; background-color: var(--select-border); clip-path: polygon(100% 0%, 0 0%, 50% 100%); } select { // Reset default styles grid-area: select; appearance: none; background-color: transparent; border: none; padding: 0 1em 0 0; margin: 0; width: 100%; font-family: inherit; font-size: inherit; cursor: inherit; line-height: inherit; outline: none; } select:focus + .focus { position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px; border: 4px solid var(--select-focus); border-radius: inherit; } } `} `;var i=t(85703);const _=c.Ay.p` ${({theme:{colors:a,spacing:h},tagTheme:m="lightGrey"})=>{const w=(0,i.DF)(m),D=m==="lightGrey"?a.light.brand.darkBlue:a.light.neutral.white;return(0,c.AH)` inline-size: fit-content; padding: ${h.xxxs}; background-color: ${w}; color: ${D}; font-size: var(--step--1, 0.875rem); `}} `,v=({label:a,tagTheme:h,className:m})=>a?e.createElement(_,{className:`tag ${m||""}`,tagTheme:h},a):null;var p=t(69352),n=t(42501),u=t(43266),x=t(39289),s=t(67820),l=t(92301);const E=a=>!!(a&&a.length>40),b=({tags:a,title:h,awards:m,description:w,applicationCTA:D,secondaryCTA:M,image:B,subjectToApprovalTag:C,id:N,setId:T})=>{const S=(0,u.d4)(x.Hy),R=(0,u.d4)(l.Wp),U=P=>{T(P)};return h?e.createElement(g,null,e.createElement("div",{className:"u-container"},e.createElement("div",{className:"course-hero__content-container"},e.createElement("div",{className:"course-hero__text-container"},e.createElement("h1",{className:`course-hero__title ${E(h)?"course-hero__title--long":""}`},h),e.createElement("p",{className:"h3 course-hero__award"},m.map(P=>P)),w&&e.createElement("p",{className:"h5 course-hero__description"},w)),e.createElement("div",{className:"course-hero__tag-container"},a&&a.length>0&&e.createElement(e.Fragment,null,a.map((P,I)=>e.createElement(v,{key:I,...P,tagTheme:"lightGrey"}))),C?.subjectToApproval&&C?.subjectToApprovalLabel&&C?.subjectToApprovalUrl&&e.createElement(v,{label:e.createElement(s.A,{className:"course-hero__subject-to-approval-link",path:C.subjectToApprovalUrl},C.subjectToApprovalLabel),className:"course-hero__approval-tag",tagTheme:"blue"})),e.createElement("div",{className:"course-hero__button-container"},D&&e.createElement(p.A,{openInNewWindow:!0,className:"course-hero__button",...D}),M&&e.createElement(p.A,{className:"course-hero__button",...M})),R&&R?.content?.options?.length>1?e.createElement("div",{className:"course-hero__options"},e.createElement("label",{htmlFor:"course-options",className:"sr-only"},"Select course option"),e.createElement("div",{className:"course-hero__select"},e.createElement("select",{name:"course-options",id:"course-options",onChange:P=>U(P.target.value),value:N},R?.content?.options?.map(P=>e.createElement("option",{key:P.id,value:P.id},P.title,", ",P.intakeData.studyMode.title))),e.createElement("span",{className:"focus"}))):null),e.createElement("div",{className:"course-hero__image-container"},B||S?e.createElement(n.A,{id:"course-hero__image",src:B.src?B.src:S?.src?S.src:"",alt:B.alt?B.alt:S?.alt?S.alt:"",height:412,width:540}):null))):null}},60118:(O,y,t)=>{t.d(y,{A:()=>g});var e=t(48322),c=t(67115);const f=({error:i,entryTitle:A,entryId:_})=>e.createElement($,null,e.createElement("div",{className:"error-panel"},e.createElement("h1",null,"Entry Validation Error",A&&_?`: ${A} (${_})`:null),i&&i?.details?.length>0&&e.createElement("p",null,"Please resolve the following ",i.details.length," issues:"),i?.details?.map((r,v)=>e.createElement("div",{className:"error",key:v},e.createElement("code",null,e.createElement("span",null,e.createElement("strong",null,"Code")," ",r.code),"expected"in r&&e.createElement("span",null,e.createElement("strong",null,"Expected")," ",r?.expected),"received"in r&&e.createElement("span",null,e.createElement("strong",null,"Received")," ",r?.received),r.path&&r.path?.length>0&&r.path.map((p,n)=>e.createElement("span",{key:n},e.createElement("strong",null,"Field ID")," ",p)),e.createElement("span",null,e.createElement("strong",null,"Message")," ",r.message)))))),$=c.Ay.div` display: flex; padding: 2rem; h1 { margin-block-end: 0.25rem; font-size: 1.5rem; font-weight: 600; color: ${i=>i.theme.colors.light.brand.darkBlue}; } p { margin-block-end: 0.5em; } .error { margin-block-end: 1rem; } code { display: block; padding: 1rem; border: 1px solid ${i=>i.theme.colors.light.brand.lightBlue}; border-radius: 4px; background-color: ${i=>i.theme.colors.light.brand.lighterBlue}; span { display: block; } } `,g=f},54337:(O,y,t)=>{t.d(y,{A:()=>i});var e=t(48322),c=t(95443),f=t(98401),$=t(12774);const i=({icon:A,label:_,content:r,className:v,breakContent:p,id:n,setId:u})=>!_&&!r?null:e.createElement("li",{className:`key-fact ${v||""}`},e.createElement("span",{className:"key-fact__label"},e.createElement(c.A,{icon:A,size:24,className:"key-fact__icon"}),_||null,!p&&r?e.createElement("span",{className:"key-fact__content"},r.type==="markup"&&e.createElement(f.VK,{text:r.text}),r.type==="dropdown"&&e.createElement($.m,{id:n,setId:u,...r})):null),p&&r?e.createElement(e.Fragment,null,r.type==="markup"&&e.createElement("span",{className:"key-fact__content key-fact__content--break"},e.createElement(f.VK,{className:"flow",text:r.text})),e.createElement("span",{className:"key-fact__content"},r.type==="dropdown"&&e.createElement($.m,{id:n,setId:u,...r}))):null)},55141:(O,y,t)=>{t.d(y,{A:()=>$});var e=t(67115),c=t(10394);const $=e.Ay.div` ${({theme:{colors:g,spacing:i}})=>(0,e.AH)` .fact-list { padding: 0; margin: 0; margin-block-start: var(--space-2xs-xs, ${i.xxxs}); list-style: none; } .key-fact { padding: var(--space-xs-s, ${i.xxxs}); border-bottom: 1px solid ${g.light.brand.gold}; color: ${g.light.brand.darkBlue}; } .key-fact__label { display: flex; gap: 8px; } .key-fact__icon { color: ${g.light.brand.midBlue}; } .key-fact__content--break { display: block; margin-block-start: var(--space-3xs-2xs, ${i.xxxs}); margin-inline-start: ${i.s}; } .key-fact-option { display: flex; justify-content: space-between; inline-size: fit-content; padding: 0.5em; margin-block-start: 0.375em; border: none; border-radius: 4px; width: 100%; background: none; text-align: left; color: ${g.light.brand.gold}; touch-action: manipulation; cursor: pointer; transition: all 200ms ease; &.key-fact-option--active { border: 2px solid ${g.light.brand.midBlue}; } &.key-fact-option--singular { cursor: default; } &:hover, &:focus-within { span, .chevron-icon { color: ${g.light.brand.darkBlue}; transition: all 200ms ease; } } span { font-weight: 700; color: ${g.light.brand.midBlue}; &.active { text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; } } &:disabled { cursor: not-allowed; span { color: ${g.light.neutral.grey}; } } .chevron-icon { min-width: 24px; border-radius: 50%; border: 2px solid currentColor; color: ${g.light.brand.midBlue}; } } .options-list { padding: 0; margin: 0; margin-block-start: var(--space-2xs-xs, ${(0,c.A)(12)}); list-style: none; & li { margin-block-start: var(--space-3xs-2xs, ${i.xxxs}); } } .buttons-container { display: flex; flex-flow: column nowrap; gap: var(--space-2xs-xs, ${(0,c.A)(12)}); margin-block-start: var(--space-m-l, ${i.s}); button, a { width: 100%; } } `} `},12774:(O,y,t)=>{t.d(y,{A:()=>v,m:()=>_});var e=t(48322),c=t(43266),f=t(92301),$=t(55141),g=t(69352),i=t(54337),A=t(95443);const _=({options:p,initialState:n=!1,id:u,setId:x})=>{const[s,l]=(0,e.useState)(n),E=(0,c.d4)(f.Wp),d=p.find(a=>a.id===u),b=a=>{x(a)};return!p||p.length<=0?null:e.createElement(e.Fragment,null,E?.content?.options&&E?.content?.options.length>1?e.createElement(e.Fragment,null,e.createElement("button",{onClick:()=>l(!s),"aria-expanded":!!s,"aria-controls":d?.title?.replace(/\s+/g,"-").toLowerCase(),className:`key-fact-option ${d?.id===u&&"key-fact-option--active"}`},e.createElement("span",{className:"active"},d?.title),e.createElement(A.A,{className:"chevron-icon",icon:s?"arrowUp":"arrowDown",size:24})),s?e.createElement("ul",{className:"options-list"},E?.content?.options.map((a,h)=>e.createElement("li",{key:`${a.title}-${h}`},e.createElement("button",{onClick:()=>b(a.id),disabled:u===a.id,className:"key-fact-option"},e.createElement("span",null,a.title))))):null):e.createElement("div",{className:"key-fact-option key-fact-option--singular"},e.createElement("span",{className:"active"},d?.title)))},v=({applicationCTA:p,secondaryCTA:n,facts:u,hideApplyNow:x,id:s,setId:l,events:E})=>{const d=(0,c.d4)(f.Wp);if(!u||u.length<=0)return null;const b=(h,m,...w)=>[...h.slice(0,m),...w,...h.slice(m)];let a=u;return d&&!E&&(a=b(u,2,d)),e.createElement($.A,null,e.createElement("h2",{className:"h4 key-facts__title"},E?"Event details":"Key facts"),e.createElement("ul",{className:"fact-list"},a.map((h,m)=>e.createElement(i.A,{key:m,...h,id:s,setId:l}))),e.createElement("div",{className:"buttons-container"},p&&p.link&&e.createElement(g.A,{className:"course-hero__button",...p}),n&&e.createElement(g.A,{className:"course-hero__button",id:"secondary-cta",...n})))}},49240:(O,y,t)=>{t.d(y,{A:()=>p});var e=t(48322),c=t(67115);const $=c.Ay.div` ${({theme:{colors:n}})=>(0,c.AH)` position: relative; .video { position: relative; height: 100%; width: 100%; aspect-ratio: 16 / 9; iframe { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: inherit; border: none; margin: 0; padding: 0; } } button { display: block; position: relative; padding: 0; border: 0; width: 100%; height: 100%; background: none; cursor: pointer; } .youtube-play-btn { position: absolute; z-index: 10; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; display: block; padding: 0; margin: 0 auto; user-select: none; transition: opacity 0.3s ease; border-radius: 100%; border: 4px solid ${n.light.neutral.white}; background: ${n.light.brand.darkBlue}; &:after { position: absolute; top: calc(50% - 15px); left: calc(50% - 8px); content: ''; border-color: transparent transparent transparent ${n.light.neutral.white}; border-style: solid; border-width: 14px 0 14px 20px; } } &:hover .youtube-play-btn { opacity: 0.75; } img { display: block; height: 100%; width: 100%; aspect-ratio: 16/9; object-fit: fill; } `} `,g=n=>/vimeo\.com/.test(n)?"vimeo":/youtube\.com|youtu\.be/.test(n)?"youtube":"unknown",i=n=>{const u=n.match(/vimeo\.com\/(\d+)/);return u?u[1]:null},A=n=>{const u=n.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/);return u?u[1]:null},_=(n,u)=>{const x=new URL(n),s=new URLSearchParams(x.search);switch(u){case"vimeo":{const l=i(n);return l?`https://player.vimeo.com/video/${l}?${s.toString()}`:n}case"youtube":{const l=A(n);return l?`https://www.youtube.com/embed/${l}?${s.toString()}`:n}default:return n}},r=(n,u,x)=>{if(x?.src)return x},p=({src:n,title:u,posterImage:x,className:s})=>{const[l,E]=(0,e.useState)(!1),d=(0,e.useRef)(null),b=g(n),a=r(n,b,x),m=(0,e.useMemo)(()=>new URL(n),[n]).searchParams.get("autoplay")==="1",w=(0,e.useMemo)(()=>{const C=_(n,b),N=new URL(C);return b==="youtube"?(N.searchParams.set("enablejsapi","1"),N.searchParams.set("playsinline","1"),N.searchParams.set("rel","0"),N.searchParams.set("mute","1"),typeof window<"u"&&N.searchParams.set("origin",window.location.origin)):b==="vimeo"&&N.searchParams.set("muted","1"),(m||l)&&N.searchParams.set("autoplay","1"),N.toString()},[n,b,m,l]);(0,e.useEffect)(()=>{if(!(m||l))return;const C=d.current?.contentWindow;if(!C)return;const N=setTimeout(()=>{try{b==="youtube"?C.postMessage(JSON.stringify({event:"command",func:"playVideo",args:[]}),"*"):b==="vimeo"&&C.postMessage({method:"play"},"*")}catch{}},50);return()=>clearTimeout(N)},[m,l,b]);const D=()=>E(!0),M=!m&&!l&&!!a,B=m||l||!a;return e.createElement($,{className:s&&s},M&&e.createElement("button",{type:"button",className:"video-overlay-btn",onClick:D,"aria-label":"Play video"},e.createElement("span",{className:"youtube-play-btn"}),a&&e.createElement("img",{src:a.src,alt:a.alt||"Video poster"})),B&&e.createElement("div",{className:"video"},e.createElement("iframe",{ref:d,width:"560",height:"315",src:w,title:u||"Embedded Video",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})))}},10394:(O,y,t)=>{t.d(y,{A:()=>e});const e=f=>`${c(f)}rem`,c=f=>f/16}}]);