PageSourceSearch

https://photomath.com/assets/BBGt_Pc6.min.js

js photomath.com collected 2026-10-01 11:30:00 UTC 3,417 bytes, 1 lines download raw bytes

1import{t as e}from"../chunks/D6hGt8f_.min.js";var t=class extends HTMLElement{constructor(...t){super(...t),this.domWatcher=new e,this.activeSlide=-1,this.currentBreakpoint=``,this.extremeViewport=!1,this.autoplayEnabled=!1,this.autoplayTimeout=0}connectedCallback(){this.slides=this.getSlotElements(`slide`),this.dots=this.getSlotElements(`dot`),this.video=this.getSlotElement(`video`),window.addEventListener(`resize`,()=>this.onResize()),this.onResize()}init(){if(this.currentBreakpoint===`mobile`)this.initAutoplay();else if(this.extremeViewport)this.classList.add(`extreme-viewport`),this.initAutoplay();else{let e=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){let t=e.target,n=Number(t.getAttribute(`data-index`));this.setActiveSlideIndex(n)}})},{rootMargin:`-50% 0% -50% 0%`});this.slides.forEach(t=>{e.observe(t)}),this.intersectionObserver=e}this.dots.forEach((e,t)=>{this.domWatcher.add({element:e,on:`click`,callback:()=>{this.currentBreakpoint===`mobile`||this.extremeViewport?(this.resetAutoplay(),this.setActiveSlideIndex(t)):this.scrollToSlide(t)}})}),this.setActiveSlideIndex(0),this.video.addEventListener(`timeupdate`,()=>{let e=this.slides[this.activeSlide].getAttribute(`data-video-duration`);if(e){let[t,n]=e.split(`,`).map(e=>Number(e));this.video.currentTime>=n&&(this.video.pause(),this.activeSlide===0&&(this.video.currentTime=t,this.video.play()),this.autoplayEnabled&&!this.autoplayTimeout&&(this.autoplayTimeout=window.setTimeout(()=>{let e=(this.activeSlide+1)%this.slides.length;this.setActiveSlideIndex(e),this.autoplayTimeout=0},2e3)))}}),this.video.classList.add(`ready`)}initAutoplay(){this.autoplayEnabled=!0}resetAutoplay(){this.autoplayTimeout&&=(window.clearTimeout(this.autoplayTimeout),0),this.initAutoplay()}reset(){this.autoplayTimeout&&window.clearTimeout(this.autoplayTimeout),this.intersectionObserver&&=(this.intersectionObserver.disconnect(),null),this.domWatcher&&this.domWatcher.removeAll(),this.classList.remove(`extreme-viewport`)}onResize(){let e=!1,t=!1,n=this.getBreakpoint();n!==this.currentBreakpoint&&(this.currentBreakpoint&&(e=!0),this.currentBreakpoint=n,t=!0);let r=this.testExtremeViewport();r!==this.extremeViewport&&(this.extremeViewport=r,e=!0,t=!0),e&&this.reset(),t&&this.init()}testExtremeViewport(){return!![`(max-width: 768px) and (min-height: 1000px)`,`(min-width: 769px) and (max-width: 1023px) and (min-height: 1100px)`,`(min-width: 1024px) and (min-height: 1100px)`].some(e=>window.matchMedia(e).matches)}getBreakpoint(){return window.innerWidth<768?`mobile`:`desktop`}getActiveSlideIndex(){}setActiveSlideIndex(e){this.activeSlide!==e&&(this.activeSlide=e,this.slides.forEach((t,n)=>{if(t.setAttribute(`data-active`,String(n===e)),n===e){let e=t.getAttribute(`data-video-duration`);e&&this.setVideoDuration(e)}}),this.dots.forEach((t,n)=>{t.setAttribute(`data-active`,String(n===e))}))}setVideoDuration(e){this.video.pause();let[t]=e.split(`,`).map(e=>Number(e));this.video.currentTime=t,this.video.play()}scrollToSlide(e){let t=this.slides[e].getBoundingClientRect(),n=t.top+window.scrollY,r=window.innerHeight,i=Math.floor(n+.5*t.height-.5*r);window.scroll({top:i,behavior:`smooth`})}getSlotElement(e){return this.querySelector(`[data-slot="${e}"]`)||null}getSlotElements(e){return Array.from(this.querySelectorAll(`[data-slot="${e}"]`))}};customElements.get(`pm-landing-hero`)||customElements.define(`pm-landing-hero`,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.