@anker-in/headless-ui 1.3.50 → 1.3.52

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 (94) hide show
  1. package/dist/cjs/biz-components/ImageTextOverlay/index.js +1 -1
  2. package/dist/cjs/biz-components/ImageTextOverlay/index.js.map +2 -2
  3. package/dist/cjs/biz-components/Listing/BizProductProvider.d.ts +11 -9
  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/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  7. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  8. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
  9. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js.map +3 -3
  10. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -0
  11. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  12. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  13. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/types.d.ts +48 -0
  14. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/types.js +2 -0
  15. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/types.js.map +7 -0
  16. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.d.ts +1 -1
  17. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
  18. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js.map +3 -3
  19. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +0 -2
  20. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  21. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +4 -4
  22. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.d.ts +3 -0
  23. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js +2 -0
  24. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js.map +7 -0
  25. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.d.ts +115 -0
  26. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.js +2 -0
  27. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.js.map +7 -0
  28. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  29. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  30. package/dist/cjs/biz-components/Listing/components/index.d.ts +0 -1
  31. package/dist/cjs/biz-components/Listing/components/index.js +1 -1
  32. package/dist/cjs/biz-components/Listing/components/index.js.map +3 -3
  33. package/dist/cjs/biz-components/Listing/hooks/useBenefits.d.ts +8 -2
  34. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js +1 -1
  35. package/dist/cjs/biz-components/Listing/hooks/useBenefits.js.map +3 -3
  36. package/dist/cjs/biz-components/Listing/types/product.d.ts +0 -21
  37. package/dist/cjs/biz-components/Listing/types/product.js +1 -1
  38. package/dist/cjs/biz-components/Listing/types/product.js.map +1 -1
  39. package/dist/cjs/biz-components/index.d.ts +3 -3
  40. package/dist/cjs/biz-components/index.js +1 -1
  41. package/dist/cjs/biz-components/index.js.map +3 -3
  42. package/dist/esm/biz-components/ImageTextOverlay/index.js +1 -1
  43. package/dist/esm/biz-components/ImageTextOverlay/index.js.map +2 -2
  44. package/dist/esm/biz-components/Listing/BizProductProvider.d.ts +11 -9
  45. package/dist/esm/biz-components/Listing/BizProductProvider.js +1 -1
  46. package/dist/esm/biz-components/Listing/BizProductProvider.js.map +3 -3
  47. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js +4 -4
  48. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/BenefitsTab.js.map +3 -3
  49. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js +1 -1
  50. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js.map +3 -3
  51. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.d.ts +1 -0
  52. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js +1 -1
  53. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/index.js.map +3 -3
  54. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/types.d.ts +48 -0
  55. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/types.js +1 -0
  56. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductBundle/types.js.map +7 -0
  57. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.d.ts +1 -1
  58. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js +1 -1
  59. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js.map +3 -3
  60. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.d.ts +0 -2
  61. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js +1 -1
  62. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js.map +3 -3
  63. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.d.ts +3 -0
  64. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js +2 -0
  65. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js.map +7 -0
  66. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.d.ts +115 -0
  67. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.js +1 -0
  68. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.js.map +7 -0
  69. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js +1 -1
  70. package/dist/esm/biz-components/Listing/components/ProductCard/ProductSummary/index.js.map +3 -3
  71. package/dist/esm/biz-components/Listing/components/index.d.ts +0 -1
  72. package/dist/esm/biz-components/Listing/components/index.js +1 -1
  73. package/dist/esm/biz-components/Listing/components/index.js.map +2 -2
  74. package/dist/esm/biz-components/Listing/hooks/useBenefits.d.ts +8 -2
  75. package/dist/esm/biz-components/Listing/hooks/useBenefits.js +1 -1
  76. package/dist/esm/biz-components/Listing/hooks/useBenefits.js.map +3 -3
  77. package/dist/esm/biz-components/Listing/types/product.d.ts +0 -21
  78. package/dist/esm/biz-components/Listing/types/product.js.map +1 -1
  79. package/dist/esm/biz-components/index.d.ts +3 -3
  80. package/dist/esm/biz-components/index.js +1 -1
  81. package/dist/esm/biz-components/index.js.map +2 -2
  82. package/package.json +1 -1
  83. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +0 -2
  84. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
  85. package/dist/cjs/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
  86. package/dist/cjs/biz-components/Listing/components/ProductCard/index.d.ts +0 -2
  87. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js +0 -2
  88. package/dist/cjs/biz-components/Listing/components/ProductCard/index.js.map +0 -7
  89. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.d.ts +0 -2
  90. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js +0 -2
  91. package/dist/esm/biz-components/Listing/components/ProductCard/ProductDetail/index.js.map +0 -7
  92. package/dist/esm/biz-components/Listing/components/ProductCard/index.d.ts +0 -2
  93. package/dist/esm/biz-components/Listing/components/ProductCard/index.js +0 -2
  94. package/dist/esm/biz-components/Listing/components/ProductCard/index.js.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../../../src/biz-components/Listing/components/ProductCard/ProductSummary/index.tsx"],
4
- "sourcesContent": ["import { Text, Button, Grid, GridItem, Picture, Heading } from '../../../../../components/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useComponentData } from '../../../hooks/useComponentData.js'\nimport { useEffect, useMemo, useState } from 'react'\nimport { formatPrice } from '../../../utils/index.js'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport type { BundleListItem, ProductVariant, ProductPrice, ProductOption } from '../../../types/product'\nimport Decimal from 'decimal.js'\nimport { replaceTemplate } from '../../../utils/textFormat.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport CartActionButtons from '../../CartActionButtons/index.js'\n\nconst ProductSummary = () => {\n const { locale = 'us', copyWriting, trackingData } = useAiuiContext()\n const {\n product,\n variant,\n finalPrice,\n comparePrice,\n coupon,\n selectedOptions,\n selectedVariants,\n totalSavings,\n onAddToCart,\n onBuyNow,\n savingDetail,\n checkedBundle,\n joinedRecommendBuyProducts,\n setJoinedRecommendBuyProducts,\n setSavingDetail,\n addToCartLoading,\n buyNowLoading,\n notifyMeMode,\n onNotifyMeClick,\n profile,\n addOrder,\n setAddOrder,\n } = useBizProductContext()\n\n /** \u662F\u5426\u663E\u793A\u539F\u4EF7\uFF08\u5212\u7EBF\u4EF7\uFF09\uFF0C\u9ED8\u8BA4\u663E\u793A */\n const showComparePrice = trackingData?.showComparePrice ?? true\n\n const productSummaryData = useComponentData('ProductSummary') ?? {}\n\n const [currentProductVariant] = selectedVariants\n\n const summaryFinalPrice = useMemo(() => {\n const currentBundleVariant = checkedBundle?.variants.find(v => v.variant.sku === currentProductVariant?.sku)\n const currentBundlePrice = new Decimal(currentProductVariant?.price?.amount || 0)\n .minus(currentBundleVariant?.price || currentProductVariant?.price?.amount)\n .toNumber()\n let currentProductPrice = new Decimal(currentProductVariant?.price?.amount || 0)\n if (profile?.email) {\n currentProductPrice = currentProductPrice.minus(savingDetail?.member || 0)\n }\n const finalPrice = currentProductPrice.minus(savingDetail?.coupon).minus(currentBundlePrice).toNumber()\n return parseFloat(finalPrice.toFixed(2))\n }, [currentProductVariant, checkedBundle, profile, savingDetail?.member, savingDetail?.coupon])\n\n const { bundleVariant, giftVariant, exchangeVariant } = useRecommendBuyProducts() || {}\n\n const [initialRecommendBuyProducts, setInitialRecommendBuyProducts] = useState<{\n bundle?: BundleListItem\n gift?: ProductVariant\n exchange?: ProductVariant\n }>()\n\n useEffect(() => {\n setInitialRecommendBuyProducts({\n bundle: joinedRecommendBuyProducts.bundle?.value ? undefined : bundleVariant,\n gift: joinedRecommendBuyProducts.gift?.value ? undefined : giftVariant,\n exchange: joinedRecommendBuyProducts.exchange?.value ? undefined : exchangeVariant,\n })\n }, [bundleVariant, giftVariant, exchangeVariant, joinedRecommendBuyProducts])\n\n // \u6839\u636E\u6DFB\u52A0\u987A\u5E8F\u751F\u6210\u5DF2\u6DFB\u52A0\u4EA7\u54C1\u7684\u5217\u8868\n const orderedJoinedProducts = useMemo(() => {\n const result: Array<{ type: 'bundle' | 'gift' | 'exchange'; key: string }> = []\n\n // \u6309\u7167\u6DFB\u52A0\u987A\u5E8F\u6DFB\u52A0\n if (addOrder) {\n addOrder.forEach((type, index) => {\n if (joinedRecommendBuyProducts[type]?.value) {\n result.push({ type, key: `${type}-${index}` })\n }\n })\n }\n\n return result\n }, [addOrder, joinedRecommendBuyProducts])\n\n const productOptionsText = useMemo(() => {\n const quantity = selectedOptions?.quantity || ''\n const color = selectedOptions?.color || selectedOptions?.colour || selectedOptions?.couleur || ''\n return `${quantity && color ? `${quantity} | ${color}` : quantity || color}`\n }, [selectedOptions?.quantity, selectedOptions?.color, selectedOptions?.colour, selectedOptions?.couleur])\n\n const variantImage = useMemo(() => {\n const { image_1920, image_1440, image_1024, image_768, image_390 } = productSummaryData?.thumbnail || {}\n const responsiveSource = productSummaryData?.thumbnail\n ? `${image_1920} 1920, ${image_1440} 1440, ${image_1024} 1024, ${image_768} 768, ${image_390} 390`\n : variant.image?.url\n return responsiveSource || variant.image?.url\n }, [productSummaryData?.thumbnail, variant.image?.url])\n\n const isAvailable = variant.availableForSale\n if (!isAvailable) return null\n\n return (\n <div className=\"ipc-product-summary laptop:px-16 laptop-md:px-0 laptop-md:mt-[96px] lg-desktop:mt-[128px] mt-16\">\n <div className=\"laptop:rounded-2xl bg-[#F5F5F7]\">\n <Grid className=\"tablet:p-8 tablet:!pb-0 px-4 pt-6\">\n <GridItem className=\"laptop:col-start-1 laptop:col-span-5 col-span-12 flex flex-col justify-between gap-4\">\n <Heading\n className=\"lg-desktop:text-[48px] laptop:text-[32px] laptop-md:text-[40px] mb-4 text-[24px] font-bold leading-none [&>span]:text-[#D1D1D1]\"\n html={productSummaryData?.readyWant?.replace?.('{title}', product?.title)}\n />\n <div className=\"\">\n <Picture\n source={variantImage}\n className=\"lg-desktop:aspect-[644/320] laptop-md:aspect-[503/270] laptop:aspect-[332/190] tablet:aspect-[704/380] aspect-[358/190]\"\n imgClassName=\"object-cover h-full\"\n />\n </div>\n </GridItem>\n <GridItem 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\">\n <div>\n <div className=\"flex flex-col gap-4\">\n <ExposureDetector\n exposureKey=\"listing_selector\"\n onExposure={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: 'listing_selector',\n position: 1,\n },\n })\n }}\n >\n <div className=\"flex items-center justify-between gap-6\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={variant.image?.url || product?.images?.[0]?.url}\n className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n />\n <div className=\"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]\">\n <Text\n className=\"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold\"\n html={product.title}\n />\n <Text\n className=\"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]\"\n html={productOptionsText}\n />\n </div>\n </div>\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"laptop-md:text-2xl text-base font-bold\"\n html={formatPrice({\n amount: summaryFinalPrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {showComparePrice && summaryFinalPrice < variant?.price?.amount && (\n <Text\n className=\"laptop-md:text-2xl laptop:text-xl text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: variant?.price?.amount,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n </div>\n </div>\n </ExposureDetector>\n {/* \u6309\u7167\u6DFB\u52A0\u987A\u5E8F\u6E32\u67D3\u5DF2\u6DFB\u52A0\u7684\u4EA7\u54C1 */}\n {orderedJoinedProducts.map(({ type, key }) => {\n if (type === 'gift' && joinedRecommendBuyProducts?.gift?.value) {\n return (\n <ProductGiftSummary\n key={key}\n giftOperation={gift => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n gift: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift })\n // \u4ECE\u6DFB\u52A0\u987A\u5E8F\u4E2D\u79FB\u9664\n setAddOrder?.(prev => prev.filter(t => t !== 'gift'))\n }}\n status={!!joinedRecommendBuyProducts?.gift}\n gift={joinedRecommendBuyProducts?.gift?.value}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n />\n )\n }\n if (type === 'bundle' && joinedRecommendBuyProducts?.bundle?.value) {\n return (\n <ProductBundleSummary\n key={key}\n bundleOperation={bundle => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n bundle: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle })\n // \u4ECE\u6DFB\u52A0\u987A\u5E8F\u4E2D\u79FB\u9664\n setAddOrder?.(prev => prev.filter(t => t !== 'bundle'))\n }}\n status={!!joinedRecommendBuyProducts?.bundle}\n bundleListItem={joinedRecommendBuyProducts?.bundle?.value}\n canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n />\n )\n }\n if (type === 'exchange' && joinedRecommendBuyProducts?.exchange?.value) {\n return (\n <ProductExchangeSummary\n key={key}\n exchangeOperation={exchange => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n exchange: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange })\n // \u4ECE\u6DFB\u52A0\u987A\u5E8F\u4E2D\u79FB\u9664\n setAddOrder?.(prev => prev.filter(t => t !== 'exchange'))\n }}\n status={!!joinedRecommendBuyProducts?.exchange}\n canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n exchange={joinedRecommendBuyProducts?.exchange?.value}\n />\n )\n }\n return null\n })}\n </div>\n {(initialRecommendBuyProducts?.bundle ||\n initialRecommendBuyProducts?.gift ||\n initialRecommendBuyProducts?.exchange) && (\n <div className=\"laptop-md:mt-8 mt-6\">\n <Text className=\"laptop-md:text-[18px] text-sm font-bold\" html={productSummaryData?.recommendBuy} />\n <div className=\"laptop-md:gap-4 mt-4 flex flex-col gap-6\">\n {initialRecommendBuyProducts?.exchange && (\n <ProductExchangeSummary\n exchangeOperation={exchange => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n exchange: {\n value: exchange,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange: undefined })\n // \u6DFB\u52A0\u5230\u987A\u5E8F\u6570\u7EC4\u7684\u672B\u5C3E\n setAddOrder?.(prev => [...prev, 'exchange'])\n }}\n canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n status={!initialRecommendBuyProducts?.exchange}\n exchange={initialRecommendBuyProducts?.exchange}\n />\n )}\n {initialRecommendBuyProducts?.bundle && (\n <ProductBundleSummary\n bundleOperation={bundle => {\n setSavingDetail?.({ ...savingDetail, exchangePurchase: 0 })\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n bundle: {\n value: bundle,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle: undefined })\n // \u6DFB\u52A0\u5230\u987A\u5E8F\u6570\u7EC4\u7684\u672B\u5C3E\n setAddOrder?.(prev => [...prev, 'bundle'])\n }}\n canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n status={!initialRecommendBuyProducts?.bundle}\n bundleListItem={initialRecommendBuyProducts?.bundle}\n />\n )}\n {initialRecommendBuyProducts?.gift && (\n <ProductGiftSummary\n giftOperation={gift => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n gift: {\n value: gift,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift: undefined })\n // \u6DFB\u52A0\u5230\u987A\u5E8F\u6570\u7EC4\u7684\u672B\u5C3E\n setAddOrder?.(prev => [...prev, 'gift'])\n }}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n status={!initialRecommendBuyProducts?.gift}\n gift={initialRecommendBuyProducts?.gift}\n />\n )}\n </div>\n </div>\n )}\n </div>\n <div className=\"text-right\">\n <Text\n className=\"laptop:text-xl laptop-md:text-2xl text-right font-bold\"\n html={`${replaceTemplate(copyWriting?.totalPrice || '', { amount: formatPrice({ amount: parseFloat(finalPrice.toFixed(2)), currencyCode: variant.price.currencyCode, locale }) })}`}\n />\n\n {showComparePrice && totalSavings > 0 && (\n <Text\n className=\"laptop:text-xl laptop-md:text-2xl ml-1 text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n <div className=\"mt-4 flex justify-end gap-3\">\n <CartActionButtons\n mode={notifyMeMode}\n availableForSale={variant.availableForSale}\n addToCartText={copyWriting?.addToCart}\n buyNowText={copyWriting?.shopNow}\n addToCartLoading={addToCartLoading}\n buyNowLoading={buyNowLoading}\n addToCartClassName=\"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2\"\n buyNowClassName=\"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2\"\n onAddToCart={onAddToCart}\n onBuyNow={onBuyNow}\n onNotifyMeClick={onNotifyMeClick}\n notifyMeText={copyWriting?.notifyMe}\n notifyMeClassName=\"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2\"\n />\n </div>\n </div>\n </GridItem>\n </Grid>\n </div>\n </div>\n )\n}\n\nconst useRecommendBuyProducts = () => {\n const { bundle, variant, checkedBundle, freeGift, checkedGift, exchangePurchase, checkedExchangePurchase } =\n useBizProductContext()\n let bundleVariant = undefined\n let giftVariant = undefined\n let exchangeVariant = undefined\n const { bundleList } = bundle || {}\n\n const { giftList = [] } = freeGift || {}\n const { giftList: exchangeList = [] } = exchangePurchase || {}\n\n const availableBundleList =\n bundleList?.filter(bundle =>\n bundle.variants.slice(1, bundle.variants.length).every(v => v.variant.availableForSale)\n ) || []\n\n const [firstAvailableBundle] = availableBundleList\n bundleVariant = checkedBundle || firstAvailableBundle\n\n const [firstAvailableGift] = giftList?.filter(gift => gift.availableForSale) ?? []\n giftVariant = checkedGift || firstAvailableGift\n\n const [firstAvailableExchange] = exchangeList?.filter(exchange => exchange.availableForSale) ?? []\n exchangeVariant = checkedExchangePurchase || firstAvailableExchange\n\n return { bundleVariant, giftVariant, exchangeVariant }\n}\n\nconst ProductBundleSummary = ({\n bundleOperation,\n bundleListItem,\n canOperate,\n status,\n}: {\n bundleOperation: (bundle?: BundleListItem) => void\n bundleListItem?: BundleListItem\n canOperate?: boolean\n status?: boolean\n}) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { variant, setCheckedBundle } = useBizProductContext()\n const bundleVariants = bundleListItem?.variants.filter(v => v.variant.sku !== variant.sku)\n\n return (\n <div className=\"\">\n {bundleVariants?.map(bundleVariant => {\n return (\n <div className=\"flex items-center justify-between gap-4\" key={bundleVariant.variant.id}>\n <div className=\"flex items-center gap-4\">\n <Picture\n source={bundleVariant?.variant?.image?.url}\n className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n />\n <div className=\"tablet:max-w-none line-clamp-2 flex max-w-[178px] flex-col gap-[6px]\">\n <Text\n className=\"laptop-md:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold\"\n html={bundleVariant.variant.product.title}\n />\n </div>\n </div>\n <div className=\"flex flex-col items-end justify-center gap-1\">\n {!!bundleListItem && (\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"laptop-md:text-2xl text-base font-bold\"\n html={formatPrice({\n amount: bundleVariant?.price || 0,\n locale,\n currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n })}\n />\n {bundleVariant.price < bundleVariant.variant.price.amount && (\n <Text\n className=\"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: bundleVariant.variant.price.amount || 0,\n locale,\n currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n })}\n />\n )}\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedBundle?.(status ? undefined : bundleListItem)\n bundleOperation?.(bundleListItem)\n }}\n className=\"size-auto shrink-0 underline\"\n >\n {status ? copyWriting?.remove : copyWriting?.add}\n </Button>\n )}\n </div>\n </div>\n )\n })}\n </div>\n )\n}\n\nconst ProductGiftSummary = ({\n giftOperation,\n gift,\n status,\n canOperate,\n}: {\n giftOperation: (gift?: ProductVariant) => void\n gift?: ProductVariant\n status?: boolean\n canOperate?: boolean\n}) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { freeGift, setCheckedGift } = useBizProductContext()\n const { freeLabel } = freeGift || {}\n const { options } = gift || {}\n\n const giftOptionsText = useMemo(() => {\n const giftColorOption = (options?.find(\n option => option.name === 'color' || option.name === 'colour' || option.name === 'couleur'\n ) || {}) as ProductOption\n const giftQuantityOption = options?.find(option => option.name === 'quantity') || ({} as ProductOption)\n const giftColorOptionText = giftColorOption ? giftColorOption.values?.[0]?.label : ''\n const giftQuantityOptionText = giftQuantityOption ? giftQuantityOption.values?.[0]?.label : ''\n return `${giftColorOptionText && giftQuantityOptionText ? giftQuantityOptionText + ' | ' + giftColorOptionText : giftQuantityOptionText || giftColorOptionText} | ${freeLabel}`\n }, [freeLabel, options])\n\n return (\n <div className=\"flex items-center justify-between gap-6\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={gift?.image?.url}\n className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n />\n <div className=\"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]\">\n <Text\n className=\"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold\"\n html={gift?.product?.title}\n />\n <Text\n className=\"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]\"\n html={giftOptionsText}\n />\n </div>\n </div>\n <div className=\"flex flex-col items-end justify-center gap-2\">\n {!!gift && (\n <div className=\"flex items-center gap-1\">\n <Text className=\"laptop-md:text-2xl text-base font-bold\" html={freeLabel} />\n <Text\n className=\"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: gift.price.amount,\n locale,\n currencyCode: gift.price.currencyCode,\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedGift?.(status ? undefined : gift)\n giftOperation(gift)\n }}\n className=\"size-auto shrink-0 underline\"\n >\n {status ? copyWriting?.remove : copyWriting?.add}\n </Button>\n )}\n </div>\n </div>\n )\n}\n\nconst ProductExchangeSummary = ({\n exchangeOperation,\n exchange,\n canOperate,\n status,\n}: {\n exchangeOperation: (exchange?: ProductVariant) => void\n exchange?: ProductVariant & { finalPrice?: ProductPrice }\n canOperate?: boolean\n status?: boolean\n}) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { setCheckedExchangePurchase } = useBizProductContext()\n\n return (\n <div className=\"flex items-center justify-between gap-6\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={exchange?.image?.url}\n className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n />\n <div className=\"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]\">\n <Text\n className=\"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold\"\n html={exchange?.product?.title}\n />\n <Text className=\"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]\" />\n </div>\n </div>\n <div className=\"flex flex-col items-end justify-center gap-2\">\n {!!exchange && (\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"laptop-md:text-2xl text-base font-bold\"\n html={formatPrice({\n amount: exchange.finalPrice?.amount || 0,\n locale,\n currencyCode: exchange.price.currencyCode,\n })}\n />\n <Text\n className=\"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: exchange.price?.amount || 0,\n locale,\n currencyCode: exchange.price.currencyCode,\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedExchangePurchase?.(status ? undefined : exchange)\n exchangeOperation(exchange)\n }}\n className=\"size-auto shrink-0 underline\"\n >\n {status ? copyWriting?.remove : copyWriting?.add}\n </Button>\n )}\n </div>\n </div>\n )\n}\n\nexport default withLayout(ProductSummary)\n"],
5
- "mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAkHU,IAAAI,EAAA,6BAlHVC,EAA+D,8CAC/DC,EAAqC,0CACrCC,EAAiC,8CACjCC,EAA6C,iBAC7CC,EAA4B,mCAC5BC,EAA+B,6CAE/BC,EAAoB,yBACpBC,EAAgC,wCAChCC,EAA2B,2CAC3BR,EAAiC,8CACjCS,EAAwB,0CACxBC,GAA8B,+CAE9B,MAAMC,GAAiB,IAAM,CAC3B,KAAM,CAAE,OAAAC,EAAS,KAAM,YAAAC,EAAa,aAAAC,CAAa,KAAI,kBAAe,EAC9D,CACJ,QAAAC,EACA,QAAAC,EACA,WAAAC,EACA,aAAAC,EACA,OAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,cAAAC,EACA,2BAAAC,EACA,8BAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,cAAAC,GACA,aAAAC,GACA,gBAAAC,GACA,QAAAC,EACA,SAAAC,EACA,YAAAC,CACF,KAAI,wBAAqB,EAGnBC,EAAmBvB,GAAc,kBAAoB,GAErDwB,KAAqB,oBAAiB,gBAAgB,GAAK,CAAC,EAE5D,CAACC,CAAqB,EAAIlB,EAE1BmB,KAAoB,WAAQ,IAAM,CACtC,MAAMC,EAAuBf,G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ACA,QAAC,OAAI,UAAU,0DACb,oBAAC,QACC,UAAU,kFACV,KAAMA,GAAU,SAAS,MAC3B,KACA,OAAC,QAAK,UAAU,gFAAgF,GAClG,GACF,KACA,QAAC,OAAI,UAAU,+CACZ,WAAC,CAACA,MACD,QAAC,OAAI,UAAU,0BACb,oBAAC,QACC,UAAU,yCACV,QAAM,eAAY,CAChB,OAAQA,EAAS,YAAY,QAAU,EACvC,OAAA7D,EACA,aAAc6D,EAAS,MAAM,YAC/B,CAAC,EACH,KACA,OAAC,QACC,UAAU,qEACV,QAAM,eAAY,CAChB,OAAQA,EAAS,OAAO,QAAU,EAClC,OAAA7D,EACA,aAAc6D,EAAS,MAAM,YAC/B,CAAC,EACH,GACF,EAEDe,MACC,OAAC,UACC,KAAK,OACL,QAAQ,OACR,QAAS,IAAM,CACbe,IAA6Bd,EAAS,OAAYhB,CAAQ,EAC1D6B,EAAkB7B,CAAQ,CAC5B,EACA,UAAU,+BAET,SAAAgB,EAAS5E,GAAa,OAASA,GAAa,IAC/C,GAEJ,GACF,CAEJ,EAEA,IAAOhB,MAAQ,cAAWc,EAAc",
6
- "names": ["ProductSummary_exports", "__export", "ProductSummary_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_BizProductProvider", "import_useComponentData", "import_react", "import_utils", "import_AiuiProvider", "import_decimal", "import_textFormat", "import_Styles", "import_track", "import_CartActionButtons", "ProductSummary", "locale", "copyWriting", "trackingData", "product", "variant", "finalPrice", "comparePrice", "coupon", "selectedOptions", "selectedVariants", "totalSavings", "onAddToCart", "onBuyNow", "savingDetail", "checkedBundle", "joinedRecommendBuyProducts", "setJoinedRecommendBuyProducts", "setSavingDetail", "addToCartLoading", "buyNowLoading", "notifyMeMode", "onNotifyMeClick", "profile", "addOrder", "setAddOrder", "showComparePrice", "productSummaryData", "currentProductVariant", "summaryFinalPrice", "currentBundleVariant", "v", "currentBundlePrice", "Decimal", "currentProductPrice", "bundleVariant", "giftVariant", "exchangeVariant", "useRecommendBuyProducts", "initialRecommendBuyProducts", "setInitialRecommendBuyProducts", "orderedJoinedProducts", "result", "type", "index", "productOptionsText", "quantity", "color", "variantImage", "image_1920", "image_1440", "image_1024", "image_768", "image_390", "key", "ProductGiftSummary", "gift", "prev", "t", "ProductBundleSummary", "bundle", "ProductExchangeSummary", "exchange", "CartActionButtons", "freeGift", "checkedGift", "exchangePurchase", "checkedExchangePurchase", "bundleList", "giftList", "exchangeList", "availableBundleList", "firstAvailableBundle", "firstAvailableGift", "firstAvailableExchange", "bundleOperation", "bundleListItem", "canOperate", "status", "setCheckedBundle", "bundleVariants", "giftOperation", "setCheckedGift", "freeLabel", "options", "giftOptionsText", "giftColorOption", "option", "giftQuantityOption", "giftColorOptionText", "giftQuantityOptionText", "exchangeOperation", "setCheckedExchangePurchase"]
4
+ "sourcesContent": ["import { Text, Button, Grid, GridItem, Picture, Heading } from '../../../../../components/index.js'\nimport { useBizProductContext } from '../../../BizProductProvider.js'\nimport { useComponentData } from '../../../hooks/useComponentData.js'\nimport { useEffect, useMemo, useState } from 'react'\nimport { formatPrice } from '../../../utils/index.js'\nimport { useAiuiContext } from '../../../../AiuiProvider/index.js'\nimport type { ProductVariant, ProductPrice, ProductOption } from '../../../types/product'\nimport Decimal from 'decimal.js'\nimport { replaceTemplate } from '../../../utils/textFormat.js'\nimport { withLayout } from '../../../../../shared/Styles.js'\nimport { ExposureDetector } from '../../../../../components/index.js'\nimport { gaTrack } from '../../../../../shared/track.js'\nimport CartActionButtons from '../../CartActionButtons/index.js'\n\nconst ProductSummary = () => {\n const { locale = 'us', copyWriting, trackingData } = useAiuiContext()\n const {\n product,\n variant,\n finalPrice,\n comparePrice,\n coupon,\n selectedOptions,\n selectedVariants,\n totalSavings,\n onAddToCart,\n onBuyNow,\n savingDetail,\n checkedBundle,\n joinedRecommendBuyProducts,\n setJoinedRecommendBuyProducts,\n setSavingDetail,\n addToCartLoading,\n buyNowLoading,\n notifyMeMode,\n onNotifyMeClick,\n profile,\n addOrder,\n setAddOrder,\n } = useBizProductContext()\n\n /** \u662F\u5426\u663E\u793A\u539F\u4EF7\uFF08\u5212\u7EBF\u4EF7\uFF09\uFF0C\u9ED8\u8BA4\u663E\u793A */\n const showComparePrice = trackingData?.showComparePrice ?? true\n\n const productSummaryData = useComponentData('ProductSummary') ?? {}\n\n const [currentProductVariant] = selectedVariants\n\n const summaryFinalPrice = useMemo(() => {\n // const currentBundleVariant = checkedBundle?.variants.find(v => v.variant.sku === currentProductVariant?.sku)\n // const currentBundlePrice = new Decimal(currentProductVariant?.price?.amount || 0)\n // .minus(currentBundleVariant?.price || currentProductVariant?.price?.amount)\n // .toNumber()\n let currentProductPrice = new Decimal(currentProductVariant?.price?.amount || 0)\n if (profile?.email) {\n currentProductPrice = currentProductPrice.minus(savingDetail?.member || 0)\n }\n const finalPrice = currentProductPrice.minus(savingDetail?.coupon).toNumber()\n return parseFloat(finalPrice.toFixed(2))\n }, [currentProductVariant, checkedBundle, profile, savingDetail?.member, savingDetail?.coupon])\n\n const { giftVariant } = useRecommendBuyProducts() || {}\n\n const [initialRecommendBuyProducts, setInitialRecommendBuyProducts] = useState<{\n // bundle?: BundleListItem\n gift?: ProductVariant\n // exchange?: ProductVariant\n }>()\n\n useEffect(() => {\n setInitialRecommendBuyProducts({\n // bundle: joinedRecommendBuyProducts.bundle?.value ? undefined : bundleVariant,\n gift: joinedRecommendBuyProducts.gift?.value ? undefined : giftVariant,\n // exchange: joinedRecommendBuyProducts.exchange?.value ? undefined : exchangeVariant,\n })\n }, [giftVariant, joinedRecommendBuyProducts])\n\n // \u6839\u636E\u6DFB\u52A0\u987A\u5E8F\u751F\u6210\u5DF2\u6DFB\u52A0\u4EA7\u54C1\u7684\u5217\u8868\n const orderedJoinedProducts = useMemo(() => {\n const result: Array<{ type: 'bundle' | 'gift' | 'exchange'; key: string }> = []\n\n // \u6309\u7167\u6DFB\u52A0\u987A\u5E8F\u6DFB\u52A0\n if (addOrder) {\n addOrder.forEach((type, index) => {\n if (joinedRecommendBuyProducts[type]?.value) {\n result.push({ type, key: `${type}-${index}` })\n }\n })\n }\n\n return result\n }, [addOrder, joinedRecommendBuyProducts])\n\n const productOptionsText = useMemo(() => {\n const quantity = selectedOptions?.quantity || ''\n const color = selectedOptions?.color || selectedOptions?.colour || selectedOptions?.couleur || ''\n return `${quantity && color ? `${quantity} | ${color}` : quantity || color}`\n }, [selectedOptions?.quantity, selectedOptions?.color, selectedOptions?.colour, selectedOptions?.couleur])\n\n const variantImage = useMemo(() => {\n const { image_1920, image_1440, image_1024, image_768, image_390 } = productSummaryData?.thumbnail || {}\n const responsiveSource = productSummaryData?.thumbnail\n ? `${image_1920} 1920, ${image_1440} 1440, ${image_1024} 1024, ${image_768} 768, ${image_390} 390`\n : variant.image?.url\n return responsiveSource || variant.image?.url\n }, [productSummaryData?.thumbnail, variant.image?.url])\n\n const isAvailable = variant.availableForSale\n if (!isAvailable) return null\n\n return (\n <div className=\"ipc-product-summary laptop:px-16 laptop-md:px-0 laptop-md:mt-[96px] lg-desktop:mt-[128px] mt-16\">\n <div className=\"laptop:rounded-2xl bg-[#F5F5F7]\">\n <Grid className=\"tablet:p-8 tablet:!pb-0 px-4 pt-6\">\n <GridItem className=\"laptop:col-start-1 laptop:col-span-5 col-span-12 flex flex-col justify-between gap-4\">\n <Heading\n className=\"lg-desktop:text-[48px] laptop:text-[32px] laptop-md:text-[40px] mb-4 text-[24px] font-bold leading-none [&>span]:text-[#D1D1D1]\"\n html={productSummaryData?.readyWant?.replace?.('{title}', product?.title)}\n />\n <div className=\"\">\n <Picture\n source={variantImage}\n className=\"lg-desktop:aspect-[644/320] laptop-md:aspect-[503/270] laptop:aspect-[332/190] tablet:aspect-[704/380] aspect-[358/190]\"\n imgClassName=\"object-cover h-full\"\n />\n </div>\n </GridItem>\n <GridItem 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\">\n <div>\n <div className=\"flex flex-col gap-4\">\n <ExposureDetector\n exposureKey=\"listing_selector\"\n onExposure={() => {\n gaTrack({\n event: 'ga4Event',\n event_name: 'component_impression',\n event_parameters: {\n page_group: `Product Detail Page${variant.sku}`,\n component_type: 'image',\n component_name: 'listing_selector',\n position: 1,\n },\n })\n }}\n >\n <div className=\"flex items-center justify-between gap-6\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={variant.image?.url || product?.images?.[0]?.url}\n className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n />\n <div className=\"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]\">\n <Text\n className=\"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold\"\n html={product.title}\n />\n <Text\n className=\"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]\"\n html={productOptionsText}\n />\n </div>\n </div>\n <div className=\"flex items-center gap-1\">\n <Text\n className=\"laptop-md:text-2xl text-base font-bold\"\n html={formatPrice({\n amount: summaryFinalPrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n {showComparePrice && summaryFinalPrice < variant?.price?.amount && (\n <Text\n className=\"laptop-md:text-2xl laptop:text-xl text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: variant?.price?.amount,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n </div>\n </div>\n </ExposureDetector>\n {/* \u6309\u7167\u6DFB\u52A0\u987A\u5E8F\u6E32\u67D3\u5DF2\u6DFB\u52A0\u7684\u4EA7\u54C1 */}\n {orderedJoinedProducts.map(({ type, key }) => {\n if (type === 'gift' && joinedRecommendBuyProducts?.gift?.value) {\n return (\n <ProductGiftSummary\n key={key}\n giftOperation={gift => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n gift: {\n value: undefined,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift })\n // \u4ECE\u6DFB\u52A0\u987A\u5E8F\u4E2D\u79FB\u9664\n setAddOrder?.(prev => prev.filter(t => t !== 'gift'))\n }}\n status={!!joinedRecommendBuyProducts?.gift}\n gift={joinedRecommendBuyProducts?.gift?.value}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n />\n )\n }\n // if (type === 'bundle' && joinedRecommendBuyProducts?.bundle?.value) {\n // return (\n // <ProductBundleSummary\n // key={key}\n // bundleOperation={bundle => {\n // setJoinedRecommendBuyProducts?.({\n // ...joinedRecommendBuyProducts,\n // bundle: {\n // value: undefined,\n // canOperate: true,\n // },\n // })\n // setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle })\n // // \u4ECE\u6DFB\u52A0\u987A\u5E8F\u4E2D\u79FB\u9664\n // setAddOrder?.(prev => prev.filter(t => t !== 'bundle'))\n // }}\n // status={!!joinedRecommendBuyProducts?.bundle}\n // bundleListItem={joinedRecommendBuyProducts?.bundle?.value}\n // canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n // />\n // )\n // }\n // if (type === 'exchange' && joinedRecommendBuyProducts?.exchange?.value) {\n // return (\n // <ProductExchangeSummary\n // key={key}\n // exchangeOperation={exchange => {\n // setJoinedRecommendBuyProducts?.({\n // ...joinedRecommendBuyProducts,\n // exchange: {\n // value: undefined,\n // canOperate: true,\n // },\n // })\n // setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange })\n // // \u4ECE\u6DFB\u52A0\u987A\u5E8F\u4E2D\u79FB\u9664\n // setAddOrder?.(prev => prev.filter(t => t !== 'exchange'))\n // }}\n // status={!!joinedRecommendBuyProducts?.exchange}\n // canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n // exchange={joinedRecommendBuyProducts?.exchange?.value}\n // />\n // )\n // }\n return null\n })}\n </div>\n {\n initialRecommendBuyProducts?.gift && (\n <div className=\"laptop-md:mt-8 mt-6\">\n <Text className=\"laptop-md:text-[18px] text-sm font-bold\" html={productSummaryData?.recommendBuy} />\n <div className=\"laptop-md:gap-4 mt-4 flex flex-col gap-6\">\n {/* {initialRecommendBuyProducts?.exchange && (\n <ProductExchangeSummary\n exchangeOperation={exchange => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n exchange: {\n value: exchange,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, exchange: undefined })\n // \u6DFB\u52A0\u5230\u987A\u5E8F\u6570\u7EC4\u7684\u672B\u5C3E\n setAddOrder?.(prev => [...prev, 'exchange'])\n }}\n canOperate={joinedRecommendBuyProducts?.exchange?.canOperate}\n status={!initialRecommendBuyProducts?.exchange}\n exchange={initialRecommendBuyProducts?.exchange}\n />\n )} */}\n {/* {initialRecommendBuyProducts?.bundle && (\n <ProductBundleSummary\n bundleOperation={bundle => {\n setSavingDetail?.({ ...savingDetail, exchangePurchase: 0 })\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n bundle: {\n value: bundle,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, bundle: undefined })\n // \u6DFB\u52A0\u5230\u987A\u5E8F\u6570\u7EC4\u7684\u672B\u5C3E\n setAddOrder?.(prev => [...prev, 'bundle'])\n }}\n canOperate={joinedRecommendBuyProducts?.bundle?.canOperate}\n status={!initialRecommendBuyProducts?.bundle}\n bundleListItem={initialRecommendBuyProducts?.bundle}\n />\n )} */}\n {initialRecommendBuyProducts?.gift && (\n <ProductGiftSummary\n giftOperation={gift => {\n setJoinedRecommendBuyProducts?.({\n ...joinedRecommendBuyProducts,\n gift: {\n value: gift,\n canOperate: true,\n },\n })\n setInitialRecommendBuyProducts?.({ ...initialRecommendBuyProducts, gift: undefined })\n // \u6DFB\u52A0\u5230\u987A\u5E8F\u6570\u7EC4\u7684\u672B\u5C3E\n setAddOrder?.(prev => [...prev, 'gift'])\n }}\n canOperate={joinedRecommendBuyProducts?.gift?.canOperate}\n status={!initialRecommendBuyProducts?.gift}\n gift={initialRecommendBuyProducts?.gift}\n />\n )}\n </div>\n </div>\n )}\n </div>\n <div className=\"text-right\">\n <Text\n className=\"laptop:text-xl laptop-md:text-2xl text-right font-bold\"\n html={`${replaceTemplate(copyWriting?.totalPrice || '', { amount: formatPrice({ amount: parseFloat(finalPrice.toFixed(2)), currencyCode: variant.price.currencyCode, locale }) })}`}\n />\n\n {showComparePrice && totalSavings > 0 && (\n <Text\n className=\"laptop:text-xl laptop-md:text-2xl ml-1 text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: comparePrice,\n currencyCode: variant.price.currencyCode,\n locale,\n })}\n />\n )}\n <div className=\"mt-4 flex justify-end gap-3\">\n <CartActionButtons\n mode={notifyMeMode}\n availableForSale={variant.availableForSale}\n addToCartText={copyWriting?.addToCart}\n buyNowText={copyWriting?.shopNow}\n addToCartLoading={addToCartLoading}\n buyNowLoading={buyNowLoading}\n addToCartClassName=\"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2\"\n buyNowClassName=\"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2\"\n onAddToCart={onAddToCart}\n onBuyNow={onBuyNow}\n onNotifyMeClick={onNotifyMeClick}\n notifyMeText={copyWriting?.notifyMe}\n notifyMeClassName=\"tablet:w-auto laptop:w-1/2 laptop-md:w-auto w-1/2\"\n />\n </div>\n </div>\n </GridItem>\n </Grid>\n </div>\n </div>\n )\n}\n\nconst useRecommendBuyProducts = () => {\n const { bundle, variant, checkedBundle, freeGift, checkedGift } =\n useBizProductContext()\n// let bundleVariant = undefined\n let giftVariant = undefined\n// let exchangeVariant = undefined\n// const { bundleList } = bundle || {}\n\n const { giftList = [] } = freeGift || {}\n// const { giftList: exchangeList = [] } = exchangePurchase || {}\n\n// const availableBundleList =\n// bundleList?.filter(bundle =>\n// bundle.variants.slice(1, bundle.variants.length).every(v => v.variant.availableForSale)\n// ) || []\n\n// const [firstAvailableBundle] = availableBundleList\n// bundleVariant = checkedBundle || firstAvailableBundle\n\n const [firstAvailableGift] = giftList?.filter(gift => gift.availableForSale) ?? []\n giftVariant = checkedGift || firstAvailableGift\n\n// const [firstAvailableExchange] = exchangeList?.filter(exchange => exchange.availableForSale) ?? []\n// exchangeVariant = checkedExchangePurchase || firstAvailableExchange\n\n return { giftVariant }\n}\n\n// const ProductBundleSummary = ({\n// bundleOperation,\n// bundleListItem,\n// canOperate,\n// status,\n// }: {\n// bundleOperation: (bundle?: BundleListItem) => void\n// bundleListItem?: BundleListItem\n// canOperate?: boolean\n// status?: boolean\n// }) => {\n// const { locale = 'us', copyWriting } = useAiuiContext()\n// const { variant, setCheckedBundle } = useBizProductContext()\n// const bundleVariants = bundleListItem?.variants.filter(v => v.variant.sku !== variant.sku)\n\n// return (\n// <div className=\"\">\n// {bundleVariants?.map(bundleVariant => {\n// return (\n// <div className=\"flex items-center justify-between gap-4\" key={bundleVariant.variant.id}>\n// <div className=\"flex items-center gap-4\">\n// <Picture\n// source={bundleVariant?.variant?.image?.url}\n// className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n// />\n// <div className=\"tablet:max-w-none line-clamp-2 flex max-w-[178px] flex-col gap-[6px]\">\n// <Text\n// className=\"laptop-md:text-[16px] lg-desktop:text-[18px] text-[14px] font-bold\"\n// html={bundleVariant.variant.product.title}\n// />\n// </div>\n// </div>\n// <div className=\"flex flex-col items-end justify-center gap-1\">\n// {!!bundleListItem && (\n// <div className=\"flex items-center gap-1\">\n// <Text\n// className=\"laptop-md:text-2xl text-base font-bold\"\n// html={formatPrice({\n// amount: bundleVariant?.price || 0,\n// locale,\n// currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n// })}\n// />\n// {bundleVariant.price < bundleVariant.variant.price.amount && (\n// <Text\n// className=\"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through\"\n// html={formatPrice({\n// amount: bundleVariant.variant.price.amount || 0,\n// locale,\n// currencyCode: bundleVariant.variant?.price?.currencyCode || '',\n// })}\n// />\n// )}\n// </div>\n// )}\n// {canOperate && (\n// <Button\n// size=\"icon\"\n// variant=\"link\"\n// onClick={() => {\n// setCheckedBundle?.(status ? undefined : bundleListItem)\n// bundleOperation?.(bundleListItem)\n// }}\n// className=\"size-auto shrink-0 underline\"\n// >\n// {status ? copyWriting?.remove : copyWriting?.add}\n// </Button>\n// )}\n// </div>\n// </div>\n// )\n// })}\n// </div>\n// )\n// }\n\nconst ProductGiftSummary = ({\n giftOperation,\n gift,\n status,\n canOperate,\n}: {\n giftOperation: (gift?: ProductVariant) => void\n gift?: ProductVariant\n status?: boolean\n canOperate?: boolean\n}) => {\n const { locale = 'us', copyWriting } = useAiuiContext()\n const { freeGift, setCheckedGift } = useBizProductContext()\n const { freeLabel } = freeGift || {}\n const { options } = gift || {}\n\n const giftOptionsText = useMemo(() => {\n const giftColorOption = (options?.find(\n option => option.name === 'color' || option.name === 'colour' || option.name === 'couleur'\n ) || {}) as ProductOption\n const giftQuantityOption = options?.find(option => option.name === 'quantity') || ({} as ProductOption)\n const giftColorOptionText = giftColorOption ? giftColorOption.values?.[0]?.label : ''\n const giftQuantityOptionText = giftQuantityOption ? giftQuantityOption.values?.[0]?.label : ''\n return `${giftColorOptionText && giftQuantityOptionText ? giftQuantityOptionText + ' | ' + giftColorOptionText : giftQuantityOptionText || giftColorOptionText} | ${freeLabel}`\n }, [freeLabel, options])\n\n return (\n <div className=\"flex items-center justify-between gap-6\">\n <div className=\"flex items-center gap-4\">\n <Picture\n source={gift?.image?.url}\n className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n />\n <div className=\"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]\">\n <Text\n className=\"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold\"\n html={gift?.product?.title}\n />\n <Text\n className=\"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]\"\n html={giftOptionsText}\n />\n </div>\n </div>\n <div className=\"flex flex-col items-end justify-center gap-2\">\n {!!gift && (\n <div className=\"flex items-center gap-1\">\n <Text className=\"laptop-md:text-2xl text-base font-bold\" html={freeLabel} />\n <Text\n className=\"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through\"\n html={formatPrice({\n amount: gift.price.amount,\n locale,\n currencyCode: gift.price.currencyCode,\n })}\n />\n </div>\n )}\n {canOperate && (\n <Button\n size=\"icon\"\n variant=\"link\"\n onClick={() => {\n setCheckedGift?.(status ? undefined : gift)\n giftOperation(gift)\n }}\n className=\"size-auto shrink-0 underline\"\n >\n {status ? copyWriting?.remove : copyWriting?.add}\n </Button>\n )}\n </div>\n </div>\n )\n}\n\n// const ProductExchangeSummary = ({\n// exchangeOperation,\n// exchange,\n// canOperate,\n// status,\n// }: {\n// exchangeOperation: (exchange?: ProductVariant) => void\n// exchange?: ProductVariant & { finalPrice?: ProductPrice }\n// canOperate?: boolean\n// status?: boolean\n// }) => {\n// const { locale = 'us', copyWriting } = useAiuiContext()\n// const { setCheckedExchangePurchase } = useBizProductContext()\n\n// return (\n// <div className=\"flex items-center justify-between gap-6\">\n// <div className=\"flex items-center gap-4\">\n// <Picture\n// source={exchange?.image?.url}\n// className=\"laptop:size-12 lg-desktop:size-16 border-1 size-10 shrink-0 rounded-lg border-[#E4E5E6] bg-[#EAEAEC] object-cover p-2\"\n// />\n// <div className=\"tablet:max-w-none flex max-w-[178px] flex-col gap-[6px]\">\n// <Text\n// className=\"laptop-md:text-[16px] lg-desktop:text-[18px] line-clamp-2 text-[14px] font-bold\"\n// html={exchange?.product?.title}\n// />\n// <Text className=\"laptop:text-[14px] laptop-md:text-[18px] text-[12px] font-bold text-[#6D6D6F]\" />\n// </div>\n// </div>\n// <div className=\"flex flex-col items-end justify-center gap-2\">\n// {!!exchange && (\n// <div className=\"flex items-center gap-1\">\n// <Text\n// className=\"laptop-md:text-2xl text-base font-bold\"\n// html={formatPrice({\n// amount: exchange.finalPrice?.amount || 0,\n// locale,\n// currencyCode: exchange.price.currencyCode,\n// })}\n// />\n// <Text\n// className=\"laptop-md:text-2xl text-base font-bold text-[#6D6D6F] line-through\"\n// html={formatPrice({\n// amount: exchange.price?.amount || 0,\n// locale,\n// currencyCode: exchange.price.currencyCode,\n// })}\n// />\n// </div>\n// )}\n// {canOperate && (\n// <Button\n// size=\"icon\"\n// variant=\"link\"\n// onClick={() => {\n// setCheckedExchangePurchase?.(status ? undefined : exchange)\n// exchangeOperation(exchange)\n// }}\n// className=\"size-auto shrink-0 underline\"\n// >\n// {status ? copyWriting?.remove : copyWriting?.add}\n// </Button>\n// )}\n// </div>\n// </div>\n// )\n// }\n\nexport default withLayout(ProductSummary)\n"],
5
+ "mappings": "skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,KAAA,eAAAC,GAAAH,IAkHU,IAAAI,EAAA,6BAlHVC,EAA+D,8CAC/DC,EAAqC,0CACrCC,EAAiC,8CACjCC,EAA6C,iBAC7CC,EAA4B,mCAC5BC,EAA+B,6CAE/BC,EAAoB,yBACpBC,EAAgC,wCAChCC,EAA2B,2CAC3BR,EAAiC,8CACjCS,EAAwB,0CACxBC,EAA8B,+CAE9B,MAAMC,GAAiB,IAAM,CAC3B,KAAM,CAAE,OAAAC,EAAS,KAAM,YAAAC,EAAa,aAAAC,CAAa,KAAI,kBAAe,EAC9D,CACJ,QAAAC,EACA,QAAAC,EACA,WAAAC,EACA,aAAAC,EACA,OAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,YAAAC,EACA,SAAAC,EACA,aAAAC,EACA,cAAAC,EACA,2BAAAC,EACA,8BAAAC,EACA,gBAAAC,GACA,iBAAAC,EACA,cAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,QAAAC,EACA,SAAAC,EACA,YAAAC,CACF,KAAI,wBAAqB,EAGnBC,EAA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ummary_default", "__toCommonJS", "import_jsx_runtime", "import_components", "import_BizProductProvider", "import_useComponentData", "import_react", "import_utils", "import_AiuiProvider", "import_decimal", "import_textFormat", "import_Styles", "import_track", "import_CartActionButtons", "ProductSummary", "locale", "copyWriting", "trackingData", "product", "variant", "finalPrice", "comparePrice", "coupon", "selectedOptions", "selectedVariants", "totalSavings", "onAddToCart", "onBuyNow", "savingDetail", "checkedBundle", "joinedRecommendBuyProducts", "setJoinedRecommendBuyProducts", "setSavingDetail", "addToCartLoading", "buyNowLoading", "notifyMeMode", "onNotifyMeClick", "profile", "addOrder", "setAddOrder", "showComparePrice", "productSummaryData", "currentProductVariant", "summaryFinalPrice", "currentProductPrice", "Decimal", "giftVariant", "useRecommendBuyProducts", "initialRecommendBuyProducts", "setInitialRecommendBuyProducts", "orderedJoinedProducts", "result", "type", "index", "productOptionsText", "quantity", "color", "variantImage", "image_1920", "image_1440", "image_1024", "image_768", "image_390", "key", "ProductGiftSummary", "gift", "prev", "t", "CartActionButtons", "bundle", "freeGift", "checkedGift", "giftList", "firstAvailableGift", "giftOperation", "status", "canOperate", "setCheckedGift", "freeLabel", "options", "giftOptionsText", "giftColorOption", "option", "giftQuantityOption", "giftColorOptionText", "giftQuantityOptionText"]
7
7
  }
@@ -1,3 +1,2 @@
1
1
  export { default as PurchaseBar } from './PurchaseBar/index.js';
2
2
  export { default as ProductActions } from './PurchaseBar/ProductActions/index.js';
3
- export { default as ProductCard } from './ProductCard/index.js';
@@ -1,2 +1,2 @@
1
- "use strict";var m=Object.create;var e=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var P=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var i=(r,a)=>{for(var o in a)e(r,o,{get:a[o],enumerable:!0})},u=(r,a,o,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of x(a))!h.call(r,t)&&t!==o&&e(r,t,{get:()=>a[t],enumerable:!(f=p(a,t))||f.enumerable});return r};var d=(r,a,o)=>(o=r!=null?m(P(r)):{},u(a||!r||!r.__esModule?e(o,"default",{value:r,enumerable:!0}):o,r)),n=r=>u(e({},"__esModule",{value:!0}),r);var A={};i(A,{ProductActions:()=>c.default,ProductCard:()=>l.default,PurchaseBar:()=>s.default});module.exports=n(A);var s=d(require("./PurchaseBar/index.js")),c=d(require("./PurchaseBar/ProductActions/index.js")),l=d(require("./ProductCard/index.js"));
1
+ "use strict";var l=Object.create;var e=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var h=(r,a)=>{for(var o in a)e(r,o,{get:a[o],enumerable:!0})},s=(r,a,o,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of p(a))!P.call(r,t)&&t!==o&&e(r,t,{get:()=>a[t],enumerable:!(f=m(a,t))||f.enumerable});return r};var u=(r,a,o)=>(o=r!=null?l(x(r)):{},s(a||!r||!r.__esModule?e(o,"default",{value:r,enumerable:!0}):o,r)),i=r=>s(e({},"__esModule",{value:!0}),r);var n={};h(n,{ProductActions:()=>d.default,PurchaseBar:()=>c.default});module.exports=i(n);var c=u(require("./PurchaseBar/index.js")),d=u(require("./PurchaseBar/ProductActions/index.js"));
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/biz-components/Listing/components/index.ts"],
4
- "sourcesContent": ["export { default as PurchaseBar } from './PurchaseBar/index.js'\nexport { default as ProductActions } from './PurchaseBar/ProductActions/index.js'\nexport { default as ProductCard } from './ProductCard/index.js'\n"],
5
- "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,mGAAAE,EAAAF,GAAA,IAAAG,EAAuC,qCACvCC,EAA0C,oDAC1CC,EAAuC",
6
- "names": ["components_exports", "__export", "__toCommonJS", "import_PurchaseBar", "import_ProductActions", "import_ProductCard"]
4
+ "sourcesContent": ["export { default as PurchaseBar } from './PurchaseBar/index.js'\nexport { default as ProductActions } from './PurchaseBar/ProductActions/index.js'\n\n"],
5
+ "mappings": "0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,yEAAAE,EAAAF,GAAA,IAAAG,EAAuC,qCACvCC,EAA0C",
6
+ "names": ["components_exports", "__export", "__toCommonJS", "import_PurchaseBar", "import_ProductActions"]
7
7
  }
@@ -1,4 +1,6 @@
1
- import type { ProductVariant, FreeGift, Bundle } from '../types/product';
1
+ import type { ProductVariant, FreeGift } from '../types/product';
2
+ import type { ProductFunctionFreeGiftProps } from '../components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.js';
3
+ import type { ProductBundleProps } from '../components/ProductCard/ProductDetail/ProductBundle/types.js';
2
4
  interface BenefitsParams {
3
5
  variant: ProductVariant;
4
6
  }
@@ -15,10 +17,14 @@ interface BenefitsResult {
15
17
  * 买赠
16
18
  */
17
19
  freeGift: BenefitItemConfig<FreeGift>;
20
+ /**
21
+ * function买赠
22
+ */
23
+ functionFreeGift: BenefitItemConfig<ProductFunctionFreeGiftProps>;
18
24
  /**
19
25
  * 捆绑折扣
20
26
  */
21
- bundle: BenefitItemConfig<Bundle>;
27
+ bundle: BenefitItemConfig<ProductBundleProps>;
22
28
  /**
23
29
  * 会员价
24
30
  */
@@ -1,2 +1,2 @@
1
- "use strict";var u=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var G=Object.prototype.hasOwnProperty;var P=(e,n)=>{for(var i in n)u(e,i,{get:n[i],enumerable:!0})},S=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of x(n))!G.call(e,o)&&o!==i&&u(e,o,{get:()=>n[o],enumerable:!(t=R(n,o))||t.enumerable});return e};var v=e=>S(u({},"__esModule",{value:!0}),e);var y={};P(y,{useBenefits:()=>w});module.exports=v(y);var m=require("../BizProductProvider.js"),p=require("../utils/helper.js"),d=require("./useDiscountEnable.js"),g=require("../../AiuiProvider/index.js");const w=({variant:e})=>{const{coupon:n,product:i,bundle:t,freeGift:o,memberFunctionResult:f,creditsRedemption:b,profile:B}=(0,m.useBizProductContext)(),{amount:c}=b??{},{trackingData:l}=(0,g.useAiuiContext)(),h=Math.max(f?.withCouponMemberTotalSave??0,f?.withoutCouponMaxMemberTotalSave??0),r=(0,d.useDiscountEnable)({profile:B,variant:e,memberFunctionResult:f,coupon:n}),C=!!(l?.paidShipping&&e.requiresShipping&&!e?.metafields?.global?.presell&&!e?.metafields?.global?.HideShipping),a=l?.freeGift,D=a?.excludeProducts?.map(s=>typeof s=="object"&&"sku"in s?s.sku:s)??[],I=l?.levelDiscount&&(0,p.checkItemAvailableForProduct)({product:i,variant:e,item:l?.levelDiscount});return{commonCoupon:{enable:r.showCommonCoupon&&!!n,config:n??{}},freeGift:{enable:!!o&&!!o?.giftList?.length,config:o},bundle:{enable:!!t&&!!t?.bundleList?.length&&Math.max(...t?.bundleList?.map(s=>s.savings??0)??[])>0,config:t},memberDiscount:{enable:r.showMemberDiscount,config:{amount:h,description:f?.labels?.[0]}},creditsRedemption:{enable:!!c&&c>0,config:{amount:c,label:l?.creditsRedemptionLabel}},paidShipping:{enable:C,config:{}},fullGift:{enable:!!(a&&!D.includes(e.sku)),config:a??{}},levelDiscount:{enable:!!I,config:l?.levelDiscount??{}}}};
1
+ "use strict";var a=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var R=(e,o)=>{for(var n in o)a(e,n,{get:o[n],enumerable:!0})},x=(e,o,n,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of I(o))!y.call(e,t)&&t!==n&&a(e,t,{get:()=>o[t],enumerable:!(i=F(o,t))||i.enumerable});return e};var S=e=>x(a({},"__esModule",{value:!0}),e);var k={};R(k,{useBenefits:()=>w});module.exports=S(k);var p=require("../BizProductProvider.js"),d=require("../utils/helper.js"),g=require("./useDiscountEnable.js"),b=require("../../AiuiProvider/index.js");const w=({variant:e})=>{const{coupon:o,product:n,bundle:i,freeGift:t,functionFreeGift:l,memberFunctionResult:r,creditsRedemption:B,profile:P}=(0,p.useBizProductContext)(),{amount:s}=B??{},{trackingData:c}=(0,b.useAiuiContext)(),C=Math.max(r?.withCouponMemberTotalSave??0,r?.withoutCouponMaxMemberTotalSave??0),m=(0,g.useDiscountEnable)({profile:P,variant:e,memberFunctionResult:r,coupon:o}),h=!!(c?.paidShipping&&e.requiresShipping&&!e?.metafields?.global?.presell&&!e?.metafields?.global?.HideShipping),u=c?.freeGift,G=u?.excludeProducts?.map(f=>typeof f=="object"&&"sku"in f?f.sku:f)??[],D=c?.levelDiscount&&(0,d.checkItemAvailableForProduct)({product:n,variant:e,item:c?.levelDiscount});return{commonCoupon:{enable:m.showCommonCoupon&&!!o,config:o??{}},freeGift:{enable:!!t&&!!t?.giftList?.length,config:t},functionFreeGift:{enable:!!l&&!!l?.giftItems?.length,config:l},bundle:{enable:!!i&&!!i?.bundleOptions?.length,config:i},memberDiscount:{enable:m.showMemberDiscount,config:{amount:C,description:r?.labels?.[0]}},creditsRedemption:{enable:!!s&&s>0,config:{amount:s,label:c?.creditsRedemptionLabel}},paidShipping:{enable:h,config:{}},fullGift:{enable:!!(u&&!G.includes(e.sku)),config:u??{}},levelDiscount:{enable:!!D,config:c?.levelDiscount??{}}}};
2
2
  //# sourceMappingURL=useBenefits.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/biz-components/Listing/hooks/useBenefits.ts"],
4
- "sourcesContent": ["import { useBizProductContext } from '../BizProductProvider.js'\nimport type { ProductVariant, FreeGift, Bundle } from '../types/product'\nimport { checkItemAvailableForProduct } from '../utils/helper.js'\nimport { useDiscountEnable } from './useDiscountEnable.js'\n\nimport { useAiuiContext } from '../../AiuiProvider/index.js'\n\ninterface BenefitsParams {\n variant: ProductVariant\n}\n\ninterface BenefitItemConfig<T extends Record<string, any> = Record<string, any>> {\n enable: boolean\n config?: T // \u539F\u59CB\u914D\u7F6E\n}\n\ninterface BenefitsResult {\n /**\n * \u901A\u7528\u4F18\u60E0\u5238\n */\n commonCoupon?: BenefitItemConfig\n /**\n * \u4E70\u8D60\n */\n freeGift: BenefitItemConfig<FreeGift>\n /**\n * \u6346\u7ED1\u6298\u6263\n */\n bundle: BenefitItemConfig<Bundle>\n /**\n * \u4F1A\u5458\u4EF7\n */\n memberDiscount: BenefitItemConfig\n /**\n * \u79EF\u5206\u62B5\u73B0\n */\n creditsRedemption: BenefitItemConfig\n /**\n * \u9AD8\u6807\u7269\u6D41\n */\n paidShipping: BenefitItemConfig\n\n /**\n * \u6EE1\u8D60\n */\n fullGift: BenefitItemConfig\n\n /**\n * \u6EE1\u51CF\u6298\u6263\n */\n levelDiscount: BenefitItemConfig\n}\n\n/**\n * \u5546\u54C1\u6743\u76CA\n * \u83B7\u53D6\u5F53\u524Dsku \u6240\u6709\u7684\u6743\u76CA\n * \u5305\u62EC \u901A\u7528\u4F18\u60E0\u5238\uFF0C\u4F1A\u5458\u4EF7\uFF0C\u6EE1\u51CF\uFF0C\u6346\u7ED1\u6298\u6263\uFF0C\u4E70\u8D60 \uFF0C\u6EE1\u8D60 \uFF0C\u79EF\u5206\u62B5\u73B0\n * @returns\n */\nexport const useBenefits = ({ variant }: BenefitsParams): BenefitsResult => {\n const { coupon, product, bundle, freeGift, memberFunctionResult, creditsRedemption, profile } = useBizProductContext()\n\n const { amount: creditsRedemptionAmount } = creditsRedemption ?? {}\n\n const { trackingData } = useAiuiContext()\n\n const total = Math.max(\n memberFunctionResult?.withCouponMemberTotalSave ?? 0,\n memberFunctionResult?.withoutCouponMaxMemberTotalSave ?? 0\n )\n\n const discountEnable = useDiscountEnable({ profile, variant, memberFunctionResult, coupon })\n\n // \u9AD8\u6807\u7269\u6D41\n const showPaidShipping = Boolean(\n trackingData?.paidShipping &&\n variant.requiresShipping &&\n !variant?.metafields?.global?.presell &&\n !variant?.metafields?.global?.HideShipping\n )\n\n // \u811A\u672C\u6EE1\u8D60\n const fullGift = trackingData?.freeGift\n const excludeProducts =\n fullGift?.excludeProducts?.map((item: any) => (typeof item === 'object' && 'sku' in item ? item.sku : item)) ?? []\n\n const showLevelDiscount =\n trackingData?.levelDiscount && checkItemAvailableForProduct({ product, variant, item: trackingData?.levelDiscount })\n\n return {\n commonCoupon: {\n enable: discountEnable.showCommonCoupon && Boolean(coupon),\n config: coupon ?? {},\n },\n freeGift: {\n enable: Boolean(freeGift) && !!freeGift?.giftList?.length,\n config: freeGift,\n },\n bundle: {\n enable:\n Boolean(bundle) &&\n !!bundle?.bundleList?.length &&\n Math.max(...(bundle?.bundleList?.map(item => item.savings ?? 0) ?? [])) > 0, // \u6709\u4F18\u60E0\u624D\u5C55\u793A\n config: bundle,\n },\n memberDiscount: {\n enable: discountEnable.showMemberDiscount,\n // enable: total > 0,\n config: {\n amount: total,\n description: memberFunctionResult?.labels?.[0],\n },\n },\n creditsRedemption: {\n enable: Boolean(creditsRedemptionAmount) && creditsRedemptionAmount! > 0,\n config: { amount: creditsRedemptionAmount, label: trackingData?.creditsRedemptionLabel },\n },\n paidShipping: {\n enable: showPaidShipping,\n config: {},\n },\n fullGift: {\n enable: Boolean(fullGift && !excludeProducts.includes(variant.sku)),\n config: fullGift ?? {},\n },\n levelDiscount: {\n enable: Boolean(showLevelDiscount),\n config: trackingData?.levelDiscount ?? {},\n },\n }\n}\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAqC,oCAErCC,EAA6C,8BAC7CC,EAAkC,kCAElCC,EAA+B,uCAsDxB,MAAML,EAAc,CAAC,CAAE,QAAAM,CAAQ,IAAsC,CAC1E,KAAM,CAAE,OAAAC,EAAQ,QAAAC,EAAS,OAAAC,EAAQ,SAAAC,EAAU,qBAAAC,EAAsB,kBAAAC,EAAmB,QAAAC,CAAQ,KAAI,wBAAqB,EAE/G,CAAE,OAAQC,CAAwB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,OAAQa,GAAY,CAAC,CACvB,EACA,cAAe,CACb,OAAQ,EAAQG,EAChB,OAAQP,GAAc,eAAiB,CAAC,CAC1C,CACF,CACF",
6
- "names": ["useBenefits_exports", "__export", "useBenefits", "__toCommonJS", "import_BizProductProvider", "import_helper", "import_useDiscountEnable", "import_AiuiProvider", "variant", "coupon", "product", "bundle", "freeGift", "memberFunctionResult", "creditsRedemption", "profile", "creditsRedemptionAmount", "trackingData", "total", "discountEnable", "showPaidShipping", "fullGift", "excludeProducts", "item", "showLevelDiscount"]
4
+ "sourcesContent": ["import { useBizProductContext } from '../BizProductProvider.js'\nimport type { ProductVariant, FreeGift } from '../types/product'\nimport { checkItemAvailableForProduct } from '../utils/helper.js'\nimport { useDiscountEnable } from './useDiscountEnable.js'\n\nimport { useAiuiContext } from '../../AiuiProvider/index.js'\nimport type { ProductFunctionFreeGiftProps } from '../components/ProductCard/ProductDetail/ProductFunctionFreeGift/types.js'\nimport type { ProductBundleProps } from '../components/ProductCard/ProductDetail/ProductBundle/types.js'\n\ninterface BenefitsParams {\n variant: ProductVariant\n}\n\ninterface BenefitItemConfig<T extends Record<string, any> = Record<string, any>> {\n enable: boolean\n config?: T // \u539F\u59CB\u914D\u7F6E\n}\n\ninterface BenefitsResult {\n /**\n * \u901A\u7528\u4F18\u60E0\u5238\n */\n commonCoupon?: BenefitItemConfig\n /**\n * \u4E70\u8D60\n */\n freeGift: BenefitItemConfig<FreeGift>\n /**\n * function\u4E70\u8D60\n */\n functionFreeGift: BenefitItemConfig<ProductFunctionFreeGiftProps>\n /**\n * \u6346\u7ED1\u6298\u6263\n */\n bundle: BenefitItemConfig<ProductBundleProps>\n /**\n * \u4F1A\u5458\u4EF7\n */\n memberDiscount: BenefitItemConfig\n /**\n * \u79EF\u5206\u62B5\u73B0\n */\n creditsRedemption: BenefitItemConfig\n /**\n * \u9AD8\u6807\u7269\u6D41\n */\n paidShipping: BenefitItemConfig\n\n /**\n * \u6EE1\u8D60\n */\n fullGift: BenefitItemConfig\n\n /**\n * \u6EE1\u51CF\u6298\u6263\n */\n levelDiscount: BenefitItemConfig\n}\n\n/**\n * \u5546\u54C1\u6743\u76CA\n * \u83B7\u53D6\u5F53\u524Dsku \u6240\u6709\u7684\u6743\u76CA\n * \u5305\u62EC \u901A\u7528\u4F18\u60E0\u5238\uFF0C\u4F1A\u5458\u4EF7\uFF0C\u6EE1\u51CF\uFF0C\u6346\u7ED1\u6298\u6263\uFF0C\u4E70\u8D60 \uFF0C\u6EE1\u8D60 \uFF0C\u79EF\u5206\u62B5\u73B0\n * @returns\n */\nexport const useBenefits = ({ variant }: BenefitsParams): BenefitsResult => {\n const { coupon, product, bundle, freeGift, functionFreeGift, memberFunctionResult, creditsRedemption, profile } = useBizProductContext()\n\n const { amount: creditsRedemptionAmount } = creditsRedemption ?? {}\n\n const { trackingData } = useAiuiContext()\n\n const total = Math.max(\n memberFunctionResult?.withCouponMemberTotalSave ?? 0,\n memberFunctionResult?.withoutCouponMaxMemberTotalSave ?? 0\n )\n\n const discountEnable = useDiscountEnable({ profile, variant, memberFunctionResult, coupon })\n\n // \u9AD8\u6807\u7269\u6D41\n const showPaidShipping = Boolean(\n trackingData?.paidShipping &&\n variant.requiresShipping &&\n !variant?.metafields?.global?.presell &&\n !variant?.metafields?.global?.HideShipping\n )\n\n // \u811A\u672C\u6EE1\u8D60\n const fullGift = trackingData?.freeGift\n const excludeProducts =\n fullGift?.excludeProducts?.map((item: any) => (typeof item === 'object' && 'sku' in item ? item.sku : item)) ?? []\n\n const showLevelDiscount =\n trackingData?.levelDiscount && checkItemAvailableForProduct({ product, variant, item: trackingData?.levelDiscount })\n\n return {\n commonCoupon: {\n enable: discountEnable.showCommonCoupon && Boolean(coupon),\n config: coupon ?? {},\n },\n freeGift: {\n enable: Boolean(freeGift) && !!freeGift?.giftList?.length,\n config: freeGift,\n },\n functionFreeGift: {\n enable: Boolean(functionFreeGift) && !!functionFreeGift?.giftItems?.length,\n config: functionFreeGift,\n },\n bundle: {\n enable: Boolean(bundle) && !!bundle?.bundleOptions?.length,\n // Math.max(...(bundle?.bundleOptions?.map(item => item.savings ?? 0) ?? [])) > 0, // \u6709\u4F18\u60E0\u624D\u5C55\u793A\n config: bundle,\n },\n memberDiscount: {\n enable: discountEnable.showMemberDiscount,\n // enable: total > 0,\n config: {\n amount: total,\n description: memberFunctionResult?.labels?.[0],\n },\n },\n creditsRedemption: {\n enable: Boolean(creditsRedemptionAmount) && creditsRedemptionAmount! > 0,\n config: { amount: creditsRedemptionAmount, label: trackingData?.creditsRedemptionLabel },\n },\n paidShipping: {\n enable: showPaidShipping,\n config: {},\n },\n fullGift: {\n enable: Boolean(fullGift && !excludeProducts.includes(variant.sku)),\n config: fullGift ?? {},\n },\n levelDiscount: {\n enable: Boolean(showLevelDiscount),\n config: trackingData?.levelDiscount ?? {},\n },\n }\n}\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAqC,oCAErCC,EAA6C,8BAC7CC,EAAkC,kCAElCC,EAA+B,uCA4DxB,MAAML,EAAc,CAAC,CAAE,QAAAM,CAAQ,IAAsC,CAC1E,KAAM,CAAE,OAAAC,EAAQ,QAAAC,EAAS,OAAAC,EAAQ,SAAAC,EAAU,iBAAAC,EAAkB,qBAAAC,EAAsB,kBAAAC,EAAmB,QAAAC,CAAQ,KAAI,wBAAqB,EAEjI,CAAE,OAAQC,CAAwB,EAAIF,GAAqB,CAAC,EAE5D,CAAE,aAAAG,CAAa,KAAI,kBAAe,EAElCC,EAAQ,KAAK,IACjBL,GAAsB,2BAA6B,EACnDA,GAAsB,iCAAmC,CAC3D,EAEMM,KAAiB,qBAAkB,CAAE,QAAAJ,EAAS,QAAAR,EAAS,qBAAAM,EAAsB,OAAAL,CAAO,CAAC,EAGrFY,EAAmB,GACvBH,GAAc,cACdV,EAAQ,kBACR,CAACA,GAAS,YAAY,QAAQ,SAC9B,CAACA,GAAS,YAAY,QAAQ,cAI1Bc,EAAWJ,GAAc,SACzBK,EACJD,GAAU,iBAAiB,IAAKE,GAAe,OAAOA,GAAS,UAAY,QAASA,EAAOA,EAAK,IAAMA,CAAK,GAAK,CAAC,EAE7GC,EACJP,GAAc,kBAAiB,gCAA6B,CAAE,QAAAR,EAAS,QAAAF,EAAS,KAAMU,GAAc,aAAc,CAAC,EAErH,MAAO,CACL,aAAc,CACZ,OAAQE,EAAe,kBAAoB,EAAQX,EACnD,OAAQA,GAAU,CAAC,CACrB,EACA,SAAU,CACR,OAAQ,EAAQG,GAAa,CAAC,CAACA,GAAU,UAAU,OACnD,OAAQA,CACV,EACA,iBAAkB,CAChB,OAAQ,EAAQC,GAAqB,CAAC,CAACA,GAAkB,WAAW,OACpE,OAAQA,CACV,EACA,OAAQ,CACN,OAAQ,EAAQF,GAAW,CAAC,CAACA,GAAQ,eAAe,OAEpD,OAAQA,CACV,EACA,eAAgB,CACd,OAAQS,EAAe,mBAEvB,OAAQ,CACN,OAAQD,EACR,YAAaL,GAAsB,SAAS,CAAC,CAC/C,CACF,EACA,kBAAmB,CACjB,OAAQ,EAAQG,GAA4BA,EAA2B,EACvE,OAAQ,CAAE,OAAQA,EAAyB,MAAOC,GAAc,sBAAuB,CACzF,EACA,aAAc,CACZ,OAAQG,EACR,OAAQ,CAAC,CACX,EACA,SAAU,CACR,OAAQ,GAAQC,GAAY,CAACC,EAAgB,SAASf,EAAQ,GAAG,GACjE,OAAQc,GAAY,CAAC,CACvB,EACA,cAAe,CACb,OAAQ,EAAQG,EAChB,OAAQP,GAAc,eAAiB,CAAC,CAC1C,CACF,CACF",
6
+ "names": ["useBenefits_exports", "__export", "useBenefits", "__toCommonJS", "import_BizProductProvider", "import_helper", "import_useDiscountEnable", "import_AiuiProvider", "variant", "coupon", "product", "bundle", "freeGift", "functionFreeGift", "memberFunctionResult", "creditsRedemption", "profile", "creditsRedemptionAmount", "trackingData", "total", "discountEnable", "showPaidShipping", "fullGift", "excludeProducts", "item", "showLevelDiscount"]
7
7
  }
@@ -118,24 +118,3 @@ export type FreeGift = {
118
118
  showCoupon: boolean;
119
119
  [key: string]: any;
120
120
  };
121
- export type BundleListItem = {
122
- id: string;
123
- price: number;
124
- comparePrice: number;
125
- savings: number;
126
- variants: {
127
- price: number;
128
- quantity: number;
129
- label: string;
130
- variant: ProductVariant;
131
- }[];
132
- };
133
- export type Bundle = {
134
- title: string;
135
- soldOutLabel: string;
136
- youSaveText: string;
137
- showCoupon: boolean;
138
- bundleList: BundleListItem[];
139
- showAtListing: boolean;
140
- [key: string]: any;
141
- };
@@ -1,2 +1,2 @@
1
- "use strict";var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var p=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of a(t))!u.call(e,r)&&r!==n&&o(e,r,{get:()=>t[r],enumerable:!(i=s(t,r))||i.enumerable});return e};var d=e=>p(o({},"__esModule",{value:!0}),e);var c={};module.exports=d(c);var y=require("../const.js");
1
+ "use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of a(t))!p.call(e,r)&&r!==n&&i(e,r,{get:()=>t[r],enumerable:!(o=s(t,r))||o.enumerable});return e};var d=e=>u(i({},"__esModule",{value:!0}),e);var c={};module.exports=d(c);var l=require("../const.js");
2
2
  //# sourceMappingURL=product.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/biz-components/Listing/types/product.ts"],
4
- "sourcesContent": ["import type {\n CurrencyCode,\n Image,\n Media,\n Product as ShopifyProduct,\n ProductVariant as ShopifyProductVariant,\n} from './graphql'\nimport { DiscountType } from '../const.js'\n\nexport type ProductPrice = {\n amount: number\n currencyCode: CurrencyCode\n}\n\nexport type ProductOption = {\n __typename?: 'MultipleChoiceOption'\n id: string\n name: string\n values: ProductOptionValues[]\n}\n\nexport type ProductOptionValues = {\n label: string\n hexColors?: string[]\n}\n\nexport type ProductVariant = {\n id: string | number\n options: ProductOption[]\n sku: string\n metafields?: Record<string, any>\n price: ProductPrice\n product: Product\n coupons: VariantCoupon[]\n weight?: number\n payload?: any\n} & Omit<ShopifyProductVariant, 'options' | 'metafields' | 'price'>\n\nexport type Product = {\n path?: string\n images: Image[]\n media: ProductMedia[]\n variants: ProductVariant[]\n price: ProductPrice\n options: ProductOption[]\n metafields?: { [key: string]: any }\n slug: string\n payload?: any\n} & Omit<ShopifyProduct, 'metafields' | 'images' | 'variants' | 'price' | 'options' | 'media'>\n\nexport type GetProductBody = {\n handles: string\n locale?: string\n}\n\nexport type ProductTypes = {\n product: Product\n getBody: GetProductBody\n}\n\nexport type GetAllProductPathsOperation<T extends ProductTypes = ProductTypes> = {\n data: { products: Pick<T['product'], 'path'>[] }\n variables: { first?: number }\n}\n\nexport type GetAllProductsOperation<T extends ProductTypes = ProductTypes> = {\n data: { products: T['product'][] }\n variables: {\n relevance?: 'featured' | 'best_selling' | 'newest'\n ids?: string[]\n first?: number\n }\n}\n\nexport type GetProductOperation<T extends ProductTypes = ProductTypes> = {\n data: { product?: T['product'] }\n variables: { path: string; slug?: never } | { path?: never; slug: string }\n}\n\nexport type Options = Record<string, string>\n\nexport type ProductMedia = Media & {\n sources?: {\n url: string\n altText: string\n }[]\n image?: {\n url: string\n altText: string\n }\n}\n\nexport type VariantCoupon = {\n title: string\n starts_at: string // ISO 8601 \u65E5\u671F\u5B57\u7B26\u4E32\n ends_at: string | null // ISO 8601 \u65E5\u671F\u5B57\u7B26\u4E32\u6216 null\n variant_shopify_id: number\n value_type: DiscountType\n value: string // \u8D1F\u6570\u7684\u767E\u5206\u6BD4\u503C\n currency: string\n fixed_value: string // \u56FA\u5B9A\u503C\n value_style: string // \u5E26\u6709\u8D27\u5E01\u7B26\u53F7\u7684\u503C\n variant_price4wscode: number\n discount_type: string // \u5047\u8BBE discount_type \u662F\u4E00\u4E2A\u5B57\u7B26\u4E32\n amazon_deal: boolean\n cdi_id: number\n cdi_updated_at: string // ISO 8601 \u65E5\u671F\u5B57\u7B26\u4E32\n}\n\nexport type ScriptDiscount = {\n type: DiscountType\n excludeSkus: string[]\n discount: number\n}\n\nexport type FreeGift = {\n title: string\n note: string\n soldOutLabel: string\n freeLabel: string\n giftList: ProductVariant[]\n count: number\n showCoupon: boolean\n [key: string]: any\n}\n\nexport type BundleListItem = {\n id: string\n price: number\n comparePrice: number\n savings: number\n variants: {\n price: number\n quantity: number\n label: string\n variant: ProductVariant\n }[]\n}\n\nexport type Bundle = {\n title: string\n soldOutLabel: string\n youSaveText: string\n showCoupon: boolean\n bundleList: BundleListItem[]\n showAtListing: boolean\n [key: string]: any\n}\n"],
4
+ "sourcesContent": ["import type {\n CurrencyCode,\n Image,\n Media,\n Product as ShopifyProduct,\n ProductVariant as ShopifyProductVariant,\n} from './graphql'\nimport { DiscountType } from '../const.js'\n\nexport type ProductPrice = {\n amount: number\n currencyCode: CurrencyCode\n}\n\nexport type ProductOption = {\n __typename?: 'MultipleChoiceOption'\n id: string\n name: string\n values: ProductOptionValues[]\n}\n\nexport type ProductOptionValues = {\n label: string\n hexColors?: string[]\n}\n\nexport type ProductVariant = {\n id: string | number\n options: ProductOption[]\n sku: string\n metafields?: Record<string, any>\n price: ProductPrice\n product: Product\n coupons: VariantCoupon[]\n weight?: number\n payload?: any\n} & Omit<ShopifyProductVariant, 'options' | 'metafields' | 'price'>\n\nexport type Product = {\n path?: string\n images: Image[]\n media: ProductMedia[]\n variants: ProductVariant[]\n price: ProductPrice\n options: ProductOption[]\n metafields?: { [key: string]: any }\n slug: string\n payload?: any\n} & Omit<ShopifyProduct, 'metafields' | 'images' | 'variants' | 'price' | 'options' | 'media'>\n\nexport type GetProductBody = {\n handles: string\n locale?: string\n}\n\nexport type ProductTypes = {\n product: Product\n getBody: GetProductBody\n}\n\nexport type GetAllProductPathsOperation<T extends ProductTypes = ProductTypes> = {\n data: { products: Pick<T['product'], 'path'>[] }\n variables: { first?: number }\n}\n\nexport type GetAllProductsOperation<T extends ProductTypes = ProductTypes> = {\n data: { products: T['product'][] }\n variables: {\n relevance?: 'featured' | 'best_selling' | 'newest'\n ids?: string[]\n first?: number\n }\n}\n\nexport type GetProductOperation<T extends ProductTypes = ProductTypes> = {\n data: { product?: T['product'] }\n variables: { path: string; slug?: never } | { path?: never; slug: string }\n}\n\nexport type Options = Record<string, string>\n\nexport type ProductMedia = Media & {\n sources?: {\n url: string\n altText: string\n }[]\n image?: {\n url: string\n altText: string\n }\n}\n\nexport type VariantCoupon = {\n title: string\n starts_at: string // ISO 8601 \u65E5\u671F\u5B57\u7B26\u4E32\n ends_at: string | null // ISO 8601 \u65E5\u671F\u5B57\u7B26\u4E32\u6216 null\n variant_shopify_id: number\n value_type: DiscountType\n value: string // \u8D1F\u6570\u7684\u767E\u5206\u6BD4\u503C\n currency: string\n fixed_value: string // \u56FA\u5B9A\u503C\n value_style: string // \u5E26\u6709\u8D27\u5E01\u7B26\u53F7\u7684\u503C\n variant_price4wscode: number\n discount_type: string // \u5047\u8BBE discount_type \u662F\u4E00\u4E2A\u5B57\u7B26\u4E32\n amazon_deal: boolean\n cdi_id: number\n cdi_updated_at: string // ISO 8601 \u65E5\u671F\u5B57\u7B26\u4E32\n}\n\nexport type ScriptDiscount = {\n type: DiscountType\n excludeSkus: string[]\n discount: number\n}\n\nexport type FreeGift = {\n title: string\n note: string\n soldOutLabel: string\n freeLabel: string\n giftList: ProductVariant[]\n count: number\n showCoupon: boolean\n [key: string]: any\n}\n\n// export type BundleListItem = {\n// id: string\n// price: number\n// comparePrice: number\n// savings: number\n// variants: {\n// price: number\n// quantity: number\n// label: string\n// variant: ProductVariant\n// }[]\n// }\n\n// export type Bundle = {\n// title: string\n// soldOutLabel: string\n// youSaveText: string\n// showCoupon: boolean\n// bundleList: BundleListItem[]\n// showAtListing: boolean\n// [key: string]: any\n// }\n"],
5
5
  "mappings": "+WAAA,IAAAA,EAAA,kBAAAC,EAAAD,GAOA,IAAAE,EAA6B",
6
6
  "names": ["product_exports", "__toCommonJS", "import_const"]
7
7
  }
@@ -48,19 +48,19 @@ export { default as BizProductProvider, useBizProductContext } from './Listing/B
48
48
  export { default as PurchaseBar } from './Listing/components/PurchaseBar/index.js';
49
49
  export { default as ProductActions } from './Listing/components/PurchaseBar/ProductActions/index.js';
50
50
  export type { ProductActionsProps } from './Listing/components/PurchaseBar/ProductActions/index.js';
51
- export { default as ProductCard } from './Listing/components/ProductCard/index.js';
52
51
  export { default as ProductBenefitsTabs } from './Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js';
53
52
  export { default as ProductBenefits } from './Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js';
54
53
  export { default as ProductHighlight } from './Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js';
55
54
  export { default as ProductFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js';
56
- export { default as ProductExchangePurchase } from './Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js';
55
+ export { default as ProductFunctionFreeGift } from './Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js';
56
+ export type { ProductFunctionFreeGiftProps, FunctionFreeGiftItem, } from './Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift';
57
57
  export { default as ProductOptions } from './Listing/components/ProductCard/ProductDetail/ProductOptions/index.js';
58
58
  export { default as ProductBundle } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js';
59
+ export type { ProductBundleProps, BundleOption, BundleVariantItem, } from './Listing/components/ProductCard/ProductDetail/ProductBundle/index.js';
59
60
  export { default as ProductCoupon } from './Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js';
60
61
  export { default as ProductBanner } from './Listing/components/ProductCard/ProductDetail/ProductBanner/index.js';
61
62
  export { default as ProductGridBox } from './Listing/components/ProductCard/ProductGridBox.js';
62
63
  export { default as ProductGallery } from './Listing/components/ProductCard/ProductGallery/index.js';
63
- export { default as ProductDetail } from './Listing/components/ProductCard/ProductDetail/index.js';
64
64
  export { default as ProductSummary } from './Listing/components/ProductCard/ProductSummary/index.js';
65
65
  export { default as BenefitsTab } from './Listing/components/ProductCard/ProductDetail/BenefitsTab.js';
66
66
  export { default as PaidShipping } from './Listing/components/PaidShipping/index.js';
@@ -1,2 +1,2 @@
1
- "use strict";var mt=Object.create;var p=Object.defineProperty;var nt=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var yt=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var St=(t,r)=>{for(var o in r)p(t,o,{get:r[o],enumerable:!0})},n=(t,r,o,m)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of xt(r))!ht.call(t,i)&&i!==o&&p(t,i,{get:()=>r[i],enumerable:!(m=nt(r,i))||m.enumerable});return t};var e=(t,r,o)=>(o=t!=null?mt(yt(t)):{},n(r||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),Pt=t=>n(p({},"__esModule",{value:!0}),t);var gt={};St(gt,{AccordionCards:()=>j.default,ActiveShelf:()=>Qe.default,ActivityMechanism:()=>S.default,ActivitySchedule:()=>x.default,AiuiProvider:()=>H.default,AnchorNavigation:()=>_e.default,AplusDesc:()=>ge.default,BenefitsTab:()=>me.default,BizProductProvider:()=>f.default,BrandCardLink:()=>Ie.default,BrandEquity:()=>P.default,BuyOneGetOneShelf:()=>Je.default,CartActionButtons:()=>xe.default,Category:()=>I.default,CreativeModule:()=>U.default,CreditsProductCard:()=>d.CreditsProductCard,CreditsShelf:()=>d.default,DownLoad:()=>Be.default,Evaluate:()=>T.default,EventSchedule:()=>Ue.default,Faq:()=>V.default,FeatureCards:()=>Ge.default,FeatureShowcase:()=>Ee.default,FeaturedBlogPosts:()=>ke.default,Features:()=>Ce.default,FootCharger:()=>Te.default,FooterNavigation:()=>N.default,GiftBox:()=>Me.default,GiftShelf:()=>y.default,GiftTierShelf:()=>h.default,Graphic:()=>D.default,GraphicAttractionBlock:()=>E.default,GraphicMore:()=>Pe.default,GraphicOverlay:()=>Y.default,HeaderNavigation:()=>W.default,HeroBanner:()=>b.default,IPC_SEARCH_PAGE:()=>s.IPC_SEARCH_PAGE,IPRedirect:()=>Mt,ImageOverlayShelf:()=>tt.default,ImageTextFeature:()=>Ae.default,ImageTextOverlay:()=>rt.default,ImageWithText:()=>Le.default,Ksp:()=>Fe.default,Marquee:()=>k.default,MarqueeImageContent:()=>a.MarqueeImageContent,MarqueeItem:()=>a.MarqueeItem,MarqueeReview:()=>L.default,MarqueeTextContent:()=>a.MarqueeTextContent,MediaEndorsement:()=>$e.default,MediaPlayerBase:()=>F.default,MediaPlayerMulti:()=>G.default,MediaPlayerSticky:()=>A.default,MediaSceneSwitcher:()=>qe.default,MediaSceneSwitcherV2:()=>Re.default,MediaShelf:()=>Xe.default,MediaTextOverlay:()=>et.default,MemberEquity:()=>C.default,MiniCart:()=>ot.default,MiniCartCircleProgress:()=>at.default,MiniCartDialog:()=>l.default,MiniCartDialogComponent:()=>l.MiniCartDialog,ModalCoupon:()=>ct.default,ModalRegisterSubscribe:()=>ft.default,ModalSmsSubscribe:()=>ut.default,ModalSubscribeConfirm:()=>dt.default,ModalVerify:()=>lt.default,MultiLayoutGraphicBlock:()=>O.default,NotifyMeDialog:()=>ye.NotifyMeDialog,PAYLOAD_COMPONENT_MAP:()=>Ct,PaidShipping:()=>ne.default,ProductActions:()=>Z.default,ProductBanner:()=>fe.default,ProductBenefits:()=>te.default,ProductBenefitsTabs:()=>ee.default,ProductBundle:()=>pe.default,ProductCard:()=>$.default,ProductCompare:()=>De.default,ProductCoupon:()=>se.default,ProductDetail:()=>ue.default,ProductExchangePurchase:()=>ae.default,ProductFreeGift:()=>oe.default,ProductGallery:()=>ce.default,ProductGridBox:()=>de.default,ProductHero:()=>We.default,ProductHighlight:()=>re.default,ProductLottery:()=>je.default,ProductNav:()=>Ke.default,ProductOptions:()=>ie.default,ProductPaidShipping:()=>Se.default,ProductServiceBenefits:()=>he.default,ProductSummary:()=>le.default,PromotionalBar:()=>ze.default,PurchaseBar:()=>X.default,SceneProductCard:()=>c.SceneProductCard,SceneShelf:()=>c.default,SceneShelfV2:()=>u.default,SceneShelfV2ProductCard:()=>u.SceneShelfV2ProductCard,SceneShelfV3:()=>Ze.default,SearchPage:()=>q.default,SearchPageTabType:()=>s.SearchPageTabType,SecondaryBanner:()=>Ye.default,SelectStore:()=>ve.default,ShelfDisplay:()=>B.default,Slogan:()=>g.default,Spacer:()=>v.default,Specs:()=>J.default,SpecsComparison:()=>Ne.default,SwiperBox:()=>_.default,TabGroup:()=>Q.default,TabWithImage:()=>Oe.default,Tabs:()=>K.default,TabsWithMedia:()=>Ve.default,ThreeDCarousel:()=>He.default,Title:()=>M.default,VideoFeature:()=>we.default,VideoModal:()=>z.VideoModal,WebPushPopup:()=>it.default,WheelLottery:()=>be.default,WhyChoose:()=>w.default,useAiuiContext:()=>st.useAiuiContext,useBizProductContext:()=>f.useBizProductContext,useEmarsysWebPush:()=>pt.useEmarsysWebPush,withLayout:()=>R.withLayout});module.exports=Pt(gt);var x=e(require("./ActivitySchedule/index.js")),y=e(require("./GiftShelf/index.js")),h=e(require("./GiftTierShelf/index.js")),S=e(require("./ActivityMechanism/index.js")),P=e(require("./BrandEquity/index.js")),C=e(require("./MemberEquity/index.js")),g=e(require("./Slogan/index.js")),M=e(require("./Title/index.js")),v=e(require("./Spacer/index.js")),B=e(require("./ShelfDisplay/index.js")),T=e(require("./Evaluate/index.js")),I=e(require("./Category/index.js")),b=e(require("./HeroBanner/index.js")),j=e(require("./AccordionCards/index.js")),D=e(require("./Graphic/index.js")),F=e(require("./MediaPlayerBase/index.js")),A=e(require("./MediaPlayerSticky/index.js")),G=e(require("./MediaPlayerMulti/index.js")),k=e(require("./Marquee/index.js")),L=e(require("./MarqueeReview/index.js")),w=e(require("./WhyChoose/index.js")),V=e(require("./Faq/index.js")),a=require("./Marquee/index.js"),O=e(require("./MultiLayoutGraphicBlock/index.js")),E=e(require("./GraphicAttractionBlock/index.js")),W=e(require("./HeaderNavigation/index.js")),N=e(require("./FooterNavigation/index.js")),q=e(require("./SearchPage/index.js")),s=require("./SearchPage/types.js"),R=require("../shared/Styles.js"),H=e(require("./AiuiProvider/index.js")),K=e(require("./Tabs/index.js")),_=e(require("./SwiperBox/index.js")),z=require("./VideoModal/index.js"),U=e(require("./CreativeModule/index.js")),Y=e(require("./GraphicOverlay/index.js")),J=e(require("./Specs/index.js")),Q=e(require("./TabsGroup/index.js")),f=e(require("./Listing/BizProductProvider.js")),X=e(require("./Listing/components/PurchaseBar/index.js")),Z=e(require("./Listing/components/PurchaseBar/ProductActions/index.js")),$=e(require("./Listing/components/ProductCard/index.js")),ee=e(require("./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js")),te=e(require("./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js")),re=e(require("./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js")),oe=e(require("./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js")),ae=e(require("./Listing/components/ProductCard/ProductDetail/ProductExchangePurchase/index.js")),ie=e(require("./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js")),pe=e(require("./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js")),se=e(require("./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js")),fe=e(require("./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js")),de=e(require("./Listing/components/ProductCard/ProductGridBox.js")),ce=e(require("./Listing/components/ProductCard/ProductGallery/index.js")),ue=e(require("./Listing/components/ProductCard/ProductDetail/index.js")),le=e(require("./Listing/components/ProductCard/ProductSummary/index.js")),me=e(require("./Listing/components/ProductCard/ProductDetail/BenefitsTab.js")),ne=e(require("./Listing/components/PaidShipping/index.js")),xe=e(require("./Listing/components/CartActionButtons/index.js")),ye=require("./NotifyMeDialog/index.js"),he=e(require("./Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js")),Se=e(require("./Listing/components/ProductCard/ProductPaidShipping/index.js")),Pe=e(require("./GraphicMore/index.js")),Ce=e(require("./Features/index.js")),ge=e(require("./AplusDesc/index.js")),Me=e(require("./GiftBox/index.js")),ve=e(require("./SelectStore/index.js")),Be=e(require("./DownLoad/index.js")),Te=e(require("./FootCharger/index.js")),Ie=e(require("./BrandCardLink/index.js")),Mt=e(require("./IPRedirect/index.js")),be=e(require("./WheelLottery/index.js")),je=e(require("./ProductLottery/index.js")),De=e(require("./ProductCompare/index.js")),Fe=e(require("./Ksp/index.js")),Ae=e(require("./ImageTextFeature/index.js")),Ge=e(require("./FeatureCards/index.js")),ke=e(require("./FeaturedBlogPosts/index.js")),Le=e(require("./ImageWithText/index.js")),we=e(require("./VideoFeature/index.js")),Ve=e(require("./TabsWithMedia/index.js")),Oe=e(require("./TabWithImage/index.js")),Ee=e(require("./FeatureShowcase/index.js")),We=e(require("./ProductHero/index.js")),Ne=e(require("./SpecsComparison/index.js")),qe=e(require("./MediaSceneSwitcher/index.js")),Re=e(require("./MediaSceneSwitcherV2/index.js")),He=e(require("./ThreeDCarousel/index.js")),Ke=e(require("./ProductNav/index.js")),_e=e(require("./AnchorNavigation/index.js")),ze=e(require("./PromotionalBar/index.js")),Ue=e(require("./EventSchedule/index.js")),Ye=e(require("./SecondaryBanner/index.js")),Je=e(require("./BuyOneGetOneShelf/index.js")),Qe=e(require("./ActiveShelf/index.js")),Xe=e(require("./MediaShelf/index.js")),d=e(require("./CreditsShelf/index.js")),c=e(require("./SceneShelf/index.js")),u=e(require("./SceneShelfV2/index.js")),Ze=e(require("./SceneShelfV3/index.js")),$e=e(require("./MediaEndorsement/index.js")),et=e(require("./MediaTextOverlay/index.js")),tt=e(require("./ImageOverlayShelf/index.js")),rt=e(require("./ImageTextOverlay/index.js")),ot=e(require("./MiniCart/index.js")),at=e(require("./MiniCart/CircleProgress.js")),l=e(require("./MiniCart/MiniCartDialog.js")),it=e(require("./WebPushPopup/index.js")),pt=require("../hooks/useEmarsysWebPush.js"),st=require("./AiuiProvider/index.js"),ft=e(require("./ModalRegisterSubscribe/index.js")),dt=e(require("./ModalSubscribeConfirm/index.js")),ct=e(require("./ModalCoupon/index.js")),ut=e(require("./ModalSmsSubscribe/index.js")),lt=e(require("./ModalVerify/index.js"));const Ct={"ipc-accordioncards":"AccordionCards","ipc-aplusdesc":"AplusDesc","ipc-banner":"HeroBanner","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-collection-banner":"CollectionBanner","ipc-collection-shelves":"CollectionShelves","ipc-creativemodule":"CreativeModule","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-giftshelf":"GiftShelf","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-marquee":"Marquee","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-search-page-tabs":"SearchPageBlock","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-text-marquee":"TextMarquee","ipc-title":"Title","ipc-whychoose":"WhyChoose","ipc-product-nav":"ProductNav","ipc-brand-card-link":"BrandCardLink","ipc-ipredirect":"IPRedirect",ksp:"Ksp","ipc-secondary-banner":"SecondaryBanner","ipc-media-endorsement":"MediaEndorsement","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-featured-blog-posts":"FeaturedBlogPosts","ipc-media-text-overlay":"MediaTextOverlay",ProductCompare:"ProductCompare"};
1
+ "use strict";var ut=Object.create;var p=Object.defineProperty;var nt=Object.getOwnPropertyDescriptor;var lt=Object.getOwnPropertyNames;var mt=Object.getPrototypeOf,xt=Object.prototype.hasOwnProperty;var yt=(t,r)=>{for(var o in r)p(t,o,{get:r[o],enumerable:!0})},m=(t,r,o,l)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of lt(r))!xt.call(t,i)&&i!==o&&p(t,i,{get:()=>r[i],enumerable:!(l=nt(r,i))||l.enumerable});return t};var e=(t,r,o)=>(o=t!=null?ut(mt(t)):{},m(r||!t||!t.__esModule?p(o,"default",{value:t,enumerable:!0}):o,t)),Pt=t=>m(p({},"__esModule",{value:!0}),t);var ht={};yt(ht,{AccordionCards:()=>b.default,ActiveShelf:()=>Ye.default,ActivityMechanism:()=>S.default,ActivitySchedule:()=>x.default,AiuiProvider:()=>H.default,AnchorNavigation:()=>He.default,AplusDesc:()=>he.default,BenefitsTab:()=>ue.default,BizProductProvider:()=>f.default,BrandCardLink:()=>ve.default,BrandEquity:()=>h.default,BuyOneGetOneShelf:()=>Ue.default,CartActionButtons:()=>le.default,Category:()=>I.default,CreativeModule:()=>U.default,CreditsProductCard:()=>d.CreditsProductCard,CreditsShelf:()=>d.default,DownLoad:()=>Me.default,Evaluate:()=>T.default,EventSchedule:()=>_e.default,Faq:()=>w.default,FeatureCards:()=>De.default,FeatureShowcase:()=>we.default,FeaturedBlogPosts:()=>Ge.default,Features:()=>Se.default,FootCharger:()=>Be.default,FooterNavigation:()=>N.default,GiftBox:()=>Ce.default,GiftShelf:()=>y.default,GiftTierShelf:()=>P.default,Graphic:()=>F.default,GraphicAttractionBlock:()=>W.default,GraphicMore:()=>Pe.default,GraphicOverlay:()=>Y.default,HeaderNavigation:()=>E.default,HeroBanner:()=>j.default,IPC_SEARCH_PAGE:()=>s.IPC_SEARCH_PAGE,IPRedirect:()=>Ct,ImageOverlayShelf:()=>$e.default,ImageTextFeature:()=>Fe.default,ImageTextOverlay:()=>et.default,ImageWithText:()=>Ae.default,Ksp:()=>be.default,Marquee:()=>L.default,MarqueeImageContent:()=>a.MarqueeImageContent,MarqueeItem:()=>a.MarqueeItem,MarqueeReview:()=>k.default,MarqueeTextContent:()=>a.MarqueeTextContent,MediaEndorsement:()=>Xe.default,MediaPlayerBase:()=>D.default,MediaPlayerMulti:()=>A.default,MediaPlayerSticky:()=>G.default,MediaSceneSwitcher:()=>Ee.default,MediaSceneSwitcherV2:()=>Ne.default,MediaShelf:()=>Je.default,MediaTextOverlay:()=>Ze.default,MemberEquity:()=>C.default,MiniCart:()=>tt.default,MiniCartCircleProgress:()=>rt.default,MiniCartDialog:()=>n.default,MiniCartDialogComponent:()=>n.MiniCartDialog,ModalCoupon:()=>ft.default,ModalRegisterSubscribe:()=>pt.default,ModalSmsSubscribe:()=>dt.default,ModalSubscribeConfirm:()=>st.default,ModalVerify:()=>ct.default,MultiLayoutGraphicBlock:()=>O.default,NotifyMeDialog:()=>me.NotifyMeDialog,PAYLOAD_COMPONENT_MAP:()=>St,PaidShipping:()=>ne.default,ProductActions:()=>Z.default,ProductBanner:()=>se.default,ProductBenefits:()=>ee.default,ProductBenefitsTabs:()=>$.default,ProductBundle:()=>ie.default,ProductCompare:()=>je.default,ProductCoupon:()=>pe.default,ProductFreeGift:()=>re.default,ProductFunctionFreeGift:()=>oe.default,ProductGallery:()=>de.default,ProductGridBox:()=>fe.default,ProductHero:()=>Oe.default,ProductHighlight:()=>te.default,ProductLottery:()=>Ie.default,ProductNav:()=>Re.default,ProductOptions:()=>ae.default,ProductPaidShipping:()=>ye.default,ProductServiceBenefits:()=>xe.default,ProductSummary:()=>ce.default,PromotionalBar:()=>Ke.default,PurchaseBar:()=>X.default,SceneProductCard:()=>c.SceneProductCard,SceneShelf:()=>c.default,SceneShelfV2:()=>u.default,SceneShelfV2ProductCard:()=>u.SceneShelfV2ProductCard,SceneShelfV3:()=>Qe.default,SearchPage:()=>q.default,SearchPageTabType:()=>s.SearchPageTabType,SecondaryBanner:()=>ze.default,SelectStore:()=>ge.default,ShelfDisplay:()=>v.default,Slogan:()=>g.default,Spacer:()=>B.default,Specs:()=>J.default,SpecsComparison:()=>We.default,SwiperBox:()=>_.default,TabGroup:()=>Q.default,TabWithImage:()=>Ve.default,Tabs:()=>K.default,TabsWithMedia:()=>ke.default,ThreeDCarousel:()=>qe.default,Title:()=>M.default,VideoFeature:()=>Le.default,VideoModal:()=>z.VideoModal,WebPushPopup:()=>ot.default,WheelLottery:()=>Te.default,WhyChoose:()=>V.default,useAiuiContext:()=>it.useAiuiContext,useBizProductContext:()=>f.useBizProductContext,useEmarsysWebPush:()=>at.useEmarsysWebPush,withLayout:()=>R.withLayout});module.exports=Pt(ht);var x=e(require("./ActivitySchedule/index.js")),y=e(require("./GiftShelf/index.js")),P=e(require("./GiftTierShelf/index.js")),S=e(require("./ActivityMechanism/index.js")),h=e(require("./BrandEquity/index.js")),C=e(require("./MemberEquity/index.js")),g=e(require("./Slogan/index.js")),M=e(require("./Title/index.js")),B=e(require("./Spacer/index.js")),v=e(require("./ShelfDisplay/index.js")),T=e(require("./Evaluate/index.js")),I=e(require("./Category/index.js")),j=e(require("./HeroBanner/index.js")),b=e(require("./AccordionCards/index.js")),F=e(require("./Graphic/index.js")),D=e(require("./MediaPlayerBase/index.js")),G=e(require("./MediaPlayerSticky/index.js")),A=e(require("./MediaPlayerMulti/index.js")),L=e(require("./Marquee/index.js")),k=e(require("./MarqueeReview/index.js")),V=e(require("./WhyChoose/index.js")),w=e(require("./Faq/index.js")),a=require("./Marquee/index.js"),O=e(require("./MultiLayoutGraphicBlock/index.js")),W=e(require("./GraphicAttractionBlock/index.js")),E=e(require("./HeaderNavigation/index.js")),N=e(require("./FooterNavigation/index.js")),q=e(require("./SearchPage/index.js")),s=require("./SearchPage/types.js"),R=require("../shared/Styles.js"),H=e(require("./AiuiProvider/index.js")),K=e(require("./Tabs/index.js")),_=e(require("./SwiperBox/index.js")),z=require("./VideoModal/index.js"),U=e(require("./CreativeModule/index.js")),Y=e(require("./GraphicOverlay/index.js")),J=e(require("./Specs/index.js")),Q=e(require("./TabsGroup/index.js")),f=e(require("./Listing/BizProductProvider.js")),X=e(require("./Listing/components/PurchaseBar/index.js")),Z=e(require("./Listing/components/PurchaseBar/ProductActions/index.js")),$=e(require("./Listing/components/ProductCard/ProductDetail/ProductBenefitsTabs/index.js")),ee=e(require("./Listing/components/ProductCard/ProductDetail/ProductBenefits/index.js")),te=e(require("./Listing/components/ProductCard/ProductDetail/ProductHighlight/index.js")),re=e(require("./Listing/components/ProductCard/ProductDetail/ProductFreeGift/index.js")),oe=e(require("./Listing/components/ProductCard/ProductDetail/ProductFunctionFreeGift/index.js")),ae=e(require("./Listing/components/ProductCard/ProductDetail/ProductOptions/index.js")),ie=e(require("./Listing/components/ProductCard/ProductDetail/ProductBundle/index.js")),pe=e(require("./Listing/components/ProductCard/ProductDetail/ProductCoupon/index.js")),se=e(require("./Listing/components/ProductCard/ProductDetail/ProductBanner/index.js")),fe=e(require("./Listing/components/ProductCard/ProductGridBox.js")),de=e(require("./Listing/components/ProductCard/ProductGallery/index.js")),ce=e(require("./Listing/components/ProductCard/ProductSummary/index.js")),ue=e(require("./Listing/components/ProductCard/ProductDetail/BenefitsTab.js")),ne=e(require("./Listing/components/PaidShipping/index.js")),le=e(require("./Listing/components/CartActionButtons/index.js")),me=require("./NotifyMeDialog/index.js"),xe=e(require("./Listing/components/ProductCard/ProductDetail/ProductServiceBenefits/index.js")),ye=e(require("./Listing/components/ProductCard/ProductPaidShipping/index.js")),Pe=e(require("./GraphicMore/index.js")),Se=e(require("./Features/index.js")),he=e(require("./AplusDesc/index.js")),Ce=e(require("./GiftBox/index.js")),ge=e(require("./SelectStore/index.js")),Me=e(require("./DownLoad/index.js")),Be=e(require("./FootCharger/index.js")),ve=e(require("./BrandCardLink/index.js")),Ct=e(require("./IPRedirect/index.js")),Te=e(require("./WheelLottery/index.js")),Ie=e(require("./ProductLottery/index.js")),je=e(require("./ProductCompare/index.js")),be=e(require("./Ksp/index.js")),Fe=e(require("./ImageTextFeature/index.js")),De=e(require("./FeatureCards/index.js")),Ge=e(require("./FeaturedBlogPosts/index.js")),Ae=e(require("./ImageWithText/index.js")),Le=e(require("./VideoFeature/index.js")),ke=e(require("./TabsWithMedia/index.js")),Ve=e(require("./TabWithImage/index.js")),we=e(require("./FeatureShowcase/index.js")),Oe=e(require("./ProductHero/index.js")),We=e(require("./SpecsComparison/index.js")),Ee=e(require("./MediaSceneSwitcher/index.js")),Ne=e(require("./MediaSceneSwitcherV2/index.js")),qe=e(require("./ThreeDCarousel/index.js")),Re=e(require("./ProductNav/index.js")),He=e(require("./AnchorNavigation/index.js")),Ke=e(require("./PromotionalBar/index.js")),_e=e(require("./EventSchedule/index.js")),ze=e(require("./SecondaryBanner/index.js")),Ue=e(require("./BuyOneGetOneShelf/index.js")),Ye=e(require("./ActiveShelf/index.js")),Je=e(require("./MediaShelf/index.js")),d=e(require("./CreditsShelf/index.js")),c=e(require("./SceneShelf/index.js")),u=e(require("./SceneShelfV2/index.js")),Qe=e(require("./SceneShelfV3/index.js")),Xe=e(require("./MediaEndorsement/index.js")),Ze=e(require("./MediaTextOverlay/index.js")),$e=e(require("./ImageOverlayShelf/index.js")),et=e(require("./ImageTextOverlay/index.js")),tt=e(require("./MiniCart/index.js")),rt=e(require("./MiniCart/CircleProgress.js")),n=e(require("./MiniCart/MiniCartDialog.js")),ot=e(require("./WebPushPopup/index.js")),at=require("../hooks/useEmarsysWebPush.js"),it=require("./AiuiProvider/index.js"),pt=e(require("./ModalRegisterSubscribe/index.js")),st=e(require("./ModalSubscribeConfirm/index.js")),ft=e(require("./ModalCoupon/index.js")),dt=e(require("./ModalSmsSubscribe/index.js")),ct=e(require("./ModalVerify/index.js"));const St={"ipc-accordioncards":"AccordionCards","ipc-aplusdesc":"AplusDesc","ipc-banner":"HeroBanner","ipc-brand-equity":"BrandEquity","ipc-category":"Category","ipc-collection-banner":"CollectionBanner","ipc-collection-shelves":"CollectionShelves","ipc-creativemodule":"CreativeModule","ipc-download":"DownLoad","ipc-evaluate":"Evaluate","ipc-faq":"Faq","ipc-features":"Features","ipc-footcharger":"FootCharger","ipc-ga-block":"GraphicAttractionBlock","ipc-giftbox":"GiftBox","ipc-giftshelf":"GiftShelf","ipc-graphic":"Graphic","ipc-graphicmore":"GraphicMore","ipc-graphicoverlay":"GraphicOverlay","ipc-marquee":"Marquee","ipc-mediaplayerbase":"MediaPlayerBase","ipc-mediaplayermulti":"MediaPlayerMulti","ipc-mediaplayersticky":"MediaPlayerSticky","ipc-member-equity":"MemberEquity","ipc-mlg-block":"MultiLayoutGraphicBlock","ipc-search-page-tabs":"SearchPageBlock","ipc-selectstore":"SelectStore","ipc-shelfdisplay":"ShelfDisplay","ipc-slogan":"Slogan","ipc-spacer":"Spacer","ipc-specs":"Specs","ipc-tabs":"Tabs","ipc-text-marquee":"TextMarquee","ipc-title":"Title","ipc-whychoose":"WhyChoose","ipc-product-nav":"ProductNav","ipc-brand-card-link":"BrandCardLink","ipc-ipredirect":"IPRedirect",ksp:"Ksp","ipc-secondary-banner":"SecondaryBanner","ipc-media-endorsement":"MediaEndorsement","ipc-media-scene-switcher-v2":"MediaSceneSwitcherV2","ipc-featured-blog-posts":"FeaturedBlogPosts","ipc-media-text-overlay":"MediaTextOverlay",ProductCompare:"ProductCompare"};
2
2
  //# sourceMappingURL=index.js.map