@anker-in/headless-ui 1.3.84-alpha.1794205997922 → 1.3.85

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.
Files changed (75) hide show
  1. package/CONTRIBUTING.md +0 -57
  2. package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
  3. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +0 -2
  4. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  5. package/dist/cjs/biz-components/BrandEquity/types.d.ts +0 -2
  6. package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
  7. package/dist/cjs/biz-components/Chat/button.js +1 -1
  8. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  9. package/dist/cjs/biz-components/ImageWithText/types.d.ts +2 -8
  10. package/dist/cjs/biz-components/ImageWithText/types.js +1 -1
  11. package/dist/cjs/biz-components/Ksp/index.d.ts +0 -2
  12. package/dist/cjs/biz-components/Ksp/index.js +1 -1
  13. package/dist/cjs/biz-components/MarqueeReview/index.js +1 -1
  14. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  15. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  16. package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
  17. package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
  18. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  19. package/dist/cjs/biz-components/ProductHero/types.d.ts +0 -2
  20. package/dist/cjs/biz-components/ProductHero/types.js +1 -1
  21. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  22. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  23. package/dist/cjs/biz-components/Specs/dropdown.js +2 -1
  24. package/dist/cjs/biz-components/Specs/index.js +1 -1
  25. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  26. package/dist/cjs/components/link.js +1 -1
  27. package/dist/cjs/hooks/useDraggableScroll.js +1 -1
  28. package/dist/cjs/hooks/useExposure.d.ts +1 -1
  29. package/dist/cjs/hooks/useExposure.js +1 -1
  30. package/dist/cjs/hooks/useViewItemList.d.ts +1 -1
  31. package/dist/cjs/index.d.ts +0 -2
  32. package/dist/cjs/index.js +1 -1
  33. package/dist/cjs/shared/Styles.d.ts +0 -2
  34. package/dist/cjs/shared/Styles.js +1 -1
  35. package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
  36. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +0 -2
  37. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  38. package/dist/esm/biz-components/BrandEquity/types.d.ts +0 -2
  39. package/dist/esm/biz-components/Chat/button.js +1 -1
  40. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  41. package/dist/esm/biz-components/ImageWithText/types.d.ts +2 -8
  42. package/dist/esm/biz-components/Ksp/index.d.ts +0 -2
  43. package/dist/esm/biz-components/Ksp/index.js +1 -1
  44. package/dist/esm/biz-components/MarqueeReview/index.js +1 -1
  45. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  46. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  47. package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
  48. package/dist/esm/biz-components/ProductCompare/index.js +1 -1
  49. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  50. package/dist/esm/biz-components/ProductHero/types.d.ts +0 -2
  51. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  52. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  53. package/dist/esm/biz-components/Specs/dropdown.js +2 -1
  54. package/dist/esm/biz-components/Specs/index.js +1 -1
  55. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  56. package/dist/esm/components/link.js +1 -1
  57. package/dist/esm/hooks/useDraggableScroll.js +1 -1
  58. package/dist/esm/hooks/useExposure.d.ts +1 -1
  59. package/dist/esm/hooks/useExposure.js +1 -1
  60. package/dist/esm/hooks/useViewItemList.d.ts +1 -1
  61. package/dist/esm/index.d.ts +0 -2
  62. package/dist/esm/index.js +1 -1
  63. package/dist/esm/shared/Styles.d.ts +0 -2
  64. package/dist/esm/shared/Styles.js +1 -1
  65. package/package.json +2 -5
  66. package/style.css +130 -247
  67. package/tailwind.config.js +0 -5
  68. package/dist/cjs/shared/ContainerGridContext.d.ts +0 -20
  69. package/dist/cjs/shared/ContainerGridContext.js +0 -1
  70. package/dist/cjs/shared/mediaGridSpec.d.ts +0 -87
  71. package/dist/cjs/shared/mediaGridSpec.js +0 -1
  72. package/dist/esm/shared/ContainerGridContext.d.ts +0 -20
  73. package/dist/esm/shared/ContainerGridContext.js +0 -1
  74. package/dist/esm/shared/mediaGridSpec.d.ts +0 -87
  75. package/dist/esm/shared/mediaGridSpec.js +0 -1
@@ -1 +1 @@
1
- "use strict";var g=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var A=(e,r)=>{for(var o in r)g(e,o,{get:r[o],enumerable:!0})},H=(e,r,o,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of C(r))!L.call(e,a)&&a!==o&&g(e,a,{get:()=>r[a],enumerable:!(i=k(r,a))||i.enumerable});return e};var E=e=>H(g({},"__esModule",{value:!0}),e);var V={};A(V,{default:()=>S});module.exports=E(V);var t=require("react/jsx-runtime"),c=require("react"),n=require("../../components/index.js"),p=require("../../helpers/index.js"),y=require("../../shared/Styles.js"),v=require("../../shared/ContainerGridContext.js");function j({children:e,offset:r=800}){const[o,i]=(0,c.useState)(!1),a=(0,c.useRef)(null);return(0,c.useEffect)(()=>{const s=new IntersectionObserver(([x])=>x.isIntersecting&&i(!0),{rootMargin:`${r}px`});return a.current&&s.observe(a.current),()=>s.disconnect()},[r]),(0,t.jsx)("div",{ref:a,className:"size-full",children:o&&e})}function b({media:e,poster:r,className:o}){return e?.url?e.mimeType?.startsWith("video/")?(0,t.jsx)("video",{src:e.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,poster:r?.url||"",preload:"metadata",disablePictureInPicture:!0,disableRemotePlayback:!0,className:o,width:e.width,height:e.height}):(0,t.jsx)("img",{src:e.url,alt:e.alt||"",className:o,width:e.width,height:e.height}):null}function D(e,r,o){return r===2?o==="1:1"?"laptop:flex-[1]":o==="4:6"?e===0?"laptop:flex-[4]":"laptop:flex-[6]":e===0?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]"}function B({data:e,className:r,...o}){const{title:i,titleType:a="primary",titleIcon:s,subtitle:x,subtitleImage:m,textAlign:T="left",products:d=[],twoImageRatio:I="2:3",threeImageRatio:F="1:1:1",theme:M="light"}=e,w=(0,v.useContainerGrid)()?.gridColumns===12,f=T==="center"?"text-center":"text-left laptop:text-left",h=()=>a==="secondary"?3:4,N=()=>i?a==="selling-point"&&s?(0,t.jsxs)("div",{className:(0,p.cn)("product-compare-title-wrapper flex items-center gap-[8px]",f==="text-center"?"justify-center":""),children:[(0,t.jsx)("img",{src:s.url,alt:s.alt||"",className:"product-compare-title-icon laptop:size-[32px] size-[24px]"}),(0,t.jsx)(n.Heading,{as:"h2",size:h(),html:i,className:"product-compare-title",style:{color:"#00BEFA"}})]}):(0,t.jsx)(n.Heading,{as:"h2",size:h(),html:i,className:(0,p.cn)("product-compare-title",f)}):null;return(0,t.jsxs)("section",{...o,className:(0,p.cn)("product-compare text-info-primary",r,{"aiui-dark":M==="dark"}),children:[N(),x&&(0,t.jsx)(n.Text,{as:"p",size:2,html:x,className:(0,p.cn)("product-compare-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",f)}),m&&(0,t.jsx)("div",{className:(0,p.cn)("product-compare-subtitle-image laptop:mt-[24px] mt-[16px]",f==="text-center"?"flex justify-center":""),children:(0,t.jsx)("img",{src:m.url,alt:m.alt||"",className:"max-w-full",width:m.width,height:m.height})}),(0,t.jsx)("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:d.map((l,u)=>{const P=u===d.length-1,z=D(u,d.length,I),R=P?"bg-brand-0":"bg-[rgba(0,0,0,0.2)]";return(0,t.jsxs)("div",{className:(0,p.cn)("product-compare-item rounded-box relative shrink overflow-hidden",w&&"laptop:h-[560px] h-[240px]",z,{"order-2 tablet:order-1":u===0&&d.length===2,"order-1 tablet:order-2":u===1&&d.length===2}),children:[l.text&&(0,t.jsx)("div",{className:(0,p.cn)("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",R),children:(0,t.jsx)(n.Heading,{as:"h6",className:"font-bold",size:1,children:l.text})}),(0,t.jsxs)(j,{offset:1500,children:[(0,t.jsx)(b,{media:l.media,poster:l.poster,className:"product-compare-media laptop:block hidden size-full object-cover"}),(0,t.jsx)(b,{media:l.mobMedia?l.mobMedia:l.media,poster:l.mobPoster?l.mobPoster:l.poster,className:"product-compare-media-mobile laptop:hidden block size-full object-cover"})]})]},u)})})]})}var S=(0,y.withLayout)(B);
1
+ "use strict";var g=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var L=(e,a)=>{for(var r in a)g(e,r,{get:a[r],enumerable:!0})},C=(e,a,r,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let o of z(a))!k.call(e,o)&&o!==r&&g(e,o,{get:()=>a[o],enumerable:!(i=R(a,o))||i.enumerable});return e};var A=e=>C(g({},"__esModule",{value:!0}),e);var B={};L(B,{default:()=>D});module.exports=A(B);var t=require("react/jsx-runtime"),c=require("react"),n=require("../../components/index.js"),p=require("../../helpers/index.js"),y=require("../../shared/Styles.js");function E({children:e,offset:a=800}){const[r,i]=(0,c.useState)(!1),o=(0,c.useRef)(null);return(0,c.useEffect)(()=>{const s=new IntersectionObserver(([x])=>x.isIntersecting&&i(!0),{rootMargin:`${a}px`});return o.current&&s.observe(o.current),()=>s.disconnect()},[a]),(0,t.jsx)("div",{ref:o,className:"size-full",children:r&&e})}function h({media:e,poster:a,className:r}){return e?.url?e.mimeType?.startsWith("video/")?(0,t.jsx)("video",{src:e.url,playsInline:!0,autoPlay:!0,muted:!0,loop:!0,poster:a?.url||"",preload:"metadata",disablePictureInPicture:!0,disableRemotePlayback:!0,className:r,width:e.width,height:e.height}):(0,t.jsx)("img",{src:e.url,alt:e.alt||"",className:r,width:e.width,height:e.height}):null}function H(e,a,r){return a===2?r==="1:1"?"laptop:flex-[1]":e===0?"laptop:flex-[2]":"laptop:flex-[3]":"laptop:flex-[1]"}function j({data:e,className:a,...r}){const{title:i,titleType:o="primary",titleIcon:s,subtitle:x,subtitleImage:m,textAlign:T="left",products:d=[],twoImageRatio:v="2:3",threeImageRatio:S="1:1:1",theme:w="light"}=e,f=T==="center"?"text-center":"text-left laptop:text-left",b=()=>o==="secondary"?3:4,I=()=>i?o==="selling-point"&&s?(0,t.jsxs)("div",{className:(0,p.cn)("product-compare-title-wrapper flex items-center gap-[8px]",f==="text-center"?"justify-center":""),children:[(0,t.jsx)("img",{src:s.url,alt:s.alt||"",className:"product-compare-title-icon laptop:size-[32px] size-[24px]"}),(0,t.jsx)(n.Heading,{as:"h2",size:b(),html:i,className:"product-compare-title",style:{color:"#00BEFA"}})]}):(0,t.jsx)(n.Heading,{as:"h2",size:b(),html:i,className:(0,p.cn)("product-compare-title",f)}):null;return(0,t.jsxs)("section",{...r,className:(0,p.cn)("product-compare text-info-primary",a,{"aiui-dark":w==="dark"}),children:[I(),x&&(0,t.jsx)(n.Text,{as:"p",size:2,html:x,className:(0,p.cn)("product-compare-subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",f)}),m&&(0,t.jsx)("div",{className:(0,p.cn)("product-compare-subtitle-image laptop:mt-[24px] mt-[16px]",f==="text-center"?"flex justify-center":""),children:(0,t.jsx)("img",{src:m.url,alt:m.alt||"",className:"max-w-full",width:m.width,height:m.height})}),(0,t.jsx)("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:d.map((l,u)=>{const M=u===d.length-1,N=H(u,d.length,v),P=M?"bg-brand-0":"bg-[rgba(0,0,0,0.2)]";return(0,t.jsxs)("div",{className:(0,p.cn)("product-compare-item rounded-box relative shrink overflow-hidden",N,{"order-2 tablet:order-1":u===0&&d.length===2,"order-1 tablet:order-2":u===1&&d.length===2}),children:[l.text&&(0,t.jsx)("div",{className:(0,p.cn)("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",P),children:(0,t.jsx)(n.Heading,{as:"h6",className:"font-bold",size:1,children:l.text})}),(0,t.jsxs)(E,{offset:1500,children:[(0,t.jsx)(h,{media:l.media,poster:l.poster,className:"product-compare-media laptop:block hidden size-full object-cover"}),(0,t.jsx)(h,{media:l.mobMedia?l.mobMedia:l.media,poster:l.mobPoster?l.mobPoster:l.poster,className:"product-compare-media-mobile laptop:hidden block w-full"})]})]},u)})})]})}var D=(0,y.withLayout)(j);
@@ -1 +1 @@
1
- "use strict";"use client";var L=Object.create;var l=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var E=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var B=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},x=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let p of D(e))!z.call(t,p)&&p!==r&&l(t,p,{get:()=>e[p],enumerable:!(a=C(e,p))||a.enumerable});return t};var M=(t,e,r)=>(r=t!=null?L(E(t)):{},x(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),j=t=>x(l({},"__esModule",{value:!0}),t);var V={};B(V,{default:()=>I});module.exports=j(V);var o=require("react/jsx-runtime"),i=M(require("react")),s=require("../../components/index.js"),c=require("../../helpers/utils.js"),_=require("../../shared/Styles.js"),g=require("../../shared/ContainerGridContext.js"),k=require("../../hooks/useExposure.js"),N=require("../../hooks/useTracking.js"),v=require("../../shared/trackUrlRef.js"),H=require("../../shared/track.js");const d="image",f="product_hero",b=i.default.forwardRef(({data:t,className:e},r)=>{const{title:a,subtitle:p,ctaText:m,poster:P,mobPoster:T,ctaLink:n,theme:w="light"}=t,u=(0,i.useRef)(null),{buildRef:y}=(0,N.useTracking)(),R=(0,g.useContainerGrid)(),h=t.gridVariant??(R?.gridColumns===12?"12":"10");return(0,k.useExposure)(u,{componentType:d,componentName:f,componentTitle:a,componentDescription:p}),(0,i.useImperativeHandle)(r,()=>u.current),(0,o.jsxs)("section",{ref:u,"data-ui-component-id":"ProductHero",className:(0,c.cn)("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":w==="dark"},e),children:[(0,o.jsxs)("div",{className:(0,c.cn)("product-hero__content lg-desktop:gap-[32px] flex w-full flex-col items-start gap-[24px]",h==="12"?"laptop:basis-5/12":"laptop:basis-2/5"),children:[(0,o.jsxs)("div",{className:"product-hero__text",children:[(0,o.jsx)(s.Heading,{as:"h3",size:4,html:a,className:"product-hero__title"}),(0,o.jsx)(s.Heading,{as:"h4",size:2,html:p,className:"product-hero__subtitle product-hero__subtitle--desktop desktop:mt-[8px] laptop:block mt-[4px] hidden"}),(0,o.jsx)(s.Text,{as:"p",size:2,html:p,className:"product-hero__subtitle product-hero__subtitle--mobile desktop:mt-[8px] laptop:hidden mt-[4px] block"})]}),m&&(0,o.jsx)("a",{href:n?(0,v.trackUrlRef)(n,y(d,f)):void 0,className:"product-hero__cta-link",...(0,H.buildClickTrackingProps)({interactive:!!n,componentType:d,componentName:f,title:a,description:p,buttonName:m}),children:(0,o.jsx)(s.Button,{className:"product-hero__cta-button w-fit",children:m})})]}),(0,o.jsx)(s.Picture,{className:(0,c.cn)("product-hero__image rounded-box laptop:h-auto laptop:aspect-[824/640] h-[360px] w-full shrink",h==="12"?"laptop:basis-7/12 lg-desktop:aspect-[964/640]":"laptop:basis-3/5 lg-desktop:aspect-[824/560]"),source:`${P?.url}, ${T?.url} 768`,imgClassName:"h-full object-cover"})]})});b.displayName="ProductHero";var I=(0,_.withLayout)(b);
1
+ "use strict";"use client";var w=Object.create;var l=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var r in e)l(t,r,{get:e[r],enumerable:!0})},f=(t,e,r,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of R(e))!D.call(t,a)&&a!==r&&l(t,a,{get:()=>e[a],enumerable:!(p=y(e,a))||p.enumerable});return t};var z=(t,e,r)=>(r=t!=null?w(L(t)):{},f(e||!t||!t.__esModule?l(r,"default",{value:t,enumerable:!0}):r,t)),B=t=>f(l({},"__esModule",{value:!0}),t);var j={};E(j,{default:()=>M});module.exports=B(j);var o=require("react/jsx-runtime"),i=z(require("react")),s=require("../../components/index.js"),h=require("../../helpers/utils.js"),x=require("../../shared/Styles.js"),_=require("../../hooks/useExposure.js"),k=require("../../hooks/useTracking.js"),N=require("../../shared/trackUrlRef.js"),g=require("../../shared/track.js");const u="image",d="product_hero",b=i.default.forwardRef(({data:t,className:e},r)=>{const{title:p,subtitle:a,ctaText:c,poster:v,mobPoster:H,ctaLink:m,theme:P="light"}=t,n=(0,i.useRef)(null),{buildRef:T}=(0,k.useTracking)();return(0,_.useExposure)(n,{componentType:u,componentName:d,componentTitle:p,componentDescription:a}),(0,i.useImperativeHandle)(r,()=>n.current),(0,o.jsxs)("section",{ref:n,"data-ui-component-id":"ProductHero",className:(0,h.cn)("product-hero text-info-primary tablet:flex-row tablet:gap-[16px] lg-desktop:gap-[64px] flex w-full flex-col items-center justify-between gap-[32px]",{"aiui-dark":P==="dark"},e),children:[(0,o.jsxs)("div",{className:"product-hero__content tablet:basis-[42%] laptop:basis-[36%] flex w-full flex-col items-start gap-[24px]",children:[(0,o.jsxs)("div",{className:"product-hero__text",children:[(0,o.jsx)(s.Heading,{as:"h3",size:4,html:p,className:"product-hero__title"}),(0,o.jsx)(s.Heading,{as:"h4",size:2,html:a,className:"product-hero__subtitle product-hero__subtitle--desktop laptop:mt-[12px] laptop:block desktop:mt-[16px] mt-[4px] hidden"}),(0,o.jsx)(s.Text,{as:"p",size:2,html:a,className:"product-hero__subtitle product-hero__subtitle--mobile laptop:mt-[12px] laptop:hidden desktop:mt-[16px] mt-[4px] block"})]}),c&&(0,o.jsx)("a",{href:m?(0,N.trackUrlRef)(m,T(u,d)):void 0,className:"product-hero__cta-link",...(0,g.buildClickTrackingProps)({interactive:!!m,componentType:u,componentName:d,title:p,description:a,buttonName:c}),children:(0,o.jsx)(s.Button,{className:"product-hero__cta-button w-fit",children:c})})]}),(0,o.jsx)(s.Picture,{className:"product-hero__image tablet:aspect-[824/640] tablet:basis-[58%] laptop:basis-[64%] rounded-box aspect-[358/360] shrink",source:`${v?.url}, ${H?.url} 768`,imgClassName:"h-full object-cover"})]})});b.displayName="ProductHero";var M=(0,x.withLayout)(b);
@@ -17,8 +17,6 @@ export interface ProductHeroProps {
17
17
  modelSrc?: string;
18
18
  /** 主题,默认 light */
19
19
  theme?: Theme;
20
- /** 栅格变体:'10'(默认)内容/图片=40%/60%;'12' 内容/图片=5/12 / 7/12。决定内部比例与图片尺寸。 */
21
- gridVariant?: '10' | '12';
22
20
  };
23
21
  /** 自定义类名 */
24
22
  className?: string;
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of n(t))!m.call(e,r)&&r!==a&&s(e,r,{get:()=>t[r],enumerable:!(i=o(t,r))||i.enumerable});return e};var d=e=>p(s({},"__esModule",{value:!0}),e);var g={};module.exports=d(g);
1
+ "use strict";var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of m(t))!n.call(e,r)&&r!==o&&s(e,r,{get:()=>t[r],enumerable:!(i=a(t,r))||i.enumerable});return e};var c=e=>p(s({},"__esModule",{value:!0}),e);var d={};module.exports=c(d);
@@ -1 +1 @@
1
- "use strict";"use client";var W=Object.create;var R=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var Z=(n,l)=>{for(var c in l)R(n,c,{get:l[c],enumerable:!0})},z=(n,l,c,g)=>{if(l&&typeof l=="object"||typeof l=="function")for(let d of K(l))!X.call(n,d)&&d!==c&&R(n,d,{get:()=>l[d],enumerable:!(g=J(l,d))||g.enumerable});return n};var ee=(n,l,c)=>(c=n!=null?W(Q(n)):{},z(l||!n||!n.__esModule?R(c,"default",{value:n,enumerable:!0}):c,n)),te=n=>z(R({},"__esModule",{value:!0}),n);var re={};Z(re,{default:()=>ne});module.exports=te(re);var t=require("react/jsx-runtime"),s=require("react"),C=require("../../helpers/utils.js"),D=require("../../shared/Styles.js"),x=require("../../components/index.js"),j=require("../../hooks/useExposure.js"),Y=require("../../hooks/useTracking.js"),G=require("../../shared/trackUrlRef.js"),y=require("../../shared/track.js"),H=ee(require("@radix-ui/react-popover"));const S="navigation",$="product_nav",A=n=>n.anchorId??n.id??"",oe=n=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,t.jsx)("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),L=(0,s.forwardRef)(({className:n="",data:l,id:c,onAnchorClick:g,scrollOffsetExtra:d=0},O)=>{const{tabLinks:f=[],anchorList:a=[],textLink:p,buyBtn:u,theme:V="light"}=l||{},{buildRef:_}=(0,Y.useTracking)(),v=(e,o,r=1)=>({href:(0,G.trackUrlRef)(e,_(S,$)),"data-headless-type-name":`${S}#${$}`,"data-headless-title-desc-button":`##${(0,y.toPlainTrackingText)(o)}`,"data-headless-nav-position":`${(0,y.toPlainTrackingText)(o)}#${r}`}),[q,T]=(0,s.useState)(""),w=(0,s.useRef)(null),N=(0,s.useRef)(!1),k=(0,s.useRef)(""),b=(0,s.useRef)(null),M=(0,s.useRef)(new Map);(0,s.useImperativeHandle)(O,()=>w.current),(0,j.useExposure)(w,{componentType:S,componentName:$,componentTitle:[...f.map(e=>e.label),...a.map(e=>e.label)].join(" | "),componentDescription:u?.text??p?.text??""});const E=(0,s.useCallback)(()=>{if(a.length===0)return;const e=window.scrollY;window.scrollTo({top:0,behavior:"instant"}),requestAnimationFrame(()=>{const o=new Map;a.forEach(r=>{const i=A(r),m=document.getElementById(i);if(m){const P=m.getBoundingClientRect();o.set(i,P.top+window.scrollY)}}),M.current=o,window.scrollTo({top:e,behavior:"instant"})})},[a]);(0,s.useEffect)(()=>{if(a.length===0)return;const e=setTimeout(E,100);return()=>clearTimeout(e)},[a,E]),(0,s.useEffect)(()=>{if(a.length===0)return;let e=null;const o=new ResizeObserver(()=>{e&&clearTimeout(e),e=setTimeout(E,150)});return o.observe(document.body),()=>{o.disconnect(),e&&clearTimeout(e)}},[a,E]),(0,s.useEffect)(()=>{if(a.length===0)return;const e=()=>{if(N.current){b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{N.current=!1,k.current&&(T(k.current),k.current="")},100);return}const r=w.current?.offsetHeight||0,i=window.scrollY+r+d+10;let m="";const P=M.current;for(let h=a.length-1;h>=0;h--){const U=a[h],I=A(U),B=P.get(I);if(B!==void 0&&i>=B){m=I;break}}if(!m&&a.length>0){const h=P.get(A(a[0]));h!==void 0&&i<h&&(m="")}T(m)},o=setTimeout(()=>{e()},200);return window.addEventListener("scroll",e,{passive:!0}),()=>{clearTimeout(o),window.removeEventListener("scroll",e),b.current&&clearTimeout(b.current)}},[a,d]),(0,s.useEffect)(()=>{const e=document.querySelectorAll(".header"),o=[];return e.forEach(r=>{const i=r;o.push({element:i,originalPosition:i.style.position||getComputedStyle(i).position}),i.style.position="relative"}),()=>{o.forEach(({element:r,originalPosition:i})=>{r.style.position=i==="static"?"":i})}},[]);const F=(e,o)=>{e.preventDefault();const r=M.current.get(o);if(r===void 0){console.warn(`Cached position for "${o}" not found`);return}T(o),k.current=o,N.current=!0;const i=w.current?.offsetHeight||0,m=r-i-d;window.scrollTo({top:m,behavior:"smooth"}),window.history.pushState(null,"",`#${o}`)};return(0,t.jsxs)("div",{id:c,ref:w,className:(0,C.cn)("product-nav text-info-primary bg-info-white tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] !sticky top-0 !z-[51] flex w-full justify-between overflow-hidden px-4 py-0",{"aiui-dark":V==="dark"},n),children:[(0,t.jsxs)("div",{className:"product-nav-main desktop:flex-row desktop:gap-[32px] lg-desktop:gap-[48px] flex w-full flex-col justify-start",children:[(0,t.jsxs)("div",{className:"product-nav-header laptop:w-full desktop:w-fit desktop:gap-[24px] desktop:py-0 flex w-full flex-row items-center justify-between gap-[16px] py-[6px]",children:[(0,t.jsxs)("div",{className:"product-nav-tabs flex flex-row items-center gap-[8px]",children:[f.map((e,o)=>(0,t.jsxs)("div",{className:"product-nav-tab-item flex items-center gap-[8px]",children:[(0,t.jsx)("a",{...v(e.link,e.label,f.indexOf(e)+1),className:(0,C.cn)("product-nav-tab-link hover:text-brand-color desktop:text-[16px] lg-desktop:text-[18px] text-nowrap text-[14px] font-bold tracking-[-0.04em]",{"text-info-tertiary":o!==0,"hidden desktop:block":o===1}),children:(0,t.jsx)("span",{children:e.label})}),o!==f.length-1&&(0,t.jsx)("div",{className:"product-nav-tab-divider desktop:inline-block bg-lines hidden h-[14px] w-px"})]},e.link||o)),f.length>1&&(0,t.jsxs)(H.Root,{children:[(0,t.jsx)(H.Trigger,{asChild:!0,children:(0,t.jsx)("button",{className:"product-nav-dropdown-trigger desktop:hidden -ml-1 inline-block","aria-label":"More products",children:(0,t.jsx)(oe,{className:"text-info-primary"})})}),(0,t.jsx)(H.Content,{className:"product-nav-dropdown-content border-lines bg-info-white rounded-[6px] border p-[6px] px-[8px] py-[4px]",style:{boxShadow:"0px 4px 8px 0px rgba(0,0,0,0.12)"},side:"bottom",align:"end",alignOffset:10,sideOffset:10,children:f.slice(1).map(e=>(0,t.jsx)("a",{...v(e.link,e.label,f.indexOf(e)+1),className:"product-nav-dropdown-link hover:text-brand-color text-nowrap",children:(0,t.jsx)("span",{children:e.label})},e.link))})]})]}),(0,t.jsxs)("div",{className:"product-nav-mobile-actions desktop:hidden desktop:gap-[24px] flex items-center gap-[16px]",children:[p?.link&&(0,t.jsx)("a",{...v(p.link,p.text),target:p.target||"_self",className:"product-nav-text-link hover:text-brand-color cursor-pointer",children:(0,t.jsx)(x.Text,{size:2,className:"text-nowrap",children:p.text})}),u?.link&&(0,t.jsx)(x.Button,{as:"a",...v(u.link,u.text),size:"sm",className:"product-nav-buy-button text-nowrap",children:u.text})]})]}),(0,t.jsx)("div",{className:"product-nav-anchors laptop:w-fit desktop:gap-[24px] desktop:py-[8px] flex w-full items-center gap-[16px] overflow-x-scroll py-[6px] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:a.map((e,o)=>{const r=A(e);return(0,t.jsxs)("a",{href:`#${r}`,className:"product-nav-anchor-link","data-headless-type-name":`${S}#${$}`,"data-headless-title-desc-button":`##${(0,y.toPlainTrackingText)(e.label)}`,"data-headless-nav-position":`${(0,y.toPlainTrackingText)(e.label)}#${o+1}`,onClick:i=>{g?(i.preventDefault(),T(r),k.current=r,N.current=!0,g(e,o)):F(i,r)},children:[(0,t.jsx)(x.Text,{size:2,className:"product-nav-anchor-text text-nowrap",children:e.label}),(0,t.jsx)("div",{className:(0,C.cn)("product-nav-anchor-indicator laptop:top-[12px] desktop:top-[10px] relative top-[12px] h-[4px] w-full bg-transparent",{"!bg-brand-0":q===r})})]},r)})})]}),(0,t.jsxs)("div",{className:"product-nav-desktop-actions desktop:flex desktop:gap-[24px] desktop:py-[8px] hidden items-center gap-[16px]",children:[p?.link&&(0,t.jsx)("a",{...v(p.link,p.text),target:p.target||"_self",className:"product-nav-text-link hover:text-brand-color text-info-primary cursor-pointer",children:(0,t.jsx)(x.Text,{size:2,className:"text-nowrap",children:p.text})}),u?.link&&(0,t.jsx)(x.Button,{as:"a",...v(u.link,u.text),size:"sm",className:"product-nav-buy-button text-nowrap",children:u.text})]})]})});L.displayName="ProductNav";var ne=(0,D.withLayout)(L);
1
+ "use strict";"use client";var W=Object.create;var R=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,X=Object.prototype.hasOwnProperty;var Z=(n,l)=>{for(var p in l)R(n,p,{get:l[p],enumerable:!0})},L=(n,l,p,g)=>{if(l&&typeof l=="object"||typeof l=="function")for(let d of K(l))!X.call(n,d)&&d!==p&&R(n,d,{get:()=>l[d],enumerable:!(g=J(l,d))||g.enumerable});return n};var ee=(n,l,p)=>(p=n!=null?W(Q(n)):{},L(l||!n||!n.__esModule?R(p,"default",{value:n,enumerable:!0}):p,n)),te=n=>L(R({},"__esModule",{value:!0}),n);var re={};Z(re,{default:()=>ne});module.exports=te(re);var t=require("react/jsx-runtime"),s=require("react"),C=require("../../helpers/utils.js"),z=require("../../shared/Styles.js"),f=require("../../components/index.js"),j=require("../../hooks/useExposure.js"),Y=require("../../hooks/useTracking.js"),F=require("../../shared/trackUrlRef.js"),y=require("../../shared/track.js"),M=ee(require("@radix-ui/react-popover"));const S="navigation",$="product_nav",A=n=>n.anchorId??n.id??"",oe=n=>(0,t.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...n,children:(0,t.jsx)("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),B=(0,s.forwardRef)(({className:n="",data:l,id:p,onAnchorClick:g,scrollOffsetExtra:d=0},G)=>{const{tabLinks:v=[],anchorList:a=[],textLink:c,buyBtn:u,theme:O="light"}=l||{},{buildRef:V}=(0,Y.useTracking)(),x=(e,o,r=1)=>({href:(0,F.trackUrlRef)(e,V(S,$)),"data-headless-type-name":`${S}#${$}`,"data-headless-title-desc-button":`##${(0,y.toPlainTrackingText)(o)}`,"data-headless-nav-position":`${(0,y.toPlainTrackingText)(o)}#${r}`}),[_,T]=(0,s.useState)(""),w=(0,s.useRef)(null),N=(0,s.useRef)(!1),k=(0,s.useRef)(""),b=(0,s.useRef)(null),D=(0,s.useRef)(new Map);(0,s.useImperativeHandle)(G,()=>w.current),(0,j.useExposure)(w,{componentType:S,componentName:$,componentTitle:[...v.map(e=>e.label),...a.map(e=>e.label)].join(" | "),componentDescription:u?.text??c?.text??""});const E=(0,s.useCallback)(()=>{if(a.length===0)return;const e=window.scrollY;window.scrollTo({top:0,behavior:"instant"}),requestAnimationFrame(()=>{const o=new Map;a.forEach(r=>{const i=A(r),m=document.getElementById(i);if(m){const P=m.getBoundingClientRect();o.set(i,P.top+window.scrollY)}}),D.current=o,window.scrollTo({top:e,behavior:"instant"})})},[a]);(0,s.useEffect)(()=>{if(a.length===0)return;const e=setTimeout(E,100);return()=>clearTimeout(e)},[a,E]),(0,s.useEffect)(()=>{if(a.length===0)return;let e=null;const o=new ResizeObserver(()=>{e&&clearTimeout(e),e=setTimeout(E,150)});return o.observe(document.body),()=>{o.disconnect(),e&&clearTimeout(e)}},[a,E]),(0,s.useEffect)(()=>{if(a.length===0)return;const e=()=>{if(N.current){b.current&&clearTimeout(b.current),b.current=setTimeout(()=>{N.current=!1,k.current&&(T(k.current),k.current="")},100);return}const r=w.current?.offsetHeight||0,i=window.scrollY+r+d+10;let m="";const P=D.current;for(let h=a.length-1;h>=0;h--){const U=a[h],H=A(U),I=P.get(H);if(I!==void 0&&i>=I){m=H;break}}if(!m&&a.length>0){const h=P.get(A(a[0]));h!==void 0&&i<h&&(m="")}T(m)},o=setTimeout(()=>{e()},200);return window.addEventListener("scroll",e,{passive:!0}),()=>{clearTimeout(o),window.removeEventListener("scroll",e),b.current&&clearTimeout(b.current)}},[a,d]),(0,s.useEffect)(()=>{const e=document.querySelectorAll(".header"),o=[];return e.forEach(r=>{const i=r;o.push({element:i,originalPosition:i.style.position||getComputedStyle(i).position}),i.style.position="relative"}),()=>{o.forEach(({element:r,originalPosition:i})=>{r.style.position=i==="static"?"":i})}},[]);const q=(e,o)=>{e.preventDefault();const r=D.current.get(o);if(r===void 0){console.warn(`Cached position for "${o}" not found`);return}T(o),k.current=o,N.current=!0;const i=w.current?.offsetHeight||0,m=r-i-d;window.scrollTo({top:m,behavior:"smooth"}),window.history.pushState(null,"",`#${o}`)};return(0,t.jsxs)("div",{id:p,ref:w,className:(0,C.cn)("product-nav text-info-primary bg-container-primary tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] !sticky top-0 !z-[51] flex w-full justify-between overflow-hidden px-4 py-0",{"aiui-dark":O==="dark"},n),children:[(0,t.jsxs)("div",{className:"product-nav-main desktop:flex-row desktop:gap-[48px] flex w-full flex-col justify-start",children:[(0,t.jsxs)("div",{className:"product-nav-header laptop:w-full desktop:w-fit desktop:gap-[24px] desktop:py-0 flex w-full flex-row items-center justify-between gap-[16px] pt-[14px]",children:[(0,t.jsxs)("div",{className:"product-nav-tabs flex flex-row items-center gap-[8px]",children:[v.map((e,o)=>(0,t.jsxs)("div",{className:"product-nav-tab-item flex items-center gap-[8px]",children:[(0,t.jsx)("a",{...x(e.link,e.label,v.indexOf(e)+1),className:(0,C.cn)("product-nav-tab-link hover:text-brand-color text-nowrap text-[14px] font-bold tracking-[-0.04em]",{"text-[#6D6D6F]":o!==0,"hidden desktop:block":o===1}),children:(0,t.jsx)("span",{children:e.label})}),o!==v.length-1&&(0,t.jsx)("div",{className:"product-nav-tab-divider desktop:inline-block hidden h-[14px] w-px bg-[#E4E5E6]"})]},e.link||o)),v.length>1&&(0,t.jsxs)(M.Root,{children:[(0,t.jsx)(M.Trigger,{asChild:!0,children:(0,t.jsx)("button",{className:"product-nav-dropdown-trigger desktop:hidden -ml-1 inline-block","aria-label":"More products",children:(0,t.jsx)(oe,{className:"text-[#1D1D1F]"})})}),(0,t.jsx)(M.Content,{className:"product-nav-dropdown-content rounded-[6px] border border-[#E4E5E6] bg-white p-[6px] px-[8px] py-[4px]",style:{boxShadow:"0px 4px 8px 0px rgba(0,0,0,0.12)"},side:"bottom",align:"end",alignOffset:10,sideOffset:10,children:v.slice(1).map(e=>(0,t.jsx)("a",{...x(e.link,e.label,v.indexOf(e)+1),className:"product-nav-dropdown-link hover:text-brand-color text-nowrap",children:(0,t.jsx)("span",{children:e.label})},e.link))})]})]}),(0,t.jsxs)("div",{className:"product-nav-mobile-actions desktop:hidden desktop:gap-[24px] flex items-center gap-[16px]",children:[c?.link&&(0,t.jsx)("a",{...x(c.link,c.text),target:c.target||"_self",className:"product-nav-text-link hover:text-brand-color cursor-pointer",children:(0,t.jsx)(f.Text,{size:2,className:"text-nowrap",children:c.text})}),u?.link&&(0,t.jsx)(f.Button,{as:"a",...x(u.link,u.text),size:"sm",className:"product-nav-buy-button text-nowrap",children:u.text})]})]}),(0,t.jsx)("div",{className:"product-nav-anchors laptop:w-fit desktop:gap-[24px] desktop:py-[8px] flex w-full items-center gap-[16px] overflow-x-scroll py-[12px] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:a.map((e,o)=>{const r=A(e);return(0,t.jsxs)("a",{href:`#${r}`,className:"product-nav-anchor-link","data-headless-type-name":`${S}#${$}`,"data-headless-title-desc-button":`##${(0,y.toPlainTrackingText)(e.label)}`,"data-headless-nav-position":`${(0,y.toPlainTrackingText)(e.label)}#${o+1}`,onClick:i=>{g?(i.preventDefault(),T(r),k.current=r,N.current=!0,g(e,o)):q(i,r)},children:[(0,t.jsx)(f.Text,{size:2,className:"product-nav-anchor-text text-nowrap",children:e.label}),(0,t.jsx)("div",{className:(0,C.cn)("product-nav-anchor-indicator laptop:top-[12px] desktop:top-[10px] relative top-[12px] h-[4px] w-full bg-transparent",{"!bg-brand-0":_===r})})]},r)})})]}),(0,t.jsxs)("div",{className:"product-nav-desktop-actions desktop:flex desktop:gap-[24px] desktop:py-[8px] hidden items-center gap-[16px]",children:[c?.link&&(0,t.jsx)(f.Link,{...x(c.link,c.text),target:c.target||"_self",className:"product-nav-text-link no-underline",children:(0,t.jsx)(f.Text,{size:2,className:"text-nowrap",children:c.text})}),u?.link&&(0,t.jsx)(f.Button,{as:"a",...x(u.link,u.text),size:"sm",className:"product-nav-buy-button text-nowrap",children:u.text})]})]})});B.displayName="ProductNav";var ne=(0,z.withLayout)(B);
@@ -1 +1 @@
1
- "use strict";"use client";var he=Object.create;var x=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Be=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Me=(i,t)=>{for(var e in t)x(i,e,{get:t[e],enumerable:!0})},j=(i,t,e,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of ve(t))!Ie.call(i,c)&&c!==e&&x(i,c,{get:()=>t[c],enumerable:!(d=Te(t,c))||d.enumerable});return i};var h=(i,t,e)=>(e=i!=null?he(Be(i)):{},j(t||!i||!i.__esModule?x(e,"default",{value:i,enumerable:!0}):e,i)),Se=i=>j(x({},"__esModule",{value:!0}),i);var Le={};Me(Le,{default:()=>Ce,secondaryBannerVariants:()=>U});module.exports=Se(Le);var n=require("react/jsx-runtime"),u=h(require("react")),J=require("class-variance-authority"),C=require("react-responsive"),L=h(require("jump.js")),o=require("../../helpers/index.js"),a=require("../../components/index.js"),q=require("../../shared/Styles.js"),F=h(require("../Media/index.js")),W=require("../AiuiProvider/index.js"),G=require("../../hooks/useExposure.js"),g=require("../../shared/trackUrlRef.js"),b=require("../../shared/track.js"),Q=h(require("./SecondaryBannerCarousel.js"));const T="secondary_banner",U=(0,J.cva)("text-info-primary relative w-full",{variants:{size:{sm:"tablet:aspect-[768/480] laptop:aspect-[1024/480] desktop:aspect-[1440/480] lg-desktop:aspect-[1920/480] aspect-[390/480]",base:"tablet:aspect-[768/660] laptop:aspect-[1024/432] desktop:aspect-[1440/576] lg-desktop:aspect-[1920/720] aspect-[390/660]",lg:"tablet:aspect-[768/660] laptop:aspect-[1024/520] desktop:aspect-[1440/700] lg-desktop:aspect-[1920/930] aspect-[390/660]",xlg:"tablet:aspect-[768/1320] laptop:aspect-[1024/864] desktop:aspect-[1440/1152] lg-desktop:aspect-[1920/1440] aspect-[390/1440] overflow-visible"}},defaultVariants:{size:"base"}}),$=u.forwardRef(({className:i,classNames:t={},data:e,jumpOptions:d={},isActive:c,a11yLabels:K,trackExposure:X=!0,frameIndex:v,...z},m)=>{const{pcImage:Y,padImage:Z,mobileImage:ee,isVideoLoop:te,endDate:N,endDate_tz:ne,dateFormat:ie,size:oe,iconArray:B,theme:ae,primaryButton:s,secondaryButton:r,title:y,titleTag:se}=e,re=te??!0,I=oe??"base",le=ae??"light",pe=se??"h2",{locale:R="us",pageHandle:ce}=(0,W.useAiuiContext)(),me=(0,C.useMediaQuery)({query:"(max-width: 767px)"}),de=(0,C.useMediaQuery)({query:"(min-width: 768px) and (max-width: 1024px)"}),D=me?e.mobileImage:de?e.padImage??e.pcImage:e.pcImage,f=(0,b.resolveComponentMediaType)(D?.mimeType==="video/mp4"),_=v??1,A=`${(0,g.buildTrackingRef)(ce??"",f,T)}${v===void 0?"":`_${v}`}`,M=D?.id||e.pcImage?.id||"",H=u.useRef(null),ue=u.useCallback(l=>{H.current=l,typeof m=="function"?m(l):m&&(m.current=l)},[m]),ge=u.useRef(null);(0,G.useExposure)(X?H:ge,{componentType:f,componentName:T,componentTitle:y?.trim()||"",componentDescription:e.subtitle?.trim()||"",position:1,creativeId:M});const be=!!(r?.link||typeof r?.onClick=="function"),ye=!!(s?.link||typeof s?.onClick=="function"),E=r?.link&&!r.link.startsWith("#")?(0,g.trackUrlRef)((0,o.getLocalizedPath)(r.link,R),A):void 0,w=s?.link&&!s.link.startsWith("#")?(0,g.trackUrlRef)((0,o.getLocalizedPath)(s.link,R),A):void 0,fe=(0,b.buildClickTrackingProps)({interactive:be,componentType:f,componentName:T,title:y,description:e.subtitle,buttonName:r?.text,position:_,creativeId:M}),ke=(0,b.buildClickTrackingProps)({interactive:ye,componentType:f,componentName:T,title:y,description:e.subtitle,buttonName:s?.text,position:_,creativeId:M}),O={...{duration:500,offset:0},...d},S=u.useId(),k=y?`${S}-title`:void 0,P=e.subtitle?`${S}-subtitle`:void 0,V=e.superTitle?`${S}-super-title`:void 0,xe=[V,P].filter(Boolean).join(" ")||void 0;return e.items&&e.items.length>0?(0,n.jsx)(Q.default,{data:e,className:i,classNames:t,jumpOptions:d,a11yLabels:K,ref:m,...z}):(0,n.jsxs)("section",{ref:ue,role:"banner","aria-labelledby":k,"aria-describedby":xe,className:(0,o.cn)({"aiui-dark":le==="dark"},U({size:I}),i,t?.root),...z,children:[(0,n.jsx)("div",{className:(0,o.cn)("absolute inset-0",{"h-fit":I==="xlg"}),children:(0,n.jsx)(F.default,{pcImage:Y,padImage:Z,mobileImage:ee,className:"size-full",imgClassName:"object-cover",videoClassName:"object-cover",muted:!0,loop:re,playsInline:!0,autoPlay:c??!0})}),(0,n.jsxs)("div",{className:(0,o.cn)("banner-content laptop:top-[min(50%,50vh)] laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] absolute top-12 z-10 flex flex-col items-start justify-center px-[16px] text-left",t?.content),children:[(0,n.jsxs)("div",{className:"banner-inner-title desktop:gap-2 flex flex-col items-start gap-1",children:[e.superTitle&&(0,n.jsx)(a.Text,{as:"p",size:2,id:V,className:(0,o.cn)("banner-super-title desktop:text-[16px] lg-desktop:text-[18px]",t?.superTitle),html:e.superTitle}),e.title&&(0,n.jsx)(a.Heading,{as:pe,size:["xlg","lg"].includes(I)?5:4,id:k,className:(0,o.cn)("banner-title ",t?.title),html:e.title}),e.subtitle&&(0,n.jsx)(a.Text,{as:"p",size:2,id:P,className:(0,o.cn)("banner-subtitle desktop:text-[16px] lg-desktop:text-[18px]",t?.subtitle),html:e.subtitle})]}),N&&(0,n.jsx)("div",{className:"banner-countdown",children:(0,n.jsx)(a.Countdown,{endDate:N,endDate_tz:ne,dateFormat:ie,variant:"spacious",className:"lg-desktop:mt-8 lg-desktop:[&_.time-block]:size-12 lg-desktop:[&_.time-block]:p-1 lg-desktop:[&_.separator]:text-2xl mt-6 [&_.separator]:text-xl [&_.time-block]:size-10 [&_.time-block]:p-[2px]"})}),(0,n.jsxs)("div",{className:(0,o.cn)("banner-cta-group lg-desktop:mt-[32px] lg-desktop:gap-3 mt-6 flex gap-2",t?.buttonGroup),children:[r?.text&&(0,n.jsx)(a.Button,{variant:"secondary",onClick:l=>{if(r.link?.startsWith("#")){l.preventDefault();const p=document.querySelector(r.link);p&&(0,L.default)(p,O)}r.onClick?.()},className:(0,o.cn)("",t?.secondaryButton),"aria-describedby":k,...E?{as:"a",href:E}:{},...fe,children:r.text}),s?.text&&(0,n.jsx)(a.Button,{onClick:l=>{if(s.link?.startsWith("#")){l.preventDefault();const p=document.querySelector(s.link);p&&(0,L.default)(p,O)}s.onClick?.()},className:(0,o.cn)("",t?.primaryButton),"aria-describedby":k,...w?{as:"a",href:w}:{},...ke,children:s.text})]}),Array.isArray(B)&&B.length>0&&(0,n.jsx)("div",{className:"banner-icons desktop:mt-3 lg-desktop:mt-4 mt-2 flex items-center gap-2",role:"group","aria-label":"brand icons",children:B.map((l,p)=>l.pcImage?(0,n.jsx)(a.Picture,{source:l.pcImage.url,alt:l.pcImage.alt||`icon ${p+1}`,role:"img",className:"lg-desktop:h-auto h-[48px] max-w-none",imgClassName:"h-full"},p):null)})]})]})});$.displayName="SecondaryBanner";var Ce=(0,q.withLayout)($);
1
+ "use strict";"use client";var he=Object.create;var k=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var Be=Object.getPrototypeOf,Ie=Object.prototype.hasOwnProperty;var Me=(i,t)=>{for(var e in t)k(i,e,{get:t[e],enumerable:!0})},j=(i,t,e,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of ve(t))!Ie.call(i,c)&&c!==e&&k(i,c,{get:()=>t[c],enumerable:!(d=Te(t,c))||d.enumerable});return i};var h=(i,t,e)=>(e=i!=null?he(Be(i)):{},j(t||!i||!i.__esModule?k(e,"default",{value:i,enumerable:!0}):e,i)),Se=i=>j(k({},"__esModule",{value:!0}),i);var Le={};Me(Le,{default:()=>Ce,secondaryBannerVariants:()=>U});module.exports=Se(Le);var n=require("react/jsx-runtime"),u=h(require("react")),J=require("class-variance-authority"),C=require("react-responsive"),L=h(require("jump.js")),o=require("../../helpers/index.js"),a=require("../../components/index.js"),q=require("../../shared/Styles.js"),F=h(require("../Media/index.js")),W=require("../AiuiProvider/index.js"),G=require("../../hooks/useExposure.js"),g=require("../../shared/trackUrlRef.js"),b=require("../../shared/track.js"),Q=h(require("./SecondaryBannerCarousel.js"));const T="secondary_banner",U=(0,J.cva)("text-info-primary relative w-full",{variants:{size:{sm:"tablet:aspect-[768/480] laptop:aspect-[1024/480] desktop:aspect-[1440/480] lg-desktop:aspect-[1920/480] aspect-[390/480]",base:"tablet:aspect-[768/660] laptop:aspect-[1024/432] desktop:aspect-[1440/576] lg-desktop:aspect-[1920/720] aspect-[390/660]",lg:"tablet:aspect-[768/660] laptop:aspect-[1024/520] desktop:aspect-[1440/700] lg-desktop:aspect-[1920/930] aspect-[390/660]",xlg:"tablet:aspect-[768/1320] laptop:aspect-[1024/864] desktop:aspect-[1440/1152] lg-desktop:aspect-[1920/1440] aspect-[390/1440] overflow-visible"}},defaultVariants:{size:"base"}}),$=u.forwardRef(({className:i,classNames:t={},data:e,jumpOptions:d={},isActive:c,a11yLabels:K,trackExposure:X=!0,frameIndex:v,...z},m)=>{const{pcImage:Y,padImage:Z,mobileImage:ee,isVideoLoop:te,endDate:N,endDate_tz:ne,dateFormat:ie,size:oe,iconArray:B,theme:ae,primaryButton:s,secondaryButton:r,title:y,titleTag:se}=e,re=te??!0,I=oe??"base",le=ae??"light",pe=se??"h2",{locale:R="us",pageHandle:ce}=(0,W.useAiuiContext)(),me=(0,C.useMediaQuery)({query:"(max-width: 767px)"}),de=(0,C.useMediaQuery)({query:"(min-width: 768px) and (max-width: 1024px)"}),D=me?e.mobileImage:de?e.padImage??e.pcImage:e.pcImage,f=(0,b.resolveComponentMediaType)(D?.mimeType==="video/mp4"),A=v??1,H=`${(0,g.buildTrackingRef)(ce??"",f,T)}${v===void 0?"":`_${v}`}`,M=D?.id||e.pcImage?.id||"",E=u.useRef(null),ue=u.useCallback(l=>{E.current=l,typeof m=="function"?m(l):m&&(m.current=l)},[m]),ge=u.useRef(null);(0,G.useExposure)(X?E:ge,{componentType:f,componentName:T,componentTitle:y?.trim()||"",componentDescription:e.subtitle?.trim()||"",position:1,creativeId:M});const be=!!(r?.link||typeof r?.onClick=="function"),ye=!!(s?.link||typeof s?.onClick=="function"),w=r?.link&&!r.link.startsWith("#")?(0,g.trackUrlRef)((0,o.getLocalizedPath)(r.link,R),H):void 0,O=s?.link&&!s.link.startsWith("#")?(0,g.trackUrlRef)((0,o.getLocalizedPath)(s.link,R),H):void 0,fe=(0,b.buildClickTrackingProps)({interactive:be,componentType:f,componentName:T,title:y,description:e.subtitle,buttonName:r?.text,position:A,creativeId:M}),xe=(0,b.buildClickTrackingProps)({interactive:ye,componentType:f,componentName:T,title:y,description:e.subtitle,buttonName:s?.text,position:A,creativeId:M}),P={...{duration:500,offset:0},...d},S=u.useId(),x=y?`${S}-title`:void 0,V=e.subtitle?`${S}-subtitle`:void 0,_=e.superTitle?`${S}-super-title`:void 0,ke=[_,V].filter(Boolean).join(" ")||void 0;return e.items&&e.items.length>0?(0,n.jsx)(Q.default,{data:e,className:i,classNames:t,jumpOptions:d,a11yLabels:K,ref:m,...z}):(0,n.jsxs)("section",{ref:ue,role:"banner","aria-labelledby":x,"aria-describedby":ke,className:(0,o.cn)({"aiui-dark":le==="dark"},U({size:I}),i,t?.root),...z,children:[(0,n.jsx)("div",{className:(0,o.cn)("absolute inset-0",{"h-fit":I==="xlg"}),children:(0,n.jsx)(F.default,{pcImage:Y,padImage:Z,mobileImage:ee,className:"size-full",imgClassName:"object-cover",videoClassName:"object-cover",muted:!0,loop:re,playsInline:!0,autoPlay:c??!0})}),(0,n.jsxs)("div",{className:(0,o.cn)("banner-content laptop:top-[min(50%,50vh)] laptop:-translate-y-1/2 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] absolute top-12 z-10 flex flex-col items-start justify-center px-[16px] text-left",t?.content),children:[(0,n.jsxs)("div",{className:"banner-inner-title desktop:gap-2 flex flex-col items-start gap-1",children:[e.superTitle&&(0,n.jsx)(a.Text,{as:"p",size:2,id:_,className:(0,o.cn)("banner-super-title desktop:text-[16px] lg-desktop:text-[18px]",t?.superTitle),html:e.superTitle}),e.title&&(0,n.jsx)(a.Heading,{as:pe,size:["xlg","lg"].includes(I)?5:4,id:x,className:(0,o.cn)("banner-title ",t?.title),html:e.title}),e.subtitle&&(0,n.jsx)(a.Text,{as:"p",size:3,id:V,className:(0,o.cn)("banner-subtitle desktop:text-[16px] lg-desktop:text-[18px]",t?.subtitle),html:e.subtitle})]}),N&&(0,n.jsx)("div",{className:"banner-countdown",children:(0,n.jsx)(a.Countdown,{endDate:N,endDate_tz:ne,dateFormat:ie,variant:"spacious",className:"lg-desktop:mt-8 mt-6"})}),(0,n.jsxs)("div",{className:(0,o.cn)("banner-cta-group lg-desktop:mt-[32px] lg-desktop:gap-3 mt-6 flex gap-2",t?.buttonGroup),children:[r?.text&&(0,n.jsx)(a.Button,{variant:"secondary",onClick:l=>{if(r.link?.startsWith("#")){l.preventDefault();const p=document.querySelector(r.link);p&&(0,L.default)(p,P)}r.onClick?.()},className:(0,o.cn)("",t?.secondaryButton),"aria-describedby":x,...w?{as:"a",href:w}:{},...fe,children:r.text}),s?.text&&(0,n.jsx)(a.Button,{onClick:l=>{if(s.link?.startsWith("#")){l.preventDefault();const p=document.querySelector(s.link);p&&(0,L.default)(p,P)}s.onClick?.()},className:(0,o.cn)("",t?.primaryButton),"aria-describedby":x,...O?{as:"a",href:O}:{},...xe,children:s.text})]}),Array.isArray(B)&&B.length>0&&(0,n.jsx)("div",{className:"banner-icons desktop:mt-3 lg-desktop:mt-4 mt-2 flex items-center gap-2",role:"group","aria-label":"brand icons",children:B.map((l,p)=>l.pcImage?(0,n.jsx)(a.Picture,{source:l.pcImage.url,alt:l.pcImage.alt||`icon ${p+1}`,role:"img",className:"laptop:h-auto h-[48px] max-w-none",imgClassName:"h-full"},p):null)})]})]})});$.displayName="SecondaryBanner";var Ce=(0,q.withLayout)($);
@@ -1 +1,2 @@
1
- "use strict";var u=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var D=(n,e)=>{for(var t in e)u(n,t,{get:e[t],enumerable:!0})},k=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of v(e))!w.call(n,r)&&r!==t&&u(n,r,{get:()=>e[r],enumerable:!(a=b(e,r))||a.enumerable});return n};var h=n=>k(u({},"__esModule",{value:!0}),n);var E={};D(E,{default:()=>C});module.exports=h(E);var i=require("react/jsx-runtime"),d=require("react"),f=require("../../helpers/index.js");const x="openDropDown",g=({index:n,active:e,list:t,setActive:a,setVisible:r,visible:p,resolveName:m})=>{const y=(0,d.useRef)(null);return(0,d.useEffect)(()=>{const o=s=>{const l=s?.target?.getAttribute?.("class");!y?.current?.contains(s?.target)&&!l?.includes(x)&&r({...p,[n]:!1})};return document.addEventListener("click",o),()=>document.removeEventListener("click",o)},[]),(0,i.jsx)("div",{ref:y,className:(0,f.cn)("specs-dropdown-panel rounded-box-small bg-container-secondary-1 text-info-primary absolute left-0 top-[calc(100%+8px)] z-30 box-border max-h-[340px] w-full overflow-y-auto",p?.[n]?"block":"hidden"),children:(0,i.jsx)("div",{className:"dropdown-wrapper m-0 box-border h-full flex-1 overflow-hidden p-0 [&:last-child]:border-r-0",children:t?.map((o,s)=>{const l=o?.sku||o?.variants?.[0]?.sku,c=m?m(o,l):o?.name||o?.title;return(0,i.jsx)("div",{onClick:()=>{a({...e,[n]:{sku:l,name:c,handle:o?.handle}}),r({...p,[n]:!1})},title:c,className:(0,f.cn)("openDropDown specs-dropdown-option text-info-primary box-border cursor-pointer truncate px-6 py-4 text-base font-bold","[&:hover]:bg-container-primary",o?.handle===e?.handle?"bg-container-primary":""),children:c},s)})})})};var C=g;
1
+ "use strict";var p=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var D=Object.prototype.hasOwnProperty;var h=(e,n)=>{for(var r in n)p(e,r,{get:n[r],enumerable:!0})},k=(e,n,r,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of v(n))!D.call(e,t)&&t!==r&&p(e,t,{get:()=>n[t],enumerable:!(l=m(n,t))||l.enumerable});return e};var w=e=>k(p({},"__esModule",{value:!0}),e);var E={};h(E,{default:()=>g});module.exports=w(E);var c=require("react/jsx-runtime"),i=require("react");const x="openDropDown",y=({index:e,active:n,list:r,setActive:l,setVisible:t,visible:u,resolveName:f})=>{const b=(0,i.useRef)(null);return(0,i.useEffect)(()=>{const o=s=>{const a=s?.target?.getAttribute?.("class");!b?.current?.contains(s?.target)&&!a?.includes(x)&&t({...u,[e]:!1})};return document.addEventListener("click",o),()=>document.removeEventListener("click",o)},[]),(0,c.jsx)("div",{ref:b,className:`absolute left-0 top-[104%] z-30 box-border max-h-[340px] w-full overflow-auto rounded-lg bg-white ${u?.[e]?"block":"hidden"}`,children:(0,c.jsx)("div",{className:"dropdown-wrapper m-0 box-border h-full flex-1 overflow-hidden p-0 [&:last-child]:border-r-0",children:r?.map((o,s)=>{const a=o?.sku||o?.variants?.[0]?.sku,d=f?f(o,a):o?.name||o?.title;return(0,c.jsx)("div",{onClick:()=>{l({...n,[e]:{sku:a,name:d,handle:o?.handle}}),t({...u,[e]:!1})},title:d,className:`openDropDown min-xl:text-lg min-xxl:text-lg box-border cursor-pointer truncate px-6 py-4 text-base font-bold [&:hover]:bg-[#EAEAEC]
2
+ ${o?.handle===n?.handle?"bg-[#EAEAEC]":""}`,children:d},s)})})})};var g=y;
@@ -1 +1 @@
1
- "use strict";"use client";var oe=Object.create;var w=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var ae=Object.getPrototypeOf,le=Object.prototype.hasOwnProperty;var ie=(n,r)=>{for(var d in r)w(n,d,{get:r[d],enumerable:!0})},_=(n,r,d,N)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of re(r))!le.call(n,m)&&m!==d&&w(n,m,{get:()=>r[m],enumerable:!(N=ne(r,m))||N.enumerable});return n};var $=(n,r,d)=>(d=n!=null?oe(ae(n)):{},_(r||!n||!n.__esModule?w(d,"default",{value:n,enumerable:!0}):d,n)),ce=n=>_(w({},"__esModule",{value:!0}),n);var de={};ie(de,{default:()=>pe});module.exports=ce(de);var t=require("react/jsx-runtime"),O=$(require("./dropdown.js")),U=require("../AiuiProvider/index.js"),V=require("react-responsive"),l=require("react"),q=require("../../shared/Styles.js"),B=require("../ShelfDisplay/shelfDisplay.js"),c=require("../../components/index.js"),A=require("../../helpers/index.js"),g=$(require("react"));const I=g.default.forwardRef(({data:n,buildData:r,onChange:d,onSecondaryChange:N,className:m,...z},F)=>{const b=(0,V.useMediaQuery)({query:"(max-width: 768px)"}),[u,M]=(0,l.useState)({}),[S,Q]=(0,l.useState)([]),[v,j]=(0,l.useState)(!1),[y,H]=(0,l.useState)({}),E=(0,g.useRef)(null),{locale:W="us",currencyDisplay:G,trackingData:J,currencyCode:K}=(0,U.useAiuiContext)(),X=J?.showComparePrice??!0,{LeftMenu:P,RightMenu:C,DefaultSelectMenu:k}=(0,l.useMemo)(()=>n?.data||{},[n?.data]),L=(0,l.useMemo)(()=>{const e={};return(Array.isArray(n?.items)?n?.items:[]).forEach(s=>{s?.custom_name&&(s?.sku&&(e[s.sku]=s.custom_name),s?.handle&&(e[s.handle]=s.custom_name))}),e},[n?.items]),D=(0,l.useCallback)((e,o)=>L[o||""]||L[e?.handle||""]||e?.name||e?.title||"",[L]),Y=e=>{try{const s=new URL(e).pathname.toLowerCase();return/\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/.test(s)}catch{return/\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/i.test(e)}},Z=(e,o)=>{const s=e?.variants?.find?.(f=>f?.sku===e?.sku),a=s?.coupons?.[0],{price:i,basePrice:p}=(0,B.formatVariantPrice)({locale:K==="CAD"?"us":W||"us",amount:a?a?.variant_price4wscode:s?.price,baseAmount:a?s?.price:0,currencyDisplay:G,currencyCode:e?.price?.currencyCode||"USD"}),x=typeof k?.buttonText=="string"?k?.buttonText:k?.buttonText?.[String(o)]||"";return(0,t.jsxs)("div",{className:"specs-sku-node-wrap box-border",children:[(0,t.jsxs)(c.Text,{as:"div",className:"md-tablet:px-4 md-tablet:py-2.5 md-tablet:text-sm l-tablet:mb-4 l-tablet:text-sm laptop:flex laptop:h-[54px] laptop:flex-col laptop:justify-center laptop:py-0 desktop:px-6 lg-desktop:mb-8 lg-desktop:text-lg openDropDown specs-sku-node-text rounded-box-small border-lines bg-container-secondary-0 text-info-primary relative mb-4 box-border block border px-4 py-3 text-base font-bold",onClick:()=>{if(S?.length<=1)return null;H({...y,[o]:!y?.[o]})},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between overflow-hidden",children:[(0,t.jsx)("div",{className:"openDropDown md-tablet:text-sm lg-desktop:text-lg specs-sku-node-title text-info-primary flex-1 truncate text-base",title:u?.[o]?.name||"",children:u?.[o]?.name||""}),S?.length>1?(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",className:(0,A.cn)("openDropDown specs-sku-node-chevron shrink-0 transition-transform duration-300",y?.[o]?"rotate-180":""),children:(0,t.jsx)("path",{d:"M6 9.5L12 15.5L18 9.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null]}),(0,t.jsx)(O.default,{index:o,list:S,active:u,setActive:M,visible:y,setVisible:H,resolveName:D})]}),(0,t.jsx)("div",{className:"lg-desktop:max-h-[196px] lg-desktop:max-w-[196px] max-h-[138px] max-w-[138px]",children:(0,t.jsx)(c.Picture,{source:s?.image?.url||"",className:"aspect-h-[280] aspect-w-[280]",imgClassName:"w-full h-full object-cover hover:scale-105 transition-all duration-300"})}),(0,t.jsx)("div",{className:"lg-desktop:text-2xl mb-2 mt-6 text-xl font-bold tracking-[-0.04em]",children:(0,t.jsx)("div",{className:"lg-desktop:min-h-[32px] flex min-h-[28px] items-center",children:s?.availableForSale?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"specs-sku-node-price text-info-primary",children:i||""}),X&&p&&(0,t.jsx)("div",{className:"lg-desktop:text-2xl specs-sku-node-base-price text-info-quaternary ml-1 text-xl line-through",children:p})]}):null})}),x?(0,t.jsx)(c.Button,{onClick:()=>{d?.(e,o)},className:"specs-sku-node-button hover:text-info-primary",children:x}):null]})},ee=e=>e&&typeof e!="string"?(0,t.jsxs)("div",{className:"size-full",children:[(0,t.jsx)("p",{className:"desktop:text-base lg-desktop:text-lg specs-normal-node-text text-info-primary text-sm font-bold",dangerouslySetInnerHTML:{__html:e?.text||""}}),(0,t.jsx)(c.Picture,{source:e?.imgUrl,className:"m-auto max-h-[360px] max-w-[360px]",imgClassName:"w-full h-full object-cover"})]}):(0,t.jsx)("div",{className:"break-all",children:Y(e)?(0,t.jsx)(c.Picture,{source:e,className:"m-auto max-h-[360px] max-w-[360px]",imgClassName:"w-full h-full object-cover"}):(0,t.jsx)("p",{className:"desktop:text-base lg-desktop:text-lg specs-normal-node-text text-info-primary text-sm font-bold",dangerouslySetInnerHTML:{__html:e||""}})}),R=e=>e.map(o=>(0,t.jsxs)("div",{className:`l-tablet:flex l-tablet:flex-col border-t-lines specs-product-node-wrap box-border grid w-full cursor-pointer overflow-hidden border-t ${v?"grid-cols-4":"grid-cols-3"}`,children:[(0,t.jsx)(c.Heading,{as:"h3",html:o||"",className:"l-tablet:text-info-quaternary tablet:py-4 laptop:py-6 desktop:p-6 lg-desktop:text-lg specs-product-node-title desktop:text-base mr-2 flex-1 pt-4 text-sm font-bold"}),(0,t.jsx)("div",{className:`l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 specs-product-node-body grid flex-1 py-4 ${v?"col-span-3 grid-cols-3":"col-span-2 grid-cols-2"}`,children:Object.keys(u)?.map?.(s=>{const a=u?.[s],i=C?.menus?.find?.(p=>p?.handle===a?.handle)?.subTitle;return ee(i?.[o])})})]},o)),te=e=>{if(!u)return;const{subTitle:o,isProduct:s}=e;return s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:`l-tablet:flex l-tablet:flex-col specs-content-item-product border-t-lines box-border grid w-full cursor-pointer border-t-0 ${v?"grid-cols-4":"grid-cols-3"}`,children:[e?.title&&(0,t.jsx)(c.Heading,{as:"h3",html:e?.title||"",className:"l-tablet:hidden lg-desktop:text-lg specs-product-node-title specs-item-product-title desktop:text-base text-sm font-bold"}),(0,t.jsx)("div",{className:`l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 specs-item-product-body grid flex-1 pb-4 pr-0 ${v?"col-span-3 grid-cols-3":"col-span-2 grid-cols-2"}`,children:Object.keys(u)?.map((a,i)=>{const p=u?.[a],x=r?.products?.find?.(f=>f?.handle===p?.handle);return(0,t.jsx)("div",{children:Z({...x,item:a,sku:p?.sku},i)},a)})})]}),e?.categoryLabel&&(0,t.jsx)(c.Heading,{size:2,as:"h4",html:e?.categoryLabel||"",className:"desktop:p-6 specs-item-product-category py-6"}),o?.length?R(o):null]}):R(o)};return(0,g.useImperativeHandle)(F,()=>E.current),(0,l.useEffect)(()=>{if(!r?.products?.length)return;const e=k?.sku?.split?.(",")||[],o=b&&e?.length>2?e?.slice(0,2):e;let s={};o?.forEach?.((i,p)=>{const f=C?.menus?.find?.(h=>h?.sku===i)?.handle,T=f?r?.products?.find?.(h=>h?.handle===f):r?.products?.find?.(h=>{if(h?.variants?.find?.(se=>se?.sku===i))return!0});T&&(s={...s,[p]:{sku:i,name:D(T,i),handle:f||T?.handle}})});const a=r?.products?.filter(i=>C?.menus?.find(p=>p?.handle===i?.handle));M(s),Q(a),j(e?.length>2&&!b)},[r,b,D]),(0,l.useEffect)(()=>{if(b){const e=Object.keys(u||{});if(e?.length>2){const o=e?.slice?.(0,2);let s={};o?.forEach?.(a=>{s={...s,[a]:u?.[a]}}),j(!1),M(s)}}},[b]),(0,t.jsx)("div",{...z,className:(0,A.cn)("specs-wrapper w-full overflow-hidden",m),ref:E,children:P?.data?(0,t.jsx)("div",{className:"specs-wrapper-content box-border w-full overflow-hidden",children:P?.data?.map?.((e,o)=>(0,t.jsx)("div",{className:"specs-wrapper-content-item w-full overflow-hidden pt-10 [&:first-child]:pt-0",children:te(e)},o))}):null})});I.displayName="Specs";var pe=(0,q.withLayout)(I);
1
+ "use strict";"use client";var ne=Object.create;var y=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames;var re=Object.getPrototypeOf,le=Object.prototype.hasOwnProperty;var ce=(o,a)=>{for(var d in a)y(o,d,{get:a[d],enumerable:!0})},P=(o,a,d,w)=>{if(a&&typeof a=="object"||typeof a=="function")for(let f of ae(a))!le.call(o,f)&&f!==d&&y(o,f,{get:()=>a[f],enumerable:!(w=oe(a,f))||w.enumerable});return o};var R=(o,a,d)=>(d=o!=null?ne(re(o)):{},P(a||!o||!o.__esModule?y(d,"default",{value:o,enumerable:!0}):d,o)),ie=o=>P(y({},"__esModule",{value:!0}),o);var de={};ce(de,{default:()=>pe});module.exports=ie(de);var t=require("react/jsx-runtime"),I=R(require("./dropdown.js")),$=require("../AiuiProvider/index.js"),O=require("react-responsive"),l=require("react"),U=require("../../shared/Styles.js"),V=require("../ShelfDisplay/shelfDisplay.js"),i=require("../../components/index.js"),B=require("../../helpers/index.js"),b=R(require("react"));const _=b.default.forwardRef(({data:o,buildData:a,onChange:d,onSecondaryChange:w,className:f,...z},q)=>{const g=(0,O.useMediaQuery)({query:"(max-width: 768px)"}),[u,k]=(0,l.useState)({}),[N,Q]=(0,l.useState)([]),[A,E]=(0,l.useState)(!1),[C,T]=(0,l.useState)({}),j=(0,b.useRef)(null),{locale:W="us",currencyDisplay:G,trackingData:J,currencyCode:K}=(0,$.useAiuiContext)(),X=J?.showComparePrice??!0,{LeftMenu:H,RightMenu:M,DefaultSelectMenu:v}=(0,l.useMemo)(()=>o?.data||{},[o?.data]),S=(0,l.useMemo)(()=>{const e={};return(Array.isArray(o?.items)?o?.items:[]).forEach(s=>{s?.custom_name&&(s?.sku&&(e[s.sku]=s.custom_name),s?.handle&&(e[s.handle]=s.custom_name))}),e},[o?.items]),L=(0,l.useCallback)((e,n)=>S[n||""]||S[e?.handle||""]||e?.name||e?.title||"",[S]),Y=e=>{try{const s=new URL(e).pathname.toLowerCase();return/\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/.test(s)}catch{return/\.(jpeg|jpg|gif|png|webp|bmp|svg|tiff)$/i.test(e)}},Z=(e,n)=>{const s=e?.variants?.find?.(m=>m?.sku===e?.sku),r=s?.coupons?.[0],{price:c,basePrice:p}=(0,V.formatVariantPrice)({locale:K==="CAD"?"us":W||"us",amount:r?r?.variant_price4wscode:s?.price,baseAmount:r?s?.price:0,currencyDisplay:G,currencyCode:e?.price?.currencyCode||"USD"}),x=typeof v?.buttonText=="string"?v?.buttonText:v?.buttonText?.[String(n)]||"";return(0,t.jsxs)("div",{className:"specs-sku-node-wrap box-border",children:[(0,t.jsxs)(i.Text,{as:"div",className:"md-tablet:p-2 l-tablet:mb-4 l-tablet:text-sm desktop:px-6 lg-desktop:mb-8 lg-desktop:text-lg openDropDown specs-sku-node-text relative mb-6 box-border block rounded-[50px] border border-[#E4E5E6] bg-[#F5F5F7] px-6 py-4 text-base font-bold",onClick:()=>{if(N?.length<=1)return null;T({...C,[n]:!C?.[n]})},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between overflow-hidden",children:[(0,t.jsx)("div",{className:"openDropDown md-tablet:text-sm lg-desktop:text-lg specs-sku-node-title flex-1 truncate text-base",title:u?.[n]?.name||"",children:u?.[n]?.name||""}),N?.length>1?(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",className:"openDropDown",children:(0,t.jsx)("path",{d:"M6 9.5L12 15.5L18 9.5",stroke:"#1D1D1F",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):null]}),(0,t.jsx)(I.default,{index:n,list:N,active:u,setActive:k,visible:C,setVisible:T,resolveName:L})]}),(0,t.jsx)("div",{className:"lg-desktop:max-h-[196px] lg-desktop:max-w-[196px] max-h-[138px] max-w-[138px]",children:(0,t.jsx)(i.Picture,{source:s?.image?.url||"",className:"aspect-h-[280] aspect-w-[280]",imgClassName:"w-full h-full object-cover hover:scale-105 transition-all duration-300"})}),(0,t.jsx)("div",{className:"lg-desktop:text-2xl mb-2 mt-6 text-xl font-bold",children:(0,t.jsx)("div",{className:"lg-desktop:min-h-[32px] flex min-h-[28px] flex-wrap items-center gap-1",children:s?.availableForSale?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"specs-sku-node-price whitespace-nowrap text-[#080A0F]",children:c||""}),X&&p&&(0,t.jsx)("div",{className:"lg-desktop:text-2xl specs-sku-node-base-price whitespace-nowrap text-xl text-[#86868C] line-through",children:p})]}):null})}),x?(0,t.jsx)(i.Button,{onClick:()=>{d?.(e,n)},className:"specs-sku-node-button",children:x}):null]})},ee=e=>e&&typeof e!="string"?(0,t.jsxs)("div",{className:"size-full",children:[(0,t.jsx)("p",{className:"min-xxl:text-lg specs-normal-node-text text-base font-bold text-[#080A0F] md:text-sm",dangerouslySetInnerHTML:{__html:e?.text||""}}),(0,t.jsx)(i.Picture,{source:e?.imgUrl,className:"l:max-h-[174px] l:max-w-[174px] m-auto max-h-[360px] max-w-[360px]",imgClassName:"w-full h-full object-cover"})]}):(0,t.jsx)("div",{className:"break-all",children:Y(e)?(0,t.jsx)(i.Picture,{source:e,className:"l:max-h-[174px] l:max-w-[174px] m-auto max-h-[360px] max-w-[360px]",imgClassName:"w-full h-full object-cover"}):(0,t.jsx)("p",{className:"min-xxl:text-lg specs-normal-node-text text-base font-bold text-[#080A0F] md:text-sm",dangerouslySetInnerHTML:{__html:e||""}})}),F=e=>e.map((n,s)=>{const r=s===0;return(0,t.jsxs)("div",{className:"l-tablet:flex l-tablet:flex-col box-border grid w-full cursor-pointer grid-cols-3 overflow-hidden border-t border-t-[#E4E5E6] specs-product-node-wrap",children:[(0,t.jsx)(i.Heading,{as:"h3",html:n||"",className:"tablet:py-6 l-tablet:text-[#86868C] desktop:p-6 lg-desktop:text-lg specs-product-node-title mr-4 flex-1 pt-4 text-base font-bold md:text-sm"}),(0,t.jsx)("div",{className:`l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:p-6 lg-desktop:gap-16 grid-cols-${A?3:2} specs-product-node-body col-span-2 grid flex-1 py-6`,children:Object.keys(u)?.map?.(c=>{const p=u?.[c],x=M?.menus?.find?.(m=>m?.handle===p?.handle)?.subTitle;return ee(x?.[n])})})]},n)}),te=e=>{if(!u)return;const{subTitle:n,isProduct:s}=e;return s?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"l-tablet:flex l-tablet:flex-col specs-content-item-product box-border grid w-full cursor-pointer grid-cols-3 border-t-0 border-t-[#E4E5E6]",children:[e?.title&&(0,t.jsx)(i.Heading,{as:"h3",html:e?.title||"",className:"lg-desktop:text-lg desktop:px-6 specs-product-node-title l:hidden specs-item-product-title py-4 text-base font-bold md:text-sm"}),(0,t.jsx)("div",{className:`l-tablet:w-full l-tablet:gap-4 laptop:gap-8 desktop:gap-12 desktop:px-6 desktop:pb-6 lg-desktop:gap-16 grid-cols-${A?3:2} specs-item-product-body col-span-2 grid flex-1 pb-4 pr-0`,children:Object.keys(u)?.map((r,c)=>{const p=u?.[r],x=a?.products?.find?.(m=>m?.handle===p?.handle);return(0,t.jsx)("div",{children:Z({...x,item:r,sku:p?.sku},c)},r)})})]}),e?.categoryLabel&&(0,t.jsx)(i.Heading,{size:2,as:"h4",html:e?.categoryLabel||"",className:"desktop:p-6 specs-item-product-category py-6"}),n?.length?F(n):null]}):F(n)};return(0,b.useImperativeHandle)(q,()=>j.current),(0,l.useEffect)(()=>{if(!a?.products?.length)return;const e=v?.sku?.split?.(",")||[],n=g&&e?.length>2?e?.slice(0,2):e;let s={};n?.forEach?.((c,p)=>{const m=M?.menus?.find?.(h=>h?.sku===c)?.handle,D=m?a?.products?.find?.(h=>h?.handle===m):a?.products?.find?.(h=>{if(h?.variants?.find?.(se=>se?.sku===c))return!0});D&&(s={...s,[p]:{sku:c,name:L(D,c),handle:D?.handle}})});const r=a?.products?.filter(c=>M?.menus?.find(p=>p?.handle===c?.handle));k(s),Q(r),E(e?.length>2&&!g)},[a,g,L]),(0,l.useEffect)(()=>{if(g){const e=Object.keys(u||{});if(e?.length>2){const n=e?.slice?.(0,2);let s={};n?.forEach?.(r=>{s={...s,[r]:u?.[r]}}),E(!1),k(s)}}},[g]),(0,t.jsx)("div",{...z,className:(0,B.cn)("specs-wrapper w-full overflow-hidden",f),ref:j,children:H?.data?(0,t.jsx)("div",{className:"specs-wrapper-content box-border w-full overflow-hidden",children:H?.data?.map?.((e,n)=>(0,t.jsx)("div",{className:"specs-wrapper-content-item w-full overflow-hidden pt-10 [&:first-child]:pt-0",children:te(e)},n))}):null})});_.displayName="Specs";var pe=(0,U.withLayout)(_);
@@ -1 +1 @@
1
- "use strict";"use client";var I=Object.create;var h=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var W=(o,r)=>{for(var a in r)h(o,a,{get:r[a],enumerable:!0})},S=(o,r,a,p)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of $(r))!V.call(o,s)&&s!==a&&h(o,s,{get:()=>r[s],enumerable:!(p=U(r,s))||p.enumerable});return o};var A=(o,r,a)=>(a=o!=null?I(O(o)):{},S(r||!o||!o.__esModule?h(a,"default",{value:o,enumerable:!0}):a,o)),q=o=>S(h({},"__esModule",{value:!0}),o);var K={};W(K,{default:()=>J});module.exports=q(K);var t=require("react/jsx-runtime"),i=A(require("react")),l=require("../../components/index.js"),n=require("../../helpers/utils.js"),L=require("../../shared/Styles.js"),z=require("../../hooks/useExposure.js"),E=require("../AiuiProvider/index.js"),R=require("../../hooks/useTracking.js"),D=require("../../shared/trackUrlRef.js"),f=require("../../shared/track.js"),u=require("swiper/react"),v=require("swiper/modules"),X=require("swiper/css"),Y=require("swiper/css/navigation"),Z=require("swiper/css/pagination"),ee=require("swiper/css/effect-coverflow");const w="carousel",x="three_d_carousel",F=()=>(0,t.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 hover:text-info-primary scale-[70%] text-white",children:[(0,t.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,t.jsx)("path",{d:"M32 20L24 28L32 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),G=()=>(0,t.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 hover:text-info-primary scale-[70%] text-white",children:[(0,t.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,t.jsx)("path",{d:"M24 20L32 28L24 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),C=i.default.forwardRef(({data:o,className:r},a)=>{const{title:p,items:s=[],titleTag:P}=o,g=s.length<6?[...s,...s]:s,c=(0,i.useRef)(null),b=(0,i.useRef)(null),_=(0,i.useRef)(null),[B,H]=i.default.useState(180),{locale:k="us"}=(0,E.useAiuiContext)(),{buildRef:M}=(0,R.useTracking)(),y=e=>e?(0,D.trackUrlRef)((0,n.getLocalizedPath)(e,k),M(w,x)):(0,n.getLocalizedPath)("",k),N=e=>e.buttonLink?{"data-headless-type-name":`${w}#${x}`,"data-headless-title-desc-button":`${(0,f.toPlainTrackingText)(e.title)}#${(0,f.toPlainTrackingText)(e.description)}#${(0,f.toPlainTrackingText)(e.buttonText)}`,"data-headless-nav-position":`#${s.indexOf(e)+1}`}:{};return(0,z.useExposure)(b,{componentType:w,componentName:x,componentTitle:p}),(0,i.useImperativeHandle)(a,()=>b.current),i.default.useEffect(()=>{const e=_.current;if(!e)return;const d=()=>{const j=e.offsetWidth,T=Math.round(j*.125);H(T),c.current?.params?.coverflowEffect&&(c.current.params.coverflowEffect.stretch=T,c.current.update())};d();const m=new ResizeObserver(d);return m.observe(e),()=>m.disconnect()},[]),(0,t.jsxs)("section",{ref:b,"data-ui-component-id":"ThreeDCarousel",className:(0,n.cn)("three-d-carousel laptop:overflow-hidden w-full overflow-visible",r),children:[(0,t.jsx)(l.Heading,{as:P??"h2",size:4,html:p,className:"three-d-carousel__title laptop:text-center text-left"}),(0,t.jsxs)("div",{ref:_,className:"three-d-carousel__desktop laptop:block lg-desktop:max-w-[1648px] relative mx-auto mt-[24px] hidden w-full",children:[(0,t.jsx)(u.Swiper,{onSwiper:e=>c.current=e,centeredSlides:!0,initialSlide:0,loop:!0,loopAdditionalSlides:2,slidesPerView:"auto",spaceBetween:0,grabCursor:!0,modules:[v.EffectCoverflow,v.Navigation],slideToClickedSlide:!0,className:"three-d-carousel__swiper rounded-box relative aspect-[103/30] overflow-visible",effect:"coverflow",coverflowEffect:{rotate:0,stretch:B,depth:300,modifier:1,slideShadows:!0},children:g.map((e,d)=>(0,t.jsx)(u.SwiperSlide,{className:"three-d-carousel__slide relative !w-1/2 cursor-grab overflow-hidden opacity-0 [.swiper-slide-next&]:opacity-100 [.swiper-slide-prev&]:opacity-100 [.swiper-slide-visible&]:opacity-100",children:({isActive:m})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Picture,{source:e.imageUrl?.url||"",alt:e.imageUrl?.alt||e.title,className:(0,n.cn)("three-d-carousel__image rounded-box mx-auto h-full overflow-hidden"),imgClassName:"h-full object-cover",style:{filter:m?"":"brightness(50%) contrast(120%)"}}),(0,t.jsxs)("div",{className:(0,n.cn)("three-d-carousel__image-content tablet:p-[24px] desktop:p-[24px] lg-desktop:p-[32px] text-info-primary absolute left-0 top-0 box-border flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":e.theme==="dark","opacity-0":!m}),children:[(0,t.jsx)(l.Heading,{as:"h3",size:3,html:e.title}),(0,t.jsx)(l.Text,{as:"p",size:4,html:e.description,className:"three-d-carousel__image-description lg-desktop:text-[18px] desktop:text-[16px] text-[14px]"}),e.buttonText&&(0,t.jsx)("a",{href:y(e.buttonLink),...N(e),className:"three-d-carousel__image-link ",children:(0,t.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-button desktop:mt-6 mt-4",children:e.buttonText})})]})]})},d))}),(0,t.jsxs)("div",{className:"three-d-carousel__nav-controls pointer-events-none absolute inset-0 z-20",children:[(0,t.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--prev pointer-events-auto absolute left-[calc(25%-24px)] top-1/2 -translate-x-full -translate-y-1/2",onClick:()=>c.current?.slidePrev(),"aria-label":"Previous slide",children:(0,t.jsx)(F,{})}),(0,t.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--next pointer-events-auto absolute right-[calc(25%-24px)] top-1/2 -translate-y-1/2 translate-x-full",onClick:()=>c.current?.slideNext(),"aria-label":"Next slide",children:(0,t.jsx)(G,{})})]})]}),(0,t.jsx)("div",{className:"three-d-carousel__mobile laptop:hidden mt-[24px] block w-full overflow-visible",children:(0,t.jsx)(u.Swiper,{loop:!0,slidesPerView:"auto",spaceBetween:12,grabCursor:!0,className:"three-d-carousel__swiper-mobile relative w-full !overflow-visible",children:g.map((e,d)=>(0,t.jsxs)(u.SwiperSlide,{className:"three-d-carousel__slide-mobile relative !h-[360px] !w-[296px] cursor-grab overflow-hidden",children:[(0,t.jsx)(l.Picture,{source:e.mobImageUrl?.url||e.imageUrl?.url||"",alt:e.mobImageUrl?.alt||e.title,className:"three-d-carousel__image-mobile rounded-box mx-auto h-full overflow-hidden",imgClassName:"h-full object-cover"}),(0,t.jsxs)("div",{className:(0,n.cn)("three-d-carousel__image-mobile-content text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":e.theme==="dark"}),children:[(0,t.jsx)(l.Heading,{as:"h3",size:3,html:e.title}),(0,t.jsx)(l.Text,{as:"p",size:4,html:e.description,className:"three-d-carousel__image-mobile-description text-[14px]"}),e.buttonText&&(0,t.jsx)("a",{href:y(e.buttonLink),...N(e),className:"three-d-carousel__image-mobile-link ",children:(0,t.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-mobile-button mt-3",children:e.buttonText})})]})]},d))})})]})});C.displayName="ThreeDCarousel";var J=(0,L.withLayout)(C,{style:"overflow: hidden;"});
1
+ "use strict";"use client";var I=Object.create;var f=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var W=(o,r)=>{for(var a in r)f(o,a,{get:r[a],enumerable:!0})},S=(o,r,a,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of $(r))!V.call(o,s)&&s!==a&&f(o,s,{get:()=>r[s],enumerable:!(u=U(r,s))||u.enumerable});return o};var A=(o,r,a)=>(a=o!=null?I(O(o)):{},S(r||!o||!o.__esModule?f(a,"default",{value:o,enumerable:!0}):a,o)),q=o=>S(f({},"__esModule",{value:!0}),o);var K={};W(K,{default:()=>J});module.exports=q(K);var t=require("react/jsx-runtime"),i=A(require("react")),l=require("../../components/index.js"),n=require("../../helpers/utils.js"),L=require("../../shared/Styles.js"),z=require("../../hooks/useExposure.js"),E=require("../AiuiProvider/index.js"),R=require("../../hooks/useTracking.js"),D=require("../../shared/trackUrlRef.js"),h=require("../../shared/track.js"),p=require("swiper/react"),v=require("swiper/modules"),X=require("swiper/css"),Y=require("swiper/css/navigation"),Z=require("swiper/css/pagination"),ee=require("swiper/css/effect-coverflow");const w="carousel",b="three_d_carousel",F=()=>(0,t.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]",children:[(0,t.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,t.jsx)("path",{d:"M32 20L24 28L32 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),G=()=>(0,t.jsxs)("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"three-d-carousel__nav-icon lg-desktop:scale-100 scale-[70%] text-white hover:text-[#1f1f1f]",children:[(0,t.jsx)("circle",{cx:"28",cy:"28",r:"28",fill:"currentColor",fillOpacity:"0.2"}),(0,t.jsx)("path",{d:"M24 20L32 28L24 36",stroke:"white",strokeWidth:"2.66667",strokeLinecap:"round",strokeLinejoin:"round"})]}),C=i.default.forwardRef(({data:o,className:r},a)=>{const{title:u,items:s=[],titleTag:P}=o,g=s.length<4?[...s,...s]:s,c=(0,i.useRef)(null),x=(0,i.useRef)(null),_=(0,i.useRef)(null),[j,B]=i.default.useState(180),{locale:k="us"}=(0,E.useAiuiContext)(),{buildRef:H}=(0,R.useTracking)(),y=e=>e?(0,D.trackUrlRef)((0,n.getLocalizedPath)(e,k),H(w,b)):(0,n.getLocalizedPath)("",k),N=e=>e.buttonLink?{"data-headless-type-name":`${w}#${b}`,"data-headless-title-desc-button":`${(0,h.toPlainTrackingText)(e.title)}#${(0,h.toPlainTrackingText)(e.description)}#${(0,h.toPlainTrackingText)(e.buttonText)}`,"data-headless-nav-position":`#${s.indexOf(e)+1}`}:{};return(0,z.useExposure)(x,{componentType:w,componentName:b,componentTitle:u}),(0,i.useImperativeHandle)(a,()=>x.current),i.default.useEffect(()=>{const e=_.current;if(!e)return;const d=()=>{const M=e.offsetWidth,T=Math.round(M*.125);B(T),c.current?.params?.coverflowEffect&&(c.current.params.coverflowEffect.stretch=T,c.current.update())};d();const m=new ResizeObserver(d);return m.observe(e),()=>m.disconnect()},[]),(0,t.jsxs)("section",{ref:x,"data-ui-component-id":"ThreeDCarousel",className:(0,n.cn)("three-d-carousel laptop:overflow-hidden w-full overflow-visible",r),children:[(0,t.jsx)(l.Heading,{as:P??"h2",size:4,html:u,className:"three-d-carousel__title laptop:text-center text-left"}),(0,t.jsxs)("div",{ref:_,className:"three-d-carousel__desktop laptop:block relative mx-auto mt-[24px] hidden w-full",children:[(0,t.jsx)(p.Swiper,{onSwiper:e=>c.current=e,centeredSlides:!0,initialSlide:0,loop:!0,slidesPerView:"auto",spaceBetween:0,grabCursor:!0,modules:[v.EffectCoverflow,v.Navigation],slideToClickedSlide:!0,className:"three-d-carousel__swiper rounded-box relative aspect-[1386/502] overflow-visible",effect:"coverflow",coverflowEffect:{rotate:0,stretch:j,depth:300,modifier:1,slideShadows:!0},children:g.map((e,d)=>(0,t.jsx)(p.SwiperSlide,{className:"three-d-carousel__slide relative !w-1/2 cursor-grab overflow-hidden opacity-0 [.swiper-slide-active&]:opacity-100 [.swiper-slide-next&]:opacity-100 [.swiper-slide-prev&]:opacity-100",children:({isActive:m})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Picture,{source:e.imageUrl?.url||"",alt:e.imageUrl?.alt||e.title,className:(0,n.cn)("three-d-carousel__image rounded-box mx-auto h-full overflow-hidden"),imgClassName:"h-full object-cover",style:{filter:m?"":"brightness(50%) contrast(120%)"}}),(0,t.jsxs)("div",{className:(0,n.cn)("three-d-carousel__image-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 box-border flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":e.theme==="dark","opacity-0":!m}),children:[(0,t.jsx)(l.Heading,{as:"h2",size:2,html:e.title}),(0,t.jsx)(l.Text,{as:"p",size:4,html:e.description,className:"three-d-carousel__image-description lg-desktop:text-[18px] desktop:text-[16px] text-[14px]"}),e.buttonText&&(0,t.jsx)("a",{href:y(e.buttonLink),...N(e),className:"three-d-carousel__image-link ",children:(0,t.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-button desktop:mt-6 mt-4",children:e.buttonText})})]})]})},d))}),(0,t.jsxs)("div",{className:"three-d-carousel__nav-controls laptop:px-[64px] desktop:px-[140px] lg-desktop:px-[200px] absolute left-1/2 top-1/2 z-20 flex w-full -translate-x-1/2 -translate-y-1/2 justify-between",children:[(0,t.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--prev",onClick:()=>c.current?.slidePrev(),"aria-label":"Previous slide",children:(0,t.jsx)(F,{})}),(0,t.jsx)("button",{className:"three-d-carousel__nav-button three-d-carousel__nav-button--next",onClick:()=>c.current?.slideNext(),"aria-label":"Next slide",children:(0,t.jsx)(G,{})})]})]}),(0,t.jsx)("div",{className:"three-d-carousel__mobile laptop:hidden mt-[24px] block w-full overflow-visible",children:(0,t.jsx)(p.Swiper,{loop:!0,loopAdditionalSlides:1,slidesPerView:"auto",spaceBetween:12,grabCursor:!0,className:"three-d-carousel__swiper-mobile relative w-full !overflow-visible",children:g.map((e,d)=>(0,t.jsxs)(p.SwiperSlide,{className:"three-d-carousel__slide-mobile relative !h-[360px] !w-[296px] cursor-grab overflow-hidden",children:[(0,t.jsx)(l.Picture,{source:e.mobImageUrl?.url||e.imageUrl?.url||"",alt:e.mobImageUrl?.alt||e.title,className:"three-d-carousel__image-mobile rounded-box mx-auto h-full overflow-hidden",imgClassName:"h-full object-cover"}),(0,t.jsxs)("div",{className:(0,n.cn)("three-d-carousel__image-mobile-content tablet:p-[24px] desktop:p-[32px] text-info-primary absolute left-0 top-0 flex size-full flex-col justify-end gap-1 p-[16px]",{"aiui-dark":e.theme==="dark"}),children:[(0,t.jsx)(l.Heading,{as:"h2",size:2,html:e.title}),(0,t.jsx)(l.Text,{as:"p",size:4,html:e.description,className:"three-d-carousel__image-mobile-description text-[14px]"}),e.buttonText&&(0,t.jsx)("a",{href:y(e.buttonLink),...N(e),className:"three-d-carousel__image-mobile-link ",children:(0,t.jsx)(l.Button,{size:"base",variant:"secondary",className:"three-d-carousel__image-mobile-button mt-3",children:e.buttonText})})]})]},d))})})]})});C.displayName="ThreeDCarousel";var J=(0,L.withLayout)(C,{style:"overflow: hidden;"});
@@ -1 +1 @@
1
- "use strict";"use client";var R=Object.create;var s=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var V=(e,t)=>{for(var o in t)s(e,o,{get:t[o],enumerable:!0})},k=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of E(t))!g.call(e,r)&&r!==o&&s(e,r,{get:()=>t[r],enumerable:!(i=L(t,r))||i.enumerable});return e};var b=(e,t,o)=>(o=e!=null?R(N(e)):{},k(t||!e||!e.__esModule?s(o,"default",{value:e,enumerable:!0}):o,e)),S=e=>k(s({},"__esModule",{value:!0}),e);var M={};V(M,{default:()=>w});module.exports=S(M);var n=require("react/jsx-runtime"),l=b(require("react")),d=require("@radix-ui/react-slot"),x=require("../helpers/index.js"),v=require("class-variance-authority");const q=(0,v.cva)("tracking hover:text-brand-0 font-bold underline transition-colors",{variants:{size:{base:"text-text-2",lg:"text-text-3"},variant:{secondary:"text-info-secondary hover:text-info-primary",primary:"text-info-primary hover:text-brand-0"}}}),u=l.default.forwardRef(({children:e,size:t="base",variant:o="primary",className:i,asChild:r=!1,href:m,style:c,disabled:a=!1,suffixIcon:p,onClick:C,...P},h)=>{const f=r&&l.default.isValidElement(e);return(0,n.jsx)(f?d.Slot:"a",{ref:h,onClick:y=>{if(!a&&C?.(y),a||!m){y.preventDefault();return}},href:a?void 0:m,className:(0,x.cn)(q({size:t,variant:o}),i,{"flex items-center":p,"cursor-pointer":!a,"text-info-quaternary cursor-not-allowed hover:text-info-quaternary":a}),...c?{style:c}:null,...P,children:f?e:(0,n.jsxs)(n.Fragment,{children:[e,p&&(0,n.jsx)("span",{className:"svg",children:p})]})})});u.displayName="Link";var w=u;
1
+ "use strict";"use client";var C=Object.create;var p=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var N=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var o in t)p(e,o,{get:t[o],enumerable:!0})},f=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of L(t))!g.call(e,r)&&r!==o&&p(e,r,{get:()=>t[r],enumerable:!(i=R(t,r))||i.enumerable});return e};var b=(e,t,o)=>(o=e!=null?C(N(e)):{},f(t||!e||!e.__esModule?p(o,"default",{value:e,enumerable:!0}):o,e)),V=e=>f(p({},"__esModule",{value:!0}),e);var w={};E(w,{default:()=>q});module.exports=V(w);var n=require("react/jsx-runtime"),k=b(require("react")),u=require("@radix-ui/react-slot"),x=require("../helpers/index.js"),d=require("class-variance-authority");const S=(0,d.cva)("tracking hover:text-brand-0 font-bold underline transition-colors",{variants:{size:{base:"text-text-2",lg:"text-text-3"},variant:{secondary:"text-info-secondary hover:text-info-primary",primary:"text-info-primary hover:text-brand-0"}}}),y=k.default.forwardRef(({children:e,size:t="base",variant:o="primary",className:i,asChild:r=!1,href:m,style:l,disabled:a=!1,suffixIcon:s,onClick:v,...P},h)=>(0,n.jsx)(r?u.Slot:"a",{ref:h,onClick:c=>{if(!a&&v?.(c),a||!m){c.preventDefault();return}},href:a?void 0:m,className:(0,x.cn)(S({size:t,variant:o}),i,{"flex items-center":s,"cursor-pointer":!a,"text-info-quaternary cursor-not-allowed hover:text-info-quaternary":a}),...l?{style:l}:null,...P,children:r?e:(0,n.jsxs)(n.Fragment,{children:[e,s&&(0,n.jsx)("span",{className:"svg",children:s})]})}));y.displayName="Link";var q=y;
@@ -1 +1 @@
1
- "use strict";var m=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var x=(n,o)=>{for(var s in o)m(n,s,{get:o[s],enumerable:!0})},O=(n,o,s,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of M(o))!E.call(n,t)&&t!==s&&m(n,t,{get:()=>o[t],enumerable:!(i=D(o,t))||i.enumerable});return n};var T=n=>O(m({},"__esModule",{value:!0}),n);var U={};x(U,{useDraggableScroll:()=>F});module.exports=T(U);var l=require("react");function F(n={}){const{dragSpeed:o=1,enableMomentum:s=!0,dragElastic:i=.1}=n,t=(0,l.useRef)(null),[b,W]=(0,l.useState)(!1),[S,h]=(0,l.useState)(0),[R,d]=(0,l.useState)(!1),[L,v]=(0,l.useState)(!1),a=()=>{const r=t.current;if(!r)return;const{scrollLeft:e,scrollWidth:c,clientWidth:u}=r,f=c-u,p=f>0?e/f*100:0;h(Math.min(100,Math.max(0,p))),d(e>0),v(e<f-1)};(0,l.useEffect)(()=>{const r=t.current;if(!r)return;a(),r.addEventListener("scroll",a);const e=new ResizeObserver(a);return e.observe(r),()=>{r.removeEventListener("scroll",a),e.disconnect()}},[]);const g=(r,e=!0)=>{const c=t.current;c&&c.scrollTo({left:r,behavior:e?"smooth":"auto"})};return{containerRef:t,isDragging:b,scrollProgress:S,canScrollLeft:R,canScrollRight:L,scrollTo:g,scrollLeft:(r=300)=>{const e=t.current;if(!e)return;const c=Math.max(0,e.scrollLeft-r);g(c)},scrollRight:(r=300)=>{const e=t.current;if(!e)return;const c=e.scrollWidth-e.clientWidth,u=Math.min(c,e.scrollLeft+r);g(u)}}}
1
+ "use strict";var m=Object.defineProperty;var D=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var E=(n,o)=>{for(var s in o)m(n,s,{get:o[s],enumerable:!0})},O=(n,o,s,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of M(o))!x.call(n,t)&&t!==s&&m(n,t,{get:()=>o[t],enumerable:!(i=D(o,t))||i.enumerable});return n};var T=n=>O(m({},"__esModule",{value:!0}),n);var U={};E(U,{useDraggableScroll:()=>F});module.exports=T(U);var l=require("react");function F(n={}){const{dragSpeed:o=1,enableMomentum:s=!0,dragElastic:i=.1}=n,t=(0,l.useRef)(null),[b,W]=(0,l.useState)(!1),[S,h]=(0,l.useState)(0),[d,R]=(0,l.useState)(!1),[L,v]=(0,l.useState)(!1),a=()=>{const r=t.current;if(!r)return;const{scrollLeft:e,scrollWidth:c,clientWidth:u}=r,f=c-u,p=f>0?e/f*100:0;h(Math.min(100,Math.max(0,p))),R(e>0),v(e<f-1)};(0,l.useEffect)(()=>{const r=t.current;if(!r)return;a(),r.addEventListener("scroll",a);const e=new ResizeObserver(a);return e.observe(r),()=>{r.removeEventListener("scroll",a),e.disconnect()}},[]);const g=(r,e=!0)=>{const c=t.current;c&&c.scrollTo({left:r,behavior:e?"smooth":"auto"})};return{containerRef:t,isDragging:b,scrollProgress:S,canScrollLeft:d,canScrollRight:L,scrollTo:g,scrollLeft:(r=300)=>{const e=t.current;if(!e)return;const c=Math.max(0,e.scrollLeft-r);g(c)},scrollRight:(r=300)=>{const e=t.current;if(!e)return;const c=e.scrollWidth-e.clientWidth,u=Math.min(c,e.scrollLeft+r);g(u)}}}
@@ -15,5 +15,5 @@ interface ExposureOptions {
15
15
  /** 创意 ID(图片/视频媒体 ID),用于区分轮播中的具体创意 → creative_id */
16
16
  creativeId?: string;
17
17
  }
18
- export declare const useExposure: (ref: RefObject<HTMLElement | null>, { componentType, componentName, componentTitle, componentDescription, navigation, position, pageGroup: explicitPageGroup, category, creativeId, }: ExposureOptions) => void;
18
+ export declare const useExposure: (ref: RefObject<HTMLElement>, { componentType, componentName, componentTitle, componentDescription, navigation, position, pageGroup: explicitPageGroup, category, creativeId, }: ExposureOptions) => void;
19
19
  export {};
@@ -1 +1 @@
1
- "use strict";var s=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var T=(r,e)=>{for(var n in e)s(r,n,{get:e[n],enumerable:!0})},h=(r,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of j(e))!k.call(r,t)&&t!==n&&s(r,t,{get:()=>e[t],enumerable:!(o=O(e,t))||o.enumerable});return r};var z=r=>h(s({},"__esModule",{value:!0}),r);var L={};T(L,{useExposure:()=>H});module.exports=z(L);var p=require("react"),a=require("../shared/track.js"),v=require("../shared/trackUrlRef.js"),G=require("./useIntersectionObserver.js"),S=require("../biz-components/AiuiProvider/index.js"),l=require("@payloadcms/richtext-lexical/plaintext");const H=(r,{componentType:e,componentName:n,componentTitle:o,componentDescription:t,navigation:c="",position:g=1,pageGroup:u,category:m,creativeId:d=""})=>{const{trackingData:f,onExposure:x,pageHandle:y}=(0,S.useAiuiContext)(),E=(0,p.useMemo)(()=>m||(0,v.buildPageGroup)({pageHandle:y,pageGroup:u||f.pageGroup}),[m,u,y,f.pageGroup]),_=(0,p.useMemo)(()=>{const i=typeof o=="object"&&o!==null?(0,l.convertLexicalToPlaintext)({data:o}):o;return typeof i=="string"?(0,a.toPlainTrackingText)(i):i},[o]),b=(0,p.useMemo)(()=>{const i=typeof t=="object"&&t!==null?(0,l.convertLexicalToPlaintext)({data:t}):t;return typeof i=="string"?(0,a.toPlainTrackingText)(i):i},[t]);(0,G.useIntersectionObserverDelay)(r,{once:!0,threshold:.5,delay:2e3,callback:()=>{x?x({componentType:e,componentName:n,componentTitle:_,componentDescription:b,navigation:c,pageGroup:E,position:g,creativeId:d}):(0,a.gaTrack)({event:"ga4Event",event_name:"component_impression",event_parameters:{page_group:E,component_type:e,component_name:n,position:g,creative_id:d,component_title:_,component_description:b,navigation:c}})}})};
1
+ "use strict";var s=Object.defineProperty;var O=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var k=Object.prototype.hasOwnProperty;var T=(r,e)=>{for(var n in e)s(r,n,{get:e[n],enumerable:!0})},h=(r,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of j(e))!k.call(r,t)&&t!==n&&s(r,t,{get:()=>e[t],enumerable:!(o=O(e,t))||o.enumerable});return r};var z=r=>h(s({},"__esModule",{value:!0}),r);var L={};T(L,{useExposure:()=>H});module.exports=z(L);var p=require("react"),a=require("../shared/track.js"),v=require("../shared/trackUrlRef.js"),G=require("./useIntersectionObserver.js"),S=require("../biz-components/AiuiProvider/index.js"),c=require("@payloadcms/richtext-lexical/plaintext");const H=(r,{componentType:e,componentName:n,componentTitle:o,componentDescription:t,navigation:l="",position:g=1,pageGroup:m,category:u,creativeId:d=""})=>{const{trackingData:f,onExposure:x,pageHandle:y}=(0,S.useAiuiContext)(),E=(0,p.useMemo)(()=>u||(0,v.buildPageGroup)({pageHandle:y,pageGroup:m||f.pageGroup}),[u,m,y,f.pageGroup]),_=(0,p.useMemo)(()=>{const i=typeof o=="object"&&o!==null?(0,c.convertLexicalToPlaintext)({data:o}):o;return typeof i=="string"?(0,a.toPlainTrackingText)(i):i},[o]),b=(0,p.useMemo)(()=>{const i=typeof t=="object"&&t!==null?(0,c.convertLexicalToPlaintext)({data:t}):t;return typeof i=="string"?(0,a.toPlainTrackingText)(i):i},[t]);(0,G.useIntersectionObserverDelay)(r,{once:!0,threshold:.5,delay:2e3,callback:()=>{x?x({componentType:e,componentName:n,componentTitle:_,componentDescription:b,navigation:l,pageGroup:E,position:g,creativeId:d}):(0,a.gaTrack)({event:"ga4Event",event_name:"component_impression",event_parameters:{page_group:E,component_type:e,component_name:n,position:g,creative_id:d,component_title:_,component_description:b,navigation:l}})}})};
@@ -27,5 +27,5 @@ interface ViewItemListOptions {
27
27
  itemListName?: string;
28
28
  items?: ViewItemListProduct[];
29
29
  }
30
- export declare const useViewItemList: (ref: RefObject<HTMLElement | null>, { componentType, componentName, componentTitle, componentDescription, navigation, position, itemListName, itemListId, items, tabName, pageGroup: explicitPageGroup, category, currency, }: ViewItemListOptions) => void;
30
+ export declare const useViewItemList: (ref: RefObject<HTMLElement>, { componentType, componentName, componentTitle, componentDescription, navigation, position, itemListName, itemListId, items, tabName, pageGroup: explicitPageGroup, category, currency, }: ViewItemListOptions) => void;
31
31
  export {};
@@ -22,5 +22,3 @@ export { formatPrice, languageTerritory, PRICE_SYMBOL } from './helpers/index.js
22
22
  export { LocalizedLink, type LocalizedLinkProps } from './shared/LocalizedLink.js';
23
23
  export { CarouselArrows, CarouselProgressControls } from './shared/CarouselControls.js';
24
24
  export type { CarouselArrowsProps, CarouselProgressControlsProps } from './shared/CarouselControls.js';
25
- export { MEDIA_GRID_SPEC, resolveMediaGridSpec, mediaGridSpecToCssVars, type GridColumns, type MediaMode, type BreakpointSpec, type MediaGridSpec, } from './shared/mediaGridSpec.js';
26
- export { ContainerGridContext, useContainerGrid, type ContainerGridInfo } from './shared/ContainerGridContext.js';
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var M=Object.create;var m=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var L=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty;var O=(e,o)=>{for(var t in o)m(e,t,{get:o[t],enumerable:!0})},l=(e,o,t,f)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of h(o))!j.call(e,n)&&n!==t&&m(e,n,{get:()=>o[n],enumerable:!(f=R(o,n))||f.enumerable});return e},d=(e,o,t)=>(l(e,o,"default"),t&&l(t,o,"default")),w=(e,o,t)=>(t=e!=null?M(L(e)):{},l(o||!e||!e.__esModule?m(t,"default",{value:e,enumerable:!0}):t,e)),D=e=>l(m({},"__esModule",{value:!0}),e);var u={};O(u,{CarouselArrows:()=>c.CarouselArrows,CarouselProgressControls:()=>c.CarouselProgressControls,ContainerGridContext:()=>C.ContainerGridContext,LocalizedLink:()=>G.LocalizedLink,MEDIA_GRID_SPEC:()=>i.MEDIA_GRID_SPEC,PRICE_SYMBOL:()=>a.PRICE_SYMBOL,buildClickTrackingProps:()=>r.buildClickTrackingProps,buildPageGroup:()=>s.buildPageGroup,buildTrackingRef:()=>s.buildTrackingRef,cn:()=>p.cn,formatPrice:()=>a.formatPrice,gaTrack:()=>r.gaTrack,getLocalizedPath:()=>p.getLocalizedPath,languageTerritory:()=>a.languageTerritory,mediaGridSpecToCssVars:()=>i.mediaGridSpecToCssVars,noop:()=>p.noop,resolveComponentMediaType:()=>r.resolveComponentMediaType,resolveMediaGridSpec:()=>i.resolveMediaGridSpec,toPlainTrackingText:()=>r.toPlainTrackingText,trackComponentClick:()=>r.trackComponentClick,trackSelectItem:()=>r.trackSelectItem,trackUrlRef:()=>s.trackUrlRef,useCarouselPlayback:()=>b.useCarouselPlayback,useContainerGrid:()=>C.useContainerGrid,useCountDown:()=>k.default,useDraggableScroll:()=>x.useDraggableScroll,useExposure:()=>y.useExposure,useGridRowCount:()=>P.useGridRowCount,useIntersectionObserverDelay:()=>g.useIntersectionObserverDelay,useRollout:()=>T.useRollout,useTracking:()=>S.useTracking,useViewItemList:()=>I.useViewItemList});module.exports=D(u);d(u,require("./components/index.js"),module.exports);var r=require("./shared/track.js"),s=require("./shared/trackUrlRef.js"),k=w(require("./hooks/useCountDown.js")),x=require("./hooks/useDraggableScroll.js"),y=require("./hooks/useExposure.js"),P=require("./hooks/useGridRowCount.js"),g=require("./hooks/useIntersectionObserver.js"),T=require("./hooks/useRollout.js"),I=require("./hooks/useViewItemList.js"),S=require("./hooks/useTracking.js"),b=require("./hooks/useCarouselPlayback.js"),p=require("./helpers/index.js"),a=require("./helpers/index.js"),G=require("./shared/LocalizedLink.js"),c=require("./shared/CarouselControls.js"),i=require("./shared/mediaGridSpec.js"),C=require("./shared/ContainerGridContext.js");
1
+ "use strict";var h=Object.create;var n=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty;var S=(e,o)=>{for(var t in o)n(e,t,{get:o[t],enumerable:!0})},l=(e,o,t,k)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of R(o))!O.call(e,i)&&i!==t&&n(e,i,{get:()=>o[i],enumerable:!(k=L(o,i))||k.enumerable});return e},c=(e,o,t)=>(l(e,o,"default"),t&&l(t,o,"default")),w=(e,o,t)=>(t=e!=null?h(j(e)):{},l(o||!e||!e.__esModule?n(t,"default",{value:e,enumerable:!0}):t,e)),U=e=>l(n({},"__esModule",{value:!0}),e);var u={};S(u,{CarouselArrows:()=>m.CarouselArrows,CarouselProgressControls:()=>m.CarouselProgressControls,LocalizedLink:()=>I.LocalizedLink,PRICE_SYMBOL:()=>p.PRICE_SYMBOL,buildClickTrackingProps:()=>r.buildClickTrackingProps,buildPageGroup:()=>s.buildPageGroup,buildTrackingRef:()=>s.buildTrackingRef,cn:()=>a.cn,formatPrice:()=>p.formatPrice,gaTrack:()=>r.gaTrack,getLocalizedPath:()=>a.getLocalizedPath,languageTerritory:()=>p.languageTerritory,noop:()=>a.noop,resolveComponentMediaType:()=>r.resolveComponentMediaType,toPlainTrackingText:()=>r.toPlainTrackingText,trackComponentClick:()=>r.trackComponentClick,trackSelectItem:()=>r.trackSelectItem,trackUrlRef:()=>s.trackUrlRef,useCarouselPlayback:()=>b.useCarouselPlayback,useCountDown:()=>C.default,useDraggableScroll:()=>f.useDraggableScroll,useExposure:()=>x.useExposure,useGridRowCount:()=>P.useGridRowCount,useIntersectionObserverDelay:()=>d.useIntersectionObserverDelay,useRollout:()=>g.useRollout,useTracking:()=>T.useTracking,useViewItemList:()=>y.useViewItemList});module.exports=U(u);c(u,require("./components/index.js"),module.exports);var r=require("./shared/track.js"),s=require("./shared/trackUrlRef.js"),C=w(require("./hooks/useCountDown.js")),f=require("./hooks/useDraggableScroll.js"),x=require("./hooks/useExposure.js"),P=require("./hooks/useGridRowCount.js"),d=require("./hooks/useIntersectionObserver.js"),g=require("./hooks/useRollout.js"),y=require("./hooks/useViewItemList.js"),T=require("./hooks/useTracking.js"),b=require("./hooks/useCarouselPlayback.js"),a=require("./helpers/index.js"),p=require("./helpers/index.js"),I=require("./shared/LocalizedLink.js"),m=require("./shared/CarouselControls.js");
@@ -3,8 +3,6 @@ export interface ContainerProps {
3
3
  container?: {
4
4
  desktopSpan: number;
5
5
  mobileSpan: number;
6
- /** 平板档(768–1024px)栅格跨度;缺省时保持 legacy 行为(desktopSpan 在 ≥768 生效) */
7
- tabletSpan?: number;
8
6
  };
9
7
  }
10
8
  export interface StylesProps {
@@ -1 +1 @@
1
- "use strict";var G=Object.create;var u=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var B=(t,e)=>{for(var n in e)u(t,n,{get:e[n],enumerable:!0})},f=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of j(e))!E.call(t,o)&&o!==n&&u(t,o,{get:()=>e[o],enumerable:!(r=L(e,o))||r.enumerable});return t};var C=(t,e,n)=>(n=t!=null?G(_(t)):{},f(e||!t||!t.__esModule?u(n,"default",{value:t,enumerable:!0}):n,t)),O=t=>f(u({},"__esModule",{value:!0}),t);var Q={};B(Q,{getStylesProps:()=>k,useStyles:()=>$,withLayout:()=>J});module.exports=O(Q);var s=require("react/jsx-runtime"),l=C(require("react")),b=require("./simpleHash.js"),w=C(require("./getKeyPropsString.js")),d=require("../components/grid.js"),N=require("../components/container.js"),T=C(require("./ErrorBoundary.js")),I=require("./ContainerGridContext.js");const v=[12,10,8,6,4],A=t=>{const e=typeof t=="string"?Number.parseInt(t,10):t;return v.includes(e??12)?e??12:12},F={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},S={12:"tablet:col-start-1 tablet:col-end-13",10:"tablet:col-start-2 tablet:col-end-12",8:"tablet:col-start-3 tablet:col-end-11",6:"tablet:col-start-4 tablet:col-end-10",4:"tablet:col-start-5 tablet:col-end-9"},K={12:"laptop:col-start-1 laptop:col-end-13",10:"laptop:col-start-2 laptop:col-end-12",8:"laptop:col-start-3 laptop:col-end-11",6:"laptop:col-start-4 laptop:col-end-10",4:"laptop:col-start-5 laptop:col-end-9"},R=t=>{const e=(0,w.default)(t);return`style_${(0,b.simpleHash)(e)}`},k=t=>{const{style:e,uid:n,disabled:r,containerClassName:o}=t;return{style:e,uid:n,disabled:r,containerClassName:o}},M=({style:t,uid:e=R({}),disabled:n=!1})=>!t||n?null:(0,s.jsx)("style",{suppressHydrationWarning:!0,"data-style-id":e,dangerouslySetInnerHTML:{__html:`.block-${e} { ${t} }`}}),$=(t,e)=>{const n=(0,l.useMemo)(()=>t?.uid||R({...t,...e??{}}),[e,t]),r=(0,l.useMemo)(()=>(0,s.jsx)(M,{...t,uid:n}),[t,n]);return{className:`block-${n} `,StyleComponent:r,uid:n,idx:e?.idx!=null?String(e.idx):void 0}},H=t=>{const{desktopSpan:e,mobileSpan:n,tabletSpan:r}=t||{},o=n?F[n]:"";if(!r){const p=e?S[e]:"";return`${o} ${p}`.trim()}const a=S[r]??"",c=e?K[e]:"";return`${o} ${a} ${c}`.trim()},D=t=>t?typeof t=="string"?t:typeof t=="object"&&Object.entries(t).length<=0?"":Object.entries(t).map(([e,n])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n}`).join("; ")+";":"",U=(t,e)=>[t,e].map(D).filter(n=>!!n).map(n=>n.trim().endsWith(";")?n:`${n};`).join(" ");function Z(t,e){const n=l.default.forwardRef((r,o)=>{const{container:a,containerClassName:c,className:p,...m}=r;if(!a||Reflect.ownKeys(a).length===0)return(0,s.jsx)(t,{...m,className:p,ref:o});const y=[e,c,p].filter(Boolean).join(" ").trim(),i=a,P={gridColumns:A(i?.desktopSpan),mobileSpan:i?.mobileSpan,tabletSpan:i?.tabletSpan};return(0,s.jsx)(N.Container,{className:y,children:(0,s.jsx)(d.Grid,{className:"container_grid",children:(0,s.jsx)(d.GridItem,{className:H(i),children:(0,s.jsx)(I.ContainerGridContext.Provider,{value:P,children:(0,s.jsx)(t,{...m,ref:o})})})})})});return n.displayName=`WithContainerLayout(${t.displayName||t.name||"Component"})`,n}function q(t,e){const n=l.default.forwardRef((r,o)=>{const a=k(r),c=U(e?.style,a.style),p={...e,...a,...c&&{style:c}},{className:m,StyleComponent:y,idx:i}=$(p,r.data),{style:P,uid:V,disabled:X,className:h,...x}=r;return(0,s.jsxs)(s.Fragment,{children:[y,(0,s.jsx)(t,{...i?{id:i}:{},...x,className:[m,h].filter(Boolean).join(" ").trim(),ref:o})]})});return n.displayName=`WithStyleInjection(${t.displayName||t.name||"Component"})`,n}function z(t){const e=l.default.forwardRef((n,r)=>(0,s.jsx)(T.default,{children:(0,s.jsx)(t,{...n,ref:r})}));return e.displayName=`WithErrorBoundary(${t.displayName||t.name||"Component"})`,e}const g=new WeakMap;function J(t,e){if(g.has(t))return t;const n=z(q(Z(t,e?.containerClassName),e));n.displayName=`WithLayout(${t.displayName||t.name||"Component"})`,g.set(t,!0);const r=n;return Object.getOwnPropertyNames(t).forEach(o=>{!(o in r)&&o!=="arguments"&&o!=="caller"&&o!=="length"&&o!=="name"&&(r[o]=t[o])}),r}
1
+ "use strict";var h=Object.create;var m=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty;var E=(t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})},C=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of x(e))!L.call(t,o)&&o!==n&&m(t,o,{get:()=>e[o],enumerable:!(r=$(e,o))||r.enumerable});return t};var d=(t,e,n)=>(n=t!=null?h(j(t)):{},C(e||!t||!t.__esModule?m(n,"default",{value:t,enumerable:!0}):n,t)),B=t=>C(m({},"__esModule",{value:!0}),t);var U={};E(U,{getStylesProps:()=>T,useStyles:()=>N,withLayout:()=>D});module.exports=B(U);var s=require("react/jsx-runtime"),a=d(require("react")),S=require("./simpleHash.js"),g=d(require("./getKeyPropsString.js")),u=require("../components/grid.js"),b=require("../components/container.js"),w=d(require("./ErrorBoundary.js"));const _={12:"col-start-1 col-end-13",10:"col-start-2 col-end-12",8:"col-start-3 col-end-11",6:"col-start-4 col-end-10",4:"col-start-5 col-end-9"},O={12:"tablet:col-start-1 tablet:col-end-13",10:"tablet:col-start-2 tablet:col-end-12",8:"tablet:col-start-3 tablet:col-end-11",6:"tablet:col-start-4 tablet:col-end-10",4:"tablet:col-start-5 tablet:col-end-9"},f=t=>{const e=(0,g.default)(t);return`style_${(0,S.simpleHash)(e)}`},T=t=>{const{style:e,uid:n,disabled:r,containerClassName:o}=t;return{style:e,uid:n,disabled:r,containerClassName:o}},G=({style:t,uid:e=f({}),disabled:n=!1})=>!t||n?null:(0,s.jsx)("style",{suppressHydrationWarning:!0,"data-style-id":e,dangerouslySetInnerHTML:{__html:`.block-${e} { ${t} }`}}),N=(t,e)=>{const n=(0,a.useMemo)(()=>t?.uid||f({...t,...e??{}}),[e,t]),r=(0,a.useMemo)(()=>(0,s.jsx)(G,{...t,uid:n}),[t,n]);return{className:`block-${n} `,StyleComponent:r,uid:n,idx:e?.idx!=null?String(e.idx):void 0}},A=t=>{const{desktopSpan:e,mobileSpan:n}=t||{},r=n?_[n]:"",o=e?O[e]:"";return`${r} ${o}`.trim()},F=t=>t?typeof t=="string"?t:typeof t=="object"&&Object.entries(t).length<=0?"":Object.entries(t).map(([e,n])=>`${e.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${n}`).join("; ")+";":"",K=(t,e)=>[t,e].map(F).filter(n=>!!n).map(n=>n.trim().endsWith(";")?n:`${n};`).join(" ");function v(t,e){const n=a.default.forwardRef((r,o)=>{const{container:i,containerClassName:c,className:l,...p}=r;if(!i||Reflect.ownKeys(i).length===0)return(0,s.jsx)(t,{...p,className:l,ref:o});const y=[e,c,l].filter(Boolean).join(" ").trim();return(0,s.jsx)(b.Container,{className:y,children:(0,s.jsx)(u.Grid,{className:"container_grid",children:(0,s.jsx)(u.GridItem,{className:A(i),children:(0,s.jsx)(t,{...p,ref:o})})})})});return n.displayName=`WithContainerLayout(${t.displayName||t.name||"Component"})`,n}function H(t,e){const n=a.default.forwardRef((r,o)=>{const i=T(r),c=K(e?.style,i.style),l={...e,...i,...c&&{style:c}},{className:p,StyleComponent:y,idx:P}=N(l,r.data),{style:Z,uid:q,disabled:z,className:I,...k}=r;return(0,s.jsxs)(s.Fragment,{children:[y,(0,s.jsx)(t,{...P?{id:P}:{},...k,className:[p,I].filter(Boolean).join(" ").trim(),ref:o})]})});return n.displayName=`WithStyleInjection(${t.displayName||t.name||"Component"})`,n}function M(t){const e=a.default.forwardRef((n,r)=>(0,s.jsx)(w.default,{children:(0,s.jsx)(t,{...n,ref:r})}));return e.displayName=`WithErrorBoundary(${t.displayName||t.name||"Component"})`,e}const R=new WeakMap;function D(t,e){if(R.has(t))return t;const n=M(H(v(t,e?.containerClassName),e));n.displayName=`WithLayout(${t.displayName||t.name||"Component"})`,R.set(t,!0);const r=n;return Object.getOwnPropertyNames(t).forEach(o=>{!(o in r)&&o!=="arguments"&&o!=="caller"&&o!=="length"&&o!=="name"&&(r[o]=t[o])}),r}
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as f}from"react/jsx-runtime";import*as c from"react";import{cn as r}from"../../helpers/index.js";import{Text as C,Picture as I,Heading as g,Link as L}from"../../components/index.js";import{cva as w}from"class-variance-authority";import{Swiper as T,SwiperSlide as V}from"swiper/react";import{withLayout as z}from"../../shared/Styles.js";import{useExposure as B}from"../../hooks/useExposure.js";import{useTracking as E}from"../../hooks/useTracking.js";import{trackUrlRef as R}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as j,toPlainTrackingText as x}from"../../shared/track.js";const m="image",v="activity_schedule",D=w("rounded-card laptop:px-6 laptop:py-4 relative flex min-w-0 flex-col justify-between gap-2 overflow-hidden px-4 py-3",{variants:{state:{"active-light":"bg-gradient-to-r from-[#3555aa] to-[#6988e3]","active-dark":"bg-gradient-to-r from-[#3555aa] to-[#6988e3]","inactive-light":"bg-[#EAEAEC]","inactive-dark":"bg-[#1E2024]"},size:{small:"laptop:h-[160px] h-[120px]",large:"laptop:h-[240px] h-[200px]"}},defaultVariants:{state:"inactive-light",size:"small"}}),h=w("font-bold leading-[1.2]",{variants:{state:{"active-light":"text-white","active-dark":"text-white","inactive-light":"text-[#080A0F]","inactive-dark":"text-white"}},defaultVariants:{state:"inactive-light"}}),y=c.memo(({item:e,theme:s="light",className:d,size:n,position:u})=>{const l=e.isActive||!1,{buildRef:o}=E(),t=`${l?"active":"inactive"}-${s}`;return i("div",{className:r(D({state:t,size:n}),d),"data-ui-component-id":"ActivityScheduleCard",children:f(L,{asChild:!e?.link,href:e?.link?R(e.link,o(m,v)):void 0,className:"size-full no-underline hover:text-current",...j({interactive:!!e?.link,componentType:m,componentName:v,title:e.title,description:e.subtitle,position:u}),children:[(l?e.activeIcon:e.inactiveIcon)&&i("div",{className:"laptop:w-[160px] aspect-1 absolute right-0 top-0 z-10 w-[120px]",children:i(I,{source:l?e.activeIcon.url:e.inactiveIcon.url,alt:l?e.activeIcon.alt:e.inactiveIcon.alt,className:"aspect-square"})}),f("div",{className:"relative z-20 flex h-full flex-col justify-between",children:[i(g,{as:"h3",size:3,html:e.title,className:r(h({state:t}))}),f("div",{className:"flex flex-col gap-1",children:[i("div",{className:"flex flex-col justify-end overflow-hidden",children:i(g,{as:"h4",size:2,html:e.subtitle,className:r(" line-clamp-2",h({state:t}))})}),n==="large"&&e.description&&i(C,{html:e.description,className:r("lg-desktop:text-[18px] desktop:text-[16px] line-clamp-3 text-[14px] leading-[1.4]",h({state:t}))})]})]})]})})});y.displayName="ActivityScheduleCard";const k=c.forwardRef(({classNames:e={},data:s,...d},n)=>{const u=s.theme||"light",l=s.size||"small",o=c.useRef(null);c.useImperativeHandle(n,()=>o.current),B(o,{componentType:m,componentName:v,componentTitle:s.scheduleList?.map(a=>x(a.title)).join(" | "),componentDescription:s.scheduleList?.map(a=>x(a.subtitle)).join(" | ")});const t=c.useMemo(()=>s?.scheduleList?.length||2,[s?.scheduleList]),b=c.useMemo(()=>{const a=P=>{switch(P){case"mobile":return{slidesPerView:1.17,spaceBetween:12};case"tablet":return t===2?{slidesPerView:2,spaceBetween:12}:{slidesPerView:2.4,spaceBetween:12};case"laptop":return t===2?{}:t===4?{slidesPerView:3.2,spaceBetween:16}:{slidesPerView:t,spaceBetween:16};case"desktop":return t===2?{slidesPerView:2,spaceBetween:16}:{slidesPerView:t,spaceBetween:16}}},p=a("mobile"),S=a("tablet"),A=a("laptop"),N=a("desktop");return{0:p,768:S,1024:A,1440:N}},[t]);return i("div",{ref:o,className:r(e?.root),"data-ui-component-id":"ActivitySchedule",...d,children:i(T,{breakpoints:b,className:"w-full !overflow-visible",children:s?.scheduleList?.map((a,p)=>i(V,{children:i(y,{item:a,theme:u,size:l,className:e?.card,position:p+1})},"activityScheduleCardItem"+p))??null})})});k.displayName="ActivitySchedule";var K=z(k);export{K as default};
1
+ "use client";import{jsx as i,jsxs as f}from"react/jsx-runtime";import*as c from"react";import{cn as r}from"../../helpers/index.js";import{Text as P,Picture as I,Heading as g,Container as L,Link as T}from"../../components/index.js";import{cva as w}from"class-variance-authority";import{Swiper as V,SwiperSlide as z}from"swiper/react";import{withLayout as B}from"../../shared/Styles.js";import{useExposure as E}from"../../hooks/useExposure.js";import{useTracking as R}from"../../hooks/useTracking.js";import{trackUrlRef as j}from"../../shared/trackUrlRef.js";import{buildClickTrackingProps as D,toPlainTrackingText as x}from"../../shared/track.js";const m="image",v="activity_schedule",H=w("rounded-card laptop:px-6 laptop:py-4 relative flex min-w-0 flex-col justify-between gap-2 overflow-hidden px-4 py-3",{variants:{state:{"active-light":"bg-gradient-to-r from-[#3555aa] to-[#6988e3]","active-dark":"bg-gradient-to-r from-[#3555aa] to-[#6988e3]","inactive-light":"bg-[#EAEAEC]","inactive-dark":"bg-[#1E2024]"},size:{small:"laptop:h-[160px] h-[120px]",large:"laptop:h-[240px] h-[200px]"}},defaultVariants:{state:"inactive-light",size:"small"}}),h=w("font-bold leading-[1.2]",{variants:{state:{"active-light":"text-white","active-dark":"text-white","inactive-light":"text-[#080A0F]","inactive-dark":"text-white"}},defaultVariants:{state:"inactive-light"}}),y=c.memo(({item:e,theme:s="light",className:d,size:n,position:u})=>{const l=e.isActive||!1,{buildRef:o}=R(),t=`${l?"active":"inactive"}-${s}`;return i("div",{className:r(H({state:t,size:n}),d),"data-ui-component-id":"ActivityScheduleCard",children:f(T,{asChild:!e?.link,href:e?.link?j(e.link,o(m,v)):void 0,className:"size-full no-underline hover:text-current",...D({interactive:!!e?.link,componentType:m,componentName:v,title:e.title,description:e.subtitle,position:u}),children:[(l?e.activeIcon:e.inactiveIcon)&&i("div",{className:"laptop:w-[160px] aspect-1 absolute right-0 top-0 z-10 w-[120px]",children:i(I,{source:l?e.activeIcon.url:e.inactiveIcon.url,alt:l?e.activeIcon.alt:e.inactiveIcon.alt,className:"aspect-square"})}),f("div",{className:"relative z-20 flex h-full flex-col justify-between",children:[i(g,{as:"h3",size:3,html:e.title,className:r(h({state:t}))}),f("div",{className:"flex flex-col gap-1",children:[i("div",{className:"flex flex-col justify-end overflow-hidden",children:i(g,{as:"h4",size:2,html:e.subtitle,className:r(" line-clamp-2",h({state:t}))})}),n==="large"&&e.description&&i(P,{html:e.description,className:r("lg-desktop:text-[18px] desktop:text-[16px] line-clamp-3 text-[14px] leading-[1.4]",h({state:t}))})]})]})]})})});y.displayName="ActivityScheduleCard";const k=c.forwardRef(({classNames:e={},data:s,...d},n)=>{const u=s.theme||"light",l=s.size||"large",o=c.useRef(null);c.useImperativeHandle(n,()=>o.current),E(o,{componentType:m,componentName:v,componentTitle:s.scheduleList?.map(a=>x(a.title)).join(" | "),componentDescription:s.scheduleList?.map(a=>x(a.subtitle)).join(" | ")});const t=c.useMemo(()=>s?.scheduleList?.length||2,[s?.scheduleList]),b=c.useMemo(()=>{const a=C=>{switch(C){case"mobile":return{slidesPerView:1.17,spaceBetween:12};case"tablet":return t===2?{slidesPerView:2,spaceBetween:12}:{slidesPerView:2.4,spaceBetween:12};case"laptop":return t===2?{}:t===4?{slidesPerView:3.2,spaceBetween:16}:{slidesPerView:t,spaceBetween:16};case"desktop":return t===2?{slidesPerView:2,spaceBetween:16}:{slidesPerView:t,spaceBetween:16}}},p=a("mobile"),S=a("tablet"),A=a("laptop"),N=a("desktop");return{0:p,768:S,1024:A,1440:N}},[t]);return i(L,{ref:o,className:r(e?.root),childClassName:"overflow-hidden","data-ui-component-id":"ActivitySchedule",...d,children:i(V,{breakpoints:b,className:"w-full !overflow-visible",children:s.scheduleList.map((a,p)=>i(z,{children:i(y,{item:a,theme:u,size:l,className:e?.card,position:p+1})},"activityScheduleCardItem"+p))})})});k.displayName="ActivitySchedule";var O=B(k);export{O as default};
@@ -1,6 +1,4 @@
1
1
  import type { BrandEquityProps } from './types.js';
2
- import 'swiper/css';
3
- import 'swiper/css/pagination';
4
2
  declare const _default: import("react").ForwardRefExoticComponent<Omit<BrandEquityProps & import("react").RefAttributes<HTMLDivElement>, "container" | keyof import("../../shared/Styles.js").StylesProps> & import("../../shared/Styles.js").StylesProps & import("../index.js").ContainerProps & import("react").RefAttributes<unknown>> & {
5
3
  readonly $$typeof: symbol;
6
4
  };
@@ -1 +1 @@
1
- "use client";import{Fragment as $,jsx as t,jsxs as c}from"react/jsx-runtime";import{forwardRef as E,useEffect as q,useRef as S,useState as x,useImperativeHandle as I}from"react";import{cn as l}from"../../helpers/utils.js";import g from"../../components/picture.js";import{withLayout as M}from"../../shared/Styles.js";import{useMediaQuery as B}from"react-responsive";import{useExposure as T}from"../../hooks/useExposure.js";import{Swiper as P,SwiperSlide as j}from"swiper/react";import{Pagination as L,FreeMode as z,Mousewheel as A}from"swiper/modules";import"swiper/css";import"swiper/css/pagination";import H from"../Title/index.js";const D="copy",R="store_benefits",Q=(e,a)=>{const i=[];for(let r=0;r<e.length;r+=a)i.push(e.slice(r,r+a));return i},v=E(({data:{items:e=[],itemShape:a,title:i,theme:r},className:o},n)=>{const[p,h]=x(!1),u=B({query:"(max-width: 767px)"}),[k,N]=x(null),d=S(null);I(n,()=>d.current),T(d,{componentType:D,componentName:R}),q(()=>{h(u)},[u]);const w=p?Q(e,3):e;return c("div",{ref:d,className:l("brand-equity-wrapper w-full",{"aiui-dark":r==="dark"},o),children:[i&&t(H,{data:{title:i}}),p?c($,{children:[t(P,{className:l(o),modules:[z,A,L],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:k},breakpoints:{0:{spaceBetween:12}},children:w?.map((s,m)=>t(j,{className:"!flex flex-col gap-3",children:Array.isArray(s)&&s?.map((f,y)=>t(b,{data:f,itemShape:a,index:y,theme:f.theme??r},y))},"SwiperSlide"+m))}),t("div",{ref:N,className:"brand-equity-pagination !static mt-[20px] flex justify-center"})]}):t("div",{className:l("grid grid-cols-1 gap-3","tablet:grid-cols-2","laptop:gap-4 laptop:grid-cols-10"),children:e.map((s,m)=>t(b,{data:s,itemShape:a,index:m,theme:s.theme??r},m))})]})}),b=({data:e,itemShape:a,index:i,theme:r})=>{const o=r==="dark"&&e.iconImage?e.iconImage:e.icon;return c("div",{className:l("brand-equity-item",`brand-equity-item-${i+1}`,e.containerName?`brand-equity-item--${e.containerName}`:void 0,"bg-container-secondary-1 box-border flex w-full flex-col p-4","desktop:p-6 justify-between","laptop:col-span-3 lg-desktop:p-8","laptop:h-[192px] lg-desktop:h-[240px] h-[160px]",{"laptop:col-span-4":[0,5,6,11].includes(i),"bg-container-primary":r==="dark"},"rounded-box",e.className),children:[c("div",{className:"lg-desktop:h-[36px] flex h-[32px] items-center justify-between gap-3",children:[t("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-[14px] font-bold leading-[1.2] tracking-[-0.02em]",children:e.title}),e.type==="avatar"?t("div",{className:"flex shrink-0 -space-x-2",children:e?.avatarList?.map((n,p)=>t("div",{className:l("border-container-primary size-[32px] overflow-hidden rounded-full border-2","relative inline-block shrink-0","lg-desktop:size-[36px]"),children:t(g,{source:n.avatar?.url,alt:n.avatar?.alt,className:"size-full object-cover"})},p))}):t("div",{className:"lg-desktop:size-[36px] size-[32px] shrink-0",children:t(g,{className:"size-full object-cover",source:o?.url,alt:o?.alt,imgClassName:"w-full h-full object-cover"})})]}),t("p",{className:"lg-desktop:text-[24px] text-info-primary line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em]",children:e.description})]})};v.displayName="BrandEquity";var Y=M(v);export{Y as default};
1
+ "use client";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{forwardRef as w,useEffect as q,useRef as x,useState as E,useImperativeHandle as S}from"react";import{cn as s}from"../../helpers/utils.js";import v from"../../components/picture.js";import{withLayout as M}from"../../shared/Styles.js";import{useMediaQuery as B}from"react-responsive";import{useExposure as T}from"../../hooks/useExposure.js";import{Swiper as I,SwiperSlide as j}from"swiper/react";import{Pagination as P,FreeMode as L,Mousewheel as z}from"swiper/modules";import A from"../Title/index.js";const H="copy",D="store_benefits",R=(e,a)=>{const i=[];for(let r=0;r<e.length;r+=a)i.push(e.slice(r,r+a));return i},b=w(({data:{items:e=[],itemShape:a,title:i,theme:r},className:o},m)=>{const[c,h]=E(!1),u=B({query:"(max-width: 768px)"}),f=x(null),d=x(null);S(m,()=>d.current),T(d,{componentType:H,componentName:D}),q(()=>{h(u)},[u]);const k=c?R(e,3):e;return n("div",{ref:d,className:s("brand-equity-wrapper w-full",{"aiui-dark":r==="dark"},o),children:[i&&t(A,{data:{title:i}}),c?n(I,{className:s(o),modules:[L,z,P],freeMode:!0,mousewheel:{forceToAxis:!0},pagination:{clickable:!0,el:f.current},breakpoints:{0:{spaceBetween:12}},children:[k?.map((l,p)=>t(j,{className:"!flex flex-col gap-3",children:Array.isArray(l)&&l?.map((N,y)=>t(g,{data:N,itemShape:a,index:y,theme:r},y))},"SwiperSlide"+p)),t("div",{ref:f,className:"mt-3 flex justify-center"})]}):t("div",{className:s("grid grid-cols-1 gap-3","tablet:grid-cols-2","laptop:gap-4 laptop:grid-cols-10"),children:e.map((l,p)=>t(g,{data:l,itemShape:a,index:p,theme:r},p))})]})}),g=({data:e,itemShape:a,index:i,theme:r})=>n("div",{className:s("brand-equity-item",`brand-equity-item-${i+1}`,e.containerName?`brand-equity-item--${e.containerName}`:void 0,"bg-container-secondary-1 box-border flex w-full flex-col p-4","desktop:p-6 justify-between","laptop:col-span-3 lg-desktop:p-8","laptop:h-[192px] lg-desktop:h-[240px] h-[160px]",{"laptop:col-span-4":[0,5,6,11].includes(i),"bg-container-primary":r==="dark"},"rounded-box",e.className),children:[n("div",{className:"lg-desktop:h-[36px] flex h-[30px] items-center justify-between gap-3",children:[t("h3",{className:"lg-desktop:text-[18px] desktop:text-[16px] text-info-primary text-[14px] font-bold leading-[1.2] tracking-[-0.02em]",children:e.title}),e.type==="avatar"?t("div",{className:"flex shrink-0 -space-x-2",children:e?.avatarList?.map((o,m)=>t("div",{className:s("border-container-primary size-[30px] overflow-hidden rounded-full border-2","relative inline-block shrink-0","lg-desktop:size-[36px]"),children:t(v,{source:o.avatar?.url,alt:o.avatar?.alt,className:"size-full object-cover"})},m))}):t("div",{className:"lg-desktop:size-[36px] size-[30px] shrink-0",children:t(v,{className:"size-full object-cover",source:e.icon?.url,alt:e.icon?.alt,imgClassName:"w-full h-full object-cover"})})]}),t("p",{className:"lg-desktop:text-[24px] text-info-primary line-clamp-3 text-[20px] font-bold leading-[1.2] tracking-[-0.04em]",children:e.description})]});b.displayName="BrandEquity";var U=M(b);export{U as default};
@@ -1,8 +1,6 @@
1
1
  import type { ComponentCommonProps, Img } from '../../types/props.js';
2
2
  export interface BrandEquityItemProps {
3
3
  icon?: Img;
4
- /** 暗色主题专用图标:item 或全局 theme 为 dark 时优先于 icon 渲染(semantic-media 命名遵循 ADR 0010) */
5
- iconImage?: Img;
6
4
  type?: 'icon' | 'avatar';
7
5
  title: string;
8
6
  description: string;
@@ -1 +1 @@
1
- import{jsx as t,jsxs as p}from"react/jsx-runtime";import"react";import{useChatContext as c}from"@copilotkit/react-ui";const i=({setOpen:n})=>{const o=c();return p("button",{onClick:()=>n(),className:"copilotKitButton ","aria-label":"Open Chat",children:[t("div",{className:"copilotKitButtonIcon copilotKitButtonIconOpen",children:o.icons.openIcon}),t("div",{className:"copilotKitButtonIcon copilotKitButtonIconClose",children:o.icons.closeIcon})]})};var a=i;export{a as default};
1
+ import{jsx as t,jsxs as p}from"react/jsx-runtime";import{useChatContext as c}from"@copilotkit/react-ui";const i=({setOpen:n})=>{const o=c();return p("button",{onClick:()=>n(),className:"copilotKitButton ","aria-label":"Open Chat",children:[t("div",{className:"copilotKitButtonIcon copilotKitButtonIconOpen",children:o.icons.openIcon}),t("div",{className:"copilotKitButtonIcon copilotKitButtonIconClose",children:o.icons.closeIcon})]})};var e=i;export{e as default};
@@ -1 +1 @@
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};
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};