PageSourceSearch

https://dsti.school/assets/dsti-home.251c978081.js

js dsti.school collected 2026-10-09 04:58:56 UTC 4,565 bytes, 1 lines download raw bytes

1(()=>{const heroVideo=document.querySelector(".home-hero-video"),heroContent=document.querySelector(".home-hero-content"),deferredStudyVideos=Array.from(document.querySelectorAll("video.home-study-media[data-home-deferred-video]"));heroContent&&(heroContent.style.opacity="1",heroContent.style.visibility="visible");const reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)"),MAX_PLAY_ATTEMPTS=3,playAttempts=new WeakMap,playPending=new WeakSet;let heroPlayTimer=null;const shouldPlay=()=>!reducedMotion.matches&&!document.hidden,prepareInlineVideo=(video,preload="metadata")=>{video&&(video.muted=!0,video.defaultMuted=!0,video.playsInline=!0,video.setAttribute("muted",""),video.setAttribute("playsinline",""),video.setAttribute("webkit-playsinline",""),video.setAttribute("preload",preload))},markPlaybackFailure=video=>{!video||video.dataset.playbackFailed==="true"||(video.dataset.playbackFailed="true",video.pause?.(),video.removeAttribute("autoplay"),video.getAttribute("poster")&&video.load?.())},playVideo=video=>{if(!video||!shouldPlay()||video.dataset.playbackFailed==="true"||playPending.has(video))return;const attempt=(playAttempts.get(video)||0)+1;playAttempts.set(video,attempt),playPending.add(video);const failed=()=>{if(playPending.delete(video),attempt>=MAX_PLAY_ATTEMPTS){markPlaybackFailure(video);return}window.setTimeout(()=>playVideo(video),attempt*180)};try{const promise=video.play?.();promise&&typeof promise.then=="function"?promise.then(()=>{playPending.delete(video),playAttempts.delete(video)}).catch(failed):(playPending.delete(video),playAttempts.delete(video))}catch{failed()}},tryPlayHero=()=>{!heroVideo||!shouldPlay()||(prepareInlineVideo(heroVideo,"metadata"),playVideo(heroVideo))},requestHeroPlay=(delay=0)=>{window.clearTimeout(heroPlayTimer),heroPlayTimer=window.setTimeout(tryPlayHero,delay)},updateHeroVideo=()=>{if(heroVideo){if(reducedMotion.matches){heroVideo.pause(),heroVideo.removeAttribute("autoplay");return}heroVideo.setAttribute("autoplay",""),requestHeroPlay()}};heroVideo&&(prepareInlineVideo(heroVideo,"metadata"),updateHeroVideo(),["loadedmetadata","loadeddata","canplay","canplaythrough"].forEach(eventName=>{heroVideo.addEventListener(eventName,()=>requestHeroPlay(),{passive:!0})}),heroVideo.addEventListener("pause",()=>{shouldPlay()&&requestHeroPlay(160)},{passive:!0}),heroVideo.addEventListener("stalled",()=>requestHeroPlay(220),{passive:!0}),heroVideo.addEventListener("error",()=>markPlaybackFailure(heroVideo),{once:!0}));const hydrateStudyVideo=video=>{if(!(!video||video.dataset.homeVideoHydrated==="true")){if(video.dataset.homeVideoHydrated="true",prepareInlineVideo(video,"metadata"),video.dataset.homeVideoSrc&&!video.querySelector("source[src]")){const source=document.createElement("source");source.src=video.dataset.homeVideoSrc,source.type=video.dataset.homeVideoType||"video/mp4",video.appendChild(source)}video.load?.(),video.addEventListener("error",()=>markPlaybackFailure(video),{once:!0}),video.addEventListener("canplay",()=>playVideo(video),{once:!0,passive:!0}),playVideo(video)}},hydrateVisibleStudyVideos=()=>{if(!deferredStudyVideos.length||reducedMotion.matches)return;const viewportH=window.innerHeight||document.documentElement.clientHeight||0;deferredStudyVideos.forEach(video=>{const rect=video.getBoundingClientRect();rect.top<viewportH+420&&rect.bottom>-160&&hydrateStudyVideo(video)})};if(deferredStudyVideos.length)if(deferredStudyVideos.forEach(video=>prepareInlineVideo(video,"none")),"IntersectionObserver"in window){const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&(hydrateStudyVideo(entry.target),observer.unobserve(entry.target))})},{rootMargin:"420px 0px",threshold:.01});deferredStudyVideos.forEach(video=>observer.observe(video))}else["scroll","resize","orientationchange"].forEach(eventName=>{window.addEventListener(eventName,hydrateVisibleStudyVideos,{passive:!0})}),window.setTimeout(hydrateVisibleStudyVideos,900);document.addEventListener("visibilitychange",()=>{updateHeroVideo(),hydrateVisibleStudyVideos()},{passive:!0}),window.addEventListener("pageshow",()=>{requestHeroPlay(80),hydrateVisibleStudyVideos()},{passive:!0}),window.addEventListener("focus",()=>requestHeroPlay(80),{passive:!0}),["pointerdown","touchstart","scroll"].forEach(eventName=>{window.addEventListener(eventName,()=>{requestHeroPlay(),hydrateVisibleStudyVideos()},{once:!0,passive:!0})}),reducedMotion.addEventListener?.("change",()=>{updateHeroVideo(),reducedMotion.matches||hydrateVisibleStudyVideos()})})();

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.