@anker-in/headless-ui 1.3.41 → 1.3.43

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 (65) hide show
  1. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  2. package/dist/cjs/biz-components/GraphicOverlay/GraphicOverlay.js.map +2 -2
  3. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +3 -1
  4. package/dist/cjs/biz-components/Listing/BizProductProvider.js +1 -1
  5. package/dist/cjs/biz-components/Listing/BizProductProvider.js.map +3 -3
  6. package/dist/cjs/biz-components/Listing/components/CartActionButtons/index.d.ts +9 -1
  7. package/dist/cjs/biz-components/Listing/components/CartActionButtons/index.js +1 -1
  8. package/dist/cjs/biz-components/Listing/components/CartActionButtons/index.js.map +3 -3
  9. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  10. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  11. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  12. package/dist/cjs/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  13. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  14. package/dist/cjs/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  15. package/dist/cjs/biz-components/NotifyMeDialog/NotifyMeDialog.d.ts +7 -0
  16. package/dist/cjs/biz-components/NotifyMeDialog/NotifyMeDialog.js +2 -0
  17. package/dist/cjs/biz-components/NotifyMeDialog/NotifyMeDialog.js.map +7 -0
  18. package/dist/cjs/biz-components/NotifyMeDialog/index.d.ts +2 -0
  19. package/dist/cjs/biz-components/NotifyMeDialog/index.js +2 -0
  20. package/dist/cjs/biz-components/NotifyMeDialog/index.js.map +7 -0
  21. package/dist/cjs/biz-components/NotifyMeDialog/types.d.ts +111 -0
  22. package/dist/cjs/biz-components/NotifyMeDialog/types.js +2 -0
  23. package/dist/cjs/biz-components/NotifyMeDialog/types.js.map +7 -0
  24. package/dist/cjs/biz-components/ProductNav/ProductNav.js +1 -1
  25. package/dist/cjs/biz-components/ProductNav/ProductNav.js.map +3 -3
  26. package/dist/cjs/biz-components/ProductNav/types.d.ts +3 -1
  27. package/dist/cjs/biz-components/ProductNav/types.js.map +1 -1
  28. package/dist/cjs/biz-components/index.d.ts +2 -0
  29. package/dist/cjs/biz-components/index.js +1 -1
  30. package/dist/cjs/biz-components/index.js.map +3 -3
  31. package/dist/cjs/components/tabs.js +1 -1
  32. package/dist/cjs/components/tabs.js.map +2 -2
  33. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js +1 -1
  34. package/dist/esm/biz-components/GraphicOverlay/GraphicOverlay.js.map +2 -2
  35. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +3 -1
  36. package/dist/esm/biz-components/Listing/BizProductProvider.js +1 -1
  37. package/dist/esm/biz-components/Listing/BizProductProvider.js.map +3 -3
  38. package/dist/esm/biz-components/Listing/components/CartActionButtons/index.d.ts +9 -1
  39. package/dist/esm/biz-components/Listing/components/CartActionButtons/index.js +1 -1
  40. package/dist/esm/biz-components/Listing/components/CartActionButtons/index.js.map +3 -3
  41. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  42. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  43. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js +1 -1
  44. package/dist/esm/biz-components/Listing/components/PurchaseBar/ProductActions/index.js.map +3 -3
  45. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js +1 -1
  46. package/dist/esm/biz-components/MultiLayoutGraphicBlock/MultiLayoutGraphicBlock.js.map +2 -2
  47. package/dist/esm/biz-components/NotifyMeDialog/NotifyMeDialog.d.ts +7 -0
  48. package/dist/esm/biz-components/NotifyMeDialog/NotifyMeDialog.js +2 -0
  49. package/dist/esm/biz-components/NotifyMeDialog/NotifyMeDialog.js.map +7 -0
  50. package/dist/esm/biz-components/NotifyMeDialog/index.d.ts +2 -0
  51. package/dist/esm/biz-components/NotifyMeDialog/index.js +2 -0
  52. package/dist/esm/biz-components/NotifyMeDialog/index.js.map +7 -0
  53. package/dist/esm/biz-components/NotifyMeDialog/types.d.ts +111 -0
  54. package/dist/esm/biz-components/NotifyMeDialog/types.js +1 -0
  55. package/dist/esm/biz-components/NotifyMeDialog/types.js.map +7 -0
  56. package/dist/esm/biz-components/ProductNav/ProductNav.js +1 -1
  57. package/dist/esm/biz-components/ProductNav/ProductNav.js.map +3 -3
  58. package/dist/esm/biz-components/ProductNav/types.d.ts +3 -1
  59. package/dist/esm/biz-components/index.d.ts +2 -0
  60. package/dist/esm/biz-components/index.js +1 -1
  61. package/dist/esm/biz-components/index.js.map +3 -3
  62. package/dist/esm/components/tabs.js +1 -1
  63. package/dist/esm/components/tabs.js.map +2 -2
  64. package/package.json +1 -1
  65. package/style.css +33 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/biz-components/index.ts"],
4
- "sourcesContent": ["export { default as ActivitySchedule } from './ActivitySchedule/index.js'\nexport type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './ActivitySchedule/types.js'\nexport { default as GiftShelf } from './GiftShelf/index.js'\nexport type {\n GiftShelfProps,\n GiftShelfData,\n GiftShelfItem,\n CountdownConfig,\n ResponsiveBackgroundImage as GiftShelfResponsiveBackgroundImage,\n} from './GiftShelf/types.js'\nexport { default as GiftTierShelf } from './GiftTierShelf/index.js'\nexport type { GiftTierShelfProps, GiftTierShelfData, GiftTierItem, GiftTierProduct } from './GiftTierShelf/types.js'\nexport { default as ActivityMechanism } from './ActivityMechanism/index.js'\nexport type {\n ActivityMechanismProps,\n ActivityMechanismItem,\n ActivityMechanismSemanticName,\n ResponsiveBackgroundImage,\n} from './ActivityMechanism/types.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as MarqueeReview } from './MarqueeReview/index.js'\nexport type { MarqueeReviewProps, MarqueeReviewData, ReviewItem } from './MarqueeReview/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as SwiperBox } from './SwiperBox/index.js'\nexport { VideoModal } from './VideoModal/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as BizProductProvider, useBizProductContext } from './Listing/BizProductProvider.js'\nexport { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js'\nexport { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './Listing/components/ProductCard/index.js'\nexport { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js'\nexport { default as ProductBenefits } from './Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js'\nexport { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js'\nexport { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js'\nexport { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js'\nexport { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js'\nexport { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js'\nexport { default as ProductCoupon } from './Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js'\nexport { default as ProductBanner } from './Listing/components/ProductCard/ProductDetail/ProductBanner/index.js'\nexport { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js'\nexport { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js'\nexport { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js'\nexport { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js'\nexport { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab.js'\nexport { default as PaidShipping } from './Listing/components/PaidShipping/index.js'\nexport { default as CartActionButtons } from './Listing/components/CartActionButtons/index.js'\nexport type { CartActionButtonsProps } from './Listing/components/CartActionButtons/index.js'\nexport { default as ProductServiceBenefits } from './Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js'\nexport type {\n ProductServiceBenefitsProps,\n ServiceBenefitItem,\n} from './Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js'\nexport { default as ProductPaidShipping } from './Listing/components/ProductCard/ProductPaidShipping/index.js'\n\nexport { default as GraphicMore } from './GraphicMore/index.js'\nexport { default as Features } from './Features/index.js'\nexport { default as AplusDesc } from './AplusDesc/index.js'\nexport { default as GiftBox } from './GiftBox/index.js'\nexport { default as SelectStore } from './SelectStore/index.js'\nexport { default as DownLoad } from './DownLoad/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\nexport { default as BrandCardLink } from './BrandCardLink/index.js'\nexport type { BrandCardLinkProps, BrandCardLinkItemProps } from './BrandCardLink/types.js'\n\nexport * as IPRedirect from './IPRedirect/index.js'\n\nexport { default as WheelLottery } from './WheelLottery/index.js'\nexport type {\n WheelLotteryProps,\n WheelLotteryHandle,\n Prize,\n ChanceMethod,\n WinningInfo,\n UserData,\n} from './WheelLottery/types.js'\nexport { default as ProductLottery } from './ProductLottery/index.js'\nexport type { ProductLotteryProps, ProductLotteryHandle, MediaConfig, CtaButtonConfig } from './ProductLottery/types.js'\nexport { default as ProductCompare } from './ProductCompare/index.js'\nexport type { ProductCompareProps, ProductItemData } from './ProductCompare/index.js'\nexport { default as Ksp } from './Ksp/index.js'\nexport type { KspProps, KspData, KspCardItem } from './Ksp/index.js'\nexport { default as ImageTextFeature } from './ImageTextFeature/index.js'\nexport type { ImageTextFeatureProps, ImageTextFeatureItem } from './ImageTextFeature/index.js'\nexport { default as FeatureCards } from './FeatureCards/index.js'\nexport type { FeatureCardsProps, FeatureCardItem } from './FeatureCards/index.js'\nexport { default as FeaturedBlogPosts } from './FeaturedBlogPosts/index.js'\nexport type {\n FeaturedBlogPostsProps,\n FeaturedBlogPostsData,\n FeaturedBlogPostItem,\n FeaturedBlogPostSpan,\n} from './FeaturedBlogPosts/index.js'\nexport { default as ImageWithText } from './ImageWithText/index.js'\nexport type { ImageWithTextProps } from './ImageWithText/index.js'\nexport { default as VideoFeature } from './VideoFeature/index.js'\nexport type { VideoFeatureProps } from './VideoFeature/index.js'\nexport { default as TabsWithMedia } from './TabsWithMedia/index.js'\nexport type { TabsWithMediaProps, TabItem, TimeIndex } from './TabsWithMedia/index.js'\nexport { default as TabWithImage } from './TabWithImage/index.js'\nexport type { TabWithImageProps, TabWithImageDataItem } from './TabWithImage/index.js'\nexport { default as FeatureShowcase } from './FeatureShowcase/index.js'\nexport type { FeatureShowcaseProps, FeatureShowcaseItem } from './FeatureShowcase/index.js'\nexport { default as ProductHero } from './ProductHero/index.js'\nexport type { ProductHeroProps } from './ProductHero/index.js'\nexport { default as SpecsComparison } from './SpecsComparison/index.js'\nexport type {\n SpecsComparisonProps,\n SpecsComparisonMenuItem,\n SpecsComparisonLeftMenuItem,\n} from './SpecsComparison/index.js'\nexport { default as MediaSceneSwitcher } from './MediaSceneSwitcher/index.js'\nexport type { MediaSceneSwitcherProps } from './MediaSceneSwitcher/types.js'\nexport { default as MediaSceneSwitcherV2 } from './MediaSceneSwitcherV2/index.js'\nexport type {\n MediaSceneSwitcherV2Props,\n MediaSceneSwitcherV2Data,\n MediaSceneSwitcherV2Item,\n MediaSceneSwitcherV2Layout,\n} from './MediaSceneSwitcherV2/index.js'\nexport { default as ThreeDCarousel } from './ThreeDCarousel/index.js'\nexport type { ThreeDCarouselProps } from './ThreeDCarousel/index.js'\nexport { default as ProductNav } from './ProductNav/index.js'\nexport type { ProductNavProps, TabLink, AnchorItem, BuyButton } from './ProductNav/index.js'\nexport { default as AnchorNavigation } from './AnchorNavigation/index.js'\nexport { default as PromotionalBar } from './PromotionalBar/index.js'\nexport { default as EventSchedule } from './EventSchedule/index.js'\nexport { default as SecondaryBanner } from './SecondaryBanner/index.js'\nexport { default as BuyOneGetOneShelf } from './BuyOneGetOneShelf/index.js'\nexport { default as ActiveShelf } from './ActiveShelf/index.js'\nexport { default as MediaShelf } from './MediaShelf/index.js'\nexport { default as CreditsShelf, CreditsProductCard } from './CreditsShelf/index.js'\nexport type {\n CreditsShelfSemanticName,\n CreditsProductCardData,\n CopyConfig as CreditsShelfCopyConfig,\n ButtonFunctionType as CreditsShelfButtonFunctionType,\n} from './CreditsShelf/index.js'\nexport { default as SceneShelf, SceneProductCard } from './SceneShelf/index.js'\nexport type { SceneShelfSemanticName, SceneProductCardData, SceneProductCardSemanticName } from './SceneShelf/index.js'\nexport { default as SceneShelfV2, SceneShelfV2ProductCard } from './SceneShelfV2/index.js'\nexport type {\n SceneShelfV2SemanticName,\n SceneShelfV2Data,\n SceneShelfV2Product,\n SceneShelfV2Props,\n} from './SceneShelfV2/index.js'\nexport { default as SceneShelfV3 } from './SceneShelfV3/index.js'\nexport type { SceneShelfV3Data, SceneShelfV3Props, ProductTab as SceneShelfV3ProductTab } from './SceneShelfV3/index.js'\nexport type {\n SceneShelfV3SemanticName,\n ProductCardData as SceneShelfV3ProductCardData,\n} from './SceneShelfV3/ProductCard.js'\n\nexport { default as MediaEndorsement } from './MediaEndorsement/index.js'\nexport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './MediaEndorsement/index.js'\n\nexport { default as MediaTextOverlay } from './MediaTextOverlay/index.js'\nexport type {\n MediaTextOverlayProps,\n MediaTextOverlayData,\n MediaTextOverlayItem,\n MediaTextOverlaySemanticName,\n ResponsiveMedia,\n} from './MediaTextOverlay/index.js'\n\n// Copy configuration types and defaults\nexport type {\n CopyConfig as MediaShelfCopyConfig,\n ButtonFunctionType as MediaShelfButtonFunctionType,\n} from './MediaShelf/types.js'\nexport type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js'\n\nexport {\n default as ImageOverlayShelf,\n type ButtonFunctionType as ImageOverlayShelfButtonFunctionType,\n} from './ImageOverlayShelf/index.js'\n\nexport { default as ImageTextOverlay } from './ImageTextOverlay/index.js'\nexport type {\n ImageTextOverlayProps,\n ImageTextOverlayData,\n ImageTextOverlayItem,\n ImageTextOverlaySemanticName,\n ImageTextOverlayBackgroundImage,\n} from './ImageTextOverlay/types.js'\n\n// MiniCart \u7EC4\u4EF6\u53CA\u7C7B\u578B\u5BFC\u51FA\nexport { default as MiniCart } from './MiniCart/index.js'\nexport type { Cart, CartLineItem, MiniCartData, MiniCartProps, CircleProgressConfig } from './MiniCart/index.js'\nexport { default as MiniCartCircleProgress } from './MiniCart/CircleProgress.js'\nexport type { CircleProgressProps as MiniCartCircleProgressProps } from './MiniCart/CircleProgress.js'\nexport { default as MiniCartDialog, MiniCartDialog as MiniCartDialogComponent } from './MiniCart/MiniCartDialog.js'\nexport type {\n MiniCartDialogProps,\n MiniCartDialogCopy,\n MiniCartDialogSemanticName,\n CartData,\n} from './MiniCart/MiniCartDialog.js'\n\n// \u2500\u2500\u2500 Web Push \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { default as WebPushPopup } from './WebPushPopup/index.js'\nexport type { WebPushPopupProps } from './WebPushPopup/index.js'\nexport { useEmarsysWebPush } from '../hooks/useEmarsysWebPush.js'\nexport type {\n UseEmarsysWebPushOptions,\n UseEmarsysWebPushReturn,\n EmarsysContactInfo,\n EmarsysInitConfig,\n} from '../hooks/useEmarsysWebPush.js'\n\n/**\n * \u7EC4\u4EF6\u6620\u5C04\u5BF9\u8C61\n * \u5C06 CMS block type \u6620\u5C04\u5230\u53EF\u76F4\u63A5\u6E32\u67D3\u7684\u9759\u6001\u7EC4\u4EF6\u540D\u79F0\u3002\n * \u53EA\u6709\u5F00\u7BB1\u5373\u7528\u3001\u65E0\u9700\u6D88\u8D39\u8005\u4E8C\u6B21\u5C01\u88C5\u7684\u7EC4\u4EF6\u624D\u5E94\u52A0\u5165\u6B64\u6620\u5C04\u3002\n */\nexport const PAYLOAD_COMPONENT_MAP = {\n 'ipc-accordioncards': 'AccordionCards',\n 'ipc-aplusdesc': 'AplusDesc',\n 'ipc-banner': 'HeroBanner',\n 'ipc-brand-equity': 'BrandEquity',\n 'ipc-category': 'Category',\n 'ipc-collection-banner': 'CollectionBanner',\n 'ipc-collection-shelves': 'CollectionShelves',\n 'ipc-creativemodule': 'CreativeModule',\n 'ipc-download': 'DownLoad',\n 'ipc-evaluate': 'Evaluate',\n 'ipc-faq': 'Faq',\n 'ipc-features': 'Features',\n 'ipc-footcharger': 'FootCharger',\n 'ipc-ga-block': 'GraphicAttractionBlock',\n 'ipc-giftbox': 'GiftBox',\n 'ipc-giftshelf': 'GiftShelf',\n 'ipc-graphic': 'Graphic',\n 'ipc-graphicmore': 'GraphicMore',\n 'ipc-graphicoverlay': 'GraphicOverlay',\n 'ipc-marquee': 'Marquee',\n 'ipc-mediaplayerbase': 'MediaPlayerBase',\n 'ipc-mediaplayermulti': 'MediaPlayerMulti',\n 'ipc-mediaplayersticky': 'MediaPlayerSticky',\n 'ipc-member-equity': 'MemberEquity',\n 'ipc-mlg-block': 'MultiLayoutGraphicBlock',\n 'ipc-search-page-tabs': 'SearchPageBlock',\n 'ipc-selectstore': 'SelectStore',\n 'ipc-shelfdisplay': 'ShelfDisplay',\n 'ipc-slogan': 'Slogan',\n 'ipc-spacer': 'Spacer',\n 'ipc-specs': 'Specs',\n 'ipc-tabs': 'Tabs',\n 'ipc-text-marquee': 'TextMarquee',\n 'ipc-title': 'Title',\n 'ipc-whychoose': 'WhyChoose',\n 'ipc-product-nav': 'ProductNav',\n 'ipc-brand-card-link': 'BrandCardLink',\n 'ipc-ipredirect': 'IPRedirect',\n ksp: 'Ksp',\n 'ipc-secondary-banner': 'SecondaryBanner',\n 'ipc-media-endorsement': 'MediaEndorsement',\n 'ipc-media-scene-switcher-v2': 'MediaSceneSwitcherV2',\n 'ipc-featured-blog-posts': 'FeaturedBlogPosts',\n 'ipc-media-text-overlay': 'MediaTextOverlay',\n ProductCompare: 'ProductCompare',\n}\n\n// \u516C\u5F00\u5BFC\u51FA useAiuiContext hook\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u6D88\u8D39\u8005\u4F7F\u7528\uFF09\nexport { useAiuiContext } from './AiuiProvider/index.js'\n\n// \u516C\u5F00\u5BFC\u51FA ContainerProps\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u4F7F\u7528\uFF09\nexport type { ContainerProps } from '../shared/Styles.js'\n\n// Modal components\nexport { default as ModalRegisterSubscribe } from './ModalRegisterSubscribe/index.js'\nexport { default as ModalSubscribeConfirm } from './ModalSubscribeConfirm/index.js'\nexport { default as ModalCoupon } from './ModalCoupon/index.js'\nexport { default as ModalSmsSubscribe } from './ModalSmsSubscribe/index.js'\nexport { default as ModalVerify } from './ModalVerify/index.js'\n"],
5
- "mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,mjCAAAE,GAAA,67BAAAC,GAAA,8lDAAAC,GAAAJ,IAAA,IAAAK,EAA4C,0CAE5CC,EAAqC,mCAQrCC,EAAyC,uCAEzCC,EAA6C,2CAO7CC,EAAuC,qCACvCC,EAAwC,sCACxCC,EAAkC,gCAClCC,EAAiC,+BACjCC,EAAkC,gCAClCC,EAAwC,sCACxCC,EAAoC,kCACpCC,EAAoC,kCACpCC,EAAsC,oCACtCC,EAA0C,wCAC1CC,EAAmC,iCACnCC,EAA2C,yCAC3CC,EAA6C,2CAC7CC,EAA4C,0CAC5CC,EAAmC,iCACnCC,EAAyC,uCAEzCC,EAAqC,mCACrCC,EAA+B,6BAC/BH,EAAqE,8BACrEI,EAAmD,iDAEnDC,EAAkD,gDAElDC,E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GAGO,2CAEPC,GAA4C,0CAU5CC,GAAoC,kCAEpCC,GAAkD,2CAElDC,EAAqF,2CASrFC,GAAwC,sCAExCC,GAAkC,yCA8DlC3E,GAA+B,mCAM/B4E,GAAkD,gDAClDC,GAAiD,+CACjDC,GAAuC,qCACvCC,GAA6C,2CAC7CC,GAAuC,qCA3DhC,MAAM/G,GAAwB,CACnC,qBAAsB,iBACtB,gBAAiB,YACjB,aAAc,aACd,mBAAoB,cACpB,eAAgB,WAChB,wBAAyB,mBACzB,yBAA0B,oBAC1B,qBAAsB,iBACtB,eAAgB,WAChB,eAAgB,WAChB,UAAW,MACX,eAAgB,WAChB,kBAAmB,cACnB,eAAgB,yBAChB,cAAe,UACf,gBAAiB,YACjB,cAAe,UACf,kBAAmB,cACnB,qBAAsB,iBACtB,cAAe,UACf,sBAAuB,kBACvB,uBAAwB,mBACxB,wBAAyB,oBACzB,oBAAqB,eACrB,gBAAiB,0BACjB,uBAAwB,kBACxB,kBAAmB,cACnB,mBAAoB,eACpB,aAAc,SACd,aAAc,SACd,YAAa,QACb,WAAY,OACZ,mBAAoB,cACpB,YAAa,QACb,gBAAiB,YACjB,kBAAmB,aACnB,sBAAuB,gBACvB,iBAAkB,aAClB,IAAK,MACL,uBAAwB,kBACxB,wBAAyB,mBACzB,8BAA+B,uBAC/B,0BAA2B,oBAC3B,yBAA0B,mBAC1B,eAAgB,gBAClB",
6
- "names": ["biz_components_exports", "__export", "IPRedirect", "PAYLOAD_COMPONENT_MAP", "__toCommonJS", "import_ActivitySchedule", "import_GiftShelf", "import_GiftTierShelf", "import_ActivityMechanism", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_Title", "import_Spacer", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_MediaPlayerBase", "import_MediaPlayerSticky", "import_MediaPlayerMulti", "import_Marquee", "import_MarqueeReview", "import_WhyChoose", "import_Faq", "import_MultiLayoutGraphicBlock", "import_GraphicAttractionBlock", "import_HeaderNavigation", "import_FooterNavigation", "import_SearchPage", "import_types", "import_Styles", "import_AiuiProvider", "import_Tabs", "import_SwiperBox", "import_VideoModal", "import_CreativeModule", "import_GraphicOverlay", "import_Specs", "import_TabsGroup", "import_BizProductProvider", "import_PurchaseBar", "import_ProductActions", "import_ProductCard", "import_ProductBenefitsTabs", "import_ProductBenefits", "import_ProductHighlight", "import_ProductFreeGift", "import_ProductExchangePurchase", "import_ProductOptions", "import_ProductBundle", "import_ProductCoupon", "import_ProductBanner", "import_ProductGridBox", "import_ProductGallery", "import_ProductDetail", "import_ProductSummary", "import_BenefitsTab", "import_PaidShipping", "import_CartActionButtons", "import_ProductServiceBenefits", "import_ProductPaidShipping", "import_GraphicMore", "import_Features", "import_AplusDesc", "import_GiftBox", "import_SelectStore", "import_DownLoad", "import_FootCharger", "import_BrandCardLink", "import_WheelLottery", "import_ProductLottery", "import_ProductCompare", "import_Ksp", "import_ImageTextFeature", "import_FeatureCards", "import_FeaturedBlogPosts", "import_ImageWithText", "import_VideoFeature", "import_TabsWithMedia", "import_TabWithImage", "import_FeatureShowcase", "import_ProductHero", "import_SpecsComparison", "import_MediaSceneSwitcher", "import_MediaSceneSwitcherV2", "import_ThreeDCarousel", "import_ProductNav", "import_AnchorNavigation", "import_PromotionalBar", "import_EventSchedule", "import_SecondaryBanner", "import_BuyOneGetOneShelf", "import_ActiveShelf", "import_MediaShelf", "import_CreditsShelf", "import_SceneShelf", "import_SceneShelfV2", "import_SceneShelfV3", "import_MediaEndorsement", "import_MediaTextOverlay", "import_ImageOverlayShelf", "import_ImageTextOverlay", "import_MiniCart", "import_CircleProgress", "import_MiniCartDialog", "import_WebPushPopup", "import_useEmarsysWebPush", "import_ModalRegisterSubscribe", "import_ModalSubscribeConfirm", "import_ModalCoupon", "import_ModalSmsSubscribe", "import_ModalVerify"]
4
+ "sourcesContent": ["export { default as ActivitySchedule } from './ActivitySchedule/index.js'\nexport type { ActivityScheduleProps, ActivityScheduleData, ActivityScheduleItem } from './ActivitySchedule/types.js'\nexport { default as GiftShelf } from './GiftShelf/index.js'\nexport type {\n GiftShelfProps,\n GiftShelfData,\n GiftShelfItem,\n CountdownConfig,\n ResponsiveBackgroundImage as GiftShelfResponsiveBackgroundImage,\n} from './GiftShelf/types.js'\nexport { default as GiftTierShelf } from './GiftTierShelf/index.js'\nexport type { GiftTierShelfProps, GiftTierShelfData, GiftTierItem, GiftTierProduct } from './GiftTierShelf/types.js'\nexport { default as ActivityMechanism } from './ActivityMechanism/index.js'\nexport type {\n ActivityMechanismProps,\n ActivityMechanismItem,\n ActivityMechanismSemanticName,\n ResponsiveBackgroundImage,\n} from './ActivityMechanism/types.js'\nexport { default as BrandEquity } from './BrandEquity/index.js'\nexport { default as MemberEquity } from './MemberEquity/index.js'\nexport { default as Slogan } from './Slogan/index.js'\nexport { default as Title } from './Title/index.js'\nexport { default as Spacer } from './Spacer/index.js'\nexport { default as ShelfDisplay } from './ShelfDisplay/index.js'\nexport { default as Evaluate } from './Evaluate/index.js'\nexport { default as Category } from './Category/index.js'\nexport { default as HeroBanner } from './HeroBanner/index.js'\nexport { default as AccordionCards } from './AccordionCards/index.js'\nexport { default as Graphic } from './Graphic/index.js'\nexport { default as MediaPlayerBase } from './MediaPlayerBase/index.js'\nexport { default as MediaPlayerSticky } from './MediaPlayerSticky/index.js'\nexport { default as MediaPlayerMulti } from './MediaPlayerMulti/index.js'\nexport { default as Marquee } from './Marquee/index.js'\nexport { default as MarqueeReview } from './MarqueeReview/index.js'\nexport type { MarqueeReviewProps, MarqueeReviewData, ReviewItem } from './MarqueeReview/index.js'\nexport { default as WhyChoose } from './WhyChoose/index.js'\nexport { default as Faq } from './Faq/index.js'\nexport { MarqueeItem, MarqueeImageContent, MarqueeTextContent } from './Marquee/index.js'\nexport { default as MultiLayoutGraphicBlock } from './MultiLayoutGraphicBlock/index.js'\nexport type { MultiLayoutGraphicBlockProps } from './MultiLayoutGraphicBlock/index.js'\nexport { default as GraphicAttractionBlock } from './GraphicAttractionBlock/index.js'\nexport type { GraphicAttractionBlockProps } from './GraphicAttractionBlock/index.js'\nexport { default as HeaderNavigation } from './HeaderNavigation/index.js'\nexport { default as FooterNavigation } from './FooterNavigation/index.js'\nexport { default as SearchPage } from './SearchPage/index.js'\nexport type { SearchPageProps } from './SearchPage/types.js'\nexport { IPC_SEARCH_PAGE, SearchPageTabType } from './SearchPage/types.js'\n\nexport { withLayout } from '../shared/Styles.js'\nexport { default as AiuiProvider } from './AiuiProvider/index.js'\nexport { default as Tabs } from './Tabs/index.js'\nexport { default as SwiperBox } from './SwiperBox/index.js'\nexport { VideoModal } from './VideoModal/index.js'\nexport { default as CreativeModule } from './CreativeModule/index.js'\nexport { default as GraphicOverlay } from './GraphicOverlay/index.js'\nexport { default as Specs } from './Specs/index.js'\nexport { default as TabGroup } from './TabsGroup/index.js'\n\nexport { default as BizProductProvider, useBizProductContext } from './Listing/BizProductProvider.js'\nexport { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js'\nexport { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './Listing/components/ProductCard/index.js'\nexport { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js'\nexport { default as ProductBenefits } from './Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js'\nexport { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js'\nexport { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js'\nexport { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js'\nexport { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js'\nexport { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js'\nexport { default as ProductCoupon } from './Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js'\nexport { default as ProductBanner } from './Listing/components/ProductCard/ProductDetail/ProductBanner/index.js'\nexport { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js'\nexport { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js'\nexport { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js'\nexport { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js'\nexport { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab.js'\nexport { default as PaidShipping } from './Listing/components/PaidShipping/index.js'\nexport { default as CartActionButtons } from './Listing/components/CartActionButtons/index.js'\nexport type { CartActionButtonsProps } from './Listing/components/CartActionButtons/index.js'\nexport { NotifyMeDialog } from './NotifyMeDialog/index.js'\nexport type { NotifyMeDialogProps, CheckboxConfig, SubscriptionMeta } from './NotifyMeDialog/types.js'\nexport { default as ProductServiceBenefits } from './Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js'\nexport type {\n ProductServiceBenefitsProps,\n ServiceBenefitItem,\n} from './Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js'\nexport { default as ProductPaidShipping } from './Listing/components/ProductCard/ProductPaidShipping/index.js'\n\nexport { default as GraphicMore } from './GraphicMore/index.js'\nexport { default as Features } from './Features/index.js'\nexport { default as AplusDesc } from './AplusDesc/index.js'\nexport { default as GiftBox } from './GiftBox/index.js'\nexport { default as SelectStore } from './SelectStore/index.js'\nexport { default as DownLoad } from './DownLoad/index.js'\nexport { default as FootCharger } from './FootCharger/index.js'\nexport { default as BrandCardLink } from './BrandCardLink/index.js'\nexport type { BrandCardLinkProps, BrandCardLinkItemProps } from './BrandCardLink/types.js'\n\nexport * as IPRedirect from './IPRedirect/index.js'\n\nexport { default as WheelLottery } from './WheelLottery/index.js'\nexport type {\n WheelLotteryProps,\n WheelLotteryHandle,\n Prize,\n ChanceMethod,\n WinningInfo,\n UserData,\n} from './WheelLottery/types.js'\nexport { default as ProductLottery } from './ProductLottery/index.js'\nexport type { ProductLotteryProps, ProductLotteryHandle, MediaConfig, CtaButtonConfig } from './ProductLottery/types.js'\nexport { default as ProductCompare } from './ProductCompare/index.js'\nexport type { ProductCompareProps, ProductItemData } from './ProductCompare/index.js'\nexport { default as Ksp } from './Ksp/index.js'\nexport type { KspProps, KspData, KspCardItem } from './Ksp/index.js'\nexport { default as ImageTextFeature } from './ImageTextFeature/index.js'\nexport type { ImageTextFeatureProps, ImageTextFeatureItem } from './ImageTextFeature/index.js'\nexport { default as FeatureCards } from './FeatureCards/index.js'\nexport type { FeatureCardsProps, FeatureCardItem } from './FeatureCards/index.js'\nexport { default as FeaturedBlogPosts } from './FeaturedBlogPosts/index.js'\nexport type {\n FeaturedBlogPostsProps,\n FeaturedBlogPostsData,\n FeaturedBlogPostItem,\n FeaturedBlogPostSpan,\n} from './FeaturedBlogPosts/index.js'\nexport { default as ImageWithText } from './ImageWithText/index.js'\nexport type { ImageWithTextProps } from './ImageWithText/index.js'\nexport { default as VideoFeature } from './VideoFeature/index.js'\nexport type { VideoFeatureProps } from './VideoFeature/index.js'\nexport { default as TabsWithMedia } from './TabsWithMedia/index.js'\nexport type { TabsWithMediaProps, TabItem, TimeIndex } from './TabsWithMedia/index.js'\nexport { default as TabWithImage } from './TabWithImage/index.js'\nexport type { TabWithImageProps, TabWithImageDataItem } from './TabWithImage/index.js'\nexport { default as FeatureShowcase } from './FeatureShowcase/index.js'\nexport type { FeatureShowcaseProps, FeatureShowcaseItem } from './FeatureShowcase/index.js'\nexport { default as ProductHero } from './ProductHero/index.js'\nexport type { ProductHeroProps } from './ProductHero/index.js'\nexport { default as SpecsComparison } from './SpecsComparison/index.js'\nexport type {\n SpecsComparisonProps,\n SpecsComparisonMenuItem,\n SpecsComparisonLeftMenuItem,\n} from './SpecsComparison/index.js'\nexport { default as MediaSceneSwitcher } from './MediaSceneSwitcher/index.js'\nexport type { MediaSceneSwitcherProps } from './MediaSceneSwitcher/types.js'\nexport { default as MediaSceneSwitcherV2 } from './MediaSceneSwitcherV2/index.js'\nexport type {\n MediaSceneSwitcherV2Props,\n MediaSceneSwitcherV2Data,\n MediaSceneSwitcherV2Item,\n MediaSceneSwitcherV2Layout,\n} from './MediaSceneSwitcherV2/index.js'\nexport { default as ThreeDCarousel } from './ThreeDCarousel/index.js'\nexport type { ThreeDCarouselProps } from './ThreeDCarousel/index.js'\nexport { default as ProductNav } from './ProductNav/index.js'\nexport type { ProductNavProps, TabLink, AnchorItem, BuyButton } from './ProductNav/index.js'\nexport { default as AnchorNavigation } from './AnchorNavigation/index.js'\nexport { default as PromotionalBar } from './PromotionalBar/index.js'\nexport { default as EventSchedule } from './EventSchedule/index.js'\nexport { default as SecondaryBanner } from './SecondaryBanner/index.js'\nexport { default as BuyOneGetOneShelf } from './BuyOneGetOneShelf/index.js'\nexport { default as ActiveShelf } from './ActiveShelf/index.js'\nexport { default as MediaShelf } from './MediaShelf/index.js'\nexport { default as CreditsShelf, CreditsProductCard } from './CreditsShelf/index.js'\nexport type {\n CreditsShelfSemanticName,\n CreditsProductCardData,\n CopyConfig as CreditsShelfCopyConfig,\n ButtonFunctionType as CreditsShelfButtonFunctionType,\n} from './CreditsShelf/index.js'\nexport { default as SceneShelf, SceneProductCard } from './SceneShelf/index.js'\nexport type { SceneShelfSemanticName, SceneProductCardData, SceneProductCardSemanticName } from './SceneShelf/index.js'\nexport { default as SceneShelfV2, SceneShelfV2ProductCard } from './SceneShelfV2/index.js'\nexport type {\n SceneShelfV2SemanticName,\n SceneShelfV2Data,\n SceneShelfV2Product,\n SceneShelfV2Props,\n} from './SceneShelfV2/index.js'\nexport { default as SceneShelfV3 } from './SceneShelfV3/index.js'\nexport type { SceneShelfV3Data, SceneShelfV3Props, ProductTab as SceneShelfV3ProductTab } from './SceneShelfV3/index.js'\nexport type {\n SceneShelfV3SemanticName,\n ProductCardData as SceneShelfV3ProductCardData,\n} from './SceneShelfV3/ProductCard.js'\n\nexport { default as MediaEndorsement } from './MediaEndorsement/index.js'\nexport type {\n MediaEndorsementProps,\n MediaEndorsementData,\n MediaEndorsementItem,\n MediaEndorsementSemanticName,\n} from './MediaEndorsement/index.js'\n\nexport { default as MediaTextOverlay } from './MediaTextOverlay/index.js'\nexport type {\n MediaTextOverlayProps,\n MediaTextOverlayData,\n MediaTextOverlayItem,\n MediaTextOverlaySemanticName,\n ResponsiveMedia,\n} from './MediaTextOverlay/index.js'\n\n// Copy configuration types and defaults\nexport type {\n CopyConfig as MediaShelfCopyConfig,\n ButtonFunctionType as MediaShelfButtonFunctionType,\n} from './MediaShelf/types.js'\nexport type { CopyConfig as ActiveShelfCopyConfig, ButtonFunctionType } from './ActiveShelf/types.js'\n\nexport {\n default as ImageOverlayShelf,\n type ButtonFunctionType as ImageOverlayShelfButtonFunctionType,\n} from './ImageOverlayShelf/index.js'\n\nexport { default as ImageTextOverlay } from './ImageTextOverlay/index.js'\nexport type {\n ImageTextOverlayProps,\n ImageTextOverlayData,\n ImageTextOverlayItem,\n ImageTextOverlaySemanticName,\n ImageTextOverlayBackgroundImage,\n} from './ImageTextOverlay/types.js'\n\n// MiniCart \u7EC4\u4EF6\u53CA\u7C7B\u578B\u5BFC\u51FA\nexport { default as MiniCart } from './MiniCart/index.js'\nexport type { Cart, CartLineItem, MiniCartData, MiniCartProps, CircleProgressConfig } from './MiniCart/index.js'\nexport { default as MiniCartCircleProgress } from './MiniCart/CircleProgress.js'\nexport type { CircleProgressProps as MiniCartCircleProgressProps } from './MiniCart/CircleProgress.js'\nexport { default as MiniCartDialog, MiniCartDialog as MiniCartDialogComponent } from './MiniCart/MiniCartDialog.js'\nexport type {\n MiniCartDialogProps,\n MiniCartDialogCopy,\n MiniCartDialogSemanticName,\n CartData,\n} from './MiniCart/MiniCartDialog.js'\n\n// \u2500\u2500\u2500 Web Push \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { default as WebPushPopup } from './WebPushPopup/index.js'\nexport type { WebPushPopupProps } from './WebPushPopup/index.js'\nexport { useEmarsysWebPush } from '../hooks/useEmarsysWebPush.js'\nexport type {\n UseEmarsysWebPushOptions,\n UseEmarsysWebPushReturn,\n EmarsysContactInfo,\n EmarsysInitConfig,\n} from '../hooks/useEmarsysWebPush.js'\n\n/**\n * \u7EC4\u4EF6\u6620\u5C04\u5BF9\u8C61\n * \u5C06 CMS block type \u6620\u5C04\u5230\u53EF\u76F4\u63A5\u6E32\u67D3\u7684\u9759\u6001\u7EC4\u4EF6\u540D\u79F0\u3002\n * \u53EA\u6709\u5F00\u7BB1\u5373\u7528\u3001\u65E0\u9700\u6D88\u8D39\u8005\u4E8C\u6B21\u5C01\u88C5\u7684\u7EC4\u4EF6\u624D\u5E94\u52A0\u5165\u6B64\u6620\u5C04\u3002\n */\nexport const PAYLOAD_COMPONENT_MAP = {\n 'ipc-accordioncards': 'AccordionCards',\n 'ipc-aplusdesc': 'AplusDesc',\n 'ipc-banner': 'HeroBanner',\n 'ipc-brand-equity': 'BrandEquity',\n 'ipc-category': 'Category',\n 'ipc-collection-banner': 'CollectionBanner',\n 'ipc-collection-shelves': 'CollectionShelves',\n 'ipc-creativemodule': 'CreativeModule',\n 'ipc-download': 'DownLoad',\n 'ipc-evaluate': 'Evaluate',\n 'ipc-faq': 'Faq',\n 'ipc-features': 'Features',\n 'ipc-footcharger': 'FootCharger',\n 'ipc-ga-block': 'GraphicAttractionBlock',\n 'ipc-giftbox': 'GiftBox',\n 'ipc-giftshelf': 'GiftShelf',\n 'ipc-graphic': 'Graphic',\n 'ipc-graphicmore': 'GraphicMore',\n 'ipc-graphicoverlay': 'GraphicOverlay',\n 'ipc-marquee': 'Marquee',\n 'ipc-mediaplayerbase': 'MediaPlayerBase',\n 'ipc-mediaplayermulti': 'MediaPlayerMulti',\n 'ipc-mediaplayersticky': 'MediaPlayerSticky',\n 'ipc-member-equity': 'MemberEquity',\n 'ipc-mlg-block': 'MultiLayoutGraphicBlock',\n 'ipc-search-page-tabs': 'SearchPageBlock',\n 'ipc-selectstore': 'SelectStore',\n 'ipc-shelfdisplay': 'ShelfDisplay',\n 'ipc-slogan': 'Slogan',\n 'ipc-spacer': 'Spacer',\n 'ipc-specs': 'Specs',\n 'ipc-tabs': 'Tabs',\n 'ipc-text-marquee': 'TextMarquee',\n 'ipc-title': 'Title',\n 'ipc-whychoose': 'WhyChoose',\n 'ipc-product-nav': 'ProductNav',\n 'ipc-brand-card-link': 'BrandCardLink',\n 'ipc-ipredirect': 'IPRedirect',\n ksp: 'Ksp',\n 'ipc-secondary-banner': 'SecondaryBanner',\n 'ipc-media-endorsement': 'MediaEndorsement',\n 'ipc-media-scene-switcher-v2': 'MediaSceneSwitcherV2',\n 'ipc-featured-blog-posts': 'FeaturedBlogPosts',\n 'ipc-media-text-overlay': 'MediaTextOverlay',\n ProductCompare: 'ProductCompare',\n}\n\n// \u516C\u5F00\u5BFC\u51FA useAiuiContext hook\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u6D88\u8D39\u8005\u4F7F\u7528\uFF09\nexport { useAiuiContext } from './AiuiProvider/index.js'\n\n// \u516C\u5F00\u5BFC\u51FA ContainerProps\uFF08\u4F9B Registry \u5206\u53D1\u7684 biz-components \u4F7F\u7528\uFF09\nexport type { ContainerProps } from '../shared/Styles.js'\n\n// Modal components\nexport { default as ModalRegisterSubscribe } from './ModalRegisterSubscribe/index.js'\nexport { default as ModalSubscribeConfirm } from './ModalSubscribeConfirm/index.js'\nexport { default as ModalCoupon } from './ModalCoupon/index.js'\nexport { default as ModalSmsSubscribe } from './ModalSmsSubscribe/index.js'\nexport { default as ModalVerify } from './ModalVerify/index.js'\n"],
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QACb,gBAAiB,YACjB,kBAAmB,aACnB,sBAAuB,gBACvB,iBAAkB,aAClB,IAAK,MACL,uBAAwB,kBACxB,wBAAyB,mBACzB,8BAA+B,uBAC/B,0BAA2B,oBAC3B,yBAA0B,mBAC1B,eAAgB,gBAClB",
6
+ "names": ["biz_components_exports", "__export", "IPRedirect", "PAYLOAD_COMPONENT_MAP", "__toCommonJS", "import_ActivitySchedule", "import_GiftShelf", "import_GiftTierShelf", "import_ActivityMechanism", "import_BrandEquity", "import_MemberEquity", "import_Slogan", "import_Title", "import_Spacer", "import_ShelfDisplay", "import_Evaluate", "import_Category", "import_HeroBanner", "import_AccordionCards", "import_Graphic", "import_MediaPlayerBase", "import_MediaPlayerSticky", "import_MediaPlayerMulti", "import_Marquee", "import_MarqueeReview", "import_WhyChoose", "import_Faq", "import_MultiLayoutGraphicBlock", "import_GraphicAttractionBlock", "import_HeaderNavigation", "import_FooterNavigation", "import_SearchPage", "import_types", "import_Styles", "import_AiuiProvider", "import_Tabs", "import_SwiperBox", "import_VideoModal", "import_CreativeModule", "import_GraphicOverlay", "import_Specs", "import_TabsGroup", "import_BizProductProvider", "import_PurchaseBar", "import_ProductActions", "import_ProductCard", "import_ProductBenefitsTabs", "import_ProductBenefits", "import_ProductHighlight", "import_ProductFreeGift", "import_ProductExchangePurchase", "import_ProductOptions", "import_ProductBundle", "import_ProductCoupon", "import_ProductBanner", "import_ProductGridBox", "import_ProductGallery", "import_ProductDetail", "import_ProductSummary", "import_BenefitsTab", "import_PaidShipping", "import_CartActionButtons", "import_NotifyMeDialog", "import_ProductServiceBenefits", "import_ProductPaidShipping", "import_GraphicMore", "import_Features", "import_AplusDesc", "import_GiftBox", "import_SelectStore", "import_DownLoad", "import_FootCharger", "import_BrandCardLink", "import_WheelLottery", "import_ProductLottery", "import_ProductCompare", "import_Ksp", "import_ImageTextFeature", "import_FeatureCards", "import_FeaturedBlogPosts", "import_ImageWithText", "import_VideoFeature", "import_TabsWithMedia", "import_TabWithImage", "import_FeatureShowcase", "import_ProductHero", "import_SpecsComparison", "import_MediaSceneSwitcher", "import_MediaSceneSwitcherV2", "import_ThreeDCarousel", "import_ProductNav", "import_AnchorNavigation", "import_PromotionalBar", "import_EventSchedule", "import_SecondaryBanner", "import_BuyOneGetOneShelf", "import_ActiveShelf", "import_MediaShelf", "import_CreditsShelf", "import_SceneShelf", "import_SceneShelfV2", "import_SceneShelfV3", "import_MediaEndorsement", "import_MediaTextOverlay", "import_ImageOverlayShelf", "import_ImageTextOverlay", "import_MiniCart", "import_CircleProgress", "import_MiniCartDialog", "import_WebPushPopup", "import_useEmarsysWebPush", "import_ModalRegisterSubscribe", "import_ModalSubscribeConfirm", "import_ModalCoupon", "import_ModalSmsSubscribe", "import_ModalVerify"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";"use client";var F=Object.create;var f=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var a in e)f(t,a,{get:e[a],enumerable:!0})},C=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of q(e))!M.call(t,s)&&s!==a&&f(t,s,{get:()=>e[s],enumerable:!(n=$(e,s))||n.enumerable});return t};var P=(t,e,a)=>(a=t!=null?F(j(t)):{},C(e||!t||!t.__esModule?f(a,"default",{value:t,enumerable:!0}):a,t)),B=t=>C(f({},"__esModule",{value:!0}),t);var D={};z(D,{Tabs:()=>x,TabsContent:()=>y,TabsList:()=>R,TabsTrigger:()=>v});module.exports=B(D);var i=require("react/jsx-runtime"),o=P(require("react")),c=require("../helpers/index.js"),d=P(require("@radix-ui/react-tabs")),T=require("class-variance-authority");function w(t){return t.trim().replace(/\s+/g,"-")}function I(t,e){return`radix-${t}-trigger-${w(e)}`}function L(t,e){return`radix-${t}-content-${w(e)}`}const b=o.createContext(""),h=o.createContext({align:"left",shape:"square"}),x=o.forwardRef(({children:t,align:e="left",shape:a="default",...n},s)=>{const r=o.useId();return(0,i.jsx)(d.Root,{ref:s,...n,children:(0,i.jsx)(b.Provider,{value:r,children:(0,i.jsx)(h.Provider,{value:{align:e,shape:a},children:t})})})});x.displayName="Tabs";const H=(0,T.cva)("rounded-tabs",{variants:{shape:{default:"",rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{shape:"default"}}),O=(0,T.cva)("rounded-tabs",{variants:{shape:{default:"",rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{shape:"default"}}),R=o.forwardRef(({className:t,...e},a)=>{const{align:n,shape:s}=o.useContext(h),r=n==="center"?"flex w-full justify-center":n==="right"?"flex w-full justify-end":null,l=(0,i.jsx)(d.List,{ref:a,className:(0,c.cn)("bg-tabs-list-bg flex w-fit max-w-full overflow-x-auto p-1",H({shape:s}),t),style:{scrollbarWidth:"none",msOverflowStyle:"none"},...e});return r?(0,i.jsx)("div",{className:r,children:l}):l});R.displayName=d.List.displayName;const v=o.forwardRef(({className:t,onClick:e,value:a,...n},s)=>{const{shape:r}=o.useContext(h),l=o.useContext(b),p=a!=null?String(a):"",N=I(l,p),S=L(l,p),k=u=>{e?.(u);const m=u?.currentTarget,g=u?.currentTarget?.parentElement;if(m&&g){const W=m.offsetLeft,E=m.offsetWidth,V=g.offsetWidth,A=W-V/2+E/2;g.scrollTo({left:A,behavior:"smooth"})}};return(0,i.jsx)(d.Trigger,{ref:s,className:(0,c.cn)("text-info-primary lg-desktop:text-base disabled:text-btn-secondary-disabled lg-desktop:px-[28px] lg-desktop:pt-[15px] lg-desktop:pb-[14px] shrink-0 px-5 pb-2.5 pt-[11px] text-sm font-bold data-[state=active]:bg-white data-[state=active]:text-[#080A0F]",t,O({shape:r})),onClick:k,value:a,id:N,"aria-controls":S,...n})});v.displayName=d.Trigger.displayName;const y=o.forwardRef(({className:t,value:e,...a},n)=>{const s=o.useContext(b),r=e!=null?String(e):"",l=I(s,r),p=L(s,r);return(0,i.jsx)(d.Content,{ref:n,className:(0,c.cn)(t),value:e,id:p,"aria-labelledby":l,...a})});y.displayName=d.Content.displayName;
1
+ "use strict";"use client";var F=Object.create;var f=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var z=(t,e)=>{for(var a in e)f(t,a,{get:e[a],enumerable:!0})},C=(t,e,a,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of q(e))!M.call(t,s)&&s!==a&&f(t,s,{get:()=>e[s],enumerable:!(n=$(e,s))||n.enumerable});return t};var P=(t,e,a)=>(a=t!=null?F(j(t)):{},C(e||!t||!t.__esModule?f(a,"default",{value:t,enumerable:!0}):a,t)),B=t=>C(f({},"__esModule",{value:!0}),t);var D={};z(D,{Tabs:()=>x,TabsContent:()=>y,TabsList:()=>R,TabsTrigger:()=>v});module.exports=B(D);var i=require("react/jsx-runtime"),o=P(require("react")),c=require("../helpers/index.js"),d=P(require("@radix-ui/react-tabs")),T=require("class-variance-authority");function w(t){return t.trim().replace(/\s+/g,"-")}function I(t,e){return`radix-${t}-trigger-${w(e)}`}function L(t,e){return`radix-${t}-content-${w(e)}`}const b=o.createContext(""),h=o.createContext({align:"left",shape:"square"}),x=o.forwardRef(({children:t,align:e="left",shape:a="default",...n},s)=>{const r=o.useId();return(0,i.jsx)(d.Root,{ref:s,...n,children:(0,i.jsx)(b.Provider,{value:r,children:(0,i.jsx)(h.Provider,{value:{align:e,shape:a},children:t})})})});x.displayName="Tabs";const H=(0,T.cva)("rounded-tabs",{variants:{shape:{default:"",rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{shape:"default"}}),O=(0,T.cva)("rounded-tabs",{variants:{shape:{default:"",rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{shape:"default"}}),R=o.forwardRef(({className:t,...e},a)=>{const{align:n,shape:s}=o.useContext(h),r=n==="center"?"flex w-full justify-center":n==="right"?"flex w-full justify-end":null,l=(0,i.jsx)(d.List,{ref:a,className:(0,c.cn)("bg-tabs-list-bg flex w-fit max-w-full overflow-x-auto p-1",H({shape:s}),t),style:{scrollbarWidth:"none",msOverflowStyle:"none"},...e});return r?(0,i.jsx)("div",{className:r,children:l}):l});R.displayName=d.List.displayName;const v=o.forwardRef(({className:t,onClick:e,value:a,...n},s)=>{const{shape:r}=o.useContext(h),l=o.useContext(b),p=a!=null?String(a):"",N=I(l,p),S=L(l,p),k=u=>{e?.(u);const m=u?.currentTarget,g=u?.currentTarget?.parentElement;if(m&&g){const W=m.offsetLeft,E=m.offsetWidth,V=g.offsetWidth,A=W-V/2+E/2;g.scrollTo({left:A,behavior:"smooth"})}};return(0,i.jsx)(d.Trigger,{ref:s,className:(0,c.cn)("text-info-primary lg-desktop:text-base disabled:text-btn-secondary-disabled lg-desktop:px-[28px] lg-desktop:pt-[15px] lg-desktop:pb-[14px] shrink-0 cursor-pointer px-5 pb-2.5 pt-[11px] text-sm font-bold disabled:cursor-not-allowed data-[state=active]:bg-white data-[state=active]:text-[#080A0F]",t,O({shape:r})),onClick:k,value:a,id:N,"aria-controls":S,...n})});v.displayName=d.Trigger.displayName;const y=o.forwardRef(({className:t,value:e,...a},n)=>{const s=o.useContext(b),r=e!=null?String(e):"",l=I(s,r),p=L(s,r);return(0,i.jsx)(d.Content,{ref:n,className:(0,c.cn)(t),value:e,id:p,"aria-labelledby":l,...a})});y.displayName=d.Content.displayName;
2
2
  //# sourceMappingURL=tabs.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/components/tabs.tsx"],
4
- "sourcesContent": ["'use client'\n\nimport * as React from 'react'\nimport { cn } from '../helpers/index.js'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cva } from 'class-variance-authority'\nimport type { Align, Shape } from '../types/props.js'\n\ntype tabShape = Shape | 'default'\n\n/**\n * Sanitize a tab value so it is safe to use as part of an HTML id attribute.\n *\n * HTML ids must not contain whitespace characters. Radix UI uses the value\n * directly in generated ids (e.g. `radix-:r0:-trigger-{value}`), so an\n * unsanitized value like \"best seller\" would produce an invalid id.\n *\n * This function replaces any sequence of whitespace with a single hyphen and\n * trims leading/trailing whitespace, leaving all other characters intact.\n *\n * NOTE: We only sanitize for id/aria attribute generation \u2014 the raw `value`\n * prop is passed through to Radix unchanged so that `onValueChange` callbacks\n * receive the user's original value (e.g. \"best seller\", not \"best-seller\").\n * The sanitized ids are injected via explicit `id`/`aria-controls`/`aria-labelledby`\n * overrides that take precedence over Radix's internally generated (possibly\n * invalid) ids, because Radix spreads user props after its own.\n */\nfunction sanitizeTabValue(value: string): string {\n return value.trim().replace(/\\s+/g, '-')\n}\n\nfunction makeSafeTriggerId(baseId: string, value: string): string {\n return `radix-${baseId}-trigger-${sanitizeTabValue(value)}`\n}\n\nfunction makeSafeContentId(baseId: string, value: string): string {\n return `radix-${baseId}-content-${sanitizeTabValue(value)}`\n}\n\nconst TabsIdContext = React.createContext<string>('')\n\nconst TabListContext = React.createContext<{\n align?: Align\n shape: tabShape\n}>({\n align: 'left',\n shape: 'square',\n})\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {\n align?: Align\n shape?: tabShape\n }\n>(({ children, align = 'left', shape = 'default', ...props }, ref) => {\n const baseId = React.useId()\n return (\n <TabsPrimitive.Root ref={ref} {...props}>\n <TabsIdContext.Provider value={baseId}>\n <TabListContext.Provider value={{ align, shape }}>{children}</TabListContext.Provider>\n </TabsIdContext.Provider>\n </TabsPrimitive.Root>\n )\n})\nTabs.displayName = 'Tabs'\n\nconst tabsListVariants = cva('rounded-tabs', {\n variants: {\n shape: {\n default: '',\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n shape: 'default',\n },\n})\n\nconst tabsTriggerVariants = cva('rounded-tabs', {\n variants: {\n shape: {\n default: '',\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n shape: 'default',\n },\n})\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { align: alignFromParent, shape: shapeFromParent } = React.useContext(TabListContext)\n\n const wrapperClass =\n alignFromParent === 'center'\n ? 'flex w-full justify-center'\n : alignFromParent === 'right'\n ? 'flex w-full justify-end'\n : null\n\n const list = (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'bg-tabs-list-bg flex w-fit max-w-full overflow-x-auto p-1',\n tabsListVariants({ shape: shapeFromParent }),\n className\n )}\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n {...props}\n />\n )\n\n return wrapperClass ? <div className={wrapperClass}>{list}</div> : list\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, onClick, value, ...props }, ref) => {\n const { shape: shapeFromParent } = React.useContext(TabListContext)\n const baseId = React.useContext(TabsIdContext)\n\n const safeValue = value != null ? String(value) : ''\n const triggerId = makeSafeTriggerId(baseId, safeValue)\n const contentId = makeSafeContentId(baseId, safeValue)\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e)\n const tabElement = e?.currentTarget\n const container = e?.currentTarget?.parentElement\n if (tabElement && container) {\n const tabLeft = tabElement.offsetLeft\n const tabWidth = tabElement.offsetWidth\n const containerWidth = container.offsetWidth\n const scrollTo = tabLeft - containerWidth / 2 + tabWidth / 2\n container.scrollTo({\n left: scrollTo,\n behavior: 'smooth',\n })\n }\n }\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n 'text-info-primary lg-desktop:text-base disabled:text-btn-secondary-disabled lg-desktop:px-[28px] lg-desktop:pt-[15px] lg-desktop:pb-[14px] shrink-0 px-5 pb-2.5 pt-[11px] text-sm font-bold data-[state=active]:bg-white data-[state=active]:text-[#080A0F]',\n className,\n tabsTriggerVariants({\n shape: shapeFromParent,\n })\n )}\n onClick={handleClick}\n value={value}\n id={triggerId}\n aria-controls={contentId}\n {...props}\n />\n )\n})\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, value, ...props }, ref) => {\n const baseId = React.useContext(TabsIdContext)\n\n const safeValue = value != null ? String(value) : ''\n const triggerId = makeSafeTriggerId(baseId, safeValue)\n const contentId = makeSafeContentId(baseId, safeValue)\n\n return (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(className)}\n value={value}\n id={contentId}\n aria-labelledby={triggerId}\n {...props}\n />\n )\n})\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"],
5
- "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,gBAAAC,EAAA,aAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAN,GA6DQ,IAAAO,EAAA,6BA3DRC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAA+B,mCAC/BC,EAAoB,oCAsBpB,SAASC,EAAiBC,EAAuB,CAC/C,OAAOA,EAAM,KAAK,EAAE,QAAQ,OAAQ,GAAG,CACzC,CAEA,SAASC,EAAkBC,EAAgBF,EAAuB,CAChE,MAAO,SAASE,CAAM,YAAYH,EAAiBC,CAAK,CAAC,EAC3D,CAEA,SAASG,EAAkBD,EAAgBF,EAAuB,CAChE,MAAO,SAASE,CAAM,YAAYH,EAAiBC,CAAK,CAAC,EAC3D,CAEA,MAAMI,EAAgBT,EAAM,cAAsB,EAAE,EAE9CU,EAAiBV,EAAM,cAG1B,CACD,MAAO,OACP,MAAO,QACT,CAAC,EAEKN,EAAOM,EAAM,WAMjB,CAA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import * as React from 'react'\nimport { cn } from '../helpers/index.js'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cva } from 'class-variance-authority'\nimport type { Align, Shape } from '../types/props.js'\n\ntype tabShape = Shape | 'default'\n\n/**\n * Sanitize a tab value so it is safe to use as part of an HTML id attribute.\n *\n * HTML ids must not contain whitespace characters. Radix UI uses the value\n * directly in generated ids (e.g. `radix-:r0:-trigger-{value}`), so an\n * unsanitized value like \"best seller\" would produce an invalid id.\n *\n * This function replaces any sequence of whitespace with a single hyphen and\n * trims leading/trailing whitespace, leaving all other characters intact.\n *\n * NOTE: We only sanitize for id/aria attribute generation \u2014 the raw `value`\n * prop is passed through to Radix unchanged so that `onValueChange` callbacks\n * receive the user's original value (e.g. \"best seller\", not \"best-seller\").\n * The sanitized ids are injected via explicit `id`/`aria-controls`/`aria-labelledby`\n * overrides that take precedence over Radix's internally generated (possibly\n * invalid) ids, because Radix spreads user props after its own.\n */\nfunction sanitizeTabValue(value: string): string {\n return value.trim().replace(/\\s+/g, '-')\n}\n\nfunction makeSafeTriggerId(baseId: string, value: string): string {\n return `radix-${baseId}-trigger-${sanitizeTabValue(value)}`\n}\n\nfunction makeSafeContentId(baseId: string, value: string): string {\n return `radix-${baseId}-content-${sanitizeTabValue(value)}`\n}\n\nconst TabsIdContext = React.createContext<string>('')\n\nconst TabListContext = React.createContext<{\n align?: Align\n shape: tabShape\n}>({\n align: 'left',\n shape: 'square',\n})\n\nconst Tabs = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> & {\n align?: Align\n shape?: tabShape\n }\n>(({ children, align = 'left', shape = 'default', ...props }, ref) => {\n const baseId = React.useId()\n return (\n <TabsPrimitive.Root ref={ref} {...props}>\n <TabsIdContext.Provider value={baseId}>\n <TabListContext.Provider value={{ align, shape }}>{children}</TabListContext.Provider>\n </TabsIdContext.Provider>\n </TabsPrimitive.Root>\n )\n})\nTabs.displayName = 'Tabs'\n\nconst tabsListVariants = cva('rounded-tabs', {\n variants: {\n shape: {\n default: '',\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n shape: 'default',\n },\n})\n\nconst tabsTriggerVariants = cva('rounded-tabs', {\n variants: {\n shape: {\n default: '',\n rounded: 'rounded-[28px]',\n square: 'rounded-none',\n },\n },\n defaultVariants: {\n shape: 'default',\n },\n})\nconst TabsList = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.List>\n>(({ className, ...props }, ref) => {\n const { align: alignFromParent, shape: shapeFromParent } = React.useContext(TabListContext)\n\n const wrapperClass =\n alignFromParent === 'center'\n ? 'flex w-full justify-center'\n : alignFromParent === 'right'\n ? 'flex w-full justify-end'\n : null\n\n const list = (\n <TabsPrimitive.List\n ref={ref}\n className={cn(\n 'bg-tabs-list-bg flex w-fit max-w-full overflow-x-auto p-1',\n tabsListVariants({ shape: shapeFromParent }),\n className\n )}\n style={{\n scrollbarWidth: 'none',\n msOverflowStyle: 'none',\n }}\n {...props}\n />\n )\n\n return wrapperClass ? <div className={wrapperClass}>{list}</div> : list\n})\nTabsList.displayName = TabsPrimitive.List.displayName\n\nconst TabsTrigger = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Trigger>\n>(({ className, onClick, value, ...props }, ref) => {\n const { shape: shapeFromParent } = React.useContext(TabListContext)\n const baseId = React.useContext(TabsIdContext)\n\n const safeValue = value != null ? String(value) : ''\n const triggerId = makeSafeTriggerId(baseId, safeValue)\n const contentId = makeSafeContentId(baseId, safeValue)\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e)\n const tabElement = e?.currentTarget\n const container = e?.currentTarget?.parentElement\n if (tabElement && container) {\n const tabLeft = tabElement.offsetLeft\n const tabWidth = tabElement.offsetWidth\n const containerWidth = container.offsetWidth\n const scrollTo = tabLeft - containerWidth / 2 + tabWidth / 2\n container.scrollTo({\n left: scrollTo,\n behavior: 'smooth',\n })\n }\n }\n return (\n <TabsPrimitive.Trigger\n ref={ref}\n className={cn(\n 'text-info-primary lg-desktop:text-base disabled:text-btn-secondary-disabled lg-desktop:px-[28px] lg-desktop:pt-[15px] lg-desktop:pb-[14px] shrink-0 cursor-pointer px-5 pb-2.5 pt-[11px] text-sm font-bold disabled:cursor-not-allowed data-[state=active]:bg-white data-[state=active]:text-[#080A0F]',\n className,\n tabsTriggerVariants({\n shape: shapeFromParent,\n })\n )}\n onClick={handleClick}\n value={value}\n id={triggerId}\n aria-controls={contentId}\n {...props}\n />\n )\n})\nTabsTrigger.displayName = TabsPrimitive.Trigger.displayName\n\nconst TabsContent = React.forwardRef<\n React.ElementRef<typeof TabsPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TabsPrimitive.Content>\n>(({ className, value, ...props }, ref) => {\n const baseId = React.useContext(TabsIdContext)\n\n const safeValue = value != null ? String(value) : ''\n const triggerId = makeSafeTriggerId(baseId, safeValue)\n const contentId = makeSafeContentId(baseId, safeValue)\n\n return (\n <TabsPrimitive.Content\n ref={ref}\n className={cn(className)}\n value={value}\n id={contentId}\n aria-labelledby={triggerId}\n {...props}\n />\n )\n})\nTabsContent.displayName = TabsPrimitive.Content.displayName\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent }\n"],
5
+ "mappings": "ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,UAAAE,EAAA,gBAAAC,EAAA,aAAAC,EAAA,gBAAAC,IAAA,eAAAC,EAAAN,GA6DQ,IAAAO,EAAA,6BA3DRC,EAAuB,oBACvBC,EAAmB,+BAEnBC,EAA+B,mCAC/BC,EAAoB,oCAsBpB,SAASC,EAAiBC,EAAuB,CAC/C,OAAOA,EAAM,KAAK,EAAE,QAAQ,OAAQ,GAAG,CACzC,CAEA,SAASC,EAAkBC,EAAgBF,EAAuB,CAChE,MAAO,SAASE,CAAM,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,EAAkBC,EAAQiB,CAAS,EAC/CE,EAAYlB,EAAkBD,EAAQiB,CAAS,EAErD,SACE,OAACtB,EAAc,QAAd,CACC,IAAKa,EACL,aAAW,MAAGG,CAAS,EACvB,MAAOb,EACP,GAAIqB,EACJ,kBAAiBD,EAChB,GAAGX,EACN,CAEJ,CAAC,EACDnB,EAAY,YAAcO,EAAc,QAAQ",
6
6
  "names": ["tabs_exports", "__export", "Tabs", "TabsContent", "TabsList", "TabsTrigger", "__toCommonJS", "import_jsx_runtime", "React", "import_helpers", "TabsPrimitive", "import_class_variance_authority", "sanitizeTabValue", "value", "makeSafeTriggerId", "baseId", "makeSafeContentId", "TabsIdContext", "TabListContext", "children", "align", "shape", "props", "ref", "tabsListVariants", "tabsTriggerVariants", "className", "alignFromParent", "shapeFromParent", "wrapperClass", "list", "onClick", "safeValue", "triggerId", "contentId", "handleClick", "e", "tabElement", "container", "tabLeft", "tabWidth", "containerWidth", "scrollTo"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as u}from"react/jsx-runtime";import G,{useState as $,useEffect as O,useRef as S}from"react";import{useMediaQuery as U}from"react-responsive";import{withLayout as R}from"../../shared/Styles.js";import V from"../../components/picture.js";import I from"../../components/button.js";import{Heading as L}from"../../components/heading.js";import{VideoModal as E}from"../VideoModal/index.js";import{cn as w,getLocalizedPath as M}from"../../helpers/utils.js";import _ from"../SwiperBox/index.js";import{isVideo as C}from"../../shared/mimeType.js";import{useExposure as D}from"../../hooks/useExposure.js";import{trackUrlRef as T}from"../../shared/trackUrlRef.js";import{useAiuiContext as H}from"../AiuiProvider/index.js";const n="image",m="p1_banner",A=({data:h,configuration:t,jIndex:f})=>{const[N,B]=$(!1),y=U({query:"(max-width: 768px)"}),i=S(null),k=()=>{switch(t?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[346] tablet:aspect-h-[400] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};D(i,{componentType:n,componentName:m,position:f,componentTitle:h.title,componentDescription:h.description,navigation:t?.activeTab}),O(()=>{B(y)},[y]);const{theme:v="light",title:s,description:o,imageUrl:a,primaryButton:r,secondaryButton:c,imageMobileUrl:b,blockLink:d,video:l,youtubeId:p,isYouTube:g}=h,x="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return u("div",{className:w("item-wrapper text-info-primary group relative box-border w-full overflow-hidden",k(),{"rounded-box":!0,"aiui-dark":v==="dark","h-[400px]":N},"text-info-primary"),ref:i,children:[d&&e("a",{className:"absolute inset-0 z-10",href:T(M(d||"",t?.locale||"us"),`${n}_${m}`),"data-headless-type-name":`${n}#${m}`,"data-headless-title-desc-button":`${s}#${o}`,"data-headless-nav-position":`${t?.activeTab}#${f}`,"aria-hidden":"true",tabIndex:-1}),u("div",{className:"absolute inset-0",children:[C(a?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden h-full overflow-hidden",children:e("source",{src:a?.url,type:"video/mp4"})}):e(V,{source:a?.url,alt:a?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${a?.width}/${a?.height}`}}),C(b?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block h-full overflow-hidden",children:e("source",{src:b?.url,type:"video/mp4"})}):e(V,{source:b?.url||a?.url,alt:b?.alt||a?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),u("div",{className:w("laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":h?.width==="full"}),children:[u("div",{className:"flex flex-col gap-1",children:[e(L,{size:3,as:"h3",className:"item-title",html:s}),e(L,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:o})]}),u("div",{className:"lg-desktop:gap-3 flex gap-2",children:[c&&c.text&&u(I,{"aria-label":s??o,className:w(x,"link-left"),variant:"secondary",as:"a",href:T(M(c.link||"",t?.locale||"us"),`${n}_${m}`),"data-headless-type-name":`${n}#${m}`,"data-headless-title-desc-button":`${s}#${o}#${c?.text}`,"data-headless-nav-position":`${t?.activeTab}#${f}`,children:[c.text,e("span",{className:"sr-only",children:s??o})]}),r&&r.text&&e(I,{"aria-label":s??o,className:w(x,"link-right"),variant:"primary",as:"a",href:T(M(r.link||"",t?.locale||"us"),`${n}_${m}`),"data-headless-type-name":`${n}#${m}`,"data-headless-title-desc-button":`${s}#${o}#${r.text}`,"data-headless-nav-position":`${t?.activeTab}#${f}`,children:r.text})]})]})]}),e("div",{children:e("div",{className:"laptop:bottom-[32px] laptop:right-[32px] absolute bottom-[16px] right-[16px]",children:(l?.url||p)&&e("button",{onClick:()=>{t?.onVideoPlayBtnClick?.(l?.url||p,g)},className:"laptop:size-12 hover:bg-current/75 bg-info-primary flex size-8 items-center justify-center rounded-full opacity-80",children:e("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:v==="dark"?"black":"white",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 7L0 14L0 0L12 7Z"})})})})})]})},z=G.forwardRef((h,t)=>{const{data:f,className:N,...B}=h,{shape:y,items:i=[]}=f,[k,v]=$(!1),[s,o]=$(""),[a,r]=$(""),{locale:c="us"}=H(),b=(l,p)=>{v(!0),p?r?.(l||""):o?.(l||"")},d=l=>{const p=i?.length,g=p>3,x=p>2,P=p>1;switch(!0){case l>=1440:case l>=1024:return g?3:p;case l>=768:return g||x?2.3:P?2:1;default:return P?1.2:1}};return u("section",{"data-ui-component-id":"GraphicOverlay",ref:t,...B,className:w("graphicOverlayBlock text-info-primary ",N),children:[i&&i.length>0?e(_,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:i||[],configuration:{shape:y,num:i.length,locale:c,onVideoPlayBtnClick:b}},Slide:A,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:d(374)},768:{spaceBetween:16,freeMode:!1,slidesPerView:d(768)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:d(1024)},1440:{spaceBetween:16,freeMode:!1,slidesPerView:d(1440)}}}):null,k&&e(E,{visible:k,youTubeId:a,videoUrl:s,onCloseModal:()=>v(!1)})]})});z.displayName="GraphicOverlayBlock";var se=R(z);export{se as default};
1
+ import{jsx as e,jsxs as u}from"react/jsx-runtime";import G,{useState as $,useEffect as O,useRef as S}from"react";import{useMediaQuery as U}from"react-responsive";import{withLayout as R}from"../../shared/Styles.js";import V from"../../components/picture.js";import I from"../../components/button.js";import{Heading as L}from"../../components/heading.js";import{VideoModal as E}from"../VideoModal/index.js";import{cn as w,getLocalizedPath as M}from"../../helpers/utils.js";import _ from"../SwiperBox/index.js";import{isVideo as C}from"../../shared/mimeType.js";import{useExposure as D}from"../../hooks/useExposure.js";import{trackUrlRef as T}from"../../shared/trackUrlRef.js";import{useAiuiContext as H}from"../AiuiProvider/index.js";const d="image",m="p1_banner",A=({data:h,configuration:t,jIndex:f})=>{const[N,B]=$(!1),y=U({query:"(max-width: 768px)"}),i=S(null),k=()=>{switch(t?.num){case 1:return"tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]";case 2:return"tablet:aspect-w-[346] tablet:aspect-h-[400] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]";case 3:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]";default:return"tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]"}};D(i,{componentType:d,componentName:m,position:f,componentTitle:h.title,componentDescription:h.description,navigation:t?.activeTab}),O(()=>{B(y)},[y]);const{theme:v="light",title:s,description:o,imageUrl:a,primaryButton:r,secondaryButton:n,imageMobileUrl:b,blockLink:c,video:l,youtubeId:p,isYouTube:g}=h,x="lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]";return u("div",{className:w("item-wrapper text-info-primary group relative box-border w-full overflow-hidden",k(),{"rounded-box":!0,"aiui-dark":v==="dark","h-[400px]":N},"text-info-primary"),ref:i,children:[c&&e("a",{className:"absolute inset-0 z-10",href:T(M(c||"",t?.locale||"us"),`${d}_${m}`),"data-headless-type-name":`${d}#${m}`,"data-headless-title-desc-button":`${s}#${o}`,"data-headless-nav-position":`${t?.activeTab}#${f}`,"aria-hidden":"true",tabIndex:-1}),u("div",{className:"absolute inset-0",children:[C(a?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:block hidden h-full overflow-hidden",children:e("source",{src:a?.url,type:"video/mp4"})}):e(V,{source:a?.url,alt:a?.alt||"",className:"tablet:block hidden h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 group-hover:scale-105 object-cover",style:{aspectRatio:`${a?.width}/${a?.height}`}}),C(b?.mimeType)?e("video",{autoPlay:!0,muted:!0,playsInline:!0,loop:!0,className:"tablet:hidden block h-full overflow-hidden",children:e("source",{src:b?.url,type:"video/mp4"})}):e(V,{source:b?.url||a?.url,alt:b?.alt||a?.alt||"",className:"tablet:hidden block h-full overflow-hidden",imgClassName:"h-full transition-all duration-300 object-cover"}),u("div",{className:w("laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 pointer-events-none absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4",{"laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto":h?.width==="full"}),children:[u("div",{className:"flex flex-col gap-1",children:[e(L,{size:3,as:"h3",className:"item-title",html:s}),e(L,{as:"h4",className:"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]",html:o})]}),u("div",{className:"lg-desktop:gap-3 flex gap-2",children:[n&&n.text&&u(I,{"aria-label":s??o,className:w(x,"link-left pointer-events-auto"),variant:"secondary",as:"a",href:T(M(n.link||"",t?.locale||"us"),`${d}_${m}`),"data-headless-type-name":`${d}#${m}`,"data-headless-title-desc-button":`${s}#${o}#${n?.text}`,"data-headless-nav-position":`${t?.activeTab}#${f}`,children:[n.text,e("span",{className:"sr-only",children:s??o})]}),r&&r.text&&e(I,{"aria-label":s??o,className:w(x,"link-right pointer-events-auto"),variant:"primary",as:"a",href:T(M(r.link||"",t?.locale||"us"),`${d}_${m}`),"data-headless-type-name":`${d}#${m}`,"data-headless-title-desc-button":`${s}#${o}#${r.text}`,"data-headless-nav-position":`${t?.activeTab}#${f}`,children:r.text})]})]})]}),e("div",{children:e("div",{className:"laptop:bottom-[32px] laptop:right-[32px] absolute bottom-[16px] right-[16px]",children:(l?.url||p)&&e("button",{onClick:()=>{t?.onVideoPlayBtnClick?.(l?.url||p,g)},className:"laptop:size-12 hover:bg-current/75 bg-info-primary flex size-8 items-center justify-center rounded-full opacity-80",children:e("svg",{width:"12",height:"14",viewBox:"0 0 12 14",fill:v==="dark"?"black":"white",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 7L0 14L0 0L12 7Z"})})})})})]})},z=G.forwardRef((h,t)=>{const{data:f,className:N,...B}=h,{shape:y,items:i=[]}=f,[k,v]=$(!1),[s,o]=$(""),[a,r]=$(""),{locale:n="us"}=H(),b=(l,p)=>{v(!0),p?r?.(l||""):o?.(l||"")},c=l=>{const p=i?.length,g=p>3,x=p>2,P=p>1;switch(!0){case l>=1440:case l>=1024:return g?3:p;case l>=768:return g||x?2.3:P?2:1;default:return P?1.2:1}};return u("section",{"data-ui-component-id":"GraphicOverlay",ref:t,...B,className:w("graphicOverlayBlock text-info-primary ",N),children:[i&&i.length>0?e(_,{className:"!overflow-visible",id:"MultiLayoutGraphicBlock3",data:{list:i||[],configuration:{shape:y,num:i.length,locale:n,onVideoPlayBtnClick:b}},Slide:A,breakpoints:{0:{spaceBetween:12,freeMode:!1,slidesPerView:1},374:{spaceBetween:12,freeMode:!1,slidesPerView:c(374)},768:{spaceBetween:16,freeMode:!1,slidesPerView:c(768)},1024:{spaceBetween:16,freeMode:!1,slidesPerView:c(1024)},1440:{spaceBetween:16,freeMode:!1,slidesPerView:c(1440)}}}):null,k&&e(E,{visible:k,youTubeId:a,videoUrl:s,onCloseModal:()=>v(!1)})]})});z.displayName="GraphicOverlayBlock";var se=R(z);export{se as default};
2
2
  //# sourceMappingURL=GraphicOverlay.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/GraphicOverlay/GraphicOverlay.tsx"],
4
- "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { GraphicOverlayProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[346] tablet:aspect-h-[400] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-box': true,\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(\n getLocalizedPath(blockLink || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n ></a>\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden h-full overflow-hidden\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block h-full overflow-hidden\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left')}\n variant=\"secondary\"\n as=\"a\"\n href={trackUrlRef(\n getLocalizedPath(secondaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton?.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right')}\n variant=\"primary\"\n as=\"a\"\n href={trackUrlRef(\n getLocalizedPath(primaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-[32px] laptop:right-[32px] absolute bottom-[16px] right-[16px]\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 hover:bg-current/75 bg-info-primary flex size-8 items-center justify-center rounded-full opacity-80\"\n >\n <svg\n width=\"12\"\n height=\"14\"\n viewBox=\"0 0 12 14\"\n fill={theme === 'dark' ? 'black' : 'white'}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M12 7L0 14L0 0L12 7Z\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst GraphicOverlay = React.forwardRef<HTMLDivElement, GraphicOverlayProps>((props, ref) => {\n const { data, className, ...rest } = props\n const { shape, items = [] } = data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const { locale = 'us' } = useAiuiContext()\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n\n const handleSwiperShow = (width: number) => {\n const len = items?.length\n const isShow = len > 3\n const isMiddle = len > 2\n const isMobile = len > 1\n\n switch (true) {\n case width >= 1440:\n case width >= 1024:\n return isShow ? 3 : len\n case width >= 768:\n if (isShow || isMiddle) {\n return 2.3\n }\n return isMobile ? 2 : 1\n default:\n return isMobile ? 1.2 : 1\n }\n }\n\n return (\n <section\n data-ui-component-id=\"GraphicOverlay\"\n ref={ref}\n {...rest}\n className={cn('graphicOverlayBlock text-info-primary ', className)}\n >\n {items && items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: items || [],\n configuration: {\n shape: shape,\n num: items.length,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: handleSwiperShow(374),\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(768),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1024),\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1440),\n },\n }}\n />\n ) : null}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nGraphicOverlay.displayName = 'GraphicOverlayBlock'\n\nexport default withLayout(GraphicOverlay)\nexport type { GraphicOverlayProps }\n"],
5
- "mappings": "AAyFQ,cAAAA,EA+CE,QAAAC,MA/CF,oBAzFR,OAAOC,GAAS,YAAAC,EAAU,aAAAC,EAAW,UAAAC,MAAc,QACnD,OAAS,iBAAAC,MAAqB,mBAE9B,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,MAAAC,EAAI,oBAAAC,MAAwB,yBACrC,OAAOC,MAAe,wBACtB,OAAS,WAAAC,MAAe,2BACxB,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,kBAAAC,MAAsB,2BAE/B,MAAMC,EAAgB,QAChBC,EAAgB,YAEhBC,EAAY,CAAC,CACjB,KAAMC,EACN,cAAAC,EACA,OAAAC,CACF,IAKM,CACJ,KAAM,CAACC,EAAUC,CAAW,EAAIvB,EAAkB,EAAK,EACjDwB,EAAarB,EAAc,CAAE,MAAO,oBAAqB,CAAC,EAE1DsB,EAAMvB,EAAuB,IAAI,EAEjCwB,EAAe,IAAM,CACzB,OAAQN,GAAe,IAAK,CAC1B,IAAK,GACH,MAAO,8LACT,IAAK,GACH,MAAO,4LACT,IAA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,GAAS,KACZ,OAAOE,EAAS,EAAID,EACtB,KAAKD,GAAS,IACZ,OAAIE,GAAUC,EACL,IAEFrC,EAAW,EAAI,EACxB,QACE,OAAOA,EAAW,IAAM,CAC5B,CACF,EAEA,OACExB,EAAC,WACC,uBAAqB,iBACrB,IAAK2B,EACJ,GAAGkB,EACJ,UAAWlC,EAAG,yCAA0CiC,CAAS,EAEhE,UAAAG,GAASA,EAAM,OAAS,EACvBhD,EAACc,EAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CACJ,KAAMkC,GAAS,CAAC,EAChB,cAAe,CACb,MAAOD,EACP,IAAKC,EAAM,OACX,OAAAO,EACA,oBAAqBC,CACvB,CACF,EACA,MAAOnC,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeqC,EAAiB,GAAG,CACrC,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,GAAG,CACrC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,CACF,EACF,EACE,KACHT,GACCjD,EAACW,EAAA,CACC,QAASsC,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CAAC,EAEDR,EAAe,YAAc,sBAE7B,IAAOqB,GAAQxD,EAAWmC,CAAc",
4
+ "sourcesContent": ["import React, { useState, useEffect, useRef } from 'react'\nimport { useMediaQuery } from 'react-responsive'\nimport type { GraphicOverlayProps, Item } from './types'\nimport { withLayout } from '../../shared/Styles.js'\nimport Picture from '../../components/picture.js'\nimport Button from '../../components/button.js'\nimport { Heading } from '../../components/heading.js'\nimport { VideoModal } from '../VideoModal/index.js'\nimport { cn, getLocalizedPath } from '../../helpers/utils.js'\nimport SwiperBox from '../SwiperBox/index.js'\nimport { isVideo } from '../../shared/mimeType.js'\nimport { useExposure } from '../../hooks/useExposure.js'\nimport { trackUrlRef } from '../../shared/trackUrlRef.js'\nimport { useAiuiContext } from '../AiuiProvider/index.js'\n\nconst componentType = 'image'\nconst componentName = 'p1_banner'\n\nconst ItemBlock = ({\n data: item,\n configuration,\n jIndex,\n}: {\n data: Item\n configuration?: any\n jIndex?: number\n spanType?: string\n}) => {\n const [isMobile, setIsMobile] = useState<boolean>(false)\n const mediaQuery = useMediaQuery({ query: '(max-width: 768px)' })\n\n const ref = useRef<HTMLDivElement>(null)\n\n const handleAspect = () => {\n switch (configuration?.num) {\n case 1:\n return 'tablet:aspect-w-[704] tablet:aspect-h-[400] laptop:aspect-w-[896] laptop:aspect-h-[384] desktop:aspect-w-[1312] desktop:aspect-h-[512] lg-desktop:aspect-w-[1664] lg-desktop:aspect-h-[640]'\n case 2:\n return 'tablet:aspect-w-[346] tablet:aspect-h-[400] laptop:aspect-w-[440] laptop:aspect-h-[384] desktop:aspect-w-[648] desktop:aspect-h-[512] lg-desktop:aspect-w-[824] lg-desktop:aspect-h-[640]'\n case 3:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n default:\n return 'tablet:aspect-w-[296] tablet:aspect-h-[400] laptop:aspect-w-[288] laptop:aspect-h-[384] desktop:aspect-w-[426] desktop:aspect-h-[512] lg-desktop:aspect-w-[544] lg-desktop:aspect-h-[640]'\n }\n }\n\n useExposure(ref, {\n componentType: componentType,\n componentName: componentName,\n position: jIndex,\n componentTitle: item.title,\n componentDescription: item.description,\n navigation: configuration?.activeTab,\n })\n\n useEffect(() => {\n setIsMobile(mediaQuery)\n }, [mediaQuery])\n\n const {\n theme = 'light',\n title,\n description,\n imageUrl,\n primaryButton,\n secondaryButton,\n imageMobileUrl,\n blockLink,\n video,\n youtubeId,\n isYouTube,\n } = item\n const lgButtonSize = 'lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px]'\n\n return (\n <div\n className={cn(\n 'item-wrapper text-info-primary group relative box-border w-full overflow-hidden',\n handleAspect(),\n {\n 'rounded-box': true,\n 'aiui-dark': theme === 'dark',\n 'h-[400px]': isMobile,\n },\n `text-info-primary`\n )}\n ref={ref}\n >\n {blockLink && (\n <a\n className=\"absolute inset-0 z-10\"\n href={trackUrlRef(\n getLocalizedPath(blockLink || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n aria-hidden=\"true\"\n tabIndex={-1}\n ></a>\n )}\n <div className=\"absolute inset-0\">\n {isVideo(imageUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:block hidden h-full overflow-hidden\">\n <source src={imageUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageUrl?.url}\n alt={imageUrl?.alt || ''}\n className=\"tablet:block hidden h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 group-hover:scale-105 object-cover\"\n style={{ aspectRatio: `${imageUrl?.width}/${imageUrl?.height}` }}\n />\n )}\n {isVideo(imageMobileUrl?.mimeType) ? (\n <video autoPlay muted playsInline loop className=\"tablet:hidden block h-full overflow-hidden\">\n <source src={imageMobileUrl?.url} type=\"video/mp4\" />\n </video>\n ) : (\n <Picture\n source={imageMobileUrl?.url || imageUrl?.url}\n alt={imageMobileUrl?.alt || imageUrl?.alt || ''}\n className=\"tablet:hidden block h-full overflow-hidden\"\n imgClassName=\"h-full transition-all duration-300 object-cover\"\n />\n )}\n <div\n className={cn(\n 'laptop:p-6 desktop:p-[32px] laptop:gap-4 desktop:gap-6 pointer-events-none absolute inset-x-0 bottom-0 z-20 flex w-fit flex-col gap-6 p-4',\n {\n 'laptop:top-1/2 laptop:-translate-y-1/2 laptop:bottom-auto': item?.width === 'full',\n }\n )}\n >\n <div className=\"flex flex-col gap-1\">\n <Heading size={3} as=\"h3\" className=\"item-title\" html={title} />\n <Heading\n as=\"h4\"\n className=\"item-description desktop:text-[16px] lg-desktop:text-[18px] line-clamp-1 text-[14px]\"\n html={description}\n />\n </div>\n <div className=\"lg-desktop:gap-3 flex gap-2\">\n {secondaryButton && secondaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-left pointer-events-auto')}\n variant=\"secondary\"\n as=\"a\"\n href={trackUrlRef(\n getLocalizedPath(secondaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${secondaryButton?.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {secondaryButton.text}\n <span className=\"sr-only\">{title ?? description}</span>\n </Button>\n )}\n {primaryButton && primaryButton.text && (\n <Button\n aria-label={title ?? description}\n className={cn(lgButtonSize, 'link-right pointer-events-auto')}\n variant=\"primary\"\n as=\"a\"\n href={trackUrlRef(\n getLocalizedPath(primaryButton.link || '', configuration?.locale || 'us'),\n `${componentType}_${componentName}`\n )}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`${title}#${description}#${primaryButton.text}`}\n data-headless-nav-position={`${configuration?.activeTab}#${jIndex}`}\n >\n {primaryButton.text}\n </Button>\n )}\n </div>\n </div>\n </div>\n <div>\n <div className=\"laptop:bottom-[32px] laptop:right-[32px] absolute bottom-[16px] right-[16px]\">\n {(video?.url || youtubeId) && (\n <button\n onClick={() => {\n configuration?.onVideoPlayBtnClick?.(video?.url || youtubeId, isYouTube)\n }}\n className=\"laptop:size-12 hover:bg-current/75 bg-info-primary flex size-8 items-center justify-center rounded-full opacity-80\"\n >\n <svg\n width=\"12\"\n height=\"14\"\n viewBox=\"0 0 12 14\"\n fill={theme === 'dark' ? 'black' : 'white'}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M12 7L0 14L0 0L12 7Z\" />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n )\n}\n\nconst GraphicOverlay = React.forwardRef<HTMLDivElement, GraphicOverlayProps>((props, ref) => {\n const { data, className, ...rest } = props\n const { shape, items = [] } = data\n const [visible, setVisible] = useState<boolean>(false)\n const [videoUrl, setVideoUrl] = useState<string>('')\n const [youTubeId, setYouTubeId] = useState<string>('')\n const { locale = 'us' } = useAiuiContext()\n\n const handleVideoPlayBtnClick = (url: string, isYouTube: boolean) => {\n setVisible(true)\n if (isYouTube) {\n setYouTubeId?.(url || '')\n } else {\n setVideoUrl?.(url || '')\n }\n }\n\n const handleSwiperShow = (width: number) => {\n const len = items?.length\n const isShow = len > 3\n const isMiddle = len > 2\n const isMobile = len > 1\n\n switch (true) {\n case width >= 1440:\n case width >= 1024:\n return isShow ? 3 : len\n case width >= 768:\n if (isShow || isMiddle) {\n return 2.3\n }\n return isMobile ? 2 : 1\n default:\n return isMobile ? 1.2 : 1\n }\n }\n\n return (\n <section\n data-ui-component-id=\"GraphicOverlay\"\n ref={ref}\n {...rest}\n className={cn('graphicOverlayBlock text-info-primary ', className)}\n >\n {items && items.length > 0 ? (\n <SwiperBox\n className=\"!overflow-visible\"\n id={'MultiLayoutGraphicBlock3'}\n data={{\n list: items || [],\n configuration: {\n shape: shape,\n num: items.length,\n locale,\n onVideoPlayBtnClick: handleVideoPlayBtnClick,\n },\n }}\n Slide={ItemBlock}\n breakpoints={{\n 0: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: 1,\n },\n 374: {\n spaceBetween: 12,\n freeMode: false,\n slidesPerView: handleSwiperShow(374),\n },\n 768: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(768),\n },\n 1024: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1024),\n },\n 1440: {\n spaceBetween: 16,\n freeMode: false,\n slidesPerView: handleSwiperShow(1440),\n },\n }}\n />\n ) : null}\n {visible && (\n <VideoModal\n visible={visible}\n youTubeId={youTubeId}\n videoUrl={videoUrl}\n onCloseModal={() => setVisible(false)}\n />\n )}\n </section>\n )\n})\n\nGraphicOverlay.displayName = 'GraphicOverlayBlock'\n\nexport default withLayout(GraphicOverlay)\nexport type { GraphicOverlayProps }\n"],
5
+ "mappings": "AAyFQ,cAAAA,EA+CE,QAAAC,MA/CF,oBAzFR,OAAOC,GAAS,YAAAC,EAAU,aAAAC,EAAW,UAAAC,MAAc,QACnD,OAAS,iBAAAC,MAAqB,mBAE9B,OAAS,cAAAC,MAAkB,yBAC3B,OAAOC,MAAa,8BACpB,OAAOC,MAAY,6BACnB,OAAS,WAAAC,MAAe,8BACxB,OAAS,cAAAC,MAAkB,yBAC3B,OAAS,MAAAC,EAAI,oBAAAC,MAAwB,yBACrC,OAAOC,MAAe,wBACtB,OAAS,WAAAC,MAAe,2BACxB,OAAS,eAAAC,MAAmB,6BAC5B,OAAS,eAAAC,MAAmB,8BAC5B,OAAS,kBAAAC,MAAsB,2BAE/B,MAAMC,EAAgB,QAChBC,EAAgB,YAEhBC,EAAY,CAAC,CACjB,KAAMC,EACN,cAAAC,EACA,OAAAC,CACF,IAKM,CACJ,KAAM,CAACC,EAAUC,CAAW,EAAIvB,EAAkB,EAAK,EACjDwB,EAAarB,EAAc,CAAE,MAAO,oBAAqB,CAAC,EAE1DsB,EAAMvB,EAAuB,IAAI,EAEjCwB,EAAe,IAAM,CACzB,OAAQN,GAAe,IAAK,CAC1B,IAAK,GACH,MAAO,8LACT,IAAK,GACH,MAAO,4LACT,IAAK,GACH,MAAO,4LACT,QACE,MAAO,2LACX,CACF,EAEAP,EAAYY,EAAK,CACf,cAAeT,EACf,cAAeC,EACf,SAAUI,EACV,eAAgBF,EAAK,MACrB,qBAAsBA,EAAK,YAC3B,WAAYC,GAAe,SAC7B,CAAC,EAEDnB,EAAU,I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AK2B,EACJ,GAAGkB,EACJ,UAAWlC,EAAG,yCAA0CiC,CAAS,EAEhE,UAAAG,GAASA,EAAM,OAAS,EACvBhD,EAACc,EAAA,CACC,UAAU,oBACV,GAAI,2BACJ,KAAM,CACJ,KAAMkC,GAAS,CAAC,EAChB,cAAe,CACb,MAAOD,EACP,IAAKC,EAAM,OACX,OAAAO,EACA,oBAAqBC,CACvB,CACF,EACA,MAAOnC,EACP,YAAa,CACX,EAAG,CACD,aAAc,GACd,SAAU,GACV,cAAe,CACjB,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeqC,EAAiB,GAAG,CACrC,EACA,IAAK,CACH,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,GAAG,CACrC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,EACA,KAAM,CACJ,aAAc,GACd,SAAU,GACV,cAAeA,EAAiB,IAAI,CACtC,CACF,EACF,EACE,KACHT,GACCjD,EAACW,EAAA,CACC,QAASsC,EACT,UAAWI,EACX,SAAUF,EACV,aAAc,IAAMD,EAAW,EAAK,EACtC,GAEJ,CAEJ,CAAC,EAEDR,EAAe,YAAc,sBAE7B,IAAOqB,GAAQxD,EAAWmC,CAAc",
6
6
  "names": ["jsx", "jsxs", "React", "useState", "useEffect", "useRef", "useMediaQuery", "withLayout", "Picture", "Button", "Heading", "VideoModal", "cn", "getLocalizedPath", "SwiperBox", "isVideo", "useExposure", "trackUrlRef", "useAiuiContext", "componentType", "componentName", "ItemBlock", "item", "configuration", "jIndex", "isMobile", "setIsMobile", "mediaQuery", "ref", "handleAspect", "theme", "title", "description", "imageUrl", "primaryButton", "secondaryButton", "imageMobileUrl", "blockLink", "video", "youtubeId", "isYouTube", "lgButtonSize", "GraphicOverlay", "props", "data", "className", "rest", "shape", "items", "visible", "setVisible", "videoUrl", "setVideoUrl", "youTubeId", "setYouTubeId", "locale", "handleVideoPlayBtnClick", "url", "handleSwiperShow", "width", "len", "isShow", "isMiddle", "GraphicOverlay_default"]
7
7
  }
@@ -132,8 +132,10 @@ export interface ProductContextType {
132
132
  addToCartLoading?: boolean;
133
133
  addOrder?: Array<'bundle' | 'gift' | 'exchange'>;
134
134
  setAddOrder?: Dispatch<SetStateAction<Array<'bundle' | 'gift' | 'exchange'>>>;
135
+ notifyMeMode?: 'normal' | 'notify_me';
136
+ onNotifyMeClick?: (open: boolean) => void;
135
137
  }
136
138
  export declare const BizProductContext: React.Context<ProductContextType>;
137
139
  export declare const useBizProductContext: () => ProductContextType;
138
- declare const ProductProvider: ({ product, isLogin, profile, isMobile, isDesktop, children, renderRating, freeGift, exchangePurchase, bundle, checkedBundle, checkedGift, setCheckedBundle, setCheckedGift, checkedExchangePurchase, setCheckedExchangePurchase, variant, selectedOptions, setSelectedOptions, compareData, coupon, finalPrice, comparePrice, totalSavings, savingDetail, setSavingDetail, selectedVariants, onAddToCart, onBuyNow, creditsRedemption, memberFunctionResult, openModal, openSignInPopup, openAuthCodePopup, openSignUpPopup, renderInstallments, onUseCouponChange, onUseMemberDiscountChange, discount, buyNowLoading, addToCartLoading, }: PropsWithChildren<Omit<ProductContextType, "joinedRecommendBuyProducts" | "setJoinedRecommendBuyProducts" | "addOrder" | "setAddOrder" | "resolvedPayload">>) => import("react/jsx-runtime").JSX.Element;
140
+ declare const ProductProvider: ({ product, isLogin, profile, isMobile, isDesktop, children, renderRating, freeGift, exchangePurchase, bundle, checkedBundle, checkedGift, setCheckedBundle, setCheckedGift, checkedExchangePurchase, setCheckedExchangePurchase, variant, selectedOptions, setSelectedOptions, compareData, coupon, finalPrice, comparePrice, totalSavings, savingDetail, setSavingDetail, selectedVariants, onAddToCart, onBuyNow, creditsRedemption, memberFunctionResult, openModal, openSignInPopup, openAuthCodePopup, openSignUpPopup, renderInstallments, onUseCouponChange, onUseMemberDiscountChange, discount, buyNowLoading, addToCartLoading, notifyMeMode, onNotifyMeClick, }: PropsWithChildren<Omit<ProductContextType, "joinedRecommendBuyProducts" | "setJoinedRecommendBuyProducts" | "addOrder" | "setAddOrder" | "resolvedPayload">>) => import("react/jsx-runtime").JSX.Element;
139
141
  export default ProductProvider;
@@ -1,2 +1,2 @@
1
- import{jsx as re}from"react/jsx-runtime";import{createContext as $,useContext as d,useState as c,useEffect as ee,useMemo as te}from"react";import{VARIANT_PAYLOAD_EXCLUDED_KEYS as ne}from"./const.js";const o=$({}),se=()=>{if(!d(o))throw new Error("useProductContext must be used in <ProductProvider>");return d(o)},oe=({product:t,isLogin:u,profile:s,isMobile:l,isDesktop:p,children:m,renderRating:P,freeGift:b,exchangePurchase:g,bundle:y,checkedBundle:h,checkedGift:f,setCheckedBundle:C,setCheckedGift:v,checkedExchangePurchase:x,setCheckedExchangePurchase:S,variant:e,selectedOptions:D,setSelectedOptions:R,compareData:B,coupon:A,finalPrice:k,comparePrice:O,totalSavings:_,savingDetail:V,setSavingDetail:M,selectedVariants:T,onAddToCart:E,onBuyNow:L,creditsRedemption:w,memberFunctionResult:F,openModal:N,openSignInPopup:G,openAuthCodePopup:I,openSignUpPopup:J,renderInstallments:U,onUseCouponChange:W,onUseMemberDiscountChange:j,discount:z,buyNowLoading:K,addToCartLoading:Y})=>{const[X,r]=c({}),[q,a]=c([]),H=te(()=>{const Q=e?.payload?.components??[],Z=ne;return Q.filter(n=>{const i=n.componentKey??n.blockType??n.blockName;return i&&!Z.includes(i)}).length>0?e?.payload:t?.payload},[e?.payload,t?.payload]);return ee(()=>{e?.id&&(r({bundle:{value:void 0,canOperate:!0},gift:{value:void 0,canOperate:!0},exchange:{value:void 0,canOperate:!0}}),a([]))},[e?.id]),re(o.Provider,{value:{product:t,variant:e,isMobile:l,isDesktop:p,isLogin:u,profile:s,coupon:A,renderRating:P,finalPrice:k,comparePrice:O,savingDetail:V,setSavingDetail:M,totalSavings:_,selectedOptions:D,setSelectedOptions:R,freeGift:b,exchangePurchase:g,checkedGift:f,setCheckedGift:v,checkedBundle:h,setCheckedBundle:C,bundle:y,compareData:B,selectedVariants:T,onAddToCart:E,onBuyNow:L,joinedRecommendBuyProducts:X,setJoinedRecommendBuyProducts:r,checkedExchangePurchase:x,setCheckedExchangePurchase:S,creditsRedemption:w,memberFunctionResult:F,openModal:N,openSignInPopup:G,openAuthCodePopup:I,openSignUpPopup:J,renderInstallments:U,onUseCouponChange:W,onUseMemberDiscountChange:j,discount:z,buyNowLoading:K,addToCartLoading:Y,addOrder:q,setAddOrder:a,resolvedPayload:H},children:m})};var le=oe;export{o as BizProductContext,le as default,se as useBizProductContext};
1
+ import{jsx as ie}from"react/jsx-runtime";import{createContext as te,useContext as d,useState as c,useEffect as ne,useMemo as oe}from"react";import{VARIANT_PAYLOAD_EXCLUDED_KEYS as re}from"./const.js";const o=te({}),pe=()=>{if(!d(o))throw new Error("useProductContext must be used in <ProductProvider>");return d(o)},ae=({product:t,isLogin:u,profile:s,isMobile:l,isDesktop:p,children:m,renderRating:P,freeGift:b,exchangePurchase:g,bundle:y,checkedBundle:h,checkedGift:f,setCheckedBundle:C,setCheckedGift:v,checkedExchangePurchase:x,setCheckedExchangePurchase:S,variant:e,selectedOptions:D,setSelectedOptions:R,compareData:B,coupon:A,finalPrice:k,comparePrice:_,totalSavings:O,savingDetail:M,setSavingDetail:V,selectedVariants:T,onAddToCart:E,onBuyNow:L,creditsRedemption:N,memberFunctionResult:w,openModal:F,openSignInPopup:G,openAuthCodePopup:I,openSignUpPopup:J,renderInstallments:U,onUseCouponChange:W,onUseMemberDiscountChange:j,discount:z,buyNowLoading:K,addToCartLoading:Y,notifyMeMode:X,onNotifyMeClick:q})=>{const[H,r]=c({}),[Q,a]=c([]),Z=oe(()=>{const $=e?.payload?.components??[],ee=re;return $.filter(n=>{const i=n.componentKey??n.blockType??n.blockName;return i&&!ee.includes(i)}).length>0?e?.payload:t?.payload},[e?.payload,t?.payload]);return ne(()=>{e?.id&&(r({bundle:{value:void 0,canOperate:!0},gift:{value:void 0,canOperate:!0},exchange:{value:void 0,canOperate:!0}}),a([]))},[e?.id]),ie(o.Provider,{value:{product:t,variant:e,isMobile:l,isDesktop:p,isLogin:u,profile:s,coupon:A,renderRating:P,finalPrice:k,comparePrice:_,savingDetail:M,setSavingDetail:V,totalSavings:O,selectedOptions:D,setSelectedOptions:R,freeGift:b,exchangePurchase:g,checkedGift:f,setCheckedGift:v,checkedBundle:h,setCheckedBundle:C,bundle:y,compareData:B,selectedVariants:T,onAddToCart:E,onBuyNow:L,joinedRecommendBuyProducts:H,setJoinedRecommendBuyProducts:r,checkedExchangePurchase:x,setCheckedExchangePurchase:S,creditsRedemption:N,memberFunctionResult:w,openModal:F,openSignInPopup:G,openAuthCodePopup:I,openSignUpPopup:J,renderInstallments:U,onUseCouponChange:W,onUseMemberDiscountChange:j,discount:z,buyNowLoading:K,addToCartLoading:Y,notifyMeMode:X,onNotifyMeClick:q,addOrder:Q,setAddOrder:a,resolvedPayload:Z},children:m})};var me=ae;export{o as BizProductContext,me as default,pe as useBizProductContext};
2
2
  //# sourceMappingURL=BizProductProvider.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/biz-components/Listing/BizProductProvider.tsx"],
4
- "sourcesContent": ["import React, {\n createContext,\n useCallback,\n useContext,\n type Dispatch,\n type SetStateAction,\n type PropsWithChildren,\n useState,\n useEffect,\n useMemo,\n} from 'react'\nimport type {\n Product,\n ProductPrice,\n ProductVariant,\n VariantCoupon,\n Options,\n FreeGift,\n BundleListItem,\n Bundle,\n} from './types/product'\nimport type { CompareData, DiscountData } from './types.js'\nimport { VARIANT_PAYLOAD_EXCLUDED_KEYS } from './const.js'\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\nexport type SavingDetail = {\n coupon: number\n bundle: number\n member: number\n freeGift: number\n compare: number\n exchangePurchase: number\n}\n\ntype variantWithFinalPrice = ProductVariant & { finalPrice?: ProductPrice }\n\nexport type FunctionMemberPriceResult = {\n hasMemberPrice: boolean\n originalPrice: number\n withCouponMemberTotalSave: number\n withoutCouponMaxMemberTotalSave?: number\n labels: {\n key: string\n value: string\n desc: string\n }[]\n}\n\nexport type ModalData = {\n needClickAway?: boolean\n className?: string\n title?: string\n content?: string\n domContent?: React.ReactNode\n}\n\nexport type JoinedRecommendBuyProducts = {\n bundle?: {\n value?: BundleListItem\n canOperate?: boolean\n }\n gift?: {\n value?: ProductVariant\n canOperate?: boolean\n }\n exchange?: {\n value?: ProductVariant\n canOperate?: boolean\n }\n}\n\nexport type CreditsRedemption = {\n amount: number\n availablePoints: number\n usedPoints: number\n skuDetails?: {\n sku: string\n is_eligible: boolean\n }[]\n}\n\nexport interface ProductContextType {\n isLogin?: boolean\n isMobile?: boolean\n isDesktop?: boolean\n product: Product\n profile?: UserProfile\n variant: ProductVariant\n resolvedPayload?: {\n components: any[]\n [key: string]: any\n }\n selectedVariants: Array<variantWithFinalPrice>\n renderRating?: React.ReactNode\n coupon?: VariantCoupon\n savingDetail: SavingDetail\n setSavingDetail: Dispatch<SetStateAction<SavingDetail>>\n finalPrice: number\n comparePrice: number\n totalSavings: number\n selectedOptions: Options\n setSelectedOptions: Dispatch<SetStateAction<Options>>\n freeGift?: FreeGift\n checkedGift?: ProductVariant\n setCheckedGift?: Dispatch<SetStateAction<ProductVariant | undefined>>\n exchangePurchase?: FreeGift\n checkedExchangePurchase?: ProductVariant\n setCheckedExchangePurchase?: Dispatch<SetStateAction<ProductVariant | undefined>>\n checkedBundle?: BundleListItem\n setCheckedBundle: Dispatch<SetStateAction<BundleListItem | undefined>>\n joinedRecommendBuyProducts: JoinedRecommendBuyProducts\n setJoinedRecommendBuyProducts?: Dispatch<SetStateAction<JoinedRecommendBuyProducts>>\n checkedCareBundle?: ProductVariant\n setCheckedCareBundle?: Dispatch<SetStateAction<ProductVariant | undefined>>\n bundle?: Bundle\n compareData?: CompareData['data']\n onAddToCart?: () => void\n onBuyNow?: () => void\n creditsRedemption?: CreditsRedemption\n memberFunctionResult?: FunctionMemberPriceResult\n openModal: ({ title, content, domContent }: ModalData) => void\n openSignInPopup?: () => void\n openAuthCodePopup?: () => void\n openSignUpPopup?: () => void\n renderInstallments?: React.ReactNode\n onUseCouponChange?: (couponSaving: number) => void\n onUseMemberDiscountChange?: (memberSaving: number) => void\n discount?: DiscountData\n buyNowLoading?: boolean\n addToCartLoading?: boolean\n addOrder?: Array<'bundle' | 'gift' | 'exchange'>\n setAddOrder?: Dispatch<SetStateAction<Array<'bundle' | 'gift' | 'exchange'>>>\n}\n\n// const initialState: ProductContextType = {\n// isLogin: false,\n// isMobile: false,\n// product: {} as Product,\n// variant: {} as ProductVariant,\n// savingDetail: { coupon: 0, bundle: 0, member: 0, freeGift: 0, compare: 0 },\n// finalPrice: 0,\n// comparePrice: 0,\n// totalSavings: 0,\n// renderRating: null,\n// selectedOptions: {} as Options,\n// setSelectedOptions: () => {},\n// checkedBundle: undefined,\n// checkedGift: undefined,\n// setCheckedBundle: () => {},\n// setCheckedGift: () => {},\n// checkedCareBundle: undefined,\n// setCheckedCareBundle: () => {},\n// }\n\nexport const BizProductContext = createContext<ProductContextType>({} as ProductContextType)\n\nexport const useBizProductContext = () => {\n const context = useContext(BizProductContext)\n if (!context) {\n throw new Error('useProductContext must be used in <ProductProvider>')\n }\n return useContext(BizProductContext)\n}\n\nconst ProductProvider = ({\n product,\n isLogin,\n profile,\n isMobile,\n isDesktop,\n children,\n renderRating,\n freeGift,\n exchangePurchase,\n bundle,\n checkedBundle,\n checkedGift,\n setCheckedBundle,\n setCheckedGift,\n checkedExchangePurchase,\n setCheckedExchangePurchase,\n variant,\n selectedOptions,\n setSelectedOptions,\n compareData,\n coupon,\n finalPrice,\n comparePrice,\n totalSavings,\n savingDetail,\n setSavingDetail,\n selectedVariants,\n onAddToCart,\n onBuyNow,\n creditsRedemption,\n memberFunctionResult,\n openModal,\n openSignInPopup,\n openAuthCodePopup,\n openSignUpPopup,\n renderInstallments,\n onUseCouponChange,\n onUseMemberDiscountChange,\n discount,\n buyNowLoading,\n addToCartLoading,\n}: PropsWithChildren<\n Omit<\n ProductContextType,\n 'joinedRecommendBuyProducts' | 'setJoinedRecommendBuyProducts' | 'addOrder' | 'setAddOrder' | 'resolvedPayload'\n >\n>) => {\n const [joinedRecommendBuyProducts, setJoinedRecommendBuyProducts] = useState<JoinedRecommendBuyProducts>({})\n const [addOrder, setAddOrder] = useState<Array<'bundle' | 'gift' | 'exchange'>>([])\n\n const resolvedPayload = useMemo(() => {\n const variantComponents: any[] = variant?.payload?.components ?? []\n const excluded = VARIANT_PAYLOAD_EXCLUDED_KEYS as readonly string[]\n const nonExcluded = variantComponents.filter(item => {\n const identifier = item.componentKey ?? item.blockType ?? item.blockName\n return identifier && !excluded.includes(identifier)\n })\n return nonExcluded.length > 0 ? variant?.payload : product?.payload\n }, [variant?.payload, product?.payload])\n\n useEffect(() => {\n if (variant?.id) {\n setJoinedRecommendBuyProducts({\n bundle: {\n value: undefined,\n canOperate: true,\n },\n gift: {\n value: undefined,\n canOperate: true,\n },\n exchange: {\n value: undefined,\n canOperate: true,\n },\n })\n setAddOrder([])\n }\n }, [variant?.id])\n\n return (\n <BizProductContext.Provider\n value={{\n product,\n variant,\n isMobile,\n isDesktop,\n isLogin,\n profile,\n coupon,\n renderRating,\n finalPrice,\n comparePrice,\n savingDetail,\n setSavingDetail,\n totalSavings,\n selectedOptions,\n setSelectedOptions,\n freeGift,\n exchangePurchase,\n checkedGift,\n setCheckedGift,\n checkedBundle,\n setCheckedBundle,\n bundle,\n compareData,\n selectedVariants,\n onAddToCart,\n onBuyNow,\n joinedRecommendBuyProducts,\n setJoinedRecommendBuyProducts,\n checkedExchangePurchase,\n setCheckedExchangePurchase,\n creditsRedemption,\n memberFunctionResult,\n openModal,\n openSignInPopup,\n openAuthCodePopup,\n openSignUpPopup,\n renderInstallments,\n onUseCouponChange,\n onUseMemberDiscountChange,\n discount,\n buyNowLoading,\n addToCartLoading,\n addOrder,\n setAddOrder,\n resolvedPayload,\n }}\n >\n {children}\n </BizProductContext.Provider>\n )\n}\n\nexport default ProductProvider\n"],
5
- "mappings": "AAmRI,cAAAA,OAAA,oBAnRJ,OACE,iBAAAC,EAEA,cAAAC,EAIA,YAAAC,EACA,aAAAC,GACA,WAAAC,OACK,QAYP,OAAS,iCAAAC,OAAqC,aAiKvC,MAAMC,EAAoBN,EAAkC,CAAC,CAAuB,EAE9EO,GAAuB,IAAM,CAExC,GAAI,CADYN,EAAWK,CAAiB,EAE1C,MAAM,IAAI,MAAM,qDAAqD,EAEvE,OAAOL,EAAWK,CAAiB,CACrC,EAEME,GAAkB,CAAC,CACvB,QAAAC,EACA,QAAAC,EACA,QAAAC,EACA,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,aAAAC,EACA,SAAAC,EACA,iBAAAC,EACA,OAAAC,EACA,cAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,wBAAAC,EACA,2BAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,YAAAC,EACA,OAAAC,EACA,WAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,qBAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,kBAAAC,EACA,0BAAAC,EACA,SAAAC,EACA,cAAAC,EACA,iBAAAC,CACF,IAKM,CACJ,KAAM,CAACC,EAA4BC,CAA6B,EAAIjD,EAAqC,CAAC,CAAC,EACrG,CAACkD,EAAUC,CAAW,EAAInD,EAAgD,CAAC,CAAC,EAE5EoD,EAAkBlD,GAAQ,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jsx", "createContext", "useContext", "useState", "useEffect", "useMemo", "VARIANT_PAYLOAD_EXCLUDED_KEYS", "BizProductContext", "useBizProductContext", "ProductProvider", "product", "isLogin", "profile", "isMobile", "isDesktop", "children", "renderRating", "freeGift", "exchangePurchase", "bundle", "checkedBundle", "checkedGift", "setCheckedBundle", "setCheckedGift", "checkedExchangePurchase", "setCheckedExchangePurchase", "variant", "selectedOptions", "setSelectedOptions", "compareData", "coupon", "finalPrice", "comparePrice", "totalSavings", "savingDetail", "setSavingDetail", "selectedVariants", "onAddToCart", "onBuyNow", "creditsRedemption", "memberFunctionResult", "openModal", "openSignInPopup", "openAuthCodePopup", "openSignUpPopup", "renderInstallments", "onUseCouponChange", "onUseMemberDiscountChange", "discount", "buyNowLoading", "addToCartLoading", "joinedRecommendBuyProducts", "setJoinedRecommendBuyProducts", "addOrder", "setAddOrder", "resolvedPayload", "variantComponents", "excluded", "item", "identifier", "BizProductProvider_default"]
4
+ "sourcesContent": ["import React, {\n createContext,\n useCallback,\n useContext,\n type Dispatch,\n type SetStateAction,\n type PropsWithChildren,\n useState,\n useEffect,\n useMemo,\n} from 'react'\nimport type {\n Product,\n ProductPrice,\n ProductVariant,\n VariantCoupon,\n Options,\n FreeGift,\n BundleListItem,\n Bundle,\n} from './types/product'\nimport type { CompareData, DiscountData } from './types.js'\nimport { VARIANT_PAYLOAD_EXCLUDED_KEYS } from './const.js'\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\nexport type SavingDetail = {\n coupon: number\n bundle: number\n member: number\n freeGift: number\n compare: number\n exchangePurchase: number\n}\n\ntype variantWithFinalPrice = ProductVariant & { finalPrice?: ProductPrice }\n\nexport type FunctionMemberPriceResult = {\n hasMemberPrice: boolean\n originalPrice: number\n withCouponMemberTotalSave: number\n withoutCouponMaxMemberTotalSave?: number\n labels: {\n key: string\n value: string\n desc: string\n }[]\n}\n\nexport type ModalData = {\n needClickAway?: boolean\n className?: string\n title?: string\n content?: string\n domContent?: React.ReactNode\n}\n\nexport type JoinedRecommendBuyProducts = {\n bundle?: {\n value?: BundleListItem\n canOperate?: boolean\n }\n gift?: {\n value?: ProductVariant\n canOperate?: boolean\n }\n exchange?: {\n value?: ProductVariant\n canOperate?: boolean\n }\n}\n\nexport type CreditsRedemption = {\n amount: number\n availablePoints: number\n usedPoints: number\n skuDetails?: {\n sku: string\n is_eligible: boolean\n }[]\n}\n\nexport interface ProductContextType {\n isLogin?: boolean\n isMobile?: boolean\n isDesktop?: boolean\n product: Product\n profile?: UserProfile\n variant: ProductVariant\n resolvedPayload?: {\n components: any[]\n [key: string]: any\n }\n selectedVariants: Array<variantWithFinalPrice>\n renderRating?: React.ReactNode\n coupon?: VariantCoupon\n savingDetail: SavingDetail\n setSavingDetail: Dispatch<SetStateAction<SavingDetail>>\n finalPrice: number\n comparePrice: number\n totalSavings: number\n selectedOptions: Options\n setSelectedOptions: Dispatch<SetStateAction<Options>>\n freeGift?: FreeGift\n checkedGift?: ProductVariant\n setCheckedGift?: Dispatch<SetStateAction<ProductVariant | undefined>>\n exchangePurchase?: FreeGift\n checkedExchangePurchase?: ProductVariant\n setCheckedExchangePurchase?: Dispatch<SetStateAction<ProductVariant | undefined>>\n checkedBundle?: BundleListItem\n setCheckedBundle: Dispatch<SetStateAction<BundleListItem | undefined>>\n joinedRecommendBuyProducts: JoinedRecommendBuyProducts\n setJoinedRecommendBuyProducts?: Dispatch<SetStateAction<JoinedRecommendBuyProducts>>\n checkedCareBundle?: ProductVariant\n setCheckedCareBundle?: Dispatch<SetStateAction<ProductVariant | undefined>>\n bundle?: Bundle\n compareData?: CompareData['data']\n onAddToCart?: () => void\n onBuyNow?: () => void\n creditsRedemption?: CreditsRedemption\n memberFunctionResult?: FunctionMemberPriceResult\n openModal: ({ title, content, domContent }: ModalData) => void\n openSignInPopup?: () => void\n openAuthCodePopup?: () => void\n openSignUpPopup?: () => void\n renderInstallments?: React.ReactNode\n onUseCouponChange?: (couponSaving: number) => void\n onUseMemberDiscountChange?: (memberSaving: number) => void\n discount?: DiscountData\n buyNowLoading?: boolean\n addToCartLoading?: boolean\n addOrder?: Array<'bundle' | 'gift' | 'exchange'>\n setAddOrder?: Dispatch<SetStateAction<Array<'bundle' | 'gift' | 'exchange'>>>\n notifyMeMode?: 'normal' | 'notify_me'\n onNotifyMeClick?: (open: boolean) => void\n}\n\n// const initialState: ProductContextType = {\n// isLogin: false,\n// isMobile: false,\n// product: {} as Product,\n// variant: {} as ProductVariant,\n// savingDetail: { coupon: 0, bundle: 0, member: 0, freeGift: 0, compare: 0 },\n// finalPrice: 0,\n// comparePrice: 0,\n// totalSavings: 0,\n// renderRating: null,\n// selectedOptions: {} as Options,\n// setSelectedOptions: () => {},\n// checkedBundle: undefined,\n// checkedGift: undefined,\n// setCheckedBundle: () => {},\n// setCheckedGift: () => {},\n// checkedCareBundle: undefined,\n// setCheckedCareBundle: () => {},\n// }\n\nexport const BizProductContext = createContext<ProductContextType>({} as ProductContextType)\n\nexport const useBizProductContext = () => {\n const context = useContext(BizProductContext)\n if (!context) {\n throw new Error('useProductContext must be used in <ProductProvider>')\n }\n return useContext(BizProductContext)\n}\n\nconst ProductProvider = ({\n product,\n isLogin,\n profile,\n isMobile,\n isDesktop,\n children,\n renderRating,\n freeGift,\n exchangePurchase,\n bundle,\n checkedBundle,\n checkedGift,\n setCheckedBundle,\n setCheckedGift,\n checkedExchangePurchase,\n setCheckedExchangePurchase,\n variant,\n selectedOptions,\n setSelectedOptions,\n compareData,\n coupon,\n finalPrice,\n comparePrice,\n totalSavings,\n savingDetail,\n setSavingDetail,\n selectedVariants,\n onAddToCart,\n onBuyNow,\n creditsRedemption,\n memberFunctionResult,\n openModal,\n openSignInPopup,\n openAuthCodePopup,\n openSignUpPopup,\n renderInstallments,\n onUseCouponChange,\n onUseMemberDiscountChange,\n discount,\n buyNowLoading,\n addToCartLoading,\n notifyMeMode,\n onNotifyMeClick,\n}: PropsWithChildren<\n Omit<\n ProductContextType,\n 'joinedRecommendBuyProducts' | 'setJoinedRecommendBuyProducts' | 'addOrder' | 'setAddOrder' | 'resolvedPayload'\n >\n>) => {\n const [joinedRecommendBuyProducts, setJoinedRecommendBuyProducts] = useState<JoinedRecommendBuyProducts>({})\n const [addOrder, setAddOrder] = useState<Array<'bundle' | 'gift' | 'exchange'>>([])\n\n const resolvedPayload = useMemo(() => {\n const variantComponents: any[] = variant?.payload?.components ?? []\n const excluded = VARIANT_PAYLOAD_EXCLUDED_KEYS as readonly string[]\n const nonExcluded = variantComponents.filter(item => {\n const identifier = item.componentKey ?? item.blockType ?? item.blockName\n return identifier && !excluded.includes(identifier)\n })\n return nonExcluded.length > 0 ? variant?.payload : product?.payload\n }, [variant?.payload, product?.payload])\n\n useEffect(() => {\n if (variant?.id) {\n setJoinedRecommendBuyProducts({\n bundle: {\n value: undefined,\n canOperate: true,\n },\n gift: {\n value: undefined,\n canOperate: true,\n },\n exchange: {\n value: undefined,\n canOperate: true,\n },\n })\n setAddOrder([])\n }\n }, [variant?.id])\n\n return (\n <BizProductContext.Provider\n value={{\n product,\n variant,\n isMobile,\n isDesktop,\n isLogin,\n profile,\n coupon,\n renderRating,\n finalPrice,\n comparePrice,\n savingDetail,\n setSavingDetail,\n totalSavings,\n selectedOptions,\n setSelectedOptions,\n freeGift,\n exchangePurchase,\n checkedGift,\n setCheckedGift,\n checkedBundle,\n setCheckedBundle,\n bundle,\n compareData,\n selectedVariants,\n onAddToCart,\n onBuyNow,\n joinedRecommendBuyProducts,\n setJoinedRecommendBuyProducts,\n checkedExchangePurchase,\n setCheckedExchangePurchase,\n creditsRedemption,\n memberFunctionResult,\n openModal,\n openSignInPopup,\n openAuthCodePopup,\n openSignUpPopup,\n renderInstallments,\n onUseCouponChange,\n onUseMemberDiscountChange,\n discount,\n buyNowLoading,\n addToCartLoading,\n notifyMeMode,\n onNotifyMeClick,\n addOrder,\n setAddOrder,\n resolvedPayload,\n }}\n >\n {children}\n </BizProductContext.Provider>\n )\n}\n\nexport default ProductProvider\n"],
5
+ "mappings": "AAuRI,cAAAA,OAAA,oBAvRJ,OACE,iBAAAC,GAEA,cAAAC,EAIA,YAAAC,EACA,aAAAC,GACA,WAAAC,OACK,QAYP,OAAS,iCAAAC,OAAqC,aAmKvC,MAAMC,EAAoBN,GAAkC,CAAC,CAAuB,EAE9EO,GAAuB,IAAM,CAExC,GAAI,CADYN,EAAWK,CAAiB,EAE1C,MAAM,IAAI,MAAM,qDAAqD,EAEvE,OAAOL,EAAWK,CAAiB,CACrC,EAEME,GAAkB,CAAC,CACvB,QAAAC,EACA,QAAAC,EACA,QAAAC,EACA,SAAAC,EACA,UAAAC,EACA,SAAAC,EACA,aAAAC,EACA,SAAAC,EACA,iBAAAC,EACA,OAAAC,EACA,cAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,wBAAAC,EACA,2BAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,YAAAC,EACA,OAAAC,EACA,WAAAC,EACA,aAAAC,EACA,aAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,YAAAC,EACA,SAAAC,EACA,kBAAAC,EACA,qBAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,kBAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,kBAAAC,EACA,0BAAAC,EACA,SAAAC,EACA,cAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,gBAAAC,CACF,IAKM,CACJ,KAAM,CAACC,EAA4BC,CAA6B,EAAInD,EAAqC,CAAC,CAAC,EACrG,CAACoD,EAAUC,CAAW,EAAIrD,EAAgD,CAAC,CAAC,EAE5EsD,EA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EJ,EAEA,IAAO+C,GAAQrD",
6
+ "names": ["jsx", "createContext", "useContext", "useState", "useEffect", "useMemo", "VARIANT_PAYLOAD_EXCLUDED_KEYS", "BizProductContext", "useBizProductContext", "ProductProvider", "product", "isLogin", "profile", "isMobile", "isDesktop", "children", "renderRating", "freeGift", "exchangePurchase", "bundle", "checkedBundle", "checkedGift", "setCheckedBundle", "setCheckedGift", "checkedExchangePurchase", "setCheckedExchangePurchase", "variant", "selectedOptions", "setSelectedOptions", "compareData", "coupon", "finalPrice", "comparePrice", "totalSavings", "savingDetail", "setSavingDetail", "selectedVariants", "onAddToCart", "onBuyNow", "creditsRedemption", "memberFunctionResult", "openModal", "openSignInPopup", "openAuthCodePopup", "openSignUpPopup", "renderInstallments", "onUseCouponChange", "onUseMemberDiscountChange", "discount", "buyNowLoading", "addToCartLoading", "notifyMeMode", "onNotifyMeClick", "joinedRecommendBuyProducts", "setJoinedRecommendBuyProducts", "addOrder", "setAddOrder", "resolvedPayload", "variantComponents", "excluded", "item", "identifier", "BizProductProvider_default"]
7
7
  }
@@ -1,4 +1,6 @@
1
1
  export interface CartActionButtonsProps {
2
+ /** 按钮模式:normal 展示两个购买按钮,notify_me 展示单个 Notify Me 按钮 */
3
+ mode?: 'normal' | 'notify_me';
2
4
  availableForSale?: boolean;
3
5
  addToCartText?: string;
4
6
  buyNowText?: string;
@@ -8,6 +10,12 @@ export interface CartActionButtonsProps {
8
10
  buyNowClassName?: string;
9
11
  onAddToCart?: () => void;
10
12
  onBuyNow?: () => void;
13
+ /** Notify Me 按钮文案,mode='notify_me' 时生效 */
14
+ notifyMeText?: string;
15
+ /** Notify Me 按钮自定义样式 */
16
+ notifyMeClassName?: string;
17
+ /** 点击 Notify Me 按钮的回调 */
18
+ onNotifyMeClick?: (open: boolean) => void;
11
19
  }
12
- declare const CartActionButtons: ({ availableForSale, addToCartText, buyNowText, addToCartLoading, buyNowLoading, addToCartClassName, buyNowClassName, onAddToCart, onBuyNow, }: CartActionButtonsProps) => import("react/jsx-runtime").JSX.Element;
20
+ declare const CartActionButtons: ({ mode, availableForSale, addToCartText, buyNowText, addToCartLoading, buyNowLoading, addToCartClassName, buyNowClassName, onAddToCart, onBuyNow, notifyMeText, notifyMeClassName, onNotifyMeClick, }: CartActionButtonsProps) => import("react/jsx-runtime").JSX.Element;
13
21
  export default CartActionButtons;
@@ -1,2 +1,2 @@
1
- import{Fragment as c,jsx as t,jsxs as g}from"react/jsx-runtime";import{Button as a}from"../../../../components/index.js";const C=({availableForSale:n=!0,addToCartText:e="Add to Cart",buyNowText:r="Buy Now",addToCartLoading:s=!1,buyNowLoading:i=!1,addToCartClassName:d="tablet:w-auto w-1/2",buyNowClassName:l="tablet:w-auto w-1/2",onAddToCart:u,onBuyNow:b})=>{const o=!n;return g(c,{children:[t(a,{variant:"secondary",disabled:o,size:"lg",className:d,onClick:u,loading:s,children:e}),t(a,{variant:"primary",disabled:o,size:"lg",loading:i,className:l,onClick:b,children:r})]})};var N=C;export{N as default};
1
+ import{Fragment as T,jsx as o,jsxs as v}from"react/jsx-runtime";import{Button as t}from"../../../../components/index.js";import{useExposure as g}from"../../../../hooks/useExposure.js";import*as B from"react";const s="copy",i="CartActionButtons",w=({mode:r="normal",availableForSale:l=!0,addToCartText:d="Add to Cart",buyNowText:u="Buy Now",addToCartLoading:c=!1,buyNowLoading:m=!1,addToCartClassName:p="tablet:w-auto w-1/2",buyNowClassName:f="tablet:w-auto w-1/2",onAddToCart:y,onBuyNow:C,notifyMeText:a="Notify Me",notifyMeClassName:b="tablet:w-auto w-1/2",onNotifyMeClick:N})=>{if(r==="notify_me"){const n=B.useRef(null);return g(n,{componentType:s,componentName:i,componentTitle:"",componentDescription:""}),o(t,{ref:n,variant:"primary",size:"lg",className:b,onClick:()=>N?.(!0),"data-headless-type-name":`${s}#${i}`,"data-headless-title-desc-button":`''#''#${a}`,"data-headless-nav-position":"''#1",children:a})}const e=!l;return v(T,{children:[o(t,{variant:"secondary",disabled:e,size:"lg",className:p,onClick:y,loading:c,children:d}),o(t,{variant:"primary",disabled:e,size:"lg",loading:m,className:f,onClick:C,children:u})]})};var k=w;export{k as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../src/biz-components/Listing/components/CartActionButtons/index.tsx"],
4
- "sourcesContent": ["import { Button } from '../../../../components/index.js'\n\nexport interface CartActionButtonsProps {\n availableForSale?: boolean\n addToCartText?: string\n buyNowText?: string\n addToCartLoading?: boolean\n buyNowLoading?: boolean\n addToCartClassName?: string\n buyNowClassName?: string\n onAddToCart?: () => void\n onBuyNow?: () => void\n}\n\nconst CartActionButtons = ({\n availableForSale = true,\n addToCartText = 'Add to Cart',\n buyNowText = 'Buy Now',\n addToCartLoading = false,\n buyNowLoading = false,\n addToCartClassName = 'tablet:w-auto w-1/2',\n buyNowClassName = 'tablet:w-auto w-1/2',\n onAddToCart,\n onBuyNow,\n}: CartActionButtonsProps) => {\n const disabled = !availableForSale\n\n return (\n <>\n <Button\n variant=\"secondary\"\n disabled={disabled}\n size=\"lg\"\n className={addToCartClassName}\n onClick={onAddToCart}\n loading={addToCartLoading}\n >\n {addToCartText}\n </Button>\n <Button\n variant=\"primary\"\n disabled={disabled}\n size=\"lg\"\n loading={buyNowLoading}\n className={buyNowClassName}\n onClick={onBuyNow}\n >\n {buyNowText}\n </Button>\n </>\n )\n}\n\nexport default CartActionButtons\n"],
5
- "mappings": "AA4BI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBA5BJ,OAAS,UAAAC,MAAc,kCAcvB,MAAMC,EAAoB,CAAC,CACzB,iBAAAC,EAAmB,GACnB,cAAAC,EAAgB,cAChB,WAAAC,EAAa,UACb,iBAAAC,EAAmB,GACnB,cAAAC,EAAgB,GAChB,mBAAAC,EAAqB,sBACrB,gBAAAC,EAAkB,sBAClB,YAAAC,EACA,SAAAC,CACF,IAA8B,CAC5B,MAAMC,EAAW,CAACT,EAElB,OACEH,EAAAF,EAAA,CACE,UAAAC,EAACE,EAAA,CACC,QAAQ,YACR,SAAUW,EACV,KAAK,KACL,UAAWJ,EACX,QAASE,EACT,QAASJ,EAER,SAAAF,EACH,EACAL,EAACE,EAAA,CACC,QAAQ,UACR,SAAUW,EACV,KAAK,KACL,QAASL,EACT,UAAWE,EACX,QAASE,EAER,SAAAN,EACH,GACF,CAEJ,EAEA,IAAOQ,EAAQX",
6
- "names": ["Fragment", "jsx", "jsxs", "Button", "CartActionButtons", "availableForSale", "addToCartText", "buyNowText", "addToCartLoading", "buyNowLoading", "addToCartClassName", "buyNowClassName", "onAddToCart", "onBuyNow", "disabled", "CartActionButtons_default"]
4
+ "sourcesContent": ["import { Button } from '../../../../components/index.js'\nimport { useExposure } from '../../../../hooks/useExposure.js'\nimport * as React from 'react'\n\nconst componentType = 'copy'\nconst componentName = 'CartActionButtons'\n\nexport interface CartActionButtonsProps {\n /** \u6309\u94AE\u6A21\u5F0F\uFF1Anormal \u5C55\u793A\u4E24\u4E2A\u8D2D\u4E70\u6309\u94AE\uFF0Cnotify_me \u5C55\u793A\u5355\u4E2A Notify Me \u6309\u94AE */\n mode?: 'normal' | 'notify_me'\n availableForSale?: boolean\n addToCartText?: string\n buyNowText?: string\n addToCartLoading?: boolean\n buyNowLoading?: boolean\n addToCartClassName?: string\n buyNowClassName?: string\n onAddToCart?: () => void\n onBuyNow?: () => void\n /** Notify Me \u6309\u94AE\u6587\u6848\uFF0Cmode='notify_me' \u65F6\u751F\u6548 */\n notifyMeText?: string\n /** Notify Me \u6309\u94AE\u81EA\u5B9A\u4E49\u6837\u5F0F */\n notifyMeClassName?: string\n /** \u70B9\u51FB Notify Me \u6309\u94AE\u7684\u56DE\u8C03 */\n onNotifyMeClick?: (open: boolean) => void\n}\n\nconst CartActionButtons = ({\n mode = 'normal',\n availableForSale = true,\n addToCartText = 'Add to Cart',\n buyNowText = 'Buy Now',\n addToCartLoading = false,\n buyNowLoading = false,\n addToCartClassName = 'tablet:w-auto w-1/2',\n buyNowClassName = 'tablet:w-auto w-1/2',\n onAddToCart,\n onBuyNow,\n notifyMeText = 'Notify Me',\n notifyMeClassName = 'tablet:w-auto w-1/2',\n onNotifyMeClick,\n}: CartActionButtonsProps) => {\n if (mode === 'notify_me') {\n const notifyMeButtonRef = React.useRef<HTMLButtonElement>(null)\n useExposure(notifyMeButtonRef, {\n componentType,\n componentName,\n componentTitle: '',\n componentDescription: '',\n })\n return (\n <Button\n ref={notifyMeButtonRef}\n variant=\"primary\"\n size=\"lg\"\n className={notifyMeClassName}\n onClick={() => onNotifyMeClick?.(true)}\n data-headless-type-name={`${componentType}#${componentName}`}\n data-headless-title-desc-button={`''#''#${notifyMeText}`}\n data-headless-nav-position={`''#1`}\n >\n {notifyMeText}\n </Button>\n )\n }\n\n const disabled = !availableForSale\n\n return (\n <>\n <Button\n variant=\"secondary\"\n disabled={disabled}\n size=\"lg\"\n className={addToCartClassName}\n onClick={onAddToCart}\n loading={addToCartLoading}\n >\n {addToCartText}\n </Button>\n <Button\n variant=\"primary\"\n disabled={disabled}\n size=\"lg\"\n loading={buyNowLoading}\n className={buyNowClassName}\n onClick={onBuyNow}\n >\n {buyNowText}\n </Button>\n </>\n )\n}\n\nexport default CartActionButtons\n"],
5
+ "mappings": "AAmDM,OAkBF,YAAAA,EAlBE,OAAAC,EAkBF,QAAAC,MAlBE,oBAnDN,OAAS,UAAAC,MAAc,kCACvB,OAAS,eAAAC,MAAmB,mCAC5B,UAAYC,MAAW,QAEvB,MAAMC,EAAgB,OAChBC,EAAgB,oBAsBhBC,EAAoB,CAAC,CACzB,KAAAC,EAAO,SACP,iBAAAC,EAAmB,GACnB,cAAAC,EAAgB,cAChB,WAAAC,EAAa,UACb,iBAAAC,EAAmB,GACnB,cAAAC,EAAgB,GAChB,mBAAAC,EAAqB,sBACrB,gBAAAC,EAAkB,sBAClB,YAAAC,EACA,SAAAC,EACA,aAAAC,EAAe,YACf,kBAAAC,EAAoB,sBACpB,gBAAAC,CACF,IAA8B,CAC5B,GAAIZ,IAAS,YAAa,CACxB,MAAMa,EAAoBjB,EAAM,OAA0B,IAAI,EAC9D,OAAAD,EAAYkB,EAAmB,CAC7B,cAAAhB,EACA,cAAAC,EACA,eAAgB,GAChB,qBAAsB,EACxB,CAAC,EAECN,EAACE,EAAA,CACC,IAAKmB,EACL,QAAQ,UACR,KAAK,KACL,UAAWF,EACX,QAAS,IAAMC,IAAkB,EAAI,EACrC,0BAAyB,GAAGf,CAAa,IAAIC,CAAa,GAC1D,kCAAiC,SAASY,CAAY,GACtD,6BAA4B,OAE3B,SAAAA,EACH,CAEJ,CAEA,MAAMI,EAAW,CAACb,EAElB,OACER,EAAAF,EAAA,CACE,UAAAC,EAACE,EAAA,CACC,QAAQ,YACR,SAAUoB,EACV,KAAK,KACL,UAAWR,EACX,QAASE,EACT,QAASJ,EAER,SAAAF,EACH,EACAV,EAACE,EAAA,CACC,QAAQ,UACR,SAAUoB,EACV,KAAK,KACL,QAAST,EACT,UAAWE,EACX,QAASE,EAER,SAAAN,EACH,GACF,CAEJ,EAEA,IAAOY,EAAQhB",
6
+ "names": ["Fragment", "jsx", "jsxs", "Button", "useExposure", "React", "componentType", "componentName", "CartActionButtons", "mode", "availableForSale", "addToCartText", "buyNowText", "addToCartLoading", "buyNowLoading", "addToCartClassName", "buyNowClassName", "onAddToCart", "onBuyNow", "notifyMeText", "notifyMeClassName", "onNotifyMeClick", "notifyMeButtonRef", "disabled", "CartActionButtons_default"]
7
7
  }
@@ -1,2 +1,2 @@
1
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Text as s,Button as _,Grid as ee,GridItem as J,Picture as A,Heading as te}from"../../../../../components/index.js";import{useBizProductContext as S}from"../../../BizProductProvider.js";import{useComponentData as ae}from"../../../hooks/useComponentData.js";import{useEffect as oe,useMemo as T,useState as ne}from"react";import{formatPrice as N}from"../../../utils/index.js";import{useAiuiContext as j}from"../../../../AiuiProvider/index.js";import Q from"decimal.js";import{replaceTemplate as le}from"../../../utils/textFormat.js";import{withLayout as re}from"../../../../../shared/Styles.js";import{ExposureDetector as ie}from"../../../../../components/index.js";import{gaTrack as ce}from"../../../../../shared/track.js";import se from"../../CartActionButtons/index.js";const de=()=>{const{locale:m="us",copyWriting:a,trackingData:g}=j(),{product:p,variant:n,finalPrice:x,comparePrice:v,coupon:k,selectedOptions:d,selectedVariants:r,totalSavings:B,onAddToCart:w,onBuyNow:E,savingDetail:f,checkedBundle:y,joinedRecommendBuyProducts:t,setJoinedRecommendBuyProducts:P,setSavingDetail:C,addToCartLoading:L,buyNowLoading:U,profile:G,addOrder:$,setAddOrder:D}=S(),I=g?.showComparePrice??!0,F=ae("ProductSummary")??{},[z]=r,V=T(()=>{const i=y?.variants.find(h=>h.variant.sku===z?.sku),l=new Q(z?.price?.amount||0).minus(i?.price||z?.price?.amount).toNumber();let u=new Q(z?.price?.amount||0);G?.email&&(u=u.minus(f?.member||0));const b=u.minus(f?.coupon).minus(l).toNumber();return parseFloat(b.toFixed(2))},[z,y,G,f?.member,f?.coupon]),{bundleVariant:R,giftVariant:W,exchangeVariant:q}=pe()||{},[c,O]=ne();oe(()=>{O({bundle:t.bundle?.value?void 0:R,gift:t.gift?.value?void 0:W,exchange:t.exchange?.value?void 0:q})},[R,W,q,t]);const X=T(()=>{const i=[];return $&&$.forEach((l,u)=>{t[l]?.value&&i.push({type:l,key:`${l}-${u}`})}),i},[$,t]),Y=T(()=>{const i=d?.quantity||"",l=d?.color||d?.colour||d?.couleur||"";return`${i&&l?`${i} | ${l}`:i||l}`},[d?.quantity,d?.color,d?.colour,d?.couleur]),Z=T(()=>{const{image_1920:i,image_1440:l,image_1024:u,image_768:b,image_390:h}=F?.thumbnail||{};return(F?.thumbnail?`${i} 1920, ${l} 1440, ${u} 1024, ${b} 768, ${h} 390`:n.image?.url)||n.image?.url},[F?.thumbnail,n.image?.url]);return n.availableForSale?e("div",{className:"ipc-product-summary laptop:px-16 laptop-md:px-0 laptop-md:mt-[96px] lg-desktop:mt-[128px] mt-16",children:e("div",{className:"laptop:rounded-2xl bg-[#F5F5F7]",children:o(ee,{className:"tablet:p-8 tablet:!pb-0 px-4 pt-6",children:[o(J,{className:"laptop:col-start-1 laptop:col-span-5 col-span-12 flex flex-col justify-between gap-4",children:[e(te,{className:"lg-desktop:text-[48px] laptop:text-[32px] laptop-md:text-[40px] mb-4 text-[24px] font-bold leading-none [&>span]:text-[#D1D1D1]",html:F?.readyWant?.replace?.("{title}",p?.title)}),e("div",{className:"",children:e(A,{source:Z,className:"lg-desktop:aspect-[644/320] laptop-md:aspect-[503/270] laptop:aspect-[332/190] tablet:aspect-[704/380] aspect-[358/190]",imgClassName:"object-cover h-full"})})]}),o(J,{className:"tablet:pb-8 laptop:col-start-7 laptop:mt-0 laptop:col-span-6 col-span-12 mt-8 flex flex-col justify-between gap-6 pb-6",children:[o("div",{children:[o("div",{className:"flex flex-col gap-4",children:[e(ie,{exposureKey:"listing_selector",onExposure:()=>{ce({event:"ga4Event",event_name:"component_impression",event_parameters:{page_group:`Product Detail Page${n.sku}`,component_type:"image",component_name:"listing_selector",position:1}})},children:o("div",{className:"flex items-center justify-between gap-6",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:n.image?.url||p?.images?.[0]?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),o("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:p.title}),e(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]",html:Y})]})]}),o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:N({amount:V,currencyCode:n.price.currencyCode,locale:m})}),I&&V<n?.price?.amount&&e(s,{className:"laptop-md:text-2xl laptop:text-xl text-base font-bold text-[#6D6D6F] line-through",html:N({amount:n?.price?.amount,currencyCode:n.price.currencyCode,locale:m})})]})]})}),X.map(({type:i,key:l})=>i==="gift"&&t?.gift?.value?e(K,{giftOperation:u=>{P?.({...t,gift:{value:void 0,canOperate:!0}}),O?.({...c,gift:u}),D?.(b=>b.filter(h=>h!=="gift"))},status:!!t?.gift,gift:t?.gift?.value,canOperate:t?.gift?.canOperate},l):i==="bundle"&&t?.bundle?.value?e(H,{bundleOperation:u=>{P?.({...t,bundle:{value:void 0,canOperate:!0}}),O?.({...c,bundle:u}),D?.(b=>b.filter(h=>h!=="bundle"))},status:!!t?.bundle,bundleListItem:t?.bundle?.value,canOperate:t?.bundle?.canOperate},l):i==="exchange"&&t?.exchange?.value?e(M,{exchangeOperation:u=>{P?.({...t,exchange:{value:void 0,canOperate:!0}}),O?.({...c,exchange:u}),D?.(b=>b.filter(h=>h!=="exchange"))},status:!!t?.exchange,canOperate:t?.exchange?.canOperate,exchange:t?.exchange?.value},l):null)]}),(c?.bundle||c?.gift||c?.exchange)&&o("div",{className:"laptop-md:mt-8 mt-6",children:[e(s,{className:"laptop-md:text-[18px] text-sm font-bold",html:F?.recommendBuy}),o("div",{className:"laptop-md:gap-4 mt-4 flex flex-col gap-6",children:[c?.exchange&&e(M,{exchangeOperation:i=>{P?.({...t,exchange:{value:i,canOperate:!0}}),O?.({...c,exchange:void 0}),D?.(l=>[...l,"exchange"])},canOperate:t?.exchange?.canOperate,status:!c?.exchange,exchange:c?.exchange}),c?.bundle&&e(H,{bundleOperation:i=>{C?.({...f,exchangePurchase:0}),P?.({...t,bundle:{value:i,canOperate:!0}}),O?.({...c,bundle:void 0}),D?.(l=>[...l,"bundle"])},canOperate:t?.bundle?.canOperate,status:!c?.bundle,bundleListItem:c?.bundle}),c?.gift&&e(K,{giftOperation:i=>{P?.({...t,gift:{value:i,canOperate:!0}}),O?.({...c,gift:void 0}),D?.(l=>[...l,"gift"])},canOperate:t?.gift?.canOperate,status:!c?.gift,gift:c?.gift})]})]})]}),o("div",{className:"text-right",children:[e(s,{className:"laptop:text-xl laptop-md:text-2xl text-right font-bold",html:`${le(a?.totalPrice||"",{amount:N({amount:parseFloat(x.toFixed(2)),currencyCode:n.price.currencyCode,locale:m})})}`}),I&&B>0&&e(s,{className:"laptop:text-xl laptop-md:text-2xl ml-1 text-base font-bold text-[#6D6D6F] line-through",html:N({amount:v,currencyCode:n.price.currencyCode,locale:m})}),e("div",{className:"mt-4 flex justify-end gap-3",children:e(se,{availableForSale:n.availableForSale,addToCartText:a?.addToCart,buyNowText:a?.shopNow,addToCartLoading:L,buyNowLoading:U,addToCartClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2",buyNowClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2",onAddToCart:w,onBuyNow:E})})]})]})]})})}):null},pe=()=>{const{bundle:m,variant:a,checkedBundle:g,freeGift:p,checkedGift:n,exchangePurchase:x,checkedExchangePurchase:v}=S();let k,d,r;const{bundleList:B}=m||{},{giftList:w=[]}=p||{},{giftList:E=[]}=x||{},f=B?.filter(C=>C.variants.slice(1,C.variants.length).every(L=>L.variant.availableForSale))||[],[y]=f;k=g||y;const[t]=w?.filter(C=>C.availableForSale)??[];d=n||t;const[P]=E?.filter(C=>C.availableForSale)??[];return r=v||P,{bundleVariant:k,giftVariant:d,exchangeVariant:r}},H=({bundleOperation:m,bundleListItem:a,canOperate:g,status:p})=>{const{locale:n="us",copyWriting:x}=j(),{variant:v,setCheckedBundle:k}=S(),d=a?.variants.filter(r=>r.variant.sku!==v.sku);return e("div",{className:"",children:d?.map(r=>o("div",{className:"flex items-center justify-between gap-4",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:r?.variant?.image?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),e("div",{className:"tablet:max-w-none line-clamp-2 flex max-w-[178px] flex-col gap-[6px]",children:e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold",html:r.variant.product.title})})]}),o("div",{className:"flex flex-col items-end justify-center gap-1",children:[!!a&&o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:N({amount:r?.price||0,locale:n,currencyCode:r.variant?.price?.currencyCode||""})}),r.price<r.variant.price.amount&&e(s,{className:"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through",html:N({amount:r.variant.price.amount||0,locale:n,currencyCode:r.variant?.price?.currencyCode||""})})]}),g&&e(_,{size:"icon",variant:"link",onClick:()=>{k?.(p?void 0:a),m?.(a)},className:"size-auto shrink-0 underline",children:p?x?.remove:x?.add})]})]},r.variant.id))})},K=({giftOperation:m,gift:a,status:g,canOperate:p})=>{const{locale:n="us",copyWriting:x}=j(),{freeGift:v,setCheckedGift:k}=S(),{freeLabel:d}=v||{},{options:r}=a||{},B=T(()=>{const w=r?.find(t=>t.name==="color"||t.name==="colour"||t.name==="couleur")||{},E=r?.find(t=>t.name==="quantity")||{},f=w?w.values?.[0]?.label:"",y=E?E.values?.[0]?.label:"";return`${f&&y?y+" | "+f:y||f} | ${d}`},[d,r]);return o("div",{className:"flex items-center justify-between gap-6",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:a?.image?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),o("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:a?.product?.title}),e(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]",html:B})]})]}),o("div",{className:"flex flex-col items-end justify-center gap-2",children:[!!a&&o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:d}),e(s,{className:"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through",html:N({amount:a.price.amount,locale:n,currencyCode:a.price.currencyCode})})]}),p&&e(_,{size:"icon",variant:"link",onClick:()=>{k?.(g?void 0:a),m(a)},className:"size-auto shrink-0 underline",children:g?x?.remove:x?.add})]})]})},M=({exchangeOperation:m,exchange:a,canOperate:g,status:p})=>{const{locale:n="us",copyWriting:x}=j(),{setCheckedExchangePurchase:v}=S();return o("div",{className:"flex items-center justify-between gap-6",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:a?.image?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),o("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:a?.product?.title}),e(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]"})]})]}),o("div",{className:"flex flex-col items-end justify-center gap-2",children:[!!a&&o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:N({amount:a.finalPrice?.amount||0,locale:n,currencyCode:a.price.currencyCode})}),e(s,{className:"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through",html:N({amount:a.price?.amount||0,locale:n,currencyCode:a.price.currencyCode})})]}),g&&e(_,{size:"icon",variant:"link",onClick:()=>{v?.(p?void 0:a),m(a)},className:"size-auto shrink-0 underline",children:p?x?.remove:x?.add})]})]})};var we=re(de);export{we as default};
1
+ import{jsx as e,jsxs as o}from"react/jsx-runtime";import{Text as s,Button as _,Grid as ae,GridItem as q,Picture as A,Heading as oe}from"../../../../../components/index.js";import{useBizProductContext as S}from"../../../BizProductProvider.js";import{useComponentData as ne}from"../../../hooks/useComponentData.js";import{useEffect as le,useMemo as T,useState as ie}from"react";import{formatPrice as y}from"../../../utils/index.js";import{useAiuiContext as j}from"../../../../AiuiProvider/index.js";import J from"decimal.js";import{replaceTemplate as re}from"../../../utils/textFormat.js";import{withLayout as ce}from"../../../../../shared/Styles.js";import{ExposureDetector as se}from"../../../../../components/index.js";import{gaTrack as de}from"../../../../../shared/track.js";import pe from"../../CartActionButtons/index.js";const ue=()=>{const{locale:m="us",copyWriting:a,trackingData:g}=j(),{product:p,variant:n,finalPrice:x,comparePrice:v,coupon:k,selectedOptions:d,selectedVariants:i,totalSavings:B,onAddToCart:w,onBuyNow:E,savingDetail:f,checkedBundle:N,joinedRecommendBuyProducts:t,setJoinedRecommendBuyProducts:C,setSavingDetail:P,addToCartLoading:L,buyNowLoading:U,notifyMeMode:X,onNotifyMeClick:Y,profile:G,addOrder:$,setAddOrder:D}=S(),I=g?.showComparePrice??!0,F=ne("ProductSummary")??{},[z]=i,V=T(()=>{const r=N?.variants.find(h=>h.variant.sku===z?.sku),l=new J(z?.price?.amount||0).minus(r?.price||z?.price?.amount).toNumber();let u=new J(z?.price?.amount||0);G?.email&&(u=u.minus(f?.member||0));const b=u.minus(f?.coupon).minus(l).toNumber();return parseFloat(b.toFixed(2))},[z,N,G,f?.member,f?.coupon]),{bundleVariant:M,giftVariant:R,exchangeVariant:W}=me()||{},[c,O]=ie();le(()=>{O({bundle:t.bundle?.value?void 0:M,gift:t.gift?.value?void 0:R,exchange:t.exchange?.value?void 0:W})},[M,R,W,t]);const Z=T(()=>{const r=[];return $&&$.forEach((l,u)=>{t[l]?.value&&r.push({type:l,key:`${l}-${u}`})}),r},[$,t]),ee=T(()=>{const r=d?.quantity||"",l=d?.color||d?.colour||d?.couleur||"";return`${r&&l?`${r} | ${l}`:r||l}`},[d?.quantity,d?.color,d?.colour,d?.couleur]),te=T(()=>{const{image_1920:r,image_1440:l,image_1024:u,image_768:b,image_390:h}=F?.thumbnail||{};return(F?.thumbnail?`${r} 1920, ${l} 1440, ${u} 1024, ${b} 768, ${h} 390`:n.image?.url)||n.image?.url},[F?.thumbnail,n.image?.url]);return n.availableForSale?e("div",{className:"ipc-product-summary laptop:px-16 laptop-md:px-0 laptop-md:mt-[96px] lg-desktop:mt-[128px] mt-16",children:e("div",{className:"laptop:rounded-2xl bg-[#F5F5F7]",children:o(ae,{className:"tablet:p-8 tablet:!pb-0 px-4 pt-6",children:[o(q,{className:"laptop:col-start-1 laptop:col-span-5 col-span-12 flex flex-col justify-between gap-4",children:[e(oe,{className:"lg-desktop:text-[48px] laptop:text-[32px] laptop-md:text-[40px] mb-4 text-[24px] font-bold leading-none [&>span]:text-[#D1D1D1]",html:F?.readyWant?.replace?.("{title}",p?.title)}),e("div",{className:"",children:e(A,{source:te,className:"lg-desktop:aspect-[644/320] laptop-md:aspect-[503/270] laptop:aspect-[332/190] tablet:aspect-[704/380] aspect-[358/190]",imgClassName:"object-cover h-full"})})]}),o(q,{className:"tablet:pb-8 laptop:col-start-7 laptop:mt-0 laptop:col-span-6 col-span-12 mt-8 flex flex-col justify-between gap-6 pb-6",children:[o("div",{children:[o("div",{className:"flex flex-col gap-4",children:[e(se,{exposureKey:"listing_selector",onExposure:()=>{de({event:"ga4Event",event_name:"component_impression",event_parameters:{page_group:`Product Detail Page${n.sku}`,component_type:"image",component_name:"listing_selector",position:1}})},children:o("div",{className:"flex items-center justify-between gap-6",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:n.image?.url||p?.images?.[0]?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),o("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:p.title}),e(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]",html:ee})]})]}),o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:y({amount:V,currencyCode:n.price.currencyCode,locale:m})}),I&&V<n?.price?.amount&&e(s,{className:"laptop-md:text-2xl laptop:text-xl text-base font-bold text-[#6D6D6F] line-through",html:y({amount:n?.price?.amount,currencyCode:n.price.currencyCode,locale:m})})]})]})}),Z.map(({type:r,key:l})=>r==="gift"&&t?.gift?.value?e(H,{giftOperation:u=>{C?.({...t,gift:{value:void 0,canOperate:!0}}),O?.({...c,gift:u}),D?.(b=>b.filter(h=>h!=="gift"))},status:!!t?.gift,gift:t?.gift?.value,canOperate:t?.gift?.canOperate},l):r==="bundle"&&t?.bundle?.value?e(Q,{bundleOperation:u=>{C?.({...t,bundle:{value:void 0,canOperate:!0}}),O?.({...c,bundle:u}),D?.(b=>b.filter(h=>h!=="bundle"))},status:!!t?.bundle,bundleListItem:t?.bundle?.value,canOperate:t?.bundle?.canOperate},l):r==="exchange"&&t?.exchange?.value?e(K,{exchangeOperation:u=>{C?.({...t,exchange:{value:void 0,canOperate:!0}}),O?.({...c,exchange:u}),D?.(b=>b.filter(h=>h!=="exchange"))},status:!!t?.exchange,canOperate:t?.exchange?.canOperate,exchange:t?.exchange?.value},l):null)]}),(c?.bundle||c?.gift||c?.exchange)&&o("div",{className:"laptop-md:mt-8 mt-6",children:[e(s,{className:"laptop-md:text-[18px] text-sm font-bold",html:F?.recommendBuy}),o("div",{className:"laptop-md:gap-4 mt-4 flex flex-col gap-6",children:[c?.exchange&&e(K,{exchangeOperation:r=>{C?.({...t,exchange:{value:r,canOperate:!0}}),O?.({...c,exchange:void 0}),D?.(l=>[...l,"exchange"])},canOperate:t?.exchange?.canOperate,status:!c?.exchange,exchange:c?.exchange}),c?.bundle&&e(Q,{bundleOperation:r=>{P?.({...f,exchangePurchase:0}),C?.({...t,bundle:{value:r,canOperate:!0}}),O?.({...c,bundle:void 0}),D?.(l=>[...l,"bundle"])},canOperate:t?.bundle?.canOperate,status:!c?.bundle,bundleListItem:c?.bundle}),c?.gift&&e(H,{giftOperation:r=>{C?.({...t,gift:{value:r,canOperate:!0}}),O?.({...c,gift:void 0}),D?.(l=>[...l,"gift"])},canOperate:t?.gift?.canOperate,status:!c?.gift,gift:c?.gift})]})]})]}),o("div",{className:"text-right",children:[e(s,{className:"laptop:text-xl laptop-md:text-2xl text-right font-bold",html:`${re(a?.totalPrice||"",{amount:y({amount:parseFloat(x.toFixed(2)),currencyCode:n.price.currencyCode,locale:m})})}`}),I&&B>0&&e(s,{className:"laptop:text-xl laptop-md:text-2xl ml-1 text-base font-bold text-[#6D6D6F] line-through",html:y({amount:v,currencyCode:n.price.currencyCode,locale:m})}),e("div",{className:"mt-4 flex justify-end gap-3",children:e(pe,{mode:X,availableForSale:n.availableForSale,addToCartText:a?.addToCart,buyNowText:a?.shopNow,addToCartLoading:L,buyNowLoading:U,addToCartClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2",buyNowClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2",onAddToCart:w,onBuyNow:E,onNotifyMeClick:Y,notifyMeText:a?.notifyMe,notifyMeClassName:"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2"})})]})]})]})})}):null},me=()=>{const{bundle:m,variant:a,checkedBundle:g,freeGift:p,checkedGift:n,exchangePurchase:x,checkedExchangePurchase:v}=S();let k,d,i;const{bundleList:B}=m||{},{giftList:w=[]}=p||{},{giftList:E=[]}=x||{},f=B?.filter(P=>P.variants.slice(1,P.variants.length).every(L=>L.variant.availableForSale))||[],[N]=f;k=g||N;const[t]=w?.filter(P=>P.availableForSale)??[];d=n||t;const[C]=E?.filter(P=>P.availableForSale)??[];return i=v||C,{bundleVariant:k,giftVariant:d,exchangeVariant:i}},Q=({bundleOperation:m,bundleListItem:a,canOperate:g,status:p})=>{const{locale:n="us",copyWriting:x}=j(),{variant:v,setCheckedBundle:k}=S(),d=a?.variants.filter(i=>i.variant.sku!==v.sku);return e("div",{className:"",children:d?.map(i=>o("div",{className:"flex items-center justify-between gap-4",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:i?.variant?.image?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),e("div",{className:"tablet:max-w-none line-clamp-2 flex max-w-[178px] flex-col gap-[6px]",children:e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold",html:i.variant.product.title})})]}),o("div",{className:"flex flex-col items-end justify-center gap-1",children:[!!a&&o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:y({amount:i?.price||0,locale:n,currencyCode:i.variant?.price?.currencyCode||""})}),i.price<i.variant.price.amount&&e(s,{className:"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through",html:y({amount:i.variant.price.amount||0,locale:n,currencyCode:i.variant?.price?.currencyCode||""})})]}),g&&e(_,{size:"icon",variant:"link",onClick:()=>{k?.(p?void 0:a),m?.(a)},className:"size-auto shrink-0 underline",children:p?x?.remove:x?.add})]})]},i.variant.id))})},H=({giftOperation:m,gift:a,status:g,canOperate:p})=>{const{locale:n="us",copyWriting:x}=j(),{freeGift:v,setCheckedGift:k}=S(),{freeLabel:d}=v||{},{options:i}=a||{},B=T(()=>{const w=i?.find(t=>t.name==="color"||t.name==="colour"||t.name==="couleur")||{},E=i?.find(t=>t.name==="quantity")||{},f=w?w.values?.[0]?.label:"",N=E?E.values?.[0]?.label:"";return`${f&&N?N+" | "+f:N||f} | ${d}`},[d,i]);return o("div",{className:"flex items-center justify-between gap-6",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:a?.image?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),o("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:a?.product?.title}),e(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]",html:B})]})]}),o("div",{className:"flex flex-col items-end justify-center gap-2",children:[!!a&&o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:d}),e(s,{className:"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through",html:y({amount:a.price.amount,locale:n,currencyCode:a.price.currencyCode})})]}),p&&e(_,{size:"icon",variant:"link",onClick:()=>{k?.(g?void 0:a),m(a)},className:"size-auto shrink-0 underline",children:g?x?.remove:x?.add})]})]})},K=({exchangeOperation:m,exchange:a,canOperate:g,status:p})=>{const{locale:n="us",copyWriting:x}=j(),{setCheckedExchangePurchase:v}=S();return o("div",{className:"flex items-center justify-between gap-6",children:[o("div",{className:"flex items-center gap-4",children:[e(A,{source:a?.image?.url,className:"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2"}),o("div",{className:"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]",children:[e(s,{className:"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold",html:a?.product?.title}),e(s,{className:"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]"})]})]}),o("div",{className:"flex flex-col items-end justify-center gap-2",children:[!!a&&o("div",{className:"flex items-center gap-1",children:[e(s,{className:"laptop-md:text-2xl text-base font-bold",html:y({amount:a.finalPrice?.amount||0,locale:n,currencyCode:a.price.currencyCode})}),e(s,{className:"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through",html:y({amount:a.price?.amount||0,locale:n,currencyCode:a.price.currencyCode})})]}),g&&e(_,{size:"icon",variant:"link",onClick:()=>{v?.(p?void 0:a),m(a)},className:"size-auto shrink-0 underline",children:p?x?.remove:x?.add})]})]})};var De=ce(ue);export{De as default};
2
2
  //# sourceMappingURL=index.js.map