1import"./BPlt5jNJ.js";try{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="576b20a7-6eb2-4c35-a514-94739e16f263",e._sentryDebugIdIdentifier="sentry-dbid-576b20a7-6eb2-4c35-a514-94739e16f263")}catch{}{let e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:splash-application":!0})}let d=(()=>{class e extends HTMLElement{constructor(){super(),this.iframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","videohash","videothumb","videotitle"]}connectedCallback(){this.addEventListener("pointerover",e.warmConnections,{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(t){this.setAttribute("videoid",t)}get videoHash(){return encodeURIComponent(this.getAttribute("videohash")||"")}set videoHash(t){this.setAttribute("videohash",t)}get videoThumb(){return encodeURIComponent(this.getAttribute("videothumb")||"")}set videoThumb(t){this.setAttribute("videothumb",t)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(t){this.setAttribute("videotitle",t)}get videoPlay(){return this.getAttribute("videoPlay")||"Play"}set videoPlay(t){this.setAttribute("videoPlay",t)}get videoStartAt(){return this.getAttribute("videoPlay")||"0s"}set videoStartAt(t){this.setAttribute("videoPlay",t)}get autoLoad(){return this.hasAttribute("autoload")}set autoLoad(t){t?this.setAttribute("autoload",""):this.removeAttribute("autoload")}get autoPlay(){return this.hasAttribute("autoplay")}set autoPlay(t){t?this.setAttribute("autoplay","autoplay"):this.removeAttribute("autoplay")}setupDom(){this.attachShadow({mode:"open"}).innerHTML=` 2 <style> 3 :host { 4 contain: content; 5 display: block; 6 position: relative; 7 width: 100%; 8 padding-bottom: calc(100% / (16 / 9)); 9 } 10 11 #frame, #fallbackPlaceholder, iframe { 12 position: absolute; 13 width: 100%; 14 height: 100%; 15 } 16 17 #frame { 18 cursor: pointer; 19 } 20 21 #fallbackPlaceholder { 22 object-fit: cover; 23 } 24 25 #frame::before { 26 content: ''; 27 display: block; 28 position: absolute; 29 top: 0; 30 background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==); 31 background-position: top; 32 background-repeat: repeat-x; 33 height: 60px; 34 padding-bottom: 50px; 35 width: 100%; 36 transition: all 0.2s cubic-bezier(0, 0, 0.2, 1); 37 z-index: 1; 38 } 39 /* play button */ 40 .lvo-playbtn { 41 width: 70px; 42 height: 46px; 43 background-color: #212121; 44 z-index: 1; 45 opacity: 0.8; 46 border-radius: 10%; 47 transition: all 0.2s cubic-bezier(0, 0, 0.2, 1); 48 border: 0; 49 } 50 #frame:hover .lvo-playbtn { 51 background-color: rgb(98, 175, 237); 52 opacity: 1; 53 } 54 /* play button triangle */ 55 .lvo-playbtn:before { 56 content: ''; 57 border-style: solid; 58 border-width: 11px 0 11px 19px; 59 border-color: transparent transparent transparent #fff; 60 } 61 .lvo-playbtn, 62 .lvo-playbtn:before { 63 position: absolute; 64 top: 50%; 65 left: 50%; 66 transform: translate3d(-50%, -50%, 0); 67 } 68 69 /* Post-click styles */ 70 .lvo-activated { 71 cursor: unset; 72 } 73 74 #frame.lvo-activated::before, 75 .lvo-activated .lvo-playbtn { 76 display: none; 77 } 78 </style> 79 <div id="frame"> 80 <picture> 81 <source id="webpPlaceholder" type="image/webp"> 82 <source id="jpegPlaceholder" type="image/jpeg"> 83 <img id="fallbackPlaceholder" 84 referrerpolicy="origin" 85 width="1100" 86 height="619" 87 decoding="async" 88 loading="lazy"> 89 </picture> 90 <button class="lvo-playbtn"></button> 91 </div> 92 `,this.domRefFrame=this.shadowRoot.querySelector("#frame"),this.domRefImg={fallback:this.shadowRoot.querySelector("#fallbackPlaceholder"),webp:this.shadowRoot.querySelector("#webpPlaceholder"),jpeg:this.shadowRoot.querySelector("#jpegPlaceholder")},this.domRefPlayButton=this.shadowRoot.querySelector(".lvo-playbtn")}setupComponent(){this.videoThumb?this.initBackupImagePlaceholder():this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay} video: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay} video: ${this.videoTitle}`),this.autoLoad&&this.initIntersectionObserver()}attributeChangedCallback(t,i,o){switch(t){case"videoid":i!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("lvo-activated")&&(this.domRefFrame.classList.remove("lvo-activated"),this.shadowRoot.querySelector("iframe").remove()));case"videothumb":i!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("lvo-activated")&&(this.domRefFrame.classList.remove("lvo-activated"),this.shadowRoot.querySelector("iframe").remove()))}}addIframe(){if(!this.iframeLoaded){const t=this.videoHash?`h=${this.videoHash}`:"",i=this.autoLoad&&this.autoPlay||!this.autoLoad?"autoplay=1":"",o=new URLSearchParams(`${t}&${i}&#t=${this.videoStartAt}`),a=` 93 <iframe frameborder="0" 94 allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" 95 allowfullscreen src="${new URL(`/video/${this.videoId}?${o}`,"https://player.vimeo.com/")}"></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",a),this.domRefFrame.classList.add("lvo-activated"),this.iframeLoaded=!0;const s=this.shadowRoot.querySelector("iframe");s&&!this.autoPlay&&!this.autoLoad&&requestAnimationFrame(()=>s.focus())}}initBackupImagePlaceholder(){this.domRefImg.fallback.src=decodeURIComponent(this.videoThumb),this.domRefImg.jpeg.srcset=this.domRefImg.fallback.src,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.domRefImg.fallback.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}async initImagePlaceholder(){e.addPrefetch("preconnect","https://i.vimeocdn.com/");const t=`https://vimeo.com/api/v2/video/${this.videoId}.json`,i=(await(await fetch(t)).json())[0].thumbnail_large,o=i.substr(i.lastIndexOf("/")+1).split("_")[0],a=`https://i.vimeocdn.com/video/${o}.webp?mw=1100&mh=619&q=70`,s=`https://i.vimeocdn.com/video/${o}.jpg?mw=1100&mh=619&q=70`;this.domRefImg.webp.srcset=a,this.domRefImg.jpeg.srcset=s,this.domRefImg.fallback.src=s,this.domRefImg.fallback.setAttribute("alt","")}initIntersectionObserver(){"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&new IntersectionObserver((t,i)=>{t.forEach(o=>{o.isIntersecting&&!this.iframeLoaded&&(e.warmConnections(),this.addIframe(),i.unobserve(this))})},{root:null,rootMargin:"0px",threshold:0}).observe(this)}static addPrefetch(t,i,o){const a=document.createElement("link");a.rel=t,a.href=i,o&&(a.as=o),a.crossOrigin="true",document.head.append(a)}static warmConnections(){e.preconnected||(e.addPrefetch("preconnect","https://f.vimeocdn.com"),e.addPrefetch("preconnect","https://player.vimeo.com"),e.addPrefetch("preconnect","https://i.vimeocdn.com"),e.preconnected=!0)}}return e.preconnected=!1,e})();customElements.define("lite-vimeo",d);export{d as LiteVimeoEmbed};
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.