PageSourceSearch

https://gowinston.ai/wp-content/themes/gowinston-wp/dist/js/blocks…stimonials-carousel.js?ver=1.1.7.1790085525

js gowinston.ai collected 2026-09-24 08:36:30 UTC 3,958 bytes, 1 lines download raw bytes

1(function(){function q(i){if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",i);return}i()}q(function(){document.querySelectorAll("[data-testimonials-carousel]").forEach(function(i){O(i)})});function O(i){if(i.dataset.gowinstonTestimonialsInit==="true")return;i.dataset.gowinstonTestimonialsInit="true";const t=i.querySelector(".block-testimonials-carousel__track");if(!t)return;let r=t.children;if(!r||!r.length)return;const M=Array.prototype.slice.call(r),a=M.length;for(let e=0;e<a;e++)t.insertBefore(M[e].cloneNode(!0),t.firstChild);for(let e=0;e<a;e++)t.appendChild(M[e].cloneNode(!0));r=t.children;let l=a;const N=Math.max(1e3,parseInt(i.getAttribute("data-speed"),10)||3500);let m=!0,u=0,f=0;const T=1.5,H=2.75,B=1/4,_=1/3,G=576,j=767,J=1365,K=1536;function X(e){const o=parseFloat(getComputedStyle(document.documentElement).fontSize);return e*(Number.isFinite(o)?o:16)}function F(){return X(T)}function R(e){return e>=K?"desktop-large":e>J?"desktop":e>j?"tablet":e>G?"mobile-large":"mobile"}function Q(e){return e==="mobile"||e==="mobile-large"||e==="tablet"}function W(){const e=i.clientWidth,o=window.innerWidth,s=R(o),h=F();s==="mobile"?(f=X(H),u=Math.max(200,o-f*2)):s==="mobile-large"?(u=Math.max(200,Math.floor(o*2/3)),f=u*B):s==="tablet"?(u=Math.max(200,Math.floor((o-h)*3/8)),f=u*_):s==="desktop-large"?(f=0,u=Math.max(200,Math.floor((e-3*h)/5))):s==="desktop"&&(f=0,u=Math.max(200,Math.floor((e-3*h)/4))),i.style.paddingLeft="0px",i.style.paddingRight="0px";for(let n=0;n<r.length;n++)r[n].style.width=u+"px",r[n].style.maxWidth="",r[n].style.flexBasis="",r[n].style.height="auto";t.offsetHeight;let p=0;for(let n=0;n<r.length;n++)p=Math.max(p,r[n].offsetHeight);for(let n=0;n<r.length;n++)r[n].style.height=p+"px";t.style.gap=T+"rem",c(l,!1)}let v=null;function A(){v!==null&&cancelAnimationFrame(v),v=requestAnimationFrame(function(){v=requestAnimationFrame(W)})}const w=300;let g=null;function y(){g!==null&&(clearTimeout(g),g=null)}function k(){if(a===0)return;let e=l;for(;e<a;)e+=a;for(;e>=a*2;)e-=a;y(),c(e,!1)}function U(){y(),g=setTimeout(k,w+50)}function c(e,o){l=e;const s=u+F(),h=window.innerWidth,p=R(h);let n;Q(p)?n=l*s-f:n=l*s-s/2,t.style.transition=o!==!1?"transform "+w+"ms ease":"none",t.style.transform="translateX("+-n+"px)",o!==!1?U():y()}let z,d=!1,b=0,x=0,P=0;const V=50;function C(){D(),z=setInterval(function(){m&&!d&&c(l+1,!0)},N)}function D(){z&&clearInterval(z)}function S(e){return e.touches?e.touches[0].clientX:e.clientX}function I(e){d=!0,m=!1,b=S(e),x=b,document.addEventListener("mousemove",L),document.addEventListener("mouseup",E),document.addEventListener("touchmove",L,{passive:!1}),document.addEventListener("touchend",E,{passive:!1});const s=t.style.transform.match(/translateX\(([^)]+)px\)/);P=s?parseFloat(s[1]):0,t.style.transition="none",e.preventDefault()}function L(e){if(!d)return;x=S(e);const o=x-b,s=P+o;t.style.transform="translateX("+s+"px)",e.preventDefault()}function E(e){if(!d)return;d=!1;const o=x-b,s=Math.abs(o);t.style.transition="transform "+w+"ms ease",s>V?o>0?c(l-1,!0):c(l+1,!0):c(l,!0),setTimeout(function(){m=!0},1e3),document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",L,{passive:!1}),document.removeEventListener("touchend",E,{passive:!1}),e.preventDefault()}window.addEventListener("resize",A),typeof ResizeObserver<"u"&&new ResizeObserver(A).observe(i),t.addEventListener("transitionend",function(e){e.target!==t||e.propertyName!=="transform"||k()}),document.addEventListener("visibilitychange",function(){if(document.hidden){D(),y();return}k(),d||(m=!0,C())}),t.addEventListener("mousedown",I),t.addEventListener("touchstart",I,{passive:!1}),i.addEventListener("mouseenter",function(){d||(m=!1)}),i.addEventListener("mouseleave",function(){d||(m=!0)}),i.style.visibility="hidden",W(),requestAnimationFrame(function(){c(a,!1),i.style.visibility="visible",C()})}})();

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.