PageSourceSearch

https://get.mytime.com/wp-content/themes/Divi/includes/builder-5/v…library-script-group-carousel.js?ver=5.12.1

js mytime.com collected 2026-09-24 09:54:32 UTC 18,245 bytes, 1 lines download raw bytes

1!function(){"use strict";var e={19567:function(e){e.exports=window.jQuery},80967:function(e){e.exports=window.divi.scriptLibrary}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,o),s.exports}o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};!function(){o.r(n),o.d(n,{groupCarouselInit:function(){return V},groupCarouselReInit:function(){return U},groupCarouselReInitElement:function(){return Y},groupCarouselUpdate:function(){return G}});var e=o(80967);const t="divi:groupCarousel:init",r="divi:groupCarousel:beforeSlide",s="divi:groupCarousel:afterSlide",i="divi:groupCarousel:destroy",a="divi:groupCarousel:update",l={auto:!1,speed:2e3,transitionSpeed:200,pauseOnHover:!0,centerMode:!1,slidesToShow:1,slidesToScroll:1,showArrows:!0,showDots:!0,arrowPosition:"center",dotAlignment:"center",dotPosition:"below"},u="et_pb_group_carousel",c="et_pb_group_carousel_container",d="et_pb_group_carousel_track",p="et_pb_group_carousel_slide",_="et_pb_group_carousel_slide_active",f="et_pb_group_carousel_slide_last_visible",v="et_pb_group_carousel_slide_bleed_clip_prev",m="et_pb_group_carousel_slide_bleed_clip_next",w="et_pb_group_carousel_arrow_prev",b="et_pb_group_carousel_arrow_next",h="et_pb_group_carousel_dots",g="et_pb_group_carousel_dot",y="et_pb_group_carousel_dot_active",E="et_pb_group_carousel_initialized",S="et_pb_group_carousel_auto_rotate",L="et_pb_group_carousel_center_mode",A={start:0,endExclusive:0,active:0,lastVisible:0},M=[v,m];function T(e){M.forEach((t=>{e.classList.remove(t)}))}var C=o(19567),x=o.n(C);function I(e){return Array.from(e.querySelectorAll(".et-pb-background-video video")).filter((t=>t.closest(`.${u}`)===e))}function O({carouselRoot:e}){const t="function"==typeof window.et_pb_resize_section_video_bg,o="function"==typeof window.et_pb_center_video;(t||o)&&I(e).forEach((e=>{const n=x()(e);if(t&&window.et_pb_resize_section_video_bg(n),o){const e=n.closest(".mejs-video"),t=e.length?e:n;window.et_pb_center_video(t)}}))}function k(e){return e instanceof HTMLElement}function P(e){return void 0!==e.__groupCarouselInstance}function D(e){const t=document.querySelectorAll(e);return Array.from(t).filter(k)}function q(e){const t=e.querySelector(".et_pb_group_carousel_track");if(!t)return[];return Array.from(t.querySelectorAll(".et_pb_group_carousel_slide")).filter((e=>{let o=e.parentElement;for(;o&&o!==t;){if(o.classList.contains("et_pb_group_carousel_track"))return!1;o=o.parentElement}return o===t}))}function N(e,t,o=!1){e.classList.add(p,"et_pb_group_carousel_clone"),e.setAttribute("aria-hidden","true"),e.removeAttribute("id");const n=t.getAttribute("data-slide-id");n&&e.setAttribute("data-slide-id",n),o&&(e.setAttribute("data-clone-of",n||""),e.setAttribute("data-is-carousel-clone","true")),e.querySelectorAll("[id]").forEach((e=>e.removeAttribute("id"))),e.querySelectorAll("style").forEach((e=>e.remove()))}function $(e,t,o){return((e-t)%o+o)%o}function H(){const e=window.innerWidth,t=window.diviBreakpointData?.enabledBreakpoints;if(!t)return"desktop";const o=t.find((e=>e?.baseDevice))?.name??"desktop";let n=null,r=null,s=null;return t.forEach((t=>{if(t?.baseDevice)return;const o=t?.maxWidth?.value,i=t?.minWidth?.value;if(o&&i&&parseInt(o,10)>=e&&parseInt(i,10)<=e&&(n=t?.name),o&&!i){const s=parseInt(o,10);s>=e&&(null===r||s<r)&&(n=t?.name,r=s)}if(!o&&i){const o=parseInt(i,10);o<=e&&(null===s||o>s)&&(n=t?.name,s=o)}})),n??o}const F={auto:"data-carousel-auto",speed:"data-carousel-speed",transitionSpeed:"data-carousel-transition-speed",pauseOnHover:"data-carousel-pause-on-hover",centerMode:"data-carousel-center-mode",slidesToShow:"data-carousel-slides-to-show",slidesToScroll:"data-carousel-slides-to-scroll",showArrows:"data-carousel-show-arrows",showDots:"data-carousel-show-dots",arrowPosition:"data-carousel-arrow-position",dotAlignment:"data-carousel-dot-alignment",dotPosition:"data-carousel-dot-position"};function R(e,t,o,n,r){if(!e)return null;const s=function(e,t,o){const n=o.indexOf(e),r=o.indexOf(t);if(n<0||r<0)return[String(e)];const s=n<r,i=s?o.slice(n,r+1):o.slice(r,n+1);return s||i.reverse(),i}(o,n,r),i=s.find((o=>{const n=e[o];return n&&Object.prototype.hasOwnProperty.call(n,t)&&null!=n[t]&&""!==n[t]}));if(!i)return null;const a=e[i];return a?String(a[t]):null}function j(e){const t=Array.from(e.classList).find((e=>e.startsWith("et_pb_group_carousel_")));if(!t)return null;const o=`.${t}`,n=window.diviModuleGroupCarouselData?.find((e=>e.selector===o)),r=n?.data??{},s=function(e){const t=window.diviElementMultiViewData;return Array.isArray(t)?t.find((t=>{if("setAttrs"!==t.action||!t.data)return!1;const{selector:o}=t;if("string"!=typeof o||!o)return!1;try{return e===document.querySelector(o)}catch{return!1}}
1))?.data??null:null}(e),i=null!==s,a=H(),l=window.diviBreakpointData?.baseBreakpointName??"desktop",u=window.diviBreakpointData?.enabledBreakpointNames??["desktop","tablet","phone"],c=(t,o)=>{const n=e.getAttribute(o);return null!==n?n:String(t??"")},d=(e,t)=>{if("number"==typeof e)return e;if("string"==typeof e){const o=parseInt(e,10);return Number.isNaN(o)?t:o}return t},p=n?.responsive?.[a];if(p){const e=p,t=r;return{auto:!0===(e.auto??t.auto),speed:d(e.speed??t.speed,2e3),transitionSpeed:d(e.transitionSpeed??t.transitionSpeed,200),pauseOnHover:!0===(e.pauseOnHover??t.pauseOnHover),centerMode:!0===(e.centerMode??t.centerMode),slidesToShow:parseInt(String(e.slidesToShow??t.slidesToShow??"1"),10),slidesToScroll:parseInt(String(e.slidesToScroll??t.slidesToScroll??"1"),10),showArrows:!0===(e.showArrows??t.showArrows),showDots:!0===(e.showDots??t.showDots),arrowPosition:e.arrowPosition??t.arrowPosition??"center",dotAlignment:e.dotAlignment??t.dotAlignment??"center",dotPosition:e.dotPosition??t.dotPosition??"below"}}const _=e=>R(s,F[e],a,l,u),f=(e,t,o)=>{const n=_(e);return null!==n?n:i?String(t??""):c(t,o)},v=(e,t,o)=>{const n=_(e);return null!==n?"true"===n:i?t:"true"===c(t?"true":"false",o)};return{auto:v("auto",!0===r.auto,"data-carousel-auto"),speed:d(f("speed",r.speed,"data-carousel-speed"),2e3),transitionSpeed:d(f("transitionSpeed",r.transitionSpeed,"data-carousel-transition-speed"),200),pauseOnHover:v("pauseOnHover",!0===r.pauseOnHover,"data-carousel-pause-on-hover"),centerMode:v("centerMode",!0===r.centerMode,"data-carousel-center-mode"),slidesToShow:parseInt(f("slidesToShow",r.slidesToShow,"data-carousel-slides-to-show"),10),slidesToScroll:parseInt(f("slidesToScroll",r.slidesToScroll,"data-carousel-slides-to-scroll"),10),showArrows:v("showArrows",!0===r.showArrows,"data-carousel-show-arrows"),showDots:v("showDots",!0===r.showDots,"data-carousel-show-dots"),arrowPosition:f("arrowPosition",r.arrowPosition,"data-carousel-arrow-position"),dotAlignment:f("dotAlignment",r.dotAlignment,"data-carousel-dot-alignment"),dotPosition:f("dotPosition",r.dotPosition,"data-carousel-dot-position")}}const B="object"==typeof window.ET_Builder;function z(o,n,a){if(!o)return null;const u=o.__groupCarouselInstance;u?.destroy&&u.destroy();const M=o.querySelector(`.${d}`),C=o.querySelector(`.${c}`);if(!M)return null;M.style.direction="ltr",M.querySelectorAll(".et_pb_group_carousel_clone").forEach((e=>e.remove()));const x={...l,...n,auto:!B&&(n?.auto??l.auto)},k=q(o);if(0===k.length)return null;const P=k.length,D=Math.min(x.slidesToShow,P),H=Math.min(x.slidesToScroll,P),F=Math.min(Math.max(D+H-1,D,H,1),P);let R=F;if(null!==a&&Number.isFinite(a)){const e=Math.max(0,Math.min(a,P-1));R=F+e}let j,z,V=null,G=!1,W=null,X=null,U=null;const Y=[],Q={...A};let J=null,K=null;const Z=o.getAttribute("data-id")||"carousel";k.forEach(((e,t)=>{e.classList.add(p),e.setAttribute("data-slide-id",`${Z}-slide-${t}`)}));for(let e=0;e<F;e++){const t=k[(P-1-e%P+P)%P],o=t.cloneNode(!0);N(o,t,B),M.insertBefore(o,M.firstChild)}for(let e=0;e<F;e++){const t=k[e%P],o=t.cloneNode(!0);N(o,t,B),M.appendChild(o)}const ee=q(o);M.style.transition="none";for(let e=1;e<=10;e++)o.classList.remove(`et_pb_group_carousel_slides_${e}`);D>1&&D<=10&&o.classList.add(`et_pb_group_carousel_slides_${D}`),o.classList.toggle("et_pb_group_carousel_center_mode",x.centerMode);const te=e=>{if(e<0||e>=P||G)return;const t=$(R,F,P);e!==t&&(o.dispatchEvent(new CustomEvent(r,{detail:{currentSlide:t,nextSlide:e}})),R=F+e,G=!0,le())},oe=()=>{if(G)return;R+=H,G=!0,le()},ne=()=>{if(G)return;R-=H,G=!0,le()},re=()=>{if(!x.auto||V)return;const e=(e=!1)=>{!x.auto||!e&&G||(V=window.setTimeout((()=>{oe(),V=null}),x.speed))};o.scheduleNextSlideCallback=e,e(!0)},se=()=>{V&&(clearTimeout(V),V=null),delete o.scheduleNextSlideCallback},ie=()=>{C&&(null!==W&&cancelAnimationFrame(W),W=requestAnimationFrame((()=>{W=null,function({slides:e,visibleStartIndex:t,visibleEndIndexExclusive:o}){const n=Math.floor(t)-1,r=Math.ceil(o);e.forEach(((e,s)=>{T(e),s+1>t&&s<o||e.classList.contains(_)||(s!==n?s===r&&e.classList.add(m):e.classList.add(v))}))}({slides:ee,visibleStartIndex:Q.start,visibleEndIndexExclusive:Q.endExclusive})})))},ae=(e=!1)=>{null!==X&&cancelAnimationFrame(X),X=requestAnimationFrame((()=>{X=null,O({carouselRoot:o}
1),e&&(Y.splice(0).forEach((e=>e())),I(o).forEach((e=>{if(e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA)return;const t=()=>{e.removeEventListener("loadeddata",t),O({carouselRoot:o})};e.addEventListener("loadeddata",t),Y.push((()=>{e.removeEventListener("loadeddata",t)}))})))}))};function le(e=!1){const t=M,n=100/D;let r;if(x.centerMode){r=-(R-(D>1?(D-1)/2:0))*n}else r=-R*n;e?(t.style.transition="none",t.style.transform=`translateX(${r}%)`,requestAnimationFrame((()=>{t.style.transition=`transform ${x.transitionSpeed}ms ease-in-out`,o.classList.contains("et_pb_group_carousel_no_transitions")||(G=!1)}))):(t.style.transform=`translateX(${r}%)`,G&&(U&&t.removeEventListener("transitionend",U),U=e=>{e.target===t&&"transform"===e.propertyName&&(U&&(t.removeEventListener("transitionend",U),U=null),(()=>{const e=function(e,t,o){return e>=t+o||e<t?e>=t+o?t+(e-t-o):t+o+(e-t):null}(R,F,P);null!==e?(o.classList.add("et_pb_group_carousel_no_transitions"),R=e,le(!0),setTimeout((()=>{o.classList.remove("et_pb_group_carousel_no_transitions"),B&&le(!0),x.auto&&(se(),re()),G=!1}))):G=!1})(),requestAnimationFrame((()=>{if(ie(),ae(),x.auto&&!V){const e=o.scheduleNextSlideCallback;e&&e()}})))},t.addEventListener("transitionend",U))),Object.assign(Q,A),ee.forEach(((e,t)=>{if(e.classList.remove(_),e.classList.remove(f),x.centerMode){const o=D>1?(D-1)/2:0,n=R+o;t===R&&(e.classList.add(_),Q.active=t,Q.start=t-o,Q.endExclusive=Q.start+D),t===Math.floor(n)&&(e.classList.add(f),Q.lastVisible=t)}else t>=R&&t<R+D&&(e.classList.add(_),t===R&&(Q.active=t,Q.start=t),t===R+D-1&&(e.classList.add(f),Q.lastVisible=t,Q.endExclusive=t+1))})),ue(),ce();const i=$(R,F,P);o.dispatchEvent(new CustomEvent(s,{detail:{currentSlide:i,totalSlides:P}})),ie(),ae()}function ue(){const e=h,t=Array.from(o.children).find((t=>t.classList.contains(e)));if(!t)return;if(!x.showDots)return void(t.style.display="none");let n,r;if(t.style.display="",t.style.direction="ltr",t.innerHTML="",x.centerMode)n=P,r=$(R,F,P);else if(D>=P)n=1,r=0;else{n=Math.ceil((P-D)/H)+1;const e=$(R,F,P);r=Math.floor(e/H),r=Math.max(0,Math.min(r,n-1))}for(let e=0;e<n;e++){const o=document.createElement("button");o.className=g,o.type="button",o.setAttribute("aria-label",`Go to slide ${e+1}`),e===r&&o.classList.add(y),o.addEventListener("click",(t=>{if(t.stopPropagation(),x.centerMode)te(e);else{const t=e*H;te(Math.min(t,P-D))}})),t.appendChild(o)}}function ce(){const e=w,t=b,n=Array.from(o.children),r=n.find((t=>t.classList.contains(e))),s=n.find((e=>e.classList.contains(t)));if(r&&s){if(!x.showArrows)return r.style.display="none",void(s.style.display="none");r.style.display="",s.style.display="",r.removeAttribute("disabled"),s.removeAttribute("disabled")}}const de=e=>{e.stopPropagation(),ne()},pe=e=>{e.stopPropagation(),oe()},_e=e=>{if(G)return;const t=e.touches[0];J=t.clientX,K=t.clientY},fe=e=>{if(null===J||null===K)return;if(G)return J=null,void(K=null);const t=e.changedTouches[0],o=t.clientX,n=t.clientY,r=o-J,s=n-K;Math.abs(r)>Math.abs(s)&&Math.abs(r)>50&&(e.stopPropagation(),r<0?oe():r>0&&ne()),J=null,K=null},ve=w,me=b,we=Array.from(o.children),be=we.find((e=>e.classList.contains(ve))),he=we.find((e=>e.classList.contains(me)));if(be&&be.addEventListener("click",de),he&&he.addEventListener("click",pe),o.addEventListener("touchstart",_e,{passive:!0}),o.addEventListener("touchend",fe),x.auto&&x.pauseOnHover&&(o.addEventListener("mouseenter",se),o.addEventListener("mouseleave",re)),B&&D>=1&&D<=10){const e=`et_pb_group_carousel_slides_${D}`;let t=!1;j=new MutationObserver((o=>{o.forEach((o=>{if("attributes"===o.type&&"class"===o.attributeName){if(t)return;const n=o.target,r=n.getAttribute("data-original-slides-to-show"),s=r&&parseInt(r,10)>D;if(!n.classList.contains(e)&&s){t=!0;for(let e=1;e<=10;e++)e!==D&&n.classList.remove(`et_pb_group_carousel_slides_${e}`);n.classList.add(e),setTimeout((()=>{t=!1}),50)}}}))})),j.observe(o,{attributes:!0,attributeFilter:["class"]})}const ge={element:o,slides:ee,currentSlide:R,totalSlides:P,settings:x,autoplayTimer:V,goToSlide:te,nextSlide:oe,prevSlide:ne,startAutoplay:re,stopAutoplay:se,updateDots:ue,updateArrows:ce,destroy:()=>{se();const e=w,t=b,n=Array.from(o.children),r=n.find((t=>t.classList.contains(e))),s=n.find((e=>e.classList.contains(t)));r&&r.removeEventListener("click",de),s&&s.removeEventListener("click",pe),o.removeEventListener("touchstart",_e),o.removeEventListener("touchend",fe),x.auto&&x.pauseOnHover&&(o.removeEventListener("mouseenter",se),o.removeEventListener("mouseleave",re));const a=M;U&&(a.removeEventListener("transitionend",U),U=null),a.querySelectorAll(".et_pb_group_carousel_clone").forEach((e=>e.remove())),a.style.transition="none",a.style.transform="",k.forEac
1h((e=>{e.classList.remove(_)})),o.classList.remove(E);for(let e=1;e<=10;e++)o.classList.remove(`et_pb_group_carousel_slides_${e}`);o.classList.remove(S),o.classList.remove(L),j&&(j.disconnect(),j=null),null!==W&&(cancelAnimationFrame(W),W=null),null!==X&&(cancelAnimationFrame(X),X=null),Y.splice(0).forEach((e=>e())),z&&(z.disconnect(),z=null),function(e){e.forEach(T)}(ee),delete o.__groupCarouselInstance,o.dispatchEvent(new CustomEvent(i,{detail:{element:o}}))},getRealSlideIndex:()=>$(R,F,P),getSettings:()=>({...x,slidesToShow:D,slidesToScroll:H})};return o.__groupCarouselInstance=ge,C&&"undefined"!=typeof ResizeObserver&&(z=new ResizeObserver((()=>{ie()})),z.observe(C)),le(!0),ae(!0),!B&&"undefined"!=typeof window&&window.et_reinit_waypoint_modules&&requestAnimationFrame((()=>{window.et_reinit_waypoint_modules()})),x.auto&&re(),o.dispatchEvent(new CustomEvent(t,{detail:{instance:ge}})),e.isBuilder||window.dispatchEvent(new CustomEvent(t,{detail:{instance:ge}})),ge}function V(e,t){if(!e)return null;const o=e;if(o.__groupCarouselInstance||e.classList.contains(E))return o.__groupCarouselInstance||null;const n=z(e,t||j(e)||{});return n&&e.classList.add(E),n}function G(e,t){const o=e.__groupCarouselInstance,n=(e=>{if(!e)return null;const t=e.getRealSlideIndex();return Number.isFinite(t)?t:null})(o);o?.destroy&&o.destroy(),e.classList.remove("et_pb_group_carousel_initialized");const r=z(e,t,n);return r&&(e.classList.add("et_pb_group_carousel_initialized"),e.dispatchEvent(new CustomEvent(a,{detail:{instance:r}}))),r}const W="object"==typeof window.ET_Builder;function X(){D(".et_pb_group_carousel:not(.et_pb_group_carousel_initialized)").forEach((e=>V(e)))}function U(){if("object"==typeof window.ET_Builder)return;D(".et_pb_group_carousel").forEach((e=>{const t=j(e);P(e)?t&&G(e,t):V(e,t)})),X()}function Y(e,t){if(!e)return;const o=j(e);if(P(e)){const n=e.__groupCarouselInstance?.getSettings(),r=o||n,s=r?t?{...r,...t}:r:null;s&&G(e,s)}else{V(e,o||t)}}let Q=!1;"undefined"!=typeof window&&(window.diviModuleGroupCarouselInit=V,window.diviModuleGroupCarouselUpdate=G,window.diviModuleGroupCarouselReinit=U,window.diviModuleGroupCarouselReinitElement=Y),"undefined"==typeof document||Q||(Q=!0,function(){if(W)return;const e=()=>{X(),function(){const e=window.diviElementMultiViewData;if(!e)return;const t=e.filter((e=>"setAttrs"===e.action&&e.selector?.includes(".et_pb_group_carousel"))),o=e=>{const t=document.querySelector(e);if(!t)return;const o=j(t);o&&G(t,o)};let n;const r=()=>{clearTimeout(n),n=setTimeout((()=>{t.forEach((e=>{const t=e.selector.match(/(\.et_pb_group_carousel_[^\s.]+)/)?.[1];t&&o(t)}))}),400)};window.screen?.orientation?window.screen.orientation.addEventListener("change",r):window.addEventListener("orientationchange",r),window.addEventListener("resize",r),window.addEventListener("divi:setPaginatedContent",r),r(),t.forEach((e=>{const t=e.selector.match(/(\.et_pb_group_carousel_[^\s.]+)/)?.[1];if(!t)return;const n=document.querySelector(t);n&&new MutationObserver((r=>{let s=!1;r.forEach((t=>{if("attributes"!==t.type)return;const{attributeName:o}=t;if(o?.startsWith("data-carousel-"))s=!0;else if("class"===o){const o=t.target,r=t.oldValue?.includes("et_pb_sticky")||!1,i=o.classList.contains("et_pb_sticky");if(r!==i){const t=H(),o=i?e.data["desktop--sticky"]:e.data[t];o&&Object.entries(o).forEach((([e,t])=>{"string"==typeof t&&n&&n.setAttribute(e,t)})),s=!0}}})),s&&t&&o(t)})).observe(n,{attributes:!0,attributeOldValue:!0,attributeFilter:["class","data-carousel-auto","data-carousel-speed","data-carousel-transition-speed","data-carousel-pause-on-hover","data-carousel-center-mode","data-carousel-slides-to-show","data-carousel-slides-to-scroll","data-carousel-show-arrows","data-carousel-show-dots","data-carousel-arrow-position","data-carousel-dot-alignment"]})}))}()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}())}(),((window.divi=window.divi||{}).moduleLibrary=window.divi.moduleLibrary||{}).moduleLibraryScriptGroupCarousel=n}();

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.