PageSourceSearch

https://www.salesmate.io/static/ai-accordion-CM_0b0xS.js

js salesmate.io collected 2026-09-24 08:28:15 UTC 7,905 bytes, 1 lines download raw bytes

1import{E as e,a as l,e as o,g as i,G as t,j as n,b as a,c as r,D as d}from"./index-C2S2Yysw.js";import{e as c,r as s}from"./vendor-CK00QW4g.js";import"./main-BcBMYSYc.js";const u=u=>{var m,v,_;const{componentDataDispatcher:p,contentModel:h,activeAccordion:g,accordionRef:x,handleAccordionClick:f,autoPlayTime:b,isAnimationReady:y,setDesktopVideoRef:j,setMobileVideoRef:N}=(t=>{var n,a,r,d;const{id:u,contentModel:m,modelInternalName:v,autoPlayTime:_,autoPlay:p}=c.propsParser(t),{WIDGET_CHECK_TRUE:h,WIDGET_CHECK_FALSE:g}=l,x="ai-accordion-ssr",{componentDataDispatcher:f,setComponentDataDispatcher:b,isComponentLoaded:y}=e({id:u,modelInternalName:v,modelKeyForSSR:x}),[j,N]=s.useState(0),[w,D]=s.useState(!1),[I,T]=s.useState(!1),C=s.useRef(null),S=s.useRef(null),E=s.useRef([]),R=s.useRef([]),k=s.useCallback((()=>{[...E.current,...R.current].forEach((e=>{e&&(e.pause(),e.currentTime=0)}))}),[]),M=s.useCallback((e=>{const l=E.current[e],o=R.current[e];l&&(l.currentTime=0,l.play().catch((e=>{console.error("Desktop video play error:",e)}))),o&&(o.currentTime=0,o.play().catch((e=>{console.error("Mobile video play error:",e)})))}),[]),A=s.useCallback((e=>{S.current&&clearInterval(S.current),S.current=setInterval((()=>{N((e=>{var l,o;const i=(e+1)%(null==(o=null==(l=null==f?void 0:f.componentData)?void 0:l.accordion_item_com)?void 0:o.length);return k(),setTimeout((()=>{M(i)}),100),i}))}),e)}),[null==(a=null==(n=null==f?void 0:f.componentData)?void 0:n.accordion_item_com)?void 0:a.length,k,M]);let L;s.useEffect((()=>{const e=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting?(D(!0),T(!1),k(),N(-1),setTimeout((()=>{var e,l;T(!0),N(0),setTimeout((()=>{M(0)}),100),p===h&&(null==(l=null==(e=null==f?void 0:f.componentData)?void 0:e.accordion_item_com)?void 0:l.length)>0&&setTimeout((()=>{A(+_||4e3)}),200)}),100)):(D(!1),T(!1),k(),S.current&&clearInterval(S.current))}))}),{threshold:.1,rootMargin:"0px 0px -20% 0px"}),l=C.current;return l&&e.observe(l),()=>{l&&e.unobserve(l),e.disconnect()}}),[p,_,null==(d=null==(r=null==f?void 0:f.componentData)?void 0:r.accordion_item_com)?void 0:d.length,h,A]),s.useEffect((()=>{var e,l;return(null==(l=null==(e=null==f?void 0:f.componentData)?void 0:e.accordion_item_com)?void 0:l.length)>0&&w&&p===h&&A(+_||4e3),()=>{S.current&&clearInterval(S.current)}}),[null==f?void 0:f.componentData,w,h,p,_,A]),s.useEffect((()=>{p===h&&w?A(+_||4e3):p!==g&&w||S.current&&clearInterval(S.current)}),[p,_,w,g,h,A]),(null==m?void 0:m.trim().length)&&(L=JSON.parse(m)),s.useEffect((()=>{var e;y&&(b({type:o.fetchingData}),(null==(e=null==m?void 0:m.trim())?void 0:e.length)&&(async()=>{b({type:o.dataFetched,data:await i(L,v,x,u)})})())}),[m]);const P=s.useCallback(((e,l)=>{E.current[e]=l}),[]),$=s.useCallback(((e,l)=>{R.current[e]=l}),[]);return{componentDataDispatcher:f,contentModel:m,activeAccordion:j,accordionRef:C,handleAccordionClick:e=>{k(),N(e),setTimeout((()=>{M(e)}),100),S.current&&clearInterval(S.current),p===h&&A(+_||4e3)},autoPlayTime:_,isAnimationReady:I,setDesktopVideoRef:P,setMobileVideoRef:$,pauseAllVideos:k,playVideoAtIndex:M}})(u),{componentData:w,isLoading:D}=p,{windowDimensions:I}=t(),{headingTag:T,headingPosition:C,smallBottomSpace:S}=c.propsParser(u),E=I===d.MOBILE,R=[{width:272},{width:240}],k=[{width:614},{width:512},{width:384}];return n.jsxs(n.Fragment,{children:[n.jsx(a,{loaderClassName:"",contentModel:h,isLoading:D,componentData:w}),!D&&(null==w?void 0:w.id)&&n.jsx("section",{className:"w-full "+("on"===S?"mb-20":"section-gap"),ref:x,children:n.jsxs("div",{className:"container",children:[n.jsx("div",{className:"w-full",children:((null==w?void 0:w.main_tag_line_et)||(null==w?void 0:w.main_heading_et)||(null==w?void 0:w.main_description_et))&&n.jsxs("div",{className:`section-title-part-ai ${C}`,children:[(null==w?void 0:w.main_tag_line_et)&&n.jsx("div",{className:"tag-line text-coolgray-500",children:null==w?void 0:w.main_tag_line_et}),(null==w?void 0:w.main_heading_et)&&n.jsx("h2",{className:`font-semibold text-coolgray-900 ${T}`,dangerouslySetInnerHTML:{__html:null==w?void 0:w.main_heading_et}}),(null==w?void 0:w.main_description_et)&&n.jsx("p",{dangerouslySetInnerHTML:{__html:null==w?void 0:w.main_description_et}})]})}
1),(null==w?void 0:w.accordion_item_com)&&(null==(m=null==w?void 0:w.accordion_item_com)?void 0:m.length)>0&&n.jsx("div",{className:"w-full",children:n.jsxs("div",{className:"grid md:grid-cols-2 grid-cols-1 gap-8 xl:gap-12",children:[n.jsx("div",{className:"space-y-0",children:null==(v=null==w?void 0:w.accordion_item_com)?void 0:v.map(((e,l)=>{var o,i,t;return n.jsxs("div",{className:"accordion-item lg:py-5 py-3 px-3 relative",children:[n.jsx("div",{className:"absolute left-0 top-0 w-1 bg-fuchsia-600 transition-all ease-linear "+(g===l&&y?"h-full":"h-0"),style:{transitionDuration:g===l&&y?`${b||"4000"}ms`:"0ms",transitionDelay:"0ms"}}),n.jsxs("div",{className:"accordion-header cursor-pointer flex",onClick:()=>f(l),children:[n.jsx("div",{className:"accordion-number relative mr-4",children:n.jsx("span",{className:"font-semibold lg:text-xl md:text-lg text-base "+(g===l?"text-coolgray-900":"text-coolgray-500"),children:String(l+1).padStart(2,"0")})}),(null==e?void 0:e.heading_et)&&n.jsx("h3",{className:"font-semibold lg:text-xl md:text-lg text-base m-0 flex-1 "+(g===l?"text-coolgray-900":"text-coolgray-600"),children:null==e?void 0:e.heading_et})]}),n.jsxs("div",{className:"accordion-content text-coolgray-600 mt-4 lg:ml-[38px] ml-8 transition-all duration-300 [&_ul]:mt-4 [&_ul]:flex [&_ul]:flex-wrap [&_ul_li]:relative [&_ul_li]:w-full [&_ul]:gap-3 [&_ul_li]:pl-7 before:[&_ul_li]:absolute before:[&_ul_li]:content-[''] md:before:[&_ul_li]:w-6 before:[&_ul_li]:w-4 md:before:[&_ul_li]:h-6 before:[&_ul_li]:h-4 before:[&_ul_li]:left-0 md:before:[&_ul_li]:top-[2px] lg:before:[&_ul_li]:top-[2px] before:[&_ul_li]:top-[2px] before:[&_ul_li]:bg-list-icon-two md:before:[&_ul_li]:bg-[length:16px] before:[&_ul_li]:bg-[length:16px] before:[&_ul_li]:bg-no-repeat "+(g===l?"block opacity-100":"hidden opacity-0"),children:[(null==e?void 0:e.description_et)&&n.jsx("div",{className:"text-coolgray-600 md:text-base text-sm",dangerouslySetInnerHTML:{__html:e.description_et}}),E&&((null==e?void 0:e.image_emd)||(null==e?void 0:e.video_emd))&&n.jsx("div",{className:"mt-4",children:(null==e?void 0:e.video_emd)?n.jsx("video",{ref:e=>N(l,e),className:"w-full object-cover transition-opacity duration-500 "+(g===l?"opacity-100":"opacity-0"),src:null==(i=JSON.parse(null==(o=null==e?void 0:e.video_emd)?void 0:o[0]))?void 0:i.publicUrl,muted:!0,playsInline:!0,children:"Your browser does not support the video tag."}):(null==e?void 0:e.image_emd)&&n.jsx(r,{name:`${null==e?void 0:e.heading_et}-mobile-${l}`,src:null==(t=null==e?void 0:e.image_emd)?void 0:t[0],alt:null==e?void 0:e.heading_et,height:192,width:272,options:R,className:"w-full object-cover rounded-lg"})})]})]},null==e?void 0:e.id)}))}),!E&&n.jsx("div",{className:"relative rounded-2xl overflow-hidden xl:min-h-[610px] md:min-h-[424px]",children:null==(_=null==w?void 0:w.accordion_item_com)?void 0:_.map(((e,l)=>{var o,i,t;return e.video_emd?n.jsx("video",{ref:e=>j(l,e),className:"absolute inset-0 w-full xl:h-full lg:object-cover object-contain transition-opacity duration-500 "+(g===l?"opacity-100":"opacity-0"),src:null==(i=JSON.parse(null==(o=null==e?void 0:e.video_emd)?void 0:o[0]))?void 0:i.publicUrl,muted:!0,playsInline:!0,children:"Your browser does not support the video tag."},null==e?void 0:e.id):(null==e?void 0:e.image_emd)&&n.jsx(r,{name:`${null==e?void 0:e.heading_et}-desktop-${l}`,src:null==(t=null==e?void 0:e.image_emd)?void 0:t[0],alt:null==e?void 0:e.heading_et,height:500,width:614,options:k,className:"absolute inset-0 w-full lg:object-cover object-contain transition-opacity duration-500 "+(g===l?"opacity-100":"opacity-0")},null==e?void 0:e.id)}))})]})})]})})]})};export{u as default};

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.