1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[669],{4669:(e,t,l)=>{l.r(t),l.d(t,{default:()=>c});var r=l(4568),a=l(7620),o=l(8756),s=l(3848),i=l(2819);let n=null,c=({videoId:e,title:t,autoplay:l=!1,priority:c=!1,analyticsLocation:u="landing_video"})=>{let[d,p]=(0,a.useState)(!1),[m,f]=(0,a.useState)(c),w=(0,a.useRef)(null),b=(0,a.useRef)(null),h=(0,a.useRef)(!1),g=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(c)return void f(!0);let e=w.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(f(!0),t.disconnect())},{rootMargin:"200px 0px 200px 0px",threshold:0});return t.observe(e),()=>t.disconnect()},[c]);let y=(0,a.useCallback)(t=>{h.current||(h.current=!0,i.posthog.capture("video_played",(0,s.SM)({videoId:e,location:u,source:t})))},[u,e]),x=(0,a.useCallback)(t=>{g.current||(g.current=!0,i.posthog.capture("video_completed",(0,s.SM)({videoId:e,location:u,source:t})))},[u,e]);(0,a.useEffect)(()=>{if(!d)return;let e=null,t=!1;return(function(){let e=window;return e.YT?.Player?Promise.resolve():n||(n=new Promise(t=>{let l=e.onYouTubeIframeAPIReady;if(e.onYouTubeIframeAPIReady=()=>{l?.(),t()},document.querySelector('script[src="https://www.youtube.com/iframe_api"]'))return;let r=document.createElement("script");r.src="https://www.youtube.com/iframe_api",r.async=!0,document.head.appendChild(r)}))})().then(()=>{let l=window;!t&&b.current&&l.YT?.Player&&(e=new l.YT.Player(b.current,{events:{onStateChange:e=>{e.data===l.YT.PlayerState.PLAYING&&y("youtube_state"),e.data===l.YT.PlayerState.ENDED&&x("youtube_state")}}}))}),()=>{t=!0,e?.destroy?.()}},[x,y,d]);let v=()=>{i.posthog.capture("video_clicked",(0,s.SM)({videoId:e,location:u,source:"facade_click"})),y("facade_click"),p(!0)},_=new URLSearchParams({enablejsapi:"1"});return(l&&(_.set("autoplay","1"),_.set("mute","1")),_.set("origin",window.location.origin),d)?(0,r.jsx)("div",{className:"relative w-full",style:{paddingBottom:"56.25%"},children:(0,r.jsx)("iframe",{ref:b,className:"absolute top-0 left-0 w-full h-full rounded-lg shadow-2xl",src:`https://www.youtube.com/embed/${e}?${_.toString()}`,title:t,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})}):(0,r.jsx)("div",{ref:w,className:"relative w-full cursor-pointer group",style:{paddingBottom:"56.25%"},onClick:v,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),v())},"aria-label":`Play video: ${t}`,children:m?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("img",{srcSet:` 2 https://i.ytimg.com/vi_webp/${e}/mqdefault.webp 320w, 3 https://i.ytimg.com/vi_webp/${e}/hqdefault.webp 480w, 4 https://i.ytimg.com/vi_webp/${e}/sddefault.webp 640w, 5 https://i.ytimg.com/vi_webp/${e}/maxresdefault.webp 1280w 6 `,sizes:"(max-width: 640px) 320px, (max-width: 1024px) 640px, 1280px",src:`https://i.ytimg.com/vi_webp/${e}/sddefault.webp`,alt:t,className:"absolute top-0 left-0 w-full h-full object-cover rounded-lg",loading:c?void 0:"lazy",decoding:"async",width:"1280",height:"720"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/30 group-hover:bg-black/20 transition-colors rounded-lg"}),(0,r.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,r.jsx)("div",{className:"w-20 h-20 bg-primary/90 group-hover:bg-primary rounded-full flex items-center justify-center transition-all group-hover:scale-110 shadow-2xl",children:(0,r.jsx)(o.A,{className:"w-10 h-10 text-black ml-1",fill:"currentColor"})})}),(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 p-4 bg-gradient-to-t from-black/80 to-transparent rounded-b-lg",children:(0,r.jsx)("p",{className:"text-white font-semibold text-sm",children:t})})]}):(0,r.jsx)("div",{className:"absolute top-0 left-0 w-full h-full bg-muted rounded-lg animate-pulse"})})}},8756:(e,t,l)=>{l.d(t,{A:()=>r});let r=(0,l(2068).A)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]])}}]);
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.