{"version":3,"file":"commerce-component-register-product-list-register-js.0490e7afb776950c521b.js?ssi=0","mappings":";uKACA,IAAAA,EAAA,CACA,CACAC,KAAA,YACAC,aAAA,aACAC,KAAA,SACAC,UAAA,EACAC,aAAA,GACAC,WAAA,eAGA,SAAAC,EAAAC,GACA,MAAAC,EAAA,IAAAC,IACA,OAAAF,EAAAG,MAAA,UAAAC,OAAAC,SAAAD,OAAAE,IACAL,EAAAM,IAAAD,KACAL,EAAAO,IAAAF,IACA,IACGG,IAAAH,IAAA,CAAiBI,UAAAJ,IACpB,CACA,IAAAK,EAAA,CACAlB,KAAA,iBACAC,aAAA,mBACAC,KAAA,SACAE,aAAA,GACAC,WAAA,qHACAc,OAAAC,IACA,MAAAC,EAAAD,EAAAE,IAAA,cACA,OAAAD,IAAAA,EAAAE,KAAAC,GAAAA,GAAAP,WAAAQ,UAGAC,EAAAN,IACA,MAAAO,EAAAP,EAAAE,IAAA,kBACA,uBAAAK,IAAAA,EAAAF,4ECvBA,SAAAG,GAAAC,WACAA,EAAA,GAAAC,YACAA,EAAAC,WACAA,EAAAC,QACAA,EAAAC,eACAA,EAAAC,UACAA,IAEA,OAAyBC,EAAAC,cAAmB,OAAUF,WAAW,EAAAG,EAAAC,IAAE,eAAAJ,IAA+CC,EAAAC,cAAmB,OAAUF,UAAA,6BAAwCL,EAAAlB,OAAA4B,GAAA3B,QAAA2B,EAAAtB,YAAAD,IAAA,CAAAuB,EAAAC,IAAqGL,EAAAC,cACxRK,EAAAC,GACJ,CACAC,IAAA,GAAcJ,EAAAtB,aAAqBuB,IACnCvB,UAAAsB,EAAAtB,UACAa,cACAC,aACAa,kBAAAL,EAAAK,kBACAC,iBAAAN,EAAAM,iBACAZ,iBACAD,cAGA,0DCrBA,MAQAc,GAAmB,WAAAC,GAAgB,cARnC,CACA,SAAaC,MAAA,IAAAC,OAAA,IAAAC,EAAA,IAAAC,EAAA,IAAAC,GAAA,IAAAT,IAAA,WACb,SAAaK,MAAA,IAAAC,OAAA,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G,CAEA,OADAL,EAAAM,YAAA,0BAAkDP,EAAAO,aAAAP,EAAAlN,MAAA,eAClDmN,CACA","sources":["webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-C3DWJ7CI.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-4PAEOFG4.js","webpack://@logos/commerceweb-frontend/javascript/node_modules/lucide-react/dist/esm/icons/layout-list.mjs","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-KB25ZCOD.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-QJ7P73DS.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-TDK3KPK4.js","webpack://@logos/commerceweb-frontend/./node_modules/@faithlife/commerce-components/dist/chunk-XCZHOIM6.js"],"sourcesContent":["// src/components/shared/bulk-product-ids.ts\nvar productIdSubFields = [\n  {\n    name: \"productId\",\n    friendlyName: \"Product ID\",\n    type: \"string\",\n    required: true,\n    defaultValue: \"\",\n    helperText: \"Product ID\"\n  }\n];\nfunction parseBulkProductIds(text) {\n  const seen = /* @__PURE__ */ new Set();\n  return text.split(/[^\\d]+/).filter(Boolean).filter((id) => {\n    if (seen.has(id)) return false;\n    seen.add(id);\n    return true;\n  }).map((id) => ({ productId: id }));\n}\nvar bulkProductIdsInput = {\n  name: \"bulkProductIds\",\n  friendlyName: \"Bulk Product IDs\",\n  type: \"string\",\n  defaultValue: \"\",\n  helperText: \"Paste product IDs separated by commas, spaces, or any non-numeric character. Duplicates are removed automatically.\",\n  showIf: (options) => {\n    const list = options.get(\"productIds\");\n    return !list || !list.some((item) => item?.productId?.trim());\n  }\n};\nvar productIdsListShowIf = (options) => {\n  const bulk = options.get(\"bulkProductIds\");\n  return typeof bulk !== \"string\" || !bulk.trim();\n};\n\nexport {\n  productIdSubFields,\n  parseBulkProductIds,\n  bulkProductIdsInput,\n  productIdsListShowIf\n};\n//# sourceMappingURL=chunk-C3DWJ7CI.js.map","import {\n  ConnectedProductListCard\n} from \"./chunk-TDK3KPK4.js\";\nimport {\n  cn\n} from \"./chunk-NZVMNINS.js\";\n\n// src/components/product-list/component.tsx\nimport React from \"react\";\nfunction ProductList({\n  productIds = [],\n  previewMode,\n  isMultiBuy,\n  variant,\n  addToCartLabel,\n  className\n}) {\n  return /* @__PURE__ */ React.createElement(\"div\", { className: cn(\"tw-preflight\", className) }, /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp32 grid grid-cols-1\" }, productIds.filter((product) => Boolean(product.productId)).map((product, index) => /* @__PURE__ */ React.createElement(\n    ConnectedProductListCard,\n    {\n      key: `${product.productId}-${index}`,\n      productId: product.productId,\n      previewMode,\n      isMultiBuy,\n      callToActionLabel: product.callToActionLabel,\n      callToActionLink: product.callToActionLink,\n      addToCartLabel,\n      variant\n    }\n  ))));\n}\n\nexport {\n  ProductList\n};\n//# sourceMappingURL=chunk-4PAEOFG4.js.map","/**\n * @license lucide-react v1.27.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconNode = [\n  [\"rect\", { width: \"7\", height: \"7\", x: \"3\", y: \"3\", rx: \"1\", key: \"1g98yp\" }],\n  [\"rect\", { width: \"7\", height: \"7\", x: \"3\", y: \"14\", rx: \"1\", key: \"1bb6yr\" }],\n  [\"path\", { d: \"M14 4h7\", key: \"3xa0d5\" }],\n  [\"path\", { d: \"M14 9h7\", key: \"1icrd9\" }],\n  [\"path\", { d: \"M14 15h7\", key: \"1mj8o2\" }],\n  [\"path\", { d: \"M14 20h7\", key: \"11slyb\" }]\n];\nconst LayoutList = createLucideIcon(\"layout-list\", __iconNode);\n\nexport { __iconNode, LayoutList as default };\n//# sourceMappingURL=layout-list.mjs.map\n","import {\n  ProductList\n} from \"./chunk-4PAEOFG4.js\";\nimport {\n  bulkProductIdsInput,\n  parseBulkProductIds,\n  productIdsListShowIf\n} from \"./chunk-C3DWJ7CI.js\";\nimport {\n  withBuilderPreviewMode\n} from \"./chunk-XCZHOIM6.js\";\nimport {\n  lucideIconUri\n} from \"./chunk-BEFWWR2C.js\";\nimport {\n  getStorybookDocsUrlForMolecule\n} from \"./chunk-QJ7P73DS.js\";\n\n// src/components/product-list/register.tsx\nimport { Builder } from \"@builder.io/react\";\nimport { LayoutList } from \"lucide-react\";\n\n// src/components/product-list/builder-product-list.tsx\nimport React from \"react\";\nfunction BuilderProductList({\n  bulkProductIds = \"\",\n  productIds = [],\n  ...rest\n}) {\n  const resolvedProductIds = productIds.length === 0 && bulkProductIds ? parseBulkProductIds(bulkProductIds) : productIds;\n  return /* @__PURE__ */ React.createElement(ProductList, { ...rest, productIds: resolvedProductIds });\n}\n\n// src/components/product-list/register.tsx\nvar productIdSubFields = [\n  {\n    name: \"productId\",\n    friendlyName: \"Product ID\",\n    type: \"string\",\n    required: true,\n    defaultValue: \"\",\n    helperText: \"Product ID\"\n  },\n  {\n    name: \"callToActionLabel\",\n    friendlyName: \"Call to Action Label\",\n    type: \"string\",\n    required: false,\n    helperText: \"Label for the call to action button\"\n  },\n  {\n    name: \"callToActionLink\",\n    friendlyName: \"Call to Action Link\",\n    type: \"string\",\n    required: false,\n    helperText: \"URL for the call to action button\"\n  }\n];\nvar RegisteredProductList = withBuilderPreviewMode(BuilderProductList);\nvar registerComponent = () => {\n  Builder.registerComponent(RegisteredProductList, {\n    name: \"ProductList\",\n    friendlyName: \"Product List\",\n    docsLink: getStorybookDocsUrlForMolecule(\"product-list\"),\n    image: lucideIconUri(LayoutList),\n    inputs: [\n      bulkProductIdsInput,\n      {\n        name: \"productIds\",\n        friendlyName: \"Product IDs\",\n        type: \"list\",\n        required: true,\n        defaultValue: [],\n        helperText: \"List of product IDs to display in list\",\n        subFields: productIdSubFields,\n        showIf: productIdsListShowIf\n      },\n      {\n        name: \"addToCartLabel\",\n        friendlyName: \"Add to Cart Label\",\n        type: \"string\",\n        defaultValue: \"Add to cart\",\n        helperText: \"Label shown on the add-to-cart button on each card\"\n      },\n      {\n        name: \"isMultiBuy\",\n        friendlyName: \"Multi-Buy Mode\",\n        type: \"boolean\",\n        defaultValue: false,\n        helperText: \"Show quantity stepper on all product cards\"\n      }\n    ]\n  });\n  Builder.registerComponent(RegisteredProductList, {\n    name: \"ProductLineupList\",\n    friendlyName: \"Product Lineup List\",\n    docsLink: getStorybookDocsUrlForMolecule(\"product-list\"),\n    image: lucideIconUri(LayoutList),\n    inputs: [\n      bulkProductIdsInput,\n      {\n        name: \"productIds\",\n        friendlyName: \"Product IDs\",\n        type: \"list\",\n        required: true,\n        defaultValue: [],\n        helperText: \"List of product IDs to display (2\\u20133 recommended for desktop)\",\n        subFields: productIdSubFields,\n        showIf: productIdsListShowIf\n      },\n      {\n        name: \"addToCartLabel\",\n        friendlyName: \"Add to Cart Label\",\n        type: \"string\",\n        defaultValue: \"Add to cart\",\n        helperText: \"Label shown on the add-to-cart button on each card\"\n      },\n      {\n        name: \"isMultiBuy\",\n        friendlyName: \"Multi-Buy Mode\",\n        type: \"boolean\",\n        defaultValue: false,\n        helperText: \"Show quantity stepper on all product cards\"\n      },\n      {\n        name: \"variant\",\n        type: \"string\",\n        defaultValue: \"lineup\",\n        hideFromUI: true\n      }\n    ]\n  });\n};\n\nexport {\n  registerComponent\n};\n//# sourceMappingURL=chunk-KB25ZCOD.js.map","// src/config/storybook.ts\nvar STORYBOOK_BASE_URL = \"https://storybook.commercecomponents.logos.com\";\nfunction getStorybookDocsUrl(storyId) {\n  return `${STORYBOOK_BASE_URL}/?path=/story/${storyId}`;\n}\nfunction getStorybookDocsUrlForTier(tier, name, story = \"default\") {\n  const storySlug = story.toLowerCase().replace(/\\s+/g, \"-\");\n  return getStorybookDocsUrl(`${tier}-${name}--${storySlug}`);\n}\nfunction getStorybookDocsUrlForComponent(component, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"components\", component, story);\n}\nfunction getStorybookDocsUrlForOrganism(organism, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"organisms\", organism, story);\n}\nfunction getStorybookDocsUrlForMolecule(molecule, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"molecules\", molecule, story);\n}\nfunction getStorybookDocsUrlForAtom(atom, story = \"default\") {\n  return getStorybookDocsUrlForTier(\"atoms\", atom, story);\n}\n\nexport {\n  getStorybookDocsUrl,\n  getStorybookDocsUrlForComponent,\n  getStorybookDocsUrlForOrganism,\n  getStorybookDocsUrlForMolecule,\n  getStorybookDocsUrlForAtom\n};\n//# sourceMappingURL=chunk-QJ7P73DS.js.map","import {\n  LinkButton\n} from \"./chunk-PEROFW7J.js\";\nimport {\n  useWishlistData\n} from \"./chunk-SHOCGENS.js\";\nimport {\n  StepperControl\n} from \"./chunk-BHOK43FT.js\";\nimport {\n  PriceLabel\n} from \"./chunk-WJSJPUWM.js\";\nimport {\n  PricingBreakdown,\n  useProductData\n} from \"./chunk-YGZY2NQ5.js\";\nimport {\n  StarRating\n} from \"./chunk-AJAHHZMS.js\";\nimport {\n  Badge\n} from \"./chunk-4TY4ZLJA.js\";\nimport {\n  IconButton\n} from \"./chunk-2YIFVTVF.js\";\nimport {\n  useProductCardActions\n} from \"./chunk-YKNRUA43.js\";\nimport {\n  AddToCartButtonCore\n} from \"./chunk-T26XKAA3.js\";\nimport {\n  AmberImage\n} from \"./chunk-AF677QN7.js\";\nimport {\n  FavoriteIcon,\n  NotFavoriteIcon\n} from \"./chunk-ICYG44B4.js\";\nimport {\n  useLinkComponent\n} from \"./chunk-WWXV5LU4.js\";\nimport {\n  commerceResourceDefaults,\n  useResources\n} from \"./chunk-A263RQU4.js\";\nimport {\n  Typography\n} from \"./chunk-P4MY4MXU.js\";\nimport {\n  cn\n} from \"./chunk-NZVMNINS.js\";\n\n// src/components/product-list-card/component.tsx\nimport React, { useEffect } from \"react\";\n\n// src/components/product-list-card/product-list-card-variants.ts\nvar productListCardVariants = {\n  default: {\n    badgeVariant: \"primary\"\n  },\n  lineup: {\n    badgeVariant: \"vibrant\"\n  }\n};\n\n// src/components/product-list-card/component.tsx\nfunction ProductListCardSkeleton({\n  className,\n  \"data-testid\": testId\n}) {\n  return /* @__PURE__ */ React.createElement(\"article\", { className: cn(\"tw-preflight border-border border-t\", className), \"data-testid\": testId }, /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp16 px-sp16 py-sp16 flex animate-pulse flex-col motion-reduce:animate-none sm:flex-row\" }, /* @__PURE__ */ React.createElement(\"div\", { className: \"bg-surface-tint h-[200px] w-full sm:h-[160px] sm:w-[120px] sm:shrink-0\" }), /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp8 flex flex-1 flex-col\" }, /* @__PURE__ */ React.createElement(\"div\", { className: \"bg-surface-tint h-4 w-3/4 rounded\" }), /* @__PURE__ */ React.createElement(\"div\", { className: \"bg-surface-tint h-3 w-1/2 rounded\" }), /* @__PURE__ */ React.createElement(\"div\", { className: \"bg-surface-tint h-3 w-1/3 rounded\" }), /* @__PURE__ */ React.createElement(\"div\", { className: \"mt-sp8 bg-surface-tint h-6 w-1/4 rounded\" }), /* @__PURE__ */ React.createElement(\"div\", { className: \"bg-surface-tint h-10 w-[180px] rounded\" }))));\n}\nfunction ProductListCardError({\n  message,\n  className,\n  \"data-testid\": testId\n}) {\n  return /* @__PURE__ */ React.createElement(\"article\", { className: cn(\"tw-preflight border-border border-t\", className), \"data-testid\": testId }, /* @__PURE__ */ React.createElement(\"div\", { className: \"p-sp16\" }, /* @__PURE__ */ React.createElement(Typography, { variant: \"bodySmall\" }, message)));\n}\nfunction ProductListCard({\n  id,\n  name,\n  imageUri,\n  productPageUri,\n  badge,\n  author,\n  description,\n  rating,\n  reviewCount,\n  skus,\n  selectedSkuId,\n  isMultiBuy = false,\n  isOnUserWishlist = false,\n  showPricingBreakdown = false,\n  addToCartLabel,\n  callToActionLabel,\n  callToActionLink,\n  className,\n  variant = \"default\",\n  \"data-testid\": testId\n}) {\n  const v = productListCardVariants[variant];\n  const resources = useResources();\n  const productResources = {\n    ...commerceResourceDefaults.productCard,\n    ...resources.productCard\n  };\n  const LinkComponent = useLinkComponent();\n  const ProductLink = productPageUri ? LinkComponent : \"div\";\n  const effectiveSkuId = selectedSkuId ?? skus?.[0]?.id;\n  const { handleWishlistToggle, onAddToCartRequest, onWishlistToggle } = useProductCardActions();\n  const [quantity, setQuantity] = React.useState(isMultiBuy ? 2 : 1);\n  useEffect(() => {\n    setQuantity(isMultiBuy ? 2 : 1);\n  }, [isMultiBuy]);\n  const selectedSku = skus?.find((sku) => sku.id === effectiveSkuId);\n  return /* @__PURE__ */ React.createElement(\n    \"article\",\n    {\n      className: cn(\"tw-preflight border-border-strong group border-t\", className),\n      \"data-testid\": testId\n    },\n    /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp24 px-sp18 pb-sp24 pt-sp24 sm:gap-sp60 sm:px-sp20 sm:pb-sp36 sm:pt-sp30 lg:pt-sp36 flex w-full flex-col sm:flex-row\" }, /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp10 relative h-[270px] w-[180px] shrink-0 overflow-visible rounded-[2px]\" }, /* @__PURE__ */ React.createElement(\n      ProductLink,\n      {\n        \"aria-label\": productPageUri ? name : void 0,\n        className: \"flex max-h-full w-full items-center overflow-hidden\",\n        href: productPageUri || void 0\n      },\n      imageUri && /* @__PURE__ */ React.createElement(\n        AmberImage,\n        {\n          alt: name,\n          className: \"max-h-full object-scale-down object-center\",\n          height: 270,\n          sizes: {\n            mobile: { height: 270, width: 180 }\n          },\n          src: imageUri,\n          targetAspectRatio: [2, 3],\n          width: 180\n        }\n      )\n    ), onWishlistToggle && productPageUri && !selectedSku?.isPreorder && /* @__PURE__ */ React.createElement(\n      IconButton,\n      {\n        \"aria-label\": isOnUserWishlist ? productResources.inWishlistLabel ?? commerceResourceDefaults.productCard.inWishlistLabel : productResources.addToWishlistLabel ?? commerceResourceDefaults.productCard.addToWishlistLabel,\n        className: cn(\n          \"absolute top-2.5 right-2.5\",\n          \"duration-short opacity-0 transition-opacity motion-reduce:transition-none\",\n          \"group-hover:opacity-100\",\n          \"disabled:pointer-events-auto disabled:opacity-0 group-hover:disabled:opacity-50\",\n          \"disabled:active:shadow-none disabled:active:outline-none\"\n        ),\n        disabled: !!selectedSku?.isOwned,\n        onClick: () => handleWishlistToggle(id),\n        variant: \"floating\"\n      },\n      isOnUserWishlist ? /* @__PURE__ */ React.createElement(FavoriteIcon, { \"aria-hidden\": true, className: \"text-foreground-secondary\", size: 16 }) : /* @__PURE__ */ React.createElement(NotFavoriteIcon, { \"aria-hidden\": true, className: \"text-foreground-secondary\", size: 16 })\n    )), /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp24 flex min-w-0 flex-1 flex-col\" }, /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp6 flex min-w-0 flex-col\" }, badge && /* @__PURE__ */ React.createElement(\"span\", null, /* @__PURE__ */ React.createElement(Badge, { variant: v.badgeVariant, scale: \"sm\", typographyVariant: \"ui4\" }, badge)), /* @__PURE__ */ React.createElement(\n      ProductLink,\n      {\n        className: cn(\n          productPageUri && \"active:text-pressed hover:underline focus-visible:underline active:underline\"\n        ),\n        href: productPageUri || void 0\n      },\n      /* @__PURE__ */ React.createElement(Typography, { className: \"line-clamp-3 sm:line-clamp-2\", tag: \"h4\", variant: \"headingH4\" }, name)\n    ), author && /* @__PURE__ */ React.createElement(Typography, { className: \"truncate\", variant: \"ui3\" }, (productResources.authorLabel ?? commerceResourceDefaults.productCard.authorLabel)(\n      author\n    ))), rating !== void 0 && /* @__PURE__ */ React.createElement(StarRating, { rating, reviewCount, scale: \"md\" }), description && /* @__PURE__ */ React.createElement(Typography, { className: \"line-clamp-3 max-w-[480px]\", variant: \"finePrint\" }, description), /* @__PURE__ */ React.createElement(\"div\", { className: \"gap-sp18 flex flex-col\" }, showPricingBreakdown && selectedSku?.prices ? /* @__PURE__ */ React.createElement(PricingBreakdown, { prices: selectedSku.prices }) : selectedSku?.salePrice ? /* @__PURE__ */ React.createElement(\n      PriceLabel,\n      {\n        anchorLabel: selectedSku.anchorLabel,\n        anchorPrice: selectedSku.anchorPrice,\n        localizedSalePrice: selectedSku.localizedSalePrice,\n        salePrice: isMultiBuy && selectedSku.unitPriceLabel ? selectedSku.unitPriceLabel : selectedSku.salePrice,\n        salePriceCurrency: selectedSku.salePriceCurrency,\n        variant: selectedSku.priceVariant\n      }\n    ) : null, onAddToCartRequest && /* @__PURE__ */ React.createElement(React.Fragment, null, isMultiBuy && /* @__PURE__ */ React.createElement(\n      StepperControl,\n      {\n        scale: \"sm\",\n        value: quantity,\n        onValueChange: (nextValue) => setQuantity(nextValue),\n        resources: resources.stepperControl\n      }\n    ), /* @__PURE__ */ React.createElement(\"div\", { className: \"w-fit\" }, /* @__PURE__ */ React.createElement(\n      AddToCartButtonCore,\n      {\n        items: [\n          {\n            identifier: effectiveSkuId ?? id,\n            type: \"SKU\" /* SKU */,\n            quantity,\n            isPreorder: selectedSku?.isPreorder\n          }\n        ],\n        buttonTextOverride: addToCartLabel,\n        scale: \"large\",\n        status: selectedSku,\n        isLoadingStatus: false\n      }\n    ))), callToActionLabel && callToActionLink && /* @__PURE__ */ React.createElement(\n      LinkButton,\n      {\n        href: callToActionLink ?? \"#\",\n        intent: \"forward\",\n        scale: \"sm\",\n        variant: \"primary\"\n      },\n      callToActionLabel\n    ))))\n  );\n}\nfunction ConnectedProductListCard({\n  productId,\n  previewMode,\n  isMultiBuy,\n  addToCartLabel,\n  callToActionLabel,\n  callToActionLink,\n  showPricingBreakdown,\n  className,\n  variant = \"default\",\n  \"data-testid\": testId\n}) {\n  const { data, isLoading, error } = useProductData(productId);\n  const { data: wishlistData } = useWishlistData(productId);\n  const resources = {\n    ...commerceResourceDefaults.productCard,\n    ...useResources().productCard\n  };\n  if (isLoading) return /* @__PURE__ */ React.createElement(ProductListCardSkeleton, { className, \"data-testid\": testId });\n  if (productId && data === null && error === null && !previewMode) {\n    return null;\n  }\n  if (error || !data) {\n    const message = error ? (resources.failedToLoadProduct ?? commerceResourceDefaults.productCard.failedToLoadProduct)(\n      productId\n    ) : productId ? (resources.productNotFound ?? commerceResourceDefaults.productCard.productNotFound)(\n      productId\n    ) : resources.noProductSelected ?? commerceResourceDefaults.productCard.noProductSelected;\n    return /* @__PURE__ */ React.createElement(ProductListCardError, { className, \"data-testid\": testId, message });\n  }\n  if (isMultiBuy && !data.groupLicenseEscrowSkuId) {\n    return /* @__PURE__ */ React.createElement(\n      ProductListCardError,\n      {\n        className,\n        \"data-testid\": testId,\n        message: (resources.missingGroupLicenseSku ?? commerceResourceDefaults.productCard.missingGroupLicenseSku)(productId)\n      }\n    );\n  }\n  const selectedSkuId = isMultiBuy ? data.groupLicenseEscrowSkuId : data.primarySkuId;\n  return /* @__PURE__ */ React.createElement(\n    ProductListCard,\n    {\n      ...data,\n      ...wishlistData,\n      selectedSkuId,\n      isMultiBuy,\n      addToCartLabel,\n      callToActionLabel,\n      callToActionLink,\n      showPricingBreakdown,\n      className,\n      \"data-testid\": testId,\n      variant\n    }\n  );\n}\n\nexport {\n  ProductListCardSkeleton,\n  ProductListCardError,\n  ProductListCard,\n  ConnectedProductListCard\n};\n//# sourceMappingURL=chunk-TDK3KPK4.js.map","// src/utils/with-builder-preview-mode.tsx\nimport React from \"react\";\nimport { Builder } from \"@builder.io/react\";\nfunction withBuilderPreviewMode(Component) {\n  function Wrapped(props) {\n    return /* @__PURE__ */ React.createElement(Component, { ...props, previewMode: Builder.isEditing || Builder.isPreviewing });\n  }\n  Wrapped.displayName = `withBuilderPreviewMode(${Component.displayName ?? Component.name ?? \"Component\"})`;\n  return Wrapped;\n}\n\nexport {\n  withBuilderPreviewMode\n};\n//# sourceMappingURL=chunk-XCZHOIM6.js.map"],"names":["productIdSubFields","name","friendlyName","type","required","defaultValue","helperText","parseBulkProductIds","text","seen","Set","split","filter","Boolean","id","has","add","map","productId","bulkProductIdsInput","showIf","options","list","get","some","item","trim","productIdsListShowIf","bulk","ProductList","productIds","previewMode","isMultiBuy","variant","addToCartLabel","className","react","createElement","chunk_NZVMNINS","cn","product","index","chunk_TDK3KPK4","fn","key","callToActionLabel","callToActionLink","LayoutList","A","width","height","x","y","rx","d","RegisteredProductList","chunk_XCZHOIM6","v","bulkProductIds","rest","resolvedProductIds","length","chunk_C3DWJ7CI","z8","registerComponent","builder_react_es5","M$","docsLink","chunk_QJ7P73DS","Im","image","chunk_BEFWWR2C","c","inputs","Ee","subFields","ue","hideFromUI","getStorybookDocsUrl","storyId","getStorybookDocsUrlForTier","tier","story","toLowerCase","replace","getStorybookDocsUrlForComponent","component","getStorybookDocsUrlForOrganism","organism","getStorybookDocsUrlForMolecule","molecule","getStorybookDocsUrlForAtom","atom","productListCardVariants","default","badgeVariant","lineup","ProductListCardSkeleton","testId","react__WEBPACK_IMPORTED_MODULE_16__","_chunk_NZVMNINS_js__WEBPACK_IMPORTED_MODULE_15__","ProductListCardError","message","_chunk_P4MY4MXU_js__WEBPACK_IMPORTED_MODULE_14__","o","ProductListCard","imageUri","productPageUri","badge","author","description","rating","reviewCount","skus","selectedSkuId","isOnUserWishlist","showPricingBreakdown","resources","_chunk_A263RQU4_js__WEBPACK_IMPORTED_MODULE_13__","productResources","SS","productCard","LinkComponent","_chunk_WWXV5LU4_js__WEBPACK_IMPORTED_MODULE_12__","d5","ProductLink","effectiveSkuId","handleWishlistToggle","onAddToCartRequest","onWishlistToggle","_chunk_YKNRUA43_js__WEBPACK_IMPORTED_MODULE_8__","_","quantity","setQuantity","useState","useEffect","selectedSku","find","sku","href","_chunk_AF677QN7_js__WEBPACK_IMPORTED_MODULE_10__","d_","alt","sizes","mobile","src","targetAspectRatio","isPreorder","_chunk_2YIFVTVF_js__WEBPACK_IMPORTED_MODULE_7__","K","inWishlistLabel","addToWishlistLabel","disabled","isOwned","onClick","_chunk_ICYG44B4_js__WEBPACK_IMPORTED_MODULE_11__","kD","size","DA","_chunk_4TY4ZLJA_js__WEBPACK_IMPORTED_MODULE_6__","E","scale","typographyVariant","tag","authorLabel","_chunk_AJAHHZMS_js__WEBPACK_IMPORTED_MODULE_5__","G","prices","_chunk_YGZY2NQ5_js__WEBPACK_IMPORTED_MODULE_4__","S8","salePrice","_chunk_WJSJPUWM_js__WEBPACK_IMPORTED_MODULE_3__","M","anchorLabel","anchorPrice","localizedSalePrice","unitPriceLabel","salePriceCurrency","priceVariant","Fragment","_chunk_BHOK43FT_js__WEBPACK_IMPORTED_MODULE_2__","r","value","onValueChange","nextValue","stepperControl","_chunk_T26XKAA3_js__WEBPACK_IMPORTED_MODULE_9__","u","items","identifier","buttonTextOverride","status","isLoadingStatus","_chunk_PEROFW7J_js__WEBPACK_IMPORTED_MODULE_0__","z","intent","ConnectedProductListCard","data","isLoading","error","pF","wishlistData","_chunk_SHOCGENS_js__WEBPACK_IMPORTED_MODULE_1__","t","failedToLoadProduct","productNotFound","noProductSelected","groupLicenseEscrowSkuId","missingGroupLicenseSku","primarySkuId","withBuilderPreviewMode","Component","Wrapped","props","react__WEBPACK_IMPORTED_MODULE_0__","_builder_io_react__WEBPACK_IMPORTED_MODULE_1__","isEditing","isPreviewing","displayName"],"sourceRoot":""}