@anker-in/headless-ui 1.3.86 → 1.3.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/CONTRIBUTING.md +57 -0
  2. package/dist/cjs/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
  3. package/dist/cjs/biz-components/ActiveShelf/ProductCard.js +1 -1
  4. package/dist/cjs/biz-components/ActiveShelf/index.d.ts +2 -2
  5. package/dist/cjs/biz-components/ActiveShelf/index.js +1 -1
  6. package/dist/cjs/biz-components/ActiveShelf/types.d.ts +12 -1
  7. package/dist/cjs/biz-components/ActiveShelf/types.js +1 -1
  8. package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
  9. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +28 -0
  10. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  11. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
  12. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  13. package/dist/cjs/biz-components/BrandEquity/types.d.ts +2 -0
  14. package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
  15. package/dist/cjs/biz-components/Chat/button.js +1 -1
  16. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  17. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  18. package/dist/cjs/biz-components/HeroBanner/types.d.ts +12 -6
  19. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  20. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  21. package/dist/cjs/biz-components/ImageWithText/types.d.ts +8 -2
  22. package/dist/cjs/biz-components/ImageWithText/types.js +1 -1
  23. package/dist/cjs/biz-components/Ksp/index.d.ts +2 -0
  24. package/dist/cjs/biz-components/Ksp/index.js +1 -1
  25. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +8 -2
  26. package/dist/cjs/biz-components/Listing/BizProductProvider.js +1 -1
  27. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  28. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  29. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
  30. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
  31. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  32. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  33. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  34. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  35. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  36. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +1 -1
  37. package/dist/cjs/biz-components/Listing/types/product.d.ts +9 -0
  38. package/dist/cjs/biz-components/Listing/types/product.js +1 -1
  39. package/dist/cjs/biz-components/Listing/types.d.ts +19 -0
  40. package/dist/cjs/biz-components/Listing/types.js +1 -1
  41. package/dist/cjs/biz-components/Listing/utils/priceCalc.d.ts +28 -0
  42. package/dist/cjs/biz-components/Listing/utils/priceCalc.js +1 -0
  43. package/dist/cjs/biz-components/MarqueeReview/index.js +1 -1
  44. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  45. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  46. package/dist/cjs/biz-components/ProductCompare/index.d.ts +1 -1
  47. package/dist/cjs/biz-components/ProductCompare/index.js +1 -1
  48. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  49. package/dist/cjs/biz-components/ProductHero/types.d.ts +2 -0
  50. package/dist/cjs/biz-components/ProductHero/types.js +1 -1
  51. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  52. package/dist/cjs/biz-components/ProductNav/types.d.ts +5 -2
  53. package/dist/cjs/biz-components/ProductNav/types.js +1 -1
  54. package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +5 -4
  55. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  56. package/dist/cjs/biz-components/Specs/dropdown.js +1 -2
  57. package/dist/cjs/biz-components/Specs/index.js +1 -1
  58. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  59. package/dist/cjs/biz-components/index.d.ts +3 -0
  60. package/dist/cjs/biz-components/index.js +1 -1
  61. package/dist/cjs/components/link.js +1 -1
  62. package/dist/cjs/hooks/useBoaButton.d.ts +27 -0
  63. package/dist/cjs/hooks/useBoaButton.js +1 -0
  64. package/dist/cjs/hooks/useDraggableScroll.js +1 -1
  65. package/dist/cjs/hooks/useExposure.d.ts +1 -1
  66. package/dist/cjs/hooks/useExposure.js +1 -1
  67. package/dist/cjs/hooks/useViewItemList.d.ts +1 -1
  68. package/dist/cjs/index.d.ts +10 -2
  69. package/dist/cjs/index.js +1 -1
  70. package/dist/cjs/shared/ContainerGridContext.d.ts +20 -0
  71. package/dist/cjs/shared/ContainerGridContext.js +1 -0
  72. package/dist/cjs/shared/Styles.d.ts +2 -0
  73. package/dist/cjs/shared/Styles.js +1 -1
  74. package/dist/cjs/shared/adTrack.d.ts +38 -0
  75. package/dist/cjs/shared/adTrack.js +1 -0
  76. package/dist/cjs/shared/amazonAttribution.d.ts +31 -0
  77. package/dist/cjs/shared/amazonAttribution.js +1 -0
  78. package/dist/cjs/shared/mediaGridSpec.d.ts +87 -0
  79. package/dist/cjs/shared/mediaGridSpec.js +1 -0
  80. package/dist/cjs/stories/BoaStoryProvider.d.ts +10 -0
  81. package/dist/cjs/stories/BoaStoryProvider.js +1 -0
  82. package/dist/esm/biz-components/ActiveShelf/ProductCard.d.ts +4 -1
  83. package/dist/esm/biz-components/ActiveShelf/ProductCard.js +1 -1
  84. package/dist/esm/biz-components/ActiveShelf/index.d.ts +2 -2
  85. package/dist/esm/biz-components/ActiveShelf/index.js +1 -1
  86. package/dist/esm/biz-components/ActiveShelf/types.d.ts +12 -1
  87. package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
  88. package/dist/esm/biz-components/AiuiProvider/index.d.ts +28 -0
  89. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  90. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +2 -0
  91. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  92. package/dist/esm/biz-components/BrandEquity/types.d.ts +2 -0
  93. package/dist/esm/biz-components/Chat/button.js +1 -1
  94. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  95. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  96. package/dist/esm/biz-components/HeroBanner/types.d.ts +12 -6
  97. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  98. package/dist/esm/biz-components/ImageWithText/types.d.ts +8 -2
  99. package/dist/esm/biz-components/Ksp/index.d.ts +2 -0
  100. package/dist/esm/biz-components/Ksp/index.js +1 -1
  101. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +8 -2
  102. package/dist/esm/biz-components/Listing/BizProductProvider.js +1 -1
  103. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingMethod.js +1 -1
  104. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  105. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
  106. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
  107. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  108. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  109. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  110. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  111. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  112. package/dist/esm/biz-components/Listing/hooks/useBenefits.js +1 -1
  113. package/dist/esm/biz-components/Listing/types/product.d.ts +9 -0
  114. package/dist/esm/biz-components/Listing/types.d.ts +19 -0
  115. package/dist/esm/biz-components/Listing/utils/priceCalc.d.ts +28 -0
  116. package/dist/esm/biz-components/Listing/utils/priceCalc.js +1 -0
  117. package/dist/esm/biz-components/MarqueeReview/index.js +1 -1
  118. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  119. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +2 -2
  120. package/dist/esm/biz-components/ProductCompare/index.d.ts +1 -1
  121. package/dist/esm/biz-components/ProductCompare/index.js +1 -1
  122. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  123. package/dist/esm/biz-components/ProductHero/types.d.ts +2 -0
  124. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  125. package/dist/esm/biz-components/ProductNav/types.d.ts +5 -2
  126. package/dist/esm/biz-components/SecondaryBanner/index.d.ts +5 -4
  127. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  128. package/dist/esm/biz-components/Specs/dropdown.js +1 -2
  129. package/dist/esm/biz-components/Specs/index.js +1 -1
  130. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  131. package/dist/esm/biz-components/index.d.ts +3 -0
  132. package/dist/esm/biz-components/index.js +1 -1
  133. package/dist/esm/components/link.js +1 -1
  134. package/dist/esm/hooks/useBoaButton.d.ts +27 -0
  135. package/dist/esm/hooks/useBoaButton.js +1 -0
  136. package/dist/esm/hooks/useDraggableScroll.js +1 -1
  137. package/dist/esm/hooks/useExposure.d.ts +1 -1
  138. package/dist/esm/hooks/useExposure.js +1 -1
  139. package/dist/esm/hooks/useViewItemList.d.ts +1 -1
  140. package/dist/esm/index.d.ts +10 -2
  141. package/dist/esm/index.js +1 -1
  142. package/dist/esm/shared/ContainerGridContext.d.ts +20 -0
  143. package/dist/esm/shared/ContainerGridContext.js +1 -0
  144. package/dist/esm/shared/Styles.d.ts +2 -0
  145. package/dist/esm/shared/Styles.js +1 -1
  146. package/dist/esm/shared/adTrack.d.ts +38 -0
  147. package/dist/esm/shared/adTrack.js +1 -0
  148. package/dist/esm/shared/amazonAttribution.d.ts +31 -0
  149. package/dist/esm/shared/amazonAttribution.js +1 -0
  150. package/dist/esm/shared/mediaGridSpec.d.ts +87 -0
  151. package/dist/esm/shared/mediaGridSpec.js +1 -0
  152. package/dist/esm/stories/BoaStoryProvider.d.ts +10 -0
  153. package/dist/esm/stories/BoaStoryProvider.js +1 -0
  154. package/dist/tokens/base.css +22 -1
  155. package/package.json +5 -2
  156. package/style.css +250 -136
  157. package/tailwind.config.js +5 -0
@@ -1,6 +1,10 @@
1
1
  import type { ButtonProps } from '../../components/button.js';
2
2
  import type { Media, Theme } from '../../types/props.js';
3
+ import type { BoaButtonFields } from '../../hooks/useBoaButton.js';
3
4
  type TitleSizeType = '5' | '4' | '3' | '2' | '1';
5
+ export type HeroBannerBlockLinkConfig = BoaButtonFields & {
6
+ target?: '_self' | '_blank';
7
+ };
4
8
  /** 5-breakpoint media tier keys (Tailwind preset boundaries). */
5
9
  export type HeroBannerMediaTier = 'lgDesktop' | 'desktop' | 'laptop' | 'tablet' | 'mobile';
6
10
  /**
@@ -115,12 +119,13 @@ export interface HeroBannerSlideData extends HeroBannerTieredMediaFields, HeroBa
115
119
  isShowVideo?: boolean;
116
120
  isVideoLoop?: boolean;
117
121
  blockLink?: string;
122
+ blockLinkConfig?: HeroBannerBlockLinkConfig;
118
123
  primaryButton?: {
119
124
  text: string;
120
125
  link?: string;
121
126
  isCustomPrimaryButton?: boolean;
122
127
  customPrimaryEventId?: string;
123
- } & Omit<ButtonProps, 'children'>;
128
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
124
129
  secondaryButton?: {
125
130
  text: string;
126
131
  link?: string;
@@ -132,13 +137,13 @@ export interface HeroBannerSlideData extends HeroBannerTieredMediaFields, HeroBa
132
137
  isYoutubeVideo?: boolean;
133
138
  isCustomSecondaryButton?: boolean;
134
139
  customSecondaryEventId?: string;
135
- } & Omit<ButtonProps, 'children'>;
140
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
136
141
  tertiaryButton?: {
137
142
  text: string;
138
143
  link?: string;
139
144
  isCustomTertiaryButton?: boolean;
140
145
  customTertiaryEventId?: string;
141
- } & Omit<ButtonProps, 'children'>;
146
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
142
147
  theme?: Theme;
143
148
  /**
144
149
  * 单帧轮播间隔(秒),覆盖全局默认间隔。可选范围 1-30 秒,不允许 999;
@@ -187,6 +192,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
187
192
  /** 视频是否循环播放 */
188
193
  isVideoLoop?: boolean;
189
194
  blockLink?: string;
195
+ blockLinkConfig?: HeroBannerBlockLinkConfig;
190
196
  /** 主按钮文本和配置 */
191
197
  primaryButton?: {
192
198
  text: string;
@@ -194,7 +200,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
194
200
  isCustomPrimaryButton?: boolean;
195
201
  /** 自定义事件ID,传递给 onPrimaryClick */
196
202
  customPrimaryEventId?: string;
197
- } & Omit<ButtonProps, 'children'>;
203
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
198
204
  /** 次要按钮文本和配置 */
199
205
  secondaryButton?: {
200
206
  text: string;
@@ -209,7 +215,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
209
215
  isCustomSecondaryButton?: boolean;
210
216
  /** 自定义事件ID,传递给 onSecondaryClick */
211
217
  customSecondaryEventId?: string;
212
- } & Omit<ButtonProps, 'children'>;
218
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
213
219
  /** 第三按钮文本和配置 */
214
220
  tertiaryButton?: {
215
221
  text: string;
@@ -217,7 +223,7 @@ export interface HeroBannerProps extends Omit<React.HTMLAttributes<HTMLDivElemen
217
223
  isCustomTertiaryButton?: boolean;
218
224
  /** 自定义事件ID,传递给 onTertiaryClick */
219
225
  customTertiaryEventId?: string;
220
- } & Omit<ButtonProps, 'children'>;
226
+ } & BoaButtonFields & Omit<ButtonProps, 'children'>;
221
227
  /** 主题 */
222
228
  theme?: Theme;
223
229
  /**
@@ -1 +1 @@
1
- "use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s(e))!d.call(t,i)&&i!==r&&n(t,i,{get:()=>e[i],enumerable:!(o=a(e,i))||o.enumerable});return t};var m=t=>l(n({},"__esModule",{value:!0}),t);var u={};module.exports=m(u);
1
+ "use strict";var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of s(e))!d.call(t,i)&&i!==a&&n(t,i,{get:()=>e[i],enumerable:!(o=r(e,i))||o.enumerable});return t};var u=t=>l(n({},"__esModule",{value:!0}),t);var m={};module.exports=u(m);
@@ -1 +1 @@
1
- "use strict";"use client";var Ne=Object.create;var S=Object.defineProperty;var Te=Object.getOwnPropertyDescriptor;var Ie=Object.getOwnPropertyNames;var Le=Object.getPrototypeOf,Pe=Object.prototype.hasOwnProperty;var Ve=(n,c)=>{for(var v in c)S(n,v,{get:c[v],enumerable:!0})},te=(n,c,v,w)=>{if(c&&typeof c=="object"||typeof c=="function")for(let u of Ie(c))!Pe.call(n,u)&&u!==v&&S(n,u,{get:()=>c[u],enumerable:!(w=Te(c,u))||w.enumerable});return n};var Se=(n,c,v)=>(v=n!=null?Ne(Le(n)):{},te(c||!n||!n.__esModule?S(v,"default",{value:n,enumerable:!0}):v,n)),Me=n=>te(S({},"__esModule",{value:!0}),n);var ze={};Ve(ze,{default:()=>De});module.exports=Me(ze);var e=require("react/jsx-runtime"),o=Se(require("react")),r=require("../../components/index.js"),l=require("../../helpers/utils.js"),ae=require("../../shared/Styles.js"),le=require("../../hooks/useExposure.js"),se=require("../../hooks/useIntersectionObserver.js"),re=require("../AiuiProvider/index.js"),ne=require("../../hooks/useTracking.js"),me=require("../../shared/trackUrlRef.js"),de=require("../../shared/track.js"),y=require("framer-motion");const z="image",H="image_with_text",ie=(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,e.jsx)("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"})}),oe=o.default.forwardRef(({data:n,className:c},v)=>{const{title:w,subtitle:u,desc:_,descIcon:M,image:N,padImage:E,mobileImage:R,theme:ce="dark",items:j=[],layout:pe="left",mediaType:xe="image",datalist:d=[],video:C,padVideo:W,mobVideo:A,button:b,textAlign:m="left",titleTag:ue}=n,i=pe,{locale:fe="us"}=(0,re.useAiuiContext)(),{buildRef:ge}=(0,ne.useTracking)(),D=(0,o.useRef)(null),I=(0,o.useRef)(null),L=(0,o.useRef)(null),P=(0,o.useRef)(null),q=(0,o.useRef)(null),[f,he]=(0,o.useState)(0),B=(0,o.useRef)([]),[$,ve]=(0,o.useState)({left:0,width:0}),[k,F]=(0,o.useState)(""),[O,U]=(0,o.useState)(""),[Z,G]=(0,o.useState)(""),p=d.length>0,T=xe==="video";(0,le.useExposure)(D,{componentType:z,componentName:H,componentTitle:w,componentDescription:u}),(0,o.useImperativeHandle)(v,()=>D.current),(0,o.useEffect)(()=>{if(d.length>0){const t=B.current[f];if(t){const{offsetLeft:s,offsetWidth:a}=t;ve({left:s,width:a})}}},[f,d.length]);const[J,be]=(0,o.useState)(!1);(0,se.useIntersectionObserverDelay)(q,{once:!0,threshold:.01,callback:()=>{be(!0)}}),(0,o.useEffect)(()=>{if(!J||!T)return;let t="",s="",a="";if(p&&d[f]){const g=d[f];t=g.video?.url||"",s=g.padVideo?.url||t,a=g.mobVideo?.url||t}else t=C?.url||"",s=W?.url||t,a=A?.url||t;t&&F(t),s&&U(s),a&&G(a),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},200)},[J,T,p,f,d,C?.url,W?.url,A?.url]);const we=(t,s)=>{if(he(t),s.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),T&&p&&d[t]){const a=d[t];a.video?.url&&F(a.video.url),a.padVideo?.url&&U(a.padVideo.url),a.mobVideo?.url&&G(a.mobVideo.url),setTimeout(()=>{[I.current?.querySelector("video"),L.current?.querySelector("video"),P.current?.querySelector("video")].forEach(h=>{h&&(h.load(),h.play().catch(()=>{}))})},300)}},K=(0,l.getLocalizedPath)(b?.link||"",fe),Q=b?.link?(0,me.trackUrlRef)(K,ge(z,H)):K,X=(0,de.buildClickTrackingProps)({interactive:!!b?.link,componentType:z,componentName:H,title:w,description:u,buttonName:b?.text}),_e=()=>!V||!b?.text||i==="top"||i==="bottom"?null:(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__button-wrapper laptop:mt-[32px] mt-[24px]",{"flex justify-center":m==="center","flex justify-start":m==="left"}),children:(0,e.jsx)(r.Link,{href:Q,...X,className:"image-with-text__button whitespace-nowrap no-underline",suffixIcon:ie,children:b.text})}),x=j.length>0,V=!!b,Y=()=>{if(p&&d[f]){const t=d[f];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return N?`${N?.url},${E?.url||N?.url} 1024, ${R?.url||N?.url} 768`:""},ee=()=>{if(p){const g=d[f],h=g.image?.url,ke=g.imgPad?.url||h,ye=g.imageMob?.url||h;return(0,e.jsx)(y.AnimatePresence,{mode:"wait",children:(0,e.jsx)(y.motion.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:(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:h,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:ke,src:O||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:ye,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},g.video?.url||g.image?.url)})}const t=N?.url,s=E?.url||t,a=R?.url||t;return(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:I,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:L,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:s,src:O||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:a,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return(0,e.jsxs)("section",{ref:D,"data-ui-component-id":"ImageWithText",className:(0,l.cn)("image-with-text text-info-primary",{"flex gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!p,"flex-col":!p&&(i==="top"||i==="bottom"),"items-center":i==="left"||i==="right","flex-col laptop:flex-row":!p&&(i==="left"||i==="right"),"flex l:gap-[24px] xl:flex-col min-md:justify-between min-l:gap-[20px]":p,"aiui-dark":ce==="dark"},c),children:[p&&(w||_||d.length>0)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":m==="left","text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:"image-with-text__header",children:[(0,e.jsx)(r.Heading,{as:"h3",size:4,html:w,className:"image-with-text__title"}),(0,e.jsx)(r.Text,{as:"p",size:1,html:_,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),(0,e.jsx)("div",{className:(0,l.cn)("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":m==="center"}),children:(0,e.jsxs)("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[(0,e.jsx)("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:$.left,width:$.width}}),d.map((t,s)=>(0,e.jsx)("div",{ref:a=>{B.current[s]=a},onClick:a=>we(s,a),className:(0,l.cn)("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]",f===s?"image-with-text__tab--active text-black":"text-white"),children:(0,e.jsx)(r.Heading,{as:ue??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},s))]})})]}),!p&&(w||u||_)&&(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__content flex w-full flex-col",{"justify-center":!V,"justify-between":V,"items-start":m==="left"&&x,"items-center":m==="center"&&x,"text-left":m==="left","text-center":m==="center","laptop:order-1":i==="left"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__main-content",{"flex flex-col":V}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":(i==="top"||i==="bottom")&&b?.text}),children:[(0,e.jsxs)("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[(0,e.jsx)(r.Heading,{as:"h2",size:4,html:w,className:(0,l.cn)("image-with-text__title",{"text-left":x&&m==="left","text-center":x&&m==="center"})}),u&&(0,e.jsx)(r.Text,{as:"p",size:x?4:3,html:u,className:(0,l.cn)("image-with-text__subtitle tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",{"laptop:mt-[16px]":!x,"min-xxl:mt-[8px] laptop:text-[16px] lg-desktop:text-[18px]":x,"text-left":x&&m==="left","text-center":x&&m==="center"})})]}),(i==="top"||i==="bottom")&&b?.text&&(0,e.jsx)(r.Link,{href:Q,...X,className:"laptop:flex hidden whitespace-nowrap no-underline",suffixIcon:ie,children:b.text})]}),!x&&(_||M)&&(0,e.jsxs)("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[M&&(0,e.jsx)("img",{src:M,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),_&&(0,e.jsx)(r.Heading,{as:"h4",size:5,html:_,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]"})]}),x&&(0,e.jsx)("div",{className:(0,l.cn)("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:j.map((t,s)=>(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item",{"text-center":m==="center"}),children:[(0,e.jsxs)("div",{className:(0,l.cn)("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":m==="center","justify-start":m==="left"}),children:[t.icon?.url&&(0,e.jsx)(r.Picture,{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"}),(0,e.jsx)(r.Heading,{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})]}),(0,e.jsx)(r.Text,{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]"})]},s))})]}),_e()]}),(0,e.jsx)("div",{ref:q,className:(0,l.cn)("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":x,"laptop:basis-[63%] desktop:basis-[57%]":x&&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]":p,"!max-w-none !max-h-none aspect-auto":i==="top"||i==="bottom"}),children:p?T?ee():(0,e.jsx)(y.AnimatePresence,{mode:"wait",children:(0,e.jsx)(y.motion.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:(0,e.jsx)(r.Picture,{source:Y(),alt:d[f].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]"})},d[f].image?.url)}):T?ee():(0,e.jsx)(r.Picture,{source:Y(),className:(0,l.cn)("image-with-text__image rounded-box laptop:rounded-box")})})]})});oe.displayName="ImageWithText";var De=(0,ae.withLayout)(oe);
1
+ "use strict";"use client";var ze=Object.create;var E=Object.defineProperty;var De=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var He=Object.getPrototypeOf,je=Object.prototype.hasOwnProperty;var Ae=(d,p)=>{for(var v in p)E(d,v,{get:p[v],enumerable:!0})},se=(d,p,v,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let x of Re(p))!je.call(d,x)&&x!==v&&E(d,x,{get:()=>p[x],enumerable:!(w=De(p,x))||w.enumerable});return d};var We=(d,p,v)=>(v=d!=null?ze(He(d)):{},se(p||!d||!d.__esModule?E(v,"default",{value:d,enumerable:!0}):v,d)),$e=d=>se(E({},"__esModule",{value:!0}),d);var Ge={};Ae(Ge,{default:()=>Fe});module.exports=$e(Ge);var e=require("react/jsx-runtime"),a=We(require("react")),s=require("../../components/index.js"),o=require("../../helpers/utils.js"),me=require("../../shared/Styles.js"),z=require("../../shared/mediaGridSpec.js"),de=require("../../shared/ContainerGridContext.js"),ce=require("../../hooks/useExposure.js"),pe=require("../../hooks/useIntersectionObserver.js"),xe=require("../AiuiProvider/index.js"),ue=require("../../hooks/useTracking.js"),he=require("../../shared/trackUrlRef.js"),fe=require("../../shared/track.js"),N=require("framer-motion");const H="image",j="image_with_text",Be={1:"grid-cols-1",2:"grid-cols-2"},qe={1:"tablet:grid-cols-1",2:"tablet:grid-cols-2",3:"tablet:grid-cols-3",4:"tablet:grid-cols-4"},Oe={1:"laptop:grid-cols-1",2:"laptop:grid-cols-2"},re=(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:(0,e.jsx)("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"})}),ne=a.default.forwardRef(({data:d,className:p},v)=>{const{title:w,subtitle:x,desc:_,descIcon:D,image:T,padImage:A,mobileImage:W,theme:ge="dark",items:I=[],layout:ve="left",mediaType:be="image",datalist:c=[],video:$,padVideo:B,mobVideo:q,button:b,textAlign:r="left",titleTag:we,caption:L}=d,i=ve,{locale:_e="us"}=(0,xe.useAiuiContext)(),{buildRef:ke}=(0,ue.useTracking)(),R=(0,a.useRef)(null),M=(0,a.useRef)(null),P=(0,a.useRef)(null),C=(0,a.useRef)(null),O=(0,a.useRef)(null),[u,ye]=(0,a.useState)(0),F=(0,a.useRef)([]),[G,Ne]=(0,a.useState)({left:0,width:0}),[k,U]=(0,a.useState)(""),[Z,J]=(0,a.useState)(""),[K,Q]=(0,a.useState)(""),n=c.length>0,S=be==="video",X=(0,de.useContainerGrid)(),Y=i==="bottom"?"bottom":"left-right",y=!n&&X?(0,z.resolveMediaGridSpec)(X.gridColumns,Y):void 0,Te=y?{...(0,z.mediaGridSpecToCssVars)(y),"--mw-l":`${y.laptop.w}px`,"--mw-d":`${y.desktop.w}px`,"--mw-x":`${y.lgDesktop.w}px`}:void 0,Ie=Be[Math.min(I.length,2)],Se=qe[Math.min(I.length,4)],Le=Oe[Math.min(I.length,2)];(0,ce.useExposure)(R,{componentType:H,componentName:j,componentTitle:w,componentDescription:x}),(0,a.useImperativeHandle)(v,()=>R.current),(0,a.useEffect)(()=>{if(c.length>0){const t=F.current[u];if(t){const{offsetLeft:m,offsetWidth:l}=t;Ne({left:m,width:l})}}},[u,c.length]);const[ee,Me]=(0,a.useState)(!1);(0,pe.useIntersectionObserverDelay)(O,{once:!0,threshold:.01,callback:()=>{Me(!0)}}),(0,a.useEffect)(()=>{if(!ee||!S)return;let t="",m="",l="";if(n&&c[u]){const f=c[u];t=f.video?.url||"",m=f.padVideo?.url||t,l=f.mobVideo?.url||t}else t=$?.url||"",m=B?.url||t,l=q?.url||t;t&&U(t),m&&J(m),l&&Q(l),setTimeout(()=>{[M.current?.querySelector("video"),P.current?.querySelector("video"),C.current?.querySelector("video")].forEach(g=>{g&&(g.load(),g.play().catch(()=>{}))})},200)},[ee,S,n,u,c,$?.url,B?.url,q?.url]);const Pe=(t,m)=>{if(ye(t),m.target.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),S&&n&&c[t]){const l=c[t];l.video?.url&&U(l.video.url),l.padVideo?.url&&J(l.padVideo.url),l.mobVideo?.url&&Q(l.mobVideo.url),setTimeout(()=>{[M.current?.querySelector("video"),P.current?.querySelector("video"),C.current?.querySelector("video")].forEach(g=>{g&&(g.load(),g.play().catch(()=>{}))})},300)}},te=(0,o.getLocalizedPath)(b?.link||"",_e),ie=b?.link?(0,he.trackUrlRef)(te,ke(H,j)):te,ae=(0,fe.buildClickTrackingProps)({interactive:!!b?.link,componentType:H,componentName:j,title:w,description:x,buttonName:b?.text}),Ce=()=>!V||!b?.text||i==="bottom"?null:(0,e.jsx)("div",{className:(0,o.cn)("image-with-text__button-wrapper mt-[24px]",{"flex justify-center":r==="center","flex justify-start":r==="left"}),children:(0,e.jsx)(s.Link,{href:ie,...ae,className:"image-with-text__button lg-desktop:text-[16px] whitespace-nowrap text-[14px] no-underline",suffixIcon:re,children:b.text})}),h=I.length>0,V=!!b,oe=()=>{if(n&&c[u]){const t=c[u];return`${t.image?.url} ,${t.imgPad?.url||t.image?.url} 1440, ${t.imageMob?.url||t.image?.url} 767`}return T?`${T?.url},${A?.url||T?.url} 1024, ${W?.url||T?.url} 768`:""},le=()=>{if(n){const f=c[u],g=f.image?.url,Ve=f.imgPad?.url||g,Ee=f.imageMob?.url||g;return(0,e.jsx)(N.AnimatePresence,{mode:"wait",children:(0,e.jsx)(N.motion.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:(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:M,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:g,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Ve,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:C,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:Ee,src:K||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})},f.video?.url||f.image?.url)})}const t=T?.url,m=A?.url||t,l=W?.url||t;return(0,e.jsxs)("div",{className:"image-with-text__video-wrapper rounded-box laptop:rounded-box overflow-hidden",children:[(0,e.jsx)("div",{ref:M,className:"image-with-text__desktop-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:t,src:k,loop:!0,className:"image-with-text__video image-with-text__video--desktop lg-desktop:block hidden size-full object-cover"})}),(0,e.jsx)("div",{ref:P,className:"image-with-text__tablet-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:m,src:Z||k,loop:!0,className:"image-with-text__video image-with-text__video--tablet tablet:block lg-desktop:hidden hidden"})}),(0,e.jsx)("div",{ref:C,className:"image-with-text__mobile-video-container",children:(0,e.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,poster:l,src:K||k,loop:!0,className:"image-with-text__video image-with-text__video--mobile tablet:hidden block"})})]})};return(0,e.jsxs)("section",{ref:R,"data-ui-component-id":"ImageWithText",className:(0,o.cn)("image-with-text text-info-primary",{flex:!n,"gap-[24px]":!n&&i==="bottom","gap-[24px] laptop:gap-[48px] lg-desktop:gap-[64px]":!n&&i!=="bottom","flex-col":!n&&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":ge==="dark"},p),children:[n&&(w||_||c.length>0)&&(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__tab-content min-md:gap-[24px] laptop:basis-[36%] inline-flex flex-col justify-center",{"text-left":r==="left","text-center":r==="center"}),children:[(0,e.jsxs)("div",{className:"image-with-text__header",children:[(0,e.jsx)(s.Heading,{as:"h3",size:4,html:w,className:"image-with-text__title"}),(0,e.jsx)(s.Text,{as:"p",size:1,html:_,className:"image-with-text__description tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]"})]}),(0,e.jsx)("div",{className:(0,o.cn)("image-with-text__tabs-wrapper md:scrollbar-hidden relative md:overflow-hidden md:overflow-x-scroll",{"flex justify-center":r==="center"}),children:(0,e.jsxs)("div",{className:"image-with-text__tabs rounded-btn relative inline-flex bg-[#1D1D1F] px-[4px] md:my-[24px]",children:[(0,e.jsx)("div",{className:"image-with-text__slider rounded-btn absolute inset-y-0 bg-white transition-all duration-300 ease-in-out",style:{left:G.left,width:G.width}}),c.map((t,m)=>(0,e.jsx)("div",{ref:l=>{F.current[m]=l},onClick:l=>Pe(m,l),className:(0,o.cn)("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]",u===m?"image-with-text__tab--active text-black":"text-white"),children:(0,e.jsx)(s.Heading,{as:we??"h3",size:1,html:t?.title,className:"image-with-text__tab-title text-balance-normal !whitespace-nowrap md:text-[14px]"})},m))]})})]}),!n&&(w||x||_)&&(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__content flex w-full flex-col",{"justify-center":!V,"justify-between":V,"items-start":r==="left"&&h,"items-center":r==="center"&&h,"text-left":r==="left","text-center":r==="center","laptop:order-1":i==="left"}),children:[(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__main-content",{"flex flex-col":V}),children:[(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__header",{"laptop:flex laptop:items-end laptop:justify-between laptop:gap-16":i==="bottom"&&b?.text}),children:[(0,e.jsxs)("div",{className:"image-with-text__title-wrapper flex min-w-0 flex-1 flex-col",children:[(0,e.jsx)(s.Heading,{as:"h2",size:4,html:w,className:(0,o.cn)("image-with-text__title",{"text-left":h&&r==="left","text-center":h&&r==="center"})}),x&&(0,e.jsx)(s.Text,{as:"p",size:h?4:3,html:x,className:(0,o.cn)("image-with-text__subtitle tablet:mt-[8px] lg-desktop:text-[16px] mt-[4px] text-[14px]",{"text-left":h&&r==="left","text-center":h&&r==="center"})})]}),i==="bottom"&&b?.text&&(0,e.jsx)(s.Link,{href:ie,...ae,className:"laptop:flex lg-desktop:text-[16px] hidden whitespace-nowrap text-[14px] no-underline",suffixIcon:re,children:b.text})]}),!h&&(_||D)&&(0,e.jsxs)("div",{className:"image-with-text__description flex flex-row gap-[8px]",children:[D&&(0,e.jsx)("img",{src:D,alt:"icon",className:"image-with-text__description-icon desktop:size-[48px] size-[36px]"}),_&&(0,e.jsx)(s.Heading,{as:"h4",size:5,html:_,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]"})]}),h&&(0,e.jsx)("div",{className:(0,o.cn)("image-with-text__items laptop:mt-[32px] desktop:mt-[24px] mt-[16px] grid w-full gap-6",Ie,Se,{"!mt-6":i==="bottom",[Le]:i==="left"||i==="right"}),children:I.map((t,m)=>(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__item",{"text-center":r==="center"}),children:[(0,e.jsxs)("div",{className:(0,o.cn)("image-with-text__item-header flex flex-row items-center gap-[8px]",{"justify-center":r==="center","justify-start":r==="left"}),children:[t.icon?.url&&(0,e.jsx)(s.Picture,{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"}),(0,e.jsx)(s.Heading,{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})]}),(0,e.jsx)(s.Text,{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]"})]},m))}),L&&(i==="left"||i==="right")&&(0,e.jsx)(s.Text,{as:"p",size:1,weight:"medium",html:L,className:(0,o.cn)("image-with-text__caption tablet:block text-info-secondary mt-[24px] hidden",{"text-center":r==="center"})})]}),Ce()]}),(0,e.jsx)("div",{ref:O,style:Te,className:(0,o.cn)("image-with-text__media-wrapper",y?Y==="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":h&&i!=="bottom","laptop:basis-[63%] desktop:basis-[57%]":h&&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==="bottom"}),children:n?S?le():(0,e.jsx)(N.AnimatePresence,{mode:"wait",children:(0,e.jsx)(N.motion.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:(0,e.jsx)(s.Picture,{source:oe(),alt:c[u].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]"})},c[u].image?.url)}):S?le():(0,e.jsx)(s.Picture,{source:oe(),className:(0,o.cn)("image-with-text__image rounded-box laptop:rounded-box size-full"),imgClassName:"h-full object-cover"})}),L&&!n&&(0,e.jsx)(s.Text,{as:"p",size:1,weight:"medium",html:L,className:(0,o.cn)("image-with-text__caption text-info-secondary mt-[-16px] w-full",{"tablet:hidden":i==="left"||i==="right","text-center":r==="center"})})]})});ne.displayName="ImageWithText";var Fe=(0,me.withLayout)(ne);
@@ -45,7 +45,7 @@ export interface ImageWithTextTabItem {
45
45
  title: string;
46
46
  }
47
47
  export type MediaType = 'image' | 'video';
48
- export type LayoutPosition = 'left' | 'right' | 'top' | 'bottom';
48
+ export type LayoutPosition = 'left' | 'right' | 'bottom';
49
49
  export type TextAlign = 'left' | 'center';
50
50
  /** 列数枚举类型 */
51
51
  export declare enum Cols {
@@ -68,7 +68,7 @@ export interface ImageWithTextProps {
68
68
  descIcon?: string;
69
69
  /** 主题,默认 dark */
70
70
  theme?: Theme;
71
- /** 布局位置,默认 left。支持上下左右布局(left/right/top/bottom) */
71
+ /** 布局位置,默认 left。支持左右布局(left/right)和上下布局(bottom,图下文上) */
72
72
  layout?: LayoutPosition;
73
73
  /** 媒体类型,默认 image。所有模式都支持 image 和 video */
74
74
  mediaType?: MediaType;
@@ -104,6 +104,12 @@ export interface ImageWithTextProps {
104
104
  datalist?: ImageWithTextTabItem[];
105
105
  /** 按钮配置 */
106
106
  button?: ButtonConfig;
107
+ /**
108
+ * 媒体说明文字(12px,可选,缺省不渲染)
109
+ * - bottom 布局:全断点位于图片下方,上方间距 8px
110
+ * - left/right 布局:≥768px 位于功能列表(图标组)下方(上方间距 24px),<768px 位于图片下方(上方间距 8px)
111
+ */
112
+ caption?: string;
107
113
  };
108
114
  /** 自定义类名 */
109
115
  className?: string;
@@ -1 +1 @@
1
- "use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var p=(i,t)=>{for(var a in t)o(i,a,{get:t[a],enumerable:!0})},s=(i,t,a,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of m(t))!g.call(i,e)&&e!==a&&o(i,e,{get:()=>t[e],enumerable:!(d=n(t,e))||d.enumerable});return i};var x=i=>s(o({},"__esModule",{value:!0}),i);var M={};p(M,{Cols:()=>r});module.exports=x(M);var r=(e=>(e.One="1",e.Two="2",e.Three="3",e.Four="4",e))(r||{});
1
+ "use strict";var o=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var p=(i,t)=>{for(var a in t)o(i,a,{get:t[a],enumerable:!0})},s=(i,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of g(t))!m.call(i,e)&&e!==a&&o(i,e,{get:()=>t[e],enumerable:!(r=n(t,e))||r.enumerable});return i};var x=i=>s(o({},"__esModule",{value:!0}),i);var M={};p(M,{Cols:()=>d});module.exports=x(M);var d=(e=>(e.One="1",e.Two="2",e.Three="3",e.Four="4",e))(d||{});
@@ -7,6 +7,8 @@ export interface KspCardItem {
7
7
  title?: string;
8
8
  /** 描述 */
9
9
  desc?: string;
10
+ /** 主题(逐项独立设置,跟随该卡片物料背景色系;不影响组件顶层 theme),默认 light */
11
+ theme?: Theme;
10
12
  /** 移动端图片 */
11
13
  mobImage?: Media;
12
14
  /** 移动端视频 */
@@ -1 +1 @@
1
- "use strict";"use client";var N=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var H=(a,t)=>{for(var p in t)N(a,p,{get:t[p],enumerable:!0})},V=(a,t,p,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of $(t))!q.call(a,e)&&e!==p&&N(a,e,{get:()=>t[e],enumerable:!(n=_(t,e))||n.enumerable});return a};var F=a=>V(N({},"__esModule",{value:!0}),a);var B={};H(B,{default:()=>S});module.exports=F(B);var s=require("react/jsx-runtime"),C=require("react-responsive"),k=require("../../components/index.js"),c=require("../../helpers/utils.js"),z=require("../../shared/Styles.js");const G=({title:a,desc:t,mobImage:p,mobVideo:n,tabletImage:e,tabletVideo:f,laptopImage:d,laptopVideo:r,desktopImage:o,desktopVideo:w,image:l,video:b,className:x,theme:I,classNames:h})=>{const T=(0,C.useMediaQuery)({query:"(max-width: 767px)"}),K=(0,C.useMediaQuery)({query:"(min-width: 768px) and (max-width: 1024px)"}),v=(0,C.useMediaQuery)({query:"(min-width: 1025px) and (max-width: 1439px)"}),j=()=>T?n||f||r||w||b:K?f||r||w||b:v?r||w||b:w||b,D=()=>T?p||e||d||o||l:K?e||d||o||l:v?d||o||l:o||l,P=j(),L=D(),O=()=>{const g=[],y=l?.url||o?.url,i=o?.url||l?.url,u=d?.url||i,m=e?.url||u,M=p?.url||m;return y&&g.push(y),i&&i!==y&&g.push(`${i} 1920`),u&&u!==i&&g.push(`${u} 1440`),m&&m!==u&&g.push(`${m} 1025`),M&&M!==m&&g.push(`${M} 768`),g.length>0?g.join(", "):void 0},R=!!P?.url,A=!!(p?.url||e?.url||d?.url||o?.url||l?.url);return(0,s.jsxs)("div",{className:(0,c.cn)("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":I==="dark"},x,h?.card),children:[R?(0,s.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:(0,c.cn)("ksp-card-video absolute bottom-0 w-full object-cover",h?.cardVideo)}):A&&(0,s.jsx)(k.Picture,{source:O(),alt:L?.alt||"",className:(0,c.cn)("ksp-card-image size-full",h?.cardImage),imgClassName:(0,c.cn)("size-full object-cover object-bottom",h?.cardImageImg)}),(0,s.jsxs)("div",{className:(0,c.cn)("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",h?.cardContent),children:[(0,s.jsx)(k.Heading,{size:3,html:a,className:(0,c.cn)("ksp-card-title tablet:block hidden w-full",h?.cardTitle)}),(0,s.jsx)(k.Heading,{size:2,html:a,className:(0,c.cn)("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",h?.cardTitle)}),(0,s.jsx)(k.Text,{size:2,html:t,className:(0,c.cn)("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",h?.cardDesc)})]})]})},U={4:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 laptop:col-span-6 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-2 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 laptop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-2 tablet:col-span-1 laptop:col-span-3 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 laptop:col-span-3 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-2 laptop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},Y={4:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]"},5:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},6:{0:"col-span-2 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"},7:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-2 tablet:col-span-2 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-4 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},8:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-2 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-2 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[226] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 tablet:col-span-1 laptop:col-span-4 desktop:col-span-4 lg-desktop:col-span-4 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 tablet:col-span-2 laptop:col-span-7 desktop:col-span-7 lg-desktop:col-span-7 aspect-w-[173] aspect-h-[240] tablet:aspect-w-[465] tablet:aspect-h-[240] laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",8:"col-span-2 tablet:col-span-1 laptop:col-span-5 desktop:col-span-5 lg-desktop:col-span-5 aspect-w-[358] aspect-h-[240] tablet:aspect-w-[227] tablet:aspect-h-[240] laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"}},E=(a,t,p)=>(p===12?Y:U)[t]?.[a]||"";function Q({data:a,className:t,classNames:p,...n}){const{title:e,titleTag:f,items:d,theme:r="light",gridColumns:o}=a,w=o?Number(o):10,l=w===12;return(0,s.jsxs)("section",{...n,"data-ui-component-id":"ksp",className:(0,c.cn)("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":r==="dark"},t,p?.root),children:[(0,s.jsx)(k.Heading,{as:f??"h2",size:4,html:e,className:(0,c.cn)("ksp-title laptop:text-center text-left",p?.title)}),(0,s.jsx)("div",{className:(0,c.cn)("ksp-layout tablet:grid-cols-3 laptop:gap-4 mt-[24px] grid grid-cols-2 gap-3",l?"laptop:grid-cols-12":"laptop:grid-cols-10",p?.layout),children:d.map((b,x)=>(0,s.jsx)(G,{...b,className:E(x,d.length,w),classNames:p},x))})]})}var S=(0,z.withLayout)(Q);
1
+ "use strict";"use client";var T=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var H=(s,p)=>{for(var t in p)T(s,t,{get:p[t],enumerable:!0})},V=(s,p,t,w)=>{if(p&&typeof p=="object"||typeof p=="function")for(let e of $(p))!q.call(s,e)&&e!==t&&T(s,e,{get:()=>p[e],enumerable:!(w=_(p,e))||w.enumerable});return s};var F=s=>V(T({},"__esModule",{value:!0}),s);var B={};H(B,{default:()=>S});module.exports=F(B);var a=require("react/jsx-runtime"),C=require("react-responsive"),h=require("../../components/index.js"),c=require("../../helpers/utils.js"),z=require("../../shared/Styles.js");const G=({title:s,desc:p,mobImage:t,mobVideo:w,tabletImage:e,tabletVideo:x,laptopImage:d,laptopVideo:i,desktopImage:o,desktopVideo:n,image:l,video:r,className:b,theme:I,classNames:k})=>{const N=(0,C.useMediaQuery)({query:"(max-width: 767px)"}),K=(0,C.useMediaQuery)({query:"(min-width: 768px) and (max-width: 1024px)"}),v=(0,C.useMediaQuery)({query:"(min-width: 1025px) and (max-width: 1439px)"}),j=()=>N?w||x||i||n||r:K?x||i||n||r:v?i||n||r:n||r,D=()=>N?t||e||d||o||l:K?e||d||o||l:v?d||o||l:o||l,P=j(),L=D(),O=()=>{const g=[],y=l?.url||o?.url,u=o?.url||l?.url,m=d?.url||u,f=e?.url||m,M=t?.url||f;return y&&g.push(y),u&&u!==y&&g.push(`${u} 1920`),m&&m!==u&&g.push(`${m} 1440`),f&&f!==m&&g.push(`${f} 1025`),M&&M!==f&&g.push(`${M} 768`),g.length>0?g.join(", "):void 0},R=!!P?.url,A=!!(t?.url||e?.url||d?.url||o?.url||l?.url);return(0,a.jsxs)("div",{className:(0,c.cn)("ksp-card rounded-box text-info-primary relative overflow-hidden",{"aiui-dark":I==="dark"},b,k?.card),children:[R?(0,a.jsx)("video",{playsInline:!0,autoPlay:!0,muted:!0,loop:!0,src:P?.url,poster:L?.url,className:(0,c.cn)("ksp-card-video absolute bottom-0 w-full object-cover",k?.cardVideo)}):A&&(0,a.jsx)(h.Picture,{source:O(),alt:L?.alt||"",className:(0,c.cn)("ksp-card-image size-full",k?.cardImage),imgClassName:(0,c.cn)("size-full object-cover object-bottom",k?.cardImageImg)}),(0,a.jsxs)("div",{className:(0,c.cn)("ksp-card-content desktop:p-6 lg-desktop:p-8 p-4",k?.cardContent),children:[(0,a.jsx)(h.Heading,{size:3,html:s,className:(0,c.cn)("ksp-card-title tablet:block hidden w-full",k?.cardTitle)}),(0,a.jsx)(h.Heading,{size:2,html:s,className:(0,c.cn)("ksp-card-title tablet:hidden tablet:w-[340px] xs-tablet:text-[16px] block w-full",k?.cardTitle)}),(0,a.jsx)(h.Text,{size:2,html:p,className:(0,c.cn)("ksp-card-desc text-info-primary tablet:block tablet:text-[14px] laptop:text-[14px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] text-[14px]",k?.cardDesc)})]})]})},U={4:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},5:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]"},6:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},7:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]"},8:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-6 laptop:aspect-w-[440] laptop:aspect-h-[240] desktop:aspect-w-[648] desktop:aspect-h-[256] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-3 laptop:aspect-w-[212] laptop:aspect-h-[240] desktop:aspect-w-[316] desktop:aspect-h-[256] lg-desktop:aspect-w-[404] lg-desktop:aspect-h-[320]",8:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"}},Y={4:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]"},5:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},6:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"},7:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-5 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-7 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-4 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-4 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},8:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]"},9:{0:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",1:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",2:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]",3:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",4:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",5:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",6:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-4 lg-desktop:col-span-4 laptop:aspect-w-[288] laptop:aspect-h-[240] desktop:aspect-w-[426] desktop:aspect-h-[256] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[320]",7:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-7 lg-desktop:col-span-7 laptop:aspect-w-[516] laptop:aspect-h-[240] desktop:aspect-w-[758] desktop:aspect-h-[256] lg-desktop:aspect-w-[964] lg-desktop:aspect-h-[320]",8:"col-span-1 aspect-w-[358] aspect-h-[200] laptop:col-span-5 lg-desktop:col-span-5 laptop:aspect-w-[364] laptop:aspect-h-[240] desktop:aspect-w-[538] desktop:aspect-h-[256] lg-desktop:aspect-w-[684] lg-desktop:aspect-h-[320]"}},E=(s,p,t)=>(t===12?Y:U)[p]?.[s]||"";function Q({data:s,className:p,classNames:t,...w}){const{title:e,titleTag:x,items:d,theme:i="light",gridColumns:o}=s,n=o?Number(o):10,l=n===12;return(0,a.jsxs)("section",{...w,"data-ui-component-id":"ksp",className:(0,c.cn)("ksp-container text-info-primary laptop:scroll-mt-[46px] flex scroll-mt-[108px] flex-col justify-center",{"aiui-dark":i==="dark"},p,t?.root),children:[(0,a.jsx)(h.Heading,{as:x??"h2",size:4,html:e,className:(0,c.cn)("ksp-title laptop:text-center text-left",t?.title)}),(0,a.jsx)("div",{className:(0,c.cn)("ksp-layout tablet:grid-cols-2 laptop:gap-4 mt-[24px] grid grid-cols-1 gap-3",l?"laptop:grid-cols-12":"laptop:grid-cols-10",t?.layout),children:d.map((r,b)=>(0,a.jsx)(G,{...r,className:E(b,d.length,n),classNames:t},b))})]})}var S=(0,z.withLayout)(Q);
@@ -2,7 +2,7 @@ import React, { type Dispatch, type SetStateAction, type PropsWithChildren } fro
2
2
  import type { Product, ProductPrice, ProductVariant, VariantCoupon, Options, FreeGift } from './types/product';
3
3
  import type { BundleOption, ProductBundleProps } from './components/ProductCard/ProductDetail/ProductBundle/types.js';
4
4
  import type { ProductFunctionFreeGiftProps } from './components/ProductCard/ProductDetail/ProductFunctionFreeGift';
5
- import type { CompareData, DiscountData } from './types.js';
5
+ import type { CompareData, DiscountData, ListingFormattedPrices } from './types.js';
6
6
  type Country = {
7
7
  id?: number;
8
8
  name?: string;
@@ -76,6 +76,8 @@ export type JoinedRecommendBuyProducts = {
76
76
  };
77
77
  export type CreditsRedemption = {
78
78
  amount: number;
79
+ /** 宿主已格式化的积分抵现金额(含货币符号)。未传入时回退到内置 formatPrice */
80
+ formattedAmount?: string;
79
81
  availablePoints: number;
80
82
  usedPoints: number;
81
83
  skuDetails?: {
@@ -102,6 +104,10 @@ export interface ProductContextType {
102
104
  finalPrice: number;
103
105
  comparePrice: number;
104
106
  totalSavings: number;
107
+ /**
108
+ * 宿主已格式化好的价格字符串。字段缺失时对应位置回退到内置 formatPrice(已废弃,将在下个大版本移除)。
109
+ */
110
+ formattedPrices?: ListingFormattedPrices;
105
111
  selectedOptions: Options;
106
112
  setSelectedOptions: Dispatch<SetStateAction<Options>>;
107
113
  freeGift?: FreeGift;
@@ -139,5 +145,5 @@ export interface ProductContextType {
139
145
  }
140
146
  export declare const BizProductContext: React.Context<ProductContextType>;
141
147
  export declare const useBizProductContext: () => ProductContextType;
142
- declare const ProductProvider: ({ product, isLogin, profile, isMobile, isDesktop, children, renderRating, freeGift, bundle, checkedBundle, checkedGift, setCheckedBundle, setCheckedGift, functionFreeGift, checkedFunctionGifts, setCheckedFunctionGifts, variant, selectedOptions, setSelectedOptions, compareData, coupon, finalPrice, comparePrice, totalSavings, savingDetail, setSavingDetail, selectedVariants, onAddToCart, onBuyNow, creditsRedemption, memberFunctionResult, openModal, openSignInPopup, openAuthCodePopup, openSignUpPopup, renderInstallments, onUseCouponChange, onUseMemberDiscountChange, discount, buyNowLoading, addToCartLoading, notifyMeMode, onNotifyMeClick, }: PropsWithChildren<Omit<ProductContextType, "joinedRecommendBuyProducts" | "setJoinedRecommendBuyProducts" | "addOrder" | "setAddOrder" | "resolvedPayload">>) => import("react/jsx-runtime").JSX.Element;
148
+ declare const ProductProvider: ({ product, isLogin, profile, isMobile, isDesktop, children, renderRating, freeGift, bundle, checkedBundle, checkedGift, setCheckedBundle, setCheckedGift, functionFreeGift, checkedFunctionGifts, setCheckedFunctionGifts, variant, selectedOptions, setSelectedOptions, compareData, coupon, finalPrice, comparePrice, totalSavings, formattedPrices, savingDetail, setSavingDetail, selectedVariants, onAddToCart, onBuyNow, creditsRedemption, memberFunctionResult, openModal, openSignInPopup, openAuthCodePopup, openSignUpPopup, renderInstallments, onUseCouponChange, onUseMemberDiscountChange, discount, buyNowLoading, addToCartLoading, notifyMeMode, onNotifyMeClick, }: PropsWithChildren<Omit<ProductContextType, "joinedRecommendBuyProducts" | "setJoinedRecommendBuyProducts" | "addOrder" | "setAddOrder" | "resolvedPayload">>) => import("react/jsx-runtime").JSX.Element;
143
149
  export default ProductProvider;
@@ -1 +1 @@
1
- "use strict";var u=Object.defineProperty;var ne=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var ie=Object.prototype.hasOwnProperty;var ae=(e,o)=>{for(var r in o)u(e,r,{get:o[r],enumerable:!0})},de=(e,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of re(o))!ie.call(e,n)&&n!==r&&u(e,n,{get:()=>o[n],enumerable:!(a=ne(o,n))||a.enumerable});return e};var ce=e=>de(u({},"__esModule",{value:!0}),e);var le={};ae(le,{BizProductContext:()=>d,default:()=>pe,useBizProductContext:()=>ue});module.exports=ce(le);var P=require("react/jsx-runtime"),t=require("react"),m=require("./const.js");const d=(0,t.createContext)({}),ue=()=>{if(!(0,t.useContext)(d))throw new Error("useProductContext must be used in <ProductProvider>");return(0,t.useContext)(d)},se=({product:e,isLogin:o,profile:r,isMobile:a,isDesktop:n,children:b,renderRating:g,freeGift:y,bundle:f,checkedBundle:C,checkedGift:h,setCheckedBundle:v,setCheckedGift:S,functionFreeGift:x,checkedFunctionGifts:D,setCheckedFunctionGifts:B,variant:i,selectedOptions:R,setSelectedOptions:A,compareData:O,coupon:k,finalPrice:_,comparePrice:F,totalSavings:M,savingDetail:V,setSavingDetail:G,selectedVariants:T,onAddToCart:N,onBuyNow:w,creditsRedemption:E,memberFunctionResult:J,openModal:U,openSignInPopup:L,openAuthCodePopup:j,openSignUpPopup:W,renderInstallments:z,onUseCouponChange:I,onUseMemberDiscountChange:K,discount:Y,buyNowLoading:X,addToCartLoading:q,notifyMeMode:H,onNotifyMeClick:Q})=>{const[Z,s]=(0,t.useState)({}),[$,p]=(0,t.useState)([]),ee=(0,t.useMemo)(()=>{const te=i?.payload?.components??[],oe=m.VARIANT_PAYLOAD_EXCLUDED_KEYS;return te.filter(c=>{const l=c.componentKey??c.blockType??c.blockName;return l&&!oe.includes(l)}).length>0?i?.payload:e?.payload},[i?.payload,e?.payload]);return(0,t.useEffect)(()=>{i?.id&&(s({bundle:{value:void 0,canOperate:!0},gift:{value:void 0,canOperate:!0},exchange:{value:void 0,canOperate:!0}}),p([]))},[i?.id]),(0,P.jsx)(d.Provider,{value:{product:e,variant:i,isMobile:a,isDesktop:n,isLogin:o,profile:r,coupon:k,renderRating:g,finalPrice:_,comparePrice:F,savingDetail:V,setSavingDetail:G,totalSavings:M,selectedOptions:R,setSelectedOptions:A,freeGift:y,functionFreeGift:x,checkedFunctionGifts:D,setCheckedFunctionGifts:B,checkedGift:h,setCheckedGift:S,checkedBundle:C,setCheckedBundle:v,bundle:f,compareData:O,selectedVariants:T,onAddToCart:N,onBuyNow:w,joinedRecommendBuyProducts:Z,setJoinedRecommendBuyProducts:s,creditsRedemption:E,memberFunctionResult:J,openModal:U,openSignInPopup:L,openAuthCodePopup:j,openSignUpPopup:W,renderInstallments:z,onUseCouponChange:I,onUseMemberDiscountChange:K,discount:Y,buyNowLoading:X,addToCartLoading:q,notifyMeMode:H,onNotifyMeClick:Q,addOrder:$,setAddOrder:p,resolvedPayload:ee},children:b})};var pe=se;
1
+ "use strict";var u=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var ie=Object.getOwnPropertyNames;var ae=Object.prototype.hasOwnProperty;var de=(e,o)=>{for(var r in o)u(e,r,{get:o[r],enumerable:!0})},ce=(e,o,r,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of ie(o))!ae.call(e,n)&&n!==r&&u(e,n,{get:()=>o[n],enumerable:!(a=re(o,n))||a.enumerable});return e};var ue=e=>ce(u({},"__esModule",{value:!0}),e);var me={};de(me,{BizProductContext:()=>d,default:()=>le,useBizProductContext:()=>se});module.exports=ue(me);var P=require("react/jsx-runtime"),t=require("react"),m=require("./const.js");const d=(0,t.createContext)({}),se=()=>{if(!(0,t.useContext)(d))throw new Error("useProductContext must be used in <ProductProvider>");return(0,t.useContext)(d)},pe=({product:e,isLogin:o,profile:r,isMobile:a,isDesktop:n,children:b,renderRating:g,freeGift:y,bundle:f,checkedBundle:C,checkedGift:h,setCheckedBundle:v,setCheckedGift:S,functionFreeGift:x,checkedFunctionGifts:D,setCheckedFunctionGifts:B,variant:i,selectedOptions:R,setSelectedOptions:A,compareData:O,coupon:k,finalPrice:_,comparePrice:F,totalSavings:M,formattedPrices:V,savingDetail:G,setSavingDetail:T,selectedVariants:N,onAddToCart:w,onBuyNow:E,creditsRedemption:J,memberFunctionResult:L,openModal:U,openSignInPopup:j,openAuthCodePopup:W,openSignUpPopup:z,renderInstallments:I,onUseCouponChange:K,onUseMemberDiscountChange:Y,discount:X,buyNowLoading:q,addToCartLoading:H,notifyMeMode:Q,onNotifyMeClick:Z})=>{const[$,s]=(0,t.useState)({}),[ee,p]=(0,t.useState)([]),te=(0,t.useMemo)(()=>{const oe=i?.payload?.components??[],ne=m.VARIANT_PAYLOAD_EXCLUDED_KEYS;return oe.filter(c=>{const l=c.componentKey??c.blockType??c.blockName;return l&&!ne.includes(l)}).length>0?i?.payload:e?.payload},[i?.payload,e?.payload]);return(0,t.useEffect)(()=>{i?.id&&(s({bundle:{value:void 0,canOperate:!0},gift:{value:void 0,canOperate:!0},exchange:{value:void 0,canOperate:!0}}),p([]))},[i?.id]),(0,P.jsx)(d.Provider,{value:{product:e,variant:i,isMobile:a,isDesktop:n,isLogin:o,profile:r,coupon:k,renderRating:g,finalPrice:_,comparePrice:F,formattedPrices:V,savingDetail:G,setSavingDetail:T,totalSavings:M,selectedOptions:R,setSelectedOptions:A,freeGift:y,functionFreeGift:x,checkedFunctionGifts:D,setCheckedFunctionGifts:B,checkedGift:h,setCheckedGift:S,checkedBundle:C,setCheckedBundle:v,bundle:f,compareData:O,selectedVariants:N,onAddToCart:w,onBuyNow:E,joinedRecommendBuyProducts:$,setJoinedRecommendBuyProducts:s,creditsRedemption:J,memberFunctionResult:L,openModal:U,openSignInPopup:j,openAuthCodePopup:W,openSignUpPopup:z,renderInstallments:I,onUseCouponChange:K,onUseMemberDiscountChange:Y,discount:X,buyNowLoading:q,addToCartLoading:H,notifyMeMode:Q,onNotifyMeClick:Z,addOrder:ee,setAddOrder:p,resolvedPayload:te},children:b})};var le=pe;
@@ -1 +1 @@
1
- "use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var h=(e,t)=>{for(var p in t)i(e,p,{get:t[p],enumerable:!0})},k=(e,t,p,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of v(t))!y.call(e,r)&&r!==p&&i(e,r,{get:()=>t[r],enumerable:!(d=g(t,r))||d.enumerable});return e};var N=e=>k(i({},"__esModule",{value:!0}),e);var C={};h(C,{default:()=>E});module.exports=N(C);var o=require("react/jsx-runtime"),x=require("../../utils/index.js"),s=require("../../../AiuiProvider/index.js"),a=require("../../../../components/index.js"),l=require("../../../../helpers/index.js"),m=require("./type.js");const w=({item:e,index:t,active:p,toggleShipping:d,currencyCode:r,metafields:c,className:b=""})=>{const{copyWriting:f,locale:u="us"}=(0,s.useAiuiContext)();return(0,o.jsxs)("div",{role:"button",tabIndex:0,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&d(e,t)},className:(0,l.cn)("relative flex cursor-pointer justify-between gap-[16px] desktop:gap-3 lg-desktop:gap-5 overflow-hidden rounded-box border-2 border-[#E8E8E8] px-4 text-[#1F2021]",{"cursor-not-allowed opacity-60":e.disabled,"border-brand":p},b),onClick:()=>d(e,t),children:[(0,o.jsxs)("div",{className:"relative flex flex-col justify-center",children:[(0,o.jsx)(a.Text,{className:(0,l.cn)("laptop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.4]",{}),as:"p",html:e.title}),(0,o.jsx)(a.Text,{className:(0,l.cn)("laptop:text-[14px] lg-desktop:mt-1 text-[12px] font-bold leading-[1.4] text-[#6D6D6F]",{}),as:"p",html:e.subtitle})]}),(0,o.jsx)(a.Text,{className:(0,l.cn)("relative my-auto h-fit text-[18px] desktop:text-xl lg-desktop:text-2xl font-bold",{}),as:"p",html:e.price?(0,x.formatPrice)({amount:e.price,currencyCode:r,locale:u,removeTrailingZeros:!0}):f?.free}),e.mode!==m.ShippingMethodMode.FREE&&(0,o.jsx)("div",{className:(0,l.cn)("bg-brand-0 absolute -right-px -top-px rounded-bl-[8px] rounded-tr-[8px] overflow-hidden px-[8px] py-[2px] desktop:text-[14px] text-[12px] font-bold leading-[1.4] text-white"),children:c?.memberOnly})]})};var E=w;
1
+ "use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var h=(e,t)=>{for(var p in t)i(e,p,{get:t[p],enumerable:!0})},k=(e,t,p,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of v(t))!y.call(e,r)&&r!==p&&i(e,r,{get:()=>t[r],enumerable:!(d=g(t,r))||d.enumerable});return e};var N=e=>k(i({},"__esModule",{value:!0}),e);var C={};h(C,{default:()=>E});module.exports=N(C);var o=require("react/jsx-runtime"),x=require("../../utils/index.js"),s=require("../../../AiuiProvider/index.js"),a=require("../../../../components/index.js"),l=require("../../../../helpers/index.js"),m=require("./type.js");const w=({item:e,index:t,active:p,toggleShipping:d,currencyCode:r,metafields:c,className:f=""})=>{const{copyWriting:b,locale:u="us"}=(0,s.useAiuiContext)();return(0,o.jsxs)("div",{role:"button",tabIndex:0,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&d(e,t)},className:(0,l.cn)("relative flex cursor-pointer justify-between gap-[16px] desktop:gap-3 lg-desktop:gap-5 overflow-hidden rounded-box border-2 border-[#E8E8E8] px-4 text-[#1F2021]",{"cursor-not-allowed opacity-60":e.disabled,"border-brand":p},f),onClick:()=>d(e,t),children:[(0,o.jsxs)("div",{className:"relative flex flex-col justify-center",children:[(0,o.jsx)(a.Text,{className:(0,l.cn)("laptop:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold leading-[1.4]",{}),as:"p",html:e.title}),(0,o.jsx)(a.Text,{className:(0,l.cn)("laptop:text-[14px] lg-desktop:mt-1 text-[12px] font-bold leading-[1.4] text-[#6D6D6F]",{}),as:"p",html:e.subtitle})]}),(0,o.jsx)(a.Text,{className:(0,l.cn)("relative my-auto h-fit text-[18px] desktop:text-xl lg-desktop:text-2xl font-bold",{}),as:"p",html:e.price?e.formattedPrice??(0,x.formatPrice)({amount:e.price,currencyCode:r,locale:u,removeTrailingZeros:!0}):b?.free}),e.mode!==m.ShippingMethodMode.FREE&&(0,o.jsx)("div",{className:(0,l.cn)("bg-brand-0 absolute -right-px -top-px rounded-bl-[8px] rounded-tr-[8px] overflow-hidden px-[8px] py-[2px] desktop:text-[14px] text-[12px] font-bold leading-[1.4] text-white"),children:c?.memberOnly})]})};var E=w;
@@ -1,4 +1,4 @@
1
- "use strict";var ue=Object.create;var P=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var be=Object.getPrototypeOf,ge=Object.prototype.hasOwnProperty;var xe=(t,s)=>{for(var o in s)P(t,o,{get:s[o],enumerable:!0})},$=(t,s,o,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of me(s))!ge.call(t,c)&&c!==o&&P(t,c,{get:()=>s[c],enumerable:!(l=fe(s,c))||l.enumerable});return t};var B=(t,s,o)=>(o=t!=null?ue(be(t)):{},$(s||!t||!t.__esModule?P(o,"default",{value:t,enumerable:!0}):o,t)),Ce=t=>$(P({},"__esModule",{value:!0}),t);var Te={};xe(Te,{default:()=>we});module.exports=Ce(Te);var e=require("react/jsx-runtime"),i=require("../../../../../components/index.js"),f=B(require("./ProductBenefitsTabs/index.js")),G=require("../../../BizProductProvider.js"),W=require("../../../hooks/useComponentData.js"),q=require("../../../hooks/useBenefits.js"),N=require("../../../utils/index.js"),I=require("../../../utils/textFormat.js"),p=B(require("react")),U=require("../../../../AiuiProvider/index.js"),Y=B(require("../../../../../hooks/useCountDown.js")),J=B(require("../../../hooks/useCopy.js")),C=require("../../../../../helpers/index.js"),K=B(require("./ProductBenefitsTabs/ModalContainer.js")),Q=require("../../../../../shared/Styles.js"),X=B(require("./CreditCouponRedeem/index.js"));const he={couponCode:"Code",copyCode:"Copy Code",copied:"Copied",expired:"Expired",offCoupon:"{discount} off coupon",offMemberOnly:"{amount} off Member Only",loginNow:"Login now",selectFreeGift:"You can select the free gift below.",bundleSaveUpTo:"Bundle purchases save extra up to",bundleOffer:"We offer {count} bundle for you",creditsTitle:"Soundcore credits for cash",creditsDesc:"100 Soundcore credits=$1",off:" off",memberBenefitsNotLogin:"You will enjoy a {amount} member discount after logging in.",memberBenefitsNotLoginText:"Sign Up to Get Benefits Below",forNewMember:"{amount} off for New Member",expressShipping:"Express Shipping Method",creditsAfterActivation:"You will get soundcoreCredits after activation. ",active:"Active",flexibleInstallment:"Flexible installment payment "},ve=p.default.memo(function({endsAt:s,daysLeft:o,endsText:l,daysText:c,hurryLabel:b,expiredText:h,onOpenModal:w}){const{days:r,hours:T,minutes:m,seconds:F}=(0,Y.default)({endTime:s});return(0,e.jsx)("button",{onClick:w,className:"lg-desktop:mt-[24px] text-brand-0 laptop-md:mt-4 lg-desktop:text-[16px] md-l:hidden mt-[14px] text-left text-[14px] font-bold text-[#1F2021]",children:Number(r)<Number(o)?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("span",{children:[l," ",r==="00"?"0":r," ",c]}),(0,e.jsx)("span",{className:"font-bold",children:` ${T.toString()}:${m.toString()}:${F.toString()}`})]}):b||h})}),ye=({item:t,textConfig:s,benefitPayloadData:o})=>{const{trackingData:l}=(0,U.useAiuiContext)(),{copied:c,copy:b}=(0,J.default)(),[h,w]=(0,p.useState)(!1),r=l?.common?.coupon,{openModal:T}=(0,G.useBizProductContext)();return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("style",{jsx:!0,children:`
1
+ "use strict";var ue=Object.create;var P=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var me=Object.getOwnPropertyNames;var ge=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var xe=(t,s)=>{for(var o in s)P(t,o,{get:s[o],enumerable:!0})},$=(t,s,o,l)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of me(s))!be.call(t,c)&&c!==o&&P(t,c,{get:()=>s[c],enumerable:!(l=fe(s,c))||l.enumerable});return t};var B=(t,s,o)=>(o=t!=null?ue(ge(t)):{},$(s||!t||!t.__esModule?P(o,"default",{value:t,enumerable:!0}):o,t)),Ce=t=>$(P({},"__esModule",{value:!0}),t);var Te={};xe(Te,{default:()=>we});module.exports=Ce(Te);var e=require("react/jsx-runtime"),i=require("../../../../../components/index.js"),m=B(require("./ProductBenefitsTabs/index.js")),G=require("../../../BizProductProvider.js"),W=require("../../../hooks/useComponentData.js"),q=require("../../../hooks/useBenefits.js"),N=require("../../../utils/index.js"),F=require("../../../utils/textFormat.js"),p=B(require("react")),U=require("../../../../AiuiProvider/index.js"),Y=B(require("../../../../../hooks/useCountDown.js")),J=B(require("../../../hooks/useCopy.js")),h=require("../../../../../helpers/index.js"),K=B(require("./ProductBenefitsTabs/ModalContainer.js")),Q=require("../../../../../shared/Styles.js"),X=B(require("./CreditCouponRedeem/index.js"));const he={couponCode:"Code",copyCode:"Copy Code",copied:"Copied",expired:"Expired",offCoupon:"{discount} off coupon",offMemberOnly:"{amount} off Member Only",loginNow:"Login now",selectFreeGift:"You can select the free gift below.",bundleSaveUpTo:"Bundle purchases save extra up to",bundleOffer:"We offer {count} bundle for you",creditsTitle:"Soundcore credits for cash",creditsDesc:"100 Soundcore credits=$1",off:" off",memberBenefitsNotLogin:"You will enjoy a {amount} member discount after logging in.",memberBenefitsNotLoginText:"Sign Up to Get Benefits Below",forNewMember:"{amount} off for New Member",expressShipping:"Express Shipping Method",creditsAfterActivation:"You will get soundcoreCredits after activation. ",active:"Active",flexibleInstallment:"Flexible installment payment "},ve=p.default.memo(function({endsAt:s,daysLeft:o,endsText:l,daysText:c,hurryLabel:x,expiredText:v,onOpenModal:w}){const{days:r,hours:T,minutes:g,seconds:I}=(0,Y.default)({endTime:s});return(0,e.jsx)("button",{onClick:w,className:"lg-desktop:mt-[24px] text-brand-0 laptop-md:mt-4 lg-desktop:text-[16px] md-l:hidden mt-[14px] text-left text-[14px] font-bold text-[#1F2021]",children:Number(r)<Number(o)?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("span",{children:[l," ",r==="00"?"0":r," ",c]}),(0,e.jsx)("span",{className:"font-bold",children:` ${T.toString()}:${g.toString()}:${I.toString()}`})]}):x||v})}),ye=({item:t,textConfig:s,benefitPayloadData:o})=>{const{trackingData:l}=(0,U.useAiuiContext)(),{copied:c,copy:x}=(0,J.default)(),[v,w]=(0,p.useState)(!1),r=l?.common?.coupon,{openModal:T}=(0,G.useBizProductContext)();return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("style",{jsx:!0,children:`
2
2
  .coupon-card {
3
3
  /* \u4F7F\u7528mask\u521B\u5EFA\u5185\u5207\u5706\u89D2 */
4
4
  mask:
@@ -14,7 +14,7 @@
14
14
  bottom left;
15
15
  mask-repeat: no-repeat;
16
16
  }
17
- `}),(0,e.jsxs)("div",{style:{background:t.couponBgColor||"white"},className:(0,C.cn)("laptop:h-[112px] lg-desktop:h-[130px] relative h-[100px] overflow-hidden p-3",t.borderStyle==="inset"?"coupon-card ":"rounded-[8px]"),...t.useAble&&{role:"button",tabIndex:0,onClick:()=>{t?.onUseChange?.(h)!==!1&&w(!h)}},children:[t?.bgImage?.url&&(0,e.jsx)(i.Picture,{source:t.bgImage.url,alt:t.bgImage.alt,className:"absolute bottom-0 right-0 w-auto",imgClassName:"object-contain"}),(0,e.jsxs)("div",{className:"z-1 relative ",children:[(0,e.jsxs)("div",{className:"flex items-center justify-start",children:[t.useAble&&(0,e.jsx)(i.Checkbox,{size:"lg",className:"data-[state=checked]:border-primary mr-2 rounded-full border-[1.6px] border-[#D1D1D1]",checked:t?.isAutoUse}),(0,e.jsx)(i.Text,{html:t.title,className:"laptop:text-[20px] lg-desktop:text-[24px] text-[16px] font-bold leading-[1.2]"})]}),t.description&&(0,e.jsx)(i.Text,{...typeof t.description=="string"?{html:t.description}:{},as:"p",className:"lg-desktop:text-[16px] mt-2 pr-8 text-[14px] font-bold text-[#3D3D3F]",children:t.description}),t.code&&(0,e.jsxs)("div",{className:"laptop-md:mt-2 flex items-center gap-2",children:[(0,e.jsx)(i.Text,{html:`${o?.couponBenefitData?.commonCoupon?.couponCode}: ${t.code}`,className:"lg-desktop:text-[16px] text-[14px] font-bold text-[#3D3D3F]"}),(0,e.jsx)(i.Link,{className:"lg-desktop:text-[16px] text-[14px] font-bold underline",role:"button",tabIndex:0,onClick:m=>{m.preventDefault(),m.stopPropagation(),b(t.code||"")},children:c?r?.copied||o?.couponBenefitData?.commonCoupon?.copied:r?.copy||o?.couponBenefitData?.commonCoupon?.copyCode})]}),t.ends_at&&(0,e.jsx)(ve,{endsAt:t.ends_at,daysLeft:r?.hurry?.daysLeft??0,endsText:r?.ends??"",daysText:r?.days??"",hurryLabel:r?.hurry?.label??"",expiredText:o?.couponBenefitData?.commonCoupon?.expired??"",onOpenModal:()=>{r?.modal&&T(r?.modal)}})]})]})]})},Be=({coupons:t,className:s,textConfig:o,benefitPayloadData:l})=>(0,e.jsx)("div",{className:(0,C.cn)("laptop:grid laptop:grid-cols-2 laptop-md:grid-cols-1 flex flex-col gap-3",s),children:t?.map((c,b)=>(0,e.jsx)(ye,{item:c,textConfig:o,benefitPayloadData:l},b))}),Ne=({creditCouponRedeem:t,textConfig:s})=>{const{profile:o,variant:l,renderInstallments:c,onUseCouponChange:b,onUseMemberDiscountChange:h,discount:w,savingDetail:r,openModal:T,openSignInPopup:m,openAuthCodePopup:F,openSignUpPopup:ee,creditsRedemption:te}=(0,G.useBizProductContext)(),{usedPoints:De=0,availablePoints:ke=0}=te??{},[oe,A]=(0,p.useState)(!1),g=(0,W.useComponentData)("ProductBenefits")??{},[ne,Z]=(0,p.useState)(!1),ae=(0,q.useBenefits)({variant:l}),{locale:D="us",copyWriting:ie}=(0,U.useAiuiContext)(),H=(0,p.useRef)(null),se={...he,...s},{activated:le=!1}=o||{},{memberDiscount:v,commonCoupon:x,creditsRedemption:k,freeGift:E,functionFreeGift:j,bundle:R,paidShipping:re,fullGift:V,levelDiscount:z}=ae,n=(0,p.useMemo)(()=>{const a=g?.benefitTabs?.find(u=>u?.value==="coupon")??{},d=g?.benefitTabs?.find(u=>u?.value==="membership")??{},M=g?.benefitTabs?.find(u=>u?.value==="installment")??{},L=g?.benefitTabs?.find(u=>u?.value==="pay")??{};return{couponBenefitData:a,membershipBenefitData:d,installmentBenefitData:M,payBenefitData:L}},[g]),y=[x?.enable?{...x.config,isAutoUse:r?.coupon>0,useAble:!0,borderStyle:"rounded",code:x?.config?.title??"",description:x?.config?.desc??"",onUseChange:a=>{const d=a?w?.codeSavings??0:0;b?.(d)},title:(0,I.replaceTemplate)(n?.couponBenefitData?.commonCoupon?.offCoupon,{discount:x?.config?.value_type=="percentage"?Math.abs(Number(x?.config?.value||0))+"%":(0,N.formatPrice)({amount:Math.abs(Number(x?.config?.fixed_value||0)),currencyCode:l.price.currencyCode,locale:D})})}:null,v.enable?{useAble:!0,isAutoUse:!!o?.email&&!!r?.member,title:(0,I.replaceTemplate)(n?.couponBenefitData?.member?.offMemberOnly,{amount:(0,N.formatPrice)({amount:v?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D})}),description:(0,e.jsxs)(e.Fragment,{children:[o?.email?n?.couponBenefitData?.member?.memberDiscounts:n?.membershipBenefitData?.memberBenefitsNotLogin?.replace("{amount}",(0,N.formatPrice)({amount:v?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D}))??""," ",o?.email?"":(0,e.jsx)("span",{role:"button",tabIndex:0,onClick:()=>m?.(),className:"underline",children:n?.couponBenefitData?.member?.loginNow})]}),borderStyle:"rounded",onUseChange:a=>{if(o?.email){const d=a?v?.config?.amount??0:0;return h?.(d),!0}else return m?.(),!1}}:null,z.enable?{title:z?.config?.title??"",description:z?.config?.tag??"",borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.levelDiscount?.bgImage}}:null,j.enable?{title:j?.config?.title??"",description:n?.couponBenefitData?.freeGift?.selectFreeGift,borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.freeGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,E.enable?{title:E?.config?.title??"",description:n?.couponBenefitData?.freeGift?.selectFreeGift,borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.freeGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,R.enable?{title:`${n?.couponBenefitData?.bundle?.bundleSaveUpTo} ${R.config?.maxSavings}`,borderStyle:"inset",description:n?.couponBenefitData?.bundle?.bundleOffer.replace("{count}",R?.config?.bundleOptions?.length?.toString()??""),bgImage:{url:n?.couponBenefitData?.bundle?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,V.enable?{title:V?.config?.title??"",description:V?.config?.desc??"",borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.fullGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,k.enable?{title:n?.couponBenefitData?.creditsRedemption?.creditsTitle,description:n?.couponBenefitData?.creditsRedemption?.creditsDesc,borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.creditsRedemption?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null].filter(Boolean);(0,p.useEffect)(()=>{_(y?.length?"coupon":"membership")},[y?.length]),(0,p.useEffect)(()=>{A(!1)},[l?.id]);const[O,_]=(0,p.useState)("coupon"),pe=()=>{F?.()},ce=(a,d)=>{if(_(d),H.current){const M=H.current,L=a.currentTarget,u=L.offsetLeft-M.offsetWidth/2+L.offsetWidth/2;M.scrollTo({left:u,behavior:"smooth"})}},de=(0,p.useMemo)(()=>g?.benefitTabs?.map(a=>a?.value==="coupon"&&!y?.length?null:a).filter(Boolean),[g,y]);return f.default?(0,e.jsxs)(f.default,{className:"relative",onValueChange:a=>{_(a),A(a==="installment")},value:O,children:[(0,e.jsx)("div",{className:"absolute right-0 top-0 z-[1] h-[40px] w-[25px] rounded-xl bg-gradient-to-r from-transparent to-[#EAEAEC]"}),(0,e.jsx)(f.default.List,{ref:H,children:de?.map(a=>(0,e.jsx)(f.default.Trigger,{className:(0,C.cn)(O===a.value&&"text-[#080A0F]"),value:a.value,onClick:d=>ce(d,a?.value),children:a.label},a?.value))}),(0,e.jsx)("style",{global:!0,jsx:!0,children:`
17
+ `}),(0,e.jsxs)("div",{style:{background:t.couponBgColor||"white"},className:(0,h.cn)("laptop:h-[112px] lg-desktop:h-[130px] relative h-[100px] overflow-hidden p-3",t.borderStyle==="inset"?"coupon-card ":"rounded-[8px]"),...t.useAble&&{role:"button",tabIndex:0,onClick:()=>{t?.onUseChange?.(v)!==!1&&w(!v)}},children:[t?.bgImage?.url&&(0,e.jsx)(i.Picture,{source:t.bgImage.url,alt:t.bgImage.alt,className:"absolute bottom-0 right-0 w-auto",imgClassName:"object-contain"}),(0,e.jsxs)("div",{className:"z-1 relative ",children:[(0,e.jsxs)("div",{className:"flex items-center justify-start",children:[t.useAble&&(0,e.jsx)(i.Checkbox,{size:"lg",className:"data-[state=checked]:border-primary mr-2 rounded-full border-[1.6px] border-[#D1D1D1]",checked:t?.isAutoUse}),(0,e.jsx)(i.Text,{html:t.title,className:"laptop:text-[20px] lg-desktop:text-[24px] text-[16px] font-bold leading-[1.2]"})]}),t.description&&(0,e.jsx)(i.Text,{...typeof t.description=="string"?{html:t.description}:{},as:"p",className:"lg-desktop:text-[16px] mt-2 pr-8 text-[14px] font-bold text-[#3D3D3F]",children:t.description}),t.code&&(0,e.jsxs)("div",{className:"laptop-md:mt-2 flex items-center gap-2",children:[(0,e.jsx)(i.Text,{html:`${o?.couponBenefitData?.commonCoupon?.couponCode}: ${t.code}`,className:"lg-desktop:text-[16px] text-[14px] font-bold text-[#3D3D3F]"}),(0,e.jsx)(i.Link,{className:"lg-desktop:text-[16px] text-[14px] font-bold underline",role:"button",tabIndex:0,onClick:g=>{g.preventDefault(),g.stopPropagation(),x(t.code||"")},children:c?r?.copied||o?.couponBenefitData?.commonCoupon?.copied:r?.copy||o?.couponBenefitData?.commonCoupon?.copyCode})]}),t.ends_at&&(0,e.jsx)(ve,{endsAt:t.ends_at,daysLeft:r?.hurry?.daysLeft??0,endsText:r?.ends??"",daysText:r?.days??"",hurryLabel:r?.hurry?.label??"",expiredText:o?.couponBenefitData?.commonCoupon?.expired??"",onOpenModal:()=>{r?.modal&&T(r?.modal)}})]})]})]})},Be=({coupons:t,className:s,textConfig:o,benefitPayloadData:l})=>(0,e.jsx)("div",{className:(0,h.cn)("laptop:grid laptop:grid-cols-2 laptop-md:grid-cols-1 flex flex-col gap-3",s),children:t?.map((c,x)=>(0,e.jsx)(ye,{item:c,textConfig:o,benefitPayloadData:l},x))}),Ne=({creditCouponRedeem:t,textConfig:s})=>{const{profile:o,variant:l,renderInstallments:c,onUseCouponChange:x,onUseMemberDiscountChange:v,discount:w,savingDetail:r,openModal:T,openSignInPopup:g,openAuthCodePopup:I,openSignUpPopup:ee,creditsRedemption:te}=(0,G.useBizProductContext)(),{usedPoints:De=0,availablePoints:ke=0}=te??{},[oe,A]=(0,p.useState)(!1),C=(0,W.useComponentData)("ProductBenefits")??{},[ne,Z]=(0,p.useState)(!1),ae=(0,q.useBenefits)({variant:l}),{locale:D="us",copyWriting:ie}=(0,U.useAiuiContext)(),H=(0,p.useRef)(null),se={...he,...s},{activated:le=!1}=o||{},{memberDiscount:u,commonCoupon:b,creditsRedemption:k,freeGift:E,functionFreeGift:j,bundle:V,paidShipping:re,fullGift:R,levelDiscount:z}=ae,n=(0,p.useMemo)(()=>{const a=C?.benefitTabs?.find(f=>f?.value==="coupon")??{},d=C?.benefitTabs?.find(f=>f?.value==="membership")??{},M=C?.benefitTabs?.find(f=>f?.value==="installment")??{},L=C?.benefitTabs?.find(f=>f?.value==="pay")??{};return{couponBenefitData:a,membershipBenefitData:d,installmentBenefitData:M,payBenefitData:L}},[C]),y=[b?.enable?{...b.config,isAutoUse:r?.coupon>0,useAble:!0,borderStyle:"rounded",code:b?.config?.title??"",description:b?.config?.desc??"",onUseChange:a=>{const d=a?w?.codeSavings??0:0;x?.(d)},title:(0,F.replaceTemplate)(n?.couponBenefitData?.commonCoupon?.offCoupon,{discount:b?.config?.value_type=="percentage"?Math.abs(Number(b?.config?.value||0))+"%":b?.config?.formattedFixedValue??(0,N.formatPrice)({amount:Math.abs(Number(b?.config?.fixed_value||0)),currencyCode:l.price.currencyCode,locale:D})})}:null,u.enable?{useAble:!0,isAutoUse:!!o?.email&&!!r?.member,title:(0,F.replaceTemplate)(n?.couponBenefitData?.member?.offMemberOnly,{amount:u?.config?.formattedAmount??(0,N.formatPrice)({amount:u?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D})}),description:(0,e.jsxs)(e.Fragment,{children:[o?.email?n?.couponBenefitData?.member?.memberDiscounts:n?.membershipBenefitData?.memberBenefitsNotLogin?.replace("{amount}",u?.config?.formattedAmount??(0,N.formatPrice)({amount:u?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D}))??""," ",o?.email?"":(0,e.jsx)("span",{role:"button",tabIndex:0,onClick:()=>g?.(),className:"underline",children:n?.couponBenefitData?.member?.loginNow})]}),borderStyle:"rounded",onUseChange:a=>{if(o?.email){const d=a?u?.config?.amount??0:0;return v?.(d),!0}else return g?.(),!1}}:null,z.enable?{title:z?.config?.title??"",description:z?.config?.tag??"",borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.levelDiscount?.bgImage}}:null,j.enable?{title:j?.config?.title??"",description:n?.couponBenefitData?.freeGift?.selectFreeGift,borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.freeGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,E.enable?{title:E?.config?.title??"",description:n?.couponBenefitData?.freeGift?.selectFreeGift,borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.freeGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,V.enable?{title:`${n?.couponBenefitData?.bundle?.bundleSaveUpTo} ${V.config?.maxSavings}`,borderStyle:"inset",description:n?.couponBenefitData?.bundle?.bundleOffer.replace("{count}",V?.config?.bundleOptions?.length?.toString()??""),bgImage:{url:n?.couponBenefitData?.bundle?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,R.enable?{title:R?.config?.title??"",description:R?.config?.desc??"",borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.fullGift?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null,k.enable?{title:n?.couponBenefitData?.creditsRedemption?.creditsTitle,description:n?.couponBenefitData?.creditsRedemption?.creditsDesc,borderStyle:"inset",bgImage:{url:n?.couponBenefitData?.creditsRedemption?.bgImage},couponBgColor:"linear-gradient(94deg, rgba(215, 245, 254, 0.24) 4.2%, rgba(215, 245, 254, 0.80) 99.11%), #FFF"}:null].filter(Boolean);(0,p.useEffect)(()=>{_(y?.length?"coupon":"membership")},[y?.length]),(0,p.useEffect)(()=>{A(!1)},[l?.id]);const[O,_]=(0,p.useState)("coupon"),pe=()=>{I?.()},ce=(a,d)=>{if(_(d),H.current){const M=H.current,L=a.currentTarget,f=L.offsetLeft-M.offsetWidth/2+L.offsetWidth/2;M.scrollTo({left:f,behavior:"smooth"})}},de=(0,p.useMemo)(()=>C?.benefitTabs?.map(a=>a?.value==="coupon"&&!y?.length?null:a).filter(Boolean),[C,y]);return m.default?(0,e.jsxs)(m.default,{className:"relative",onValueChange:a=>{_(a),A(a==="installment")},value:O,children:[(0,e.jsx)("div",{className:"absolute right-0 top-0 z-[1] h-[40px] w-[25px] rounded-xl bg-gradient-to-r from-transparent to-[#EAEAEC]"}),(0,e.jsx)(m.default.List,{ref:H,children:de?.map(a=>(0,e.jsx)(m.default.Trigger,{className:(0,h.cn)(O===a.value&&"text-[#080A0F]"),value:a.value,onClick:d=>ce(d,a?.value),children:a.label},a?.value))}),(0,e.jsx)("style",{global:!0,jsx:!0,children:`
18
18
  .benefits-tabs-content::-webkit-scrollbar {
19
19
  width: 4px; /* \u6EDA\u52A8\u6761\u5BBD\u5EA6 */
20
20
  height: 64px; /* \u6A2A\u5411\u6EDA\u52A8\u6761\u9AD8\u5EA6 */
@@ -32,7 +32,7 @@
32
32
  .benefits-tabs-content::-webkit-scrollbar-thumb:hover {
33
33
  background-color: rgba(100, 100, 100, 0.6);
34
34
  }
35
- `}),y?.length?(0,e.jsx)(f.default.Content,{value:"coupon",className:"benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto",children:(0,e.jsx)("div",{className:"lg-desktop:p-4 p-3",children:(0,e.jsx)(Be,{coupons:y,textConfig:se,benefitPayloadData:n})})}):null,(0,e.jsx)(f.default.Content,{value:"membership",className:(0,C.cn)("benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto"),children:(0,e.jsxs)("div",{className:"lg-desktop:p-4 p-3",children:[t&&(0,e.jsx)("div",{className:"laptop-md:mb-4 mb-2",children:(0,e.jsx)(X.default,{...t})}),(0,e.jsxs)("div",{className:(0,C.cn)("rounded-lg",{"benefits-tabs-content lg-desktop:h-[calc(240px-100px)] laptop-md:h-[calc(196px-80px)] laptop:h-[calc(220px-72px)] h-[calc(180px-73px)] overflow-y-auto":!o?.email}),children:[!o?.email&&(0,e.jsx)("h3",{className:"laptop-md:mb-2 mb-1 text-left text-lg font-bold !leading-[1.3]",children:n?.membershipBenefitData?.memberBenefitsNotLoginText}),(0,e.jsxs)("ul",{className:`laptop-md:[&_li]:py-4 list-none
35
+ `}),y?.length?(0,e.jsx)(m.default.Content,{value:"coupon",className:"benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto",children:(0,e.jsx)("div",{className:"lg-desktop:p-4 p-3",children:(0,e.jsx)(Be,{coupons:y,textConfig:se,benefitPayloadData:n})})}):null,(0,e.jsx)(m.default.Content,{value:"membership",className:(0,h.cn)("benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto"),children:(0,e.jsxs)("div",{className:"lg-desktop:p-4 p-3",children:[t&&(0,e.jsx)("div",{className:"laptop-md:mb-4 mb-2",children:(0,e.jsx)(X.default,{...t})}),(0,e.jsxs)("div",{className:(0,h.cn)("rounded-lg",{"benefits-tabs-content lg-desktop:h-[calc(240px-100px)] laptop-md:h-[calc(196px-80px)] laptop:h-[calc(220px-72px)] h-[calc(180px-73px)] overflow-y-auto":!o?.email}),children:[!o?.email&&(0,e.jsx)("h3",{className:"laptop-md:mb-2 mb-1 text-left text-lg font-bold !leading-[1.3]",children:n?.membershipBenefitData?.memberBenefitsNotLoginText}),(0,e.jsxs)("ul",{className:`laptop-md:[&_li]:py-4 list-none
36
36
  [&_li:first-child]:rounded-t-lg [&_li:last-child]:rounded-b-lg [&_li:last-child]:last:border-b-0 [&_li]:flex
37
37
  [&_li]:items-center [&_li]:gap-2 [&_li]:border-b [&_li]:border-b-[#E4E5E6] [&_li]:bg-white [&_li]:px-4 [&_li]:py-[10px]
38
- [&_li]:text-left`,children:[k.enable?(0,e.jsxs)("li",{children:[(0,e.jsx)("svg",{className:"laptop-md:size-6 size-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM17 13C17.5523 13 18 13.4477 18 14C18 14.5523 17.5523 15 17 15H9.41406L9.70703 15.293C10.0976 15.6835 10.0976 16.3165 9.70703 16.707C9.31651 17.0976 8.68349 17.0976 8.29297 16.707L6.29297 14.707C6.00697 14.421 5.92139 13.9909 6.07617 13.6172C6.23098 13.2436 6.59558 13 7 13H17ZM14.293 7.29297C14.6835 6.90244 15.3165 6.90244 15.707 7.29297L17.707 9.29297C17.993 9.57897 18.0786 10.0091 17.9238 10.3828C17.769 10.7564 17.4044 11 17 11H7C6.44772 11 6 10.5523 6 10C6 9.44771 6.44772 9 7 9H14.5859L14.293 8.70703C13.9024 8.31651 13.9024 7.68349 14.293 7.29297Z",fill:"#1D1D1F"})}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",children:!le&&o?.email?(0,e.jsxs)(e.Fragment,{children:[n?.membershipBenefitData?.creditsAfterActivation,(0,e.jsx)("span",{role:"button",tabIndex:0,onClick:()=>pe(),className:"underline",children:n?.membershipBenefitData?.active})]}):k?.config?.label?.replace("{{amount}}",(0,N.formatPrice)({amount:k?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D}))})]}):null,v.enable&&(0,e.jsxs)("li",{className:"justify-between",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"laptop-md:size-6 size-4",viewBox:"0 0 24 24",fill:"none",children:(0,e.jsx)("path",{d:"M20 3.5C21.6569 3.5 23 4.84315 23 6.5V9.65625C23 10.0791 22.7342 10.4566 22.3359 10.5986C21.6665 10.8372 21.1816 11.4844 21.1816 12.25C21.1816 13.0156 21.6665 13.6628 22.3359 13.9014C22.7342 14.0434 23 14.4209 23 14.8438V18C23 19.6569 21.6569 21 20 21H4C2.34315 21 1 19.6569 1 18V14.8438L1.01172 14.6875C1.06803 14.3301 1.31557 14.0256 1.66406 13.9014C2.33345 13.6628 2.81836 13.0156 2.81836 12.25C2.81836 11.4844 2.33345 10.8372 1.66406 10.5986C1.26583 10.4566 1 10.0791 1 9.65625V6.5C1 4.84315 2.34315 3.5 4 3.5H20ZM4 5.5C3.44772 5.5 3 5.94772 3 6.5V9.03125C4.08987 9.68678 4.81836 10.8833 4.81836 12.25C4.81836 13.6165 4.08963 14.8122 3 15.4678V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V15.4678C19.9104 14.8122 19.1816 13.6165 19.1816 12.25C19.1816 10.8833 19.9101 9.68677 21 9.03125V6.5C21 5.94772 20.5523 5.5 20 5.5H4ZM15.793 6.79297C16.1835 6.40244 16.8165 6.40244 17.207 6.79297C17.5976 7.18349 17.5976 7.81651 17.207 8.20703L8.20703 17.207C7.81651 17.5976 7.18349 17.5976 6.79297 17.207C6.40244 16.8165 6.40244 16.1835 6.79297 15.793L15.793 6.79297ZM15.25 13.25C16.3546 13.25 17.25 14.1454 17.25 15.25C17.25 16.3546 16.3546 17.25 15.25 17.25C14.1454 17.25 13.25 16.3546 13.25 15.25C13.25 14.1454 14.1454 13.25 15.25 13.25ZM15.25 14.75C14.9739 14.75 14.75 14.9739 14.75 15.25C14.75 15.5261 14.9739 15.75 15.25 15.75C15.5261 15.75 15.75 15.5261 15.75 15.25C15.75 14.9739 15.5261 14.75 15.25 14.75ZM8.75 6.75C9.85457 6.75 10.75 7.64543 10.75 8.75C10.75 9.85457 9.85457 10.75 8.75 10.75C7.64543 10.75 6.75 9.85457 6.75 8.75C6.75 7.64543 7.64543 6.75 8.75 6.75ZM8.75 8.25C8.47386 8.25 8.25 8.47386 8.25 8.75C8.25 9.02614 8.47386 9.25 8.75 9.25C9.02614 9.25 9.25 9.02614 9.25 8.75C9.25 8.47386 9.02614 8.25 8.75 8.25Z",fill:"#1D1D1F"})}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",children:(0,I.replaceTemplate)(n?.membershipBenefitData?.forNewMember,{amount:(0,N.formatPrice)({amount:v?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D})})})]}),!!o?.email&&(0,e.jsx)(S,{})]}),n?.membershipBenefitData?.equities?.map((a,d)=>a.modalText?(0,e.jsxs)("li",{className:"justify-between gap-2",children:[(0,e.jsxs)("button",{onClick:()=>T?.({title:a.label,content:a.modalText}),className:"flex justify-between",children:[(0,e.jsx)(i.Picture,{source:a.icon,alt:a.text,className:"laptop-md:size-6 size-4 shrink-0"}),(0,e.jsx)(i.Text,{className:"x:text-[14px] text-wrap text-left text-[16px] font-bold",children:a.text})]},d),!!o?.email&&(0,e.jsx)(S,{})]},d):(0,e.jsxs)("li",{className:"justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(i.Picture,{source:a.icon,alt:a.text,className:"laptop-md:size-6 size-4 shrink-0"}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-wrap text-left text-[16px] font-bold",children:a.label})]}),!!o?.email&&(0,e.jsx)(S,{})]},d)),re.enable?(0,e.jsxs)("li",{className:"justify-between",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("svg",{className:"laptop-md:size-6 size-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M19 3C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H10V16H21C21.5523 16 22 16.4477 22 17C22 17.5523 21.5523 18 21 18H19.9961C19.9961 19.6559 18.6547 21 16.998 21C15.3414 21 14 19.6559 14 18H10C10 19.6568 8.65684 21 7 21C5.34317 21 4 19.6568 4 18H2C1.44772 18 1 17.5523 1 17V10.6738L1.00488 10.5771C1.02632 10.3554 1.12145 10.146 1.27637 9.9834L4.77637 6.31055L4.84961 6.24023C5.02993 6.08586 5.26042 6 5.5 6H8V5C8 3.89544 8.89541 3 10 3H19ZM6.00488 18.1025C6.05622 18.6067 6.48234 19 7 19C7.51766 19 7.94378 18.6067 7.99512 18.1025L8 18H6L6.00488 18.1025ZM16.0049 18.1025C16.0561 18.6074 16.4823 19 16.998 19C17.5138 19 17.94 18.6074 17.9912 18.1025L17.9961 18H16L16.0049 18.1025ZM3 11.0723V16H8V8H5.92773L3 11.0723ZM21.6621 6.8252C22.0348 6.41765 22.6676 6.38902 23.0752 6.76172C23.4827 7.13443 23.5104 7.76725 23.1377 8.1748L18.0518 13.7363C17.6625 14.162 17.003 14.1954 16.5732 13.8105L13.333 10.9092C12.9216 10.5408 12.8865 9.90853 13.2549 9.49707C13.6232 9.08565 14.2555 9.05066 14.667 9.41895L17.208 11.6943L21.6621 6.8252Z",fill:"#1D1D1F"})}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",children:n?.membershipBenefitData?.expressShipping})]}),!!o?.email&&(0,e.jsx)(S,{})]}):null]})]}),!o?.email&&(0,e.jsx)("div",{className:"laptop-md:pt-4 pt-2",children:(0,e.jsx)(i.Button,{variant:"primary",className:"w-full",onClick:()=>ee?.(),children:ie?.signUp})})]})}),(0,e.jsxs)(f.default.Content,{value:"pay",className:"benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto ",children:[(0,e.jsxs)("div",{className:"lg-desktop:p-4 p-3",children:[(0,e.jsx)(i.Heading,{size:2,className:"mb-2 text-left text-lg font-bold",children:n?.payBenefitData?.payMethod}),(0,e.jsxs)("div",{className:"lg-desktop:p-4 flex items-center justify-between gap-2 rounded-lg bg-white p-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(i.Picture,{source:n?.payBenefitData?.icon,className:"laptop-md:size-[70px] laptop-md:h-[34px] size-[40px] h-[20px] shrink-0"}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",html:n?.payBenefitData?.withCheckout})]}),(0,e.jsx)("button",{className:"hover:text-brand-0 laptop-md:text-[16px] whitespace-nowrap text-sm font-bold underline",onClick:()=>Z(!0),children:n?.payBenefitData?.learnMore})]})]}),(0,e.jsx)(K.default,{showModal:ne,closeModal:()=>Z(!1),children:(0,e.jsx)(i.Picture,{source:n?.payBenefitData?.payImage})})]}),(0,e.jsx)(f.default.Content,{value:"installment",forceMount:!0,className:(0,C.cn)("benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto ",oe?"block":"hidden"),children:(0,e.jsxs)("div",{className:"lg-desktop:p-4 p-3",children:[(0,e.jsx)(i.Heading,{size:2,className:"mb-2 text-left text-lg font-bold",children:n?.installmentBenefitData?.flexibleInstallment}),(0,e.jsx)("div",{className:"lg-desktop:p-4 overflow-hidden rounded-lg bg-white p-3",children:c})]})})]}):null},S=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...t,children:(0,e.jsx)("path",{d:"M4 9.19472L8.51935 13.667L16.2668 6.00024",stroke:"#2BBC4F",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});var we=(0,Q.withLayout)(Ne);
38
+ [&_li]:text-left`,children:[k.enable?(0,e.jsxs)("li",{children:[(0,e.jsx)("svg",{className:"laptop-md:size-6 size-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3ZM17 13C17.5523 13 18 13.4477 18 14C18 14.5523 17.5523 15 17 15H9.41406L9.70703 15.293C10.0976 15.6835 10.0976 16.3165 9.70703 16.707C9.31651 17.0976 8.68349 17.0976 8.29297 16.707L6.29297 14.707C6.00697 14.421 5.92139 13.9909 6.07617 13.6172C6.23098 13.2436 6.59558 13 7 13H17ZM14.293 7.29297C14.6835 6.90244 15.3165 6.90244 15.707 7.29297L17.707 9.29297C17.993 9.57897 18.0786 10.0091 17.9238 10.3828C17.769 10.7564 17.4044 11 17 11H7C6.44772 11 6 10.5523 6 10C6 9.44771 6.44772 9 7 9H14.5859L14.293 8.70703C13.9024 8.31651 13.9024 7.68349 14.293 7.29297Z",fill:"#1D1D1F"})}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",children:!le&&o?.email?(0,e.jsxs)(e.Fragment,{children:[n?.membershipBenefitData?.creditsAfterActivation,(0,e.jsx)("span",{role:"button",tabIndex:0,onClick:()=>pe(),className:"underline",children:n?.membershipBenefitData?.active})]}):k?.config?.label?.replace("{{amount}}",k?.config?.formattedAmount??(0,N.formatPrice)({amount:k?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D}))})]}):null,u.enable&&(0,e.jsxs)("li",{className:"justify-between",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"laptop-md:size-6 size-4",viewBox:"0 0 24 24",fill:"none",children:(0,e.jsx)("path",{d:"M20 3.5C21.6569 3.5 23 4.84315 23 6.5V9.65625C23 10.0791 22.7342 10.4566 22.3359 10.5986C21.6665 10.8372 21.1816 11.4844 21.1816 12.25C21.1816 13.0156 21.6665 13.6628 22.3359 13.9014C22.7342 14.0434 23 14.4209 23 14.8438V18C23 19.6569 21.6569 21 20 21H4C2.34315 21 1 19.6569 1 18V14.8438L1.01172 14.6875C1.06803 14.3301 1.31557 14.0256 1.66406 13.9014C2.33345 13.6628 2.81836 13.0156 2.81836 12.25C2.81836 11.4844 2.33345 10.8372 1.66406 10.5986C1.26583 10.4566 1 10.0791 1 9.65625V6.5C1 4.84315 2.34315 3.5 4 3.5H20ZM4 5.5C3.44772 5.5 3 5.94772 3 6.5V9.03125C4.08987 9.68678 4.81836 10.8833 4.81836 12.25C4.81836 13.6165 4.08963 14.8122 3 15.4678V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V15.4678C19.9104 14.8122 19.1816 13.6165 19.1816 12.25C19.1816 10.8833 19.9101 9.68677 21 9.03125V6.5C21 5.94772 20.5523 5.5 20 5.5H4ZM15.793 6.79297C16.1835 6.40244 16.8165 6.40244 17.207 6.79297C17.5976 7.18349 17.5976 7.81651 17.207 8.20703L8.20703 17.207C7.81651 17.5976 7.18349 17.5976 6.79297 17.207C6.40244 16.8165 6.40244 16.1835 6.79297 15.793L15.793 6.79297ZM15.25 13.25C16.3546 13.25 17.25 14.1454 17.25 15.25C17.25 16.3546 16.3546 17.25 15.25 17.25C14.1454 17.25 13.25 16.3546 13.25 15.25C13.25 14.1454 14.1454 13.25 15.25 13.25ZM15.25 14.75C14.9739 14.75 14.75 14.9739 14.75 15.25C14.75 15.5261 14.9739 15.75 15.25 15.75C15.5261 15.75 15.75 15.5261 15.75 15.25C15.75 14.9739 15.5261 14.75 15.25 14.75ZM8.75 6.75C9.85457 6.75 10.75 7.64543 10.75 8.75C10.75 9.85457 9.85457 10.75 8.75 10.75C7.64543 10.75 6.75 9.85457 6.75 8.75C6.75 7.64543 7.64543 6.75 8.75 6.75ZM8.75 8.25C8.47386 8.25 8.25 8.47386 8.25 8.75C8.25 9.02614 8.47386 9.25 8.75 9.25C9.02614 9.25 9.25 9.02614 9.25 8.75C9.25 8.47386 9.02614 8.25 8.75 8.25Z",fill:"#1D1D1F"})}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",children:(0,F.replaceTemplate)(n?.membershipBenefitData?.forNewMember,{amount:u?.config?.formattedAmount??(0,N.formatPrice)({amount:u?.config?.amount??0,currencyCode:l.price.currencyCode,locale:D})})})]}),!!o?.email&&(0,e.jsx)(S,{})]}),n?.membershipBenefitData?.equities?.map((a,d)=>a.modalText?(0,e.jsxs)("li",{className:"justify-between gap-2",children:[(0,e.jsxs)("button",{onClick:()=>T?.({title:a.label,content:a.modalText}),className:"flex justify-between",children:[(0,e.jsx)(i.Picture,{source:a.icon,alt:a.text,className:"laptop-md:size-6 size-4 shrink-0"}),(0,e.jsx)(i.Text,{className:"x:text-[14px] text-wrap text-left text-[16px] font-bold",children:a.text})]},d),!!o?.email&&(0,e.jsx)(S,{})]},d):(0,e.jsxs)("li",{className:"justify-between",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(i.Picture,{source:a.icon,alt:a.text,className:"laptop-md:size-6 size-4 shrink-0"}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-wrap text-left text-[16px] font-bold",children:a.label})]}),!!o?.email&&(0,e.jsx)(S,{})]},d)),re.enable?(0,e.jsxs)("li",{className:"justify-between",children:[(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("svg",{className:"laptop-md:size-6 size-4",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,e.jsx)("path",{d:"M19 3C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H10V16H21C21.5523 16 22 16.4477 22 17C22 17.5523 21.5523 18 21 18H19.9961C19.9961 19.6559 18.6547 21 16.998 21C15.3414 21 14 19.6559 14 18H10C10 19.6568 8.65684 21 7 21C5.34317 21 4 19.6568 4 18H2C1.44772 18 1 17.5523 1 17V10.6738L1.00488 10.5771C1.02632 10.3554 1.12145 10.146 1.27637 9.9834L4.77637 6.31055L4.84961 6.24023C5.02993 6.08586 5.26042 6 5.5 6H8V5C8 3.89544 8.89541 3 10 3H19ZM6.00488 18.1025C6.05622 18.6067 6.48234 19 7 19C7.51766 19 7.94378 18.6067 7.99512 18.1025L8 18H6L6.00488 18.1025ZM16.0049 18.1025C16.0561 18.6074 16.4823 19 16.998 19C17.5138 19 17.94 18.6074 17.9912 18.1025L17.9961 18H16L16.0049 18.1025ZM3 11.0723V16H8V8H5.92773L3 11.0723ZM21.6621 6.8252C22.0348 6.41765 22.6676 6.38902 23.0752 6.76172C23.4827 7.13443 23.5104 7.76725 23.1377 8.1748L18.0518 13.7363C17.6625 14.162 17.003 14.1954 16.5732 13.8105L13.333 10.9092C12.9216 10.5408 12.8865 9.90853 13.2549 9.49707C13.6232 9.08565 14.2555 9.05066 14.667 9.41895L17.208 11.6943L21.6621 6.8252Z",fill:"#1D1D1F"})}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",children:n?.membershipBenefitData?.expressShipping})]}),!!o?.email&&(0,e.jsx)(S,{})]}):null]})]}),!o?.email&&(0,e.jsx)("div",{className:"laptop-md:pt-4 pt-2",children:(0,e.jsx)(i.Button,{variant:"primary",className:"w-full",onClick:()=>ee?.(),children:ie?.signUp})})]})}),(0,e.jsxs)(m.default.Content,{value:"pay",className:"benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto ",children:[(0,e.jsxs)("div",{className:"lg-desktop:p-4 p-3",children:[(0,e.jsx)(i.Heading,{size:2,className:"mb-2 text-left text-lg font-bold",children:n?.payBenefitData?.payMethod}),(0,e.jsxs)("div",{className:"lg-desktop:p-4 flex items-center justify-between gap-2 rounded-lg bg-white p-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(i.Picture,{source:n?.payBenefitData?.icon,className:"laptop-md:size-[70px] laptop-md:h-[34px] size-[40px] h-[20px] shrink-0"}),(0,e.jsx)(i.Text,{as:"p",className:"x:text-[14px] text-left text-[16px] font-bold",html:n?.payBenefitData?.withCheckout})]}),(0,e.jsx)("button",{className:"hover:text-brand-0 laptop-md:text-[16px] whitespace-nowrap text-sm font-bold underline",onClick:()=>Z(!0),children:n?.payBenefitData?.learnMore})]})]}),(0,e.jsx)(K.default,{showModal:ne,closeModal:()=>Z(!1),children:(0,e.jsx)(i.Picture,{source:n?.payBenefitData?.payImage})})]}),(0,e.jsx)(m.default.Content,{value:"installment",forceMount:!0,className:(0,h.cn)("benefits-tabs-content lg-desktop:h-[240px] laptop-md:h-[196px] laptop:h-[220px] h-[180px] overflow-y-auto ",oe?"block":"hidden"),children:(0,e.jsxs)("div",{className:"lg-desktop:p-4 p-3",children:[(0,e.jsx)(i.Heading,{size:2,className:"mb-2 text-left text-lg font-bold",children:n?.installmentBenefitData?.flexibleInstallment}),(0,e.jsx)("div",{className:"lg-desktop:p-4 overflow-hidden rounded-lg bg-white p-3",children:c})]})})]}):null},S=t=>(0,e.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",...t,children:(0,e.jsx)("path",{d:"M4 9.19472L8.51935 13.667L16.2668 6.00024",stroke:"#2BBC4F",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})});var we=(0,Q.withLayout)(Ne);