PageSourceSearch

https://creatorshub.ai/wp-content/themes/aihub/assets/js/minified/behaviors/text-rotator.js

js creatorshub.ai collected 2026-10-05 12:01:40 UTC 1,664 bytes, 1 lines download raw bytes

1class LiquidTextRotatorBehavior extends LiquidBehavior{static behaviorName="liquidTextRotator";static viewModelEvents={"change:computedStyles":"initialize"};static modelEvents={"change:activeItem":"onActiveItemChange"};options(){return{initialIndex:0,stayDuration:3,leaveDuration:1,enterDuration:1}}get ui(){return{itemsWrapper:".lqd-text-rotator-items",items:".lqd-text-rotator-item"}}initialize(){if(this.isDestroyed)return;const e=this.getOption("initialIndex");this.model.set({activeItem:e}),this.addDelayCall(),this.view.el.setAttribute("data-lqd-text-rotator-initiated","true")}addDelayCall(){if(this.isDestroyed)return;const e=this.getOption("stayDuration"),i=this.getOption("enterDuration"),s=this.getUI("items").length;this.enterCall?.kill(),this.stayCall=gsap.delayedCall(e,()=>{if(this.isDestroyed)return;const t=this.model.get("activeItem")||0,a=t>=s-1?0:t+1;this.model.set({activeItem:a}),this.stayCall?.kill(),this.enterCall=gsap.delayedCall(i,this.addDelayCall.bind(this))})}onActiveItemChange(e,i){const s=this.getUI("itemsWrapper")[0],t=this.getUI("items"),a=this.view.model.get("rect")?.elements[i]?.rect?.width,l=e.previous("activeItem");s.style.setProperty("--lqd-tr-width",`${a}px`),t.forEach(o=>o.classList.remove("lqd-is-active","lqd-was-active")),t[i].classList.add("lqd-is-active"),l!=null&&l>=0&&t[l].classList.add("lqd-was-active")}destroy(){this.stayCall?.kill(),this.enterCall?.kill(),super.destroy()}}typeof window<"u"&&(window.liquid?.app?window.liquid?.app?.model?.set("loadedBehaviors",[...window.liquid.app.model.get("loadedBehaviors"),LiquidTextRotatorBehavior]):window.liquid?.loadedBehaviors?.push(LiquidTextRotatorBehavior));

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.