1"use strict";(self.webpackChunkbabel_seed_project=self.webpackChunkbabel_seed_project||[]).push([[8223],{7949:function(e,t,s){s.r(t);class i{static DEFAULTS={speed:.2,scale:1.2,orientation:"up",delay:100,transition:"transform 0.5s ease-out",overflow:!0,type:"auto"};constructor(e,t={}){e&&(this.elements="string"==typeof e?document.querySelectorAll(e):e instanceof Element?[e]:e,0!==this.elements.length&&(this.settings={...i.DEFAULTS,...t},this.elementsList=[],this.scrollHandler=null,this.resizeHandler=null,this.init()))}init(){Array.from(this.elements).forEach((e=>{if(e.dataset.simpleParallaxInitialized)return;e.dataset.simpleParallaxInitialized=!0;let t=this.settings.type;"auto"===t&&(t="IMG"===e.tagName?"image":"PICTURE"===e.tagName?"picture":"VIDEO"===e.tagName?"video":"none"!==window.getComputedStyle(e).backgroundImage?"background":"element");const s={element:e,type:t,wrapper:null,isVisible:!1,computedPosition:0};this.setupElement(s),this.elementsList.push(s)})),this.bindEvents(),setTimeout((()=>{this.updateElementsPosition()}),this.settings.delay)}setupElement(e){const{element:t,type:s}=e,i=document.createElement("div");switch(i.classList.add("simple-parallax-wrapper"),i.style.overflow=this.settings.overflow?"hidden":"visible",i.style.position="relative",i.style.width="100%",i.style.height="100%",s){case"picture":const s=t.querySelector("img");e.transformElement=s;break;case"background":const n=window.getComputedStyle(t),o=n.backgroundImage,l=n.backgroundSize,a=n.backgroundPosition,r=n.backgroundRepeat,d=document.createElement("div");d.style.position="absolute",d.style.top="0",d.style.left="0",d.style.width="100%",d.style.height="100%",d.style.backgroundImage=o,d.style.backgroundSize=l,d.style.backgroundPosition=a,d.style.backgroundRepeat=r,t.style.backgroundImage="none",i.appendChild(d),e.transformElement=d}const n=e.transformElement||t;n.style.willChange="transform",n.style.transition=this.settings.transition,n.style.transform=`scale(${this.settings.scale})`,t.parentNode.insertBefore(i,t),i.appendChild(t),e.wrapper=i}bindEvents(){this.scrollHandler=this.throttle((()=>{this.updateElementsPosition()}),15),this.resizeHandler=this.debounce((()=>{this.updateElementsPosition()}),250),window.addEventListener("scroll",this.scrollHandler),window.addEventListener("resize",this.resizeHandler)}updateElementsPosition(){this.elementsList.forEach((e=>{this.isInViewport(e)?(e.isVisible=!0,this.updatePosition(e)):e.isVisible=!1}))}isInViewport(e){const t=e.wrapper.getBoundingClientRect(),s=window.innerHeight;return t.top<=s&&t.top+t.height>=0||t.bottom>=0&&t.bottom<=s}updatePosition(e){const t=e.wrapper.getBoundingClientRect(),s=window.innerHeight,i=(s-t.top)/(s+t.height)*100;let n;const o=this.settings.speed;switch(this.settings.orientation){case"up":case"left":default:n=(i-50)*o*-1;break;case"down":case"right":n=(i-50)*o}const l=e.transformElement||e.element;"up"===this.settings.orientation||"down"===this.settings.orientation?l.style.transform=`translateY(${n}px) scale(${this.settings.scale})`:l.style.transform=`translateX(${n}px) scale(${this.settings.scale})`,e.computedPosition=n}destroy(){window.removeEventListener("scroll",this.scrollHandler),window.removeEventListener("resize",this.resizeHandler),this.elementsList.forEach((e=>{const{element:t,wrapper:s,type:i,transformElement:n}=e;t.style.transform="",t.style.willChange="",t.style.transition="","image"===i||"video"===i?(t.style.objectFit="",t.style.objectPosition="",t.style.width="",t.style.height="",t.style.position=""):"background"===i&&n&&(t.style.backgroundImage=n.style.backgroundImage,t.style.backgroundSize=n.style.backgroundSize,t.style.backgroundPosition=n.style.backgroundPosition,t.style.backgroundRepeat=n.style.backgroundRepeat),delete t.dataset.simpleParallaxInitialized,s&&s.parentNode&&(s.parentNode.insertBefore(t,s),s.parentNode.removeChild(s))})),this.elementsList=[]}throttle(e,t){let s=Date.now();return function(){s+t-Date.now()<0&&(e(),s=Date.now())}}debounce(e,t){let s;return function(){const i=this,n=arguments;clearTimeout(s),s=setTimeout((()=>{e.apply(i,n)}),t)}}}t.default=i}}]);
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.