1import{I as e,N as t}from"./chunk-62JRHF6Z-D3Q3NlnB.js";import{E as n,t as r}from"./jsx-runtime-N2ZAr0X9.js";import{M as i,v as a}from"./Wrapper-BEjTyefN.js";import{d as o}from"./utils-CzNcCjKH.js";var s={xs:`320px`,sm:`640px`,md:`900px`,lg:`1200px`,xl:`1600px`,"sell-nav":`1090px`,"sell-tablet":`768px`,"sell-desktop":`1080px`};function c(e){let t={min:{},max:{}};for(let n in e){let r=n,i=parseInt(e[r],10);t.min[r]=`(min-width: ${i}px)`,t.max[r]=`(max-width: ${i-1}px)`}return t}var l=c(s);function u(e=``,t={}){return`${e}${Object.entries(t).filter(([e,t])=>t!==void 0&&!(e===`crop`&&t===n.None)).reduce((t,[n,r],i)=>`${t}${i===0&&!e.includes(`?`)?`?`:`&`}${n}=${r}`,``)}`}var d=[1,2];function f(e){if(e===void 0)return;let t=Number(e);return Number.isFinite(t)?t:void 0}function p(e){if(!e)return;let t=parseInt(s[e],10);return Number.isFinite(t)?t:void 0}function m(e){return e===1?``:` ${e}x`}function h(e){if(!e)return;let t=`minWidth`in e?e.minWidth:p(e.min),n=`maxWidth`in e?e.maxWidth:p(e.max),r=[];if(t!==void 0&&r.push(`(min-width: ${t}px)`),n!==void 0){let t=`maxWidth`in e?n:n-1;r.push(`(max-width: ${t}px)`)}return r.length>0?r.join(` and `):void 0}function g(e,t){if(e.srcSet!==void 0)return u(e.srcSet,{width:e.width,height:e.height,crop:e.crop});let r=f(e.width);if(r===void 0)return;let i=f(e.height),a=e.crop??t.crop??n.None,o=e.src??t.src,s=(e.densities??d).map(e=>`${u(o,{width:Math.round(r*e),height:i===void 0?void 0:Math.round(i*e),crop:a})}${m(e)}`);return s.length>0?s.join(`, `):void 0}function _(e){return e.media??h(e.breakpoint)}var v=r();function y({alt:e=``,className:t,componentName:r=`image`,crop:i=n.None,decoding:a,height:o,loading:s,sizes:c,src:l,srcSet:d,sources:f,width:p,fetchPriority:m,"aria-hidden":h,...y}){return(0,v.jsxs)(`picture`,{"data-component-name":r,...y,children:[f?.map((e,t)=>(0,v.jsx)(`source`,{srcSet:g(e,{src:l,crop:i}),sizes:e.sizes,media:_(e),width:e.width,height:e.height,type:e.type},t)),(0,v.jsx)(`img`,{alt:e,className:t,decoding:a,height:o,loading:s,src:u(l,{width:p,height:o,crop:i}),srcSet:d,sizes:c,width:p,"aria-hidden":h,fetchpriority:m})]})}var b=e(a(),1),x=e(t(),1);function S(e){let[t,n]=(0,x.useState)(!1),r=(0,x.useRef)(null),i=(0,x.useRef)(e);return(0,x.useEffect)(()=>{let e=new IntersectionObserver(e=>{let t=e[0],r=i.current?.threshold,a=Array.isArray(r)?Math.min(...r):r;n(a===void 0?t.isIntersecting:t.intersectionRatio>=a)},i.current);return r.current&&e.observe(r.current),()=>e.disconnect()},[]),{isVisible:t,visualRef:r}}var C=(0,x.forwardRef)(function({poster:e,webmSource:t,mp4Source:n,className:r,autoplay:a=!0,loop:s=!0,videoClassName:c,pauseOffscreen:l=!0,ariaLabel:u,shouldLoad:d=!0,isSlowConnection:f,deferPoster:p=!1,onPlayError:m},h){let{isVisible:g,visualRef:_}=S(),y=o(),[C,w]=(0,x.useState)(!1),[T,E]=(0,x.useState)(!p);(0,x.useEffect)(()=>{p&&g&&E(!0)},[p,g]);let D=!g&&l||y||f,O=g&&!y&&!f&&a;return(0,x.useEffect)(()=>{h&&(typeof h==`function`?h(_.current):h.current=_.current)},[h,_]),(0,x.useEffect)(function(){let e=_.current;e&&(g&&!y&&!f&&!C&&d&&w(!0),D&&!e.paused&&e.pause(),O&&e.paused&&e.play().catch(t=>{t.name!==`AbortError`&&(console.error(`Video play failed:`,t),m?.(t,e))}))},[g,y,_,C,O,D,d,f,m]),(0,x.useEffect)(()=>{let e=_.current;e&&C&&!f&&(t||n)&&e.load()},[C,f,t,n,_]),(0,v.jsx)(`div`,{className:r,children:(0,v.jsxs)(`video`,{preload:C?`auto`:`none`,ref:_,autoPlay:a,"aria-label":u||`Video`,muted:!0,loop:s,playsInline:!0,poster:T?e:void 0,className:i((0,b.default)(`h-full w-full object-cover`,c)),children:[(0,v.jsx)(`source`,{"data-src":`${t||``}`,type:`video/webm`,src:C&&t||``}),(0,v.jsx)(`source`,{"data-src":`${n||``}`,type:`video/mp4`,src:C&&n||``})]})})});export{l as a,u as i,S as n,s as o,y as r,C as t}; 2//# sourceMappingURL=VideoImage-CojejKrH.js.map
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.