PageSourceSearch

https://hammerfilms.com/cdn/shop/t/7/assets/alpine-splide.rZxvZUf1.min.js

js hammerfilms.com collected 2026-10-02 04:46:09 UTC 8,815 bytes, 1 lines download raw bytes

1import{w as p,b as m,c as u,r as f,e as g}from"./shared.CXUE4qUq.min.js";import{_ as b}from"./alpine-motion-ui.DoSU_pl5.min.js";import"./alpine-pdp.BCqTRJdw.min.js";import"./motion-reveal.CK6mK27t.min.js";function M(e=!1,n=!1,s=4e3){return{splideInstance:null,activeSlide:0,inViewport:!0,mobileVideoEnabled:!1,init(){const i=this.$refs.splideElement;i&&(this.bindMobileVideoGate(i),this.syncFilmVideoSources(i),this.bindFilmVideoViewportListener(i),u().then(t=>{this.clearFilmPreinit(i),this.mountSplide(t,i)}).catch(t=>{console.error("splide: Error loading Splide:",t)}))},clearFilmPreinit(i){i?.classList.contains("is-preinit")&&(i.classList.remove("is-preinit"),i.offsetWidth)},isMobileViewport(){return window.matchMedia("(max-width: 767px)").matches},enableMobileVideo(){this.mobileVideoEnabled||(this.mobileVideoEnabled=!0,this.manageVideos())},bindMobileVideoGate(i){if(!this.isMobileViewport())return;const t=()=>this.enableMobileVideo();i.addEventListener("pointerdown",t,{once:!0,passive:!0})},syncFilmVideoSources(i=this.$refs.splideElement){if(!i)return;const t=this.isMobileViewport();i.querySelectorAll("[data-film-video]").forEach(r=>{const o=r.dataset.filmVideo,d=o==="mobile"&&!t||o==="desktop"&&t,a=r.querySelector("source");if(a){if(d){const l=a.getAttribute("src");l&&(a.dataset.src=l,a.removeAttribute("src"),r.removeAttribute("src"),r.load());return}a.dataset.src&&!a.getAttribute("src")&&(a.setAttribute("src",a.dataset.src),r.load())}})},bindFilmVideoViewportListener(i){this._filmVideoMql||(this._filmVideoMql=window.matchMedia("(max-width: 767px)"),this._onFilmVideoViewportChange=()=>{this.syncFilmVideoSources(i),this.manageVideos()},typeof this._filmVideoMql.addEventListener=="function"?this._filmVideoMql.addEventListener("change",this._onFilmVideoViewportChange):typeof this._filmVideoMql.addListener=="function"&&this._filmVideoMql.addListener(this._onFilmVideoViewportChange))},mountSplide(i,t){try{this.splideInstance=new i(t,p({type:n?"loop":"slide",useScroll:!1,autoplay:e,interval:s,pauseOnHover:!0,pauseOnFocus:!0,pagination:!0,arrows:!0,updateOnMove:!0,speed:1e3,gap:"2rem",padding:"8%",focus:"center",breakpoints:{768:{useScroll:!0,padding:"3%",gap:"1rem"}}})),this.splideInstance.on("drag move",()=>{this.enableMobileVideo()}),this.splideInstance.on("mounted move",()=>{setTimeout(()=>{this.syncFilmVideoSources(t),this.manageVideos()},10)}),this.splideInstance.on("mounted move",r=>{this.activeSlide=r!==void 0?r:this.splideInstance.index}),m(this.splideInstance),this.splideInstance.mount(),this.bindFilmVideoEvents(t)}catch(r){console.error("splide: Error during initialization:",r)}},bindFilmVideoEvents(i){i&&i.querySelectorAll("[data-film-video]").forEach(t=>{t.dataset.filmVideoBound!=="true"&&(t.dataset.filmVideoBound="true",t.addEventListener("playing",()=>{t.classList.add("has-started")}))})},onEnter(){this.inViewport=!0,this.manageVideos(),e&&this.splideInstance&&this.splideInstance.Components.Autoplay.play()},onLeave(){this.inViewport=!1,this.manageVideos(),e&&this.splideInstance&&this.splideInstance.Components.Autoplay.pause()},manageVideos(){const i=this.$refs.splideElement;if(!i)return;const t=this.isMobileViewport();i.querySelectorAll("video").forEach(o=>{const d=o.dataset.filmVideo;if(d==="mobile"&&!t){o.pause();return}if(d==="desktop"&&t){o.pause();return}if(t&&!this.mobileVideoEnabled){o.pause();return}const a=o.closest(".splide__slide");if(a&&a.classList.contains("is-active")&&this.inViewport){const l=o.play();l!==void 0&&l.catch(()=>{})}else o.pause()})},destroy(){this._filmVideoMql&&this._onFilmVideoViewportChange&&(typeof this._filmVideoMql.removeEventListener=="function"?this._filmVideoMql.removeEventListener("change",this._onFilmVideoViewportChange):typeof this._filmVideoMql.removeListener=="function"&&this._filmVideoMql.removeListener(this._onFilmVideoViewportChange)),this.splideInstance&&this.splideInstance.destroy()}}}const c=639;function V(e){if(e.breakpoints)return e.breakpoints;const n=e.mobilePeekPadding??"22%",s={};return e.perPageTablet!=null&&(s[e.tabletBreakpoint??1023]={perPage:e.perPageTablet}),e.perPageMobile!=null?s[e.mobileBreakpoint??767]={perPage:e.perPageMobile,padding:e.mobilePadding??{right:"1rem"},gap:e.gap??"16px"}:e.autoWidth||(s[640]={...g(n),gap:e.gap??"16px"}),s}function y(e){return{type:"slide",perPage:e.perPageMobile??1.3,perMove:1,gap:e.gap??"16px",padding:{right:e.paddingRight??"24px"},pagination:!0,arrows:!0,speed:550,rewind:!1,omitEnd:!0,focus:0,trimSpace
1:!0,autoplay:!1}}function w(e={}){return{splideInstance:null,inViewport:!0,_mobileMq:null,_onMobileChange:null,_mountPending:!1,init(){const n=this.$refs.splideElement;if(n){if(e.mobileOnly){const s=e.mobileMaxWidth??c;this._mobileMq=window.matchMedia(`(max-width: ${s}px)`),this._onMobileChange=()=>this.syncMobileSplide(),this._mobileMq.addEventListener("change",this._onMobileChange),this.syncMobileSplide();return}u().then(s=>{this.mountSplide(s,n)}).catch(s=>{console.error("productCarousel: Error loading Splide:",s)})}},shouldMountMobileSplide(){const n=e.mobileMaxWidth??c;return this._mobileMq?.matches??window.innerWidth<=n},syncMobileSplide(){const n=this.$refs.splideElement;if(!n)return;const s=this.shouldMountMobileSplide();if(s&&!this.splideInstance&&!this._mountPending){this._mountPending=!0,u().then(i=>{this._mountPending=!1,this.shouldMountMobileSplide()&&(this.splideInstance||this.mountSplide(i,n))}).catch(i=>{this._mountPending=!1,console.error("productCarousel: Error loading Splide:",i)});return}!s&&this.splideInstance&&this.destroySplideInstance()},mountSplide(n,s){try{const i=e.paddingRight??"24px",t=e.mobileOnly?y({...e,paddingRight:i}):e.autoWidth?{type:e.loop?"loop":"slide",autoWidth:!0,perMove:1,gap:e.gap??"1rem",pagination:!0,arrows:!0,speed:550,rewind:!1,trimSpace:!0,autoplay:!!e.autoplay,interval:e.interval??4e3,pauseOnHover:!0,pauseOnFocus:!0}:{type:e.loop?"loop":"slide",perPage:e.perPage??4.3,perMove:1,gap:e.gap??"16px",padding:{right:i},pagination:!0,arrows:!0,speed:550,rewind:!1,omitEnd:!e.loop,focus:e.focus??(e.loop?"center":0),trimSpace:!0,autoplay:!!e.autoplay,interval:e.interval??4e3,pauseOnHover:!0,pauseOnFocus:!0,breakpoints:V(e)};this.splideInstance=new n(s,p(t)),this.splideInstance.on("overflow",o=>{this.splideInstance.options={drag:o}}),m(this.splideInstance),this.splideInstance.mount();const r=()=>{f(s),s.dispatchEvent(new CustomEvent("product-carousel:ready",{bubbles:!0}))};e.refreshAfterMount?requestAnimationFrame(()=>{this.splideInstance?.refresh(),requestAnimationFrame(r)}):requestAnimationFrame(r),e.refreshOnImageLoad&&this.bindImageRefresh(s)}catch(i){console.error("productCarousel: Error during initialization:",i)}},bindImageRefresh(n){const s=()=>this.splideInstance?.refresh();n.querySelectorAll("img").forEach(i=>{i.complete||i.addEventListener("load",s,{once:!0})})},onEnter(){this.inViewport=!0,this.splideInstance?.options?.autoplay&&this.splideInstance.Components.Autoplay.play()},onLeave(){this.inViewport=!1,this.splideInstance?.options?.autoplay&&this.splideInstance.Components.Autoplay.pause()},destroySplideInstance(){this.splideInstance&&(this.splideInstance.destroy(),this.splideInstance=null)},destroy(){this._mobileMq&&this._onMobileChange&&(this._mobileMq.removeEventListener("change",this._onMobileChange),this._mobileMq=null,this._onMobileChange=null),this.destroySplideInstance()}}}function _(e={}){return{splideInstance:null,init(){const n=this.$refs.splideElement;if(!n)return;const s=window.matchMedia("(prefers-reduced-motion: reduce)").matches;Promise.all([u(),s?Promise.resolve(null):b(()=>import("./splide.Cshmr2Ee.min.js").then(i=>i.a),[],import.meta.url).then(i=>i.AutoScroll)]).then(([i,t])=>{this.splideInstance=new i(n,p({type:"loop",drag:"free",snap:!1,useScroll:!1,autoWidth:!0,arrows:!1,pagination:!1,gap:e.gap??"3rem",autoScroll:t?{speed:e.speed??.6,pauseOnHover:!1,pauseOnFocus:!1}:!1})),this.splideInstance.mount(t?{AutoScroll:t}:void 0)}).catch(i=>{console.error("logoMarquee: Error loading Splide:",i)})},onEnter(){this.splideInstance?.Components?.AutoScroll?.play()},onLeave(){this.splideInstance?.Components?.AutoScroll?.pause()},destroy(){this.splideInstance?.destroy()}}}function I(){return{isOpen:!1,open(){this.isOpen=!0,document.body.classList.add("promo-video-scroll-lock"),this.$nextTick(()=>{const e=this.$refs.embedTarget,n=this.$refs.embedSource;e&&n&&(e.innerHTML=n.innerHTML),this.$refs.modalPanel?.focus()})},close(){this.isOpen=!1,document.body.classList.remove("promo-video-scroll-lock"),this.$refs.embedTarget&&(this.$refs.embedTarget.innerHTML="")},destroy(){document.body.classList.remove("promo-video-scroll-lock")}}}let h=!1;function q(e){h||(e.data("splide",M),e.data("productCarousel",w),e.data("logoMarquee",_),e.data("embedLightbox",I),h=!0)}export{q as registerSplideComponents};

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.