@anker-in/headless-ui 1.1.9-alpha.1764084619241 → 1.1.9-alpha.1764141671439

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 (613) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.d.ts +2 -2
  2. package/dist/cjs/biz-components/AplusDesc/index.d.ts +3 -2
  3. package/dist/cjs/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  4. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js +1 -1
  5. package/dist/cjs/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  6. package/dist/cjs/biz-components/BrandEquity/types.d.ts +0 -1
  7. package/dist/cjs/biz-components/BrandEquity/types.js +1 -1
  8. package/dist/cjs/biz-components/BrandEquity/types.js.map +1 -1
  9. package/dist/cjs/biz-components/Category/index.d.ts +2 -2
  10. package/dist/cjs/biz-components/CreativeModule/index.d.ts +3 -2
  11. package/dist/cjs/biz-components/DownLoad/index.d.ts +3 -2
  12. package/dist/cjs/biz-components/Evaluate/index.d.ts +2 -2
  13. package/dist/cjs/biz-components/Faq/Faq.d.ts +2 -2
  14. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  15. package/dist/cjs/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
  16. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +2 -0
  17. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +7 -0
  18. package/dist/cjs/biz-components/FeatureCards/index.d.ts +2 -0
  19. package/dist/cjs/biz-components/FeatureCards/index.js +2 -0
  20. package/dist/cjs/biz-components/FeatureCards/index.js.map +7 -0
  21. package/dist/cjs/biz-components/FeatureCards/types.d.ts +27 -0
  22. package/dist/cjs/biz-components/FeatureCards/types.js +2 -0
  23. package/dist/cjs/biz-components/FeatureCards/types.js.map +7 -0
  24. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
  25. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
  26. package/dist/cjs/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
  27. package/dist/cjs/biz-components/FeatureShowcase/index.d.ts +2 -0
  28. package/dist/cjs/biz-components/FeatureShowcase/index.js +2 -0
  29. package/dist/cjs/biz-components/FeatureShowcase/index.js.map +7 -0
  30. package/dist/cjs/biz-components/FeatureShowcase/types.d.ts +23 -0
  31. package/dist/cjs/biz-components/FeatureShowcase/types.js +2 -0
  32. package/dist/cjs/biz-components/FeatureShowcase/types.js.map +7 -0
  33. package/dist/cjs/biz-components/Features/index.d.ts +3 -2
  34. package/dist/cjs/biz-components/FootCharger/index.d.ts +3 -2
  35. package/dist/cjs/biz-components/FooterNavigation/index.d.ts +3 -2
  36. package/dist/cjs/biz-components/GiftBox/index.d.ts +3 -2
  37. package/dist/cjs/biz-components/Graphic/index.d.ts +2 -2
  38. package/dist/cjs/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  39. package/dist/cjs/biz-components/GraphicMore/index.d.ts +3 -2
  40. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  41. package/dist/cjs/biz-components/HeaderNavigation/index.d.ts +2 -2
  42. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +2 -2
  43. package/dist/cjs/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  44. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  45. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  46. package/dist/cjs/biz-components/HeroBanner/types.d.ts +2 -0
  47. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  48. package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
  49. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
  50. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
  51. package/dist/cjs/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
  52. package/dist/cjs/biz-components/ImageTextFeature/index.d.ts +2 -0
  53. package/dist/cjs/biz-components/ImageTextFeature/index.js +2 -0
  54. package/dist/cjs/biz-components/ImageTextFeature/index.js.map +7 -0
  55. package/dist/cjs/biz-components/ImageTextFeature/types.d.ts +31 -0
  56. package/dist/cjs/biz-components/ImageTextFeature/types.js +2 -0
  57. package/dist/cjs/biz-components/ImageTextFeature/types.js.map +7 -0
  58. package/dist/cjs/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
  59. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +2 -0
  60. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +7 -0
  61. package/dist/cjs/biz-components/ImageWithText/index.d.ts +3 -0
  62. package/dist/cjs/biz-components/ImageWithText/index.js +2 -0
  63. package/dist/cjs/biz-components/ImageWithText/index.js.map +7 -0
  64. package/dist/cjs/biz-components/ImageWithText/types.d.ts +110 -0
  65. package/dist/cjs/biz-components/ImageWithText/types.js +2 -0
  66. package/dist/cjs/biz-components/ImageWithText/types.js.map +7 -0
  67. package/dist/cjs/biz-components/InlineVideo/index.d.ts +16 -0
  68. package/dist/cjs/biz-components/InlineVideo/index.js +2 -0
  69. package/dist/cjs/biz-components/InlineVideo/index.js.map +7 -0
  70. package/dist/cjs/biz-components/Ksp/index.d.ts +44 -0
  71. package/dist/cjs/biz-components/Ksp/index.js +2 -0
  72. package/dist/cjs/biz-components/Ksp/index.js.map +7 -0
  73. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +1 -1
  74. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  75. package/dist/cjs/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
  76. package/dist/cjs/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
  77. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  78. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  79. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  80. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  81. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  82. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +2 -2
  83. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  84. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  85. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  86. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +1 -1
  87. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  88. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  89. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +2 -2
  90. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  91. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  92. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  93. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +2 -2
  94. package/dist/cjs/biz-components/MarqueeReview/index.d.ts +42 -0
  95. package/dist/cjs/biz-components/MarqueeReview/index.js +2 -0
  96. package/dist/cjs/biz-components/MarqueeReview/index.js.map +7 -0
  97. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  98. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js +2 -0
  99. package/dist/cjs/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  100. package/dist/cjs/biz-components/MediaPlayerBase/index.d.ts +3 -2
  101. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  102. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  103. package/dist/cjs/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  104. package/dist/cjs/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  105. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  106. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  107. package/dist/cjs/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  108. package/dist/cjs/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  109. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js +2 -0
  110. package/dist/cjs/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  111. package/dist/cjs/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  112. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js +2 -0
  113. package/dist/cjs/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  114. package/dist/cjs/biz-components/MemberEquity/index.d.ts +2 -2
  115. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  116. package/dist/cjs/biz-components/NavigationSearch/index.d.ts +1 -0
  117. package/dist/cjs/biz-components/ProductCompare/index.d.ts +54 -0
  118. package/dist/cjs/biz-components/ProductCompare/index.js +2 -0
  119. package/dist/cjs/biz-components/ProductCompare/index.js.map +7 -0
  120. package/dist/cjs/biz-components/ProductHero/ProductHero.d.ts +7 -0
  121. package/dist/cjs/biz-components/ProductHero/ProductHero.js +2 -0
  122. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +7 -0
  123. package/dist/cjs/biz-components/ProductHero/index.d.ts +2 -0
  124. package/dist/cjs/biz-components/ProductHero/index.js +2 -0
  125. package/dist/cjs/biz-components/ProductHero/index.js.map +7 -0
  126. package/dist/cjs/biz-components/ProductHero/types.d.ts +23 -0
  127. package/dist/cjs/biz-components/ProductHero/types.js +2 -0
  128. package/dist/cjs/biz-components/ProductHero/types.js.map +7 -0
  129. package/dist/cjs/biz-components/ProductNav/ProductNav.d.ts +7 -0
  130. package/dist/cjs/biz-components/ProductNav/ProductNav.js +2 -0
  131. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +7 -0
  132. package/dist/cjs/biz-components/ProductNav/index.d.ts +2 -0
  133. package/dist/cjs/biz-components/ProductNav/index.js +2 -0
  134. package/dist/cjs/biz-components/ProductNav/index.js.map +7 -0
  135. package/dist/cjs/biz-components/ProductNav/types.d.ts +35 -0
  136. package/dist/cjs/biz-components/ProductNav/types.js +2 -0
  137. package/dist/cjs/biz-components/ProductNav/types.js.map +7 -0
  138. package/dist/cjs/biz-components/SelectStore/index.d.ts +3 -2
  139. package/dist/cjs/biz-components/ShelfDisplay/index.d.ts +2 -2
  140. package/dist/cjs/biz-components/Slogan/index.d.ts +2 -2
  141. package/dist/cjs/biz-components/Spacer/index.d.ts +2 -2
  142. package/dist/cjs/biz-components/Spacer/index.js +1 -1
  143. package/dist/cjs/biz-components/Spacer/index.js.map +2 -2
  144. package/dist/cjs/biz-components/Specs/index.d.ts +2 -2
  145. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  146. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  147. package/dist/cjs/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  148. package/dist/cjs/biz-components/SpecsComparison/index.d.ts +2 -0
  149. package/dist/cjs/biz-components/SpecsComparison/index.js +2 -0
  150. package/dist/cjs/biz-components/SpecsComparison/index.js.map +7 -0
  151. package/dist/cjs/biz-components/SpecsComparison/types.d.ts +34 -0
  152. package/dist/cjs/biz-components/SpecsComparison/types.js +2 -0
  153. package/dist/cjs/biz-components/SpecsComparison/types.js.map +7 -0
  154. package/dist/cjs/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  155. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js +2 -0
  156. package/dist/cjs/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  157. package/dist/cjs/biz-components/TabWithImage/index.d.ts +2 -0
  158. package/dist/cjs/biz-components/TabWithImage/index.js +2 -0
  159. package/dist/cjs/biz-components/TabWithImage/index.js.map +7 -0
  160. package/dist/cjs/biz-components/TabWithImage/types.d.ts +29 -0
  161. package/dist/cjs/biz-components/TabWithImage/types.js +2 -0
  162. package/dist/cjs/biz-components/TabWithImage/types.js.map +7 -0
  163. package/dist/cjs/biz-components/Tabs/Tabs.d.ts +2 -2
  164. package/dist/cjs/biz-components/Tabs/Tabs.js +1 -1
  165. package/dist/cjs/biz-components/Tabs/Tabs.js.map +1 -1
  166. package/dist/cjs/biz-components/Tabs/types.d.ts +11 -0
  167. package/dist/cjs/biz-components/Tabs/types.js +1 -1
  168. package/dist/cjs/biz-components/Tabs/types.js.map +1 -1
  169. package/dist/cjs/biz-components/TabsGroup/index.d.ts +2 -2
  170. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  171. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  172. package/dist/cjs/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  173. package/dist/cjs/biz-components/TabsWithMedia/index.d.ts +2 -0
  174. package/dist/cjs/biz-components/TabsWithMedia/index.js +2 -0
  175. package/dist/cjs/biz-components/TabsWithMedia/index.js.map +7 -0
  176. package/dist/cjs/biz-components/TabsWithMedia/types.d.ts +43 -0
  177. package/dist/cjs/biz-components/TabsWithMedia/types.js +2 -0
  178. package/dist/cjs/biz-components/TabsWithMedia/types.js.map +7 -0
  179. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  180. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  181. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  182. package/dist/cjs/biz-components/ThreeDCarousel/index.d.ts +2 -0
  183. package/dist/cjs/biz-components/ThreeDCarousel/index.js +2 -0
  184. package/dist/cjs/biz-components/ThreeDCarousel/index.js.map +7 -0
  185. package/dist/cjs/biz-components/ThreeDCarousel/types.d.ts +26 -0
  186. package/dist/cjs/biz-components/ThreeDCarousel/types.js +2 -0
  187. package/dist/cjs/biz-components/ThreeDCarousel/types.js.map +7 -0
  188. package/dist/cjs/biz-components/Title/index.d.ts +2 -2
  189. package/dist/cjs/biz-components/Title/types.js +1 -1
  190. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  191. package/dist/cjs/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  192. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js +2 -0
  193. package/dist/cjs/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  194. package/dist/cjs/biz-components/VideoFeature/index.d.ts +2 -0
  195. package/dist/cjs/biz-components/VideoFeature/index.js +2 -0
  196. package/dist/cjs/biz-components/VideoFeature/index.js.map +7 -0
  197. package/dist/cjs/biz-components/VideoFeature/types.d.ts +19 -0
  198. package/dist/cjs/biz-components/VideoFeature/types.js +2 -0
  199. package/dist/cjs/biz-components/VideoFeature/types.js.map +7 -0
  200. package/dist/cjs/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  201. package/dist/cjs/biz-components/index.d.ts +33 -0
  202. package/dist/cjs/biz-components/index.js +1 -1
  203. package/dist/cjs/biz-components/index.js.map +3 -3
  204. package/dist/cjs/components/alert.d.ts +2 -2
  205. package/dist/cjs/components/avatar.d.ts +8 -8
  206. package/dist/cjs/components/container.d.ts +7 -7
  207. package/dist/cjs/components/container.js +1 -1
  208. package/dist/cjs/components/container.js.map +2 -2
  209. package/dist/cjs/components/dialog.d.ts +1 -1
  210. package/dist/cjs/components/drop-down.d.ts +3 -3
  211. package/dist/cjs/components/heading.d.ts +1 -0
  212. package/dist/cjs/components/heading.js +1 -1
  213. package/dist/cjs/components/heading.js.map +3 -3
  214. package/dist/cjs/components/input-number.d.ts +15 -15
  215. package/dist/cjs/components/link.d.ts +6 -6
  216. package/dist/cjs/components/tabs.d.ts +2 -2
  217. package/dist/cjs/components/tabs.js +1 -1
  218. package/dist/cjs/components/tabs.js.map +2 -2
  219. package/dist/cjs/cpn-components/CpnNavigation/index.js +1 -1
  220. package/dist/cjs/cpn-components/CpnNavigation/index.js.map +3 -3
  221. package/dist/cjs/helpers/ScrollLoadVideo.js.map +2 -2
  222. package/dist/cjs/shared/ErrorBoundary.d.ts +18 -0
  223. package/dist/cjs/shared/ErrorBoundary.js +2 -0
  224. package/dist/cjs/shared/ErrorBoundary.js.map +7 -0
  225. package/dist/cjs/shared/Styles.d.ts +2 -2
  226. package/dist/cjs/shared/Styles.js +1 -1
  227. package/dist/cjs/shared/Styles.js.map +3 -3
  228. package/dist/cjs/stories/InlineVideo.stories.js +164 -0
  229. package/dist/cjs/stories/InlineVideo.stories.js.map +7 -0
  230. package/dist/cjs/stories/MarqueeReview.stories.js +19 -0
  231. package/dist/cjs/stories/MarqueeReview.stories.js.map +7 -0
  232. package/dist/cjs/stories/MediaSceneSwitcher.stories.js +2 -0
  233. package/dist/cjs/stories/MediaSceneSwitcher.stories.js.map +7 -0
  234. package/dist/cjs/stories/ProductNav.stories.js +2 -0
  235. package/dist/cjs/stories/ProductNav.stories.js.map +7 -0
  236. package/dist/cjs/stories/ThreeDCarousel.stories.js +118 -0
  237. package/dist/cjs/stories/ThreeDCarousel.stories.js.map +7 -0
  238. package/dist/cjs/stories/featureCards.stories.js +61 -0
  239. package/dist/cjs/stories/featureCards.stories.js.map +7 -0
  240. package/dist/cjs/stories/featureShowcase.stories.js +44 -0
  241. package/dist/cjs/stories/featureShowcase.stories.js.map +7 -0
  242. package/dist/cjs/stories/imageTextFeature.stories.js +50 -0
  243. package/dist/cjs/stories/imageTextFeature.stories.js.map +7 -0
  244. package/dist/cjs/stories/imageWithText.stories.js +84 -0
  245. package/dist/cjs/stories/imageWithText.stories.js.map +7 -0
  246. package/dist/cjs/stories/ksp.stories.js +128 -0
  247. package/dist/cjs/stories/ksp.stories.js.map +7 -0
  248. package/dist/cjs/stories/productCompare.stories.js +54 -0
  249. package/dist/cjs/stories/productCompare.stories.js.map +7 -0
  250. package/dist/cjs/stories/productHero.stories.js +50 -0
  251. package/dist/cjs/stories/productHero.stories.js.map +7 -0
  252. package/dist/cjs/stories/specsComparison.stories.js +105 -0
  253. package/dist/cjs/stories/specsComparison.stories.js.map +7 -0
  254. package/dist/cjs/stories/tabWithImage.stories.js +53 -0
  255. package/dist/cjs/stories/tabWithImage.stories.js.map +7 -0
  256. package/dist/cjs/stories/tabsWithMedia.stories.js +68 -0
  257. package/dist/cjs/stories/tabsWithMedia.stories.js.map +7 -0
  258. package/dist/cjs/stories/videoFeature.stories.js +56 -0
  259. package/dist/cjs/stories/videoFeature.stories.js.map +7 -0
  260. package/dist/cjs/types/props.d.ts +9 -2
  261. package/dist/cjs/types/props.js +1 -1
  262. package/dist/cjs/types/props.js.map +1 -1
  263. package/dist/esm/biz-components/AccordionCards/index.d.ts +2 -2
  264. package/dist/esm/biz-components/AplusDesc/index.d.ts +3 -2
  265. package/dist/esm/biz-components/BrandEquity/BrandEquity.d.ts +3 -2
  266. package/dist/esm/biz-components/BrandEquity/BrandEquity.js +1 -1
  267. package/dist/esm/biz-components/BrandEquity/BrandEquity.js.map +3 -3
  268. package/dist/esm/biz-components/BrandEquity/types.d.ts +0 -1
  269. package/dist/esm/biz-components/Category/index.d.ts +2 -2
  270. package/dist/esm/biz-components/CreativeModule/index.d.ts +3 -2
  271. package/dist/esm/biz-components/DownLoad/index.d.ts +3 -2
  272. package/dist/esm/biz-components/Evaluate/index.d.ts +2 -2
  273. package/dist/esm/biz-components/Faq/Faq.d.ts +2 -2
  274. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  275. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  276. package/dist/esm/biz-components/FeatureCards/FeatureCards.d.ts +7 -0
  277. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +2 -0
  278. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +7 -0
  279. package/dist/esm/biz-components/FeatureCards/index.d.ts +2 -0
  280. package/dist/esm/biz-components/FeatureCards/index.js +2 -0
  281. package/dist/esm/biz-components/FeatureCards/index.js.map +7 -0
  282. package/dist/esm/biz-components/FeatureCards/types.d.ts +27 -0
  283. package/dist/esm/biz-components/FeatureCards/types.js +1 -0
  284. package/dist/esm/biz-components/FeatureCards/types.js.map +7 -0
  285. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.d.ts +7 -0
  286. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js +2 -0
  287. package/dist/esm/biz-components/FeatureShowcase/FeatureShowcase.js.map +7 -0
  288. package/dist/esm/biz-components/FeatureShowcase/index.d.ts +2 -0
  289. package/dist/esm/biz-components/FeatureShowcase/index.js +2 -0
  290. package/dist/esm/biz-components/FeatureShowcase/index.js.map +7 -0
  291. package/dist/esm/biz-components/FeatureShowcase/types.d.ts +23 -0
  292. package/dist/esm/biz-components/FeatureShowcase/types.js +1 -0
  293. package/dist/esm/biz-components/FeatureShowcase/types.js.map +7 -0
  294. package/dist/esm/biz-components/Features/index.d.ts +3 -2
  295. package/dist/esm/biz-components/FootCharger/index.d.ts +3 -2
  296. package/dist/esm/biz-components/FooterNavigation/index.d.ts +3 -2
  297. package/dist/esm/biz-components/GiftBox/index.d.ts +3 -2
  298. package/dist/esm/biz-components/Graphic/index.d.ts +2 -2
  299. package/dist/esm/biz-components/GraphicAttractionBlock/index.d.ts +2 -2
  300. package/dist/esm/biz-components/GraphicMore/index.d.ts +3 -2
  301. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.d.ts +2 -2
  302. package/dist/esm/biz-components/HeaderNavigation/index.d.ts +2 -2
  303. package/dist/esm/biz-components/HeaderNavigation/index.js.map +2 -2
  304. package/dist/esm/biz-components/HeroBanner/HeroBanner.d.ts +2 -2
  305. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  306. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  307. package/dist/esm/biz-components/HeroBanner/types.d.ts +2 -0
  308. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.d.ts +7 -0
  309. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js +2 -0
  310. package/dist/esm/biz-components/ImageTextFeature/ImageTextFeature.js.map +7 -0
  311. package/dist/esm/biz-components/ImageTextFeature/index.d.ts +2 -0
  312. package/dist/esm/biz-components/ImageTextFeature/index.js +2 -0
  313. package/dist/esm/biz-components/ImageTextFeature/index.js.map +7 -0
  314. package/dist/esm/biz-components/ImageTextFeature/types.d.ts +31 -0
  315. package/dist/esm/biz-components/ImageTextFeature/types.js +1 -0
  316. package/dist/esm/biz-components/ImageTextFeature/types.js.map +7 -0
  317. package/dist/esm/biz-components/ImageWithText/ImageWithText.d.ts +7 -0
  318. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +2 -0
  319. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +7 -0
  320. package/dist/esm/biz-components/ImageWithText/index.d.ts +3 -0
  321. package/dist/esm/biz-components/ImageWithText/index.js +2 -0
  322. package/dist/esm/biz-components/ImageWithText/index.js.map +7 -0
  323. package/dist/esm/biz-components/ImageWithText/types.d.ts +110 -0
  324. package/dist/esm/biz-components/ImageWithText/types.js +2 -0
  325. package/dist/esm/biz-components/ImageWithText/types.js.map +7 -0
  326. package/dist/esm/biz-components/InlineVideo/index.d.ts +16 -0
  327. package/dist/esm/biz-components/InlineVideo/index.js +2 -0
  328. package/dist/esm/biz-components/InlineVideo/index.js.map +7 -0
  329. package/dist/esm/biz-components/Ksp/index.d.ts +44 -0
  330. package/dist/esm/biz-components/Ksp/index.js +2 -0
  331. package/dist/esm/biz-components/Ksp/index.js.map +7 -0
  332. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +1 -1
  333. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js +1 -1
  334. package/dist/esm/biz-components/Listing/components/PaidShipping/ShippingPolicyModal.js.map +2 -2
  335. package/dist/esm/biz-components/Listing/components/PaidShipping/index.d.ts +19 -6
  336. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.d.ts +2 -2
  337. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +3 -2
  338. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +3 -2
  339. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.d.ts +3 -2
  340. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js +1 -1
  341. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js.map +3 -3
  342. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductHighlight/index.d.ts +3 -2
  343. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductOptions/index.d.ts +3 -2
  344. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js +1 -1
  345. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/components/CompareModal.js.map +1 -1
  346. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.d.ts +3 -2
  347. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  348. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
  349. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.d.ts +3 -2
  350. package/dist/esm/biz-components/Listing/components/PurchaseBar/ScrollSpyNav/types.d.ts +1 -0
  351. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.d.ts +3 -2
  352. package/dist/esm/biz-components/Marquee/Marquee.d.ts +2 -2
  353. package/dist/esm/biz-components/MarqueeReview/index.d.ts +42 -0
  354. package/dist/esm/biz-components/MarqueeReview/index.js +2 -0
  355. package/dist/esm/biz-components/MarqueeReview/index.js.map +7 -0
  356. package/dist/esm/biz-components/MediaPlayerBase/index.backup.d.ts +7 -0
  357. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js +2 -0
  358. package/dist/esm/biz-components/MediaPlayerBase/index.backup.js.map +7 -0
  359. package/dist/esm/biz-components/MediaPlayerBase/index.d.ts +3 -2
  360. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  361. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  362. package/dist/esm/biz-components/MediaPlayerMulti/index.d.ts +3 -2
  363. package/dist/esm/biz-components/MediaPlayerSticky/index.d.ts +2 -2
  364. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.d.ts +8 -0
  365. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js +11 -0
  366. package/dist/esm/biz-components/MediaSceneSwitcher/MediaSceneSwitcher.js.map +7 -0
  367. package/dist/esm/biz-components/MediaSceneSwitcher/index.d.ts +2 -0
  368. package/dist/esm/biz-components/MediaSceneSwitcher/index.js +2 -0
  369. package/dist/esm/biz-components/MediaSceneSwitcher/index.js.map +7 -0
  370. package/dist/esm/biz-components/MediaSceneSwitcher/types.d.ts +19 -0
  371. package/dist/esm/biz-components/MediaSceneSwitcher/types.js +1 -0
  372. package/dist/esm/biz-components/MediaSceneSwitcher/types.js.map +7 -0
  373. package/dist/esm/biz-components/MemberEquity/index.d.ts +2 -2
  374. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.d.ts +2 -2
  375. package/dist/esm/biz-components/NavigationSearch/index.d.ts +1 -0
  376. package/dist/esm/biz-components/ProductCompare/index.d.ts +54 -0
  377. package/dist/esm/biz-components/ProductCompare/index.js +2 -0
  378. package/dist/esm/biz-components/ProductCompare/index.js.map +7 -0
  379. package/dist/esm/biz-components/ProductHero/ProductHero.d.ts +7 -0
  380. package/dist/esm/biz-components/ProductHero/ProductHero.js +2 -0
  381. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +7 -0
  382. package/dist/esm/biz-components/ProductHero/index.d.ts +2 -0
  383. package/dist/esm/biz-components/ProductHero/index.js +2 -0
  384. package/dist/esm/biz-components/ProductHero/index.js.map +7 -0
  385. package/dist/esm/biz-components/ProductHero/types.d.ts +23 -0
  386. package/dist/esm/biz-components/ProductHero/types.js +1 -0
  387. package/dist/esm/biz-components/ProductHero/types.js.map +7 -0
  388. package/dist/esm/biz-components/ProductNav/ProductNav.d.ts +7 -0
  389. package/dist/esm/biz-components/ProductNav/ProductNav.js +2 -0
  390. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +7 -0
  391. package/dist/esm/biz-components/ProductNav/index.d.ts +2 -0
  392. package/dist/esm/biz-components/ProductNav/index.js +2 -0
  393. package/dist/esm/biz-components/ProductNav/index.js.map +7 -0
  394. package/dist/esm/biz-components/ProductNav/types.d.ts +35 -0
  395. package/dist/esm/biz-components/ProductNav/types.js +1 -0
  396. package/dist/esm/biz-components/ProductNav/types.js.map +7 -0
  397. package/dist/esm/biz-components/SelectStore/index.d.ts +3 -2
  398. package/dist/esm/biz-components/ShelfDisplay/index.d.ts +2 -2
  399. package/dist/esm/biz-components/Slogan/index.d.ts +2 -2
  400. package/dist/esm/biz-components/Spacer/index.d.ts +2 -2
  401. package/dist/esm/biz-components/Spacer/index.js +1 -1
  402. package/dist/esm/biz-components/Spacer/index.js.map +2 -2
  403. package/dist/esm/biz-components/Specs/index.d.ts +2 -2
  404. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.d.ts +7 -0
  405. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js +2 -0
  406. package/dist/esm/biz-components/SpecsComparison/SpecsComparison.js.map +7 -0
  407. package/dist/esm/biz-components/SpecsComparison/index.d.ts +2 -0
  408. package/dist/esm/biz-components/SpecsComparison/index.js +2 -0
  409. package/dist/esm/biz-components/SpecsComparison/index.js.map +7 -0
  410. package/dist/esm/biz-components/SpecsComparison/types.d.ts +34 -0
  411. package/dist/esm/biz-components/SpecsComparison/types.js +1 -0
  412. package/dist/esm/biz-components/SpecsComparison/types.js.map +7 -0
  413. package/dist/esm/biz-components/TabWithImage/TabWithImage.d.ts +7 -0
  414. package/dist/esm/biz-components/TabWithImage/TabWithImage.js +2 -0
  415. package/dist/esm/biz-components/TabWithImage/TabWithImage.js.map +7 -0
  416. package/dist/esm/biz-components/TabWithImage/index.d.ts +2 -0
  417. package/dist/esm/biz-components/TabWithImage/index.js +2 -0
  418. package/dist/esm/biz-components/TabWithImage/index.js.map +7 -0
  419. package/dist/esm/biz-components/TabWithImage/types.d.ts +29 -0
  420. package/dist/esm/biz-components/TabWithImage/types.js +1 -0
  421. package/dist/esm/biz-components/TabWithImage/types.js.map +7 -0
  422. package/dist/esm/biz-components/Tabs/Tabs.d.ts +2 -2
  423. package/dist/esm/biz-components/Tabs/Tabs.js +1 -1
  424. package/dist/esm/biz-components/Tabs/Tabs.js.map +1 -1
  425. package/dist/esm/biz-components/Tabs/types.d.ts +11 -0
  426. package/dist/esm/biz-components/TabsGroup/index.d.ts +2 -2
  427. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.d.ts +7 -0
  428. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js +2 -0
  429. package/dist/esm/biz-components/TabsWithMedia/TabsWithMedia.js.map +7 -0
  430. package/dist/esm/biz-components/TabsWithMedia/index.d.ts +2 -0
  431. package/dist/esm/biz-components/TabsWithMedia/index.js +2 -0
  432. package/dist/esm/biz-components/TabsWithMedia/index.js.map +7 -0
  433. package/dist/esm/biz-components/TabsWithMedia/types.d.ts +43 -0
  434. package/dist/esm/biz-components/TabsWithMedia/types.js +1 -0
  435. package/dist/esm/biz-components/TabsWithMedia/types.js.map +7 -0
  436. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.d.ts +11 -0
  437. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +2 -0
  438. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +7 -0
  439. package/dist/esm/biz-components/ThreeDCarousel/index.d.ts +2 -0
  440. package/dist/esm/biz-components/ThreeDCarousel/index.js +2 -0
  441. package/dist/esm/biz-components/ThreeDCarousel/index.js.map +7 -0
  442. package/dist/esm/biz-components/ThreeDCarousel/types.d.ts +26 -0
  443. package/dist/esm/biz-components/ThreeDCarousel/types.js +1 -0
  444. package/dist/esm/biz-components/ThreeDCarousel/types.js.map +7 -0
  445. package/dist/esm/biz-components/Title/index.d.ts +2 -2
  446. package/dist/esm/biz-components/VideoFeature/VideoFeature.d.ts +7 -0
  447. package/dist/esm/biz-components/VideoFeature/VideoFeature.js +2 -0
  448. package/dist/esm/biz-components/VideoFeature/VideoFeature.js.map +7 -0
  449. package/dist/esm/biz-components/VideoFeature/index.d.ts +2 -0
  450. package/dist/esm/biz-components/VideoFeature/index.js +2 -0
  451. package/dist/esm/biz-components/VideoFeature/index.js.map +7 -0
  452. package/dist/esm/biz-components/VideoFeature/types.d.ts +19 -0
  453. package/dist/esm/biz-components/VideoFeature/types.js +1 -0
  454. package/dist/esm/biz-components/VideoFeature/types.js.map +7 -0
  455. package/dist/esm/biz-components/WhyChoose/WhyChoose.d.ts +2 -2
  456. package/dist/esm/biz-components/index.d.ts +33 -0
  457. package/dist/esm/biz-components/index.js +1 -1
  458. package/dist/esm/biz-components/index.js.map +2 -2
  459. package/dist/esm/components/alert.d.ts +2 -2
  460. package/dist/esm/components/avatar.d.ts +8 -8
  461. package/dist/esm/components/container.d.ts +7 -7
  462. package/dist/esm/components/container.js +1 -1
  463. package/dist/esm/components/container.js.map +2 -2
  464. package/dist/esm/components/dialog.d.ts +1 -1
  465. package/dist/esm/components/drop-down.d.ts +3 -3
  466. package/dist/esm/components/heading.d.ts +1 -0
  467. package/dist/esm/components/heading.js +1 -1
  468. package/dist/esm/components/heading.js.map +3 -3
  469. package/dist/esm/components/input-number.d.ts +15 -15
  470. package/dist/esm/components/link.d.ts +6 -6
  471. package/dist/esm/components/tabs.d.ts +2 -2
  472. package/dist/esm/components/tabs.js +1 -1
  473. package/dist/esm/components/tabs.js.map +2 -2
  474. package/dist/esm/cpn-components/CpnNavigation/index.js +1 -1
  475. package/dist/esm/cpn-components/CpnNavigation/index.js.map +2 -2
  476. package/dist/esm/helpers/ScrollLoadVideo.js.map +2 -2
  477. package/dist/esm/shared/ErrorBoundary.d.ts +18 -0
  478. package/dist/esm/shared/ErrorBoundary.js +2 -0
  479. package/dist/esm/shared/ErrorBoundary.js.map +7 -0
  480. package/dist/esm/shared/Styles.d.ts +2 -2
  481. package/dist/esm/shared/Styles.js +1 -1
  482. package/dist/esm/shared/Styles.js.map +3 -3
  483. package/dist/esm/stories/InlineVideo.stories.js +164 -0
  484. package/dist/esm/stories/InlineVideo.stories.js.map +7 -0
  485. package/dist/esm/stories/MarqueeReview.stories.js +19 -0
  486. package/dist/esm/stories/MarqueeReview.stories.js.map +7 -0
  487. package/dist/esm/stories/MediaSceneSwitcher.stories.js +2 -0
  488. package/dist/esm/stories/MediaSceneSwitcher.stories.js.map +7 -0
  489. package/dist/esm/stories/ProductNav.stories.js +2 -0
  490. package/dist/esm/stories/ProductNav.stories.js.map +7 -0
  491. package/dist/esm/stories/ThreeDCarousel.stories.js +118 -0
  492. package/dist/esm/stories/ThreeDCarousel.stories.js.map +7 -0
  493. package/dist/esm/stories/featureCards.stories.js +61 -0
  494. package/dist/esm/stories/featureCards.stories.js.map +7 -0
  495. package/dist/esm/stories/featureShowcase.stories.js +44 -0
  496. package/dist/esm/stories/featureShowcase.stories.js.map +7 -0
  497. package/dist/esm/stories/imageTextFeature.stories.js +50 -0
  498. package/dist/esm/stories/imageTextFeature.stories.js.map +7 -0
  499. package/dist/esm/stories/imageWithText.stories.js +84 -0
  500. package/dist/esm/stories/imageWithText.stories.js.map +7 -0
  501. package/dist/esm/stories/ksp.stories.js +128 -0
  502. package/dist/esm/stories/ksp.stories.js.map +7 -0
  503. package/dist/esm/stories/productCompare.stories.js +54 -0
  504. package/dist/esm/stories/productCompare.stories.js.map +7 -0
  505. package/dist/esm/stories/productHero.stories.js +50 -0
  506. package/dist/esm/stories/productHero.stories.js.map +7 -0
  507. package/dist/esm/stories/specsComparison.stories.js +105 -0
  508. package/dist/esm/stories/specsComparison.stories.js.map +7 -0
  509. package/dist/esm/stories/tabWithImage.stories.js +53 -0
  510. package/dist/esm/stories/tabWithImage.stories.js.map +7 -0
  511. package/dist/esm/stories/tabsWithMedia.stories.js +68 -0
  512. package/dist/esm/stories/tabsWithMedia.stories.js.map +7 -0
  513. package/dist/esm/stories/videoFeature.stories.js +56 -0
  514. package/dist/esm/stories/videoFeature.stories.js.map +7 -0
  515. package/dist/esm/types/props.d.ts +9 -2
  516. package/dist/tokens/base.css +3 -0
  517. package/package.json +18 -13
  518. package/style.css +11 -2
  519. package/tailwind.config.js +24 -0
  520. package/dist/cjs/stories/HeroBanner.stories.d.ts +0 -27
  521. package/dist/cjs/stories/MemberEquity.stories.d.ts +0 -9
  522. package/dist/cjs/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  523. package/dist/cjs/stories/accordionCards.stories.d.ts +0 -17
  524. package/dist/cjs/stories/alert.stories.d.ts +0 -27
  525. package/dist/cjs/stories/avatar.stories.d.ts +0 -39
  526. package/dist/cjs/stories/badge.stories.d.ts +0 -31
  527. package/dist/cjs/stories/bizTabs.stories.d.ts +0 -7
  528. package/dist/cjs/stories/board.stories.d.ts +0 -6
  529. package/dist/cjs/stories/brandEquity.stories.d.ts +0 -16
  530. package/dist/cjs/stories/button.stories.d.ts +0 -56
  531. package/dist/cjs/stories/card.stories.d.ts +0 -27
  532. package/dist/cjs/stories/carousel.stories.d.ts +0 -8
  533. package/dist/cjs/stories/category.stories.d.ts +0 -17
  534. package/dist/cjs/stories/checkbox.stories.d.ts +0 -46
  535. package/dist/cjs/stories/container.stories.d.ts +0 -28
  536. package/dist/cjs/stories/cpnBanner.stories.d.ts +0 -14
  537. package/dist/cjs/stories/cpnCountdown.stories.d.ts +0 -12
  538. package/dist/cjs/stories/cpnNavigation.stories.d.ts +0 -14
  539. package/dist/cjs/stories/cpnProductcard.stories.d.ts +0 -14
  540. package/dist/cjs/stories/cpnTitle.stories.d.ts +0 -14
  541. package/dist/cjs/stories/creativeModule.stories.d.ts +0 -19
  542. package/dist/cjs/stories/dialog.stories.d.ts +0 -20
  543. package/dist/cjs/stories/drawer.stories.d.ts +0 -20
  544. package/dist/cjs/stories/drop-down.stories.d.ts +0 -16
  545. package/dist/cjs/stories/evaluate.stories.d.ts +0 -16
  546. package/dist/cjs/stories/faq.stories.d.ts +0 -21
  547. package/dist/cjs/stories/graphic.stories.d.ts +0 -64
  548. package/dist/cjs/stories/graphicAttractionBlock.stories.d.ts +0 -6
  549. package/dist/cjs/stories/grid.stories.d.ts +0 -22
  550. package/dist/cjs/stories/heading.stories.d.ts +0 -84
  551. package/dist/cjs/stories/input-number.stories.d.ts +0 -39
  552. package/dist/cjs/stories/input.stories.d.ts +0 -35
  553. package/dist/cjs/stories/link.stories.d.ts +0 -69
  554. package/dist/cjs/stories/marquee.stories.d.ts +0 -30
  555. package/dist/cjs/stories/mediaplayerBase.stories.d.ts +0 -6
  556. package/dist/cjs/stories/mediaplayerMulti.stories.d.ts +0 -16
  557. package/dist/cjs/stories/picture.stories.d.ts +0 -22
  558. package/dist/cjs/stories/popover.stories.d.ts +0 -17
  559. package/dist/cjs/stories/radio.stories.d.ts +0 -39
  560. package/dist/cjs/stories/shelfDisplay.stories.d.ts +0 -16
  561. package/dist/cjs/stories/skeleton.stories.d.ts +0 -20
  562. package/dist/cjs/stories/slogan.stories.d.ts +0 -20
  563. package/dist/cjs/stories/specs.stories.d.ts +0 -13
  564. package/dist/cjs/stories/tabs.stories.d.ts +0 -373
  565. package/dist/cjs/stories/text.stories.d.ts +0 -86
  566. package/dist/cjs/stories/whychoose.stories.d.ts +0 -21
  567. package/dist/esm/stories/HeroBanner.stories.d.ts +0 -27
  568. package/dist/esm/stories/MemberEquity.stories.d.ts +0 -9
  569. package/dist/esm/stories/MultiLayoutGraphicBlock.stories.d.ts +0 -9
  570. package/dist/esm/stories/accordionCards.stories.d.ts +0 -17
  571. package/dist/esm/stories/alert.stories.d.ts +0 -27
  572. package/dist/esm/stories/avatar.stories.d.ts +0 -39
  573. package/dist/esm/stories/badge.stories.d.ts +0 -31
  574. package/dist/esm/stories/bizTabs.stories.d.ts +0 -7
  575. package/dist/esm/stories/board.stories.d.ts +0 -6
  576. package/dist/esm/stories/brandEquity.stories.d.ts +0 -16
  577. package/dist/esm/stories/button.stories.d.ts +0 -56
  578. package/dist/esm/stories/card.stories.d.ts +0 -27
  579. package/dist/esm/stories/carousel.stories.d.ts +0 -8
  580. package/dist/esm/stories/category.stories.d.ts +0 -17
  581. package/dist/esm/stories/checkbox.stories.d.ts +0 -46
  582. package/dist/esm/stories/container.stories.d.ts +0 -28
  583. package/dist/esm/stories/cpnBanner.stories.d.ts +0 -14
  584. package/dist/esm/stories/cpnCountdown.stories.d.ts +0 -12
  585. package/dist/esm/stories/cpnNavigation.stories.d.ts +0 -14
  586. package/dist/esm/stories/cpnProductcard.stories.d.ts +0 -14
  587. package/dist/esm/stories/cpnTitle.stories.d.ts +0 -14
  588. package/dist/esm/stories/creativeModule.stories.d.ts +0 -19
  589. package/dist/esm/stories/dialog.stories.d.ts +0 -20
  590. package/dist/esm/stories/drawer.stories.d.ts +0 -20
  591. package/dist/esm/stories/drop-down.stories.d.ts +0 -16
  592. package/dist/esm/stories/evaluate.stories.d.ts +0 -16
  593. package/dist/esm/stories/faq.stories.d.ts +0 -21
  594. package/dist/esm/stories/graphic.stories.d.ts +0 -64
  595. package/dist/esm/stories/graphicAttractionBlock.stories.d.ts +0 -6
  596. package/dist/esm/stories/grid.stories.d.ts +0 -22
  597. package/dist/esm/stories/heading.stories.d.ts +0 -84
  598. package/dist/esm/stories/input-number.stories.d.ts +0 -39
  599. package/dist/esm/stories/input.stories.d.ts +0 -35
  600. package/dist/esm/stories/link.stories.d.ts +0 -69
  601. package/dist/esm/stories/marquee.stories.d.ts +0 -30
  602. package/dist/esm/stories/mediaplayerBase.stories.d.ts +0 -6
  603. package/dist/esm/stories/mediaplayerMulti.stories.d.ts +0 -16
  604. package/dist/esm/stories/picture.stories.d.ts +0 -22
  605. package/dist/esm/stories/popover.stories.d.ts +0 -17
  606. package/dist/esm/stories/radio.stories.d.ts +0 -39
  607. package/dist/esm/stories/shelfDisplay.stories.d.ts +0 -16
  608. package/dist/esm/stories/skeleton.stories.d.ts +0 -20
  609. package/dist/esm/stories/slogan.stories.d.ts +0 -20
  610. package/dist/esm/stories/specs.stories.d.ts +0 -13
  611. package/dist/esm/stories/tabs.stories.d.ts +0 -373
  612. package/dist/esm/stories/text.stories.d.ts +0 -86
  613. package/dist/esm/stories/whychoose.stories.d.ts +0 -21
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductGallery/index.tsx"],
4
- "sourcesContent": ["import { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { Text, Picture, Button, Badge } from '../../../../../components/index.js'\nimport {\n useCallback,\n useMemo,\n useState,\n forwardRef,\n useRef,\n type RefObject,\n useEffect,\n type Dispatch,\n type SetStateAction,\n useImperativeHandle,\n} from 'react'\nimport { Swiper, SwiperSlide, type SwiperRef } from 'swiper/react'\nimport { Navigation, Mousewheel, Thumbs, Pagination } from 'swiper/modules'\nimport { cn } from '../../../../../helpers/index.js'\nimport { GalleryTabType } from './types.js'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useVariantMedia } from '../../../hooks/use-variant-media.js'\nimport { SpecsModal } from './components/SpecsModal.js'\nimport CompareModal from './components/CompareModal.js'\nimport { formatPrice } from '../../../utils/index.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\n\nimport type { Swiper as SwiperType } from 'swiper'\nimport type { ImageMedia, VideoMedia } from '../../../hooks/use-variant-media.js'\nimport type { ProductGalleryProps, ProductGalleryTabItemProps, GalleryTabItemProps } from './types.js'\n\nconst SwiperLeftButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect x=\"48\" y=\"48\" width=\"48\" height=\"48\" rx=\"24\" transform=\"rotate(-180 48 48)\" fill=\"white\" />\n <path\n d=\"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst SwiperRightButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect width=\"48\" height=\"48\" rx=\"24\" transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)\" fill=\"white\" />\n <path\n d=\"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst ProductGallery = () => {\n const { copyWriting } = useAiuiContext()\n const { product, variant, selectedOptions } = useBizProductContext()\n const defaultMediaData = useVariantMedia({ product, variant })\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const productGalleryTabRef = useRef<ProductGalleryTabRef>(null)\n\n const customMediaList = variant?.metafields?.component?.custom_media_list\n let productList: ImageMedia[], sceneList: ImageMedia[], keyFeaturesList: ImageMedia[], videoList: VideoMedia[]\n\n if (customMediaList && customMediaList?.available) {\n productList = customMediaList?.product || []\n sceneList = customMediaList?.scenarios || []\n keyFeaturesList = customMediaList?.keyFeatures || []\n videoList = customMediaList?.video || []\n } else {\n productList = defaultMediaData?.productList\n sceneList = defaultMediaData?.sceneList\n keyFeaturesList = defaultMediaData?.keyFeaturesList\n videoList = defaultMediaData?.videoList\n }\n\n const allMedia = useMemo(() => [...productList, ...sceneList, ...videoList], [productList, sceneList, videoList])\n\n const galleryMap: Record<string, ImageMedia[] | VideoMedia[]> = {\n productList: productList,\n sceneList: sceneList,\n keyFeaturesList: keyFeaturesList,\n videoList: videoList,\n }\n\n const galleryTabs = useMemo(() => {\n const productTab: ProductGalleryProps =\n product?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n const variantProductGallery =\n variant?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n\n return productTab\n ?.map((item: any) => {\n // \u5982\u679C\u5B58\u5728 images \u6570\u7EC4\u4E14\u6709\u6709\u6548\u503C\uFF0C\u4F18\u5148\u4F7F\u7528 images \u521B\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6570\u636E\n const variantProductGalleryItem = variantProductGallery?.find(\n (variantItem: any) => item?.galleries === variantItem?.galleries\n )\n let galleries = galleryMap[item?.galleries] || []\n\n if (\n variantProductGalleryItem?.images &&\n Array.isArray(variantProductGalleryItem.images) &&\n variantProductGalleryItem.images.length > 0\n ) {\n // \u5904\u7406 images \u6570\u7EC4\uFF0C\u4E3A\u6BCF\u5F20\u56FE\u7247\u751F\u6210\u54CD\u5E94\u5F0F source\n const imageGalleries = variantProductGalleryItem.images\n .map((imageItem: any) => {\n // \u4ECE\u5355\u4E2A\u56FE\u7247\u5BF9\u8C61\u751F\u6210\u54CD\u5E94\u5F0F\u56FE\u7247\u7684 source \u5B57\u7B26\u4E32\n const imageSourceParts: string[] = []\n if (imageItem.image_1920 && imageItem.image_1920.trim()) {\n imageSourceParts.push(`${imageItem.image_1920} 1920`)\n }\n if (imageItem.image_1440 && imageItem.image_1440.trim()) {\n imageSourceParts.push(`${imageItem.image_1440} 1440`)\n }\n if (imageItem.image_1024 && imageItem.image_1024.trim()) {\n imageSourceParts.push(`${imageItem.image_1024} 1024`)\n }\n if (imageItem.image_768 && imageItem.image_768.trim()) {\n imageSourceParts.push(`${imageItem.image_768} 767`)\n }\n if (imageItem.image_390 && imageItem.image_390.trim()) {\n imageSourceParts.push(`${imageItem.image_390} 390`)\n }\n\n // \u5982\u679C\u751F\u6210\u4E86\u6709\u6548\u7684\u54CD\u5E94\u5F0F source\uFF0C\u8FD4\u56DE\u56FE\u7247\u5BF9\u8C61\n if (imageSourceParts.length > 0) {\n const responsiveSource = imageSourceParts.join(', ')\n return {\n image: {\n url: responsiveSource,\n altText: item.comment?.content || '',\n },\n // \u6807\u8BB0\u8FD9\u662F\u4ECE images \u751F\u6210\u7684\uFF0C\u7528\u4E8E\u540E\u7EED\u5904\u7406\n _fromImages: true,\n _responsiveSource: responsiveSource,\n } as any\n }\n return null\n })\n .filter((gallery: any) => gallery !== null) // \u8FC7\u6EE4\u6389\u65E0\u6548\u7684\u56FE\u7247\n\n // \u5982\u679C\u4ECE images \u6570\u7EC4\u751F\u6210\u4E86\u6709\u6548\u7684\u56FE\u7247\uFF0C\u4F7F\u7528\u5B83\u4EEC\uFF1B\u5426\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries\n if (imageGalleries.length > 0) {\n galleries = imageGalleries\n }\n // \u5982\u679C images \u5B58\u5728\u4F46\u90FD\u662F\u7A7A\u503C\uFF0C\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries \u903B\u8F91\n }\n\n return {\n ...item,\n galleries,\n }\n })\n .filter((item: any) => item.galleries.length > 0)\n }, [variant?.payload, galleryMap, product?.payload])\n\n const [activeGalleryTab, setActiveGalleryTab] = useState<GalleryTabItemProps>(galleryTabs?.[0])\n const [activeTabIndex, setActiveTabIndex] = useState(0)\n const [targetSlideIndex, setTargetSlideIndex] = useState<number | null>(null)\n\n // \u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\uFF09\n const handleNextTab = useCallback(() => {\n const nextIndex = (activeTabIndex + 1) % galleryTabs.length\n setActiveTabIndex(nextIndex)\n setActiveGalleryTab(galleryTabs[nextIndex])\n setTargetSlideIndex(0) // \u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n }, [activeTabIndex, galleryTabs])\n\n // \u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u6700\u540E\u4E00\u5F20\uFF09\n const handlePrevTab = useCallback(() => {\n const prevIndex = activeTabIndex === 0 ? galleryTabs.length - 1 : activeTabIndex - 1\n setActiveTabIndex(prevIndex)\n setActiveGalleryTab(galleryTabs[prevIndex])\n // \u8DF3\u8F6C\u5230\u4E0A\u4E00\u4E2A tab \u7684\u6700\u540E\u4E00\u5F20\n const prevTabGalleries = galleryTabs[prevIndex]?.galleries || []\n setTargetSlideIndex(prevTabGalleries.length - 1)\n }, [activeTabIndex, galleryTabs])\n\n // \u5F53 activeTabIndex \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5230\u5BF9\u5E94\u7684 tab\n useEffect(() => {\n if (activeTabIndex !== null && activeTabIndex !== undefined) {\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDD DOM \u5DF2\u66F4\u65B0\n requestAnimationFrame(() => {\n productGalleryTabRef.current?.scrollToTab(activeTabIndex)\n })\n }\n }, [activeTabIndex])\n\n useEffect(() => {\n // \u5F53 variant \u53D8\u5316\u65F6\uFF0C\u5207\u6362\u5230\u7B2C\u4E00\u4E2A tab\n setActiveGalleryTab(galleryTabs[0])\n setActiveTabIndex(0)\n }, [variant?.id])\n\n // \u4E3A\u6BCF\u4E2A tab \u6E32\u67D3\u5BF9\u5E94\u7684\u7EC4\u4EF6\n const renderGalleryForTab = (tab: any, index: number) => {\n switch (tab?.galleryTabType) {\n case GalleryTabType.GALLERY_IMAGE_MAIN:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_FEATURES:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_SCENE:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_VIDEO:\n return (\n <ProductGalleryTabVideo\n {...tab}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n default:\n return null\n }\n }\n\n return (\n <div id=\"ipc-product-gallery\">\n <Root className=\"relative\" value={activeGalleryTab?.tabValue} defaultValue={galleryTabs?.[0]?.tabValue}>\n <div className=\"tablet:h-[620px] desktop:rounded-2xl desktop:h-[560px] lg-desktop:h-[700px] desktop:relative h-[420px] overflow-hidden bg-[#EAEAEC] \">\n {galleryTabs.map((item: any, index: number) => {\n return (\n <Content key={item.tabValue} className=\"h-full\" value={item.tabValue}>\n {renderGalleryForTab(item, index)}\n </Content>\n )\n })}\n </div>\n <ProductGalleryTab\n ref={productGalleryTabRef}\n galleryTabs={galleryTabs}\n activeGalleryTab={activeGalleryTab}\n setActiveGalleryTab={setActiveGalleryTab}\n setActiveTabIndex={setActiveTabIndex}\n setTargetSlideIndex={setTargetSlideIndex}\n />\n </Root>\n </div>\n )\n}\n\nexport interface ProductGalleryTabRef {\n scrollToTab: (index: number) => void\n}\n\nconst ProductGalleryTab = forwardRef<\n ProductGalleryTabRef,\n {\n galleryTabs: GalleryTabItemProps[]\n activeGalleryTab: GalleryTabItemProps\n setActiveGalleryTab: Dispatch<SetStateAction<GalleryTabItemProps>>\n setActiveTabIndex: Dispatch<SetStateAction<number>>\n setTargetSlideIndex: Dispatch<SetStateAction<number | null>>\n }\n>((props, ref) => {\n const { galleryTabs, activeGalleryTab, setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex } = props\n const { product } = useBizProductContext()\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const triggerRefs = useRef<Map<string, HTMLButtonElement>>(new Map())\n\n const scrollToEvent = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = event.currentTarget\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }, [])\n\n const handleGalleryTabClick = useCallback(\n (el: React.MouseEvent<HTMLButtonElement>, item: GalleryTabItemProps, index: number) => {\n setActiveGalleryTab(item)\n setActiveTabIndex(index)\n setTargetSlideIndex(0) // \u624B\u52A8\u70B9\u51FB tab \u65F6\uFF0C\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n scrollToEvent(el)\n },\n [setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex, scrollToEvent]\n )\n\n // \u6EDA\u52A8\u5230\u6307\u5B9A\u7D22\u5F15\u7684 tab\n const scrollToTab = useCallback(\n (index: number) => {\n if (scrollContainerRef.current && galleryTabs[index]) {\n const container = scrollContainerRef.current\n const tabItem = galleryTabs[index]\n const button = triggerRefs.current.get(tabItem.tabValue)\n\n if (button) {\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n },\n [galleryTabs]\n )\n\n useImperativeHandle(ref, () => ({\n scrollToTab,\n }))\n\n return (\n <div className=\"laptop:inset-x-16 tablet:mt-3 desktop:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between\">\n <List\n ref={scrollContainerRef}\n className=\"laptop:p-0 desktop:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n <div className=\"whitespace-nowrap\">\n {galleryTabs?.map((item, index) => {\n return (\n <Trigger\n ref={el => {\n if (el) {\n triggerRefs.current.set(item.tabValue, el)\n } else {\n triggerRefs.current.delete(item.tabValue)\n }\n }}\n className={cn(\n 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight',\n item.tabValue === activeGalleryTab?.tabValue && 'bg-white'\n )}\n onClick={el => handleGalleryTabClick(el, item, index)}\n key={item.tabValue + index}\n value={item.tabValue}\n >\n {item.tabLabel}\n </Trigger>\n )\n })}\n </div>\n </List>\n <div className=\"laptop:gap-2 laptop:flex hidden\">\n {product.metafields?.global?.specifications && (\n <>\n <SpecsModal /> | <CompareModal />\n </>\n )}\n </div>\n </div>\n )\n})\n\nconst ProductGalleryTabImage = forwardRef<SwiperRef, ProductGalleryTabItemProps>((props, ref) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, totalSavings } = useBizProductContext()\n const paginationRef = useRef<HTMLDivElement>(null)\n const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null)\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const commentRef = useRef<HTMLDivElement>(null)\n const [shouldScroll, setShouldScroll] = useState(false)\n\n const imageClassName = useMemo(() => {\n if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_MAIN) {\n return 'size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_FEATURES) {\n // return '420px'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_SCENE) {\n // return '560px'\n }\n }, [props?.galleryTabType])\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && !!props.targetSlideIndex) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n // \u68C0\u6D4B\u6587\u672C\u5185\u5BB9\u662F\u5426\u8D85\u8FC7\u5BB9\u5668\u9AD8\u5EA6\uFF0C\u51B3\u5B9A\u662F\u5426\u9700\u8981\u6EDA\u52A8\n // useEffect(() => {\n // if (commentRef.current) {\n // const container = commentRef.current\n // const contentHeight = container.scrollHeight\n // const containerHeight = container.clientHeight\n // const needsScroll = contentHeight > containerHeight\n // setShouldScroll(needsScroll)\n // }\n // }, [])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n ref={ref}\n className=\"h-full\"\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n thumbs={{ swiper: thumbsSwiper }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n // \u751F\u6210\u552F\u4E00\u7684\u66DD\u5149 key\uFF08tabId + index\uFF09\n const exposureKey = `${props.tabValue}-${jIndex}`\n\n // \u66DD\u5149\u68C0\u6D4B\u56DE\u8C03\n const handleExposure = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: props?.tabLabel || '',\n position: jIndex + 1,\n creative_id: '',\n component_title: '',\n component_description: '',\n navigation: '',\n },\n })\n }\n\n // \u4F18\u5148\u4F7F\u7528\u4ECE images \u751F\u6210\u7684\u54CD\u5E94\u5F0F source\uFF0C\u5426\u5219\u4F7F\u7528\u539F\u6709\u7684 image.url\n const pictureSource = (item as any)?._responsiveSource || item?.image?.url || ''\n\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <ExposureDetector\n onExposure={handleExposure}\n exposureKey={exposureKey}\n threshold={0.5}\n duration={2000}\n className=\"h-full\"\n >\n <Picture\n source={pictureSource}\n alt={item?.image?.altText}\n className={cn('h-full', imageClassName)}\n imgClassName=\"object-cover h-full\"\n />\n </ExposureDetector>\n </SwiperSlide>\n )\n })}\n </Swiper>\n {variant.availableForSale && !!totalSavings && !props.index && (\n <Badge\n size=\"lg\"\n className=\"bg-brand laptop:left-16 laptop:top-5 desktop:left-6 desktop:top-6 absolute left-4 top-3 z-[2] text-white\"\n >\n {`${formatPrice({\n amount: totalSavings,\n currencyCode: variant?.price?.currencyCode,\n locale: locale,\n })} ${copyWriting?.off}`}\n </Badge>\n )}\n <div\n className={cn(\n 'tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 desktop:left-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n `swiper-button`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n <div\n className={cn(\n 'tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 desktop:right-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n `swiper-button`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n {/* {props?.galleries?.map((item, jIndex) => {\n return (\n <Picture\n key={props?.id + 'SwiperSlideItem' + jIndex}\n source={item?.image?.url}\n alt={item?.image?.altText}\n className=\"h-full\"\n imgClassName=\"object-cover h-full\"\n />\n )\n })} */}\n <div className=\"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 desktop:bottom-[20px] desktop:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between\">\n <div className=\"tablet:block hidden\">\n <Swiper\n className=\"flex items-center justify-between\"\n onSwiper={setThumbsSwiper}\n spaceBetween={12}\n slidesPerView={6}\n freeMode={true}\n watchSlidesProgress={true}\n modules={[Navigation, Thumbs]}\n >\n {props?.galleries?.map((item, jIndex) => (\n <SwiperSlide\n key={props?.id + 'SwiperSlideThumbItem' + jIndex}\n className=\"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded\"\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.altText}\n className=\"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white\"\n imgClassName=\"object-cover h-full\"\n />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n {!props?.index && (\n <div className=\"flex items-center gap-2\">\n <Picture\n source={props?.comment?.avatar?.url}\n className=\"laptop:size-10 size-8 shrink-0 rounded-full\"\n imgClassName=\"object-cover \"\n />\n <div className=\"relative max-w-[528px] overflow-hidden\">\n <div\n ref={commentRef}\n className={cn('line-clamp-2')}\n style={\n {\n // animationDuration: `3s`,\n }\n }\n >\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]\"\n />\n </div>\n </div>\n </div>\n )}\n </div>\n <div\n ref={paginationRef}\n className=\"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#1D1D1F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100\"\n />\n </div>\n )\n})\n\nconst ProductGalleryTabVideo = (props: ProductGalleryTabItemProps) => {\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && props.targetSlideIndex !== null && props.targetSlideIndex !== undefined) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n className=\"h-full\"\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <video controls className=\"size-full object-cover\">\n <track kind=\"captions\" />\n <source src={item?.sources?.[0]?.url} type=\"video/mp4\" />\n <source src={item?.sources?.[0]?.url} type=\"video/webm\" />\n <source src={item?.sources?.[0]?.url} type=\"video/ogg\" />\n </video>\n </SwiperSlide>\n )\n })}\n </Swiper>\n <div\n className={cn(\n 'swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n <div\n className={cn(\n 'tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n </div>\n )\n}\n\nconst ProductGalleryTab3DView = (props: ProductGalleryTabItemProps) => {\n return <div>3D View</div>\n}\n\nexport default withLayout(ProductGallery)\n"],
5
- "mappings": "AAkCI,OAqVM,YAAAA,GApVJ,OAAAC,EADF,QAAAC,MAAA,oBAlCJ,OAAS,kBAAAC,MAAsB,oCAC/B,OAAS,QAAAC,GAAM,WAAAC,EAAiB,SAAAC,OAAa,qCAC7C,OACE,eAAAC,EACA,WAAAC,EACA,YAAAC,EACA,cAAAC,EACA,UAAAC,EAEA,aAAAC,EAGA,uBAAAC,OACK,QACP,OAAS,UAAAC,EAAQ,eAAAC,MAAmC,eACpD,OAAS,cAAAC,EAAY,cAAAC,EAAY,UAAAC,EAAQ,cAAAC,MAAkB,iBAC3D,OAAS,MAAAC,MAAU,kCACnB,OAAS,kBAAAC,MAAsB,aAC/B,OAAS,WAAAC,GAAS,QAAA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F,EAAYG,CAAU,EACpD,WAAY,CACV,YAAa,EACf,EACA,YAAa,CACX,EAAG,CACD,cAAe,EACf,SAAU,EACZ,CACF,EAEC,SAAAgB,GAAO,WAAW,IAAI,CAACoB,EAAMkD,IAE1BxG,EAACc,EAAA,CAAY,UAAU,SACrB,SAAAb,EAAC,SAAM,SAAQ,GAAC,UAAU,yBACxB,UAAAD,EAAC,SAAM,KAAK,WAAW,EACvBA,EAAC,UAAO,IAAKsD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,YAAY,EACvDtD,EAAC,UAAO,IAAKsD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,aAAa,EACxDtD,EAAC,UAAO,IAAKsD,GAAM,UAAU,CAAC,GAAG,IAAK,KAAK,YAAY,GACzD,GANmCpB,GAAO,GAAK,kBAAoBsE,CAOrE,CAEH,EACH,EACAxG,EAAC,OACC,UAAWmB,EACT,sIAEF,EACA,QAASmF,EAET,SAAAtG,EAACiC,EAAA,CAAqB,UAAU,oCAAoC,EACtE,EACAjC,EAAC,OACC,UAAWmB,EACT,uIAEF,EACA,QAASoF,EAET,SAAAvG,EAACmC,GAAA,CAAsB,UAAU,oCAAoC,EACvE,GACF,CAEJ,EAEMyE,GAA2B1E,GACxBlC,EAAC,OAAI,mBAAO,EAGrB,IAAO6G,GAAQ/E,GAAWM,EAAc",
6
- "names": ["Fragment", "jsx", "jsxs", "useAiuiContext", "Text", "Picture", "Badge", "useCallback", "useMemo", "useState", "forwardRef", "useRef", "useEffect", "useImperativeHandle", "Swiper", "SwiperSlide", "Navigation", "Mousewheel", "Thumbs", "Pagination", "cn", "GalleryTabType", "Content", "List", "Root", "Trigger", "useBizProductContext", "useVariantMedia", "SpecsModal", "CompareModal", "formatPrice", "withLayout", "gaTrack", "ExposureDetector", "SwiperLeftButtonIcon", "props", "SwiperRightButtonIcon", "ProductGallery", "copyWriting", "product", "variant", "selectedOptions", "defaultMediaData", "swiper", "setSwiper", "productGalleryTabRef", "customMediaList", "productList", "sceneList", "keyFeaturesList", "videoList", "allMedia", "galleryMap", "galleryTabs", "productTab", "item", "variantProductGallery", "variantProductGalleryItem", "variantItem", "galleries", "imageGalleries", "imageItem", "imageSourceParts", "responsiveSource", "gallery", "activeGalleryTab", "setActiveGalleryTab", "activeTabIndex", "setActiveTabIndex", "targetSlideIndex", "setTargetSlideIndex", "handleNextTab", "nextIndex", "handlePrevTab", "prevIndex", "prevTabGalleries", "renderGalleryForTab", "tab", "index", "ProductGalleryTabImage", "ProductGalleryTabVideo", "ProductGalleryTab", "ref", "scrollContainerRef", "triggerRefs", "scrollToEvent", "event", "container", "button", "scrollLeft", "handleGalleryTabClick", "el", "scrollToTab", "tabItem", "locale", "totalSavings", "paginationRef", "thumbsSwiper", "setThumbsSwiper", "commentRef", "shouldScroll", "setShouldScroll", "imageClassName", "handlePrevClick", "handleNextClick", "jIndex", "exposureKey", "handleExposure", "pictureSource", "ProductGalleryTab3DView", "ProductGallery_default"]
4
+ "sourcesContent": ["import { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport { Text, Picture, Button, Badge } from '../../../../../components/index.js'\nimport {\n useCallback,\n useMemo,\n useState,\n forwardRef,\n useRef,\n type RefObject,\n useEffect,\n type Dispatch,\n type SetStateAction,\n useImperativeHandle,\n} from 'react'\nimport { Swiper, SwiperSlide, type SwiperRef } from 'swiper/react'\nimport { Navigation, Mousewheel, Thumbs, Pagination, Autoplay } from 'swiper/modules'\nimport { cn } from '../../../../../helpers/index.js'\nimport { GalleryTabType } from './types.js'\nimport { Content, List, Root, Trigger } from '@radix-ui/react-tabs'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useVariantMedia } from '../../../hooks/use-variant-media.js'\nimport { SpecsModal } from './components/SpecsModal.js'\nimport CompareModal from './components/CompareModal.js'\nimport { formatPrice } from '../../../utils/index.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\n\nimport type { Swiper as SwiperType } from 'swiper'\nimport type { ImageMedia, VideoMedia } from '../../../hooks/use-variant-media.js'\nimport type { ProductGalleryProps, ProductGalleryTabItemProps, GalleryTabItemProps } from './types.js'\n\nconst SwiperLeftButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect x=\"48\" y=\"48\" width=\"48\" height=\"48\" rx=\"24\" transform=\"rotate(-180 48 48)\" fill=\"white\" />\n <path\n d=\"M25.1035 16.8545C25.5372 16.3818 26.246 16.3818 26.6797 16.8545C27.1067 17.3201 27.1067 18.0706 26.6797 18.5361L21.668 24L26.6797 29.4639C27.1067 29.9294 27.1067 30.6799 26.6797 31.1455C26.246 31.6182 25.5372 31.6182 25.1035 31.1455L19.3203 24.8408C18.8933 24.3752 18.8933 23.6248 19.3203 23.1592L25.1035 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst SwiperRightButtonIcon = (props: React.SVGProps<SVGSVGElement>) => {\n return (\n <svg width=\"48\" height=\"48\" viewBox=\"0 0 48 48\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" {...props}>\n <rect width=\"48\" height=\"48\" rx=\"24\" transform=\"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 48)\" fill=\"white\" />\n <path\n d=\"M22.8965 16.8545C22.4628 16.3818 21.754 16.3818 21.3203 16.8545C20.8933 17.3201 20.8933 18.0706 21.3203 18.5361L26.332 24L21.3203 29.4639C20.8933 29.9294 20.8933 30.6799 21.3203 31.1455C21.754 31.6182 22.4628 31.6182 22.8965 31.1455L28.6797 24.8408C29.1067 24.3752 29.1067 23.6248 28.6797 23.1592L22.8965 16.8545Z\"\n fill=\"currentColor\"\n />\n </svg>\n )\n}\n\nconst ProductGallery = () => {\n const { copyWriting } = useAiuiContext()\n const { product, variant, selectedOptions } = useBizProductContext()\n const defaultMediaData = useVariantMedia({ product, variant })\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const productGalleryTabRef = useRef<ProductGalleryTabRef>(null)\n\n const customMediaList = variant?.metafields?.component?.custom_media_list\n let productList: ImageMedia[], sceneList: ImageMedia[], keyFeaturesList: ImageMedia[], videoList: VideoMedia[]\n\n if (customMediaList && customMediaList?.available) {\n productList = customMediaList?.product || []\n sceneList = customMediaList?.scenarios || []\n keyFeaturesList = customMediaList?.keyFeatures || []\n videoList = customMediaList?.video || []\n } else {\n productList = defaultMediaData?.productList\n sceneList = defaultMediaData?.sceneList\n keyFeaturesList = defaultMediaData?.keyFeaturesList\n videoList = defaultMediaData?.videoList\n }\n\n const allMedia = useMemo(() => [...productList, ...sceneList, ...videoList], [productList, sceneList, videoList])\n\n const galleryMap: Record<string, ImageMedia[] | VideoMedia[]> = {\n productList: productList,\n sceneList: sceneList,\n keyFeaturesList: keyFeaturesList,\n videoList: videoList,\n }\n\n const galleryTabs = useMemo(() => {\n const productTab: ProductGalleryProps =\n product?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n const variantProductGallery =\n variant?.payload?.components?.find((item: any) => item.componentKey === 'ProductGallery')?.data || []\n\n return productTab\n ?.map((item: any) => {\n // \u5982\u679C\u5B58\u5728 images \u6570\u7EC4\u4E14\u6709\u6709\u6548\u503C\uFF0C\u4F18\u5148\u4F7F\u7528 images \u521B\u5EFA\u54CD\u5E94\u5F0F\u56FE\u7247\u6570\u636E\n const variantProductGalleryItem = variantProductGallery?.find(\n (variantItem: any) => item?.galleries === variantItem?.galleries\n )\n let galleries = galleryMap[item?.galleries] || []\n\n if (\n variantProductGalleryItem?.images &&\n Array.isArray(variantProductGalleryItem.images) &&\n variantProductGalleryItem.images.length > 0\n ) {\n // \u5904\u7406 images \u6570\u7EC4\uFF0C\u4E3A\u6BCF\u5F20\u56FE\u7247\u751F\u6210\u54CD\u5E94\u5F0F source\n const imageGalleries = variantProductGalleryItem.images\n .map((imageItem: any) => {\n // \u4ECE\u5355\u4E2A\u56FE\u7247\u5BF9\u8C61\u751F\u6210\u54CD\u5E94\u5F0F\u56FE\u7247\u7684 source \u5B57\u7B26\u4E32\n const imageSourceParts: string[] = []\n if (imageItem.image_1920 && imageItem.image_1920.trim()) {\n imageSourceParts.push(`${imageItem.image_1920} 1920`)\n }\n if (imageItem.image_1440 && imageItem.image_1440.trim()) {\n imageSourceParts.push(`${imageItem.image_1440} 1440`)\n }\n if (imageItem.image_1024 && imageItem.image_1024.trim()) {\n imageSourceParts.push(`${imageItem.image_1024} 1024`)\n }\n if (imageItem.image_768 && imageItem.image_768.trim()) {\n imageSourceParts.push(`${imageItem.image_768} 767`)\n }\n if (imageItem.image_390 && imageItem.image_390.trim()) {\n imageSourceParts.push(`${imageItem.image_390} 390`)\n }\n\n // \u5982\u679C\u751F\u6210\u4E86\u6709\u6548\u7684\u54CD\u5E94\u5F0F source\uFF0C\u8FD4\u56DE\u56FE\u7247\u5BF9\u8C61\n if (imageSourceParts.length > 0) {\n const responsiveSource = imageSourceParts.join(', ')\n return {\n image: {\n url: responsiveSource,\n altText: item.comment?.content || '',\n },\n // \u6807\u8BB0\u8FD9\u662F\u4ECE images \u751F\u6210\u7684\uFF0C\u7528\u4E8E\u540E\u7EED\u5904\u7406\n _fromImages: true,\n _responsiveSource: responsiveSource,\n } as any\n }\n return null\n })\n .filter((gallery: any) => gallery !== null) // \u8FC7\u6EE4\u6389\u65E0\u6548\u7684\u56FE\u7247\n\n // \u5982\u679C\u4ECE images \u6570\u7EC4\u751F\u6210\u4E86\u6709\u6548\u7684\u56FE\u7247\uFF0C\u4F7F\u7528\u5B83\u4EEC\uFF1B\u5426\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries\n if (imageGalleries.length > 0) {\n galleries = imageGalleries\n }\n // \u5982\u679C images \u5B58\u5728\u4F46\u90FD\u662F\u7A7A\u503C\uFF0C\u5219\u56DE\u9000\u5230\u539F\u6709\u7684 galleries \u903B\u8F91\n }\n\n return {\n ...item,\n galleries,\n }\n })\n .filter((item: any) => item.galleries.length > 0)\n }, [variant?.payload, galleryMap, product?.payload])\n\n const [activeGalleryTab, setActiveGalleryTab] = useState<GalleryTabItemProps>(galleryTabs?.[0])\n const [activeTabIndex, setActiveTabIndex] = useState(0)\n const [targetSlideIndex, setTargetSlideIndex] = useState<number | null>(null)\n\n // \u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\uFF09\n const handleNextTab = useCallback(() => {\n const nextIndex = (activeTabIndex + 1) % galleryTabs.length\n setActiveTabIndex(nextIndex)\n setActiveGalleryTab(galleryTabs[nextIndex])\n setTargetSlideIndex(0) // \u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n }, [activeTabIndex, galleryTabs])\n\n // \u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\uFF08\u8DF3\u8F6C\u5230\u6700\u540E\u4E00\u5F20\uFF09\n const handlePrevTab = useCallback(() => {\n const prevIndex = activeTabIndex === 0 ? galleryTabs.length - 1 : activeTabIndex - 1\n setActiveTabIndex(prevIndex)\n setActiveGalleryTab(galleryTabs[prevIndex])\n // \u8DF3\u8F6C\u5230\u4E0A\u4E00\u4E2A tab \u7684\u6700\u540E\u4E00\u5F20\n const prevTabGalleries = galleryTabs[prevIndex]?.galleries || []\n setTargetSlideIndex(prevTabGalleries.length - 1)\n }, [activeTabIndex, galleryTabs])\n\n // \u5F53 activeTabIndex \u53D8\u5316\u65F6\uFF0C\u81EA\u52A8\u6EDA\u52A8\u5230\u5BF9\u5E94\u7684 tab\n useEffect(() => {\n if (activeTabIndex !== null && activeTabIndex !== undefined) {\n // \u4F7F\u7528 requestAnimationFrame \u786E\u4FDD DOM \u5DF2\u66F4\u65B0\n requestAnimationFrame(() => {\n productGalleryTabRef.current?.scrollToTab(activeTabIndex)\n })\n }\n }, [activeTabIndex])\n\n useEffect(() => {\n // \u5F53 variant \u53D8\u5316\u65F6\uFF0C\u5207\u6362\u5230\u7B2C\u4E00\u4E2A tab\n setActiveGalleryTab(galleryTabs[0])\n setActiveTabIndex(0)\n }, [variant?.id])\n\n // \u4E3A\u6BCF\u4E2A tab \u6E32\u67D3\u5BF9\u5E94\u7684\u7EC4\u4EF6\n const renderGalleryForTab = (tab: any, index: number) => {\n switch (tab?.galleryTabType) {\n case GalleryTabType.GALLERY_IMAGE_MAIN:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_FEATURES:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_IMAGE_SCENE:\n return (\n <ProductGalleryTabImage\n {...tab}\n index={index}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n case GalleryTabType.GALLERY_VIDEO:\n return (\n <ProductGalleryTabVideo\n {...tab}\n onNextTab={handleNextTab}\n onPrevTab={handlePrevTab}\n targetSlideIndex={targetSlideIndex}\n onSlideChange={() => setTargetSlideIndex(null)}\n />\n )\n default:\n return null\n }\n }\n\n return (\n <div id=\"ipc-product-gallery\">\n <Root className=\"relative\" value={activeGalleryTab?.tabValue} defaultValue={galleryTabs?.[0]?.tabValue}>\n <div className=\"tablet:h-[620px] desktop:rounded-2xl desktop:h-[560px] lg-desktop:h-[700px] desktop:relative h-[420px] overflow-hidden bg-[#EAEAEC] \">\n {galleryTabs.map((item: any, index: number) => {\n return (\n <Content key={item.tabValue} className=\"h-full\" value={item.tabValue}>\n {renderGalleryForTab(item, index)}\n </Content>\n )\n })}\n </div>\n <ProductGalleryTab\n ref={productGalleryTabRef}\n galleryTabs={galleryTabs}\n activeGalleryTab={activeGalleryTab}\n setActiveGalleryTab={setActiveGalleryTab}\n setActiveTabIndex={setActiveTabIndex}\n setTargetSlideIndex={setTargetSlideIndex}\n />\n </Root>\n </div>\n )\n}\n\nexport interface ProductGalleryTabRef {\n scrollToTab: (index: number) => void\n}\n\nconst ProductGalleryTab = forwardRef<\n ProductGalleryTabRef,\n {\n galleryTabs: GalleryTabItemProps[]\n activeGalleryTab: GalleryTabItemProps\n setActiveGalleryTab: Dispatch<SetStateAction<GalleryTabItemProps>>\n setActiveTabIndex: Dispatch<SetStateAction<number>>\n setTargetSlideIndex: Dispatch<SetStateAction<number | null>>\n }\n>((props, ref) => {\n const { galleryTabs, activeGalleryTab, setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex } = props\n const { product } = useBizProductContext()\n const scrollContainerRef = useRef<HTMLDivElement>(null)\n const triggerRefs = useRef<Map<string, HTMLButtonElement>>(new Map())\n\n const scrollToEvent = useCallback((event: React.MouseEvent<HTMLButtonElement>) => {\n if (scrollContainerRef.current) {\n const container = scrollContainerRef.current\n const button = event.currentTarget\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }, [])\n\n const handleGalleryTabClick = useCallback(\n (el: React.MouseEvent<HTMLButtonElement>, item: GalleryTabItemProps, index: number) => {\n setActiveGalleryTab(item)\n setActiveTabIndex(index)\n setTargetSlideIndex(0) // \u624B\u52A8\u70B9\u51FB tab \u65F6\uFF0C\u8DF3\u8F6C\u5230\u7B2C\u4E00\u5F20\n scrollToEvent(el)\n },\n [setActiveGalleryTab, setActiveTabIndex, setTargetSlideIndex, scrollToEvent]\n )\n\n // \u6EDA\u52A8\u5230\u6307\u5B9A\u7D22\u5F15\u7684 tab\n const scrollToTab = useCallback(\n (index: number) => {\n if (scrollContainerRef.current && galleryTabs[index]) {\n const container = scrollContainerRef.current\n const tabItem = galleryTabs[index]\n const button = triggerRefs.current.get(tabItem.tabValue)\n\n if (button) {\n const scrollLeft = button.offsetLeft - container.offsetWidth / 2 + button.offsetWidth / 2\n container.scrollTo({\n left: scrollLeft,\n behavior: 'smooth',\n })\n }\n }\n },\n [galleryTabs]\n )\n\n useImperativeHandle(ref, () => ({\n scrollToTab,\n }))\n\n return (\n <div className=\"laptop:inset-x-16 tablet:mt-3 desktop:static absolute inset-x-4 bottom-4 z-[2] flex items-center justify-between\">\n <List\n ref={scrollContainerRef}\n className=\"laptop:p-0 desktop:p-1 overflow-x-auto rounded-full bg-[#EAEAEC] p-1\"\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n >\n <div className=\"whitespace-nowrap\">\n {galleryTabs?.map((item, index) => {\n return (\n <Trigger\n ref={el => {\n if (el) {\n triggerRefs.current.set(item.tabValue, el)\n } else {\n triggerRefs.current.delete(item.tabValue)\n }\n }}\n className={cn(\n 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] rounded-full px-5 pb-[10px] pt-[11px] text-[14px] font-bold leading-tight',\n item.tabValue === activeGalleryTab?.tabValue && 'bg-white'\n )}\n onClick={el => handleGalleryTabClick(el, item, index)}\n key={item.tabValue + index}\n value={item.tabValue}\n >\n {item.tabLabel}\n </Trigger>\n )\n })}\n </div>\n </List>\n <div className=\"laptop:gap-2 laptop:flex hidden\">\n {product.metafields?.global?.specifications && (\n <>\n <SpecsModal /> | <CompareModal />\n </>\n )}\n </div>\n </div>\n )\n})\n\nconst ProductGalleryTabImage = forwardRef<SwiperRef, ProductGalleryTabItemProps>((props, ref) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, totalSavings } = useBizProductContext()\n const paginationRef = useRef<HTMLDivElement>(null)\n const [thumbsSwiper, setThumbsSwiper] = useState<SwiperType | null>(null)\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n const commentRef = useRef<HTMLDivElement>(null)\n const [shouldScroll, setShouldScroll] = useState(false)\n\n const imageClassName = useMemo(() => {\n if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_MAIN) {\n return 'size-[240px] mx-auto mt-[42px] tablet:mt-16 tablet:size-[420px] lg-desktop:size-[560px]'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_FEATURES) {\n // return '420px'\n } else if (props?.galleryTabType === GalleryTabType.GALLERY_IMAGE_SCENE) {\n // return '560px'\n }\n }, [props?.galleryTabType])\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && !!props.targetSlideIndex) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n // \u68C0\u6D4B\u6587\u672C\u5185\u5BB9\u662F\u5426\u8D85\u8FC7\u5BB9\u5668\u9AD8\u5EA6\uFF0C\u51B3\u5B9A\u662F\u5426\u9700\u8981\u6EDA\u52A8\n // useEffect(() => {\n // if (commentRef.current) {\n // const container = commentRef.current\n // const contentHeight = container.scrollHeight\n // const containerHeight = container.clientHeight\n // const needsScroll = contentHeight > containerHeight\n // setShouldScroll(needsScroll)\n // }\n // }, [])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n ref={ref}\n className=\"h-full\"\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n pagination={{\n clickable: true,\n el: paginationRef.current,\n }}\n thumbs={{ swiper: thumbsSwiper }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n // \u751F\u6210\u552F\u4E00\u7684\u66DD\u5149 key\uFF08tabId + index\uFF09\n const exposureKey = `${props.tabValue}-${jIndex}`\n\n // \u66DD\u5149\u68C0\u6D4B\u56DE\u8C03\n const handleExposure = () => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: props?.tabLabel || '',\n position: jIndex + 1,\n creative_id: '',\n component_title: '',\n component_description: '',\n navigation: '',\n },\n })\n }\n\n // \u4F18\u5148\u4F7F\u7528\u4ECE images \u751F\u6210\u7684\u54CD\u5E94\u5F0F source\uFF0C\u5426\u5219\u4F7F\u7528\u539F\u6709\u7684 image.url\n const pictureSource = (item as any)?._responsiveSource || item?.image?.url || ''\n\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <ExposureDetector\n onExposure={handleExposure}\n exposureKey={exposureKey}\n threshold={0.5}\n duration={2000}\n className=\"h-full\"\n >\n <Picture\n source={pictureSource}\n alt={item?.image?.altText}\n className={cn('h-full', imageClassName)}\n imgClassName=\"object-cover h-full\"\n />\n </ExposureDetector>\n </SwiperSlide>\n )\n })}\n </Swiper>\n {variant.availableForSale && !!totalSavings && !props.index && (\n <Badge\n size=\"lg\"\n className=\"bg-brand laptop:left-16 laptop:top-5 desktop:left-6 desktop:top-6 absolute left-4 top-3 z-[2] text-white\"\n >\n {`${formatPrice({\n amount: totalSavings,\n currencyCode: variant?.price?.currencyCode,\n locale: locale,\n })} ${copyWriting?.off}`}\n </Badge>\n )}\n <div\n className={cn(\n 'tablet:opacity-0 tablet:block tablet:absolute tablet:top-1/2 laptop:left-16 tablet:left-6 desktop:left-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n `swiper-button`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n <div\n className={cn(\n 'tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 laptop:right-16 tablet:right-6 desktop:right-6 z-10 hidden -translate-y-1/2 cursor-pointer',\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n `swiper-button`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className={cn('tablet:size-10 lg-desktop:size-12')} />\n </div>\n {/* {props?.galleries?.map((item, jIndex) => {\n return (\n <Picture\n key={props?.id + 'SwiperSlideItem' + jIndex}\n source={item?.image?.url}\n alt={item?.image?.altText}\n className=\"h-full\"\n imgClassName=\"object-cover h-full\"\n />\n )\n })} */}\n <div className=\"tablet:bottom-[70px] tablet:flex laptop:inset-x-16 desktop:bottom-[20px] desktop:inset-x-6 absolute inset-x-4 bottom-[94px] z-10 items-center justify-between\">\n <div className=\"tablet:block hidden\">\n <Swiper\n className=\"flex items-center justify-between\"\n onSwiper={setThumbsSwiper}\n spaceBetween={12}\n slidesPerView={6}\n freeMode={true}\n watchSlidesProgress={true}\n modules={[Navigation, Thumbs]}\n >\n {props?.galleries?.map((item, jIndex) => (\n <SwiperSlide\n key={props?.id + 'SwiperSlideThumbItem' + jIndex}\n className=\"[&.swiper-slide-thumb-active]:border-brand !w-auto cursor-pointer border border-transparent [&.swiper-slide-thumb-active]:rounded\"\n >\n <Picture\n source={item.image?.url}\n alt={item.image?.altText}\n className=\"lg-desktop:size-12 size-10 overflow-hidden rounded bg-white\"\n imgClassName=\"object-cover h-full\"\n />\n </SwiperSlide>\n ))}\n </Swiper>\n </div>\n {!props?.index && (\n <div className=\"flex items-center gap-2\">\n <Picture\n source={props?.comment?.avatar?.url}\n className=\"laptop:size-10 size-8 shrink-0 rounded-full\"\n imgClassName=\"object-cover \"\n />\n <div className=\"relative max-w-[528px] overflow-hidden\">\n <Swiper\n modules={[Autoplay]}\n loop\n className=\"lg-desktop:h-11 h-10\"\n direction=\"vertical\"\n autoplay={{ delay: 2000, disableOnInteraction: false }}\n >\n <SwiperSlide>\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base line-clamp-2 text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n <SwiperSlide>\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base line-clamp-2 text-sm font-bold text-[#1D1D1F]\"\n />\n </SwiperSlide>\n </Swiper>\n {/* <div\n ref={commentRef}\n className={cn('h-10', shouldScroll && 'animate-scroll-text')}\n >\n <Text\n html={props?.comment?.content}\n className=\"lg-desktop:text-base text-sm font-bold text-[#1D1D1F]\"\n />\n </div> */}\n </div>\n </div>\n )}\n </div>\n <div\n ref={paginationRef}\n className=\"tablet:hidden absolute inset-x-4 !bottom-[70px] z-10 text-center [&_.swiper-pagination-bullet-active]:!bg-[#1D1D1F] [&_.swiper-pagination-bullet]:bg-white [&_.swiper-pagination-bullet]:opacity-100\"\n />\n </div>\n )\n})\n\nconst ProductGalleryTabVideo = (props: ProductGalleryTabItemProps) => {\n const [swiper, setSwiper] = useState<SwiperType | null>(null)\n\n // \u5904\u7406\u5DE6\u53F3\u6309\u94AE\u70B9\u51FB\uFF0C\u652F\u6301\u8DE8 tab \u5FAA\u73AF\n const handlePrevClick = useCallback(() => {\n if (swiper?.isBeginning) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u7B2C\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0A\u4E00\u4E2A tab\n props.onPrevTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slidePrev()\n }\n }, [swiper, props])\n\n const handleNextClick = useCallback(() => {\n if (swiper?.isEnd) {\n // \u5F53\u524D tab \u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u5F20\uFF0C\u5207\u6362\u5230\u4E0B\u4E00\u4E2A tab\n props.onNextTab?.()\n } else {\n // \u5426\u5219\u5728\u5F53\u524D tab \u5185\u5207\u6362\n swiper?.slideNext()\n }\n }, [swiper, props])\n\n // \u76D1\u542C targetSlideIndex\uFF0C\u5F53 tab \u5207\u6362\u65F6\u8DF3\u8F6C\u5230\u6307\u5B9A\u7684 slide\n useEffect(() => {\n if (swiper && props.targetSlideIndex !== null && props.targetSlideIndex !== undefined) {\n swiper.slideTo(props.targetSlideIndex, 0) // 0 \u8868\u793A\u7ACB\u5373\u8DF3\u8F6C\uFF0C\u65E0\u52A8\u753B\n props.onSlideChange?.() // \u6E05\u9664 targetSlideIndex\n }\n }, [swiper, props.targetSlideIndex, props])\n\n return (\n <div className=\"h-full [&_.swiper-button]:hover:opacity-100\">\n <Swiper\n className=\"h-full\"\n onSwiper={setSwiper}\n onTouchEnd={(swiper, event) => {\n if (swiper.isBeginning && swiper.swipeDirection === 'prev') {\n handlePrevClick()\n } else if (swiper.isEnd && swiper.swipeDirection === 'next') {\n handleNextClick()\n }\n }}\n // navigation={{\n // nextEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-next`,\n // prevEl: `.ipc-product-gallery-${props?.id}-custom-swiper-button-prev`,\n // }}\n modules={[Mousewheel, Thumbs, Navigation, Pagination]}\n mousewheel={{\n forceToAxis: true,\n }}\n breakpoints={{\n 0: {\n slidesPerView: 1,\n freeMode: false,\n },\n }}\n >\n {props?.galleries?.map((item, jIndex) => {\n return (\n <SwiperSlide className=\"h-full\" key={props?.id + 'SwiperSlideItem' + jIndex}>\n <video controls className=\"size-full object-cover\">\n <track kind=\"captions\" />\n <source src={item?.sources?.[0]?.url} type=\"video/mp4\" />\n <source src={item?.sources?.[0]?.url} type=\"video/webm\" />\n <source src={item?.sources?.[0]?.url} type=\"video/ogg\" />\n </video>\n </SwiperSlide>\n )\n })}\n </Swiper>\n <div\n className={cn(\n 'swiper-button tablet:block tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:left-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-prev`\n )}\n onClick={handlePrevClick}\n >\n <SwiperLeftButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n <div\n className={cn(\n 'tablet:block swiper-button tablet:opacity-0 tablet:absolute tablet:top-1/2 tablet:right-6 z-10 hidden -translate-y-1/2 cursor-pointer'\n // `ipc-product-gallery-${props?.id}-custom-swiper-button-next`\n )}\n onClick={handleNextClick}\n >\n <SwiperRightButtonIcon className=\"tablet:size-10 lg-desktop:size-12\" />\n </div>\n </div>\n )\n}\n\nconst ProductGalleryTab3DView = (props: ProductGalleryTabItemProps) => {\n return <div>3D View</div>\n}\n\nexport default withLayout(ProductGallery)\n"],
5
+ "mappings": "AAkCI,OAqVM,YAAAA,GApVJ,OAAAC,EADF,QAAAC,MAAA,oBAlCJ,OAAS,kBAAAC,MAAsB,oC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AACoC,GAAA,CAAsB,UAAU,oCAAoC,EACvE,GACF,CAEJ,EAEMyE,GAA2B1E,GACxBnC,EAAC,OAAI,mBAAO,EAGrB,IAAO8G,GAAQ/E,GAAWM,EAAc",
6
+ "names": ["Fragment", "jsx", "jsxs", "useAiuiContext", "Text", "Picture", "Badge", "useCallback", "useMemo", "useState", "forwardRef", "useRef", "useEffect", "useImperativeHandle", "Swiper", "SwiperSlide", "Navigation", "Mousewheel", "Thumbs", "Pagination", "Autoplay", "cn", "GalleryTabType", "Content", "List", "Root", "Trigger", "useBizProductContext", "useVariantMedia", "SpecsModal", "CompareModal", "formatPrice", "withLayout", "gaTrack", "ExposureDetector", "SwiperLeftButtonIcon", "props", "SwiperRightButtonIcon", "ProductGallery", "copyWriting", "product", "variant", "selectedOptions", "defaultMediaData", "swiper", "setSwiper", "productGalleryTabRef", "customMediaList", "productList", "sceneList", "keyFeaturesList", "videoList", "allMedia", "galleryMap", "galleryTabs", "productTab", "item", "variantProductGallery", "variantProductGalleryItem", "variantItem", "galleries", "imageGalleries", "imageItem", "imageSourceParts", "responsiveSource", "gallery", "activeGalleryTab", "setActiveGalleryTab", "activeTabIndex", "setActiveTabIndex", "targetSlideIndex", "setTargetSlideIndex", "handleNextTab", "nextIndex", "handlePrevTab", "prevIndex", "prevTabGalleries", "renderGalleryForTab", "tab", "index", "ProductGalleryTabImage", "ProductGalleryTabVideo", "ProductGalleryTab", "ref", "scrollContainerRef", "triggerRefs", "scrollToEvent", "event", "container", "button", "scrollLeft", "handleGalleryTabClick", "el", "scrollToTab", "tabItem", "locale", "totalSavings", "paginationRef", "thumbsSwiper", "setThumbsSwiper", "commentRef", "shouldScroll", "setShouldScroll", "imageClassName", "handlePrevClick", "handleNextClick", "jIndex", "exposureKey", "handleExposure", "pictureSource", "ProductGalleryTab3DView", "ProductGallery_default"]
7
7
  }
@@ -1,5 +1,6 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: import("react").ForwardRefExoticComponent<Omit<object, keyof import("../../../../../shared/Styles.js").StylesProps> & Partial<import("../../../../../shared/Styles.js").StylesProps & import("../../../../../shared/Styles.js").ContainerProps> & {
2
- className?: string;
3
- data?: Record<string, any>;
3
+ className?: string | undefined;
4
+ data?: Record<string, any> | undefined;
4
5
  } & import("react").RefAttributes<any>>;
5
6
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface ScrollSpyNavItem {
2
3
  label: string;
3
4
  href: string;
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { PurchaseBarProps } from './types.js';
2
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<PurchaseBarProps, keyof import("../../../../shared/Styles.js").StylesProps> & Partial<import("../../../../shared/Styles.js").StylesProps & import("../../../../shared/Styles.js").ContainerProps> & {
3
- className?: string;
4
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
5
6
  } & import("react").RefAttributes<any>>;
6
7
  export default _default;
@@ -11,8 +11,8 @@ declare const MarqueeImageContent: {
11
11
  };
12
12
  declare const MarqueeTextContent: React.ForwardRefExoticComponent<MarqueeTextContentProps & React.RefAttributes<HTMLDivElement>>;
13
13
  declare const _default: React.ForwardRefExoticComponent<Omit<Omit<MarqueeProps & React.RefAttributes<SwiperRef>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
14
- className?: string;
15
- data?: Record<string, any>;
14
+ className?: string | undefined;
15
+ data?: Record<string, any> | undefined;
16
16
  }, "ref"> & React.RefAttributes<any>>;
17
17
  export default _default;
18
18
  export { MarqueeItem, MarqueeImageContent, MarqueeTextContent };
@@ -0,0 +1,42 @@
1
+ /// <reference types="react" />
2
+ import type { Media, Theme } from '../../types/props.js';
3
+ /**
4
+ * 评论项数据结构
5
+ */
6
+ export interface ReviewItem {
7
+ /** 评论者名称 */
8
+ name: string;
9
+ /** 评论者头像 URL */
10
+ avatar: Media;
11
+ /** 评论内容 */
12
+ comment: string;
13
+ /** 评分(1-5星) */
14
+ rating?: number;
15
+ }
16
+ /**
17
+ * 轮播评论数据结构
18
+ */
19
+ export interface MarqueeReviewData {
20
+ /** 主标题 */
21
+ title: string;
22
+ /** 副标题 */
23
+ subtitle: string;
24
+ /** 评论列表 */
25
+ items: ReviewItem[];
26
+ /** 主题:light 或 dark */
27
+ theme?: Theme;
28
+ }
29
+ /**
30
+ * MarqueeReview 组件 Props
31
+ */
32
+ export interface MarqueeReviewProps {
33
+ /** 评论数据 */
34
+ data: MarqueeReviewData;
35
+ /** 自定义类名 */
36
+ className?: string;
37
+ }
38
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<MarqueeReviewProps, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
39
+ className?: string | undefined;
40
+ data?: Record<string, any> | undefined;
41
+ } & import("react").RefAttributes<any>>;
42
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import{jsx as e,jsxs as p}from"react/jsx-runtime";import{Text as m,Heading as c,Avatar as g,AvatarImage as u,AvatarFallback as w}from"../../components/index.js";import{cn as n}from"../../helpers/utils.js";import{withLayout as k}from"../../shared/Styles.js";const x=9,N=3,b=(t,a)=>Array.from({length:Math.ceil(t.length/a)},(i,r)=>t.slice(r*a,(r+1)*a)),C=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z",fill:"#F77234"})}),y=({item:t})=>p("div",{className:"rounded-box bg-container-primary text-info-primary min-l:p-[24px] laptop:h-[240px] desktop:h-[240px] lg-desktop:h-[240px] flex h-[240px] grow flex-col justify-between p-[16px]",children:[p("div",{className:"flex justify-between",children:[p("div",{className:"flex flex-col",children:[e(m,{size:4,html:t.name,className:"laptop:block hidden"}),e(m,{size:2,html:t.name,className:"laptop:hidden block"}),e("div",{className:"mt-2 flex gap-1",children:new Array(t.rating||5).fill(0).map((a,i)=>e(C,{},i))})]}),p(g,{size:"small",className:" laptop:size-[48px] size-[40px]",children:[e(u,{src:t.avatar?.url,alt:t.avatar?.alt||""}),e(w,{children:(t.name??"").slice(0,2).toUpperCase()})]})]}),e("div",{children:e(c,{as:"h6",size:2,html:`"${t.comment}`,className:"line-clamp-5 min-h-[120px] text-wrap"})})]});function L({data:t,className:a}){const{title:i,subtitle:r,items:l=[],theme:d="light"}=t,f=b(l.length<x?[...l,...l.slice(x-l.length)]:l,N).slice(0,3).map(o=>[...o,...o]);return p("section",{className:n("text-info-primary flex flex-col items-center justify-center py-3",a,{"aiui-dark":d==="dark"}),children:[e(c,{as:"h1",size:4,html:i,className:"laptop:text-center w-full text-left"}),e(m,{size:2,html:r,className:"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]"}),e("div",{className:n("mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden"),children:f.map((o,s)=>e("div",{className:n("animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4",{"top-10":s===0||s===2,"hidden desktop:flex":s===1,"hidden tablet:flex":s===2}),children:o.map((h,v)=>e(y,{item:h},v))},s))})]})}var R=k(L);export{R as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/MarqueeReview/index.tsx"],
4
+ "sourcesContent": ["import { Text, Heading, Avatar, AvatarImage, AvatarFallback } from '../../components/index.js'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport type { Media, Theme } from '../../types/props.js'\n\nconst FIX_ITEMS_LENGTH = 9\nconst COUNT = 3\n\n/**\n * \u8BC4\u8BBA\u9879\u6570\u636E\u7ED3\u6784\n */\nexport interface ReviewItem {\n /** \u8BC4\u8BBA\u8005\u540D\u79F0 */\n name: string\n /** \u8BC4\u8BBA\u8005\u5934\u50CF URL */\n avatar: Media\n /** \u8BC4\u8BBA\u5185\u5BB9 */\n comment: string\n /** \u8BC4\u5206(1-5\u661F) */\n rating?: number\n}\n\n/**\n * \u8F6E\u64AD\u8BC4\u8BBA\u6570\u636E\u7ED3\u6784\n */\nexport interface MarqueeReviewData {\n /** \u4E3B\u6807\u9898 */\n title: string\n /** \u526F\u6807\u9898 */\n subtitle: string\n /** \u8BC4\u8BBA\u5217\u8868 */\n items: ReviewItem[]\n /** \u4E3B\u9898\uFF1Alight \u6216 dark */\n theme?: Theme\n}\n\n/**\n * MarqueeReview \u7EC4\u4EF6 Props\n */\nexport interface MarqueeReviewProps {\n /** \u8BC4\u8BBA\u6570\u636E */\n data: MarqueeReviewData\n /** \u81EA\u5B9A\u4E49\u7C7B\u540D */\n className?: string\n}\n\nconst _chunk = <T,>(array: T[], size: number): T[][] => {\n return Array.from({ length: Math.ceil(array.length / size) }, (_, index) =>\n array.slice(index * size, (index + 1) * size)\n )\n}\n\nconst StarIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M7.32745 1.36274C7.60256 0.805304 8.39744 0.805305 8.67255 1.36274L10.1766 4.41035C10.2859 4.63171 10.4971 4.78514 10.7413 4.82063L14.1046 5.30934C14.7197 5.39873 14.9654 6.15471 14.5202 6.58861L12.0866 8.96084C11.9098 9.13315 11.8292 9.3814 11.8709 9.62469L12.4454 12.9743C12.5505 13.587 11.9074 14.0542 11.3572 13.765L8.349 12.1835C8.13051 12.0686 7.86949 12.0686 7.65099 12.1835L4.64282 13.765C4.0926 14.0542 3.44953 13.587 3.55461 12.9743L4.12912 9.62469C4.17085 9.3814 4.09019 9.13315 3.91342 8.96084L1.47976 6.58861C1.03462 6.15471 1.28025 5.39873 1.89542 5.30934L5.25866 4.82063C5.50294 4.78514 5.71412 4.63171 5.82336 4.41035L7.32745 1.36274Z\"\n fill=\"#F77234\"\n />\n </svg>\n)\n\ninterface CardProps {\n item: ReviewItem\n}\n\nconst Card = ({ item }: CardProps) => {\n return (\n <div className=\"rounded-box bg-container-primary text-info-primary min-l:p-[24px] laptop:h-[240px] desktop:h-[240px] lg-desktop:h-[240px] flex h-[240px] grow flex-col justify-between p-[16px]\">\n <div className=\"flex justify-between\">\n <div className=\"flex flex-col\">\n <Text size={4} html={item.name} className=\"laptop:block hidden\" />\n <Text size={2} html={item.name} className=\"laptop:hidden block\" />\n <div className=\"mt-2 flex gap-1\">\n {new Array(item.rating || 5).fill(0).map((_, index) => (\n <StarIcon key={index} />\n ))}\n </div>\n </div>\n <Avatar size=\"small\" className=\" laptop:size-[48px] size-[40px]\">\n <AvatarImage src={item.avatar?.url} alt={item.avatar?.alt || ''} />\n <AvatarFallback>{(item.name ?? '').slice(0, 2).toUpperCase()}</AvatarFallback>\n </Avatar>\n </div>\n <div>\n <Heading as=\"h6\" size={2} html={`\"${item.comment}`} className=\"line-clamp-5 min-h-[120px] text-wrap\" />\n </div>\n </div>\n )\n}\n\n/**\n * MarqueeReview - \u5782\u76F4\u6EDA\u52A8\u7684\u8BC4\u8BBA\u8F6E\u64AD\u7EC4\u4EF6\n *\n * \u7528\u4E8E\u5C55\u793A\u7528\u6237\u8BC4\u8BBA,\u652F\u6301\u591A\u5217\u5782\u76F4\u65E0\u9650\u6EDA\u52A8\u6548\u679C\u3002\n *\n * @example\n * ```tsx\n * <MarqueeReview\n * data={{\n * title: \"\u5BA2\u6237\u8BC4\u4EF7\",\n * subtitle: \"\u770B\u770B\u7528\u6237\u600E\u4E48\u8BF4\",\n * items: [\n * {\n * name: \"\u5F20\u4E09\",\n * avatar: \"/avatar1.jpg\",\n * comment: \"\u975E\u5E38\u597D\u7528\u7684\u4EA7\u54C1!\",\n * rating: 5\n * }\n * ]\n * }}\n * />\n * ```\n */\nfunction MarqueeReview({ data, className }: MarqueeReviewProps) {\n const { title, subtitle, items = [], theme = 'light' } = data\n\n const chunkItems = _chunk(\n items.length < FIX_ITEMS_LENGTH ? [...items, ...items.slice(FIX_ITEMS_LENGTH - items.length)] : items,\n COUNT\n )\n .slice(0, 3)\n .map(item => [...item, ...item])\n\n return (\n <section\n className={cn('text-info-primary flex flex-col items-center justify-center py-3', className, {\n 'aiui-dark': theme === 'dark',\n })}\n >\n <Heading as=\"h1\" size={4} html={title} className=\"laptop:text-center w-full text-left\" />\n <Text\n size={2}\n html={subtitle}\n className=\"tablet:mt-[16px] tablet:text-[14px] laptop:text-center laptop:text-[14px] desktop:mt-[8px] desktop:text-[16px] lg-desktop:text-[18px] mt-[4px] w-full text-left text-[14px]\"\n />\n <div\n className={cn(\n 'mask-fade-vertical laptop:h-[384px] desktop:h-[512px] lg-desktop:h-[640px] mt-[24px] flex h-[480px] gap-4 overflow-hidden'\n )}\n >\n {chunkItems.map((items, index) => (\n <div\n key={index}\n className={cn('animate-marquee-scroll relative flex h-fit flex-1 flex-col gap-4', {\n 'top-10': index === 0 || index === 2,\n 'hidden desktop:flex': index === 1,\n 'hidden tablet:flex': index === 2,\n })}\n >\n {items.map((item, innerIndex) => (\n <Card key={innerIndex} item={item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"withLayout", "FIX_ITEMS_LENGTH", "COUNT", "_chunk", "array", "size", "_", "index", "StarIcon", "Card", "item", "MarqueeReview", "data", "className", "title", "subtitle", "items", "theme", "chunkItems", "innerIndex", "MarqueeReview_default"]
7
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import type { MediaPlayerBaseProps } from './types.js';
3
+ declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaPlayerBaseProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
6
+ }, "ref"> & import("react").RefAttributes<any>>;
7
+ export default _default;
@@ -0,0 +1,2 @@
1
+ "use client";import{Fragment as Me,jsx as e,jsxs as u}from"react/jsx-runtime";import{useState as p,useRef as n,useMemo as ue,useEffect as E,forwardRef as me,useImperativeHandle as ge}from"react";import{debounce as fe}from"lodash";import{cn as w}from"../../helpers/utils.js";import{withLayout as ve}from"../../shared/Styles.js";import xe from"../../components/button.js";import{VideoModal as ye}from"../VideoModal/index.js";import{convertLexicalToHTML as K}from"@payloadcms/richtext-lexical/html";import{useInView as be}from"react-intersection-observer";import{useExposure as he}from"../../hooks/useExposure.js";import Q from"../../helpers/ScrollLoadVideo.js";import{gsap as I}from"gsap";import{SplitText as we}from"gsap/dist/SplitText";import{ScrollTrigger as W}from"gsap/dist/ScrollTrigger";const He="media_player_base",Te="video",X=({defaultConverters:H})=>({...H,text:T=>{const{node:t}=T;return t.$&&t.$.color?`<span class="lexical-${t.$.color}">${t.text}</span>`:t.text}}),ke=me(({className:H="",id:T,onBtnClick:t,data:{title:m,videoTitle:g,btnText:_,youtubeId:P,video:S,mobileVideo:Z,theme:V,img:$,shape:B,titleAnimation:f,...A}},ee)=>{const{sticky:i}=A,[C,D]=p(!1),[F,te]=p(0),[re,oe]=p(0),[v,ne]=p(0),[j,U]=p(!1),x=n(null),Y=n(null),r=n(null),y=n(null),q=n(null),b=n(null),k=n(null),M=n(null),{ref:se,inView:s}=be();ge(ee,()=>r.current);const h=typeof m=="string"?m:m&&K({data:m,converters:X}),L=typeof g=="string"?g:g&&K({data:g,converters:X});E(()=>{s?(x.current?.play(),D(!0)):(x.current?.pause(),D(!1))},[s]);const N=fe(()=>{if(r.current){const a=r.current.getBoundingClientRect(),l=window.innerHeight,c=window.scrollY||window.pageYOffset,o=a.bottom+c,d=document.documentElement.scrollHeight-o;te(d>l?l:d)}if(r.current){const a=r.current.clientHeight,l=window.innerHeight;oe(a+l)}},600);E(()=>(N(),window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[]),E(()=>{function a(){if(!y.current||f!=="fade-in")return;const c=y.current?.clientHeight||80;b.current=new we(y.current,{type:"words",wordsClass:"word"});const o=b.current.words;I.set(o,{opacity:0}),k.current=W.create({trigger:r.current,start:"top center-=10%",end:`top+=${c*1.5+80}px center-=10%`,scrub:!0,onUpdate:O=>{const d=O.progress,G=o.length,ie=1/G,J=.5;o.forEach((ae,ce)=>{const de=ce/G*(1-J),pe=ie*(1+J);let z=(d-de)/pe;z=Math.max(0,Math.min(z,1)),I.set(ae,{opacity:z})}),I.set(Y.current,{opacity:d})}})}function l(){M.current=W.create({trigger:r.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:c=>{const o=c.progress;console.log("progress__",o),ne(o)}})}return s&&(a(),l()),()=>{b.current&&b.current.revert(),k.current&&k.current.kill(),M.current&&M.current.kill()}},[f,s]),he(q,{componentType:Te,componentName:He,componentTitle:L});const le=ue(()=>s&&v>0&&v<.9?3:s?2:1,[v,s]),R="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return u(Me,{children:[i&&e("div",{ref:r,className:w("relative z-10",R,{"aiui-dark":V==="dark","rounded-box":B==="rounded"},H),children:e("div",{ref:se,children:!f&&u("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[h&&!C&&e("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:h}}),L&&C&&e("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:L}}),_&&e(xe,{variant:"link",className:w("member-equity-button-secondary text-btn-primary-foreground"),onClick:()=>{U(!0),t&&t?.()},children:_})]})})}),u("div",{style:i?{marginBottom:`-${F}px`,marginTop:`-${re}px`,zIndex:le}:{},className:"relative",children:[e("div",{className:"sticky top-0 ",children:u("div",{id:T,className:w("relative overflow-hidden",i?"h-screen w-full":R,{"aiui-dark":V==="dark","rounded-box":B==="rounded"}),children:[f==="fade-in"&&h&&e("div",{ref:y,className:"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:h}}),u("div",{className:"media-cover left-0 top-0 h-screen w-screen",style:{height:`${102-v*100}vh`},children:[e(Q,{videoRef:x,poster:$?.url||"",src:S?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e(Q,{videoRef:x,poster:$?.url||"",src:Z?.url||S?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e("div",{ref:Y,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),e("div",{className:w(i&&"relative box-content block",R),style:i?{height:`${F}px`}:{},ref:q})]}),j&&P&&e(ye,{visible:j,youTubeId:P,onCloseModal:()=>U(!1)})]})});var De=ve(ke);export{De as default};
2
+ //# sourceMappingURL=index.backup.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/biz-components/MediaPlayerBase/index.backup.tsx"],
4
+ "sourcesContent": ["'use client'\nimport { useState, useRef, useMemo, useEffect, forwardRef, useImperativeHandle } from 'react'\nimport { debounce } from 'lodash'\nimport { cn } from '../../helpers/utils.js'\nimport { withLayout } from '../../shared/Styles.js'\nimport Button from '../../components/button.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { convertLexicalToHTML } from '@payloadcms/richtext-lexical/html'\nimport type { MediaPlayerBaseProps } from './types.js'\n// import { Right } from './right.js'\nimport { useInView } from 'react-intersection-observer'\nimport type { HTMLConvertersFunction } from '@payloadcms/richtext-lexical/html'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport ScrollLoadVideo from '../../helpers/ScrollLoadVideo.js'\nimport { gsap } from 'gsap'\nimport { SplitText } from 'gsap/dist/SplitText'\nimport { ScrollTrigger } from 'gsap/dist/ScrollTrigger'\n\nconst componentName = 'media_player_base'\nconst componentType = 'video'\n\nconst htmlConverters: HTMLConvertersFunction = ({ defaultConverters }) => ({\n ...defaultConverters,\n text: args => {\n const { node } = args\n // \u68C0\u67E5\u662F\u5426\u6709\u81EA\u5B9A\u4E49 color\n if (node.$ && node.$.color) {\n return `<span class=\"lexical-${node.$.color}\">${node.text}</span>`\n }\n return node.text\n },\n})\n\nconst MediaPlayerBase = forwardRef<HTMLDivElement, MediaPlayerBaseProps>(\n (\n {\n className = '',\n id,\n onBtnClick,\n data: { title, videoTitle, btnText, youtubeId, video, mobileVideo, theme, img, shape, titleAnimation, ...rest },\n },\n ref\n ) => {\n const { sticky } = rest\n const [isPlaying, setIsPlaying] = useState(false)\n const [btb, setbtb] = useState(0)\n const [titleHeight, setTitleHeight] = useState(0)\n const [videoHeightProgress, setVideoHeightProgress] = useState(0)\n const [visible, setVisible] = useState<boolean>(false)\n\n const videoRef = useRef<HTMLVideoElement>(null)\n const bgRef = useRef<HTMLImageElement>(null)\n const titleRef = useRef<HTMLDivElement>(null)\n const titleFadeInRef = useRef<HTMLDivElement>(null)\n const trackRef = useRef<HTMLDivElement>(null)\n const splitTextInstance = useRef<SplitText | null>(null)\n const scrollTriggerRef = useRef<ScrollTrigger | null>(null)\n const heightTriggerRef = useRef<ScrollTrigger | null>(null)\n const { ref: inViewRef, inView } = useInView()\n\n useImperativeHandle(ref, () => titleRef.current as HTMLDivElement)\n\n const title_html =\n typeof title === 'string' ? title : title && convertLexicalToHTML({ data: title, converters: htmlConverters })\n const videoTitle_html =\n typeof videoTitle === 'string'\n ? videoTitle\n : videoTitle && convertLexicalToHTML({ data: videoTitle, converters: htmlConverters })\n\n useEffect(() => {\n if (inView) {\n videoRef.current?.play()\n setIsPlaying(true)\n } else {\n videoRef.current?.pause()\n setIsPlaying(false)\n }\n }, [inView])\n\n const debouncedHandleResize = debounce(() => {\n if (titleRef.current) {\n const rect = titleRef.current.getBoundingClientRect()\n const screenHeight = window.innerHeight\n const scrollTop = window.scrollY || window.pageYOffset\n const elementBottomToPageTop = rect.bottom + scrollTop\n const pageHeight = document.documentElement.scrollHeight\n const distanceToPageBottom = pageHeight - elementBottomToPageTop\n setbtb(distanceToPageBottom > screenHeight ? screenHeight : distanceToPageBottom)\n }\n if (titleRef.current) {\n const titleHeight = titleRef.current.clientHeight\n const screenHeight = window.innerHeight\n setTitleHeight(titleHeight + screenHeight)\n }\n }, 600)\n\n useEffect(() => {\n debouncedHandleResize()\n window.addEventListener('resize', debouncedHandleResize)\n return () => {\n window.removeEventListener('resize', debouncedHandleResize)\n }\n }, [])\n\n useEffect(() => {\n function gsapResize() {\n if (!titleFadeInRef.current || titleAnimation !== 'fade-in') return\n const height = titleFadeInRef.current?.clientHeight || 80\n splitTextInstance.current = new SplitText(titleFadeInRef.current, {\n type: 'words',\n wordsClass: 'word',\n })\n const words = splitTextInstance.current.words\n gsap.set(words, { opacity: 0 })\n scrollTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'top center-=10%',\n end: `top+=${height * 1.5 + 80}px center-=10%`,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n const total = words.length\n const interval = 1 / total\n const overlap = 0.5\n words.forEach((word: any, i: number) => {\n const start = (i / total) * (1 - overlap)\n const width = interval * (1 + overlap)\n let opacity = (progress - start) / width\n opacity = Math.max(0, Math.min(opacity, 1))\n gsap.set(word, { opacity })\n })\n gsap.set(bgRef.current, { opacity: progress })\n },\n })\n }\n\n function gsapVideoHeightResize() {\n heightTriggerRef.current = ScrollTrigger.create({\n trigger: titleRef.current,\n start: 'bottom bottom',\n end: `bottom top`,\n // markers: true,\n scrub: true,\n onUpdate: (self: any) => {\n const progress = self.progress\n console.log('progress__', progress)\n setVideoHeightProgress(progress)\n },\n })\n }\n\n if (inView) {\n gsapResize()\n gsapVideoHeightResize()\n }\n\n return () => {\n splitTextInstance.current && splitTextInstance.current.revert()\n // ScrollTrigger.getAll().forEach((t: { kill: () => any }) => t.kill())\n scrollTriggerRef.current && scrollTriggerRef.current.kill()\n heightTriggerRef.current && heightTriggerRef.current.kill()\n }\n }, [titleAnimation, inView])\n\n useExposure(trackRef, {\n componentType,\n componentName,\n componentTitle: videoTitle_html,\n })\n\n const zIndexVideo = useMemo(() => {\n if (inView && videoHeightProgress > 0 && videoHeightProgress < 0.9) return 3\n if (inView) return 2\n return 1\n }, [videoHeightProgress, inView])\n\n const aspect =\n 'lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]'\n return (\n <>\n {sticky && (\n <div\n ref={titleRef}\n className={cn(\n 'relative z-10',\n aspect,\n {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n },\n className\n )}\n >\n <div ref={inViewRef}>\n {!titleAnimation && (\n <div className=\"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center\">\n {title_html && !isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n {videoTitle_html && isPlaying && (\n <div\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: videoTitle_html }}\n />\n )}\n {btnText && (\n <Button\n variant=\"link\"\n className={cn('member-equity-button-secondary text-btn-primary-foreground')}\n onClick={() => {\n setVisible(true)\n // if (isPlaying) {\n // if (videoRef.current) {\n // videoRef.current.pause()\n // }\n // setIsPlaying(false)\n // } else {\n // if (videoRef.current) {\n // videoRef.current.play()\n // }\n // setIsPlaying(true)\n // }\n onBtnClick && onBtnClick?.()\n }}\n >\n {btnText}\n {/* <Right /> */}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n )}\n <div\n style={\n sticky\n ? {\n marginBottom: `-${btb}px`,\n marginTop: `-${titleHeight}px`,\n zIndex: zIndexVideo,\n }\n : {}\n }\n className=\"relative\"\n >\n <div className=\"sticky top-0 \">\n <div\n id={id}\n className={cn('relative overflow-hidden', sticky ? 'h-screen w-full' : aspect, {\n 'aiui-dark': theme === 'dark',\n 'rounded-box': shape === 'rounded',\n })}\n >\n {titleAnimation === 'fade-in' && title_html && (\n <div\n ref={titleFadeInRef}\n className=\"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl\"\n dangerouslySetInnerHTML={{ __html: title_html }}\n />\n )}\n <div\n className=\"media-cover left-0 top-0 h-screen w-screen\"\n style={{ height: `${102 - videoHeightProgress * 100}vh` }}\n >\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={video?.url!}\n className=\"tablet:block hidden size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <ScrollLoadVideo\n videoRef={videoRef}\n poster={img?.url || ''}\n src={mobileVideo?.url || video?.url!}\n className=\"tablet:hidden block size-full\"\n videoClassName=\"object-cover\"\n muted\n loop\n playsInline\n autoplay\n webkit-playsinline\n x5-playsinline\n />\n <div\n ref={bgRef}\n className=\"absolute left-0 top-0 z-10 size-full opacity-0\"\n style={{\n background: 'rgba(0, 0, 0, 0.2)',\n }}\n />\n </div>\n </div>\n </div>\n <div\n className={cn(sticky && 'relative box-content block', aspect)}\n style={sticky ? { height: `${btb}px` } : {}}\n ref={trackRef}\n />\n </div>\n {visible && youtubeId && (\n <VideoModal visible={visible} youTubeId={youtubeId} onCloseModal={() => setVisible(false)} />\n )}\n </>\n )\n }\n)\n\nexport default withLayout(MediaPlayerBase)\n"],
5
+ "mappings": "aAmLM,mBAAAA,GAkBc,OAAAC,EAFJ,QAAAC,MAhBV,oBAlLN,OAAS,YAAAC,EAAU,UAAAC,EAAQ,WAAAC,GAAS,aAAAC,EAAW,cAAAC,GAAY,uBAAAC,OAA2B,QACtF,OAAS,YAAAC,OAAgB,SACzB,OAAS,MAAAC,MAAU,yBACnB,OAAS,cAAAC,OAAkB,yBAC3B,OAAOC,OAAY,6BACnB,OAAS,cAAAC,OAAkB,yBAC3B,OAAS,wBAAAC,MAA4B,oCAGrC,OAAS,aAAAC,OAAiB,8BAE1B,OAAS,eAAAC,OAAmB,6BAC5B,OAAOC,MAAqB,mCAC5B,OAAS,QAAAC,MAAY,OACrB,OAAS,aAAAC,OAAiB,sBAC1B,OAAS,iBAAAC,MAAqB,0BAE9B,MAAMC,GAAgB,oBAChBC,GAAgB,QAEhBC,EAAyC,CAAC,CAAE,kBAAAC,CAAkB,KAAO,CAC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kB,GAClB,iBAAc,GAChB,EACAlC,EAAC,OACC,IAAKsD,EACL,UAAU,iDACV,MAAO,CACL,WAAY,oBACd,EACF,GACF,GACF,EACF,EACAtD,EAAC,OACC,UAAWS,EAAGiC,GAAU,6BAA8B4C,CAAM,EAC5D,MAAO5C,EAAS,CAAE,OAAQ,GAAGG,CAAG,IAAK,EAAI,CAAC,EAC1C,IAAKY,EACP,GACF,EACCN,GAAWlB,GACVjC,EAACY,GAAA,CAAW,QAASuC,EAAS,UAAWlB,EAAW,aAAc,IAAMmB,EAAW,EAAK,EAAG,GAE/F,CAEJ,CACF,EAEA,IAAOmC,GAAQ7E,GAAWgB,EAAe",
6
+ "names": ["Fragment", "jsx", "jsxs", "useState", "useRef", "useMemo", "useEffect", "forwardRef", "useImperativeHandle", "debounce", "cn", "withLayout", "Button", "VideoModal", "convertLexicalToHTML", "useInView", "useExposure", "ScrollLoadVideo", "gsap", "SplitText", "ScrollTrigger", "componentName", "componentType", "htmlConverters", "defaultConverters", "args", "node", "MediaPlayerBase", "className", "id", "onBtnClick", "title", "videoTitle", "btnText", "youtubeId", "video", "mobileVideo", "theme", "img", "shape", "titleAnimation", "rest", "ref", "sticky", "isPlaying", "setIsPlaying", "btb", "setbtb", "titleHeight", "setTitleHeight", "videoHeightProgress", "setVideoHeightProgress", "visible", "setVisible", "videoRef", "bgRef", "titleRef", "titleFadeInRef", "trackRef", "splitTextInstance", "scrollTriggerRef", "heightTriggerRef", "inViewRef", "inView", "title_html", "videoTitle_html", "debouncedHandleResize", "rect", "screenHeight", "scrollTop", "elementBottomToPageTop", "distanceToPageBottom", "gsapResize", "height", "words", "self", "progress", "total", "interval", "overlap", "word", "i", "start", "width", "opacity", "gsapVideoHeightResize", "zIndexVideo", "aspect", "index_backup_default"]
7
+ }
@@ -1,6 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { MediaPlayerBaseProps } from './types.js';
2
3
  declare const _default: import("react").ForwardRefExoticComponent<Omit<Omit<MediaPlayerBaseProps & import("react").RefAttributes<HTMLDivElement>, keyof import("../../shared/Styles.js").StylesProps> & Partial<import("../../shared/Styles.js").StylesProps & import("../../shared/Styles.js").ContainerProps> & {
3
- className?: string;
4
- data?: Record<string, any>;
4
+ className?: string | undefined;
5
+ data?: Record<string, any> | undefined;
5
6
  }, "ref"> & import("react").RefAttributes<any>>;
6
7
  export default _default;
@@ -1,2 +1,2 @@
1
- "use client";import{Fragment as Me,jsx as e,jsxs as u}from"react/jsx-runtime";import{useState as p,useRef as n,useMemo as ue,useEffect as E,forwardRef as me,useImperativeHandle as ge}from"react";import{debounce as fe}from"lodash";import{cn as w}from"../../helpers/utils.js";import{withLayout as ve}from"../../shared/Styles.js";import xe from"../../components/button.js";import{VideoModal as ye}from"../VideoModal/index.js";import{convertLexicalToHTML as K}from"@payloadcms/richtext-lexical/html";import{useInView as be}from"react-intersection-observer";import{useExposure as he}from"../../hooks/useExposure.js";import Q from"../../helpers/ScrollLoadVideo.js";import{gsap as I}from"gsap";import{SplitText as we}from"gsap/dist/SplitText";import{ScrollTrigger as W}from"gsap/dist/ScrollTrigger";const He="media_player_base",Te="video",X=({defaultConverters:H})=>({...H,text:T=>{const{node:t}=T;return t.$&&t.$.color?`<span class="lexical-${t.$.color}">${t.text}</span>`:t.text}}),ke=me(({className:H="",id:T,onBtnClick:t,data:{title:m,videoTitle:g,btnText:_,youtubeId:P,video:S,mobileVideo:Z,theme:V,img:$,shape:B,titleAnimation:f,...A}},ee)=>{const{sticky:i}=A,[C,D]=p(!1),[F,te]=p(0),[re,oe]=p(0),[v,ne]=p(0),[j,U]=p(!1),x=n(null),Y=n(null),r=n(null),y=n(null),q=n(null),b=n(null),k=n(null),M=n(null),{ref:se,inView:s}=be();ge(ee,()=>r.current);const h=typeof m=="string"?m:m&&K({data:m,converters:X}),L=typeof g=="string"?g:g&&K({data:g,converters:X});E(()=>{s?(x.current?.play(),D(!0)):(x.current?.pause(),D(!1))},[s]);const N=fe(()=>{if(r.current){const a=r.current.getBoundingClientRect(),l=window.innerHeight,c=window.scrollY||window.pageYOffset,o=a.bottom+c,d=document.documentElement.scrollHeight-o;te(d>l?l:d)}if(r.current){const a=r.current.clientHeight,l=window.innerHeight;oe(a+l)}},600);E(()=>(N(),window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[]),E(()=>{function a(){if(!y.current||f!=="fade-in")return;const c=y.current?.clientHeight||80;b.current=new we(y.current,{type:"words",wordsClass:"word"});const o=b.current.words;I.set(o,{opacity:0}),k.current=W.create({trigger:r.current,start:"top center-=10%",end:`top+=${c*1.5+80}px center-=10%`,scrub:!0,onUpdate:O=>{const d=O.progress,G=o.length,ie=1/G,J=.5;o.forEach((ae,ce)=>{const de=ce/G*(1-J),pe=ie*(1+J);let z=(d-de)/pe;z=Math.max(0,Math.min(z,1)),I.set(ae,{opacity:z})}),I.set(Y.current,{opacity:d})}})}function l(){M.current=W.create({trigger:r.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:c=>{const o=c.progress;console.log("progress__",o),ne(o)}})}return s&&(a(),l()),()=>{b.current&&b.current.revert(),k.current&&k.current.kill(),M.current&&M.current.kill()}},[f,s]),he(q,{componentType:Te,componentName:He,componentTitle:L});const le=ue(()=>s&&v>0&&v<.9?3:s?2:1,[v,s]),R="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return u(Me,{children:[i&&e("div",{ref:r,className:w("relative z-10",R,{"aiui-dark":V==="dark","rounded-box":B==="rounded"},H),children:e("div",{ref:se,children:!f&&u("div",{className:"media-content absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[h&&!C&&e("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:h}}),L&&C&&e("div",{className:"lg-desktop:text-[64px] text-btn-primary-foreground text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:L}}),_&&e(xe,{variant:"link",className:w("member-equity-button-secondary text-btn-primary-foreground"),onClick:()=>{U(!0),t&&t?.()},children:_})]})})}),u("div",{style:i?{marginBottom:`-${F}px`,marginTop:`-${re}px`,zIndex:le}:{},className:"relative",children:[e("div",{className:"sticky top-0 ",children:u("div",{id:T,className:w("relative overflow-hidden",i?"h-screen w-full":R,{"aiui-dark":V==="dark","rounded-box":B==="rounded"}),children:[f==="fade-in"&&h&&e("div",{ref:y,className:"lg-desktop:text-[64px] text-btn-primary-foreground absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:h}}),u("div",{className:"media-cover left-0 top-0 h-screen w-screen",style:{height:`${102-v*100}vh`},children:[e(Q,{videoRef:x,poster:$?.url||"",src:S?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e(Q,{videoRef:x,poster:$?.url||"",src:Z?.url||S?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e("div",{ref:Y,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),e("div",{className:w(i&&"relative box-content block",R),style:i?{height:`${F}px`}:{},ref:q})]}),j&&P&&e(ye,{visible:j,youTubeId:P,onCloseModal:()=>U(!1)})]})});var De=ve(ke);export{De as default};
1
+ "use client";import{Fragment as ce,jsx as e,jsxs as l}from"react/jsx-runtime";import{useState as y,useRef as i,useMemo as ve,useEffect as P,forwardRef as xe,useImperativeHandle as be,useCallback as ye}from"react";import{cn as g}from"../../helpers/utils.js";import{withLayout as Ee}from"../../shared/Styles.js";import oe from"../../components/button.js";import{VideoModal as le}from"../VideoModal/index.js";import{convertLexicalToHTML as ne}from"@payloadcms/richtext-lexical/html";import{useInView as he}from"react-intersection-observer";import{useExposure as He}from"../../hooks/useExposure.js";import z from"../../helpers/ScrollLoadVideo.js";import{gsap as J}from"gsap";import{SplitText as _e}from"gsap/dist/SplitText";import{ScrollTrigger as se}from"gsap/dist/ScrollTrigger";const Ie="media_player_base",we="video",r={TEXT_START_OFFSET:"10%",TEXT_ANIMATION_MULTIPLIER:1.5,TEXT_ANIMATION_OFFSET:80,VIDEO_HEIGHT_BASE:102,OVERLAP_FACTOR:.5,VIDEO_PROGRESS_THRESHOLD:.9,HEIGHT_CHANGE_THRESHOLD:5},ae=({defaultConverters:E})=>({...E,text:h=>{const{node:n}=h;return n.$&&n.$.color?`<span class="lexical-${n.$.color}">${n.text}</span>`:n.text}}),ie=xe(({className:E="",id:h,onBtnClick:n,data:{title:H,videoTitle:_,btnText:I,youtubeId:w,video:N,mobileVideo:K,theme:D,img:S,shape:V,titleAnimation:c,...de}},ue)=>{const{sticky:B}=de,[k,Q]=y(!1),[W,pe]=y(0),[me,fe]=y(0),[R,Te]=y(0),[M,$]=y(!1),d=i(null),G=i(null),t=i(null),X=i(null),j=i(null),q=i(null),Z=i(null),ee=i(null),{ref:te,inView:o}=he();be(ue,()=>t.current);const u=typeof H=="string"?H:H&&ne({data:H,converters:ae}),v=typeof _=="string"?_:_&&ne({data:_,converters:ae});P(()=>{o?(d.current?.play(),Q(!0)):(d.current?.pause(),Q(!1))},[o]),P(()=>{if(!t.current||!B)return;const s=()=>{if(!t.current)return;const Y=t.current.getBoundingClientRect(),m=window.innerHeight,f=window.scrollY||window.pageYOffset,x=Y.bottom+f,C=document.documentElement.scrollHeight-x,F=C>m?m:C,T=t.current.clientHeight+m;pe(b=>Math.abs(F-b)>r.HEIGHT_CHANGE_THRESHOLD?F:b),fe(b=>Math.abs(T-b)>r.HEIGHT_CHANGE_THRESHOLD?T:b)};s();const L=new ResizeObserver(()=>{requestAnimationFrame(()=>{s()})});L.observe(t.current);const p=()=>{requestAnimationFrame(()=>{s()})};let a;const O=()=>{a||(a=setTimeout(()=>{p(),a=null},100))};return window.addEventListener("scroll",O,{passive:!0}),()=>{L.disconnect(),window.removeEventListener("scroll",O),a&&clearTimeout(a)}},[B]),P(()=>{if(!o||!c||c!=="fade-in"||!X.current)return;const s=X.current,L=s.clientHeight||80;q.current=new _e(s,{type:"words",wordsClass:"word"});const p=q.current.words,a=p.length,O=1/a,Y=p.map((m,f)=>{const x=f/a*(1-r.OVERLAP_FACTOR),A=O*(1+r.OVERLAP_FACTOR);return{start:x,width:A}});return J.set(p,{opacity:0}),Z.current=se.create({trigger:t.current,start:`top center-=${r.TEXT_START_OFFSET}`,end:`top+=${L*r.TEXT_ANIMATION_MULTIPLIER+r.TEXT_ANIMATION_OFFSET}px center-=${r.TEXT_START_OFFSET}`,scrub:!0,onUpdate:m=>{const f=m.progress;p.forEach((x,A)=>{const{start:C,width:F}=Y[A];let T=(f-C)/F;T=Math.max(0,Math.min(T,1)),J.set(x,{opacity:T})}),G.current&&J.set(G.current,{opacity:f})}}),()=>{q.current?.revert(),Z.current?.kill()}},[c,o]),P(()=>{if(!(!o||!t.current))return ee.current=se.create({trigger:t.current,start:"bottom bottom",end:"bottom top",scrub:!0,onUpdate:s=>{Te(s.progress)}}),()=>{ee.current?.kill()}},[o]),He(j,{componentType:we,componentName:Ie,componentTitle:v});const ge=ve(()=>o&&R>0&&R<r.VIDEO_PROGRESS_THRESHOLD?3:o?2:1,[R,o]),re=ye(()=>{$(!0),n?.()},[n]),U="lg-desktop:aspect-w-[1920] lg-desktop:aspect-h-[930] desktop:aspect-w-[1024] desktop:aspect-h-[520] laptop:aspect-w-[1024] laptop:aspect-h-[520] tablet:aspect-w-[768] tablet:aspect-h-[660] aspect-w-[390] aspect-h-[660]";return B?l(ce,{children:[e("div",{ref:t,className:g("relative z-10",U,{"aiui-dark":D==="dark","rounded-box":V==="rounded"},E),children:e("div",{ref:te,children:!c&&l("div",{className:"media-content text-info-primary absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[u&&!k&&e("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:u}}),v&&k&&e("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:v}}),I&&e(oe,{variant:"link",className:g("member-equity-button-secondary "),onClick:re,children:I})]})})}),l("div",{style:{marginBottom:`-${W}px`,marginTop:`-${me}px`,zIndex:ge},className:"relative",children:[e("div",{className:"sticky top-0",children:l("div",{id:h,className:g("relative h-screen w-full overflow-hidden",{"aiui-dark":D==="dark","rounded-box":V==="rounded"}),children:[c==="fade-in"&&u&&e("div",{ref:X,className:"lg-desktop:text-[64px] absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:u}}),l("div",{className:"media-cover absolute left-0 top-0 size-full",style:{height:`${r.VIDEO_HEIGHT_BASE-R*100}vh`},children:[e(z,{videoRef:d,poster:S?.url||"",src:N?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e(z,{videoRef:d,poster:S?.url||"",src:K?.url||N?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e("div",{ref:G,className:"absolute left-0 top-0 z-10 size-full opacity-0",style:{background:"rgba(0, 0, 0, 0.2)"}})]})]})}),e("div",{className:g("relative box-content block",U),style:{height:`${W}px`},ref:j})]}),M&&w&&e(le,{visible:M,youTubeId:w,onCloseModal:()=>$(!1)})]}):l(ce,{children:[l("div",{id:h,className:g("relative overflow-hidden",U,{"aiui-dark":D==="dark","rounded-box":V==="rounded"},E),children:[l("div",{ref:te,children:[!c&&l("div",{className:"media-content text-info-primary absolute left-1/2 top-1/2 z-20 w-full -translate-x-1/2 -translate-y-1/2 px-4 text-center",children:[u&&!k&&e("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:u}}),v&&k&&e("div",{className:"lg-desktop:text-[64px] text-center text-[40px] font-bold leading-none lg:text-5xl",dangerouslySetInnerHTML:{__html:v}}),I&&e(oe,{variant:"link",className:g("member-equity-button-secondary"),onClick:re,children:I})]}),e(z,{videoRef:d,poster:S?.url||"",src:N?.url,className:"tablet:block hidden size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0}),e(z,{videoRef:d,poster:S?.url||"",src:K?.url||N?.url,className:"tablet:hidden block size-full",videoClassName:"object-cover",muted:!0,loop:!0,playsInline:!0,autoplay:!0,"webkit-playsinline":!0,"x5-playsinline":!0})]}),e("div",{ref:j,className:"absolute bottom-0 left-0 h-px w-full"})]}),M&&w&&e(le,{visible:M,youTubeId:w,onCloseModal:()=>$(!1)})]})});ie.displayName="MediaPlayerBase";var De=Ee(ie);export{De as default};
2
2
  //# sourceMappingURL=index.js.map