PageSourceSearch

https://tipatshimuna.ca/wp-content/plugins/advanced-backgrounds/assets/vendor/jarallax/dist/jarallax.min.js

js tipatshimuna.ca collected 2026-10-02 11:23:10 UTC 11,380 bytes, 6 lines download raw bytes

vendor: 11,380 bytes, lines 1-6
1/*!
2 * Jarallax v3.1.0 (https://github.com/nk-o/jarallax)
3 * Copyright 2026 nK <https://nkdev.info>
4 * Licensed under MIT (https://github.com/nk-o/jarallax/blob/master/LICENSE)
5 */
6!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).jarallax=e()}(this,function(){"use strict";function t(t){"undefined"!=typeof document&&("complete"===document.readyState||"interactive"===document.readyState?t():document.addEventListener("DOMContentLoaded",t,{capture:!0,once:!0,passive:!0}))}let e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var i=e;const o={type:"scroll",speed:.5,containerClass:"jarallax-container",imgSrc:null,imgElement:".jarallax-img",imgSize:"cover",imgPosition:"50% 50%",imgRepeat:"no-repeat",keepImg:!1,elementInViewport:null,zIndex:-100,disableParallax:!1,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null,videoClass:"jarallax-video",videoSrc:null,videoStartTime:0,videoEndTime:0,videoVolume:0,videoYoutubeHost:"",videoVimeoHost:"",videoLoop:!0,videoPlayOnlyVisible:!0,videoLazyLoading:!0,disableVideo:!1,onVideoInsert:null,onVideoWorkerInit:null};const n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(i.navigator?.userAgent??"");let s=0,a=0,r=null;function l(){return"undefined"!=typeof document&&void 0!==document.documentElement}function h(){if(!l())return s=i.innerWidth||0,void(a=i.innerHeight||0);s=i.innerWidth||document.documentElement.clientWidth,a=n?l()?(!r&&document.body&&(r=document.createElement("div"),r.style.cssText="position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;",document.body.appendChild(r)),(r?r.clientHeight:0)||i.innerHeight||document.documentElement.clientHeight):i.innerHeight||0:i.innerHeight||document.documentElement.clientHeight}function c(){return{width:s,height:a}}h(),i.addEventListener?.("resize",h),i.addEventListener?.("orientationchange",h),i.addEventListener?.("load",h),t(()=>{h()});const m=[];function d(){if(!m.length)return;const{width:t,height:e}=c();m.forEach((i,o)=>{const{instance:n,oldData:s}=i;if(!n.isVisible())return;const a=n.$item.getBoundingClientRect(),r={width:a.width,height:a.height,top:a.top,bottom:a.bottom,wndW:t,wndH:e},l=!s||s.wndW!==r.wndW||s.wndH!==r.wndH||s.width!==r.width||s.height!==r.height,h=l||!s||s.top!==r.top||s.bottom!==r.bottom;m[o].oldData=r,l&&n.onResize(),h&&n.onScroll()}),i.requestAnimationFrame(d)}const p=i.IntersectionObserver&&new i.IntersectionObserver(t=>{t.forEach(t=>{const e=t.target;e.jarallax&&(e.jarallax.isElementInViewport=t.isIntersecting)})},{rootMargin:"50px"});let g;const u=i.navigator??{userAgent:""},f="undefined"!=typeof document&&"undefined"!=typeof Element&&"undefined"!=typeof HTMLElement;let y=0;function b(t){if("string"==typeof t){const e=t.match(/^\/(.*)\/([dgimsuvy]*)$/);t=e?new RegExp(e[1],e[2]):new RegExp(t)}if(t instanceof RegExp){const e=t;return()=>e.test(u.userAgent)}return"function"!=typeof t?()=>!0===t:t}class x{constructor(t,e){this.parallaxScrollDistance=0,this.isElementInViewport=!1,this.instanceID=y,y+=1,this.$item=t,this.defaults={...o};const n=this.$item.dataset||{},s={};Object.keys(n).forEach(t=>{const e=t.slice(0,1).toLowerCase()+t.slice(1);e&&void 0!==this.defaults[e]&&(s[e]=n[t])}),this.options=this.extend({},this.defaults,s,e||{}),this.pureOptions=this.extend({},this.options),Object.keys(this.options).forEach(t=>{const e=t,i=this.options[e];"true"===i?this.options[t]=!0:"false"===i&&(this.options[t]=!1)}),this.options.speed=Math.min(2,Math.max(-1,parseFloat(`${this.options.speed}`)));const a=b(e?.disableParallax??this.options.disableParallax);this.options.disableParallax=()=>(void 0===g&&(g="function"==typeof i.matchMedia?i.matchMedia("(prefers-reduced-motion: reduce)"):null),(g?.matches??!1)||a()),this.options.disableVideo=b(e?.disableVideo??this.options.disableVideo);let r=this.options.elementInViewport;!r||"object"!=typeof r||!("length"in r)||r instanceof Element||([r]=Array.from(r)),r instanceof Element||(r=null),this.options.elementInViewport=r,this.image={src:this.options.imgSrc||null,$container:null,useImgTag:!1,position:"fixed"},this.initImg()&&this.canInitParallax()&&this.init()}css(t,e){return function(t,e){return"string"==typeof e?i.getComputedStyle(t).getPropertyValue(e):(Object.keys(e).forEach(i=>{t.style[i]=e[i]}),t)}(t,e)}extend(t,...e){return function(t,...e){const i=t||{};return Object.keys(e).forEach(t=>{const o=e[Number(t)];o&&Object.keys(o).forEach(t=>{i[t]=o[t]})}),i}(t,...e)}getWindowData(){const{width:t,height:e}=c();return{width:t,height:e,y:f?document.documentElement.scrollTop:0}}initImg(){let t=this.options.imgElement;if(t&&"string"==typeof t&&(t=this.$item.querySelector(t)),!(t instanceof Element))if(this.options.imgSrc){const e=new Image;e.src=this.options.imgSrc,t=e}else t=null;return t&&(this.options.keepImg?this.image.$item=t.cloneNode(!0):(this.image.$item=t,this.image.$itemParent=t.parentNode),this.image.useImgTag=!0),!!this.image.$item||(null===this.image.src&&(this.image.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",this.image.bgImage=this.css(this.$item,"background-image")),Boolean(this.image.bgImage&&"none"!==this.image.bgImage))}canInitParallax(){return!this.options.disableParallax()}init(){const t={position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden"};let e={pointerEvents:"none",transformStyle:"preserve-3d",backfaceVisibility:"hidden"};if(!this.options.keepImg){const t=this.$item.getAttribute("style");if(t&&this.$item.setAttribute("data-jarallax-original-styles",t),this.image.useImgTag&&this.image.$item){const t=this.image.$item.getAttribute("style");t&&this.image.$item.setAttribute("data-jarallax-original-styles",t)}}if("static"===this.css(this.$item,"position")&&this.css(this.$item,{position:"relative"}),"auto"===this.css(this.$item,"z-index")&&this.css(this.$item,{zIndex:0}),this.image.$container=document.createElement("div"),this.css(this.image.$container,t),this.css(this.image.$container,{zIndex:this.options.zIndex}),"fixed"===this.image.position&&this.css(this.image.$container,{WebkitClipPath:"polygon(0 0, 100% 0, 100% 100%, 0 100%)",clipPath:"polygon(0 0, 100% 0, 100% 100%, 0 100%)"}),this.image.$container.setAttribute("id",`jarallax-container-${this.instanceID}`),this.options.containerClass&&this.image.$container.setAttribute("class",this.options.containerClass),this.$item.appendChild(this.image.$container),this.image.useImgTag&&this.image.$item?e=this.extend({objectFit:this.options.imgSize,objectPosition:this.options.imgPosition,maxWidth:"none"},t,e):(this.image.$item=document.createElement("div"),this.image.src&&(e=this.extend({backgroundPosition:this.options.imgPosition,backgroundSize:this.options.imgSize,backgroundRepeat:this.options.imgRepeat,backgroundImage:this.image.bgImage||`url("${this.image.src}")`},t,e))),"opacity"!==this.options.type&&"scale"!==this.options.type&&"scale-opacity"!==this.options.type&&1!==this.options.speed||(this.image.position="absolute"),"fixed"===this.image.position){const t=function(t){const e=[];let i=t;for(;null!==i.parentElement;)i=i.parentElement,1===i.nodeType&&e.push(i);return e}(this.$item).filter(t=>{const e=i.getComputedStyle(t),o=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.transform;return o&&"none"!==o||/(auto|scroll)/.test(e.overflow+e.overflowY+e.overflowX)});this.image.position=t.length?"absolute":"fixed"}var o;e.position=this.image.position,this.css(this.image.$item,e),this.image.$container.appendChild(this.image.$item),this.onResize(),this.onScroll(!0),this.options.onInit?.call(this),"none"!==this.css(this.$item,"background-image")&&this.css(this.$item,{backgroundImage:"none"}),o=this,m.push({instance:o}),1===m.length&&i.requestAnimationFrame(d),p?.observe(o.options.elementInViewport||o.$item)}destroy(){var t;t=this,m.forEach((e,i)=>{e.instance.instanceID===t.instanceID&&m.splice(i,1)}),p?.unobserve(t.options.elementInViewport||t.$item);const e=this.$item.getAttribute("data-jarallax-original-styles");if(this.$item.removeAttribute("data-jarallax-original-styles"),e?this.$item.setAttribute("style",e):this.$item.removeAttribute("style"),this.image.useImgTag&&this.image.$item){const t=this.image.$item.getAttribute("data-jarallax-original-styles");this.image.$item.removeAttribute("data-jarallax-original-styles"),t?this.image.$item.setAttribute("style",t):this.image.$item.removeAttribute("style"),this.image.$itemParent?.appendChild(this.image.$item)}this.image.$container?.parentNode&&this.image.$container.parentNode.removeChild(this.image.$container),this.options.onDestroy?.call(this),delete this.$item.jarallax}coverImage(){const{height:t}=c(),e=this.image.$container.getBoundingClientRect(),i=e.height,{speed:o}=this.options,n="scroll"===this.options.type||"scroll-opacity"===this.options.type;let s=0,a=i;n&&(o<0?(s=o*Math.max(i,t),t<i&&(s-=o*(i-t))):s=o*(i+t),o>1?a=Math.abs(s-t):o<0?a=s/o+Math.abs(s):a+=(t-i)*(1-o),s/=2),this.parallaxScrollDistance=s;const r=(n?t-a:i-a)/2;return this.css(this.image.$item,{height:`${a}px`,marginTop:`${r}px`,left:"fixed"===this.image.position?`${e.left}px`:"0",width:`${e.width}px`}),this.options.onCoverImage?.call(this),{image:{height:a,marginTop:r},container:e}}isVisible(){return this.isElementInViewport||!1}onScroll(t){if(!t&&!this.isVisible())return;const{height:e}=c(),i=this.$item.getBoundingClientRect(),o=i.top,n=i.height,s={},a=Math.max(0,o),r=Math.max(0,n+o),l=Math.max(0,-o),h=Math.max(0,o+n-e),m=Math.max(0,n-(o+n-e)),d=Math.max(0,-o+e-n),p=1-(e-o)/(e+n)*2;let g=1;if(n<e?g=1-(l||h)/n:r<=e?g=r/e:m<=e&&(g=m/e),"opacity"!==this.options.type&&"scale-opacity"!==this.options.type&&"scroll-opacity"!==this.options.type||(s.transform="translate3d(0,0,0)",s.opacity=g),"scale"===this.options.type||"scale-opacity"===this.options.type){let t=1;this.options.speed<0?t-=this.options.speed*g:t+=this.options.speed*(1-g),s.transform=`scale(${t}) translate3d(0,0,0)`}if("scroll"===this.options.type||"scroll-opacity"===this.options.type){let t=this.parallaxScrollDistance*p;"absolute"===this.image.position&&(t-=o),s.transform=`translate3d(0,${t}px,0)`}this.css(this.image.$item,s),this.options.onScroll?.call(this,{section:i,beforeTop:a,beforeTopEnd:r,afterTop:l,beforeBottom:h,beforeBottomEnd:m,afterBottom:d,visiblePercent:g,fromViewportCenter:p})}onResize(){this.coverImage()}}const $=function(t,e,...i){let o,n=t;if(!t)return t;if(("object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName)&&(n=[t]),!n||"object"!=typeof n||"number"!=typeof n.length)return n;if(!f)return"string"==typeof e?void 0:n;for(let t=0;t<n.length;t+=1){const s=n[t];if("object"==typeof e||void 0===e?s.jarallax||(s.jarallax=new x(s,e)):s.jarallax&&(o=s.jarallax[e].apply(s.jarallax,i)),void 0!==o)return o}return n};$.constructor=x;const v=i.jQuery;if(void 0!==v){const t=function(...t){Array.prototype.unshift.call(t,this);const e=$.apply(i,t);return"object"!=typeof e?e:this};t.constructor=$.constructor;const e=v.fn.jarallax;v.fn.jarallax=t,t.noConflict=function(){return v.fn.jarallax=e,this}}return t(()=>{$(document.querySelectorAll("[data-jarallax]"))}),$});//# sourceMappingURL=jarallax.min.js.map

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.