PageSourceSearch

https://www.activecampaign.com/dist/assets/AmbientVideo-BNQ5tPiZ.js

js activecampaign.com collected 2026-09-24 06:38:56 UTC 3,116 bytes, 1 lines download raw bytes

1var n=Object.defineProperty;var b=(o,t,e)=>t in o?n(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var s=(o,t)=>n(o,"name",{value:t,configurable:!0});var a=(o,t,e)=>b(o,typeof t!="symbol"?t+"":t,e);import{G as r,M as l,S as h,A as u}from"./site-B0JexaGd.js";import{s as d}from"./svg-drRkrG95.js";import{M as f}from"./MediaQueries-Dvsfv7Dp.js";import"./formatting-rsiiYB3c.js";const i=class i{constructor(t,e){if(this.element=t,this.options={...i.Options,...e},this.id=this.element.id,!this.id)throw new Error("`id` attribute is required on the element.");this.isPlaying=!1,this.userPaused=!1,this.init()}init(){return this.createChildRefs().enable(),this}createChildRefs(){return this.$video=this.element.querySelector("video"),this.$control=this.element.querySelector(`button[${i.Attributes.CONTROL}]`),this.$controlIcon=this.$control.querySelector("use"),this.controlPlayLabel=this.$control.getAttribute(i.Attributes.TEXT_FOR_PLAY),this.controlPauseLabel=this.$control.getAttribute(i.Attributes.TEXT_FOR_PAUSE),this}enable(){return f.MOTION_QUERY.matches?(this.$video.pause(),this.$video.setAttribute("disabled",!0),this.$control.remove(),this):(this.isPlaying=this.$video.hasAttribute("autoplay")&&!this.$video.hasAttribute("disabled"),this.createIntersectionObserver(),this.$control.addEventListener("click",this.onControlClick),r.on(l.IS_OPEN,this.pauseVideoOnOverlay),r.on(h.IS_OPEN,this.pauseVideoOnOverlay),r.on(l.IS_CLOSED,this.resumeVideoAfterOverlay),r.on(h.IS_CLOSED,this.resumeVideoAfterOverlay),r.on(u.PLAY_ID,this.onPlayId),r.on(u.PAUSE_ID,this.onPauseId),this)}createIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:this.options.visibleThreshold},e=s(p=>{p.forEach(v=>{v.isIntersecting?this.userPaused||this.playVideo():this.pauseVideo()})},"handleIntersect");this.observer=new IntersectionObserver(e,t),this.observer.observe(this.$video)}onControlClick=s(t=>{t.preventDefault(),this.isPlaying?(this.userPaused=!0,this.pauseVideo()):(this.userPaused=!1,this.playVideo())},"onControlClick");onPlayId=s(t=>{t===this.id&&this.playVideo()},"onPlayId");onPauseId=s((t,e=!1)=>{t===this.id&&this.pauseVideo(e)},"onPauseId");pauseVideoOnOverlay=s(()=>{this.isPlaying&&this.pauseVideo()},"pauseVideoOnOverlay");resumeVideoAfterOverlay=s(()=>
1{if(this.userPaused)return;const t=this.$video.getBoundingClientRect();Math.min(t.bottom,window.innerHeight)-Math.max(t.top,0)>=t.height*this.options.visibleThreshold&&this.playVideo()},"resumeVideoAfterOverlay");playVideo(){this.isPlaying||(this.$video.play(),this.isPlaying=!0,this.$controlIcon=d.swapIconId(this.$controlIcon,"pause"),this.$control.setAttribute("aria-label",this.controlPauseLabel))}pauseVideo(t=!1){this.isPlaying&&(this.$video.pause(),t&&(this.$video.currentTime=0),this.isPlaying=!1,this.$controlIcon=d.swapIconId(this.$controlIcon,"play"),this.$control.setAttribute("aria-label",this.controlPlayLabel))}};s(i,"AmbientVideo"),a(i,"Attributes",{CONTROL:"aria-controls",TEXT_FOR_PLAY:"data-text-for-play",TEXT_FOR_PAUSE:"data-text-for-pause"}),a(i,"Options",{visibleThreshold:.4});let c=i;export{c as default};

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.