@anker-in/headless-ui 1.2.2 → 1.2.3-alpha.1778583232121

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 (323) hide show
  1. package/dist/cjs/biz-components/AccordionCards/index.js +1 -1
  2. package/dist/cjs/biz-components/AccordionCards/index.js.map +3 -3
  3. package/dist/cjs/biz-components/ActivityMechanism/index.js +1 -1
  4. package/dist/cjs/biz-components/ActivityMechanism/index.js.map +3 -3
  5. package/dist/cjs/biz-components/ActivitySchedule/index.js +1 -1
  6. package/dist/cjs/biz-components/ActivitySchedule/index.js.map +3 -3
  7. package/dist/cjs/biz-components/AiuiProvider/index.js +1 -1
  8. package/dist/cjs/biz-components/AiuiProvider/index.js.map +3 -3
  9. package/dist/cjs/biz-components/AnchorNavigation/index.js +1 -1
  10. package/dist/cjs/biz-components/AnchorNavigation/index.js.map +3 -3
  11. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  12. package/dist/cjs/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  13. package/dist/cjs/biz-components/Category/SwiperCategory.js +1 -1
  14. package/dist/cjs/biz-components/Category/SwiperCategory.js.map +3 -3
  15. package/dist/cjs/biz-components/Category/index.js +1 -1
  16. package/dist/cjs/biz-components/Category/index.js.map +3 -3
  17. package/dist/cjs/biz-components/Evaluate/index.js +1 -1
  18. package/dist/cjs/biz-components/Evaluate/index.js.map +3 -3
  19. package/dist/cjs/biz-components/EventSchedule/index.js +1 -1
  20. package/dist/cjs/biz-components/EventSchedule/index.js.map +3 -3
  21. package/dist/cjs/biz-components/Faq/Faq.js +1 -1
  22. package/dist/cjs/biz-components/Faq/Faq.js.map +2 -2
  23. package/dist/cjs/biz-components/Faq/types.d.ts +0 -1
  24. package/dist/cjs/biz-components/Faq/types.js +1 -1
  25. package/dist/cjs/biz-components/Faq/types.js.map +1 -1
  26. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js +1 -1
  27. package/dist/cjs/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  28. package/dist/cjs/biz-components/GiftBox/index.js +1 -1
  29. package/dist/cjs/biz-components/GiftBox/index.js.map +2 -2
  30. package/dist/cjs/biz-components/GiftShelf/index.js +1 -1
  31. package/dist/cjs/biz-components/GiftShelf/index.js.map +3 -3
  32. package/dist/cjs/biz-components/GiftTierShelf/index.js +1 -1
  33. package/dist/cjs/biz-components/GiftTierShelf/index.js.map +3 -3
  34. package/dist/cjs/biz-components/Graphic/index.js +1 -1
  35. package/dist/cjs/biz-components/Graphic/index.js.map +2 -2
  36. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  37. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  38. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
  39. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
  40. package/dist/cjs/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
  41. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
  42. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
  43. package/dist/cjs/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
  44. package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
  45. package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
  46. package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +8 -1
  47. package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
  48. package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
  49. package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
  50. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
  51. package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  52. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js +1 -1
  53. package/dist/cjs/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  54. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  55. package/dist/cjs/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  56. package/dist/cjs/biz-components/HeroBanner/types.d.ts +5 -0
  57. package/dist/cjs/biz-components/HeroBanner/types.js +1 -1
  58. package/dist/cjs/biz-components/HeroBanner/types.js.map +1 -1
  59. package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
  60. package/dist/cjs/biz-components/ImageOverlayShelf/ProductCard.js.map +2 -2
  61. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js +1 -1
  62. package/dist/cjs/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  63. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  64. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
  65. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  66. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  67. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  68. package/dist/cjs/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  69. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.d.ts +2 -0
  70. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js +1 -1
  71. package/dist/cjs/biz-components/Listing/components/PurchaseBar/types.js.map +1 -1
  72. package/dist/cjs/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
  73. package/dist/cjs/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  74. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
  75. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  76. package/dist/cjs/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  77. package/dist/cjs/biz-components/LotteryShared/types.d.ts +9 -0
  78. package/dist/cjs/biz-components/LotteryShared/types.js.map +2 -2
  79. package/dist/cjs/biz-components/Marquee/Marquee.d.ts +11 -4
  80. package/dist/cjs/biz-components/Marquee/Marquee.js +1 -1
  81. package/dist/cjs/biz-components/Marquee/Marquee.js.map +3 -3
  82. package/dist/cjs/biz-components/Marquee/index.d.ts +1 -1
  83. package/dist/cjs/biz-components/Marquee/index.js +1 -1
  84. package/dist/cjs/biz-components/Marquee/index.js.map +2 -2
  85. package/dist/cjs/biz-components/Marquee/type.d.ts +22 -4
  86. package/dist/cjs/biz-components/Marquee/type.js +1 -1
  87. package/dist/cjs/biz-components/Marquee/type.js.map +1 -1
  88. package/dist/cjs/biz-components/Media/index.js +1 -1
  89. package/dist/cjs/biz-components/Media/index.js.map +2 -2
  90. package/dist/cjs/biz-components/MediaPlayerBase/index.js +1 -1
  91. package/dist/cjs/biz-components/MediaPlayerBase/index.js.map +3 -3
  92. package/dist/cjs/biz-components/MediaPlayerMulti/index.js +1 -1
  93. package/dist/cjs/biz-components/MediaPlayerMulti/index.js.map +3 -3
  94. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.d.ts +9 -0
  95. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js +2 -0
  96. package/dist/cjs/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +7 -0
  97. package/dist/cjs/biz-components/MediaTextOverlay/index.d.ts +2 -0
  98. package/dist/cjs/biz-components/MediaTextOverlay/index.js +2 -0
  99. package/dist/cjs/biz-components/MediaTextOverlay/index.js.map +7 -0
  100. package/dist/cjs/biz-components/MediaTextOverlay/types.d.ts +24 -0
  101. package/dist/cjs/biz-components/MediaTextOverlay/types.js +2 -0
  102. package/dist/cjs/biz-components/MediaTextOverlay/types.js.map +7 -0
  103. package/dist/cjs/biz-components/MemberEquity/index.js +2 -2
  104. package/dist/cjs/biz-components/MemberEquity/index.js.map +3 -3
  105. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  106. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  107. package/dist/cjs/biz-components/NavigationSearch/index.js +2 -2
  108. package/dist/cjs/biz-components/NavigationSearch/index.js.map +2 -2
  109. package/dist/cjs/biz-components/ProductHero/ProductHero.js +1 -1
  110. package/dist/cjs/biz-components/ProductHero/ProductHero.js.map +3 -3
  111. package/dist/cjs/biz-components/ProductLottery/types.d.ts +62 -5
  112. package/dist/cjs/biz-components/ProductLottery/types.js +1 -1
  113. package/dist/cjs/biz-components/ProductLottery/types.js.map +2 -2
  114. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  115. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +3 -3
  116. package/dist/cjs/biz-components/PromotionalBar/index.js +1 -1
  117. package/dist/cjs/biz-components/PromotionalBar/index.js.map +3 -3
  118. package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +1 -0
  119. package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +1 -1
  120. package/dist/cjs/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +3 -3
  121. package/dist/cjs/biz-components/SecondaryBanner/index.d.ts +9 -0
  122. package/dist/cjs/biz-components/SecondaryBanner/index.js +1 -1
  123. package/dist/cjs/biz-components/SecondaryBanner/index.js.map +3 -3
  124. package/dist/cjs/biz-components/ShelfDisplay/index.js +1 -1
  125. package/dist/cjs/biz-components/ShelfDisplay/index.js.map +2 -2
  126. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.d.ts +1 -0
  127. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js +1 -1
  128. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
  129. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  130. package/dist/cjs/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  131. package/dist/cjs/biz-components/Subscribe/index.js +1 -1
  132. package/dist/cjs/biz-components/Subscribe/index.js.map +2 -2
  133. package/dist/cjs/biz-components/SwiperBox/index.js +1 -1
  134. package/dist/cjs/biz-components/SwiperBox/index.js.map +3 -3
  135. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  136. package/dist/cjs/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  137. package/dist/cjs/biz-components/Title/index.js +1 -1
  138. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  139. package/dist/cjs/biz-components/WebPushPopup/index.d.ts +44 -0
  140. package/dist/cjs/biz-components/WebPushPopup/index.js +2 -0
  141. package/dist/cjs/biz-components/WebPushPopup/index.js.map +7 -0
  142. package/dist/cjs/biz-components/WheelLottery/index.js +1 -1
  143. package/dist/cjs/biz-components/WheelLottery/index.js.map +3 -3
  144. package/dist/cjs/biz-components/index.d.ts +6 -0
  145. package/dist/cjs/biz-components/index.js +1 -1
  146. package/dist/cjs/biz-components/index.js.map +3 -3
  147. package/dist/cjs/components/Countdown.js +1 -1
  148. package/dist/cjs/components/Countdown.js.map +3 -3
  149. package/dist/cjs/components/button.d.ts +4 -0
  150. package/dist/cjs/components/button.js +1 -1
  151. package/dist/cjs/components/button.js.map +3 -3
  152. package/dist/cjs/components/link.js +1 -1
  153. package/dist/cjs/components/link.js.map +2 -2
  154. package/dist/cjs/helpers/index.d.ts +1 -1
  155. package/dist/cjs/helpers/index.js +1 -1
  156. package/dist/cjs/helpers/index.js.map +2 -2
  157. package/dist/cjs/helpers/isLexicalEmpty.d.ts +5 -0
  158. package/dist/cjs/helpers/isLexicalEmpty.js +1 -1
  159. package/dist/cjs/helpers/isLexicalEmpty.js.map +3 -3
  160. package/dist/cjs/hooks/useEmarsysWebPush.d.ts +111 -0
  161. package/dist/cjs/hooks/useEmarsysWebPush.js +2 -0
  162. package/dist/cjs/hooks/useEmarsysWebPush.js.map +7 -0
  163. package/dist/cjs/hooks/useProductListTrack.d.ts +43 -0
  164. package/dist/cjs/hooks/useProductListTrack.js +2 -0
  165. package/dist/cjs/hooks/useProductListTrack.js.map +7 -0
  166. package/dist/esm/biz-components/AccordionCards/index.js +1 -1
  167. package/dist/esm/biz-components/AccordionCards/index.js.map +3 -3
  168. package/dist/esm/biz-components/ActivityMechanism/index.js +1 -1
  169. package/dist/esm/biz-components/ActivityMechanism/index.js.map +3 -3
  170. package/dist/esm/biz-components/ActivitySchedule/index.js +1 -1
  171. package/dist/esm/biz-components/ActivitySchedule/index.js.map +3 -3
  172. package/dist/esm/biz-components/AiuiProvider/index.js +1 -1
  173. package/dist/esm/biz-components/AiuiProvider/index.js.map +3 -3
  174. package/dist/esm/biz-components/AnchorNavigation/index.js +1 -1
  175. package/dist/esm/biz-components/AnchorNavigation/index.js.map +3 -3
  176. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js +1 -1
  177. package/dist/esm/biz-components/BrandCardLink/BrandCardLink.js.map +3 -3
  178. package/dist/esm/biz-components/Category/SwiperCategory.js +1 -1
  179. package/dist/esm/biz-components/Category/SwiperCategory.js.map +3 -3
  180. package/dist/esm/biz-components/Category/index.js +1 -1
  181. package/dist/esm/biz-components/Category/index.js.map +3 -3
  182. package/dist/esm/biz-components/Evaluate/index.js +1 -1
  183. package/dist/esm/biz-components/Evaluate/index.js.map +3 -3
  184. package/dist/esm/biz-components/EventSchedule/index.js +1 -1
  185. package/dist/esm/biz-components/EventSchedule/index.js.map +3 -3
  186. package/dist/esm/biz-components/Faq/Faq.js +1 -1
  187. package/dist/esm/biz-components/Faq/Faq.js.map +2 -2
  188. package/dist/esm/biz-components/Faq/types.d.ts +0 -1
  189. package/dist/esm/biz-components/FeatureCards/FeatureCards.js +1 -1
  190. package/dist/esm/biz-components/FeatureCards/FeatureCards.js.map +3 -3
  191. package/dist/esm/biz-components/GiftBox/index.js +1 -1
  192. package/dist/esm/biz-components/GiftBox/index.js.map +2 -2
  193. package/dist/esm/biz-components/GiftShelf/index.js +1 -1
  194. package/dist/esm/biz-components/GiftShelf/index.js.map +3 -3
  195. package/dist/esm/biz-components/GiftTierShelf/index.js +1 -1
  196. package/dist/esm/biz-components/GiftTierShelf/index.js.map +3 -3
  197. package/dist/esm/biz-components/Graphic/index.js +1 -1
  198. package/dist/esm/biz-components/Graphic/index.js.map +2 -2
  199. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  200. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +3 -3
  201. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.d.ts +12 -0
  202. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js +2 -0
  203. package/dist/esm/biz-components/HeaderNavigation/MobileTextLinksMenu.js.map +7 -0
  204. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.d.ts +10 -0
  205. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js +2 -0
  206. package/dist/esm/biz-components/HeaderNavigation/TextLinksDropdown.js.map +7 -0
  207. package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
  208. package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
  209. package/dist/esm/biz-components/HeaderNavigation/types.d.ts +8 -1
  210. package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
  211. package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
  212. package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -0
  213. package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
  214. package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
  215. package/dist/esm/biz-components/HeroBanner/HeroBanner.js +1 -1
  216. package/dist/esm/biz-components/HeroBanner/HeroBanner.js.map +3 -3
  217. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js +1 -1
  218. package/dist/esm/biz-components/HeroBanner/HeroBannerCarousel.js.map +3 -3
  219. package/dist/esm/biz-components/HeroBanner/types.d.ts +5 -0
  220. package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js +1 -1
  221. package/dist/esm/biz-components/ImageOverlayShelf/ProductCard.js.map +2 -2
  222. package/dist/esm/biz-components/ImageWithText/ImageWithText.js +1 -1
  223. package/dist/esm/biz-components/ImageWithText/ImageWithText.js.map +3 -3
  224. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js +1 -1
  225. package/dist/esm/biz-components/Listing/components/ProductCard/ProductGallery/index.js.map +3 -3
  226. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  227. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  228. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js +1 -1
  229. package/dist/esm/biz-components/Listing/components/PurchaseBar/index.js.map +3 -3
  230. package/dist/esm/biz-components/Listing/components/PurchaseBar/types.d.ts +2 -0
  231. package/dist/esm/biz-components/LotteryShared/ErrorModal.d.ts +4 -0
  232. package/dist/esm/biz-components/LotteryShared/ErrorModal.js.map +2 -2
  233. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.d.ts +13 -13
  234. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js +1 -1
  235. package/dist/esm/biz-components/LotteryShared/MyRewardsModal.js.map +3 -3
  236. package/dist/esm/biz-components/LotteryShared/types.d.ts +9 -0
  237. package/dist/esm/biz-components/LotteryShared/types.js.map +2 -2
  238. package/dist/esm/biz-components/Marquee/Marquee.d.ts +11 -4
  239. package/dist/esm/biz-components/Marquee/Marquee.js +1 -1
  240. package/dist/esm/biz-components/Marquee/Marquee.js.map +3 -3
  241. package/dist/esm/biz-components/Marquee/index.d.ts +1 -1
  242. package/dist/esm/biz-components/Marquee/index.js +1 -1
  243. package/dist/esm/biz-components/Marquee/index.js.map +3 -3
  244. package/dist/esm/biz-components/Marquee/type.d.ts +22 -4
  245. package/dist/esm/biz-components/Media/index.js +1 -1
  246. package/dist/esm/biz-components/Media/index.js.map +2 -2
  247. package/dist/esm/biz-components/MediaPlayerBase/index.js +1 -1
  248. package/dist/esm/biz-components/MediaPlayerBase/index.js.map +3 -3
  249. package/dist/esm/biz-components/MediaPlayerMulti/index.js +1 -1
  250. package/dist/esm/biz-components/MediaPlayerMulti/index.js.map +3 -3
  251. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.d.ts +9 -0
  252. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js +2 -0
  253. package/dist/esm/biz-components/MediaTextOverlay/MediaTextOverlay.js.map +7 -0
  254. package/dist/esm/biz-components/MediaTextOverlay/index.d.ts +2 -0
  255. package/dist/esm/biz-components/MediaTextOverlay/index.js +2 -0
  256. package/dist/esm/biz-components/MediaTextOverlay/index.js.map +7 -0
  257. package/dist/esm/biz-components/MediaTextOverlay/types.d.ts +24 -0
  258. package/dist/esm/biz-components/MediaTextOverlay/types.js +1 -0
  259. package/dist/esm/biz-components/MediaTextOverlay/types.js.map +7 -0
  260. package/dist/esm/biz-components/MemberEquity/index.js +2 -2
  261. package/dist/esm/biz-components/MemberEquity/index.js.map +3 -3
  262. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  263. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +3 -3
  264. package/dist/esm/biz-components/NavigationSearch/index.js +2 -2
  265. package/dist/esm/biz-components/NavigationSearch/index.js.map +3 -3
  266. package/dist/esm/biz-components/ProductHero/ProductHero.js +1 -1
  267. package/dist/esm/biz-components/ProductHero/ProductHero.js.map +3 -3
  268. package/dist/esm/biz-components/ProductLottery/types.d.ts +62 -5
  269. package/dist/esm/biz-components/ProductLottery/types.js.map +2 -2
  270. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  271. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +3 -3
  272. package/dist/esm/biz-components/PromotionalBar/index.js +1 -1
  273. package/dist/esm/biz-components/PromotionalBar/index.js.map +3 -3
  274. package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.d.ts +1 -0
  275. package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js +1 -1
  276. package/dist/esm/biz-components/SecondaryBanner/SecondaryBannerCarousel.js.map +3 -3
  277. package/dist/esm/biz-components/SecondaryBanner/index.d.ts +9 -0
  278. package/dist/esm/biz-components/SecondaryBanner/index.js +1 -1
  279. package/dist/esm/biz-components/SecondaryBanner/index.js.map +3 -3
  280. package/dist/esm/biz-components/ShelfDisplay/index.js +1 -1
  281. package/dist/esm/biz-components/ShelfDisplay/index.js.map +2 -2
  282. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.d.ts +1 -0
  283. package/dist/esm/biz-components/ShelfDisplay/shelfDisplay.js.map +1 -1
  284. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js +1 -1
  285. package/dist/esm/biz-components/ShelfDisplay/shelfDisplayItem.js.map +3 -3
  286. package/dist/esm/biz-components/Subscribe/index.js +1 -1
  287. package/dist/esm/biz-components/Subscribe/index.js.map +2 -2
  288. package/dist/esm/biz-components/SwiperBox/index.js +1 -1
  289. package/dist/esm/biz-components/SwiperBox/index.js.map +3 -3
  290. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js +1 -1
  291. package/dist/esm/biz-components/ThreeDCarousel/ThreeDCarousel.js.map +3 -3
  292. package/dist/esm/biz-components/Title/index.js +1 -1
  293. package/dist/esm/biz-components/Title/index.js.map +3 -3
  294. package/dist/esm/biz-components/WebPushPopup/index.d.ts +44 -0
  295. package/dist/esm/biz-components/WebPushPopup/index.js +2 -0
  296. package/dist/esm/biz-components/WebPushPopup/index.js.map +7 -0
  297. package/dist/esm/biz-components/WheelLottery/index.js +1 -1
  298. package/dist/esm/biz-components/WheelLottery/index.js.map +2 -2
  299. package/dist/esm/biz-components/index.d.ts +6 -0
  300. package/dist/esm/biz-components/index.js +1 -1
  301. package/dist/esm/biz-components/index.js.map +3 -3
  302. package/dist/esm/components/Countdown.js +1 -1
  303. package/dist/esm/components/Countdown.js.map +3 -3
  304. package/dist/esm/components/button.d.ts +4 -0
  305. package/dist/esm/components/button.js +1 -1
  306. package/dist/esm/components/button.js.map +3 -3
  307. package/dist/esm/components/link.js +1 -1
  308. package/dist/esm/components/link.js.map +2 -2
  309. package/dist/esm/helpers/index.d.ts +1 -1
  310. package/dist/esm/helpers/index.js +1 -1
  311. package/dist/esm/helpers/index.js.map +3 -3
  312. package/dist/esm/helpers/isLexicalEmpty.d.ts +5 -0
  313. package/dist/esm/helpers/isLexicalEmpty.js +1 -1
  314. package/dist/esm/helpers/isLexicalEmpty.js.map +3 -3
  315. package/dist/esm/hooks/useEmarsysWebPush.d.ts +111 -0
  316. package/dist/esm/hooks/useEmarsysWebPush.js +2 -0
  317. package/dist/esm/hooks/useEmarsysWebPush.js.map +7 -0
  318. package/dist/esm/hooks/useProductListTrack.d.ts +43 -0
  319. package/dist/esm/hooks/useProductListTrack.js +2 -0
  320. package/dist/esm/hooks/useProductListTrack.js.map +7 -0
  321. package/package.json +1 -1
  322. package/style.css +143 -11
  323. package/tailwind.config.js +10 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeaderNavigation/index.tsx"],
4
- "sourcesContent": ["'use client'\nimport React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'\n\nimport { Picture, Text, Button, Container, BrandStrip } from '../../components/index.js'\n\nimport { withLayout } from '../../shared/Styles.js'\n\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\n\nimport type {\n MobilePrimaryNavigationData,\n MobileSecondaryNavigationData,\n MobileNavigationProps,\n DesktopNavigationProps,\n HeaderNavigationProps,\n} from './types.js'\nimport NavProvider, { useNavContext } from './NavProvider.js'\n\nimport { HeaderNavigationMenu, HeaderNavigationBlockType, HeaderNavigationActionBlockType } from './types.js'\n\nimport jump from 'jump.js'\n\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\n\nimport { WithSidebar, WithSupports, WithMulticol, WithGroupCategory, WithResource } from './withCategory.js'\n\nimport { Menu, Close, User, LeftArrow, DownArrow, Polygon } from './icons/index.js'\n\nimport NavigationSearch from '../NavigationSearch/index.js'\nimport { ResourceSidebarDropdown } from './ResourceSidebarDropdown.js'\nimport { MobileResourceSidebarMenu } from './MobileResourceSidebarMenu.js'\nimport { SidebarDropdown } from './SidebarDropdown.js'\nimport { useScrollLock } from './useScrollLock.js'\nimport { MulticolDropdown } from './MulticolDropdown.js'\nimport { SupportsDropdown } from './SupportsDropdown.js'\nimport { MobileSidebarMenu } from './MobileSidebarMenu.js'\nimport { MobileSupportMenu } from './MobileSupportMenu.js'\nimport { MobileMulticolMenu } from './MobileMulticolMenu.js'\nimport { MenuItem } from './MobileMenuComponents.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport throttle from '../../shared/throttle.js'\n\nconst HeaderNavigation = forwardRef<HTMLDivElement, HeaderNavigationProps>((props, ref) => {\n const {\n data: { header } = {},\n buildProps,\n event,\n profile,\n theme = 'light',\n isTop = false,\n searchResult,\n onSearch,\n isSearching,\n keywords,\n onPrimaryNavClick,\n onSeriesProductClick,\n onSidebarNavClick,\n headerId,\n cartCount,\n menuData,\n ...rest\n } = props\n\n const [searchOpen, setSearchOpen] = useState(false)\n const [headerHidden, setHeaderHidden] = useState(false)\n const [changeHeaderBackground, setChangeHeaderBackground] = useState(false)\n const [isMobile, setIsMobile] = useState(false)\n const searchRef = useRef<HTMLDivElement>(null)\n\n const headerRef = useRef<HTMLDivElement>(null)\n\n const resizeWindow = () => {\n const offsetWidth = document?.querySelector('body')?.offsetWidth || 0\n setIsMobile(offsetWidth <= 1440)\n }\n\n useEffect(() => {\n resizeWindow()\n window.addEventListener('resize', resizeWindow)\n return () => {\n window.removeEventListener('resize', resizeWindow)\n }\n }, [])\n\n useImperativeHandle(ref, () => headerRef.current as HTMLDivElement)\n\n useEffect(() => {\n if (headerRef.current && isTop) {\n jump(headerRef.current, { duration: 0, offset: headerRef.current?.getBoundingClientRect()?.bottom || 0 })\n }\n }, [isTop])\n\n useEffect(() => {\n // \u5982\u679C isTop \u4E3A true\uFF0C\u4E0D\u9700\u8981\u6EDA\u52A8\u76D1\u542C\u548C\u52A8\u6548\n if (isTop) {\n setHeaderHidden(false)\n setChangeHeaderBackground(false)\n return\n }\n\n let lastScrollY = 0\n let upwardDistance = 0\n let downwardDistance = 0\n\n const getScrollTop = () => {\n return document?.documentElement?.scrollTop || document?.body?.scrollTop || 0\n }\n\n // \u521D\u59CB\u5316\u72B6\u6001\n const initialScrollTop = getScrollTop()\n lastScrollY = initialScrollTop\n setHeaderHidden(initialScrollTop > 300)\n setChangeHeaderBackground(initialScrollTop > 30)\n\n const handleScroll = throttle(() => {\n const currentScrollY = getScrollTop()\n const delta = currentScrollY - lastScrollY\n\n // \u66F4\u65B0\u80CC\u666F\u72B6\u6001\n setChangeHeaderBackground(currentScrollY > 30)\n\n if (delta > 0) {\n // \u5411\u4E0B\u6EDA\u52A8\n upwardDistance = 0 // \u91CD\u7F6E\u5411\u4E0A\u7D2F\u8BA1\n downwardDistance += delta\n\n if (downwardDistance >= 300 && currentScrollY > 300) {\n setHeaderHidden(true)\n }\n } else if (delta < 0) {\n // \u5411\u4E0A\u6EDA\u52A8\n downwardDistance = 0 // \u91CD\u7F6E\u5411\u4E0B\u7D2F\u8BA1\n upwardDistance += Math.abs(delta)\n\n if (upwardDistance >= 300) {\n setHeaderHidden(false)\n upwardDistance = 0\n }\n }\n\n lastScrollY = currentScrollY\n }, 100)\n\n window.addEventListener('scroll', handleScroll, { passive: true })\n return () => window.removeEventListener('scroll', handleScroll)\n }, [isTop])\n\n useEffect(() => {\n if (event) {\n event.search = () => setSearchOpen(true)\n }\n }, [event])\n\n useGSAP(() => {\n if (searchRef?.current && searchOpen) {\n gsap.fromTo(\n searchRef.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n duration: 0.3,\n }\n )\n }\n }, [searchOpen])\n\n useScrollLock(searchOpen)\n\n const searchPage = useMemo(() => {\n return (\n header?.bar?.actions?.find((item: any) => item?.blockType === HeaderNavigationActionBlockType.Search)\n ?.searchBar?.[0] || {}\n )\n }, [header])\n\n return (\n <NavProvider\n buildProps={buildProps}\n profile={profile}\n isMobile={isMobile}\n event={event}\n payloadData={header}\n onSidebarNavClick={onSidebarNavClick}\n onSeriesProductClick={onSeriesProductClick}\n cartCount={cartCount}\n >\n <header\n {...rest}\n id={headerId || 'header'}\n data-ui-component-id=\"HeaderNavigation\"\n className={\n isTop\n ? 'relative z-[100] bg-white'\n : cn('sticky top-0 z-[100] transition-transform duration-500 ease-in-out', {\n ['translate-y-[-100%]']: headerHidden,\n })\n }\n // className=\"relative z-[100] bg-white\"\n ref={headerRef}\n >\n <div\n className={cn(\n 'hover:bg-white hover:text-black',\n theme === 'light' ? 'text-black' : 'text-white',\n {\n ['!bg-white transition-all duration-500 ease-in-out']: !isTop && changeHeaderBackground,\n },\n {\n ['hover:!text-black']: theme === 'dark',\n ['!text-black']: !isTop && changeHeaderBackground,\n }\n )}\n onClick={() => !isTop && setChangeHeaderBackground(true)}\n >\n <DesktopNavigation\n data={header}\n className=\"desktop:block hidden !bg-white\"\n theme={theme}\n onNavItemClick={() => !isTop && setChangeHeaderBackground(true)}\n onPrimaryNavClick={onPrimaryNavClick}\n />\n <MobileNavigation\n menuData={menuData}\n data={header}\n className=\"desktop:hidden block !bg-white\"\n onPrimaryNavClick={onPrimaryNavClick}\n />\n {searchOpen && (\n <div\n className=\"absolute left-0 top-0 z-[60] flex w-full flex-col bg-black/70\"\n style={{ height: `calc(100dvh - ${headerRef?.current?.getBoundingClientRect()?.top}px)` }}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Search\"\n >\n <div ref={searchRef} className={cn('overflow-y-auto', {})}>\n <NavigationSearch\n data={searchPage}\n keywords={keywords}\n isSearching={isSearching}\n searchResult={searchResult}\n onSearch={(value: string) => {\n onSearch?.(value)\n }}\n onClose={() => {\n onSearch?.()\n setSearchOpen(false)\n }}\n />\n </div>\n <div\n className=\"flex-1 bg-transparent\"\n onClick={() => setSearchOpen(false)}\n role=\"button\"\n tabIndex={0}\n aria-label=\"Close search\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape') {\n e.preventDefault()\n setSearchOpen(false)\n }\n }}\n />\n </div>\n )}\n </div>\n </header>\n </NavProvider>\n )\n})\n\nconst DesktopNavigation = forwardRef<HTMLDivElement, DesktopNavigationProps>((props, ref) => {\n const { data, onNavItemClick, className, theme, onPrimaryNavClick } = props\n const { event, profile } = useNavContext()\n const [downdownHover, setDowndownHover] = useState(false)\n const { locale = 'us' } = useAiuiContext()\n\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories?.filter((item: any) => item?.pcShow)) as any[][]\n }, [data])\n\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n const [navStatusArray, setNavStatusArray] = useState<{ index: number; groupIndex: number; open: boolean }[][]>([])\n const profileRef = useRef<HTMLButtonElement>(null)\n const [userProfileOpen, setUserProfileOpen] = useState(false)\n const headerRef = useRef<HTMLDivElement>(null)\n const dropdownRef = useRef<HTMLDivElement>(null)\n const navItemRefs = useRef<HTMLDivElement[][]>(\n groupCategories.map((categories: any) => Array(categories?.length || 0).fill(null))\n )\n\n useEffect(() => {\n if (groupCategories?.length) {\n setNavStatusArray(\n groupCategories?.map((groupItem: any, groupIndex: number) => {\n return groupItem?.map((_: any, index: number) => ({ groupIndex, index, open: false }))\n })\n )\n }\n }, [groupCategories])\n\n const currentNavItem = useMemo(() => {\n let currentNavItem: { index: number; groupIndex: number; open: boolean } | null = null\n for (const groupItem of navStatusArray) {\n for (const item of groupItem) {\n if (item.open) {\n currentNavItem = item\n break\n }\n }\n if (currentNavItem) break\n }\n return currentNavItem\n }, [navStatusArray])\n\n useScrollLock(!!currentNavItem?.open || userProfileOpen)\n\n const handleNavItemClick = (e: any, groupIndex: number, index: number) => {\n setUserProfileOpen(false)\n // if (categoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n const currentCategoriesItem = groupCategories[groupIndex][index]\n if (currentCategoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n // link\u6A21\u5757\u7279\u6B8A\u5904\u7406\n // categoriesItem?.components?.[0]?.url && window.open(categoriesItem?.components?.[0]?.url)\n currentCategoriesItem?.components?.[0]?.url && window.open(currentCategoriesItem?.components?.[0]?.url)\n } else {\n const categories = groupCategories?.flat() || []\n const position = categories?.findIndex(item => item?.id === groupCategories[groupIndex][index]?.id)\n e.stopPropagation()\n onNavItemClick?.()\n onPrimaryNavClick?.(categories[position], position)\n // setCategoriesItem(groupCategories[groupIndex][index])\n setCategoriesItem(currentCategoriesItem)\n setNavStatusArray(prev =>\n prev.map(groupItem =>\n groupItem.map(item =>\n item.groupIndex === groupIndex && item.index === index\n ? { ...item, open: !item.open }\n : { ...item, open: false }\n )\n )\n )\n }\n }\n\n const handleNavItemKeyDown = (e: React.KeyboardEvent, groupIndex: number, index: number) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n handleNavItemClick(e, groupIndex, index)\n } else if (e.key === 'Escape' && currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index) {\n e.preventDefault()\n handleNavMenuClose()\n }\n }\n\n const handleNavMenuClose = () => {\n setNavStatusArray(prev => prev.map(groupItem => groupItem.map(item => ({ ...item, open: false }))))\n }\n\n const currentBlockTypeCategories = useMemo(() => {\n if (categoriesItem) return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const SidebarDropdownComp = WithSidebar(SidebarDropdown, categoriesItem)\n const ResourceSidebarDropdownComp = WithResource(ResourceSidebarDropdown, categoriesItem)\n const MulticolDropdownComp = WithMulticol(MulticolDropdown, categoriesItem)\n const SupportsDropdownComp = WithSupports(SupportsDropdown, {\n categoriesItem,\n currentNavItemRef: navItemRefs.current?.[currentNavItem?.groupIndex || 0]?.[currentNavItem?.index || 0],\n })\n\n const DropdownComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <SidebarDropdownComp />\n case HeaderNavigationBlockType.Resource:\n return <ResourceSidebarDropdownComp />\n case HeaderNavigationBlockType.Supports:\n return <SupportsDropdownComp />\n case HeaderNavigationBlockType.Multicol:\n return <MulticolDropdownComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, categoriesItem])\n\n const actions = useMemo(() => {\n return data?.bar?.actions?.filter((item: any) => item?.pcShow)\n }, [data])\n\n const profileAction = useMemo(() => {\n return actions?.find((item: any) => item?.blockType === HeaderNavigationActionBlockType.Profile)\n }, [actions])\n\n const handleProfileClick = useCallback(() => {\n setUserProfileOpen(prev => !prev)\n }, [])\n\n useEffect(() => {\n if (profileRef?.current) {\n const profileRefElement = profileRef.current as HTMLButtonElement\n profileRefElement.addEventListener('click', handleProfileClick)\n\n return () => {\n profileRefElement.removeEventListener('click', handleProfileClick)\n }\n }\n }, [handleProfileClick])\n\n useGSAP(() => {\n if (currentNavItem?.open) {\n gsap.fromTo(\n dropdownRef?.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n }\n )\n }\n }, [currentNavItem?.open])\n\n return (\n <Container className={cn('relative h-[96px]', className)}>\n <div ref={headerRef} onClick={handleNavMenuClose} className=\"flex h-full flex-col justify-end gap-4\">\n <div className=\"flex items-center justify-between\">\n <Logo />\n <Actions ref={profileRef} actions={actions} activeStatus={userProfileOpen} />\n </div>\n <nav className=\"flex justify-between\" role=\"navigation\" aria-label=\"Primary navigation\">\n {groupCategories?.map((groupItem: any, groupIndex: number) => {\n return (\n <div key={`groupCategory-${groupIndex}`} className=\"flex gap-3\">\n {groupItem?.map((item: any, index: number) => {\n const isExpanded = currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index\n return (\n <div\n key={item.id}\n ref={(el: HTMLDivElement) => {\n navItemRefs.current[groupIndex][index] = el\n }}\n className=\"group\"\n >\n <div className=\"relative\">\n <button\n className=\"flex cursor-pointer items-center gap-1 border-0 bg-transparent pb-4\"\n onClick={e => handleNavItemClick(e, groupIndex, index)}\n onKeyDown={e => handleNavItemKeyDown(e, groupIndex, index)}\n aria-expanded={isExpanded}\n aria-haspopup=\"true\"\n aria-label={item.text}\n >\n <Text html={item.text} className=\"text-sm font-bold leading-[1.4]\" />\n {/* <DownArrow\n aria-hidden=\"true\"\n className={cn('size-4 opacity-0 transition-opacity duration-500 group-hover:opacity-100', {\n ['rotate-180']: isExpanded,\n ['opacity-100']: downdownHover && isExpanded,\n })}\n /> */}\n <DownArrow\n className={cn('size-4 opacity-0 transition-opacity duration-500 group-hover:opacity-100', {\n ['rotate-180']:\n currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index,\n ['opacity-100']:\n downdownHover &&\n currentNavItem?.groupIndex === groupIndex &&\n currentNavItem?.index === index,\n ['invisible']:\n !item?.components?.length ||\n item?.components?.[0]?.blockType === HeaderNavigationBlockType.Links,\n })}\n />\n </button>\n <div\n className={cn(\n 'absolute bottom-0 left-0 h-[2px] w-0 transition-all duration-500',\n {\n 'w-[calc(100%-20px)]': isExpanded,\n },\n theme === 'dark' ? 'bg-white' : 'bg-[#080A0F]'\n )}\n aria-hidden=\"true\"\n />\n </div>\n </div>\n )\n })}\n </div>\n )\n })}\n </nav>\n </div>\n <div\n role=\"menu\"\n aria-hidden={!(currentNavItem?.open && categoriesItem)}\n className={cn(\n 'absolute left-0 top-full z-[999] flex w-full flex-col overflow-hidden border-t border-b-[#E4E5E6] bg-black/70 text-black',\n {\n hidden: !(currentNavItem?.open && categoriesItem),\n }\n )}\n onMouseEnter={() => setDowndownHover(true)}\n onMouseLeave={() => setDowndownHover(false)}\n style={{ height: `calc(100dvh - ${headerRef?.current?.getBoundingClientRect()?.bottom}px)` }}\n >\n <div\n ref={dropdownRef}\n className={cn('relative z-50', {\n 'overflow-hidden': currentBlockTypeCategories !== HeaderNavigationBlockType.Supports,\n })}\n >\n {DropdownComp}\n </div>\n <div\n className=\"flex-1 bg-transparent\"\n onClick={handleNavMenuClose}\n role=\"button\"\n tabIndex={0}\n aria-label=\"Close menu\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape') {\n e.preventDefault()\n handleNavMenuClose()\n }\n }}\n />\n </div>\n {userProfileOpen && (\n <div\n className=\"absolute left-0 top-full z-[999] flex h-dvh w-full bg-black/70\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"User profile menu\"\n // style={{\n // height: `calc(100dvh - ${profileRef?.current?.getBoundingClientRect()?.bottom}px)`,\n // top: `calc(96px)`,\n // }}\n >\n <div\n className=\"rounded-box absolute w-[272px] overflow-hidden bg-white p-4\"\n style={{\n right: `calc(100% - ${profileRef?.current?.getBoundingClientRect()?.right}px)`,\n top: '-36px',\n }}\n >\n {profile?.email ? (\n <>\n <Text html={profile?.nick_name || profileAction?.welcome} className=\"text-sm font-bold\" />\n <div className=\"mt-2 h-px bg-[#D9D9D9]\" aria-hidden=\"true\" />\n <nav className=\"mt-2\" role=\"navigation\" aria-label=\"Profile navigation\">\n {profileAction?.profiles?.map((item: any) => (\n <MenuItem\n className=\"py-2\"\n key={item.id}\n label={item?.title}\n href={getLocalizedPath(item?.url, locale)}\n />\n ))}\n </nav>\n </>\n ) : (\n <>\n <Polygon className=\"absolute -top-2 right-[46px] z-30 text-white\" aria-hidden=\"true\" />\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-2 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture\n source={item.benefitIcon?.url}\n className=\"size-4\"\n alt={item.benefit}\n width={16}\n height={16}\n />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n <div className=\"mt-4 flex items-center gap-2\">\n <Button variant=\"secondary\" size=\"lg\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"font-bold\" />\n </Button>\n <Button variant=\"primary\" size=\"lg\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"font-bold\" />\n </Button>\n </div>\n </>\n )}\n </div>\n <div\n className=\"flex-1 bg-transparent\"\n onClick={() => setUserProfileOpen(false)}\n role=\"button\"\n tabIndex={0}\n aria-label=\"Close profile menu\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape') {\n e.preventDefault()\n setUserProfileOpen(false)\n }\n }}\n />\n </div>\n )}\n </Container>\n )\n})\n\nconst MobileNavigation = forwardRef<HTMLDivElement, MobileNavigationProps>(\n ({ data, menuData, className, onPrimaryNavClick }, ref) => {\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories?.filter((item: any) => item?.mobileShow))\n }, [data])\n\n const { currentMenu, setCurrentMenu, subSubCategory } = useNavContext()\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n const [menuInnerHeight, setMenuInnerHeight] = useState(0)\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n\n const mobileMenuRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (mobileMenuRef?.current && mobileMenuOpen) {\n const rect = mobileMenuRef?.current?.getBoundingClientRect()\n setMenuInnerHeight(window?.innerHeight - (rect?.bottom || 0))\n }\n }, [mobileMenuOpen])\n\n useGSAP(() => {\n gsap.fromTo(\n mobileMenuRef.current,\n {\n height: 0,\n },\n {\n height: menuInnerHeight,\n duration: 0.3,\n }\n )\n }, [menuInnerHeight])\n\n useScrollLock(mobileMenuOpen)\n\n const currentBlockTypeCategories = useMemo(() => {\n return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const MobileSupportMenuComp = WithSupports(MobileSupportMenu, {\n categoriesItem,\n })\n\n const MobileSidebarMenuComp = WithSidebar(MobileSidebarMenu, categoriesItem)\n const MobileResourceSidebarMenuComp = WithResource(MobileResourceSidebarMenu, categoriesItem)\n const MobileMulticolMenuComp = WithMulticol(MobileMulticolMenu, categoriesItem)\n\n const MobileCategoriesMenuComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <MobileSidebarMenuComp />\n case HeaderNavigationBlockType.Resource:\n return <MobileResourceSidebarMenuComp />\n case HeaderNavigationBlockType.Supports:\n return <MobileSupportMenuComp />\n case HeaderNavigationBlockType.Multicol:\n return <MobileMulticolMenuComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, categoriesItem, MobileSupportMenuComp])\n\n const handleSecondaryMenuClose = useCallback(() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n setCurrentMenu && setCurrentMenu(HeaderNavigationMenu.Primary)\n }, [setMobileMenuOpen, setMenuInnerHeight, setCurrentMenu])\n\n const menuActions = useMemo(() => {\n return data?.bar?.actions?.filter(\n (item: any) => item?.mobileShow && item?.blockType !== HeaderNavigationActionBlockType.Profile // \u79FB\u52A8\u7AEF\u4E0D\u663E\u793Aprofile\u6309\u94AE\n )\n }, [data])\n\n const profileAction = useMemo(() => {\n return (\n data?.bar?.actions?.find(\n (item: any) => item?.mobileShow && item?.blockType === HeaderNavigationActionBlockType.Profile\n ) || {}\n )\n }, [data])\n\n const MobileCategoriesHeaderComp = useMemo(() => {\n switch (currentMenu) {\n case HeaderNavigationMenu.Primary:\n return (\n <PrimaryHeader\n actions={menuActions}\n menuOpen={mobileMenuOpen}\n onMenuOpenClose={() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n }}\n onMenuOpenClick={() => setMobileMenuOpen(true)}\n />\n )\n case HeaderNavigationMenu.Secondary:\n return (\n <SecondaryHeader\n title={categoriesItem?.text}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Primary)}\n />\n )\n case HeaderNavigationMenu.Third:\n return (\n <SecondaryHeader\n title={subSubCategory?.label}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Secondary)}\n />\n )\n default:\n return null\n }\n }, [\n mobileMenuOpen,\n currentMenu,\n setCurrentMenu,\n categoriesItem,\n menuActions,\n subSubCategory,\n handleSecondaryMenuClose,\n ])\n\n const handlePrimaryMenuClick = useCallback(\n (groupIndex: number, index: number) => {\n const categoriesItem = Array.isArray(groupCategories)\n ? Array.isArray(groupCategories[groupIndex])\n ? // @ts-ignore\n groupCategories[groupIndex][index]\n : {}\n : {}\n setCategoriesItem(categoriesItem)\n if (categoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n // link\u6A21\u5757\u7279\u6B8A\u5904\u7406\n categoriesItem?.components?.[0]?.url && window.open(categoriesItem?.components?.[0]?.url)\n } else {\n setCurrentMenu?.(HeaderNavigationMenu.Secondary)\n }\n },\n [groupCategories, setCurrentMenu]\n )\n\n return (\n <Container className={cn('relative h-[52px]', className)}>\n {/* \u79FB\u52A8\u7AEF\u5206\u7C7B\u83DC\u5355 */}\n {MobileCategoriesHeaderComp}\n {mobileMenuOpen && (\n <nav\n ref={mobileMenuRef}\n className=\"absolute left-0 top-full z-[999] w-full overflow-y-auto border-t border-[#E4E5E6] bg-white text-black\"\n style={{ height: menuInnerHeight }}\n role=\"navigation\"\n aria-label=\"Mobile navigation menu\"\n >\n {currentMenu === HeaderNavigationMenu.Primary && menuData ? (\n <div className=\"pt-4\">\n <BrandStrip data={menuData} />\n </div>\n ) : null}\n {currentMenu === HeaderNavigationMenu.Primary ? (\n <MobilePrimaryMenu\n categories={groupCategories}\n onPrimaryMenuClick={handlePrimaryMenuClick}\n onPrimaryNavClick={onPrimaryNavClick}\n profileAction={profileAction}\n />\n ) : (\n MobileCategoriesMenuComp\n )}\n </nav>\n )}\n </Container>\n )\n }\n)\n\n/**\n * \u79FB\u52A8\u7AEF\u4E00\u7EA7\u83DC\u5355\n * @param categories \u5206\u7C7B\n * @param onPrimaryMenuClick \u4E00\u7EA7\u83DC\u5355\u70B9\u51FB\n */\nconst MobilePrimaryMenu = ({\n categories,\n onPrimaryMenuClick,\n profileAction,\n onPrimaryNavClick,\n}: {\n categories: any\n onPrimaryMenuClick: (groupIndex: number, index: number) => void\n profileAction: any\n onPrimaryNavClick?: (category: any, position: number) => void\n}) => {\n return (\n <div className=\"flex h-full flex-col justify-between\">\n <div className=\"tablet:px-8 laptop:px-16 p-4\">\n {categories?.map((groupItem: any, groupIndex: number) => (\n <div key={`groupCategory-${groupIndex}`} className=\"\">\n <div className={cn('my-2 h-px w-full bg-[#E5E5E7]')} />\n {groupItem?.map((item: any, index: number) => (\n <MenuItem\n key={item.id}\n label={item.text}\n onClick={() => {\n const flatCategories = categories?.flat() || []\n const position = flatCategories?.findIndex(\n (item: any) => item?.id === categories[groupIndex][index]?.id\n )\n onPrimaryMenuClick(groupIndex, index)\n onPrimaryNavClick?.(item, position)\n }}\n icon={item.components?.[0]?.icon}\n />\n ))}\n </div>\n ))}\n </div>\n <ProfileComp profileAction={profileAction} />\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEF\u4FA7\u8FB9\u680F\u4E0B\u62C9\n * @param sidebarCategoriesMetadata \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n * @param seriesMetadata \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n */\nconst ProfileComp = ({ profileAction }: { profileAction: any }) => {\n const [profileOpen, setProfileOpen] = useState(false)\n const { profile, event } = useNavContext()\n const { locale = 'us' } = useAiuiContext()\n return (\n <div\n className={cn('tablet:px-8 laptop:px-16 bg-[#F5F5F7] px-4 py-6', {\n 'p-4': profileOpen,\n })}\n >\n <button\n className=\"flex w-full cursor-pointer items-center justify-between border-0 bg-transparent\"\n onClick={() => setProfileOpen(!profileOpen)}\n aria-expanded={profileOpen}\n aria-label={profile?.nick_name || profileAction?.welcome}\n >\n <div className=\"flex items-center gap-[14px]\">\n <div className=\"flex size-[40px] shrink-0 items-center justify-center rounded-full bg-white\">\n <User aria-hidden=\"true\" />\n </div>\n <Text html={profile?.nick_name || profileAction?.welcome} className=\"text-base font-bold leading-[1.4]\" />\n </div>\n {!profile?.email && (\n <DownArrow aria-hidden=\"true\" className={cn('laptop:size-4 size-5', { 'rotate-180': profileOpen })} />\n )}\n </button>\n {profile?.email && (\n <nav className=\"mt-4\" role=\"navigation\" aria-label=\"Profile menu\">\n {profileAction?.profiles?.map((item: any) => (\n <MenuItem key={item.id} label={item?.title} href={getLocalizedPath(item?.url, locale)} />\n ))}\n </nav>\n )}\n {profileOpen && !profile?.email && (\n <div className=\"mt-4\">\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-2 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture source={item.benefitIcon?.url} className=\"size-4\" alt={item.benefit} width={16} height={16} />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n </div>\n )}\n {!profile?.email && (\n <div className=\"mt-4 flex items-center gap-3\">\n <Button className=\"tablet:flex-none flex-1\" variant=\"secondary\" size=\"base\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n <Button className=\"tablet:flex-none flex-1\" variant=\"primary\" size=\"base\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n </div>\n )}\n </div>\n )\n}\n\nconst PrimaryHeader = ({ menuOpen, onMenuOpenClose, onMenuOpenClick, actions }: MobilePrimaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center justify-between gap-4\">\n <Logo />\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n <Actions actions={actions} />\n {menuOpen ? (\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuOpenClose()}\n aria-label=\"Close menu\"\n aria-expanded=\"true\"\n >\n <Close className=\"size-5\" aria-hidden=\"true\" />\n </button>\n ) : (\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuOpenClick()}\n aria-label=\"Open menu\"\n aria-expanded=\"false\"\n aria-haspopup=\"true\"\n >\n <Menu className=\"size-5\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n </div>\n )\n}\n\nconst Logo = () => {\n const { payloadData, isMobile } = useNavContext()\n const { locale = 'us' } = useAiuiContext()\n return (\n <a\n href={getLocalizedPath('/', locale)}\n className=\"hover:text-brand-0 [&>svg]:w-full\"\n aria-label=\"Home\"\n dangerouslySetInnerHTML={{\n __html: isMobile ? payloadData?.bar?.mobileLogo : payloadData?.bar?.desktopLogo,\n }}\n />\n )\n}\n\nconst Actions = forwardRef<HTMLButtonElement, { actions: any; activeStatus?: boolean }>(\n ({ actions, activeStatus = false }, ref) => {\n const { event, cartCount } = useNavContext()\n const [activeAction, setActiveAction] = useState<any>(null)\n\n const getActionLabel = (blockType: string) => {\n switch (blockType) {\n case HeaderNavigationActionBlockType.Search:\n return 'Search'\n case HeaderNavigationActionBlockType.Cart:\n return `Shopping cart${cartCount > 0 ? ` (${cartCount} items)` : ''}`\n case HeaderNavigationActionBlockType.Profile:\n return 'User profile'\n case HeaderNavigationActionBlockType.Livestream:\n return 'Livestream'\n default:\n return 'Action'\n }\n }\n\n const handleActionClick = useCallback(\n (action: any, index: number) => {\n setActiveAction(index)\n switch (action?.blockType) {\n case HeaderNavigationActionBlockType.Search:\n event?.search?.()\n break\n case HeaderNavigationActionBlockType.Cart:\n event?.cart?.()\n break\n case HeaderNavigationActionBlockType.Profile:\n event?.profile?.()\n break\n case HeaderNavigationActionBlockType.Livestream:\n event?.livestream?.()\n break\n default:\n return () => {}\n }\n },\n [event]\n )\n\n return (\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n {Array.isArray(actions) &&\n actions?.map((action: any, index: number) => (\n <button\n className=\"relative cursor-pointer border-0 bg-transparent p-0\"\n key={action.id}\n ref={action.blockType === HeaderNavigationActionBlockType.Profile ? ref : null}\n onClick={() => handleActionClick(action, index)}\n aria-label={getActionLabel(action.blockType)}\n aria-pressed={activeStatus && activeAction === index}\n >\n <Text\n html={action.icon}\n className={cn('size-5', { 'text-brand-0': activeStatus && activeAction === index })}\n aria-hidden=\"true\"\n />\n {action.blockType === HeaderNavigationActionBlockType.Cart && cartCount > 0 && (\n <div\n className=\"bg-brand-0 absolute right-[-12px] top-[calc(100%-16px)] z-[1] flex min-h-5 min-w-5 items-center justify-center rounded-full px-[2px]\"\n aria-hidden=\"true\"\n >\n <Text html={cartCount?.toString()} className=\"text-sm font-bold leading-[1.2] text-white\" />\n </div>\n )}\n </button>\n ))}\n </div>\n )\n }\n)\n\nconst SecondaryHeader = ({ title, onMenuOpenClose, onMenuBackClick }: MobileSecondaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center gap-3\">\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuBackClick()}\n aria-label=\"Back to previous menu\"\n >\n <LeftArrow className=\"size-5\" aria-hidden=\"true\" />\n </button>\n <Text html={title} className=\"flex-1 text-center text-base font-bold leading-[1.4]\" />\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuOpenClose()}\n aria-label=\"Close menu\"\n >\n <Close className=\"size-5\" aria-hidden=\"true\" />\n </button>\n </div>\n )\n}\n\nMobileNavigation.displayName = 'MobileNavigation'\nActions.displayName = 'Actions'\nHeaderNavigation.displayName = 'HeaderNavigation'\nDesktopNavigation.displayName = 'DesktopNavigation'\n\nexport default withLayout(HeaderNavigation)\n"],
5
- "mappings": "aAyNU,OA8UI,YAAAA,GA9UJ,OAAAC,EAcE,QAAAC,MAdF,oBAxNV,OAAgB,cAAAC,GAAY,eAAAC,GAAa,aAAAC,EAAW,uBAAAC,GAAqB,WAAAC,EAAS,UAAAC,EAAQ,YAAAC,MAAgB,QAE1G,OAAS,WAAAC,GAAS,QAAAC,EAAM,UAAAC,GAAQ,aAAAC,GAAW,cAAAC,OAAkB,4BAE7D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AA,EAACU,EAAA,CAAK,KAAMwD,GAAW,SAAS,EAAG,UAAU,6CAA6C,EAC5F,IAjBG0G,EAAO,EAmBd,CACD,EACL,CAEJ,CACF,EAEMjB,GAAkB,CAAC,CAAE,MAAAkB,EAAO,gBAAAV,EAAiB,gBAAAW,CAAgB,IAE/D7K,EAAC,OAAI,UAAU,iCACb,UAAAD,EAAC,UACC,UAAU,6CACV,QAAS,IAAM8K,EAAgB,EAC/B,aAAW,wBAEX,SAAA9K,EAACiC,GAAA,CAAU,UAAU,SAAS,cAAY,OAAO,EACnD,EACAjC,EAACU,EAAA,CAAK,KAAMmK,EAAO,UAAU,uDAAuD,EACpF7K,EAAC,UACC,UAAU,6CACV,QAAS,IAAMmK,EAAgB,EAC/B,aAAW,aAEX,SAAAnK,EAAC+B,GAAA,CAAM,UAAU,SAAS,cAAY,OAAO,EAC/C,GACF,EAIJ6D,GAAiB,YAAc,mBAC/B0C,GAAQ,YAAc,UACtBrF,GAAiB,YAAc,mBAC/B0C,GAAkB,YAAc,oBAEhC,IAAOoF,GAAQjK,GAAWmC,EAAgB",
6
- "names": ["Fragment", "jsx", "jsxs", "forwardRef", "useCallback", "useEffect", "useImperativeHandle", "useMemo", "useRef", "useState", "Picture", "Text", "Button", "Container", "BrandStrip", "withLayout", "cn", "getLocalizedPath", "NavProvider", "useNavContext", "HeaderNavigationMenu", "HeaderNavigationBlockType", "HeaderNavigationActionBlockType", "jump", "useGSAP", "gsap", "WithSidebar", "WithSupports", "WithMulticol", "WithGroupCategory", "WithResource", "Menu", "Close", "User", "LeftArrow", "DownArrow", "Polygon", "NavigationSearch", "ResourceSidebarDropdown", "MobileResourceSidebarMenu", "SidebarDropdown", "useScrollLock", "MulticolDropdown", "SupportsDropdown", "MobileSidebarMenu", "MobileSupportMenu", "MobileMulticolMenu", "MenuItem", "useAiuiContext", "throttle", "HeaderNavigation", "props", "ref", "header", "buildProps", "event", "profile", "theme", "isTop", "searchResult", "onSearch", "isSearching", "keywords", "onPrimaryNavClick", "onSeriesProductClick", "onSidebarNavClick", "headerId", "cartCount", "menuData", "rest", "searchOpen", "setSearchOpen", "headerHidden", "setHeaderHidden", "changeHeaderBackground", "setChangeHeaderBackground", "isMobile", "setIsMobile", "searchRef", "headerRef", "resizeWindow", "offsetWidth", "lastScrollY", "upwardDistance", "downwardDistance", "getScrollTop", "initialScrollTop", "handleScroll", "currentScrollY", "delta", "searchPage", "item", "DesktopNavigation", "MobileNavigation", "value", "e", "data", "onNavItemClick", "className", "downdownHover", "setDowndownHover", "locale", "groupCategories", "categoriesItem", "setCategoriesItem", "navStatusArray", "setNavStatusArray", "profileRef", "userProfileOpen", "setUserProfileOpen", "dropdownRef", "navItemRefs", "categories", "groupItem", "groupIndex", "_", "index", "currentNavItem", "handleNavItemClick", "currentCategoriesItem", "position", "prev", "handleNavItemKeyDown", "handleNavMenuClose", "currentBlockTypeCategories", "SidebarDropdownComp", "ResourceSidebarDropdownComp", "MulticolDropdownComp", "SupportsDropdownComp", "DropdownComp", "actions", "profileAction", "handleProfileClick", "profileRefElement", "Logo", "Actions", "isExpanded", "el", "currentMenu", "setCurrentMenu", "subSubCategory", "mobileMenuOpen", "setMobileMenuOpen", "menuInnerHeight", "setMenuInnerHeight", "mobileMenuRef", "rect", "MobileSupportMenuComp", "MobileSidebarMenuComp", "MobileResourceSidebarMenuComp", "MobileMulticolMenuComp", "MobileCategoriesMenuComp", "handleSecondaryMenuClose", "menuActions", "MobileCategoriesHeaderComp", "PrimaryHeader", "SecondaryHeader", "handlePrimaryMenuClick", "MobilePrimaryMenu", "onPrimaryMenuClick", "ProfileComp", "profileOpen", "setProfileOpen", "menuOpen", "onMenuOpenClose", "onMenuOpenClick", "payloadData", "activeStatus", "activeAction", "setActiveAction", "getActionLabel", "blockType", "handleActionClick", "action", "title", "onMenuBackClick", "HeaderNavigation_default"]
4
+ "sourcesContent": ["'use client'\nimport React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'\n\nimport { Picture, Text, Button, Container, BrandStrip } from '../../components/index.js'\n\nimport { withLayout } from '../../shared/Styles.js'\n\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\n\nimport type {\n MobilePrimaryNavigationData,\n MobileSecondaryNavigationData,\n MobileNavigationProps,\n DesktopNavigationProps,\n HeaderNavigationProps,\n} from './types.js'\nimport NavProvider, { useNavContext } from './NavProvider.js'\n\nimport { HeaderNavigationMenu, HeaderNavigationBlockType, HeaderNavigationActionBlockType } from './types.js'\nimport type { HeaderNavigationSearchStyle } from './types.js'\n\nimport jump from 'jump.js'\n\nimport { useGSAP } from '@gsap/react'\nimport { gsap } from 'gsap'\n\nimport {\n WithSidebar,\n WithSupports,\n WithMulticol,\n WithGroupCategory,\n WithResource,\n WithTextLinks,\n} from './withCategory.js'\n\nimport { Menu, Close, User, LeftArrow, DownArrow, Polygon } from './icons/index.js'\n\nimport NavigationSearch from '../NavigationSearch/index.js'\nimport { ResourceSidebarDropdown } from './ResourceSidebarDropdown.js'\nimport { MobileResourceSidebarMenu } from './MobileResourceSidebarMenu.js'\nimport { SidebarDropdown } from './SidebarDropdown.js'\nimport { useScrollLock } from './useScrollLock.js'\nimport { MulticolDropdown } from './MulticolDropdown.js'\nimport { TextLinksDropdown } from './TextLinksDropdown.js'\nimport { SupportsDropdown } from './SupportsDropdown.js'\nimport { MobileSidebarMenu } from './MobileSidebarMenu.js'\nimport { MobileSupportMenu } from './MobileSupportMenu.js'\nimport { MobileMulticolMenu } from './MobileMulticolMenu.js'\nimport { MobileTextLinksMenu } from './MobileTextLinksMenu.js'\nimport { MenuItem } from './MobileMenuComponents.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\nimport throttle from '../../shared/throttle.js'\n\nconst HeaderNavigation = forwardRef<HTMLDivElement, HeaderNavigationProps>((props, ref) => {\n const {\n data: { header } = {},\n buildProps,\n event,\n profile,\n theme = 'light',\n isTop = false,\n searchResult,\n onSearch,\n isSearching,\n keywords,\n onPrimaryNavClick,\n onSeriesProductClick,\n onSidebarNavClick,\n headerId,\n cartCount,\n menuData,\n ...rest\n } = props\n\n const [searchOpen, setSearchOpen] = useState(false)\n const [headerHidden, setHeaderHidden] = useState(false)\n const [changeHeaderBackground, setChangeHeaderBackground] = useState(false)\n const [isMobile, setIsMobile] = useState(false)\n const searchRef = useRef<HTMLDivElement>(null)\n\n const headerRef = useRef<HTMLDivElement>(null)\n\n const resizeWindow = () => {\n const offsetWidth = document?.querySelector('body')?.offsetWidth || 0\n setIsMobile(offsetWidth <= 1440)\n }\n\n useEffect(() => {\n resizeWindow()\n window.addEventListener('resize', resizeWindow)\n return () => {\n window.removeEventListener('resize', resizeWindow)\n }\n }, [])\n\n useImperativeHandle(ref, () => headerRef.current as HTMLDivElement)\n\n useEffect(() => {\n if (headerRef.current && isTop) {\n jump(headerRef.current, { duration: 0, offset: headerRef.current?.getBoundingClientRect()?.bottom || 0 })\n }\n }, [isTop])\n\n useEffect(() => {\n // \u5982\u679C isTop \u4E3A true\uFF0C\u4E0D\u9700\u8981\u6EDA\u52A8\u76D1\u542C\u548C\u52A8\u6548\n if (isTop) {\n setHeaderHidden(false)\n setChangeHeaderBackground(false)\n return\n }\n\n let lastScrollY = 0\n let upwardDistance = 0\n let downwardDistance = 0\n\n const getScrollTop = () => {\n return document?.documentElement?.scrollTop || document?.body?.scrollTop || 0\n }\n\n // \u521D\u59CB\u5316\u72B6\u6001\n const initialScrollTop = getScrollTop()\n lastScrollY = initialScrollTop\n setHeaderHidden(initialScrollTop > 300)\n setChangeHeaderBackground(initialScrollTop > 30)\n\n const handleScroll = throttle(() => {\n const currentScrollY = getScrollTop()\n const delta = currentScrollY - lastScrollY\n\n // \u66F4\u65B0\u80CC\u666F\u72B6\u6001\n setChangeHeaderBackground(currentScrollY > 30)\n\n if (delta > 0) {\n // \u5411\u4E0B\u6EDA\u52A8\n upwardDistance = 0 // \u91CD\u7F6E\u5411\u4E0A\u7D2F\u8BA1\n downwardDistance += delta\n\n if (downwardDistance >= 300 && currentScrollY > 300) {\n setHeaderHidden(true)\n }\n } else if (delta < 0) {\n // \u5411\u4E0A\u6EDA\u52A8\n downwardDistance = 0 // \u91CD\u7F6E\u5411\u4E0B\u7D2F\u8BA1\n upwardDistance += Math.abs(delta)\n\n if (upwardDistance >= 300) {\n setHeaderHidden(false)\n upwardDistance = 0\n }\n }\n\n lastScrollY = currentScrollY\n }, 100)\n\n window.addEventListener('scroll', handleScroll, { passive: true })\n return () => window.removeEventListener('scroll', handleScroll)\n }, [isTop])\n\n useEffect(() => {\n if (event) {\n event.search = () => setSearchOpen(true)\n }\n }, [event])\n\n useGSAP(() => {\n if (searchRef?.current && searchOpen) {\n gsap.fromTo(\n searchRef.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n duration: 0.3,\n }\n )\n }\n }, [searchOpen])\n\n useScrollLock(searchOpen)\n\n const searchPage = useMemo(() => {\n return (\n header?.bar?.actions?.find((item: any) => item?.blockType === HeaderNavigationActionBlockType.Search)\n ?.searchBar?.[0] || {}\n )\n }, [header])\n\n return (\n <NavProvider\n buildProps={buildProps}\n profile={profile}\n isMobile={isMobile}\n event={event}\n payloadData={header}\n onSidebarNavClick={onSidebarNavClick}\n onSeriesProductClick={onSeriesProductClick}\n cartCount={cartCount}\n >\n <header\n {...rest}\n id={headerId || 'header'}\n data-ui-component-id=\"HeaderNavigation\"\n className={\n isTop\n ? 'relative z-[100] bg-white'\n : cn('sticky top-0 z-[100] transition-transform duration-500 ease-in-out', {\n ['translate-y-[-100%]']: headerHidden,\n })\n }\n // className=\"relative z-[100] bg-white\"\n ref={headerRef}\n >\n <div\n className={cn(\n 'hover:bg-white hover:text-black',\n theme === 'light' ? 'text-black' : 'text-white',\n {\n ['!bg-white transition-all duration-500 ease-in-out']: !isTop && changeHeaderBackground,\n },\n {\n ['hover:!text-black']: theme === 'dark',\n ['!text-black']: !isTop && changeHeaderBackground,\n }\n )}\n onClick={() => !isTop && setChangeHeaderBackground(true)}\n >\n <DesktopNavigation\n data={header}\n className=\"desktop:block hidden !bg-white\"\n theme={theme}\n onNavItemClick={() => !isTop && setChangeHeaderBackground(true)}\n onPrimaryNavClick={onPrimaryNavClick}\n />\n <MobileNavigation\n menuData={menuData}\n data={header}\n className=\"desktop:hidden block !bg-white\"\n onPrimaryNavClick={onPrimaryNavClick}\n />\n {searchOpen && (\n <div\n className=\"absolute left-0 top-0 z-[60] flex w-full flex-col bg-black/70\"\n style={{ height: `calc(100dvh - ${headerRef?.current?.getBoundingClientRect()?.top}px)` }}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Search\"\n >\n <div ref={searchRef} className={cn('overflow-y-auto', {})}>\n <NavigationSearch\n data={searchPage}\n keywords={keywords}\n isSearching={isSearching}\n searchResult={searchResult}\n onSearch={(value: string) => {\n onSearch?.(value)\n }}\n onClose={() => {\n onSearch?.()\n setSearchOpen(false)\n }}\n />\n </div>\n <div\n className=\"flex-1 bg-transparent\"\n onClick={() => setSearchOpen(false)}\n role=\"button\"\n tabIndex={0}\n aria-label=\"Close search\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape') {\n e.preventDefault()\n setSearchOpen(false)\n }\n }}\n />\n </div>\n )}\n </div>\n </header>\n </NavProvider>\n )\n})\n\nconst DesktopNavigation = forwardRef<HTMLDivElement, DesktopNavigationProps>((props, ref) => {\n const { data, onNavItemClick, className, theme, onPrimaryNavClick } = props\n const { event, profile } = useNavContext()\n const [downdownHover, setDowndownHover] = useState(false)\n const { locale = 'us' } = useAiuiContext()\n\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories?.filter((item: any) => item?.pcShow)) as any[][]\n }, [data])\n\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n const [navStatusArray, setNavStatusArray] = useState<{ index: number; groupIndex: number; open: boolean }[][]>([])\n const profileRef = useRef<HTMLButtonElement>(null)\n const [userProfileOpen, setUserProfileOpen] = useState(false)\n const headerRef = useRef<HTMLDivElement>(null)\n const dropdownRef = useRef<HTMLDivElement>(null)\n const navItemRefs = useRef<HTMLDivElement[][]>(\n groupCategories.map((categories: any) => Array(categories?.length || 0).fill(null))\n )\n\n useEffect(() => {\n if (groupCategories?.length) {\n setNavStatusArray(\n groupCategories?.map((groupItem: any, groupIndex: number) => {\n return groupItem?.map((_: any, index: number) => ({ groupIndex, index, open: false }))\n })\n )\n }\n }, [groupCategories])\n\n const currentNavItem = useMemo(() => {\n let currentNavItem: { index: number; groupIndex: number; open: boolean } | null = null\n for (const groupItem of navStatusArray) {\n for (const item of groupItem) {\n if (item.open) {\n currentNavItem = item\n break\n }\n }\n if (currentNavItem) break\n }\n return currentNavItem\n }, [navStatusArray])\n\n useScrollLock(!!currentNavItem?.open || userProfileOpen)\n\n const handleNavItemClick = (e: any, groupIndex: number, index: number) => {\n setUserProfileOpen(false)\n // if (categoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n const currentCategoriesItem = groupCategories[groupIndex][index]\n if (currentCategoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n // link\u6A21\u5757\u7279\u6B8A\u5904\u7406\n // categoriesItem?.components?.[0]?.url && window.open(categoriesItem?.components?.[0]?.url)\n currentCategoriesItem?.components?.[0]?.url && window.open(currentCategoriesItem?.components?.[0]?.url)\n } else {\n const categories = groupCategories?.flat() || []\n const position = categories?.findIndex(item => item?.id === groupCategories[groupIndex][index]?.id)\n e.stopPropagation()\n onNavItemClick?.()\n onPrimaryNavClick?.(categories[position], position)\n // setCategoriesItem(groupCategories[groupIndex][index])\n setCategoriesItem(currentCategoriesItem)\n setNavStatusArray(prev =>\n prev.map(groupItem =>\n groupItem.map(item =>\n item.groupIndex === groupIndex && item.index === index\n ? { ...item, open: !item.open }\n : { ...item, open: false }\n )\n )\n )\n }\n }\n\n const handleNavItemKeyDown = (e: React.KeyboardEvent, groupIndex: number, index: number) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault()\n handleNavItemClick(e, groupIndex, index)\n } else if (e.key === 'Escape' && currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index) {\n e.preventDefault()\n handleNavMenuClose()\n }\n }\n\n const handleNavMenuClose = () => {\n setNavStatusArray(prev => prev.map(groupItem => groupItem.map(item => ({ ...item, open: false }))))\n }\n\n const currentBlockTypeCategories = useMemo(() => {\n if (categoriesItem) return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const SidebarDropdownComp = WithSidebar(SidebarDropdown, categoriesItem)\n const ResourceSidebarDropdownComp = WithResource(ResourceSidebarDropdown, categoriesItem)\n const MulticolDropdownComp = WithMulticol(MulticolDropdown, categoriesItem)\n const TextLinksDropdownComp = WithTextLinks(TextLinksDropdown, categoriesItem)\n const SupportsDropdownComp = WithSupports(SupportsDropdown, {\n categoriesItem,\n currentNavItemRef: navItemRefs.current?.[currentNavItem?.groupIndex || 0]?.[currentNavItem?.index || 0],\n })\n\n const DropdownComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <SidebarDropdownComp />\n case HeaderNavigationBlockType.Resource:\n return <ResourceSidebarDropdownComp />\n case HeaderNavigationBlockType.Supports:\n return <SupportsDropdownComp />\n case HeaderNavigationBlockType.Multicol:\n return <MulticolDropdownComp />\n case HeaderNavigationBlockType.TextLinks:\n return <TextLinksDropdownComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, categoriesItem])\n\n const actions = useMemo(() => {\n return data?.bar?.actions?.filter((item: any) => item?.pcShow)\n }, [data])\n\n const profileAction = useMemo(() => {\n return actions?.find((item: any) => item?.blockType === HeaderNavigationActionBlockType.Profile)\n }, [actions])\n\n const handleProfileClick = useCallback(() => {\n setUserProfileOpen(prev => !prev)\n }, [])\n\n useEffect(() => {\n if (profileRef?.current) {\n const profileRefElement = profileRef.current as HTMLButtonElement\n profileRefElement.addEventListener('click', handleProfileClick)\n\n return () => {\n profileRefElement.removeEventListener('click', handleProfileClick)\n }\n }\n }, [handleProfileClick])\n\n useGSAP(() => {\n if (currentNavItem?.open) {\n gsap.fromTo(\n dropdownRef?.current,\n {\n height: 0,\n },\n {\n height: 'auto',\n }\n )\n }\n }, [currentNavItem?.open])\n\n return (\n <Container className={cn('relative h-[96px]', className)}>\n <div ref={headerRef} onClick={handleNavMenuClose} className=\"flex h-full flex-col justify-end gap-4\">\n <div className=\"flex items-center justify-between\">\n <Logo />\n <Actions ref={profileRef} actions={actions} activeStatus={userProfileOpen} />\n </div>\n <nav className=\"flex justify-between\" role=\"navigation\" aria-label=\"Primary navigation\">\n {groupCategories?.map((groupItem: any, groupIndex: number) => {\n return (\n <div key={`groupCategory-${groupIndex}`} className=\"flex gap-3\">\n {groupItem?.map((item: any, index: number) => {\n const isExpanded = currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index\n return (\n <div\n key={item.id}\n ref={(el: HTMLDivElement) => {\n navItemRefs.current[groupIndex][index] = el\n }}\n className=\"group\"\n >\n <div className=\"relative\">\n <button\n className=\"flex cursor-pointer items-center gap-1 border-0 bg-transparent pb-4\"\n onClick={e => handleNavItemClick(e, groupIndex, index)}\n onKeyDown={e => handleNavItemKeyDown(e, groupIndex, index)}\n aria-expanded={isExpanded}\n aria-haspopup=\"true\"\n aria-label={item.text}\n >\n <Text html={item.text} className=\"text-sm font-bold leading-[1.4]\" />\n {/* <DownArrow\n aria-hidden=\"true\"\n className={cn('size-4 opacity-0 transition-opacity duration-500 group-hover:opacity-100', {\n ['rotate-180']: isExpanded,\n ['opacity-100']: downdownHover && isExpanded,\n })}\n /> */}\n <DownArrow\n className={cn('size-4 opacity-0 transition-opacity duration-500 group-hover:opacity-100', {\n ['rotate-180']:\n currentNavItem?.groupIndex === groupIndex && currentNavItem?.index === index,\n ['opacity-100']:\n downdownHover &&\n currentNavItem?.groupIndex === groupIndex &&\n currentNavItem?.index === index,\n ['invisible']:\n !item?.components?.length ||\n item?.components?.[0]?.blockType === HeaderNavigationBlockType.Links,\n })}\n />\n </button>\n <div\n className={cn(\n 'absolute bottom-0 left-0 h-[2px] w-0 transition-all duration-500',\n {\n 'w-[calc(100%-20px)]': isExpanded,\n },\n theme === 'dark' ? 'bg-white' : 'bg-[#080A0F]'\n )}\n aria-hidden=\"true\"\n />\n </div>\n </div>\n )\n })}\n </div>\n )\n })}\n </nav>\n </div>\n <div\n role=\"menu\"\n aria-hidden={!(currentNavItem?.open && categoriesItem)}\n className={cn(\n 'absolute left-0 top-full z-[999] flex w-full flex-col overflow-hidden border-t border-b-[#E4E5E6] bg-black/70 text-black',\n {\n hidden: !(currentNavItem?.open && categoriesItem),\n }\n )}\n onMouseEnter={() => setDowndownHover(true)}\n onMouseLeave={() => setDowndownHover(false)}\n style={{ height: `calc(100dvh - ${headerRef?.current?.getBoundingClientRect()?.bottom}px)` }}\n >\n <div\n ref={dropdownRef}\n className={cn('relative z-50', {\n 'overflow-hidden': currentBlockTypeCategories !== HeaderNavigationBlockType.Supports,\n })}\n >\n {DropdownComp}\n </div>\n <div\n className=\"flex-1 bg-transparent\"\n onClick={handleNavMenuClose}\n role=\"button\"\n tabIndex={0}\n aria-label=\"Close menu\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape') {\n e.preventDefault()\n handleNavMenuClose()\n }\n }}\n />\n </div>\n {userProfileOpen && (\n <div\n className=\"absolute left-0 top-full z-[999] flex h-dvh w-full bg-black/70\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"User profile menu\"\n // style={{\n // height: `calc(100dvh - ${profileRef?.current?.getBoundingClientRect()?.bottom}px)`,\n // top: `calc(96px)`,\n // }}\n >\n <div\n className=\"rounded-box absolute w-[272px] overflow-hidden bg-white p-4\"\n style={{\n right: `calc(100% - ${profileRef?.current?.getBoundingClientRect()?.right}px)`,\n top: '-36px',\n }}\n >\n {profile?.email ? (\n <>\n <Text html={profile?.nick_name || profileAction?.welcome} className=\"text-sm font-bold\" />\n <div className=\"mt-2 h-px bg-[#D9D9D9]\" aria-hidden=\"true\" />\n <nav className=\"mt-2\" role=\"navigation\" aria-label=\"Profile navigation\">\n {profileAction?.profiles?.map((item: any) => (\n <MenuItem\n className=\"py-2\"\n key={item.id}\n label={item?.title}\n href={getLocalizedPath(item?.url, locale)}\n />\n ))}\n </nav>\n </>\n ) : (\n <>\n <Polygon className=\"absolute -top-2 right-[46px] z-30 text-white\" aria-hidden=\"true\" />\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-2 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture\n source={item.benefitIcon?.url}\n className=\"size-4\"\n alt={item.benefit}\n width={16}\n height={16}\n />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n <div className=\"mt-4 flex items-center gap-2\">\n <Button variant=\"secondary\" size=\"lg\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"font-bold\" />\n </Button>\n <Button variant=\"primary\" size=\"lg\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"font-bold\" />\n </Button>\n </div>\n </>\n )}\n </div>\n <div\n className=\"flex-1 bg-transparent\"\n onClick={() => setUserProfileOpen(false)}\n role=\"button\"\n tabIndex={0}\n aria-label=\"Close profile menu\"\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape') {\n e.preventDefault()\n setUserProfileOpen(false)\n }\n }}\n />\n </div>\n )}\n </Container>\n )\n})\n\nconst MobileNavigation = forwardRef<HTMLDivElement, MobileNavigationProps>(\n ({ data, menuData, className, onPrimaryNavClick }, ref) => {\n const groupCategories = useMemo(() => {\n return WithGroupCategory(data?.categories?.filter((item: any) => item?.mobileShow))\n }, [data])\n\n const { currentMenu, setCurrentMenu, subSubCategory } = useNavContext()\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n const [menuInnerHeight, setMenuInnerHeight] = useState(0)\n const [categoriesItem, setCategoriesItem] = useState<any>(null)\n\n const mobileMenuRef = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n if (mobileMenuRef?.current && mobileMenuOpen) {\n const rect = mobileMenuRef?.current?.getBoundingClientRect()\n setMenuInnerHeight(window?.innerHeight - (rect?.bottom || 0))\n }\n }, [mobileMenuOpen])\n\n useGSAP(() => {\n gsap.fromTo(\n mobileMenuRef.current,\n {\n height: 0,\n },\n {\n height: menuInnerHeight,\n duration: 0.3,\n }\n )\n }, [menuInnerHeight])\n\n useScrollLock(mobileMenuOpen)\n\n const currentBlockTypeCategories = useMemo(() => {\n return categoriesItem?.components?.[0]?.blockType\n }, [categoriesItem])\n\n const MobileSupportMenuComp = WithSupports(MobileSupportMenu, {\n categoriesItem,\n })\n\n const MobileSidebarMenuComp = WithSidebar(MobileSidebarMenu, categoriesItem)\n const MobileResourceSidebarMenuComp = WithResource(MobileResourceSidebarMenu, categoriesItem)\n const MobileMulticolMenuComp = WithMulticol(MobileMulticolMenu, categoriesItem)\n const MobileTextLinksMenuComp = WithTextLinks(MobileTextLinksMenu, categoriesItem)\n const MobileCategoriesMenuComp = useMemo(() => {\n switch (currentBlockTypeCategories) {\n case HeaderNavigationBlockType.Sidebar:\n return <MobileSidebarMenuComp />\n case HeaderNavigationBlockType.Resource:\n return <MobileResourceSidebarMenuComp />\n case HeaderNavigationBlockType.Supports:\n return <MobileSupportMenuComp />\n case HeaderNavigationBlockType.Multicol:\n return <MobileMulticolMenuComp />\n case HeaderNavigationBlockType.TextLinks:\n return <MobileTextLinksMenuComp />\n default:\n return null\n }\n }, [currentBlockTypeCategories, categoriesItem, MobileSupportMenuComp])\n\n const handleSecondaryMenuClose = useCallback(() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n setCurrentMenu && setCurrentMenu(HeaderNavigationMenu.Primary)\n }, [setMobileMenuOpen, setMenuInnerHeight, setCurrentMenu])\n\n const menuActions = useMemo(() => {\n return data?.bar?.actions?.filter(\n (item: any) => item?.mobileShow && item?.blockType !== HeaderNavigationActionBlockType.Profile // \u79FB\u52A8\u7AEF\u4E0D\u663E\u793Aprofile\u6309\u94AE\n )\n }, [data])\n\n const profileAction = useMemo(() => {\n return (\n data?.bar?.actions?.find(\n (item: any) => item?.mobileShow && item?.blockType === HeaderNavigationActionBlockType.Profile\n ) || {}\n )\n }, [data])\n\n const MobileCategoriesHeaderComp = useMemo(() => {\n switch (currentMenu) {\n case HeaderNavigationMenu.Primary:\n return (\n <PrimaryHeader\n actions={menuActions}\n menuOpen={mobileMenuOpen}\n onMenuOpenClose={() => {\n setMobileMenuOpen(false)\n setMenuInnerHeight(0)\n }}\n onMenuOpenClick={() => setMobileMenuOpen(true)}\n />\n )\n case HeaderNavigationMenu.Secondary:\n return (\n <SecondaryHeader\n title={categoriesItem?.text}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Primary)}\n />\n )\n case HeaderNavigationMenu.Third:\n return (\n <SecondaryHeader\n title={subSubCategory?.label}\n onMenuOpenClose={handleSecondaryMenuClose}\n onMenuBackClick={() => setCurrentMenu?.(HeaderNavigationMenu.Secondary)}\n />\n )\n default:\n return null\n }\n }, [\n mobileMenuOpen,\n currentMenu,\n setCurrentMenu,\n categoriesItem,\n menuActions,\n subSubCategory,\n handleSecondaryMenuClose,\n ])\n\n const handlePrimaryMenuClick = useCallback(\n (groupIndex: number, index: number) => {\n const categoriesItem = Array.isArray(groupCategories)\n ? Array.isArray(groupCategories[groupIndex])\n ? // @ts-ignore\n groupCategories[groupIndex][index]\n : {}\n : {}\n setCategoriesItem(categoriesItem)\n if (categoriesItem?.components?.[0]?.blockType === HeaderNavigationBlockType.Links) {\n // link\u6A21\u5757\u7279\u6B8A\u5904\u7406\n categoriesItem?.components?.[0]?.url && window.open(categoriesItem?.components?.[0]?.url)\n } else {\n setCurrentMenu?.(HeaderNavigationMenu.Secondary)\n }\n },\n [groupCategories, setCurrentMenu]\n )\n\n return (\n <Container className={cn('relative h-[52px]', className)}>\n {/* \u79FB\u52A8\u7AEF\u5206\u7C7B\u83DC\u5355 */}\n {MobileCategoriesHeaderComp}\n {mobileMenuOpen && (\n <nav\n ref={mobileMenuRef}\n className=\"absolute left-0 top-full z-[999] w-full overflow-y-auto border-t border-[#E4E5E6] bg-white text-black\"\n style={{ height: menuInnerHeight }}\n role=\"navigation\"\n aria-label=\"Mobile navigation menu\"\n >\n {currentMenu === HeaderNavigationMenu.Primary && menuData ? (\n <div className=\"pt-4\">\n <BrandStrip data={menuData} />\n </div>\n ) : null}\n {currentMenu === HeaderNavigationMenu.Primary ? (\n <MobilePrimaryMenu\n categories={groupCategories}\n onPrimaryMenuClick={handlePrimaryMenuClick}\n onPrimaryNavClick={onPrimaryNavClick}\n profileAction={profileAction}\n />\n ) : (\n MobileCategoriesMenuComp\n )}\n </nav>\n )}\n </Container>\n )\n }\n)\n\n/**\n * \u79FB\u52A8\u7AEF\u4E00\u7EA7\u83DC\u5355\n * @param categories \u5206\u7C7B\n * @param onPrimaryMenuClick \u4E00\u7EA7\u83DC\u5355\u70B9\u51FB\n */\nconst MobilePrimaryMenu = ({\n categories,\n onPrimaryMenuClick,\n profileAction,\n onPrimaryNavClick,\n}: {\n categories: any\n onPrimaryMenuClick: (groupIndex: number, index: number) => void\n profileAction: any\n onPrimaryNavClick?: (category: any, position: number) => void\n}) => {\n return (\n <div className=\"flex h-full flex-col justify-between\">\n <div className=\"tablet:px-8 laptop:px-16 p-4\">\n {categories?.map((groupItem: any, groupIndex: number) => (\n <div key={`groupCategory-${groupIndex}`} className=\"\">\n <div className={cn('my-2 h-px w-full bg-[#E5E5E7]')} />\n {groupItem?.map((item: any, index: number) => (\n <MenuItem\n key={item.id}\n label={item.text}\n onClick={() => {\n const flatCategories = categories?.flat() || []\n const position = flatCategories?.findIndex(\n (item: any) => item?.id === categories[groupIndex][index]?.id\n )\n onPrimaryMenuClick(groupIndex, index)\n onPrimaryNavClick?.(item, position)\n }}\n icon={item.components?.[0]?.icon}\n />\n ))}\n </div>\n ))}\n </div>\n <ProfileComp profileAction={profileAction} />\n </div>\n )\n}\n\n/**\n * \u79FB\u52A8\u7AEF\u4FA7\u8FB9\u680F\u4E0B\u62C9\n * @param sidebarCategoriesMetadata \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n * @param seriesMetadata \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n */\nconst ProfileComp = ({ profileAction }: { profileAction: any }) => {\n const [profileOpen, setProfileOpen] = useState(false)\n const { profile, event } = useNavContext()\n const { locale = 'us' } = useAiuiContext()\n return (\n <div\n className={cn('tablet:px-8 laptop:px-16 bg-[#F5F5F7] px-4 py-6', {\n 'p-4': profileOpen,\n })}\n >\n <button\n className=\"flex w-full cursor-pointer items-center justify-between border-0 bg-transparent\"\n onClick={() => setProfileOpen(!profileOpen)}\n aria-expanded={profileOpen}\n aria-label={profile?.nick_name || profileAction?.welcome}\n >\n <div className=\"flex items-center gap-[14px]\">\n <div className=\"flex size-[40px] shrink-0 items-center justify-center rounded-full bg-white\">\n <User aria-hidden=\"true\" />\n </div>\n <Text html={profile?.nick_name || profileAction?.welcome} className=\"text-base font-bold leading-[1.4]\" />\n </div>\n {!profile?.email && (\n <DownArrow aria-hidden=\"true\" className={cn('laptop:size-4 size-5', { 'rotate-180': profileOpen })} />\n )}\n </button>\n {profile?.email && (\n <nav className=\"mt-4\" role=\"navigation\" aria-label=\"Profile menu\">\n {profileAction?.profiles?.map((item: any) => (\n <MenuItem key={item.id} label={item?.title} href={getLocalizedPath(item?.url, locale)} />\n ))}\n </nav>\n )}\n {profileOpen && !profile?.email && (\n <div className=\"mt-4\">\n <Text html={profileAction?.benefits_title} className=\"text-sm font-bold leading-[1.4]\" />\n <div className=\"mt-2 flex flex-col gap-1\">\n {profileAction?.benefits?.map((item: any) => (\n <div key={item.id} className=\"flex items-center gap-[6px]\">\n <Picture source={item.benefitIcon?.url} className=\"size-4\" alt={item.benefit} width={16} height={16} />\n <Text html={item.benefit} className=\"text-sm font-bold leading-[1.4]\" />\n </div>\n ))}\n </div>\n </div>\n )}\n {!profile?.email && (\n <div className=\"mt-4 flex items-center gap-3\">\n <Button className=\"tablet:flex-none flex-1\" variant=\"secondary\" size=\"base\" onClick={() => event?.join?.()}>\n <Text html={profileAction?.primaryButton || 'Join Now'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n <Button className=\"tablet:flex-none flex-1\" variant=\"primary\" size=\"base\" onClick={() => event?.login?.()}>\n <Text html={profileAction?.secondaryButton || 'Log In'} className=\"text-sm font-bold leading-[1.4]\" />\n </Button>\n </div>\n )}\n </div>\n )\n}\n\nconst PrimaryHeader = ({ menuOpen, onMenuOpenClose, onMenuOpenClick, actions }: MobilePrimaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center justify-between gap-4\">\n <Logo />\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n <Actions actions={actions} />\n {menuOpen ? (\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuOpenClose()}\n aria-label=\"Close menu\"\n aria-expanded=\"true\"\n >\n <Close className=\"size-5\" aria-hidden=\"true\" />\n </button>\n ) : (\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuOpenClick()}\n aria-label=\"Open menu\"\n aria-expanded=\"false\"\n aria-haspopup=\"true\"\n >\n <Menu className=\"size-5\" aria-hidden=\"true\" />\n </button>\n )}\n </div>\n </div>\n )\n}\n\nconst Logo = () => {\n const { payloadData, isMobile } = useNavContext()\n const { locale = 'us' } = useAiuiContext()\n return (\n <a\n href={getLocalizedPath('/', locale)}\n className=\"hover:text-brand-0 [&>svg]:w-full\"\n aria-label=\"Home\"\n dangerouslySetInnerHTML={{\n __html: isMobile ? payloadData?.bar?.mobileLogo : payloadData?.bar?.desktopLogo,\n }}\n />\n )\n}\n\nconst Actions = forwardRef<HTMLButtonElement, { actions: any; activeStatus?: boolean }>(\n ({ actions, activeStatus = false }, ref) => {\n const { event, cartCount } = useNavContext()\n const [activeAction, setActiveAction] = useState<any>(null)\n\n const getActionLabel = (blockType: string) => {\n switch (blockType) {\n case HeaderNavigationActionBlockType.Search:\n return 'Search'\n case HeaderNavigationActionBlockType.Cart:\n return `Shopping cart${cartCount > 0 ? ` (${cartCount} items)` : ''}`\n case HeaderNavigationActionBlockType.Profile:\n return 'User profile'\n case HeaderNavigationActionBlockType.Livestream:\n return 'Livestream'\n default:\n return 'Action'\n }\n }\n\n const handleActionClick = useCallback(\n (action: any, index: number) => {\n setActiveAction(index)\n switch (action?.blockType) {\n case HeaderNavigationActionBlockType.Search:\n event?.search?.()\n break\n case HeaderNavigationActionBlockType.Cart:\n event?.cart?.()\n break\n case HeaderNavigationActionBlockType.Profile:\n event?.profile?.()\n break\n case HeaderNavigationActionBlockType.Livestream:\n event?.livestream?.()\n break\n default:\n return () => {}\n }\n },\n [event]\n )\n\n return (\n <div className=\"desktop:gap-6 flex items-center gap-4\">\n {Array.isArray(actions) &&\n actions.map((action: any, index: number) => {\n const isSearch = action.blockType === HeaderNavigationActionBlockType.Search\n const searchStyle: HeaderNavigationSearchStyle = action.searchStyle ?? 'icon'\n const isCapsule = isSearch && searchStyle === 'capsule'\n\n if (isCapsule) {\n // \u80F6\u56CA\u6A21\u5F0F\uFF1A\u540C\u65F6\u6E32\u67D3\u4E24\u79CD\u5F62\u6001\uFF0CCSS \u63A7\u5236\u54CD\u5E94\u5F0F\u663E\u9690\n return (\n <React.Fragment key={action.id}>\n {/* \u80F6\u56CA\u5F62\u641C\u7D22\u6846 \u2014 tablet(\u2265768px) \u663E\u793A */}\n <button\n className=\"tablet:flex bg-container-primary hidden h-9 w-[200px] cursor-pointer items-center rounded-full border-0 px-2\"\n onClick={() => handleActionClick(action, index)}\n aria-label={getActionLabel(action.blockType)}\n aria-pressed={activeStatus && activeAction === index}\n >\n <Text\n html={action.icon}\n className={cn('size-5 shrink-0', { 'text-brand-0': activeStatus && activeAction === index })}\n aria-hidden=\"true\"\n />\n </button>\n {/* \u88F8\u56FE\u6807 \u2014 \u79FB\u52A8\u7AEF(<768px) \u663E\u793A */}\n <button\n className=\"tablet:hidden relative cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => handleActionClick(action, index)}\n aria-label={getActionLabel(action.blockType)}\n aria-pressed={activeStatus && activeAction === index}\n >\n <Text\n html={action.icon}\n className={cn('size-5', { 'text-brand-0': activeStatus && activeAction === index })}\n aria-hidden=\"true\"\n />\n </button>\n </React.Fragment>\n )\n }\n\n // \u9ED8\u8BA4\u6837\u5F0F\uFF1A\u88F8\u56FE\u6807\uFF08\u539F\u65B9\u6848\uFF09\n return (\n <button\n className=\"relative cursor-pointer border-0 bg-transparent p-0\"\n key={action.id}\n ref={action.blockType === HeaderNavigationActionBlockType.Profile ? ref : null}\n onClick={() => handleActionClick(action, index)}\n aria-label={getActionLabel(action.blockType)}\n aria-pressed={activeStatus && activeAction === index}\n >\n <Text\n html={action.icon}\n className={cn('size-5', { 'text-brand-0': activeStatus && activeAction === index })}\n aria-hidden=\"true\"\n />\n {action.blockType === HeaderNavigationActionBlockType.Cart && cartCount > 0 && (\n <div\n className=\"bg-brand-0 absolute right-[-12px] top-[calc(100%-16px)] z-[1] flex min-h-5 min-w-5 items-center justify-center rounded-full px-[2px]\"\n aria-hidden=\"true\"\n >\n <Text html={cartCount?.toString()} className=\"text-sm font-bold leading-[1.2] text-white\" />\n </div>\n )}\n </button>\n )\n })}\n </div>\n )\n }\n)\n\nconst SecondaryHeader = ({ title, onMenuOpenClose, onMenuBackClick }: MobileSecondaryNavigationData) => {\n return (\n <div className=\"flex h-full items-center gap-3\">\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuBackClick()}\n aria-label=\"Back to previous menu\"\n >\n <LeftArrow className=\"size-5\" aria-hidden=\"true\" />\n </button>\n <Text html={title} className=\"flex-1 text-center text-base font-bold leading-[1.4]\" />\n <button\n className=\"cursor-pointer border-0 bg-transparent p-0\"\n onClick={() => onMenuOpenClose()}\n aria-label=\"Close menu\"\n >\n <Close className=\"size-5\" aria-hidden=\"true\" />\n </button>\n </div>\n )\n}\n\nMobileNavigation.displayName = 'MobileNavigation'\nActions.displayName = 'Actions'\nHeaderNavigation.displayName = 'HeaderNavigation'\nDesktopNavigation.displayName = 'DesktopNavigation'\n\nexport default withLayout(HeaderNavigation)\n"],
5
+ "mappings": "aAmOU,OAiVI,YAAAA,GAjVJ,OAAAC,EAcE,QAAAC,MAdF,oBAlOV,OAAOC,IAAS,cAAAC,GAAY,eAAAC,GAAa,aAAAC,EAAW,uBAAAC,GAAqB,WAAAC,EAAS,UAAAC,EAAQ,YAAAC,MAAgB,QAE1G,OAAS,WAAAC,GAAS,QAAAC,EAAM,UAAAC,GAAQ,aAAAC,GAAW,cAAAC,OAAkB,4BAE7D,OAAS,cAAAC,OAAkB,yBAE3B,OAAS,MAAAC,EAAI,oBAAAC,OAAwB,yBASrC,OAAOC,IAAe,iBAAAC,OAAqB,mBAE3C,OAAS,wBAAAC,EAAsB,6BAAAC,EAA2B,mCAAAC,MAAuC,aAGjG,OAAOC,OAAU,UAEjB,OAAS,WAAAC,OAAe,cACxB,OAAS,QAAAC,OAAY,OAErB,OACE,eAAAC,GACA,gBAAAC,GACA,gBAAAC,GACA,qBAAAC,GACA,gBAAAC,GACA,iBAAAC,OACK,oBAEP,OAAS,QAAAC,GAAM,SAAAC,GAAO,QAAAC,GAAM,aAAAC,GAAW,aAAAC,GAAW,WAAAC,OAAe,mBAEjE,OAAOC,OAAsB,+BAC7B,OAAS,2BAAAC,OAA+B,+BACxC,OAAS,6BAAAC,OAAiC,iCAC1C,OAAS,mBAAAC,OAAuB,uBAChC,OAAS,iBAAAC,OAAqB,qBAC9B,OAAS,oBAAAC,OAAwB,wBACjC,OAAS,qBAAAC,OAAyB,yBAClC,OAAS,oBAAAC,OAAwB,wBACjC,OAAS,qBAAAC,OAAyB,yBAClC,OAAS,qBAAAC,OAAyB,yBAClC,OAAS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AC3C,eAAcN,GAAgBC,IAAiBtD,EAE/C,UAAAvH,EAACW,EAAA,CACC,KAAMuK,EAAO,KACb,UAAWlK,EAAG,SAAU,CAAE,eAAgB4J,GAAgBC,IAAiBtD,CAAM,CAAC,EAClF,cAAY,OACd,EACC2D,EAAO,YAAc5J,EAAgC,MAAQgD,EAAY,GACxEtE,EAAC,OACC,UAAU,uIACV,cAAY,OAEZ,SAAAA,EAACW,EAAA,CAAK,KAAM2D,GAAW,SAAS,EAAG,UAAU,6CAA6C,EAC5F,IAjBG4G,EAAO,EAmBd,CAEJ,CAAC,EACL,CAEJ,CACF,EAEMjB,GAAkB,CAAC,CAAE,MAAAoB,EAAO,gBAAAZ,EAAiB,gBAAAa,CAAgB,IAE/DrL,EAAC,OAAI,UAAU,iCACb,UAAAD,EAAC,UACC,UAAU,6CACV,QAAS,IAAMsL,EAAgB,EAC/B,aAAW,wBAEX,SAAAtL,EAACmC,GAAA,CAAU,UAAU,SAAS,cAAY,OAAO,EACnD,EACAnC,EAACW,EAAA,CAAK,KAAM0K,EAAO,UAAU,uDAAuD,EACpFrL,EAAC,UACC,UAAU,6CACV,QAAS,IAAMyK,EAAgB,EAC/B,aAAW,aAEX,SAAAzK,EAACiC,GAAA,CAAM,UAAU,SAAS,cAAY,OAAO,EAC/C,GACF,EAIJ+D,GAAiB,YAAc,mBAC/B2C,GAAQ,YAAc,UACtBtF,GAAiB,YAAc,mBAC/B0C,GAAkB,YAAc,oBAEhC,IAAOwF,GAAQxK,GAAWsC,EAAgB",
6
+ "names": ["Fragment", "jsx", "jsxs", "React", "forwardRef", "useCallback", "useEffect", "useImperativeHandle", "useMemo", "useRef", "useState", "Picture", "Text", "Button", "Container", "BrandStrip", "withLayout", "cn", "getLocalizedPath", "NavProvider", "useNavContext", "HeaderNavigationMenu", "HeaderNavigationBlockType", "HeaderNavigationActionBlockType", "jump", "useGSAP", "gsap", "WithSidebar", "WithSupports", "WithMulticol", "WithGroupCategory", "WithResource", "WithTextLinks", "Menu", "Close", "User", "LeftArrow", "DownArrow", "Polygon", "NavigationSearch", "ResourceSidebarDropdown", "MobileResourceSidebarMenu", "SidebarDropdown", "useScrollLock", "MulticolDropdown", "TextLinksDropdown", "SupportsDropdown", "MobileSidebarMenu", "MobileSupportMenu", "MobileMulticolMenu", "MobileTextLinksMenu", "MenuItem", "useAiuiContext", "throttle", "HeaderNavigation", "props", "ref", "header", "buildProps", "event", "profile", "theme", "isTop", "searchResult", "onSearch", "isSearching", "keywords", "onPrimaryNavClick", "onSeriesProductClick", "onSidebarNavClick", "headerId", "cartCount", "menuData", "rest", "searchOpen", "setSearchOpen", "headerHidden", "setHeaderHidden", "changeHeaderBackground", "setChangeHeaderBackground", "isMobile", "setIsMobile", "searchRef", "headerRef", "resizeWindow", "offsetWidth", "lastScrollY", "upwardDistance", "downwardDistance", "getScrollTop", "initialScrollTop", "handleScroll", "currentScrollY", "delta", "searchPage", "item", "DesktopNavigation", "MobileNavigation", "value", "e", "data", "onNavItemClick", "className", "downdownHover", "setDowndownHover", "locale", "groupCategories", "categoriesItem", "setCategoriesItem", "navStatusArray", "setNavStatusArray", "profileRef", "userProfileOpen", "setUserProfileOpen", "dropdownRef", "navItemRefs", "categories", "groupItem", "groupIndex", "_", "index", "currentNavItem", "handleNavItemClick", "currentCategoriesItem", "position", "prev", "handleNavItemKeyDown", "handleNavMenuClose", "currentBlockTypeCategories", "SidebarDropdownComp", "ResourceSidebarDropdownComp", "MulticolDropdownComp", "TextLinksDropdownComp", "SupportsDropdownComp", "DropdownComp", "actions", "profileAction", "handleProfileClick", "profileRefElement", "Logo", "Actions", "isExpanded", "el", "currentMenu", "setCurrentMenu", "subSubCategory", "mobileMenuOpen", "setMobileMenuOpen", "menuInnerHeight", "setMenuInnerHeight", "mobileMenuRef", "rect", "MobileSupportMenuComp", "MobileSidebarMenuComp", "MobileResourceSidebarMenuComp", "MobileMulticolMenuComp", "MobileTextLinksMenuComp", "MobileCategoriesMenuComp", "handleSecondaryMenuClose", "menuActions", "MobileCategoriesHeaderComp", "PrimaryHeader", "SecondaryHeader", "handlePrimaryMenuClick", "MobilePrimaryMenu", "onPrimaryMenuClick", "ProfileComp", "profileOpen", "setProfileOpen", "menuOpen", "onMenuOpenClose", "onMenuOpenClick", "payloadData", "activeStatus", "activeAction", "setActiveAction", "getActionLabel", "blockType", "handleActionClick", "action", "isSearch", "searchStyle", "title", "onMenuBackClick", "HeaderNavigation_default"]
7
7
  }
@@ -54,7 +54,8 @@ export declare enum HeaderNavigationBlockType {
54
54
  Supports = "ipc-navigation-supports",
55
55
  Multicol = "ipc-navigation-multicol",
56
56
  Links = "ipc-navigation-links",
57
- Resource = "ipc-navigation-resource"
57
+ Resource = "ipc-navigation-resource",
58
+ TextLinks = "ipc-navigation-textlinks"
58
59
  }
59
60
  export declare enum HeaderNavigationActionBlockType {
60
61
  Search = "ipc-navigation-action-search",
@@ -62,6 +63,12 @@ export declare enum HeaderNavigationActionBlockType {
62
63
  Profile = "ipc-navigation-action-profile",
63
64
  Livestream = "ipc-navigation-action-livestream"
64
65
  }
66
+ /**
67
+ * Search action 的样式模式
68
+ * - 'icon' (默认)裸图标,与其他 action 外观一致
69
+ * - 'capsule' 胶囊搜索框,带背景色和固定宽度
70
+ */
71
+ export type HeaderNavigationSearchStyle = 'icon' | 'capsule';
65
72
  export interface MobileNavigationProps {
66
73
  data: any;
67
74
  menuData: any;
@@ -1,2 +1,2 @@
1
- var e=(r=>(r.Primary="primary",r.Secondary="secondary",r.Third="third",r))(e||{}),t=(n=>(n.Sidebar="ipc-navigation-sidebar",n.Supports="ipc-navigation-supports",n.Multicol="ipc-navigation-multicol",n.Links="ipc-navigation-links",n.Resource="ipc-navigation-resource",n))(t||{}),o=(i=>(i.Search="ipc-navigation-action-search",i.Cart="ipc-navigation-action-cart",i.Profile="ipc-navigation-action-profile",i.Livestream="ipc-navigation-action-livestream",i))(o||{});export{o as HeaderNavigationActionBlockType,t as HeaderNavigationBlockType,e as HeaderNavigationMenu};
1
+ var e=(r=>(r.Primary="primary",r.Secondary="secondary",r.Third="third",r))(e||{}),t=(i=>(i.Sidebar="ipc-navigation-sidebar",i.Supports="ipc-navigation-supports",i.Multicol="ipc-navigation-multicol",i.Links="ipc-navigation-links",i.Resource="ipc-navigation-resource",i.TextLinks="ipc-navigation-textlinks",i))(t||{}),o=(n=>(n.Search="ipc-navigation-action-search",n.Cart="ipc-navigation-action-cart",n.Profile="ipc-navigation-action-profile",n.Livestream="ipc-navigation-action-livestream",n))(o||{});export{o as HeaderNavigationActionBlockType,t as HeaderNavigationBlockType,e as HeaderNavigationMenu};
2
2
  //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeaderNavigation/types.ts"],
4
- "sourcesContent": ["import type React from 'react'\nimport type { Product } from '../../cpn-components/CpnProductCard/types.js'\n\nexport interface HeaderNavigationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'className'> {\n data: any\n menuData: any\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number) => void\n onSeriesProductClick?: (_product: any, _position: number, _seriesLabel?: string) => void\n searchResult?: any\n onSearch?: (_value?: string) => void\n isSearching?: boolean\n keywords?: {\n search_term: string\n search_date: string\n shopify_domain: string\n counts: number\n }[]\n headerId?: string\n cartCount: number\n event?: {\n search?: () => void\n cart?: () => void\n profile?: () => void\n livestream?: () => void\n join?: () => void\n login?: () => void\n }\n buildProps: {\n products?: Product[]\n categories?: Record<string, any>\n }\n profile?: UserProfile // \u7528\u6237\u4FE1\u606F\n theme?: string\n isTop?: boolean // \u662F\u5426\u5728\u9876\u90E8\n}\n\nexport interface MobilePrimaryNavigationData {\n actions: any\n menuOpen?: boolean\n onMenuOpenClick: () => void\n onMenuOpenClose: () => void\n}\n\nexport interface MobileSecondaryNavigationData {\n title?: string\n onMenuOpenClose: () => void\n onMenuBackClick: () => void\n}\n\nexport enum HeaderNavigationMenu {\n Primary = 'primary',\n Secondary = 'secondary',\n Third = 'third',\n}\n\nexport enum HeaderNavigationBlockType {\n Sidebar = 'ipc-navigation-sidebar',\n Supports = 'ipc-navigation-supports',\n Multicol = 'ipc-navigation-multicol',\n Links = 'ipc-navigation-links',\n Resource = 'ipc-navigation-resource',\n}\n\nexport enum HeaderNavigationActionBlockType {\n Search = 'ipc-navigation-action-search',\n Cart = 'ipc-navigation-action-cart',\n Profile = 'ipc-navigation-action-profile',\n Livestream = 'ipc-navigation-action-livestream',\n}\n\nexport interface MobileNavigationProps {\n data: any\n menuData: any\n className?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n}\n\nexport interface DesktopNavigationProps {\n data: any\n onNavItemClick?: () => void\n className?: string\n theme?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number, _subSubindex?: number) => void\n}\n\ntype Country = {\n id?: number\n name?: string\n code?: string\n}\n\nexport type UserProfile = {\n user_id: string\n email: string\n nick_name?: string\n full_name?: string\n first_name?: string\n last_name?: string\n dob?: string\n gender?: string\n phone_number?: string\n phone_account?: string\n country?: Country\n is_subscribe?: boolean\n avatar?: string\n can_change_password?: boolean\n invitation_code?: string\n phone_carrier?: string\n dob_programmed?: boolean\n activated?: boolean\n registed_at?: number\n activated_at?: number\n token?: string\n}\n"],
5
- "mappings": "AAkDO,IAAKA,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,MAAQ,QAHEA,OAAA,IAMAC,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,0BACXA,EAAA,SAAW,0BACXA,EAAA,MAAQ,uBACRA,EAAA,SAAW,0BALDA,OAAA,IAQAC,OACVA,EAAA,OAAS,+BACTA,EAAA,KAAO,6BACPA,EAAA,QAAU,gCACVA,EAAA,WAAa,mCAJHA,OAAA",
4
+ "sourcesContent": ["import type React from 'react'\nimport type { Product } from '../../cpn-components/CpnProductCard/types.js'\n\nexport interface HeaderNavigationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'className'> {\n data: any\n menuData: any\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number) => void\n onSeriesProductClick?: (_product: any, _position: number, _seriesLabel?: string) => void\n searchResult?: any\n onSearch?: (_value?: string) => void\n isSearching?: boolean\n keywords?: {\n search_term: string\n search_date: string\n shopify_domain: string\n counts: number\n }[]\n headerId?: string\n cartCount: number\n event?: {\n search?: () => void\n cart?: () => void\n profile?: () => void\n livestream?: () => void\n join?: () => void\n login?: () => void\n }\n buildProps: {\n products?: Product[]\n categories?: Record<string, any>\n }\n profile?: UserProfile // \u7528\u6237\u4FE1\u606F\n theme?: string\n isTop?: boolean // \u662F\u5426\u5728\u9876\u90E8\n}\n\nexport interface MobilePrimaryNavigationData {\n actions: any\n menuOpen?: boolean\n onMenuOpenClick: () => void\n onMenuOpenClose: () => void\n}\n\nexport interface MobileSecondaryNavigationData {\n title?: string\n onMenuOpenClose: () => void\n onMenuBackClick: () => void\n}\n\nexport enum HeaderNavigationMenu {\n Primary = 'primary',\n Secondary = 'secondary',\n Third = 'third',\n}\n\nexport enum HeaderNavigationBlockType {\n Sidebar = 'ipc-navigation-sidebar',\n Supports = 'ipc-navigation-supports',\n Multicol = 'ipc-navigation-multicol',\n Links = 'ipc-navigation-links',\n Resource = 'ipc-navigation-resource',\n TextLinks = 'ipc-navigation-textlinks',\n}\n\nexport enum HeaderNavigationActionBlockType {\n Search = 'ipc-navigation-action-search',\n Cart = 'ipc-navigation-action-cart',\n Profile = 'ipc-navigation-action-profile',\n Livestream = 'ipc-navigation-action-livestream',\n}\n\n/**\n * Search action \u7684\u6837\u5F0F\u6A21\u5F0F\n * - 'icon' \uFF08\u9ED8\u8BA4\uFF09\u88F8\u56FE\u6807\uFF0C\u4E0E\u5176\u4ED6 action \u5916\u89C2\u4E00\u81F4\n * - 'capsule' \u80F6\u56CA\u641C\u7D22\u6846\uFF0C\u5E26\u80CC\u666F\u8272\u548C\u56FA\u5B9A\u5BBD\u5EA6\n */\nexport type HeaderNavigationSearchStyle = 'icon' | 'capsule'\n\nexport interface MobileNavigationProps {\n data: any\n menuData: any\n className?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n}\n\nexport interface DesktopNavigationProps {\n data: any\n onNavItemClick?: () => void\n className?: string\n theme?: string\n onPrimaryNavClick?: (_category: any, _position: number) => void\n onSidebarNavClick?: (_series: any, _index: number, _subSubindex?: number) => void\n}\n\ntype Country = {\n id?: number\n name?: string\n code?: string\n}\n\nexport type UserProfile = {\n user_id: string\n email: string\n nick_name?: string\n full_name?: string\n first_name?: string\n last_name?: string\n dob?: string\n gender?: string\n phone_number?: string\n phone_account?: string\n country?: Country\n is_subscribe?: boolean\n avatar?: string\n can_change_password?: boolean\n invitation_code?: string\n phone_carrier?: string\n dob_programmed?: boolean\n activated?: boolean\n registed_at?: number\n activated_at?: number\n token?: string\n}\n"],
5
+ "mappings": "AAkDO,IAAKA,OACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YACZA,EAAA,MAAQ,QAHEA,OAAA,IAMAC,OACVA,EAAA,QAAU,yBACVA,EAAA,SAAW,0BACXA,EAAA,SAAW,0BACXA,EAAA,MAAQ,uBACRA,EAAA,SAAW,0BACXA,EAAA,UAAY,2BANFA,OAAA,IASAC,OACVA,EAAA,OAAS,+BACTA,EAAA,KAAO,6BACPA,EAAA,QAAU,gCACVA,EAAA,WAAa,mCAJHA,OAAA",
6
6
  "names": ["HeaderNavigationMenu", "HeaderNavigationBlockType", "HeaderNavigationActionBlockType"]
7
7
  }
@@ -8,3 +8,4 @@ export declare function WithSupports<P extends object>(WrappedComponent: React.C
8
8
  export declare function WithMulticol<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
9
9
  export declare function WithResource<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
10
10
  export declare function WithGroupCategory(categories: any): unknown[];
11
+ export declare function WithTextLinks<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any): React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<any>>;
@@ -1,2 +1,2 @@
1
- import{jsx as d}from"react/jsx-runtime";import c,{useMemo as u}from"react";function p(r,e){const o=u(()=>{let a=null;try{a=JSON.parse(e?.components?.[0]?.sidebar?.categoriesMetadata||"{}")}catch(t){console.log("categoriesMetadata Parse error",t)}return a},[e]),s=u(()=>{let a=null;try{a=JSON.parse(e?.components?.[0]?.sidebar?.seriesMetadata||"[]")}catch(t){console.log("seriesMetadata Parse error",t)}return a},[e]),n=c.forwardRef((a,t)=>d(r,{...a,ref:t,seriesMetadata:s,sidebarCategoriesMetadata:o}));return n.displayName=r.displayName||r.name||"WithSidebarDropdown",n}function y(r,{categoriesItem:e,currentNavItemRef:o}){const s=u(()=>e?.components?.[0]?.supports,[e]),n=c.forwardRef((a,t)=>d(r,{...a,supportsMetadata:s,currentNavItemRef:o,ref:t}));return n.displayName=r.displayName||r.name||"WithSupportsDropdown",n}function M(r,e){const o=e?.components?.[0]?.showStatsBanner,s=e?.components?.[0]?.statsBanner?.[0],n=u(()=>{try{return JSON.parse(e?.components?.[0]?.multicol?.multicolMetadata||"{}")}catch(t){console.log("multicolMetadata Parse error",t)}return null},[e]),a=c.forwardRef((t,l)=>d(r,{...t,ref:l,multicolMetadata:n,showStatsBanner:o,statsBannerData:s}));return a.displayName=r.displayName||r.name||"WithMulticolDropdown",a}function f(r,e){const o=u(()=>{let a=null;try{a=JSON.parse(e?.components?.[0]?.resource?.categoriesMetadata||"{}")}catch(t){console.log("resourceCategoriesMetadata Parse error",t)}return a},[e]),s=u(()=>{let a=null;try{a=JSON.parse(e?.components?.[0]?.resource?.resourceMetadata||"[]")}catch(t){console.log("resourcesMetadata Parse error",t)}return a},[e]),n=c.forwardRef((a,t)=>d(r,{...a,ref:t,resourcesMetadata:s,resourceCategoriesMetadata:o}));return n.displayName=r.displayName||r.name||"WithResourceDropdown",n}function w(r){return r?Object.values(r?.reduce((e,o)=>(e[o.group]||(e[o.group]=[]),e[o.group].push(o),e),{})):[[]]}export{w as WithGroupCategory,M as WithMulticol,f as WithResource,p as WithSidebar,y as WithSupports};
1
+ import{jsx as l}from"react/jsx-runtime";import c,{useMemo as u}from"react";function y(r,e){const n=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.sidebar?.categoriesMetadata||"{}")}catch(a){console.log("categoriesMetadata Parse error",a)}return t},[e]),s=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.sidebar?.seriesMetadata||"[]")}catch(a){console.log("seriesMetadata Parse error",a)}return t},[e]),o=c.forwardRef((t,a)=>l(r,{...t,ref:a,seriesMetadata:s,sidebarCategoriesMetadata:n}));return o.displayName=r.displayName||r.name||"WithSidebarDropdown",o}function p(r,{categoriesItem:e,currentNavItemRef:n}){const s=u(()=>e?.components?.[0]?.supports,[e]),o=c.forwardRef((t,a)=>l(r,{...t,supportsMetadata:s,currentNavItemRef:n,ref:a}));return o.displayName=r.displayName||r.name||"WithSupportsDropdown",o}function M(r,e){const n=e?.components?.[0]?.showStatsBanner,s=e?.components?.[0]?.statsBanner?.[0],o=u(()=>{try{return JSON.parse(e?.components?.[0]?.multicol?.multicolMetadata||"{}")}catch(a){console.log("multicolMetadata Parse error",a)}return null},[e]),t=c.forwardRef((a,d)=>l(r,{...a,ref:d,multicolMetadata:o,showStatsBanner:n,statsBannerData:s}));return t.displayName=r.displayName||r.name||"WithMulticolDropdown",t}function f(r,e){const n=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.resource?.categoriesMetadata||"{}")}catch(a){console.log("resourceCategoriesMetadata Parse error",a)}return t},[e]),s=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.resource?.resourceMetadata||"[]")}catch(a){console.log("resourcesMetadata Parse error",a)}return t},[e]),o=c.forwardRef((t,a)=>l(r,{...t,ref:a,resourcesMetadata:s,resourceCategoriesMetadata:n}));return o.displayName=r.displayName||r.name||"WithResourceDropdown",o}function w(r){return r?Object.values(r?.reduce((e,n)=>(e[n.group]||(e[n.group]=[]),e[n.group].push(n),e),{})):[[]]}function h(r,e){const n=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.textlinks?.categoriesMetadata||"{}")}catch(a){console.log("textlinksCategoriesMetadata Parse error",a)}return t},[e]),s=u(()=>{let t=null;try{t=JSON.parse(e?.components?.[0]?.textlinks?.columnsMetadata||"[]")}catch(a){console.log("textlinksColumnsMetadata Parse error",a)}return t},[e]),o=c.forwardRef((t,a)=>l(r,{...t,ref:a,textlinksCategoriesMetadata:n,textlinksColumnsMetadata:s}));return o.displayName=r.displayName||r.name||"WithTextLinksDropdown",o}export{w as WithGroupCategory,M as WithMulticol,f as WithResource,y as WithSidebar,p as WithSupports,h as WithTextLinks};
2
2
  //# sourceMappingURL=withCategory.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/HeaderNavigation/withCategory.tsx"],
4
- "sourcesContent": ["import React, { useMemo } from 'react'\n\nexport function WithSidebar<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n const sidebarCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('categoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n const seriesMetadata = useMemo(() => {\n let seriesMetadata = null\n try {\n seriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.seriesMetadata || '[]')\n } catch (error) {\n console.log('seriesMetadata Parse error', error)\n }\n return seriesMetadata\n }, [categoriesItem])\n\n const withSidebarDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n seriesMetadata={seriesMetadata}\n sidebarCategoriesMetadata={sidebarCategoriesMetadata}\n />\n )\n })\n\n withSidebarDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSidebarDropdown'\n return withSidebarDropdown\n}\n\nexport function WithSupports<P extends object>(\n WrappedComponent: React.ComponentType<any>,\n { categoriesItem, currentNavItemRef }: { categoriesItem: any; currentNavItemRef?: any; onMouseLeave?: () => void }\n) {\n const supportsMetadata = useMemo(() => {\n return categoriesItem?.components?.[0]?.supports\n }, [categoriesItem])\n\n const supportsDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n supportsMetadata={supportsMetadata}\n currentNavItemRef={currentNavItemRef}\n ref={ref}\n />\n )\n })\n\n supportsDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSupportsDropdown'\n return supportsDropdown\n}\n\nexport function WithMulticol<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n const showStatsBanner = categoriesItem?.components?.[0]?.showStatsBanner\n const statsBannerData = categoriesItem?.components?.[0]?.statsBanner?.[0]\n const multicolMetadata = useMemo(() => {\n try {\n return JSON.parse(categoriesItem?.components?.[0]?.multicol?.multicolMetadata || '{}')\n } catch (error) {\n console.log('multicolMetadata Parse error', error)\n }\n return null\n }, [categoriesItem])\n const multicolDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n multicolMetadata={multicolMetadata}\n showStatsBanner={showStatsBanner}\n statsBannerData={statsBannerData}\n />\n )\n })\n\n multicolDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithMulticolDropdown'\n return multicolDropdown\n}\n\nexport function WithResource<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u8D44\u6E90\u4F4D\u5206\u7C7B\u5143\u6570\u636E\n const resourceCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('resourceCategoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u8D44\u6E90\u4F4D\u5143\u6570\u636E\n const resourcesMetadata = useMemo(() => {\n let resourcesMetadata = null\n try {\n resourcesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.resourceMetadata || '[]')\n } catch (error) {\n console.log('resourcesMetadata Parse error', error)\n }\n return resourcesMetadata\n }, [categoriesItem])\n\n const withResourceDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n resourcesMetadata={resourcesMetadata}\n resourceCategoriesMetadata={resourceCategoriesMetadata}\n />\n )\n })\n\n withResourceDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithResourceDropdown'\n return withResourceDropdown\n}\n\nexport function WithGroupCategory(categories: any) {\n if (!categories) return [[]]\n return Object.values(\n categories?.reduce((acc: any, item: any) => {\n if (!acc[item.group]) {\n acc[item.group] = []\n }\n acc[item.group].push(item)\n return acc\n }, {})\n )\n}\n"],
5
- "mappings": "AA2BM,cAAAA,MAAA,oBA3BN,OAAOC,GAAS,WAAAC,MAAe,QAExB,SAASC,EAA8BC,EAA4CC,EAAqB,CAE7G,MAAMC,EAA4BJ,EAAQ,IAAM,CAC9C,IAAIK,EAAqB,KACzB,GAAI,CACFA,EAAqB,KAAK,MAAMF,GAAgB,aAAa,CAAC,GAAG,SAAS,oBAAsB,IAAI,CACtG,OAASG,EAAO,CACd,QAAQ,IAAI,iCAAkCA,CAAK,CACrD,CACA,OAAOD,CACT,EAAG,CAACF,CAAc,CAAC,EAGbI,EAAiBP,EAAQ,IAAM,CACnC,IAAIO,EAAiB,KACrB,GAAI,CACFA,EAAiB,KAAK,MAAMJ,GA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AAiB,MAAQ,uBACjFiB,CACT,CAEO,SAASC,EAA+BlB,EAA4CC,EAAqB,CAE9G,MAAMkB,EAA6BrB,EAAQ,IAAM,CAC/C,IAAIK,EAAqB,KACzB,GAAI,CACFA,EAAqB,KAAK,MAAMF,GAAgB,aAAa,CAAC,GAAG,UAAU,oBAAsB,IAAI,CACvG,OAASG,EAAO,CACd,QAAQ,IAAI,yCAA0CA,CAAK,CAC7D,CACA,OAAOD,CACT,EAAG,CAACF,CAAc,CAAC,EAGbmB,EAAoBtB,EAAQ,IAAM,CACtC,IAAIsB,EAAoB,KACxB,GAAI,CACFA,EAAoB,KAAK,MAAMnB,GAAgB,aAAa,CAAC,GAAG,UAAU,kBAAoB,IAAI,CACpG,OAASG,EAAO,CACd,QAAQ,IAAI,gCAAiCA,CAAK,CACpD,CACA,OAAOgB,CACT,EAAG,CAACnB,CAAc,CAAC,EAEboB,EAAuBxB,EAAM,WAAmB,CAACU,EAAOC,IAE1DZ,EAACI,EAAA,CACE,GAAIO,EACL,IAAKC,EACL,kBAAmBY,EACnB,2BAA4BD,EAC9B,CAEH,EAED,OAAAE,EAAqB,YAAcrB,EAAiB,aAAeA,EAAiB,MAAQ,uBACrFqB,CACT,CAEO,SAASC,EAAkBC,EAAiB,CACjD,OAAKA,EACE,OAAO,OACZA,GAAY,OAAO,CAACC,EAAUC,KACvBD,EAAIC,EAAK,KAAK,IACjBD,EAAIC,EAAK,KAAK,EAAI,CAAC,GAErBD,EAAIC,EAAK,KAAK,EAAE,KAAKA,CAAI,EAClBD,GACN,CAAC,CAAC,CACP,EATwB,CAAC,CAAC,CAAC,CAU7B",
6
- "names": ["jsx", "React", "useMemo", "WithSidebar", "WrappedComponent", "categoriesItem", "sidebarCategoriesMetadata", "categoriesMetadata", "error", "seriesMetadata", "withSidebarDropdown", "props", "ref", "WithSupports", "currentNavItemRef", "supportsMetadata", "supportsDropdown", "WithMulticol", "showStatsBanner", "statsBannerData", "multicolMetadata", "multicolDropdown", "WithResource", "resourceCategoriesMetadata", "resourcesMetadata", "withResourceDropdown", "WithGroupCategory", "categories", "acc", "item"]
4
+ "sourcesContent": ["import React, { useMemo } from 'react'\n\nexport function WithSidebar<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u4FA7\u8FB9\u680F\u5206\u7C7B\u5143\u6570\u636E\n const sidebarCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('categoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u4FA7\u8FB9\u680F\u7CFB\u5217\u5143\u6570\u636E\n const seriesMetadata = useMemo(() => {\n let seriesMetadata = null\n try {\n seriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.sidebar?.seriesMetadata || '[]')\n } catch (error) {\n console.log('seriesMetadata Parse error', error)\n }\n return seriesMetadata\n }, [categoriesItem])\n\n const withSidebarDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n seriesMetadata={seriesMetadata}\n sidebarCategoriesMetadata={sidebarCategoriesMetadata}\n />\n )\n })\n\n withSidebarDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSidebarDropdown'\n return withSidebarDropdown\n}\n\nexport function WithSupports<P extends object>(\n WrappedComponent: React.ComponentType<any>,\n { categoriesItem, currentNavItemRef }: { categoriesItem: any; currentNavItemRef?: any; onMouseLeave?: () => void }\n) {\n const supportsMetadata = useMemo(() => {\n return categoriesItem?.components?.[0]?.supports\n }, [categoriesItem])\n\n const supportsDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n supportsMetadata={supportsMetadata}\n currentNavItemRef={currentNavItemRef}\n ref={ref}\n />\n )\n })\n\n supportsDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithSupportsDropdown'\n return supportsDropdown\n}\n\nexport function WithMulticol<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n const showStatsBanner = categoriesItem?.components?.[0]?.showStatsBanner\n const statsBannerData = categoriesItem?.components?.[0]?.statsBanner?.[0]\n const multicolMetadata = useMemo(() => {\n try {\n return JSON.parse(categoriesItem?.components?.[0]?.multicol?.multicolMetadata || '{}')\n } catch (error) {\n console.log('multicolMetadata Parse error', error)\n }\n return null\n }, [categoriesItem])\n const multicolDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n multicolMetadata={multicolMetadata}\n showStatsBanner={showStatsBanner}\n statsBannerData={statsBannerData}\n />\n )\n })\n\n multicolDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithMulticolDropdown'\n return multicolDropdown\n}\n\nexport function WithResource<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // \u8D44\u6E90\u4F4D\u5206\u7C7B\u5143\u6570\u636E\n const resourceCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('resourceCategoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // \u8D44\u6E90\u4F4D\u5143\u6570\u636E\n const resourcesMetadata = useMemo(() => {\n let resourcesMetadata = null\n try {\n resourcesMetadata = JSON.parse(categoriesItem?.components?.[0]?.resource?.resourceMetadata || '[]')\n } catch (error) {\n console.log('resourcesMetadata Parse error', error)\n }\n return resourcesMetadata\n }, [categoriesItem])\n\n const withResourceDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n resourcesMetadata={resourcesMetadata}\n resourceCategoriesMetadata={resourceCategoriesMetadata}\n />\n )\n })\n\n withResourceDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithResourceDropdown'\n return withResourceDropdown\n}\n\nexport function WithGroupCategory(categories: any) {\n if (!categories) return [[]]\n return Object.values(\n categories?.reduce((acc: any, item: any) => {\n if (!acc[item.group]) {\n acc[item.group] = []\n }\n acc[item.group].push(item)\n return acc\n }, {})\n )\n}\n\nexport function WithTextLinks<P extends object>(WrappedComponent: React.ComponentType<any>, categoriesItem: any) {\n // textlinks \u5206\u7C7B\u5143\u6570\u636E\uFF08\u5DE6\u4FA7\u6298\u53E0\u5BFC\u822A\uFF09\n const textlinksCategoriesMetadata = useMemo(() => {\n let categoriesMetadata = null\n try {\n categoriesMetadata = JSON.parse(categoriesItem?.components?.[0]?.textlinks?.categoriesMetadata || '{}')\n } catch (error) {\n console.log('textlinksCategoriesMetadata Parse error', error)\n }\n return categoriesMetadata\n }, [categoriesItem])\n\n // textlinks \u5217\u6570\u636E\uFF08\u53F3\u4FA7\u591A\u5217\u6587\u5B57\u94FE\u63A5\uFF09\n const textlinksColumnsMetadata = useMemo(() => {\n let columnsMetadata = null\n try {\n columnsMetadata = JSON.parse(categoriesItem?.components?.[0]?.textlinks?.columnsMetadata || '[]')\n } catch (error) {\n console.log('textlinksColumnsMetadata Parse error', error)\n }\n return columnsMetadata\n }, [categoriesItem])\n\n const withTextLinksDropdown = React.forwardRef<any, P>((props, ref) => {\n return (\n <WrappedComponent\n {...(props as unknown as P)}\n ref={ref}\n textlinksCategoriesMetadata={textlinksCategoriesMetadata}\n textlinksColumnsMetadata={textlinksColumnsMetadata}\n />\n )\n })\n\n withTextLinksDropdown.displayName = WrappedComponent.displayName || WrappedComponent.name || 'WithTextLinksDropdown'\n return withTextLinksDropdown\n}\n"],
5
+ "mappings": "AA2BM,cAAAA,MAAA,oBA3BN,OAAOC,GAAS,WAAAC,MAAe,QAExB,SAASC,EAA8BC,EAA4CC,EAAqB,CAE7G,MAAMC,EAA4BJ,EAAQ,IAAM,CAC9C,IAAIK,EAAqB,KACzB,GAAI,CACFA,EAAqB,KAAK,MAAMF,GAAgB,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B,CAEO,SAASE,EAAgC1B,EAA4CC,EAAqB,CAE/G,MAAM0B,EAA8B7B,EAAQ,IAAM,CAChD,IAAIK,EAAqB,KACzB,GAAI,CACFA,EAAqB,KAAK,MAAMF,GAAgB,aAAa,CAAC,GAAG,WAAW,oBAAsB,IAAI,CACxG,OAASG,EAAO,CACd,QAAQ,IAAI,0CAA2CA,CAAK,CAC9D,CACA,OAAOD,CACT,EAAG,CAACF,CAAc,CAAC,EAGb2B,EAA2B9B,EAAQ,IAAM,CAC7C,IAAI+B,EAAkB,KACtB,GAAI,CACFA,EAAkB,KAAK,MAAM5B,GAAgB,aAAa,CAAC,GAAG,WAAW,iBAAmB,IAAI,CAClG,OAASG,EAAO,CACd,QAAQ,IAAI,uCAAwCA,CAAK,CAC3D,CACA,OAAOyB,CACT,EAAG,CAAC5B,CAAc,CAAC,EAEb6B,EAAwBjC,EAAM,WAAmB,CAACU,EAAOC,IAE3DZ,EAACI,EAAA,CACE,GAAIO,EACL,IAAKC,EACL,4BAA6BmB,EAC7B,yBAA0BC,EAC5B,CAEH,EAED,OAAAE,EAAsB,YAAc9B,EAAiB,aAAeA,EAAiB,MAAQ,wBACtF8B,CACT",
6
+ "names": ["jsx", "React", "useMemo", "WithSidebar", "WrappedComponent", "categoriesItem", "sidebarCategoriesMetadata", "categoriesMetadata", "error", "seriesMetadata", "withSidebarDropdown", "props", "ref", "WithSupports", "currentNavItemRef", "supportsMetadata", "supportsDropdown", "WithMulticol", "showStatsBanner", "statsBannerData", "multicolMetadata", "multicolDropdown", "WithResource", "resourceCategoriesMetadata", "resourcesMetadata", "withResourceDropdown", "WithGroupCategory", "categories", "acc", "item", "WithTextLinks", "textlinksCategoriesMetadata", "textlinksColumnsMetadata", "columnsMetadata", "withTextLinksDropdown"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use client";import{jsx as e,jsxs as m}from"react/jsx-runtime";import K,{useImperativeHandle as be,useRef as v,useState as xe,useEffect as he}from"react";import w from"gsap";import{ScrollTrigger as N}from"gsap/dist/ScrollTrigger";import X from"jump.js";import{useMediaQuery as ee}from"react-responsive";import{useInView as ve}from"react-intersection-observer";import ye from"../../helpers/ScrollLoadVideo.js";import{Button as L,Heading as ke,Picture as te,Text as P,Countdown as we}from"../../components/index.js";import{cn as i}from"../../helpers/index.js";import{cva as $}from"class-variance-authority";import{withLayout as Ne}from"../../shared/Styles.js";import{useExposure as $e}from"../../hooks/useExposure.js";import{trackUrlRef as S}from"../../shared/trackUrlRef.js";import{getLocalizedPath as Be}from"../../helpers/utils.js";import{useAiuiContext as Ve}from"../AiuiProvider/index.js";import{sizeMap as He}from"../../components/button.js";import{VideoModal as Te}from"../VideoModal/index.js";import ze from"./HeroBannerCarousel.js";const p="image",u="hero_banner",Ce=$("hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Ie=$("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),Le=$("hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),Pe=$("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),Se=({size:n="base"})=>{const{width:y,height:d}=He[n];return e("svg",{width:y,height:d,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},ae=K.forwardRef(({data:n,className:y,classNames:d={},onSecondaryClick:R,onPrimaryClick:M,jumpOptions:re={},...D},E)=>{const{locale:j}=Ve(),O={...{duration:500,offset:0},...re},B=t=>!t||!j?t:Be(t,j),{label:U,title:o,subtitle:r,endDate:J,endDate_tz:oe,dateFormat:ne,pcImage:f,padImage:_,mobileImage:k,pcVideo:se,padVideo:le,mobileVideo:G,isShowVideo:ie,isVideoLoop:pe=!0,primaryButton:s,secondaryButton:a,theme:ue="light",size:V="default",titleSize:H,caption:T=[],blockLink:q,iconArray:ce,align:g="left"}=n,F=ee({query:"(max-width: 768px)"}),A=ee({query:"(max-width: 1024px)"}),[W,Y]=xe(!1),{ref:me,inView:Q}=ve(),z=v(null),C=v(null),I=v(null),b=v(null),c=v(null),de=o?.trim()||r?.trim()||f?.alt?.trim()||void 0,fe=o!==void 0?o?.trim()||r?.trim()||f?.alt?.trim()||void 0:r&&r.trim()||"",ge=r&&r.trim()||"";return $e(c,{componentType:p,componentName:u,componentTitle:fe,componentDescription:ge}),be(E,()=>c.current),he(()=>{if(n.items&&n.items.length>0)return;w.registerPlugin(N);function t(){if(!b.current)return;const l=c.current?.clientHeight||100;window.innerHeight<=l?z.current=N.create({trigger:c.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:x=>{const h=x.progress*40-20;w.set(b.current,{yPercent:h})}}):(I.current=N.create({trigger:c.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:x=>{const h=x.progress*20-20;w.set(b.current,{yPercent:h})}}),C.current=N.create({trigger:c.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:x=>{const h=x.progress*20;w.set(b.current,{yPercent:h})}}))}return Q&&t(),()=>{z.current&&z.current.kill(),I.current&&I.current.kill(),C.current&&C.current.kill()}},[Q,n.items]),n.items&&n.items.length>0?e(ze,{data:n,className:y,classNames:d,onPrimaryClick:M,onSecondaryClick:R,ref:E,...D}):e("div",{...D,ref:me,"data-ui-component-id":"HeroBanner",children:m("div",{ref:c,className:i(ue==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":V==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":V==="sm"},y),children:[q&&e("a",{className:"absolute inset-0 z-10",href:S(B(q),`${p}_${u}`),"data-headless-type-name":`${p}#${u}`,"data-headless-title-desc-button":`${o}#${r}`,tabIndex:-1,"aria-hidden":"true","aria-label":de}),e("div",{ref:b,className:i("absolute left-0 top-0 size-full"),children:ie?e(ye,{poster:F?k?.url:A?_?.url||k?.url:f?.url,src:F?G?.url:A?le?.url||G?.url:se?.url,className:"laptop:w-full h-full",videoClassName:"h-full object-cover",muted:!0,loop:pe,playsInline:!0}):e(te,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:f?.alt||"",source:`${f?.url||""} , ${_?.url??(k?.url||"")} 1024, ${k?.url||""} 767`})}),m("div",{className:Ce({align:g}),children:[m("div",{className:Ie({align:g}),children:[U&&e(P,{size:2,as:"p",className:i("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:U}),o&&e(ke,{as:H==="4"?"h1":"h2",html:o,className:i("hero-banner-title",d.title),size:H?Number(H||"5"):V==="sm"?4:5}),r&&e(P,{as:"p",size:2,className:i("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm"),html:r}),J&&e("div",{className:"mt-3",children:e(we,{endDate:J,endDate_tz:oe,dateFormat:ne,variant:"spacious",align:g})})]}),m("div",{className:Le({align:g}),children:[a?.isShowPlayVideoButton&&a?.playVideoButtonText?m(L,{onClick:()=>Y(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button","data-headless-type-name":`${p}#${u}`,"data-headless-title-desc-button":`${o}#${r}#${a?.playVideoButtonText}`,children:[a?.playVideoButtonText," ",e(Se,{size:"lg"})]}):a?.text?m(L,{"aria-label":o??r,size:"lg",variant:"secondary",className:"hero-banner-secondary-button",as:a?.isCustomSecondaryButton?"button":"a",href:S(B(a?.link),`${p}_${u}`),onClick:t=>{if(a.link?.startsWith("#")){t.preventDefault();const l=document.querySelector(a.link);l&&X(l,O)}a?.isCustomSecondaryButton&&R?.(n,t,a?.customSecondaryEventId)},"data-headless-type-name":`${p}#${u}`,"data-headless-title-desc-button":`${o}#${r}#${a?.text}`,children:[a?.text,e("span",{className:"sr-only",children:o??r})]}):null,s&&s.text&&e(L,{"aria-label":o??r,size:"lg",variant:"primary",className:"hero-banner-primary-button",as:s?.isCustomPrimaryButton?"button":"a",href:S(B(s.link),`${p}_${u}`),onClick:t=>{if(s.link?.startsWith("#")){t.preventDefault();const l=document.querySelector(s.link);l&&X(l,O)}s?.isCustomPrimaryButton&&M?.(n,t,s?.customPrimaryEventId)},"data-headless-type-name":`${p}#${u}`,"data-headless-title-desc-button":`${o}#${r}#${s?.text}`,children:s.text})]}),e("div",{className:Pe({align:g}),children:ce?.map(t=>e("div",{className:"h-12",children:e(te,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:t?.pcImage?.alt||"",source:t?.pcImage?.url})},t?.pcImage?.url||t?.pcImage?.alt))})]}),T.length>0&&e("div",{className:i("hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",d.captionGroup),children:T.map((t,l)=>m(K.Fragment,{children:[e(P,{size:2,className:i("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:t.title}),l<T.length-1&&e("div",{className:i("bg-info-primary w-px")})]},t.title))}),W&&e(Te,{visible:W,videoUrl:a?.isYoutubeVideo?void 0:a?.videoUrl?.url,youTubeId:a?.isYoutubeVideo?a?.youtubeId:void 0,onCloseModal:()=>Y(!1)})]})})});ae.displayName="HeroBanner";var tt=Ne(ae);export{tt as default};
1
+ "use client";import{jsx as e,jsxs as d}from"react/jsx-runtime";import re,{useImperativeHandle as ve,useRef as y,useState as ke,useEffect as we}from"react";import w from"gsap";import{ScrollTrigger as $}from"gsap/dist/ScrollTrigger";import ae from"jump.js";import{useMediaQuery as oe}from"react-responsive";import{useInView as $e}from"react-intersection-observer";import Be from"../../helpers/ScrollLoadVideo.js";import{Button as L,Heading as Ne,Picture as ne,Text as S,Countdown as Ve}from"../../components/index.js";import{cn as s}from"../../helpers/index.js";import{cva as B}from"class-variance-authority";import{withLayout as He}from"../../shared/Styles.js";import{useExposure as Te}from"../../hooks/useExposure.js";import{trackUrlRef as R}from"../../shared/trackUrlRef.js";import{getLocalizedPath as ze}from"../../helpers/utils.js";import{useAiuiContext as Ce}from"../AiuiProvider/index.js";import{sizeMap as Ie}from"../../components/button.js";import{VideoModal as Pe}from"../VideoModal/index.js";import Le from"./HeroBannerCarousel.js";const u="image",c="hero_banner",Se=B("hero-banner-content lg-desktop:gap-[32px] absolute top-24 z-10 flex w-full flex-col gap-[24px]",{variants:{align:{left:"tablet:px-[32px] laptop:top-1/2 laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] laptop:-translate-y-1/2 left-0 px-[16px]",center:"tablet:top-[84px] laptop:top-[76px] desktop:top-[176px] lg-desktop:top-[192px] left-1/2 top-[84px] -translate-x-1/2 translate-y-0 items-center text-center"}},defaultVariants:{align:"left"}}),Re=B("hero-banner-wrap-text lg-desktop:max-w-[824px] desktop:max-w-[648px] laptop:max-w-[440px] tablet:max-w-[704px] max-w-[358px]",{variants:{align:{left:"laptop:text-left",center:"text-center"}},defaultVariants:{align:"left"}}),De=B("hero-banner-button-group lg-desktop:gap-3 flex items-center gap-2",{variants:{align:{left:"laptop:justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),Me=B("hero-banner-icon-group flex items-center gap-2",{variants:{align:{left:"justify-start",center:"justify-center"}},defaultVariants:{align:"left"}}),Ee=({size:l="base"})=>{const{width:v,height:i}=Ie[l];return e("svg",{width:v,height:i,viewBox:"0 0 20 20",fill:"currentcolor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M13.9599 9.30662C14.4547 9.63647 14.4547 10.3635 13.9599 10.6934L6.29558 15.8029C5.74179 16.1721 5 15.7751 5 15.1096V4.89042C5 4.22484 5.74179 3.82785 6.29558 4.19705L13.9599 9.30662Z",fill:"currentcolor"})})},le=re.forwardRef(({data:l,className:v,classNames:i={},onSecondaryClick:D,onPrimaryClick:M,jumpOptions:se={},...E},_)=>{const{locale:j,trackingData:N}=Ce(),A={...{duration:500,offset:0},...se},V=r=>!r||!j?r:ze(r,j),{label:O,title:n,subtitle:a,endDate:U,endDate_tz:ie,dateFormat:pe,pcImage:f,padImage:G,mobileImage:k,pcVideo:ue,padVideo:ce,mobileVideo:J,isShowVideo:me,isVideoLoop:de=!0,primaryButton:o,secondaryButton:t,theme:fe="light",size:H="default",titleSize:T,caption:q=[],blockLink:F,iconArray:W,align:g="left",enableParallax:Y=!0}=l,z=Array.isArray(q)?q:[],ge=Array.isArray(W)?W:void 0,Q=oe({query:"(max-width: 768px)"}),Z=oe({query:"(max-width: 1024px)"}),[K,X]=ke(!1),{ref:be,inView:ee}=$e(),C=y(null),I=y(null),P=y(null),b=y(null),m=y(null),xe=n?.trim()||a?.trim()||f?.alt?.trim()||void 0,he=n!==void 0?n?.trim()||a?.trim()||f?.alt?.trim()||void 0:a&&a.trim()||"",ye=a&&a.trim()||"";return Te(m,{componentType:u,componentName:c,componentTitle:he,componentDescription:ye}),ve(_,()=>m.current),we(()=>{if(l.items&&l.items.length>0||!Y)return;w.registerPlugin($);function r(){if(!b.current)return;const p=m.current?.clientHeight||100;window.innerHeight<=p?C.current=$.create({trigger:m.current,start:"top bottom",end:"bottom top",scrub:!0,onUpdate:x=>{const h=x.progress*40-20;w.set(b.current,{yPercent:h})}}):(P.current=$.create({trigger:m.current,start:"top bottom",end:"bottom bottom",scrub:!0,onUpdate:x=>{const h=x.progress*20-20;w.set(b.current,{yPercent:h})}}),I.current=$.create({trigger:m.current,start:"top top",end:"bottom top",scrub:!0,onUpdate:x=>{const h=x.progress*20;w.set(b.current,{yPercent:h})}}))}return ee&&r(),()=>{C.current&&C.current.kill(),P.current&&P.current.kill(),I.current&&I.current.kill()}},[ee,l.items,Y]),l.items&&l.items.length>0?e(Le,{data:l,className:v,classNames:i,onPrimaryClick:M,onSecondaryClick:D,ref:_,...E}):e("div",{...E,ref:be,"data-ui-component-id":"HeroBanner",children:d("div",{ref:m,className:s(fe==="dark"?"aiui-dark":"","text-info-primary relative w-full overflow-hidden",{"lg-desktop:aspect-[1920/930] desktop:aspect-[1440/700] laptop:aspect-[1024/520] tablet:aspect-[768/660] aspect-[390/660]":H==="default","lg-desktop:aspect-[1920/800] desktop:aspect-[1440/640] laptop:aspect-[1024/480] tablet:aspect-[768/560] aspect-[390/560]":H==="sm"},v),children:[F&&e("a",{className:"absolute inset-0 z-10",href:R(V(F),`${N?.contextHandle||""}_${u}_${c}`),"data-headless-type-name":`${u}#${c}`,"data-headless-title-desc-button":`${n}#${a}`,tabIndex:-1,"aria-hidden":"true","aria-label":xe}),e("div",{ref:b,className:s("absolute left-0 top-0 size-full"),children:me?e(Be,{poster:Q?k?.url:Z?G?.url||k?.url:f?.url,src:Q?J?.url:Z?ce?.url||J?.url:ue?.url,className:"laptop:w-full h-full",videoClassName:"h-full object-cover",muted:!0,loop:de,playsInline:!0}):e(ne,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",fetchPriority:"high",alt:f?.alt||"",source:`${f?.url||""} , ${G?.url??(k?.url||"")} 1024, ${k?.url||""} 767`})}),d("div",{className:Se({align:g}),children:[d("div",{className:Re({align:g}),children:[O&&e(S,{size:2,as:"p",className:s("hero-banner-label font-heading lg-desktop:text-[18px] desktop:text-base text-sm"),html:O}),n&&e(Ne,{as:T==="4"?"h1":"h2",html:n,className:s("hero-banner-title",i.title),size:T?Number(T||"5"):H==="sm"?4:5}),a&&e(S,{as:"p",size:2,className:s("hero-banner-subtitle font-heading lg-desktop:text-[18px] desktop:text-base laptop:mt-2 lg-desktop:mt-4 mt-1 text-sm",i.subtitle),html:a}),U&&e("div",{className:"mt-3",children:e(Ve,{endDate:U,endDate_tz:ie,dateFormat:pe,variant:"spacious",align:g})})]}),d("div",{className:s(De({align:g}),i.buttonGroup),children:[t?.isShowPlayVideoButton&&t?.playVideoButtonText?d(L,{onClick:()=>X(!0),size:"lg",variant:"secondary",className:"hero-banner-play-video-button","data-headless-type-name":`${u}#${c}`,"data-headless-title-desc-button":`${n}#${a}#${t?.playVideoButtonText}`,children:[t?.playVideoButtonText," ",e(Ee,{size:"lg"})]}):t?.text?d(L,{"aria-label":n??a,size:"lg",variant:"secondary",className:s("hero-banner-secondary-button",i.secondaryButton),as:t?.isCustomSecondaryButton?"button":"a",href:R(V(t?.link),`${N?.contextHandle||""}_${u}_${c}`),target:t?.target,rel:t?.target==="_blank"?t?.rel??"noopener noreferrer":t?.rel,onClick:r=>{if(t.link?.startsWith("#")){r.preventDefault();const p=document.querySelector(t.link);p&&ae(p,A)}t?.isCustomSecondaryButton&&D?.(l,r,t?.customSecondaryEventId)},"data-headless-type-name":`${u}#${c}`,"data-headless-title-desc-button":`${n}#${a}#${t?.text}`,children:[t?.text,e("span",{className:"sr-only",children:n??a})]}):null,o&&o.text&&e(L,{"aria-label":n??a,size:"lg",variant:"primary",className:s("hero-banner-primary-button",i.primaryButton),as:o?.isCustomPrimaryButton?"button":"a",href:R(V(o.link),`${N?.contextHandle||""}_${u}_${c}`),target:o?.target,rel:o?.target==="_blank"?o?.rel??"noopener noreferrer":o?.rel,onClick:r=>{if(o.link?.startsWith("#")){r.preventDefault();const p=document.querySelector(o.link);p&&ae(p,A)}o?.isCustomPrimaryButton&&M?.(l,r,o?.customPrimaryEventId)},"data-headless-type-name":`${u}#${c}`,"data-headless-title-desc-button":`${n}#${a}#${o?.text}`,children:o.text})]}),e("div",{className:Me({align:g}),children:ge?.map(r=>e("div",{className:"h-12",children:e(ne,{className:"laptop:w-full h-full",imgClassName:"h-full object-cover",loading:"eager",alt:r?.pcImage?.alt||"",source:r?.pcImage?.url})},r?.pcImage?.url||r?.pcImage?.alt))})]}),z.length>0&&e("div",{className:s("hero-banner-caption-group laptop:gap-3 tablet:px-[32px] laptop:px-[64px] lg-desktop:px-[calc(50%-832px)] desktop:pb-[24px] absolute bottom-0 z-10 flex items-stretch gap-2 px-[16px] pb-[16px]",i.captionGroup),children:z.map((r,p)=>d(re.Fragment,{children:[e(S,{size:2,className:s("hero-banner-product-text tablet:w-[108px] loptop:w-[150px] desktop:w-[156px] lg-desktop:w-[180px] laptop:text-[14px] flex-1 text-[12px]"),html:r.title}),p<z.length-1&&e("div",{className:s("bg-info-primary w-px")})]},r.title))}),K&&e(Pe,{visible:K,videoUrl:t?.isYoutubeVideo?void 0:t?.videoUrl?.url,youTubeId:t?.isYoutubeVideo?t?.youtubeId:void 0,onCloseModal:()=>X(!1)})]})})});le.displayName="HeroBanner";var nt=He(le);export{nt as default};
2
2
  //# sourceMappingURL=HeroBanner.js.map