@anker-in/headless-ui 1.3.87 → 1.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +57 -0
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
- package/dist/cjs/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/cjs/biz-components/ActiveShelf/index.d.ts +2 -2
- package/dist/cjs/biz-components/ActiveShelf/index.js +1 -1
- package/dist/cjs/biz-components/ActiveShelf/types.d.ts +12 -1
- package/dist/cjs/biz-components/ActiveShelf/types.js +1 -1
- package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/cjs/biz-components/AiuiProvider/index.d.ts +28 -0
- package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
- package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/cjs/biz-components/BrandEquity/types.d.ts +2 -0
- package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
- package/dist/cjs/biz-components/Chat/button.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/cjs/biz-components/HeroBanner/types.d.ts +12 -6
- package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/cjs/biz-components/ImageWithText/types.d.ts +8 -2
- package/dist/cjs/biz-components/ImageWithText/types.js +1 -1
- package/dist/cjs/biz-components/Ksp/index.d.ts +2 -0
- package/dist/cjs/biz-components/Ksp/index.js +1 -1
- package/dist/cjs/biz-components/MarqueeReview/index.js +1 -1
- package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
- package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
- package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/cjs/biz-components/ProductHero/types.d.ts +2 -0
- package/dist/cjs/biz-components/ProductHero/types.js +1 -1
- package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/cjs/biz-components/ProductNav/types.d.ts +5 -2
- package/dist/cjs/biz-components/ProductNav/types.js +1 -1
- package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +5 -4
- package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/cjs/biz-components/Specs/dropdown.js +1 -2
- package/dist/cjs/biz-components/Specs/index.js +1 -1
- package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/cjs/biz-components/index.d.ts +1 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/components/link.js +1 -1
- package/dist/cjs/hooks/useBoaButton.d.ts +27 -0
- package/dist/cjs/hooks/useBoaButton.js +1 -0
- package/dist/cjs/hooks/useDraggableScroll.js +1 -1
- package/dist/cjs/hooks/useExposure.d.ts +1 -1
- package/dist/cjs/hooks/useExposure.js +1 -1
- package/dist/cjs/hooks/useViewItemList.d.ts +1 -1
- package/dist/cjs/index.d.ts +10 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/shared/ContainerGridContext.d.ts +20 -0
- package/dist/cjs/shared/ContainerGridContext.js +1 -0
- package/dist/cjs/shared/Styles.d.ts +2 -0
- package/dist/cjs/shared/Styles.js +1 -1
- package/dist/cjs/shared/adTrack.d.ts +38 -0
- package/dist/cjs/shared/adTrack.js +1 -0
- package/dist/cjs/shared/amazonAttribution.d.ts +31 -0
- package/dist/cjs/shared/amazonAttribution.js +1 -0
- package/dist/cjs/shared/mediaGridSpec.d.ts +87 -0
- package/dist/cjs/shared/mediaGridSpec.js +1 -0
- package/dist/cjs/stories/BoaStoryProvider.d.ts +10 -0
- package/dist/cjs/stories/BoaStoryProvider.js +1 -0
- package/dist/esm/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
- package/dist/esm/biz-components/ActiveShelf/ProductCard.js +1 -1
- package/dist/esm/biz-components/ActiveShelf/index.d.ts +2 -2
- package/dist/esm/biz-components/ActiveShelf/index.js +1 -1
- package/dist/esm/biz-components/ActiveShelf/types.d.ts +12 -1
- package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
- package/dist/esm/biz-components/AiuiProvider/index.d.ts +28 -0
- package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
- package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
- package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
- package/dist/esm/biz-components/BrandEquity/types.d.ts +2 -0
- package/dist/esm/biz-components/Chat/button.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
- package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
- package/dist/esm/biz-components/HeroBanner/types.d.ts +12 -6
- package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
- package/dist/esm/biz-components/ImageWithText/types.d.ts +8 -2
- package/dist/esm/biz-components/Ksp/index.d.ts +2 -0
- package/dist/esm/biz-components/Ksp/index.js +1 -1
- package/dist/esm/biz-components/MarqueeReview/index.js +1 -1
- package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
- package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
- package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
- package/dist/esm/biz-components/ProductCompare/index.js +1 -1
- package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
- package/dist/esm/biz-components/ProductHero/types.d.ts +2 -0
- package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
- package/dist/esm/biz-components/ProductNav/types.d.ts +5 -2
- package/dist/esm/biz-components/SecondaryBanner/index.d.ts +5 -4
- package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
- package/dist/esm/biz-components/Specs/dropdown.js +1 -2
- package/dist/esm/biz-components/Specs/index.js +1 -1
- package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
- package/dist/esm/biz-components/index.d.ts +1 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/components/link.js +1 -1
- package/dist/esm/hooks/useBoaButton.d.ts +27 -0
- package/dist/esm/hooks/useBoaButton.js +1 -0
- package/dist/esm/hooks/useDraggableScroll.js +1 -1
- package/dist/esm/hooks/useExposure.d.ts +1 -1
- package/dist/esm/hooks/useExposure.js +1 -1
- package/dist/esm/hooks/useViewItemList.d.ts +1 -1
- package/dist/esm/index.d.ts +10 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/shared/ContainerGridContext.d.ts +20 -0
- package/dist/esm/shared/ContainerGridContext.js +1 -0
- package/dist/esm/shared/Styles.d.ts +2 -0
- package/dist/esm/shared/Styles.js +1 -1
- package/dist/esm/shared/adTrack.d.ts +38 -0
- package/dist/esm/shared/adTrack.js +1 -0
- package/dist/esm/shared/amazonAttribution.d.ts +31 -0
- package/dist/esm/shared/amazonAttribution.js +1 -0
- package/dist/esm/shared/mediaGridSpec.d.ts +87 -0
- package/dist/esm/shared/mediaGridSpec.js +1 -0
- package/dist/esm/stories/BoaStoryProvider.d.ts +10 -0
- package/dist/esm/stories/BoaStoryProvider.js +1 -0
- package/dist/tokens/base.css +22 -1
- package/package.json +5 -2
- package/style.css +250 -136
- package/tailwind.config.js +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as St,jsx as a,jsxs as h}from"react/jsx-runtime";import he,{useRef as Se,useEffect as G,useCallback as E,useState as re}from"react";import{Swiper as Ke,SwiperSlide as Qe}from"swiper/react";import Xe from"../../helpers/ScrollLoadVideo.js";import{cn as V,getLocalizedPath as et}from"../../helpers/index.js";import{buildPictureSource as tt,resolveTierMedia as U,useMediaTier as Be}from"./mediaResolver.js";import{Button as ie,Heading as nt,Text as Te,Countdown as ot,Picture as xe}from"../../components/index.js";import{useCarouselPlayback as at}from"../../hooks/useCarouselPlayback.js";import{CarouselArrows as rt,CarouselCornerToggle as it,CarouselProgressControls as st}from"../../shared/CarouselControls.js";import{buildClickTrackingProps as lt,gaTrack as dt,resolveComponentMediaType as Pe,trackComponentClick as ct}from"../../shared/track.js";import{buildPageGroup as ut,buildTrackingRef as pt,trackUrlRef as mt}from"../../shared/trackUrlRef.js";import{useExposure as gt}from"../../hooks/useExposure.js";import{useAiuiContext as vt}from"../AiuiProvider/index.js";import{VideoModal as ft}from"../VideoModal/index.js";import"swiper/css";const yt=({size:d="base"})=>{const I=d==="lg"?"20":d==="sm"?"16":"18";return a("svg",{width:I,height:I,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:a("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},se="hero_banner",bt=({data:d,isActive:I,isAdjacent:le=!1,videoRef:de,slideIndex:Y,containerSize:W="default",theme:ce="light",slideLabel:ue,position:T,locale:r,pageHandle:R,onPlayVideo:Z,onPrimaryClick:m,onSecondaryClick:pe,onTertiaryClick:J})=>{const{pcImage:K,isVideoLoop:M=!0,isShowVideo:B,title:x,subtitle:b,label:z,endDate:F,endDate_tz:Q,dateFormat:k,iconArray:P,caption:f,blockLink:D,primaryButton:i,secondaryButton:s,tertiaryButton:l,align:C="left",titleSize:N}=d,_=Be(),p=tt(d),j=U(d,"lgDesktop","image")?.alt||K?.alt||"",y=U(d,_,"video")?.url||"",w=!!p&&!/\.(mp4|mov|webm|m4v)(\?|$)/i.test(p),X=Pe(B),me=U(d,_,B?"video":"image")?.id||K?.id||"",ee=`${pt(R??"",X,se)}_${T}`,ge=n=>n&&r?et(n,r):n,H=n=>n?mt(ge(n),ee):void 0,S=(n,g)=>lt({interactive:n,componentType:X,componentName:se,title:x,description:b,buttonName:g,position:T,creativeId:me});return h("div",{"data-ui-component-id":"HeroBannerSlide",role:"group","aria-roledescription":"slide","aria-label":ue,className:V("text-info-primary relative w-full overflow-hidden transition-colors duration-500",ce==="dark"&&"aiui-dark",W==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[D&&a("a",{className:"absolute inset-0 z-10",href:H(D),tabIndex:-1,"aria-hidden":"true","aria-label":x?.trim()||b?.trim()||j||void 0,...S(!0)}),B?h(St,{children:[a(Xe,{videoRef:de,src:y,poster:void 0,className:"absolute inset-0 size-full transition-opacity duration-500",videoClassName:"size-full object-cover",videoLayerClassName:"opacity-0",muted:!0,loop:M,playsInline:!0,onPlaying:n=>{const g=n.currentTarget;g.parentElement?.classList.remove("opacity-0"),g.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")},onWaiting:n=>{const g=n.currentTarget;if(g.currentTime>=.5)return;g.parentElement?.classList.add("opacity-0"),g.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.remove("opacity-0")}}),w&&a("div",{"data-video-poster":"true",className:"bg-container-primary pointer-events-none absolute inset-0 size-full transition-opacity duration-500",children:a(xe,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:Y===0||le?"eager":"lazy",fetchPriority:Y===0?"high":"auto",alt:j,source:p})})]}):a(xe,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:j,source:p}),h("div",{className:V("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] pointer-events-none absolute top-24 z-10 flex w-full flex-col gap-[24px] transition-colors duration-500",C==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"px-grid left-0"),children:[h("div",{className:V("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px] transition-colors duration-500",C==="center"?"text-center":"laptop:text-left"),children:[z&&a(Te,{size:2,as:"p",className:V("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:z}),x&&a(nt,{as:N==="4"?"h1":"h2",html:x,size:N?Number(N||"5"):W==="sm"?4:5}),b&&a(Te,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:b}),F&&a("div",{className:"mt-3",children:a(ot,{endDate:F,endDate_tz:Q,dateFormat:k,variant:"spacious",align:C})})]}),(i?.text||s?.text||l?.text)&&h("div",{className:V("lg-desktop:gap-3 pointer-events-auto flex flex-wrap items-center gap-2",C==="center"?"justify-center":"laptop:justify-start"),children:[s?.isShowPlayVideoButton&&s?.playVideoButtonText?h(ie,{size:"lg",variant:"secondary",className:"hero-banner-play-video-button",onClick:()=>Z?.(),...S(!0,"video play"),children:[s.playVideoButtonText," ",a(yt,{size:"lg"})]}):s?.text?h(ie,{size:"lg",variant:"secondary",as:s?.isCustomSecondaryButton?"button":"a",href:H(s.link),target:s?.target,rel:s?.target==="_blank"?s?.rel??"noopener noreferrer":s?.rel,onClick:n=>s?.isCustomSecondaryButton&&pe?.(d,n,s?.customSecondaryEventId),...S(!!(s.link||s.isCustomSecondaryButton),s.text),children:[s.text,a("span",{className:"sr-only",children:x??b})]}):null,i?.text&&a(ie,{size:"lg",variant:"primary",as:i?.isCustomPrimaryButton?"button":"a",href:H(i.link),target:i?.target,rel:i?.target==="_blank"?i?.rel??"noopener noreferrer":i?.rel,onClick:n=>i?.isCustomPrimaryButton&&m?.(d,n,i?.customPrimaryEventId),...S(!!(i.link||i.isCustomPrimaryButton),i.text),children:i.text}),l?.text&&h(ie,{size:"lg",variant:"link",className:"tablet:basis-auto basis-full",as:l?.isCustomTertiaryButton?"button":"a",href:H(l.link),target:l?.target,rel:l?.target==="_blank"?l?.rel??"noopener noreferrer":l?.rel,onClick:n=>l?.isCustomTertiaryButton&&J?.(d,n,l?.customTertiaryEventId),...S(!!(l.link||l.isCustomTertiaryButton),l.text),children:[l.text,a("span",{className:"sr-only",children:x??b})]})]}),P&&P.length>0&&a("div",{className:V("flex items-center gap-2",C==="center"?"justify-center":"justify-start"),children:P.map(n=>a("div",{className:"h-12",children:a(xe,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:n?.pcImage?.alt||"",source:n?.pcImage?.url})},n?.pcImage?.url||n?.pcImage?.alt))})]}),f&&f.length>0&&a("div",{className:"hero-banner-caption-group laptop:gap-3 px-grid desktop:pb-[24px] pointer-events-none absolute bottom-0 z-10 flex items-stretch gap-2 pb-[16px]",children:f.map((n,g)=>h(he.Fragment,{children:[a(Te,{size:2,className:"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]",html:n.title}),g<f.length-1&&a("div",{className:"bg-info-primary w-px"})]},n.title))})]})},ht={prevSlide:"Previous slide",nextSlide:"Next slide",pauseAutoplay:"Pause autoplay",playAutoplay:"Play autoplay",pauseVideo:"Pause video",playVideo:"Play video",slideStatus:"Slide",carouselLabel:"Banner carousel"},Ne=he.forwardRef(({data:d,className:I,classNames:le={},a11yLabels:de,onPrimaryClick:Y,onSecondaryClick:W,onTertiaryClick:ce,...ue},T)=>{const r=d.items||[],R=d.carousel,Z=R?.size??d.size??"default",m={...ht,...de},{locale:pe,pageHandle:J,trackingData:K}=vt(),M=Be(),B=ut({pageHandle:J,pageGroup:K?.pageGroup}),x=Se(null),[b,z]=re(null),[F,Q]=re(null),[k,P]=re(null),[f,D]=re(null),i=Se(r);G(()=>{i.current=r});const s=e=>e!==void 0&&e!==999&&e>=5,l=e=>e!==void 0&&e!==999&&e>=1&&e<=30,C=R?.autoplaySeconds,N=e=>{const t=e?.autoplaySeconds;return l(t)?t:s(C)?C:void 0},_=r.length>1&&r.some(e=>N(e)!==void 0),p=Se(r.map(()=>he.createRef())),j=(R?.showArrows??!0)&&r.length>1,y=E((e,t)=>{dt({event:"ga4Event",event_name:e,event_parameters:t})},[]),w=E(e=>i.current[e]?.isShowVideo?"video":"image",[]),X=E((e,t)=>{t==="swipe"&&y("hero_banner_swipe",{to_index:e}),y("hero_banner_slide_view",{index:e,total:i.current.length,media_type:w(e),trigger:t})},[y,w]),me=E((e,t,o,u="arrow")=>{y("hero_banner_arrow_click",{direction:e,from_index:t,to_index:o,source:u})},[y]),ee=E((e,t)=>{y(e?"hero_banner_pause":"hero_banner_resume",{index:t,media_type:w(t)})},[y,w]),ge=E((e,t)=>{const o=i.current[t];o&&ct({pageGroup:B,componentType:"video",componentName:se,position:t+1,buttonName:e?"video pause":"video play",componentTitle:o.title,componentDescription:o.subtitle,creativeId:U(o,M,"video")?.id||o.pcImage?.id||""})},[B,M]),H=E(e=>{p.current.forEach((o,u)=>{u!==e&&o.current&&(o.current.pause(),o.current.currentTime=0)});const t=p.current[e];t?.current&&(t.current.currentTime=0,t.current.play()?.catch(()=>{}))},[]),{rootRef:S,activeIndex:n,playbackState:g,resetNonce:ve,announcement:_e,activeFrameIntervalSec:ke,isTimerRunning:He,handleSwiperInit:Ae,handleSlideChange:Ie,handleTransitionEnd:Re,handleSliderFirstMove:Me,goToSlide:Ce,goToSlideIndex:ze,handlePausePlayClick:Fe,notifyVideoPlaying:we,handleFocus:De,handleBlur:je}=at({frameCount:r.length,resolveFrameIntervalSec:e=>N(r[e]),isAutoplayEnabled:_,swiperRef:x,slideStatusLabel:m.slideStatus,onSlideMediaSync:H,onSlideChange:X,onArrowNavigate:me,delaysCountdownForVideo:e=>!!i.current[e]?.isShowVideo,onPauseToggle:(e,t)=>{ee(e,t);const o=p.current[t]?.current;o&&(e?o.pause():o.ended||o.play()?.catch(()=>{}))}}),qe=E(e=>{S.current=e,typeof T=="function"?T(e):T&&(T.current=e)},[T,S]),v=r[n]??r[0],$e=Pe(v?.isShowVideo),Oe=v?.title!==void 0?v?.title?.trim()||v?.subtitle?.trim()||v?.pcImage?.alt?.trim()||void 0:v?.subtitle&&v.subtitle.trim()||"",Ge=v&&(U(v,M,v.isShowVideo?"video":"image")?.id||v.pcImage?.id)||"";gt(S,{componentType:$e,componentName:se,componentTitle:Oe,componentDescription:v?.subtitle?.trim()||"",creativeId:Ge,position:1}),G(()=>{z(null),Q(null);const e=i.current[n],t=p.current[n]?.current;if(!e?.isShowVideo||!t)return;const o=()=>z(t.ended?"ended":t.paused?"paused":"playing"),u=()=>Q(Number.isFinite(t.duration)?t.duration:null),A=()=>{o(),we(n)};return o(),u(),t.addEventListener("playing",A),t.addEventListener("pause",o),t.addEventListener("ended",o),t.addEventListener("loadedmetadata",u),()=>{t.removeEventListener("playing",A),t.removeEventListener("pause",o),t.removeEventListener("ended",o),t.removeEventListener("loadedmetadata",u)}},[n,we]),G(()=>{const e=i.current[n];if(!e?.isShowVideo||!e?.isMultiThemeEnabled)return;const t=p.current[n]?.current;if(!t)return;const o=(c,L,ae,be)=>{if(!(!c||typeof L!="number"||typeof ae!="number"||typeof be!="number"))return be>=L&&be<ae?c:void 0};let u=null;const A=c=>{u=c,P(L=>L&&L.index===n&&L.theme===c?L:{index:n,theme:c})},te=c=>{A(o(e.theme_1,e.star_time_1,e.end_time_1,c)??o(e.theme_2,e.star_time_2,e.end_time_2,c)??e.theme??"light")},ne=t;let $=0,O=0;const fe=typeof ne.requestVideoFrameCallback=="function",Je=()=>fe?O!==0:$!==0,ye=()=>{if(!Je())if(fe){const c=(L,ae)=>{te(ae.mediaTime),O=ne.requestVideoFrameCallback(c)};O=ne.requestVideoFrameCallback(c)}else{const c=()=>{te(t.currentTime),$=requestAnimationFrame(c)};$=requestAnimationFrame(c)}},oe=()=>{fe?(ne.cancelVideoFrameCallback?.(O),O=0):(cancelAnimationFrame($),$=0)},Ve=()=>{oe(),u&&P({index:n,theme:u})};return t.addEventListener("play",ye),t.addEventListener("pause",oe),t.addEventListener("ended",Ve),!t.paused&&!t.ended&&ye(),()=>{oe(),t.removeEventListener("play",ye),t.removeEventListener("pause",oe),t.removeEventListener("ended",Ve)}},[n]),G(()=>{p.current.forEach((e,t)=>{t!==0&&e.current&&(e.current.pause(),e.current.currentTime=0)})},[]),G(()=>{i.current.length!==0&&y("hero_banner_slide_view",{index:0,total:i.current.length,media_type:w(0),trigger:"initial"})},[y,w]);const Ue=!!r[n]?.isShowVideo,Le=ke!==void 0,q=!Le&&Ue&&F!==null&&F>5&&b!=="ended"&&b!==null,Ye=Le||q,We=q?b==="paused":g==="STOPPED",Ze=()=>{if(!q){Fe();return}const e=p.current[n]?.current;if(!e)return;const t=!e.paused;t?e.pause():e.play()?.catch(()=>{}),ee(t,n),ge(t,n)},Ee=k&&k.index===n?k.theme:r[n]?.theme;return h("div",{ref:qe,role:"region","aria-roledescription":"carousel","aria-label":m.carouselLabel,"data-ui-component-id":"HeroBanner",onFocus:De,onBlur:je,className:V("hero-banner-carousel group relative w-full overflow-hidden",Z==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]",le.root,I),...ue,children:[a(Ke,{onSwiper:Ae,onSlideChange:Ie,onSlideChangeTransitionEnd:Re,onSliderFirstMove:Me,slidesPerView:1,loop:!0,initialSlide:0,allowTouchMove:!0,children:r.map((e,t)=>{const o=k&&k.index===t?k.theme:e.theme??"light";return a(Qe,{children:({isActive:u,isPrev:A,isNext:te})=>a(bt,{data:e,isActive:u,isAdjacent:A||te,slideIndex:t,slideLabel:`${m.slideStatus} ${t+1} / ${r.length}`,videoRef:p.current[t],containerSize:Z,theme:o,position:t+1,locale:pe,pageHandle:J,onPlayVideo:()=>D(t),onPrimaryClick:Y,onSecondaryClick:W,onTertiaryClick:ce})},t)})}),j&&a(rt,{onPrev:()=>Ce("prev"),onNext:()=>Ce("next"),prevLabel:m.prevSlide,nextLabel:m.nextSlide}),_&&a(st,{frameCount:r.length,activeIndex:n,resetNonce:ve,activeFrameIntervalSec:ke,isAutoplayEnabled:_,isTimerRunning:He,onSegmentClick:ze,segmentLabel:e=>`${m.slideStatus} ${e+1} / ${r.length}`,classPrefix:"hero-banner",theme:Ee}),Ye&&a(it,{isPaused:We,onToggle:Ze,pausedLabel:q?m.playVideo:m.playAutoplay,playingLabel:q?m.pauseVideo:m.pauseAutoplay,classPrefix:"hero-banner",theme:Ee}),a("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:_e}),f!==null&&r[f]?.secondaryButton&&a(ft,{visible:!0,videoUrl:r[f].secondaryButton?.isYoutubeVideo?void 0:r[f].secondaryButton?.videoUrl?.url,youTubeId:r[f].secondaryButton?.isYoutubeVideo?r[f].secondaryButton?.youtubeId:void 0,onCloseModal:()=>D(null)})]})});Ne.displayName="HeroBannerCarousel";var It=Ne;export{It as default};
|
|
1
|
+
"use client";import{Fragment as Tt,jsx as o,jsxs as T}from"react/jsx-runtime";import _e,{useRef as Ae,useEffect as ne,useCallback as E,useState as be}from"react";import{Swiper as Ke,SwiperSlide as Qe}from"swiper/react";import Xe from"../../helpers/ScrollLoadVideo.js";import{cn as A,getLocalizedPath as et}from"../../helpers/index.js";import{buildPictureSource as tt,resolveTierMedia as ae,useMediaTier as Me}from"./mediaResolver.js";import{Button as he,Heading as nt,Text as ze,Countdown as at,Picture as He}from"../../components/index.js";import{useCarouselPlayback as ot}from"../../hooks/useCarouselPlayback.js";import{CarouselArrows as rt,CarouselCornerToggle as it,CarouselProgressControls as st}from"../../shared/CarouselControls.js";import{buildClickTrackingProps as lt,gaTrack as dt,resolveComponentMediaType as De,trackComponentClick as ct}from"../../shared/track.js";import{buildPageGroup as ut,buildTrackingRef as mt,trackUrlRef as pt}from"../../shared/trackUrlRef.js";import{useExposure as gt}from"../../hooks/useExposure.js";import{useBoaButton as ft}from"../../hooks/useBoaButton.js";import{useAiuiContext as vt}from"../AiuiProvider/index.js";import{VideoModal as yt}from"../VideoModal/index.js";import"swiper/css";const bt=({size:u="base"})=>{const G=u==="lg"?"20":u==="sm"?"16":"18";return o("svg",{width:G,height:G,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:o("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},O="hero_banner",ht=({data:u,isActive:G,isAdjacent:ke=!1,videoRef:Te,slideIndex:oe,containerSize:re="default",theme:Se="light",slideLabel:xe,position:S,locale:i,pageHandle:U,onPlayVideo:ie,onPrimaryClick:v,onSecondaryClick:Ce,onTertiaryClick:se})=>{const{pcImage:le,isVideoLoop:Y=!0,isShowVideo:z,title:x,subtitle:k,label:W,endDate:Z,endDate_tz:de,dateFormat:C,iconArray:H,caption:b,blockLink:I,blockLinkConfig:m,primaryButton:c,secondaryButton:s,tertiaryButton:l,align:w="left",titleSize:V}=u,h=Me(),R=tt(u),f=ae(u,"lgDesktop","image")?.alt||le?.alt||"",L=ae(u,h,"video")?.url||"",we=!!R&&!/\.(mp4|mov|webm|m4v)(\?|$)/i.test(R),ce=De(z),ue=ae(u,h,z?"video":"image")?.id||le?.id||"",Le=`${mt(U??"",ce,O)}_${S}`,Be=n=>n&&i?et(n,i):n,F=n=>n?pt(Be(n),Le):void 0,{resolveLink:r,hasAdTrack:P,trackAd:me}=ft(),J=n=>{if(!n?.link)return{href:void 0,target:n?.target};const d=r(n.link,n);return d.isAmazon?{href:d.href,target:n.target??"_blank"}:{href:F(n.link),target:n.target}},N=J(s),M=J(c),D=J(l),j=r(I,m),pe=j.isAmazon?j.href:F(I),Ee=j.isAmazon?m?.target??"_blank":m?.target,q=(n,d)=>!!n&&!(d?.link&&P(d)),K=(n,d,Q)=>me(n,{componentName:O,buttonPosition:d,buttonText:n?.text,href:Q}),_=(n,d)=>lt({interactive:n,componentType:ce,componentName:O,title:x,description:k,buttonName:d,position:S,creativeId:ue});return T("div",{"data-ui-component-id":"HeroBannerSlide",role:"group","aria-roledescription":"slide","aria-label":xe,className:A("text-info-primary relative w-full overflow-hidden transition-colors duration-500",Se==="dark"&&"aiui-dark",re==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]"),children:[I&&o("a",{className:"absolute inset-0 z-10 !bg-transparent hover:!bg-transparent",href:pe,target:Ee,"data-headless-ad-track":P(m)?"true":void 0,"data-headless-amazon":j.isAmazon?"true":void 0,onClick:()=>me(m,{componentName:O,buttonPosition:"block",href:pe}),tabIndex:-1,"aria-hidden":"true","aria-label":x?.trim()||k?.trim()||f||void 0,..._(!0)}),z?T(Tt,{children:[o(Xe,{videoRef:Te,src:L,poster:void 0,className:"absolute inset-0 size-full transition-opacity duration-500",videoClassName:"size-full object-cover",videoLayerClassName:"opacity-0",muted:!0,loop:Y,playsInline:!0,onPlaying:n=>{const d=n.currentTarget;d.parentElement?.classList.remove("opacity-0"),d.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.add("opacity-0")},onWaiting:n=>{const d=n.currentTarget;if(d.currentTime>=.5)return;d.parentElement?.classList.add("opacity-0"),d.closest('[data-ui-component-id="HeroBannerSlide"]')?.querySelector('[data-video-poster="true"]')?.classList.remove("opacity-0")}}),we&&o("div",{"data-video-poster":"true",className:"bg-container-primary pointer-events-none absolute inset-0 size-full transition-opacity duration-500",children:o(He,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:oe===0||ke?"eager":"lazy",fetchPriority:oe===0?"high":"auto",alt:f,source:R})})]}):o(He,{className:"absolute inset-0 size-full",imgClassName:"size-full object-cover",loading:"eager",fetchPriority:"high",alt:f,source:R}),T("div",{className:A("laptop:top-1/2 laptop:-translate-y-1/2 lg-desktop:gap-[32px] pointer-events-none absolute top-24 z-10 flex w-full flex-col gap-[24px] transition-colors duration-500",w==="center"?"left-1/2 -translate-x-1/2 items-center text-center":"px-grid left-0"),children:[T("div",{className:A("tablet:max-w-[704px] laptop:max-w-[440px] desktop:max-w-[648px] lg-desktop:max-w-[824px] max-w-[358px] transition-colors duration-500",w==="center"?"text-center":"laptop:text-left"),children:[W&&o(ze,{size:2,as:"p",className:A("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:W}),x&&o(nt,{as:V==="4"?"h1":"h2",html:x,size:V?Number(V||"5"):re==="sm"?4:5}),k&&o(ze,{as:"p",size:2,className:"font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",html:k}),Z&&o("div",{className:"mt-3",children:o(at,{endDate:Z,endDate_tz:de,dateFormat:C,variant:"spacious",align:w})})]}),(c?.text||s?.text||l?.text)&&T("div",{className:A("lg-desktop:gap-3 pointer-events-auto flex flex-wrap items-center gap-2",w==="center"?"justify-center":"laptop:justify-start"),children:[s?.isShowPlayVideoButton&&s?.playVideoButtonText?T(he,{size:"lg",variant:"secondary",className:"hero-banner-play-video-button",onClick:()=>ie?.(),..._(!0,"video play"),children:[s.playVideoButtonText," ",o(bt,{size:"lg"})]}):s?.text?T(he,{size:"lg",variant:"secondary",as:q(s?.isCustomSecondaryButton,s)?"button":"a",href:N.href,"data-headless-ad-track":P(s)?"true":void 0,"data-headless-amazon":r(s.link,s).isAmazon?"true":void 0,target:N.target,rel:N.target==="_blank"?s?.rel??"noopener noreferrer":s?.rel,onClick:n=>{K(s,"secondary",N.href),s?.isCustomSecondaryButton&&Ce?.(u,n,s?.customSecondaryEventId)},..._(!!(s.link||s.isCustomSecondaryButton),s.text),children:[s.text,o("span",{className:"sr-only",children:x??k})]}):null,c?.text&&o(he,{size:"lg",variant:"primary",as:q(c?.isCustomPrimaryButton,c)?"button":"a",href:M.href,"data-headless-ad-track":P(c)?"true":void 0,"data-headless-amazon":r(c.link,c).isAmazon?"true":void 0,target:M.target,rel:M.target==="_blank"?c?.rel??"noopener noreferrer":c?.rel,onClick:n=>{K(c,"primary",M.href),c?.isCustomPrimaryButton&&v?.(u,n,c?.customPrimaryEventId)},..._(!!(c.link||c.isCustomPrimaryButton),c.text),children:c.text}),l?.text&&T(he,{size:"lg",variant:"link",className:"tablet:basis-auto basis-full",as:q(l?.isCustomTertiaryButton,l)?"button":"a",href:D.href,"data-headless-ad-track":P(l)?"true":void 0,"data-headless-amazon":r(l.link,l).isAmazon?"true":void 0,"data-headless-amazon-style":r(l.link,l).isAmazon?"link":void 0,target:D.target,rel:D.target==="_blank"?l?.rel??"noopener noreferrer":l?.rel,onClick:n=>{K(l,"tertiary",D.href),l?.isCustomTertiaryButton&&se?.(u,n,l?.customTertiaryEventId)},..._(!!(l.link||l.isCustomTertiaryButton),l.text),children:[l.text,o("span",{className:"sr-only",children:x??k})]})]}),H&&H.length>0&&o("div",{className:A("flex items-center gap-2",w==="center"?"justify-center":"justify-start"),children:H.map(n=>o("div",{className:"h-12",children:o(He,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:n?.pcImage?.alt||"",source:n?.pcImage?.url})},n?.pcImage?.url||n?.pcImage?.alt))})]}),b&&b.length>0&&o("div",{className:"hero-banner-caption-group laptop:gap-3 px-grid desktop:pb-[24px] pointer-events-none absolute bottom-0 z-10 flex items-stretch gap-2 pb-[16px]",children:b.map((n,d)=>T(_e.Fragment,{children:[o(ze,{size:2,className:"hero-banner-product-text tablet:w-[108px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]",html:n.title}),d<b.length-1&&o("div",{className:"bg-info-primary w-px"})]},n.title))})]})},kt={prevSlide:"Previous slide",nextSlide:"Next slide",pauseAutoplay:"Pause autoplay",playAutoplay:"Play autoplay",pauseVideo:"Pause video",playVideo:"Play video",slideStatus:"Slide",carouselLabel:"Banner carousel"},je=_e.forwardRef(({data:u,className:G,classNames:ke={},a11yLabels:Te,onPrimaryClick:oe,onSecondaryClick:re,onTertiaryClick:Se,...xe},S)=>{const i=u.items||[],U=u.carousel,ie=U?.size??u.size??"default",v={...kt,...Te},{locale:Ce,pageHandle:se,trackingData:le}=vt(),Y=Me(),z=ut({pageHandle:se,pageGroup:le?.pageGroup}),x=Ae(null),[k,W]=be(null),[Z,de]=be(null),[C,H]=be(null),[b,I]=be(null),m=Ae(i);ne(()=>{m.current=i});const c=e=>e!==void 0&&e!==999&&e>=5,s=e=>e!==void 0&&e!==999&&e>=1&&e<=30,l=U?.autoplaySeconds,w=e=>{const t=e?.autoplaySeconds;return s(t)?t:c(l)?l:void 0},V=i.length>1&&i.some(e=>w(e)!==void 0),h=Ae(i.map(()=>_e.createRef())),R=(U?.showArrows??!0)&&i.length>1,f=E((e,t)=>{dt({event:"ga4Event",event_name:e,event_parameters:t})},[]),L=E(e=>m.current[e]?.isShowVideo?"video":"image",[]),we=E((e,t)=>{t==="swipe"&&f("hero_banner_swipe",{to_index:e}),f("hero_banner_slide_view",{index:e,total:m.current.length,media_type:L(e),trigger:t})},[f,L]),ce=E((e,t,a,g="arrow")=>{f("hero_banner_arrow_click",{direction:e,from_index:t,to_index:a,source:g})},[f]),ue=E((e,t)=>{f(e?"hero_banner_pause":"hero_banner_resume",{index:t,media_type:L(t)})},[f,L]),Le=E((e,t)=>{const a=m.current[t];a&&ct({pageGroup:z,componentType:"video",componentName:O,position:t+1,buttonName:e?"video pause":"video play",componentTitle:a.title,componentDescription:a.subtitle,creativeId:ae(a,Y,"video")?.id||a.pcImage?.id||""})},[z,Y]),Be=E(e=>{h.current.forEach((a,g)=>{g!==e&&a.current&&(a.current.pause(),a.current.currentTime=0)});const t=h.current[e];t?.current&&(t.current.currentTime=0,t.current.play()?.catch(()=>{}))},[]),{rootRef:F,activeIndex:r,playbackState:P,resetNonce:me,announcement:J,activeFrameIntervalSec:N,isTimerRunning:M,handleSwiperInit:D,handleSlideChange:j,handleTransitionEnd:pe,handleSliderFirstMove:Ee,goToSlide:q,goToSlideIndex:K,handlePausePlayClick:_,notifyVideoPlaying:n,handleFocus:d,handleBlur:Q}=ot({frameCount:i.length,resolveFrameIntervalSec:e=>w(i[e]),isAutoplayEnabled:V,swiperRef:x,slideStatusLabel:v.slideStatus,onSlideMediaSync:Be,onSlideChange:we,onArrowNavigate:ce,delaysCountdownForVideo:e=>!!m.current[e]?.isShowVideo,onPauseToggle:(e,t)=>{ue(e,t);const a=h.current[t]?.current;a&&(e?a.pause():a.ended||a.play()?.catch(()=>{}))}}),qe=E(e=>{F.current=e,typeof S=="function"?S(e):S&&(S.current=e)},[S,F]),y=i[r]??i[0],$e=De(y?.isShowVideo),Oe=y?.title!==void 0?y?.title?.trim()||y?.subtitle?.trim()||y?.pcImage?.alt?.trim()||void 0:y?.subtitle&&y.subtitle.trim()||"",Ge=y&&(ae(y,Y,y.isShowVideo?"video":"image")?.id||y.pcImage?.id)||"";gt(F,{componentType:$e,componentName:O,componentTitle:Oe,componentDescription:y?.subtitle?.trim()||"",creativeId:Ge,position:1}),ne(()=>{W(null),de(null);const e=m.current[r],t=h.current[r]?.current;if(!e?.isShowVideo||!t)return;const a=()=>W(t.ended?"ended":t.paused?"paused":"playing"),g=()=>de(Number.isFinite(t.duration)?t.duration:null),$=()=>{a(),n(r)};return a(),g(),t.addEventListener("playing",$),t.addEventListener("pause",a),t.addEventListener("ended",a),t.addEventListener("loadedmetadata",g),()=>{t.removeEventListener("playing",$),t.removeEventListener("pause",a),t.removeEventListener("ended",a),t.removeEventListener("loadedmetadata",g)}},[r,n]),ne(()=>{const e=m.current[r];if(!e?.isShowVideo||!e?.isMultiThemeEnabled)return;const t=h.current[r]?.current;if(!t)return;const a=(p,B,ye,Ne)=>{if(!(!p||typeof B!="number"||typeof ye!="number"||typeof Ne!="number"))return Ne>=B&&Ne<ye?p:void 0};let g=null;const $=p=>{g=p,H(B=>B&&B.index===r&&B.theme===p?B:{index:r,theme:p})},ge=p=>{$(a(e.theme_1,e.star_time_1,e.end_time_1,p)??a(e.theme_2,e.star_time_2,e.end_time_2,p)??e.theme??"light")},fe=t;let ee=0,te=0;const Ve=typeof fe.requestVideoFrameCallback=="function",Je=()=>Ve?te!==0:ee!==0,Pe=()=>{if(!Je())if(Ve){const p=(B,ye)=>{ge(ye.mediaTime),te=fe.requestVideoFrameCallback(p)};te=fe.requestVideoFrameCallback(p)}else{const p=()=>{ge(t.currentTime),ee=requestAnimationFrame(p)};ee=requestAnimationFrame(p)}},ve=()=>{Ve?(fe.cancelVideoFrameCallback?.(te),te=0):(cancelAnimationFrame(ee),ee=0)},Fe=()=>{ve(),g&&H({index:r,theme:g})};return t.addEventListener("play",Pe),t.addEventListener("pause",ve),t.addEventListener("ended",Fe),!t.paused&&!t.ended&&Pe(),()=>{ve(),t.removeEventListener("play",Pe),t.removeEventListener("pause",ve),t.removeEventListener("ended",Fe)}},[r]),ne(()=>{h.current.forEach((e,t)=>{t!==0&&e.current&&(e.current.pause(),e.current.currentTime=0)})},[]),ne(()=>{m.current.length!==0&&f("hero_banner_slide_view",{index:0,total:m.current.length,media_type:L(0),trigger:"initial"})},[f,L]);const Ue=!!i[r]?.isShowVideo,Ie=N!==void 0,X=!Ie&&Ue&&Z!==null&&Z>5&&k!=="ended"&&k!==null,Ye=Ie||X,We=X?k==="paused":P==="STOPPED",Ze=()=>{if(!X){_();return}const e=h.current[r]?.current;if(!e)return;const t=!e.paused;t?e.pause():e.play()?.catch(()=>{}),ue(t,r),Le(t,r)},Re=C&&C.index===r?C.theme:i[r]?.theme;return T("div",{ref:qe,role:"region","aria-roledescription":"carousel","aria-label":v.carouselLabel,"data-ui-component-id":"HeroBanner",onFocus:d,onBlur:Q,className:A("hero-banner-carousel group relative w-full overflow-hidden",ie==="default"?"tablet:aspect-[768/560] laptop:aspect-[1024/400] desktop:aspect-[1440/560] lg-desktop:aspect-[1920/800] aspect-[390/560]":"lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]",ke.root,G),...xe,children:[o(Ke,{onSwiper:D,onSlideChange:j,onSlideChangeTransitionEnd:pe,onSliderFirstMove:Ee,slidesPerView:1,loop:!0,initialSlide:0,allowTouchMove:!0,children:i.map((e,t)=>{const a=C&&C.index===t?C.theme:e.theme??"light";return o(Qe,{children:({isActive:g,isPrev:$,isNext:ge})=>o(ht,{data:e,isActive:g,isAdjacent:$||ge,slideIndex:t,slideLabel:`${v.slideStatus} ${t+1} / ${i.length}`,videoRef:h.current[t],containerSize:ie,theme:a,position:t+1,locale:Ce,pageHandle:se,onPlayVideo:()=>I(t),onPrimaryClick:oe,onSecondaryClick:re,onTertiaryClick:Se})},t)})}),R&&o(rt,{onPrev:()=>q("prev"),onNext:()=>q("next"),prevLabel:v.prevSlide,nextLabel:v.nextSlide}),V&&o(st,{frameCount:i.length,activeIndex:r,resetNonce:me,activeFrameIntervalSec:N,isAutoplayEnabled:V,isTimerRunning:M,onSegmentClick:K,segmentLabel:e=>`${v.slideStatus} ${e+1} / ${i.length}`,classPrefix:"hero-banner",theme:Re}),Ye&&o(it,{isPaused:We,onToggle:Ze,pausedLabel:X?v.playVideo:v.playAutoplay,playingLabel:X?v.pauseVideo:v.pauseAutoplay,classPrefix:"hero-banner",theme:Re}),o("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:J}),b!==null&&i[b]?.secondaryButton&&o(yt,{visible:!0,videoUrl:i[b].secondaryButton?.isYoutubeVideo?void 0:i[b].secondaryButton?.videoUrl?.url,youTubeId:i[b].secondaryButton?.isYoutubeVideo?i[b].secondaryButton?.youtubeId:void 0,onCloseModal:()=>I(null)})]})});je.displayName="HeroBannerCarousel";var Rt=je;export{Rt as default};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { ButtonProps } from '../../components/button.js';
|
|
2
2
|
import type { Media, Theme } from '../../types/props.js';
|
|
3
|
+
import type { BoaButtonFields } from '../../hooks/useBoaButton.js';
|
|
3
4
|
type TitleSizeType = '5' | '4' | '3' | '2' | '1';
|
|
5
|
+
export type HeroBannerBlockLinkConfig = BoaButtonFields & {
|
|
6
|
+
target?: '_self' | '_blank';
|
|
7
|
+
};
|
|
4
8
|
/** 5-breakpoint media tier keys (Tailwind preset boundaries). */
|
|
5
9
|
export type HeroBannerMediaTier = 'lgDesktop' | 'desktop' | 'laptop' | 'tablet' | 'mobile';
|
|
6
10
|
/**
|
|
@@ -115,12 +119,13 @@ export interface HeroBannerSlideData extends HeroBannerTieredMediaFields, HeroBa
|
|
|
115
119
|
isShowVideo?: boolean;
|
|
116
120
|
isVideoLoop?: boolean;
|
|
117
121
|
blockLink?: string;
|
|
122
|
+
blockLinkConfig?: HeroBannerBlockLinkConfig;
|
|
118
123
|
primaryButton?: {
|
|
119
124
|
text: string;
|
|
120
125
|
link?: string;
|
|
121
126
|
isCustomPrimaryButton?: boolean;
|
|
122
127
|
customPrimaryEventId?: string;
|
|
123
|
-
} & Omit<ButtonProps, 'children'>;
|
|
128
|
+
} & BoaButtonFields & Omit<ButtonProps, 'children'>;
|
|
124
129
|
secondaryButton?: {
|
|
125
130
|
text: string;
|
|
126
131
|
link?: string;
|
|
@@ -132,13 +137,13 @@ export interface HeroBannerSlideData extends HeroBannerTieredMediaFields, HeroBa
|
|
|
132
137
|
isYoutubeVideo?: boolean;
|
|
133
138
|
isCustomSecondaryButton?: boolean;
|
|
134
139
|
customSecondaryEventId?: string;
|
|
135
|
-
} & Omit<ButtonProps, 'children'>;
|
|
140
|
+
} & BoaButtonFields & Omit<ButtonProps, 'children'>;
|
|
136
141
|
tertiaryButton?: {
|
|
137
142
|
text: string;
|
|
138
143
|
link?: string;
|
|
139
144
|
isCustomTertiaryButton?: boolean;
|
|
140
145
|
customTertiaryEventId?: string;
|
|
141
|
-
} & Omit<ButtonProps, 'children'>;
|
|
146
|
+
} & BoaButtonFields & Omit<ButtonProps, 'children'>;
|
|
142
147
|
theme?: Theme;
|
|
143
148
|
/**
|
|
144
149
|
* 单帧轮播间隔(秒),覆盖全局默认间隔。可选范围 1-30 秒,不允许 999;
|
|
@@ -187,6 +192,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
187
192
|
/** 视频是否循环播放 */
|
|
188
193
|
isVideoLoop?: boolean;
|
|
189
194
|
blockLink?: string;
|
|
195
|
+
blockLinkConfig?: HeroBannerBlockLinkConfig;
|
|
190
196
|
/** 主按钮文本和配置 */
|
|
191
197
|
primaryButton?: {
|
|
192
198
|
text: string;
|
|
@@ -194,7 +200,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
194
200
|
isCustomPrimaryButton?: boolean;
|
|
195
201
|
/** 自定义事件ID,传递给 onPrimaryClick */
|
|
196
202
|
customPrimaryEventId?: string;
|
|
197
|
-
} & Omit<ButtonProps, 'children'>;
|
|
203
|
+
} & BoaButtonFields & Omit<ButtonProps, 'children'>;
|
|
198
204
|
/** 次要按钮文本和配置 */
|
|
199
205
|
secondaryButton?: {
|
|
200
206
|
text: string;
|
|
@@ -209,7 +215,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
209
215
|
isCustomSecondaryButton?: boolean;
|
|
210
216
|
/** 自定义事件ID,传递给 onSecondaryClick */
|
|
211
217
|
customSecondaryEventId?: string;
|
|
212
|
-
} & Omit<ButtonProps, 'children'>;
|
|
218
|
+
} & BoaButtonFields & Omit<ButtonProps, 'children'>;
|
|
213
219
|
/** 第三按钮文本和配置 */
|
|
214
220
|
tertiaryButton?: {
|
|
215
221
|
text: string;
|
|
@@ -217,7 +223,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
|
|
|
217
223
|
isCustomTertiaryButton?: boolean;
|
|
218
224
|
/** 自定义事件ID,传递给 onTertiaryClick */
|
|
219
225
|
customTertiaryEventId?: string;
|
|
220
|
-
} & Omit<ButtonProps, 'children'>;
|
|
226
|
+
} & BoaButtonFields & Omit<ButtonProps, 'children'>;
|
|
221
227
|
/** 主题 */
|
|
222
228
|
theme?: Theme;
|
|
223
229
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as e,jsxs as d}from"react/jsx-runtime";import ke,{useImperativeHandle as ye,useRef as v,useState as b,useEffect as ee}from"react";import{Heading as y,Picture as S,Text as M,Link as te}from"../../components/index.js";import{cn as r,getLocalizedPath as Ne}from"../../helpers/utils.js";import{withLayout as Te}from"../../shared/Styles.js";import{useExposure as Ie}from"../../hooks/useExposure.js";import{useIntersectionObserverDelay as Le}from"../../hooks/useIntersectionObserver.js";import{useAiuiContext as Pe}from"../AiuiProvider/index.js";import{useTracking as Ve}from"../../hooks/useTracking.js";import{trackUrlRef as Se}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as Me}from"../../shared/track.js";import{motion as ie,AnimatePresence as oe}from"framer-motion";const D="image",z="image_with_text",ae=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("path",{d:"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z",fill:"currentColor"})}),le=ke.forwardRef(({data:se,className:re},ne)=>{const{title:f,subtitle:w,desc:g,descIcon:P,image:_,padImage:H,mobileImage:E,theme:me="dark",items:R=[],layout:de="left",mediaType:ce="image",datalist:s=[],video:j,padVideo:C,mobVideo:W,button:u,textAlign:l="left",titleTag:pe}=se,i=de,{locale:xe="us"}=Pe(),{buildRef:ue}=Ve(),V=v(null),N=v(null),T=v(null),I=v(null),A=v(null),[c,fe]=b(0),q=v([]),[B,ge]=b({left:0,width:0}),[h,$]=b(""),[F,O]=b(""),[U,Z]=b(""),n=s.length>0,k=ce==="video";Ie(V,{componentType:D,componentName:z,componentTitle:f,componentDescription:w}),ye(ne,()=>V.current),ee(()=>{if(s.length>0){const t=q.current[c];if(t){const{offsetLeft:a,offsetWidth:o}=t;ge({left:a,width:o})}}},[c,s.length]);const[G,he]=b(!1);Le(A,{once:!0,threshold:.01,callback:()=>{he(!0)}}),ee(()=>{if(!G||!k)return;let t="",a="",o="";if(n&&s[c]){const p=s[c];t=p.video?.url||"",a=p.padVideo?.url||t,o=p.mobVideo?.url||t}else t=j?.url||"",a=C?.url||t,o=W?.url||t;t&&$(t),a&&O(a),o&&Z(o),setTimeout(()=>{[N.current?.querySelector("video"),T.current?.querySelector("video"),I.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},200)},[G,k,n,c,s,j?.url,C?.url,W?.url]);const ve=(t,a)=>{if(fe(t),a.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),k&&n&&s[t]){const o=s[t];o.video?.url&&$(o.video.url),o.padVideo?.url&&O(o.padVideo.url),o.mobVideo?.url&&Z(o.mobVideo.url),setTimeout(()=>{[N.current?.querySelector("video"),T.current?.querySelector("video"),I.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},300)}},J=Ne(u?.link||"",xe),K=u?.link?Se(J,ue(D,z)):J,Q=Me({interactive:!!u?.link,componentType:D,componentName:z,title:f,description:w,buttonName:u?.text}),be=()=>!L||!u?.text||i==="top"||i==="bottom"?null:e("div",{className:r("image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]",{"flex justify-center":l==="center","flex justify-start":l==="left"}),children:e(te,{href:K,...Q,className:"image-with-text__button whitespace-nowrap no-underline",suffixIcon:ae,children:u.text})}),m=R.length>0,L=!!u,X=()=>{if(n&&s[c]){const t=s[c];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return _?`${_?.url},${H?.url||_?.url} 1024, ${E?.url||_?.url} 768`:""},Y=()=>{if(n){const p=s[c],x=p.image?.url,we=p.imgPad?.url||x,_e=p.imageMob?.url||x;return e(oe,{mode:"wait",children:e(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__video-motion absolute left-0 top-0 w-full",children:d("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[e("div",{ref:N,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:x,src:h,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:T,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:we,src:F||h,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:I,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:_e,src:U||h,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},p.video?.url||p.image?.url)})}const t=_?.url,a=H?.url||t,o=E?.url||t;return d("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[e("div",{ref:N,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:h,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:T,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:a,src:F||h,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:I,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:o,src:U||h,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return d("section",{ref:V,"data-ui-component-id":"ImageWithText",className:r("image-with-text text-info-primary",{"flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!n,"flex-col":!n&&(i==="top"||i==="bottom"),"items-center":i==="left"||i==="right","flex-col laptop:flex-row":!n&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":n,"aiui-dark":me==="dark"},re),children:[n&&(f||g||s.length>0)&&d("div",{className:r("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":l==="left","text-center":l==="center"}),children:[d("div",{className:"image-with-text__header",children:[e(y,{as:"h3",size:4,html:f,className:"image-with-text__title"}),e(M,{as:"p",size:1,html:g,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),e("div",{className:r("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":l==="center"}),children:d("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[e("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:B.left,width:B.width}}),s.map((t,a)=>e("div",{ref:o=>{q.current[a]=o},onClick:o=>ve(a,o),className:r("image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]",c===a?"image-with-text__tab--active text-black":"text-white"),children:e(y,{as:pe??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},a))]})})]}),!n&&(f||w||g)&&d("div",{className:r("image-with-text__content flex w-full flex-col",{"justify-center":!L,"justify-between":L,"items-start":l==="left"&&m,"items-center":l==="center"&&m,"text-left":l==="left","text-center":l==="center","laptop:order-1":i==="left"}),children:[d("div",{className:r("image-with-text__main-content",{"flex flex-col":L}),children:[d("div",{className:r("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":(i==="top"||i==="bottom")&&u?.text}),children:[d("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[e(y,{as:"h2",size:4,html:f,className:r("image-with-text__title",{"text-left":m&&l==="left","text-center":m&&l==="center"})}),w&&e(M,{as:"p",size:m?4:3,html:w,className:r("image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",{"laptop:mt-[16px]":!m,"min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]":m,"text-left":m&&l==="left","text-center":m&&l==="center"})})]}),(i==="top"||i==="bottom")&&u?.text&&e(te,{href:K,...Q,className:"laptop:flex hidden whitespace-nowrap no-underline",suffixIcon:ae,children:u.text})]}),!m&&(g||P)&&d("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[P&&e("img",{src:P,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),g&&e(y,{as:"h4",size:5,html:g,className:"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]"})]}),m&&e("div",{className:r("image-with-text__items laptop:mt-[32px] desktop:mt-[48px] mt-[24px] grid w-full gap-6",{"!mt-6":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4":i==="top"||i==="bottom","grid-cols-2 tablet:grid-cols-4 laptop:grid-cols-2":i==="left"||i==="right"}),children:R.map((t,a)=>d("div",{className:r("image-with-text__item",{"text-center":l==="center"}),children:[d("div",{className:r("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":l==="center","justify-start":l==="left"}),children:[t.icon?.url&&e(S,{source:t.icon.url,alt:t.icon?.alt,className:"image-with-text__item-icon min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] desktop:h-[44px] lg-desktop:h-[52px] h-[28px] translate-y-[-12%] md:text-[40px]",imgClassName:"h-full !w-full"}),e(y,{size:4,as:"h6",className:"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent",children:t.text})]}),e(M,{size:4,as:"p",html:t.desc,className:"image-with-text__item-desc tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[-2px] text-[14px]"})]},a))})]}),be()]}),e("div",{ref:A,className:r("image-with-text__media-wrapper",{"laptop:w-[60%] w-full shrink-0":i==="left"||i==="right","aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0":m,"laptop:basis-[63%] desktop:basis-[57%]":m&&i==="left","relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]":n,"!max-w-none !max-h-none aspect-auto":i==="top"||i==="bottom"}),children:n?k?Y():e(oe,{mode:"wait",children:e(ie.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__image-motion absolute left-0 top-0 w-full",children:e(S,{source:X(),alt:s[c].image?.alt,className:"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]"})},s[c].image?.url)}):k?Y():e(S,{source:X(),className:r("image-with-text__image rounded-box laptop:rounded-box")})})]})});le.displayName="ImageWithText";var $e=Te(le);export{$e as default};
|
|
1
|
+
"use client";import{jsx as e,jsxs as m}from"react/jsx-runtime";import Pe,{useImperativeHandle as Ce,useRef as b,useState as w,useEffect as oe}from"react";import{Heading as T,Picture as z,Text as I,Link as le}from"../../components/index.js";import{cn as r,getLocalizedPath as Ve}from"../../helpers/utils.js";import{withLayout as Ee}from"../../shared/Styles.js";import{resolveMediaGridSpec as ze,mediaGridSpecToCssVars as De}from"../../shared/mediaGridSpec.js";import{useContainerGrid as Re}from"../../shared/ContainerGridContext.js";import{useExposure as He}from"../../hooks/useExposure.js";import{useIntersectionObserverDelay as je}from"../../hooks/useIntersectionObserver.js";import{useAiuiContext as Ae}from"../AiuiProvider/index.js";import{useTracking as We}from"../../hooks/useTracking.js";import{trackUrlRef as $e}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as Be}from"../../shared/track.js";import{motion as se,AnimatePresence as re}from"framer-motion";const D="image",R="image_with_text",qe={1:"grid-cols-1",2:"grid-cols-2"},Oe={1:"tablet:grid-cols-1",2:"tablet:grid-cols-2",3:"tablet:grid-cols-3",4:"tablet:grid-cols-4"},Fe={1:"laptop:grid-cols-1",2:"laptop:grid-cols-2"},ne=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:e("path",{d:"M6.91009 4.41058C7.23553 4.08514 7.76304 4.08514 8.08848 4.41058L13.0885 9.41058C13.4139 9.73602 13.4139 10.2635 13.0885 10.589L8.08848 15.589C7.76304 15.9144 7.23553 15.9144 6.91009 15.589C6.58466 15.2635 6.58466 14.736 6.91009 14.4106L11.3209 9.99977L6.91009 5.58897C6.58466 5.26353 6.58466 4.73602 6.91009 4.41058Z",fill:"currentColor"})}),me=Pe.forwardRef(({data:de,className:ce},pe)=>{const{title:h,subtitle:_,desc:f,descIcon:V,image:k,padImage:H,mobileImage:j,theme:xe="dark",items:y=[],layout:ue="left",mediaType:he="image",datalist:n=[],video:A,padVideo:W,mobVideo:$,button:u,textAlign:o="left",titleTag:fe,caption:S}=de,i=ue,{locale:ge="us"}=Ae(),{buildRef:ve}=We(),E=b(null),L=b(null),M=b(null),P=b(null),B=b(null),[d,be]=w(0),q=b([]),[O,we]=w({left:0,width:0}),[g,F]=w(""),[G,U]=w(""),[Z,J]=w(""),l=n.length>0,N=he==="video",K=Re(),Q=i==="bottom"?"bottom":"left-right",v=!l&&K?ze(K.gridColumns,Q):void 0,_e=v?{...De(v),"--mw-l":`${v.laptop.w}px`,"--mw-d":`${v.desktop.w}px`,"--mw-x":`${v.lgDesktop.w}px`}:void 0,ke=qe[Math.min(y.length,2)],ye=Oe[Math.min(y.length,4)],Ne=Fe[Math.min(y.length,2)];He(E,{componentType:D,componentName:R,componentTitle:h,componentDescription:_}),Ce(pe,()=>E.current),oe(()=>{if(n.length>0){const t=q.current[d];if(t){const{offsetLeft:s,offsetWidth:a}=t;we({left:s,width:a})}}},[d,n.length]);const[X,Te]=w(!1);je(B,{once:!0,threshold:.01,callback:()=>{Te(!0)}}),oe(()=>{if(!X||!N)return;let t="",s="",a="";if(l&&n[d]){const p=n[d];t=p.video?.url||"",s=p.padVideo?.url||t,a=p.mobVideo?.url||t}else t=A?.url||"",s=W?.url||t,a=$?.url||t;t&&F(t),s&&U(s),a&&J(a),setTimeout(()=>{[L.current?.querySelector("video"),M.current?.querySelector("video"),P.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},200)},[X,N,l,d,n,A?.url,W?.url,$?.url]);const Ie=(t,s)=>{if(be(t),s.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),N&&l&&n[t]){const a=n[t];a.video?.url&&F(a.video.url),a.padVideo?.url&&U(a.padVideo.url),a.mobVideo?.url&&J(a.mobVideo.url),setTimeout(()=>{[L.current?.querySelector("video"),M.current?.querySelector("video"),P.current?.querySelector("video")].forEach(x=>{x&&(x.load(),x.play().catch(()=>{}))})},300)}},Y=Ve(u?.link||"",ge),ee=u?.link?$e(Y,ve(D,R)):Y,te=Be({interactive:!!u?.link,componentType:D,componentName:R,title:h,description:_,buttonName:u?.text}),Se=()=>!C||!u?.text||i==="bottom"?null:e("div",{className:r("image-with-text__button-wrapper mt-[24px]",{"flex justify-center":o==="center","flex justify-start":o==="left"}),children:e(le,{href:ee,...te,className:"image-with-text__button lg-desktop:text-[16px] whitespace-nowrap text-[14px] no-underline",suffixIcon:ne,children:u.text})}),c=y.length>0,C=!!u,ie=()=>{if(l&&n[d]){const t=n[d];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return k?`${k?.url},${H?.url||k?.url} 1024, ${j?.url||k?.url} 768`:""},ae=()=>{if(l){const p=n[d],x=p.image?.url,Le=p.imgPad?.url||x,Me=p.imageMob?.url||x;return e(re,{mode:"wait",children:e(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__video-motion absolute left-0 top-0 w-full",children:m("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[e("div",{ref:L,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:x,src:g,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:M,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Le,src:G||g,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:P,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Me,src:Z||g,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},p.video?.url||p.image?.url)})}const t=k?.url,s=H?.url||t,a=j?.url||t;return m("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[e("div",{ref:L,className:"image-with-text__desktop-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:g,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),e("div",{ref:M,className:"image-with-text__tablet-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:s,src:G||g,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),e("div",{ref:P,className:"image-with-text__mobile-video-container",children:e("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:a,src:Z||g,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return m("section",{ref:E,"data-ui-component-id":"ImageWithText",className:r("image-with-text text-info-primary",{flex:!l,"gap-[24px]":!l&&i==="bottom","gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!l&&i!=="bottom","flex-col":!l&&i==="bottom","items-center":i==="left"||i==="right","flex-col laptop:flex-row":!l&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":l,"aiui-dark":xe==="dark"},ce),children:[l&&(h||f||n.length>0)&&m("div",{className:r("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":o==="left","text-center":o==="center"}),children:[m("div",{className:"image-with-text__header",children:[e(T,{as:"h3",size:4,html:h,className:"image-with-text__title"}),e(I,{as:"p",size:1,html:f,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),e("div",{className:r("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":o==="center"}),children:m("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[e("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:O.left,width:O.width}}),n.map((t,s)=>e("div",{ref:a=>{q.current[s]=a},onClick:a=>Ie(s,a),className:r("image-with-text__tab rounded-btn min-xxl:px-[28px] min-xxl:py-[15px] relative z-10 cursor-pointer px-[20px] py-[10px] text-center text-[12px] font-medium transition-colors duration-300 md:px-[20px] md:py-[10px]",d===s?"image-with-text__tab--active text-black":"text-white"),children:e(T,{as:fe??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},s))]})})]}),!l&&(h||_||f)&&m("div",{className:r("image-with-text__content flex w-full flex-col",{"justify-center":!C,"justify-between":C,"items-start":o==="left"&&c,"items-center":o==="center"&&c,"text-left":o==="left","text-center":o==="center","laptop:order-1":i==="left"}),children:[m("div",{className:r("image-with-text__main-content",{"flex flex-col":C}),children:[m("div",{className:r("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":i==="bottom"&&u?.text}),children:[m("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[e(T,{as:"h2",size:4,html:h,className:r("image-with-text__title",{"text-left":c&&o==="left","text-center":c&&o==="center"})}),_&&e(I,{as:"p",size:c?4:3,html:_,className:r("image-with-text__subtitle tablet:mt-[8px] lg-desktop:text-[16px] mt-[4px] text-[14px]",{"text-left":c&&o==="left","text-center":c&&o==="center"})})]}),i==="bottom"&&u?.text&&e(le,{href:ee,...te,className:"laptop:flex lg-desktop:text-[16px] hidden whitespace-nowrap text-[14px] no-underline",suffixIcon:ne,children:u.text})]}),!c&&(f||V)&&m("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[V&&e("img",{src:V,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),f&&e(T,{as:"h4",size:5,html:f,className:"image-with-text__description-text min-md:text-[40px] min-l:text-[40px] min-xl:text-[56px] min-xxl:text-[64px] text-[#3AD1FF] md:text-[40px]"})]}),c&&e("div",{className:r("image-with-text__items laptop:mt-[32px] desktop:mt-[24px] mt-[16px] grid w-full gap-6",ke,ye,{"!mt-6":i==="bottom",[Ne]:i==="left"||i==="right"}),children:y.map((t,s)=>m("div",{className:r("image-with-text__item",{"text-center":o==="center"}),children:[m("div",{className:r("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":o==="center","justify-start":o==="left"}),children:[t.icon?.url&&e(z,{source:t.icon.url,alt:t.icon?.alt,className:"image-with-text__item-icon desktop:h-[32px] lg-desktop:h-[40px] h-[24px]",imgClassName:"h-full !w-full"}),e(T,{size:4,as:"h6",className:"image-with-text__item-text bg-gradient-to-r from-[#3ad1ff] to-[#008cd6] bg-clip-text text-transparent",children:t.text})]}),e(I,{size:4,as:"p",html:t.desc,className:"image-with-text__item-desc laptop:mt-[16px] lg-desktop:text-[16px] mt-[16px] line-clamp-2 text-[14px]"})]},s))}),S&&(i==="left"||i==="right")&&e(I,{as:"p",size:1,weight:"medium",html:S,className:r("image-with-text__caption tablet:block text-info-secondary mt-[24px] hidden",{"text-center":o==="center"})})]}),Se()]}),e("div",{ref:B,style:_e,className:r("image-with-text__media-wrapper",v?Q==="bottom"?"tablet:h-[360px] laptop:h-auto laptop:aspect-[var(--ar-l)] desktop:aspect-[var(--ar-d)] lg-desktop:aspect-[var(--ar-x)] h-[var(--mh-m)] w-full shrink-0":"tablet:h-[360px] laptop:h-auto laptop:w-[var(--mw-l)] laptop:aspect-[var(--ar-l)] desktop:w-[var(--mw-d)] desktop:aspect-[var(--ar-d)] lg-desktop:w-[var(--mw-x)] lg-desktop:aspect-[var(--ar-x)] h-[var(--mh-m)] w-full shrink-0":{"laptop:w-[60%] w-full shrink-0":i==="left"||i==="right","aspect-[716/720] max-h-[560px] max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[824/560] shrink-0":c&&i!=="bottom","laptop:basis-[63%] desktop:basis-[57%]":c&&i==="left","relative w-full shrink md:aspect-[358/360] min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] laptop:basis-[64%] desktop:aspect-[648/448]":l,"!max-w-none !max-h-none aspect-auto":i==="bottom"}),children:l?N?ae():e(re,{mode:"wait",children:e(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"image-with-text__image-motion absolute left-0 top-0 w-full",children:e(z,{source:ie(),alt:n[d].image?.alt,className:"image-with-text__image rounded-box min-xxl:aspect-[824/560] min-xxl:max-w-[824px] tablet:aspect-[704/360] laptop:aspect-[744/336] desktop:aspect-[648/448] md:aspect-[358/360]"})},n[d].image?.url)}):N?ae():e(z,{source:ie(),className:r("image-with-text__image rounded-box laptop:rounded-box size-full"),imgClassName:"h-full object-cover"})}),S&&!l&&e(I,{as:"p",size:1,weight:"medium",html:S,className:r("image-with-text__caption text-info-secondary mt-[-16px] w-full",{"tablet:hidden":i==="left"||i==="right","text-center":o==="center"})})]})});me.displayName="ImageWithText";var lt=Ee(me);export{lt as default};
|
|
@@ -45,7 +45,7 @@ export interface ImageWithTextTabItem {
|
|
|
45
45
|
title: string;
|
|
46
46
|
}
|
|
47
47
|
export type MediaType = 'image' | 'video';
|
|
48
|
-
export type LayoutPosition = 'left' | 'right' | '
|
|
48
|
+
export type LayoutPosition = 'left' | 'right' | 'bottom';
|
|
49
49
|
export type TextAlign = 'left' | 'center';
|
|
50
50
|
/** 列数枚举类型 */
|
|
51
51
|
export declare enum Cols {
|
|
@@ -68,7 +68,7 @@ export interface ImageWithTextProps {
|
|
|
68
68
|
descIcon?: string;
|
|
69
69
|
/** 主题,默认 dark */
|
|
70
70
|
theme?: Theme;
|
|
71
|
-
/** 布局位置,默认 left
|
|
71
|
+
/** 布局位置,默认 left。支持左右布局(left/right)和上下布局(bottom,图下文上) */
|
|
72
72
|
layout?: LayoutPosition;
|
|
73
73
|
/** 媒体类型,默认 image。所有模式都支持 image 和 video */
|
|
74
74
|
mediaType?: MediaType;
|
|
@@ -104,6 +104,12 @@ export interface ImageWithTextProps {
|
|
|
104
104
|
datalist?: ImageWithTextTabItem[];
|
|
105
105
|
/** 按钮配置 */
|
|
106
106
|
button?: ButtonConfig;
|
|
107
|
+
/**
|
|
108
|
+
* 媒体说明文字(12px,可选,缺省不渲染)
|
|
109
|
+
* - bottom 布局:全断点位于图片下方,上方间距 8px
|
|
110
|
+
* - left/right 布局:≥768px 位于功能列表(图标组)下方(上方间距 24px),<768px 位于图片下方(上方间距 8px)
|
|
111
|
+
*/
|
|
112
|
+
caption?: string;
|
|
107
113
|
};
|
|
108
114
|
/** 自定义类名 */
|
|
109
115
|
className?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as o,jsxs as N}from"react/jsx-runtime";import{useMediaQuery as y}from"react-responsive";import{Heading as M,Picture as A,Text as _}from"../../components/index.js";import{cn as t}from"../../helpers/utils.js";import{withLayout as $}from"../../shared/Styles.js";const q=({title:h,desc:w,mobImage:p,mobVideo:u,tabletImage:k,tabletVideo:m,laptopImage:e,laptopVideo:g,desktopImage:a,desktopVideo:l,image:s,video:n,className:f,theme:z,classNames:c})=>{const T=y({query:"(max-width: 767px)"}),K=y({query:"(min-width: 768px) and (max-width: 1024px)"}),v=y({query:"(min-width: 1025px) and (max-width: 1439px)"}),I=()=>T?u||m||g||l||n:K?m||g||l||n:v?g||l||n:l||n,j=()=>T?p||k||e||a||s:K?k||e||a||s:v?e||a||s:a||s,P=I(),L=j(),D=()=>{const d=[],x=s?.url||a?.url,b=a?.url||s?.url,r=e?.url||b,i=k?.url||r,C=p?.url||i;return x&&d.push(x),b&&b!==x&&d.push(`${b} 1920`),r&&r!==b&&d.push(`${r} 1440`),i&&i!==r&&d.push(`${i} 1025`),C&&C!==i&&d.push(`${C} 768`),d.length>0?d.join(", "):void 0},O=!!P?.url,R=!!(p?.url||k?.url||e?.url||a?.url||s?.url);return N("div",{className:t("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":z==="dark"},f,c?.card),children:[O?o("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:t("ksp-card-video absolute bottom-0 w-full object-cover",c?.cardVideo)}):R&&o(A,{source:D(),alt:L?.alt||"",className:t("ksp-card-image size-full",c?.cardImage),imgClassName:t("size-full object-cover object-bottom",c?.cardImageImg)}),N("div",{className:t("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",c?.cardContent),children:[o(M,{size:3,html:h,className:t("ksp-card-title tablet:block hidden w-full",c?.cardTitle)}),o(M,{size:2,html:h,className:t("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",c?.cardTitle)}),o(_,{size:2,html:w,className:t("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",c?.cardDesc)})]})]})},H={4:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-2 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},V={4:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 tablet:col-span-2 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",8:"col-span-2 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"}},F=(h,w,p)=>(p===12?V:H)[w]?.[h]||"";function G({data:h,className:w,classNames:p,...u}){const{title:k,titleTag:m,items:e,theme:g="light",gridColumns:a}=h,l=a?Number(a):10,s=l===12;return N("section",{...u,"data-ui-component-id":"ksp",className:t("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":g==="dark"},w,p?.root),children:[o(M,{as:m??"h2",size:4,html:k,className:t("ksp-title laptop:text-center text-left",p?.title)}),o("div",{className:t("ksp-layout tablet:grid-cols-3 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3",s?"laptop:grid-cols-12":"laptop:grid-cols-10",p?.layout),children:e.map((n,f)=>o(q,{...n,className:F(f,e.length,l),classNames:p},f))})]})}var S=$(G);export{S as default};
|
|
1
|
+
"use client";import{jsx as o,jsxs as T}from"react/jsx-runtime";import{useMediaQuery as y}from"react-responsive";import{Heading as M,Picture as A,Text as _}from"../../components/index.js";import{cn as p}from"../../helpers/utils.js";import{withLayout as $}from"../../shared/Styles.js";const q=({title:k,desc:n,mobImage:t,mobVideo:m,tabletImage:h,tabletVideo:f,laptopImage:e,laptopVideo:g,desktopImage:s,desktopVideo:l,image:a,video:w,className:x,theme:z,classNames:c})=>{const N=y({query:"(max-width: 767px)"}),K=y({query:"(min-width: 768px) and (max-width: 1024px)"}),v=y({query:"(min-width: 1025px) and (max-width: 1439px)"}),I=()=>N?m||f||g||l||w:K?f||g||l||w:v?g||l||w:l||w,j=()=>N?t||h||e||s||a:K?h||e||s||a:v?e||s||a:s||a,P=I(),L=j(),D=()=>{const d=[],b=a?.url||s?.url,r=s?.url||a?.url,i=e?.url||r,u=h?.url||i,C=t?.url||u;return b&&d.push(b),r&&r!==b&&d.push(`${r} 1920`),i&&i!==r&&d.push(`${i} 1440`),u&&u!==i&&d.push(`${u} 1025`),C&&C!==u&&d.push(`${C} 768`),d.length>0?d.join(", "):void 0},O=!!P?.url,R=!!(t?.url||h?.url||e?.url||s?.url||a?.url);return T("div",{className:p("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":z==="dark"},x,c?.card),children:[O?o("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:p("ksp-card-video absolute bottom-0 w-full object-cover",c?.cardVideo)}):R&&o(A,{source:D(),alt:L?.alt||"",className:p("ksp-card-image size-full",c?.cardImage),imgClassName:p("size-full object-cover object-bottom",c?.cardImageImg)}),T("div",{className:p("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",c?.cardContent),children:[o(M,{size:3,html:k,className:p("ksp-card-title tablet:block hidden w-full",c?.cardTitle)}),o(M,{size:2,html:k,className:p("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",c?.cardTitle)}),o(_,{size:2,html:n,className:p("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",c?.cardDesc)})]})]})},H={4:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},V={4:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]"},5:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},6:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"},7:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-5 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-7 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-4 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-4 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},8:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",8:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"}},F=(k,n,t)=>(t===12?V:H)[n]?.[k]||"";function G({data:k,className:n,classNames:t,...m}){const{title:h,titleTag:f,items:e,theme:g="light",gridColumns:s}=k,l=s?Number(s):10,a=l===12;return T("section",{...m,"data-ui-component-id":"ksp",className:p("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":g==="dark"},n,t?.root),children:[o(M,{as:f??"h2",size:4,html:h,className:p("ksp-title laptop:text-center text-left",t?.title)}),o("div",{className:p("ksp-layout tablet:grid-cols-2 laptop:gap-4 mt-[24px] grid grid-cols-1 gap-3",a?"laptop:grid-cols-12":"laptop:grid-cols-10",t?.layout),children:e.map((w,x)=>o(q,{...w,className:F(x,e.length,l),classNames:t},x))})]})}var S=$(G);export{S as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as s}from"react/jsx-runtime";import"react";import{Text as n,Heading as c,Avatar as u,AvatarImage as
|
|
1
|
+
import{jsx as e,jsxs as s}from"react/jsx-runtime";import"react";import{Text as n,Heading as c,Avatar as u,AvatarImage as k,AvatarFallback as C}from"../../components/index.js";import{cn as m}from"../../helpers/utils.js";import{withLayout as L}from"../../shared/Styles.js";const x=9,b=3,y=(t,a)=>Array.from({length:Math.ceil(t.length/a)},(l,r)=>t.slice(r*a,(r+1)*a)),N=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})}),M=()=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"13",viewBox:"0 0 14 13",fill:"none",children:e("path",{d:"M6.07501 0.418036C6.35012 -0.139398 7.145 -0.139397 7.42011 0.418037L8.9242 3.46565C9.03344 3.68701 9.24462 3.84043 9.4889 3.87593L12.8521 4.36464C13.4673 4.45403 13.7129 5.21 13.2678 5.64391L10.8341 8.01614C10.6574 8.18844 10.5767 8.43669 10.6184 8.67999L11.1929 12.0296C11.298 12.6423 10.655 13.1095 10.1047 12.8203L7.09656 11.2388C6.87807 11.1239 6.61705 11.1239 6.39855 11.2388L3.39038 12.8203C2.84016 13.1095 2.19709 12.6423 2.30217 12.0296L2.87668 8.67999C2.91841 8.43669 2.83775 8.18844 2.66098 8.01614L0.227318 5.64391C-0.21782 5.21 0.0278133 4.45403 0.642979 4.36464L4.00622 3.87593C4.2505 3.84043 4.46167 3.68701 4.57092 3.46565L6.07501 0.418036Z",fill:"#75787F"})}),T=({item:t})=>s("div",{className:"rounded-box bg-container-primary text-info-primary laptop:p-[24px] laptop:h-[192px] desktop:h-[192px] lg-desktop:h-[240px] flex h-[176px] grow flex-col justify-between p-[16px]",children:[s("div",{className:"flex justify-between",children:[s("div",{className:"flex flex-col",children:[e(n,{size:4,html:t.name,className:"desktop:block hidden"}),e(n,{size:2,html:t.name,className:"desktop:hidden block"}),s("div",{className:"mt-2 flex gap-1",children:[new Array(t.rating||5).fill(0).map((a,l)=>e(N,{},l)),new Array(5-(t.rating||5)).fill(0).map((a,l)=>e("span",{children:M()},l))]})]}),s(u,{size:"small",className:" desktop:size-[48px] size-[40px]",children:[e(k,{src:t.avatar?.url,alt:t.avatar?.alt||""}),e(C,{children:(t.name??"").slice(0,2).toUpperCase()})]})]}),e("div",{children:e(c,{as:"h6",size:2,html:`${t.comment}`,className:"line-clamp-3 text-wrap"})})]});function R({data:t,className:a,...l}){const{title:r,subtitle:h,items:i=[],theme:d="light",titleTag:f}=t,v=y(i.length<x?[...i,...i.slice(x-i.length)]:i,b).slice(0,3).map(o=>[...o,...o]);return s("section",{...l,className:m("text-info-primary flex flex-col items-center justify-center py-3",a,{"aiui-dark":d==="dark"}),children:[e(c,{as:f??"h2",size:4,html:r,className:"laptop:text-center w-full text-left"}),e(n,{size:2,html:h,className:"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]"}),e("div",{className:m("mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden"),children:v.map((o,p)=>e("div",{className:m("animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4",{"desktop:top-10":p===0,"top-10":p===2,"hidden desktop:flex":p===1,"hidden tablet:flex":p===2}),children:o.map((g,w)=>e(T,{item:g},w))},p))})]})}var F=L(R);export{F as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{Fragment as Pe,jsx as e,jsxs as
|
|
1
|
+
"use client";import{Fragment as Pe,jsx as e,jsxs as l}from"react/jsx-runtime";import{useState as y,useRef as n,useMemo as ke,useEffect as D,forwardRef as we,useImperativeHandle as Ne}from"react";import{debounce as He}from"lodash";import{cn as s}from"../../helpers/utils.js";import{withLayout as Te}from"../../shared/Styles.js";import se from"../../components/button.js";import{Heading as ze,Text as le}from"../../components/index.js";import{VideoModal as Me}from"../VideoModal/index.js";import{convertLexicalToHTML as oe}from"@payloadcms/richtext-lexical/html";import{useInView as Le}from"react-intersection-observer";import{useExposure as Re}from"../../hooks/useExposure.js";import L from"../../helpers/ScrollLoadVideo.js";import{gsap as m}from"gsap";import{SplitText as ae}from"gsap/dist/SplitText";import{ScrollTrigger as F}from"gsap/dist/ScrollTrigger";const Ie="media_player_base",Ee="video";m.registerPlugin(F,ae);const re=({defaultConverters:f})=>({...f,text:R=>{const{node:o}=R;return o.$&&o.$.color?`<span class="lexical-${o.$.color}">${o.text}</span>`:o.text}}),ne=we(({className:f="",id:R,onBtnClick:o,data:{title:b,videoTitle:h,btnText:k,youtubeId:q,video:w,mobileVideo:U,theme:I,img:N,shape:_e,titleAnimation:H="fade-in",variant:ie,headline:Y,paragraphs:E,metrics:P,...ce},..._},pe)=>{const{sticky:i}=ce,[O,G]=y(!1),[J,de]=y(0),[ue,me]=y(0),[T,fe]=y(0),[K,S]=y(!1),d=n(null),Q=n(null),r=n(null),z=n(null),W=n(null),M=n(null),g=n(null),$=n(null),B=n(null),{ref:X,inView:c}=Le();Ne(pe,()=>r.current);const x=typeof b=="string"?b:b&&oe({data:b,converters:re}),Z=typeof h=="string"?h:h&&oe({data:h,converters:re});D(()=>{c?(d.current?.play(),G(!0)):(d.current?.pause(),G(!1))},[c]);const C=He(()=>{if(r.current){const t=r.current.getBoundingClientRect(),a=window.innerHeight,v=window.scrollY||window.pageYOffset,p=t.bottom+v,u=document.documentElement.scrollHeight-p;de(u>a?a:u)}if(r.current){const t=r.current.clientHeight,a=window.innerHeight;me(t+a)}},600);D(()=>(C(),window.addEventListener("resize",C),()=>{window.removeEventListener("resize",C)}),[]),D(()=>{function t(){if(!z.current||H!=="fade-in")return;const v=z.current?.clientHeight||80;M.current=new ae(z.current,{type:"words",wordsClass:"word"});const p=M.current.words;m.set(p,{opacity:0}),g.current&&m.set(g.current,{opacity:0}),$.current=F.create({trigger:r.current,start:"top center-=10%",end:`top+=${v*1.5+80}px center-=10%`,scrub:!0,onUpdate:A=>{const u=A.progress,ee=p.length,xe=1/ee,te=.5;p.forEach((ve,ye)=>{const be=ye/ee*(1-te),he=xe*(1+te);let j=(u-be)/he;j=Math.max(0,Math.min(j,1)),m.set(ve,{opacity:j})}),m.set(Q.current,{opacity:u}),g.current&&m.set(g.current,{opacity:u>=.6?1:0})}})}function a(){B.current=F.create({trigger:r.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:v=>{const p=v.progress;fe(p)}})}return c&&(t(),a()),()=>{M.current&&M.current.revert(),$.current&&$.current.kill(),B.current&&B.current.kill()}},[H,c]),Re(W,{componentType:Ee,componentName:Ie,componentTitle:x});const ge=ke(()=>c&&T>0&&T<.9?3:c?2:1,[T,c]);if(ie==="text-layout")return l("div",{..._,ref:r,className:s("relative flex w-full items-center overflow-hidden","aspect-w-[390] aspect-h-[660] tablet:aspect-w-[768] tablet:aspect-h-[660]","laptop:aspect-w-[1024] laptop:aspect-h-[520] desktop:aspect-w-[1440] desktop:aspect-h-[700]","lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930]",{"aiui-dark":I==="dark"},f),children:[e("div",{ref:X,className:"pointer-events-none absolute inset-0"}),l("div",{className:"absolute inset-0 z-0",children:[e(L,{videoRef:d,poster:N?.url||"",src:w?.url,className:"tablet:block hidden size-full",videoClassName:"size-full object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e(L,{videoRef:d,poster:N?.url||"",src:U?.url||w?.url,className:"tablet:hidden block size-full",videoClassName:"size-full object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e("div",{className:"absolute inset-0 bg-black/30"})]}),l("div",{className:s("relative z-10 mx-auto flex w-full max-w-[1920px] flex-col","gap-6 p-4","tablet:gap-8 tablet:px-8","laptop:grid laptop:grid-cols-[837fr_960fr] laptop:gap-12 laptop:px-16","desktop:gap-16 desktop:px-20 desktop:py-8","lg-desktop:py-12"),children:[e("div",{className:"w-full",children:Y&&e(ze,{as:"h2",size:4,className:"text-info-primary",children:Y})}),l("div",{className:s("flex w-full flex-col justify-start","desktop:gap-8 lg-desktop:gap-12 gap-4"),children:[E&&E.length>0&&e("div",{className:"tablet:gap-4 flex flex-col gap-3",children:E.map((t,a)=>e(le,{as:"p",size:2,className:"text-info-primary desktop:text-[16px] lg-desktop:text-[18px] opacity-90",children:typeof t=="string"?t:t.text},a))}),P&&P.length>0&&e("div",{className:s("tablet:grid-cols-3 grid grid-cols-2","desktop:gap-8 lg-desktop:gap-12 gap-4"),children:P.map((t,a)=>l("div",{className:"flex flex-col gap-1",children:[e("span",{className:"text-info-primary desktop:text-[56px] lg-desktop:text-[64px] text-balance text-[40px] font-bold leading-[100%] tracking-[-0.04em]",children:t.value}),e(le,{as:"span",size:2,className:"text-info-primary desktop:text-[16px] lg-desktop:text-[18px] opacity-80",children:t.label})]},a))})]})]})]});const V="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return l(Pe,{children:[i&&e("div",{..._,ref:r,className:s("pointer-events-none relative z-10",V,{"aiui-dark":I==="dark"},f),children:e("div",{ref:X,children:!H&&l("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[x&&!O&&e("div",{className:"lg-desktop:text-[64px] text-info-primary text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:x}}),Z&&O&&e("div",{className:"lg-desktop:text-[64px] text-info-primary text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:Z}}),k&&e(se,{variant:"link",className:s("member-equity-button-secondary text-info-primary"),onClick:()=>{S(!0),o&&o?.()},children:k})]})})}),l("div",{...i?{}:_,style:i?{marginBottom:`-${J}px`,marginTop:`-${ue}px`,zIndex:ge}:{zIndex:5},className:s("relative",f),children:[e("div",{className:"sticky top-0 ",children:l("div",{id:R,className:s("relative overflow-hidden",i?"h-screen w-full":V,{"aiui-dark":I==="dark"}),children:[H==="fade-in"&&l("div",{className:s("absolute z-30 flex w-full flex-col items-center justify-center gap-4 px-4 text-center",i?"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2":"left-0 top-0"),children:[x&&e("div",{ref:z,className:"media-player-base-title lg-desktop:text-[64px] text-info-primary text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:x}}),k&&e(se,{ref:g,variant:"link",className:s("media-player-base-button member-equity-button-secondary text-info-primary"),onClick:()=>{S(!0),o&&o?.()},children:k})]}),l("div",{className:"media-cover left-0 top-0 h-screen w-screen overflow-hidden",style:{height:`${102-T*100}vh`},children:[e(L,{videoRef:d,poster:N?.url||"",src:w?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e(L,{videoRef:d,poster:N?.url||"",src:U?.url||w?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e("div",{ref:Q,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),i&&e("div",{className:s(i&&"pointer-events-none relative box-content block",V),style:i?{height:`${J}px`}:{},ref:W})]}),K&&q&&e(Me,{visible:K,youTubeId:q,onCloseModal:()=>S(!1)})]})});ne.displayName="MediaPlayerBase";var Ke=Te(ne);export{Ke as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";import{Fragment as
|
|
1
|
+
"use client";import{Fragment as R,jsx as e,jsxs as l}from"react/jsx-runtime";import{useState as I,useRef as w,useEffect as _,forwardRef as L,useImperativeHandle as B}from"react";import{useMediaQuery as D}from"react-responsive";import{cn as m}from"../../helpers/utils.js";import{withLayout as q}from"../../shared/Styles.js";import{Heading as k,Text as y,Picture as S,Tabs as O,TabsList as $,TabsTrigger as G,TabsContent as K}from"../../components/index.js";import{useExposure as A}from"../../hooks/useExposure.js";import{Swiper as Q,SwiperSlide as Y}from"swiper/react";import{Autoplay as J}from"swiper/modules";import"swiper/css";const E="media",M="media_scene_switcher",g=3e3,W=({data:t,configuration:r,theme:o})=>{const p=w(null),i=r?.isActive||!1;return A(p,{componentType:E,componentName:M,componentTitle:t?.title,position:(r?.index??0)+1}),l("div",{ref:p,className:m("media-scene-switcher-item rounded-box flex cursor-pointer flex-col overflow-hidden transition-colors","relative text-[#4A4C56]",i?"opacity-100":"opacity-60",{"bg-[#1E2024] text-white":i&&o==="dark","bg-[#EAEAEC] text-[#080A0F]":i&&o==="light"}),onClick:()=>r?.onItemClick?.(r?.index??0),children:[l("div",{className:"media-scene-switcher-item-content laptop:p-[12px] desktop:p-[24px] flex flex-1 items-center justify-between gap-[24px]",children:[l("div",{className:"flex min-w-0 flex-1 flex-col gap-[4px]",children:[e(k,{as:"h6",size:2,className:"text-inherit",html:t?.title}),i&&t?.description&&e(y,{size:2,className:"media-scene-switcher-item-description laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] line-clamp-2 font-bold leading-[1.4]",html:t.description})]}),e("div",{className:m("media-scene-switcher-item-badge border-[1.6px] text-center","laptop:min-w-[36px] desktop:min-w-[42px] laptop:rounded-[16px] desktop:rounded-[14px] laptop:px-[6px] desktop:px-[8px] laptop:pt-[3px] laptop:pb-[4px] desktop:pt-[5px] desktop:pb-[4px]","laptop:text-[14px] desktop:text-[16px] font-bold leading-[1.2]",o==="dark"?"border-[#B5B7BB]":"border-[#4A4C56]",{"!border-[#F5F6F7]":o==="dark"&&i}),children:t?.tag})]}),e("div",{className:m("media-scene-switcher-progress absolute bottom-0 left-0 h-[2px] w-full",{"media-scene-switcher-progress-active":i}),style:{transform:"translate3d(-100%, 0, 0)",background:"#00BEFA",animation:i?`progress-bar ${g}ms ease-out`:"none"}})]})},X=({data:t,configuration:r,theme:o})=>{const p=w(null),i=r?.isActive||!1,n=D({query:"(max-width: 768px)"});A(p,{componentType:E,componentName:M,componentTitle:t?.title,position:(r?.index??0)+1});const x=n&&t?.mobVideoUrl?.url?t.mobVideoUrl.url:t?.videoUrl?.url,a=n&&t?.mobImageUrl?.url?t.mobImageUrl.url:t?.imageUrl?.url,f=a||t?.videoUrl?.thumbnailURL||"";return l("div",{ref:p,className:m("media-scene-switcher-mobile-item rounded-box flex h-full max-w-full flex-col overflow-hidden",{"aiui-dark":o==="dark","bg-[#EAEAEC]":i&&o==="light","bg-[#1E2024]":i&&o==="dark"}),children:[e("div",{className:"media-scene-switcher-mobile-media relative h-[258px] w-full shrink-0 overflow-hidden",children:x?e("video",{src:x,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:f,className:"size-full object-cover"}):a?e(S,{className:"size-full",imgClassName:"size-full object-cover",source:a,alt:t?.title||""}):null}),l("div",{className:m("media-scene-switcher-mobile-bottom text-info-primary flex flex-1 items-start justify-between gap-[8px] p-[16px]",!i&&"bg-container-primary"),children:[l("div",{children:[e("div",{className:"media-scene-switcher-mobile-title line-clamp-3",children:e(k,{as:"h6",size:2,className:"text-inherit",html:t?.title})}),t?.description&&e(y,{size:2,className:"media-scene-switcher-item-description mt-[4px] line-clamp-2 text-[14px] font-bold leading-[1.4]",html:t.description})]}),e("div",{className:m("media-scene-switcher-mobile-badge min-w-[36px] shrink-0 border-[1.6px] text-center","rounded-[16px] px-[6px] pb-[4px] pt-[3px] text-[14px] font-bold leading-[1.2]",o==="dark"?"border-[#B5B7BB]":"border-[#4A4C56]",{"!border-[#F5F6F7]":o==="dark"&&i}),children:t?.tag})]}),e("div",{className:m("media-scene-switcher-progress h-[2px] w-full",{"media-scene-switcher-progress-active":i}),style:{transform:"translate3d(-100%, 0, 0)",background:"#00BEFA",animation:i?`progress-bar ${g}ms ease-out`:"none"}})]})},C=L(({sectionData:t,id:r,className:o="",tabId:p},i)=>{const{title:n,subtitle:x,items:a=[],theme:f="light",layout:v,titleIcon:u}=t,[N,h]=I(0),[c,H]=I(0),U=w(null),b=w(0),z=D({query:"(max-width: 1023px)"});B(i,()=>U.current),_(()=>{if(!(z||a.length===0))return b.current=window.setInterval(()=>{h(s=>(s+1)%a.length)},g),()=>{b.current&&window.clearInterval(b.current)}},[z,a.length]);const j=s=>{h(s),b.current&&window.clearInterval(b.current),b.current=window.setInterval(()=>{h(d=>(d+1)%a.length)},g)};return l("section",{id:r,ref:U,className:m("media-scene-switcher text-info-primary w-full",{"aiui-dark":f==="dark"},o),children:[l("div",{className:"media-scene-switcher-desktop laptop:gap-[40px] laptop:flex hidden w-full items-stretch overflow-hidden",children:[e("div",{className:m("media-scene-switcher-preview rounded-box laptop:h-[560px] relative min-w-0 shrink-0 overflow-hidden","laptop:w-[824px] laptop:flex-none",{"order-1":v==="right"}),children:a.map((s,d)=>{const P=s?.videoUrl?.url,T=s?.imageUrl?.url,V=T||s?.videoUrl?.thumbnailURL||"";return e("div",{className:m("media-scene-switcher-media rounded-box absolute inset-0 hidden size-full overflow-hidden",{"inline-block":d===N}),children:P?e("video",{src:P,playsInline:!0,autoPlay:!0,loop:!0,muted:!0,poster:V,className:"size-full object-cover"}):T?e(S,{className:"size-full",imgClassName:"size-full object-cover",source:T,alt:s?.title||""}):null},s.id||d)})}),l("div",{className:"media-scene-switcher-sidebar laptop:flex-1 flex min-w-0 shrink-0 flex-col justify-between",children:[e("div",{className:"media-scene-switcher-header flex flex-col gap-[16px]",children:l("div",{className:"flex flex-col gap-[4px]",children:[l("div",{className:"flex items-center gap-[8px]",children:[u&&e(S,{source:u.url,alt:u.alt||"title icon",className:"laptop:size-[40px] h-6 shrink-0",imgClassName:"!size-full !object-contain"}),n&&e(k,{as:"h3",html:n,size:4,className:"media-scene-switcher-title text-info-primary text-[#00BEFA]"})]}),x&&e(y,{as:"span",html:x,className:"media-scene-switcher-subtitle laptop:text-[18px] text-[14px] font-bold leading-[1.4] text-[#080A0F]"})]})}),e("div",{className:"media-scene-switcher-list laptop:gap-[24px] flex flex-col",children:a.map((s,d)=>e(W,{data:s,configuration:{index:d,isActive:d===N,onItemClick:j},theme:f},s.id||d))})]})]}),l("div",{className:"media-scene-switcher-mobile laptop:hidden flex flex-col overflow-visible",children:[e("div",{className:"media-scene-switcher-mobile-header flex flex-col gap-[8px]",children:l("div",{className:"flex flex-col gap-[4px]",children:[l("div",{className:"flex items-center gap-[4px]",children:[u&&e(S,{source:u.url,alt:u.alt||"title icon",className:"size-[24px] shrink-0",imgClassName:"!size-full !object-contain"}),n&&e(k,{as:"h2",html:n,size:4,className:"media-scene-switcher-title text-[#00BEFA]"})]}),x&&e(y,{as:"span",html:x,className:"media-scene-switcher-subtitle text-[14px] font-bold leading-[1.4] text-[#080A0F]"})]})}),e("div",{className:"media-scene-switcher-mobile-swiper mt-[24px] overflow-visible",children:e(Q,{onSlideChange:s=>H(s.realIndex),initialSlide:0,modules:[J],loop:a.length>1,autoplay:a.length>1?{delay:g,disableOnInteraction:!1}:!1,spaceBetween:12,breakpoints:{0:{slidesPerView:1},374:{slidesPerView:1.2},768:{slidesPerView:2.3}},watchSlidesProgress:!0,className:"w-full !overflow-visible",children:a.map((s,d)=>e(Y,{className:"!h-auto max-w-full",children:e(X,{data:s,configuration:{index:d,isActive:d===c},theme:f})},s.id||d))},p)})]})]})});C.displayName="SceneSection";const F=L(({className:t="",data:r,id:o},p)=>{const i=r?.isShowTab??!1,n=r?.tabs,x=r?.tabAlign??"left",[a,f]=I(n?.[0]?.id??""),v=w(null);B(p,()=>v.current);const N=n?.find(c=>c.id===a)??r;A(v,{componentType:E,componentName:M,componentTitle:N?.title});const h=`
|
|
2
2
|
@keyframes progress-bar {
|
|
3
3
|
from {
|
|
4
4
|
transform: translate3d(-100%, 0, 0);
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
transform: translate3d(0, 0, 0);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
`;return!
|
|
10
|
+
`;return!i||!n||n.length===0?l(R,{children:[e("style",{children:h}),e(C,{ref:v,sectionData:r,id:o,className:t})]}):l(R,{children:[e("style",{children:h}),e("div",{ref:v,children:l(O,{value:a,onValueChange:f,align:x,children:[e("div",{className:"media-scene-switcher-tabs mb-6",children:e($,{children:n.map(c=>e(G,{value:c.id,children:c.label},c.id))})}),n.map(c=>e(K,{value:c.id,children:e(C,{sectionData:c,className:t,tabId:c.id})},c.id))]})})]})});F.displayName="MediaSceneSwitcher";var ne=q(F,{style:"overflow: hidden;"});export{ne as default};
|
|
@@ -16,7 +16,7 @@ export type TitleType = 'selling-point' | 'primary' | 'secondary';
|
|
|
16
16
|
/** 文本对齐方式 */
|
|
17
17
|
export type TextAlign = 'left' | 'center';
|
|
18
18
|
/** 图片宽度比例(2张图片时) */
|
|
19
|
-
export type TwoImageRatio = '2:3' | '1:1';
|
|
19
|
+
export type TwoImageRatio = '2:3' | '4:6' | '1:1';
|
|
20
20
|
/** 图片宽度比例(3张图片时) */
|
|
21
21
|
export type ThreeImageRatio = '1:1:1';
|
|
22
22
|
export interface ProductCompareProps extends React.HTMLAttributes<HTMLElement> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as x}from"react/jsx-runtime";import{useEffect as
|
|
1
|
+
import{jsx as t,jsxs as x}from"react/jsx-runtime";import{useEffect as P,useRef as z,useState as R}from"react";import{Heading as f,Text as k}from"../../components/index.js";import{cn as l}from"../../helpers/index.js";import{withLayout as C}from"../../shared/Styles.js";import{useContainerGrid as L}from"../../shared/ContainerGridContext.js";function A({children:e,offset:o=800}){const[a,i]=R(!1),p=z(null);return P(()=>{const s=new IntersectionObserver(([d])=>d.isIntersecting&&i(!0),{rootMargin:`${o}px`});return p.current&&s.observe(p.current),()=>s.disconnect()},[o]),t("div",{ref:p,className:"size-full",children:a&&e})}function h({media:e,poster:o,className:a}){return e?.url?e.mimeType?.startsWith("video/")?t("video",{src:e.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,poster:o?.url||"",preload:"metadata",disablePictureInPicture:!0,disableRemotePlayback:!0,className:a,width:e.width,height:e.height}):t("img",{src:e.url,alt:e.alt||"",className:a,width:e.width,height:e.height}):null}function H(e,o,a){return o===2?a==="1:1"?"laptop:flex-[1]":a==="4:6"?e===0?"laptop:flex-[4]":"laptop:flex-[6]":e===0?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]"}function E({data:e,className:o,...a}){const{title:i,titleType:p="primary",titleIcon:s,subtitle:d,subtitleImage:n,textAlign:b="left",products:c=[],twoImageRatio:y="2:3",threeImageRatio:j="1:1:1",theme:v="light"}=e,T=L()?.gridColumns===12,u=b==="center"?"text-center":"text-left laptop:text-left",g=()=>p==="secondary"?3:4,I=()=>i?p==="selling-point"&&s?x("div",{className:l("product-compare-title-wrapper flex items-center gap-[8px]",u==="text-center"?"justify-center":""),children:[t("img",{src:s.url,alt:s.alt||"",className:"product-compare-title-icon laptop:size-[32px] size-[24px]"}),t(f,{as:"h2",size:g(),html:i,className:"product-compare-title",style:{color:"#00BEFA"}})]}):t(f,{as:"h2",size:g(),html:i,className:l("product-compare-title",u)}):null;return x("section",{...a,className:l("product-compare text-info-primary",o,{"aiui-dark":v==="dark"}),children:[I(),d&&t(k,{as:"p",size:2,html:d,className:l("product-compare-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",u)}),n&&t("div",{className:l("product-compare-subtitle-image laptop:mt-[24px] mt-[16px]",u==="text-center"?"flex justify-center":""),children:t("img",{src:n.url,alt:n.alt||"",className:"max-w-full",width:n.width,height:n.height})}),t("div",{className:"product-compare-container tablet:flex-row tablet:flex-nowrap laptop:mt-[32px] mt-[24px] flex w-full flex-col items-stretch gap-[16px]",children:c.map((r,m)=>{const M=m===c.length-1,w=H(m,c.length,y),N=M?"bg-brand-0":"bg-[rgba(0,0,0,0.2)]";return x("div",{className:l("product-compare-item rounded-box relative shrink overflow-hidden",T&&"laptop:h-[560px] h-[240px]",w,{"order-2 tablet:order-1":m===0&&c.length===2,"order-1 tablet:order-2":m===1&&c.length===2}),children:[r.text&&t("div",{className:l("product-compare-label rounded-btn laptop:left-[28px] laptop:top-[28px] laptop:px-[28px] laptop:pb-[14px] laptop:pt-[15px] desktop:left-[32px] desktop:top-[32px] text-badge-foreground absolute left-[16px] top-[16px] z-10 px-[20px] pb-[10px] pt-[11px] font-bold",N),children:t(f,{as:"h6",className:"font-bold",size:1,children:r.text})}),x(A,{offset:1500,children:[t(h,{media:r.media,poster:r.poster,className:"product-compare-media laptop:block hidden size-full object-cover"}),t(h,{media:r.mobMedia?r.mobMedia:r.media,poster:r.mobPoster?r.mobPoster:r.poster,className:"product-compare-media-mobile laptop:hidden block size-full object-cover"})]})]},m)})})]})}var O=C(E);export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as t,jsxs as
|
|
1
|
+
"use client";import{jsx as t,jsxs as c}from"react/jsx-runtime";import N,{useRef as v,useImperativeHandle as H}from"react";import{Heading as u,Button as P,Picture as T,Text as w}from"../../components/index.js";import{cn as a}from"../../helpers/utils.js";import{withLayout as y}from"../../shared/Styles.js";import{useContainerGrid as R}from"../../shared/ContainerGridContext.js";import{useExposure as L}from"../../hooks/useExposure.js";import{useTracking as C}from"../../hooks/useTracking.js";import{trackUrlRef as D}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as E}from"../../shared/track.js";const i="image",l="product_hero",d=N.forwardRef(({data:m,className:f},h)=>{const{title:o,subtitle:e,ctaText:r,poster:x,mobPoster:b,ctaLink:p,theme:_="light"}=m,s=v(null),{buildRef:g}=C(),k=R(),n=m.gridVariant??(k?.gridColumns===12?"12":"10");return L(s,{componentType:i,componentName:l,componentTitle:o,componentDescription:e}),H(h,()=>s.current),c("section",{ref:s,"data-ui-component-id":"ProductHero",className:a("product-hero text-info-primary laptop:flex-row desktop:gap-[48px] lg-desktop:gap-[64px] flex w-full flex-col items-center justify-between gap-[32px]",{"aiui-dark":_==="dark"},f),children:[c("div",{className:a("product-hero__content lg-desktop:gap-[32px] flex w-full flex-col items-start gap-[24px]",n==="12"?"laptop:basis-5/12":"laptop:basis-2/5"),children:[c("div",{className:"product-hero__text",children:[t(u,{as:"h3",size:4,html:o,className:"product-hero__title"}),t(u,{as:"h4",size:2,html:e,className:"product-hero__subtitle product-hero__subtitle--desktop desktop:mt-[8px] laptop:block mt-[4px] hidden"}),t(w,{as:"p",size:2,html:e,className:"product-hero__subtitle product-hero__subtitle--mobile desktop:mt-[8px] laptop:hidden mt-[4px] block"})]}),r&&t("a",{href:p?D(p,g(i,l)):void 0,className:"product-hero__cta-link",...E({interactive:!!p,componentType:i,componentName:l,title:o,description:e,buttonName:r}),children:t(P,{className:"product-hero__cta-button w-fit",children:r})})]}),t(T,{className:a("product-hero__image rounded-box laptop:h-auto laptop:aspect-[824/640] h-[360px] w-full shrink",n==="12"?"laptop:basis-7/12 lg-desktop:aspect-[964/640]":"laptop:basis-3/5 lg-desktop:aspect-[824/560]"),source:`${x?.url}, ${b?.url} 768`,imgClassName:"h-full object-cover"})]})});d.displayName="ProductHero";var q=y(d);export{q as default};
|