1import{_ as D}from"./BNZD99MQ.js";import{y as F,f as N,k as i,w as k,E as j,K as d,U as r,V as H,W as P,a3 as h,B as t,a5 as B,P as A,Y as s,$ as w,a6 as S}from"./BpwpXY-O.js";import{C as Y,cB as G,bc as K,bb as U}from"./wf0mWNzt.js";import{o as _}from"./CecmMc7D.js";const q=["src","poster","muted","autoplay","loop","controls"],J=["aria-label"],Q=["aria-label"],X=["aria-label"],Z={key:1,"aria-hidden":"true",class:"triangle size-5 ml-1.5 rotate-90"},ee=F({__name:"VideoPlayer",props:{src:{default:""},poster:{default:null},videoCover:{default:""},isAutoPlay:{type:Boolean,default:!1},isLoop:{type:Boolean,default:!1},isAutoPlayOnView:{type:Boolean,default:!1},isMuted:{type:Boolean,default:!0},isActive:{type:Boolean,default:!1},hasControl:{type:Boolean,default:!1},hasCover:{type:Boolean,default:!0},hasMask:{type:Boolean,default:!0},videoTitle:{default:""},playFromBeginningWhenResume:{type:Boolean,default:!1},useVImgElement:{type:Boolean,default:!0}},setup(o,{expose:z}){const p=o,{$tracking:E}=Y(),{isDesktop:M}=_(),{videoCover:v,isAutoPlay:n,isAutoPlayOnView:m,videoTitle:C,hasControl:b}=N(p),x=i(!m.value),V=i(!1),a=i(!1),f=i(!v.value),l=i(null),I=i(null);function c(){n.value||(f.value||$(),a.value?(a.value=!1,l.value.pause()):(a.value=!0,l.value.play()),f.value||(f.value=!0))}function T(){a.value?(a.value=!1,l.value.pause()):(a.value=!0,l.value.play())}function W(){V.value=!0}const{isReady:O}=G({src:v.value});if(m.value&&v.value){const y=k(O,e=>{if(!e)return;const{stop:g}=K(I,([{isIntersecting:u}])=>{if(!u)return;x.value=!0,M.value||setTimeout(()=>{l.value.load()},0);const R=k(V,L=>{L&&(c(),R())});g()},{threshold:.5});y()})}j(()=>{n.value&&b.value&&$(),n.value&&(a.value=!0)});function $(){C.value&&E.sendGeneralEvent("VIDEO_PLAY",{videoTitle:C.value,videoStatus:"start",videoPercent:0})}return k(()=>p.isActive,()=>{p.isActive?(p.playFromBeginningWhenResume&&(l.value.currentTime=0),l.value.play(),a.value=!0):(l.value.pause(),a.value=!1)}),z({isPlaying:a,video:l,videoPlayHandler:c}),(y,e)=>{const g=D;return r(),d("div",{ref_key:"videoPlayerWrap",ref:I,class:"group relative select-none"},[t(v)&&!t(f)?(r(),H(g,{key:0,src:t(v),"use-v-img-element":o.useVImgElement},null,8,["src","use-v-img-element"])):P("",!0),t(x)||t(n)?h((r(),d("video",{key:1,ref_key:"video",ref:l,class:"video-player size-full uno-layer-components-object-cover",src:o.src,poster:o.poster,muted:o.isMuted,autoplay:t(n),loop:o.isLoop,controls:t(b),playsinline:"",onCanplay:W,onPlay:e[0]||(e[0]=u=>a.value=!0),onPause:e[1]||(e[1]=u=>a.value=!1),onEnded:e[2]||(e[2]=u=>a.value=!1)},null,40,q)),[[B,t(f)]]):P("",!0),t(b)&&!t(n)&&!t(m)?(r(),d(A,{key:2},[h(s("button",{type:"button","aria-label":y.$t("a11y.media.video_toggle"),class:S(["absolute left-50% top-50% flex flex-center w-full h-full opacity-0 translate--50% duration-150 cursor-pointer border-none bg-transparent p-0",{"bg-[rgba(123,123,123,0.5)]!":o.hasCover}]),"group-hover":"lg:opacity-100",onClick:e[3]||(e[3]=w(u=>c(),["stop"]))},[...e[6]||(e[6]=[s("div",{class:"flex flex-center size-18 rounded-full bg-black/20 group-hover:bg-black/50","aria-hidden":"true"},[s("div",{class:"mr-2 w-1.5 h-7.5 bg-white"}),s("div",{class:"w-1.5 h-7.5 bg-white"})],-1)])],10,J),[[B,t(a)&&o.hasMask]]),h(s("button",{type:"button","aria-label":y.$t("a11y.media.video_toggle"),class:"absolute-center flex flex-center p-0 size-18 rounded-full bg-black/20 group-hover:bg-black/50 cursor-pointer",onClick:e[4]||(e[4]=w(u=>c(),["stop"]))},[...e[7]||(e[7]=[s("div",{"aria-hidden":"true",class:"ml-1.5 triangle size-4 rotate-90"},null,-1)])],8,Q),[[B,!t(a)&&o.hasMask]])],64)):t(n)?(r(),d("button",{key:3,type:"button","aria-label":t(a)?"Pause video":"Play video",class:"absolute right-5 bottom-5 z-1 flex flex-center size-10 rounded-full bg-black/20 group-hover:bg-black/50 cursor-pointer",onClick:e[5]||(e[5]=w(u=>T(),["stop"]))},[t(a)?(r(),d(A,{key:0},[e[8]||(e[8]=s("div",{"aria-hidden":"true",class:"mr-2 w-1 h-5 bg-white"},null,-1)),e[9]||(e[9]=s("div",{"aria-hidden":"true",class:"w-1 h-5 bg-white"},null,-1))],64)):(r(),d("div",Z))],8,X)):P("",!0)],512)}}}),se=Object.assign(U(ee,[["__scopeId","data-v-77f57c79"]]),{__name:"VideoPlayer"});export{se as _};
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.