1var y=Object.defineProperty;var I=(d,t,e)=>t in d?y(d,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):d[t]=e;var b=(d,t)=>y(d,"name",{value:t,configurable:!0});var f=(d,t,e)=>I(d,typeof t!="symbol"?t+"":t,e);import{h as B,G as $,i as M,f as C,a as E,A as x}from"./site-B0JexaGd.js";const s=class s{constructor(t,e){this.$element=t,this.options={...s.Options,...e},this.$originalElements=Array.from(this.$element.children).map(n=>n.cloneNode(!0)),this.mql=B(this.options.enabledBreakpoint),$.on(M[this.options.enabledBreakpoint],this.onMediaQueryChange),this.enabled=this.mql.matches,this.enabled&&this.init()}init(){return this.currentActiveIndex=void 0,this.createChildRefs().layout().enable(),this}createChildRefs(){return this.$mediaBlocks=this.$element.querySelectorAll(`[${s.Attributes.MEDIA}]`),this.$textBlocks=this.$element.querySelectorAll(`[${s.Attributes.TEXT}]`),this}layout(){const t=document.createElement("div");t.className="container w-full grid lg:grid-cols-2 gap-x-sm-xl py-xl-2xl",this.options.colorTheme&&t.setAttribute(C.Attributes.COLOR_THEME,this.options.colorTheme);const e=this.createTextColumn(),n=this.createMediaColumn();t.appendChild(e),t.appendChild(n),this.$element.innerHTML="",this.$element.appendChild(t);const o=this.options.imageAspectRatio==="16/9",l=this.options.imageAspectRatio==="4/3",h=window.innerWidth>=1024&&window.innerWidth<1300,i=parseFloat(getComputedStyle(e).rowGap);return this.$textBlocks.forEach((r,p)=>{const c=p===this.$textBlocks.length-1,m=p===0;if(o){if(h){if(r.style.paddingTop=m?"5vh":"",c){const a=i*.33;r.style.paddingBottom="5vh",r.style.marginBottom=`${a}px`,this.$element.style.marginBottom=`-${a}px`}}else if(c){const a=i*.33;r.style.paddingBottom="10vh",r.style.marginBottom=`${a}px`,this.$element.style.marginBottom=`-${a}px`}}else if(l&&c){const a=i*.15;r.style.paddingBottom="8vh",r.style.marginBottom=`${a}px`,this.$element.style.marginBottom=`-${a}px`}}),this.$textBlocks=this.$element.querySelectorAll(`[${s.Attributes.TEXT}]`),this.$mediaBlocks=this.$element.querySelectorAll(`[${s.Attributes.MEDIA}]`),this}enable(){return this.createIntersectObserver(),this.$element.setAttribute("enabled","true"),this}destroy(){return this.$element.setAttribute("enabled","false"),this.currentActiveIndex=void 0,this.observer&&(this.observer.disconnect(),this.observer=null),this.lastObserver&&(this.lastObserver.disconnect(),this.lastObserver=null),this.$element.innerHTML="",this.$originalElements.forEach(t=>{this.$element.appendChild(t.cloneNode(!0))}),this.$textBlocks=null,this.$mediaBlocks=null,this}createTextColumn(){const t=document.createElement("div"),e=window.innerWidth>=1024&&window.innerWidth<1300,n=this.options.imageAspectRatio==="16/9";return t.className=e&&n?"py-sm-xl flex flex-col gap-y-[clamp(4rem,20vh,12rem)]":"py-sm-xl flex flex-col gap-y-[clamp(8rem,50vh,24rem)]",t.setAttribute(s.Attributes.TEXT_COLUMN,""),this.$textBlocks.forEach((o,l)=>{o.setAttribute(s.Attributes.TEXT,""),o.setAttribute("data-index",l.toString()),t.appendChild(o)}),t}createMediaColumn(){const t=document.getElementById(s.Attributes.SITE_HEADER_ID)?.offsetHeight||0,e=this.options.imageAspectRatio==="16/9",n=this.options.imageAspectRatio==="4/3",o=e||n,l=window.innerWidth>=1300&&window.innerWidth<=1700,h=window.innerWidth>=1024&&window.innerWidth<=2200,i=document.createElement("div");if(i.className=`sticky py-sm-xl overflow-hidden${this.options.mediaPosition===s.Alignments.LEFT?" order-first":""}`,i.style.top=`${t}px`,e&&l){const c=window.innerWidth*.5*.5625;i.style.height="calc(50vw * (9 / 16) + var(--spacing-sm-xl, 2rem) * 2)",this.$element.style.paddingBottom=`${c*.5}px`}else n&&h?i.style.height="calc(50vw * (3 / 4) + var(--spacing-sm-xl, 2rem) * 2)":i.style.height=`calc(100vh - ${t}px)`;i.setAttribute("aria-hidden","true"),i.setAttribute(s.Attributes.MEDIA_COLUMN,"");const r=document.createElement("div"),p=window.innerWidth>=1024&&window.innerWidth<1300;return r.className=o?p?"relative w-full h-full flex items-end":"relative w-full h-full flex items-center":"relative w-full h-full",this.$mediaBlocks.forEach(c=>{const m=c.firstElementChild;m&&(m.setAttribute(s.Attributes.MEDIA,""),r.appendChild(m))}),i.appendChild(r),i}createIntersectObserver(){const t=this.options.imageAspectRatio==="16/9",e=this.options.imageAspectRatio==="4/3",n=window.innerHeight,o=window.innerWidth,l=t&&o>=1024&&o<1300,h=n<700?"-10%":"-15%",i=n<700?"-35%":"-50%",r=n<700?"-28%":"-42%",p=n<700?"-25%":"-55%",c=t?l?`${h} 0px ${p} 0px`:`${h} 0px ${i} 0px`:e?`${h} 0px ${r}
1 0px`:"-25% 0px -33% 0px",m={root:null,rootMargin:c,threshold:0},a=b(g=>{g.forEach(u=>{if(u.isIntersecting){const A=parseInt(u.target.dataset.index,10);this.activateMediaBlock(A)}})},"handleIntersect");this.observer=new IntersectionObserver(a,m),this.$textBlocks.forEach((g,u)=>{u<this.$textBlocks.length-1&&this.observer.observe(g)});const v=this.$textBlocks[this.$textBlocks.length-1];if(v){const u={root:null,rootMargin:l?"-15% 0px -40% 0px":c,threshold:0},A=new IntersectionObserver(a,u);A.observe(v),this.lastObserver=A}}activateMediaBlock(t){this.currentActiveIndex!==t&&(this.currentActiveIndex=t,this.$mediaBlocks.forEach((e,n)=>{const o=n===t;e.setAttribute(s.Attributes.MEDIA,o?"active":"");const l=e.querySelector('[data-module="Animation"]');if(l){const i=o?E.PLAY_ANIM_ID:E.PAUSE_ANIM_ID;$.emit(i,l.id,!0);return}const h=e.querySelector('[data-module="AmbientVideo"]');if(h){const i=o?x.PLAY_ID:x.PAUSE_ID;$.emit(i,h.id,!0)}}))}onMediaQueryChange=b(()=>{this.enabled=this.mql.matches,this.enabled?this.init():this.destroy()},"onMediaQueryChange")};b(s,"MediaScrollLock"),f(s,"Alignments",{LEFT:"left",RIGHT:"right"}),f(s,"Attributes",{MEDIA:"data-scroll-lock-media",MEDIA_COLUMN:"data-scroll-lock-media-column",SITE_HEADER_ID:"site-header",TEXT:"data-scroll-lock-text",TEXT_COLUMN:"data-scroll-lock-text-column"}),f(s,"Options",{enabledBreakpoint:"lg",mediaPosition:s.Alignments.LEFT,imageAspectRatio:"1/1"});let w=s;export{w as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.