https://lomi.com/cdn/shop/t/376/assets/component-video-native.min.js?v=33014111483453492841788379976
1!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";const t=(t=document,i,s,o=!1)=>{if(o&&(window.fmVideoLockCount=window.fmVideoLockCount||0,window.fmVideoLockCount++,window.fmVideoLockCount>1))return;if(!t)return;let e=[...t.querySelectorAll("iframe")],n=[...t.querySelectorAll("video")];s&&(e=e.filter(t=>!s.contains(t)),n=n.filter(t=>!s.contains(t)));for(const t of e)t!==i&&(t.contentWindow?(t.src.startsWith("https://www.youtube")&&t.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"),t.src.startsWith("https://player.vimeo")&&t.contentWindow.postMessage('{"method":"pause"}',"*")):t.src=t.src);for(const t of n)t!==i&&t.pause()},i=".js-video-control-play",s=".js-video-control-play-unmute",o=".js-video-control-mute",e=".js-video-control-text";class n extends HTMLElement{constructor(){super(),this.state={reducedMotion:window.fmData.user.prefersReducedMotion,playing:void 0,muted:void 0,id:void 0,stopOtherVideos:void 0},this.content={image:null,video:null,playPauseBtns:[],playUnmuteBtns:[],muteUnmuteBtns:[]},this.strings={pause:void 0,play:void 0,mute:void 0,unmute:void 0},this.callbacks={click:this.t.bind(this),pause:this.i.bind(this,!1),play:this.i.bind(this,!0)},this.dataAttributes={playing:"data-is-playing",muted:"data-is-muted"}}o(t,i){const s=t.closest(i);return!(!s||s.getAttribute("aria-controls")!==this.state.id)&&s}i(i){this.state.playing=void 0!==i?i:!this.content.video.paused,this.state.playing&&(this.state.stopOtherVideos||this.state.reducedMotion||!this.h())&&t(this.closest(".shopify-section"),this.content.video,null,!1),this.u(),this.l()}l(){const{playing:t,muted:i}=this.state;this.setAttribute(this.dataAttributes.playing,t),this.setAttribute(this.dataAttributes.muted,i)}p(t,i,s){if(!t)return;if((t.querySelector(e)||t).textContent=i,s)for(const[i,o]of Object.entries(s))t.setAttribute(i,o)}u(){const{playPauseBtns:t,playUnmuteBtns:i,muteUnmuteBtns:s}=this.content,{playing:o}=this.state,{playing:e,muted:n}=this.dataAttributes,h=this.h(),a=o?this.strings.pause:this.strings.play,d=h?this.strings.unmute:this.strings.mute;for(const i of t)this.p(i,a,{[e]:`${o}`});for(const t of s)this.p(t,d,{[n]:`${h}`});for(const t of i)this.p(t,a,{[e]:`${o}`,[n]:`${h}`})}m(i){const s=this.h();this.content.video.muted=void 0!==i?i:!s,!s&&this.state.playing&&t(this.closest(".shopify-section"),this.content.video),this.i()}v(){this.content.video.pause()}$(){this.content.video.load(),this.content.video.addEventListener("loadeddata",this._.bind(this,!1))}async _(){(!this.h()||this.state.reducedMotion||this.state.stopOtherVideos)&&t(this.closest(".shopify-section"),this.content.video);try{const t=this.content.video.play();void 0!==t&&await t}catch(t){console.error(t),this.i(!1)}}B(){const{videoPlay:t,videoPause:i,videoMute:s,videoUnmute:o}=window.fmData.a11yStrings;this.strings={play:t,pause:i,mute:s,unmute:o}}t(t){const e=t.target,n=this.o(e,i),h=this.o(e,o),a=this.o(e,s);if((n||h||a)&&(t.stopPropagation(),n&&(this.state.playing?this.v():this._()),h&&this.m(),a)){const t=!this.state.playing||this.state.playing&&this.h();this.m(!t),t?this._():this.v()}}h(){return this.content.video.muted}U(){this.state={...this.state,muted:this.querySelector("video").muted,id:this.getAttribute("id"),stopOtherVideos:"true"===this.getAttribute("data-stop-other-videos")},this.content={image:this.querySelector("picture"),video:this.querySelector("video"),playPauseBtns:[...document.querySelectorAll(`${i}[aria-controls="${this.state.id}"]`)],playUnmuteBtns:[...document.querySelectorAll(`${s}[aria-controls="${this.state.id}"]`)],muteUnmuteBtns:[...document.querySelectorAll(`${o}[aria-controls="${this.state.id}"]`)]}}connectedCallback(){this.U(),this.B(),this.i(),this.content.video.addEventListener("pause",this.callbacks.pause),this.content.video.addEventListener("play",this.callbacks.play)}disconnectedCallback(){this.content.video.removeEventListener("pause",this.callbacks.pause),this.content.video.removeEventListener("play",this.callbacks.play)}}var h,a;h="video-native",a=n,void 0===customElements.get(h)&&customElements.define(h,a),document.addEventListener("click",t=>{const e=t.target.closest(`${i}, ${s}, ${o}`);if(!e)return;const n=e.getAttribute("aria-controls"),h=n?document.getElementById(n):null;h&&h.callbacks.click(t)})});
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.