1import{ar as g,as as k,o as a,c as l,at as _,z as v,b as E,s as r,d as T,t as N,A as R,e as s}from"./DSg5KMYM.js";const V={key:0,class:"video-embed"},B=["aria-label"],S={key:1,class:"video-embed__aspect-ratio"},A=["src","loading","title"],z=["src","loading","title"],C=["src","loading","title"],G={key:2},I=g({__name:"video-embed",props:{url:{default:""},caption:{default:""},loading:{default:"lazy"},autoplay:{type:Boolean,default:!1},placeholderAriaLabel:{default:"Press ENTER to play video"},frameTitle:{default:"Video"}},setup(t){const u=R(!1),y=/^(?:(?:https?:)?\/\/)?(?:(?:www|m)\.)?(?:youtube\.com|youtu.be)(?:\/(?:(?:.+)[?&]v=|embed\/|v\/)?)([\w-]+)(?:\S+)?$/i,p=/^https:\/\/vimeo\.com\/([0-9]+)((?:&?[^=&]*=[^=&]*)*)$/i,d=/^https:\/\/dash\.bunny\.net\/stream\/([0-9]+)(?:.*)(?:videoId|vid)=([a-z0-9-]+)(?:.*)/i,c=t,{url:i}=k(c),o=s(()=>{switch(!0){case y.test(i.value):return"youtube";case p.test(i.value):return"vimeo";case d.test(i.value):return"bunny";default:return null}}),f=s(()=>{switch(o.value){case"youtube":return y;case"vimeo":return p;case"bunny":return d;default:return null}}),m=s(()=>{if(f.value){const e=i.value.match(f.value);return e?e[1]:null}return null}),h=s(()=>
1{if(o.value==="bunny"){const e=i.value.match(d);return e?e[2]:null}return null}),b=s(()=>c.autoplay?"&autoplay=1":""),w=s(()=>c.autoplay?"&autoplay=true":"&autoplay=false");return(e,n)=>o.value?(a(),l("figure",V,[e.$slots.placeholder&&!u.value?(a(),l("div",{key:0,class:"video-embed__placeholder","aria-label":t.placeholderAriaLabel,tabindex:"0",onClick:n[0]||(n[0]=$=>u.value=!0),onKeydown:n[1]||(n[1]=_($=>u.value=!0,["enter"]))},[v(e.$slots,"placeholder")],40,B)):(a(),l("div",S,[v(e.$slots,"loader",{},()=>[n[2]||(n[2]=E("div",{class:"video-embed__loading-spinner"},null,-1))]),o.value==="youtube"?(a(),l("iframe",{key:0,class:"video-embed__item",src:`https://www.youtube-nocookie.com/embed/${m.value}?modestbranding=1&controls=1&rel=0${b.value}`,allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowfullscreen:"",referrerpolicy:"strict-origin-when-cross-origin",loading:t.loading,title:t.frameTitle},null,8,A)):r("",!0),o.value==="vimeo"?(a(),l("iframe",{key:1,class:"video-embed__item",src:`https://player.vimeo.com/video/${m.value}?byline=0&portrait=0&color=ffffff&dnt=1&pip=0&responsive=1&title=0&byline=0&transparent=0${b.value}`,allow:"autoplay; fullscreen",allowfullscreen:"",loading:t.loading,title:t.frameTitle},null,8,z)):r("",!0),o.value==="bunny"?(a(),l("iframe",{key:2,class:"video-embed__item",src:`https://player.mediadelivery.net/embed/${m.value}/${h.value}?loop=false&muted=false&preload=true&responsive=true${w.value}`,allow:"accelerometer;gyroscope;encrypted-media;picture-in-picture;autoplay",allowfullscreen:"",loading:t.loading,title:t.frameTitle},null,8,C)):r("",!0)])),t.caption||e.$slots.caption?(a(),l("figcaption",G,[v(e.$slots,"caption",{},()=>[T(N(t.caption),1)])])):r("",!0)])):r("",!0)}}),X=g(I),L=Object.assign(X,{__name:"VideoEmbed"});export{L 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.