{"version":3,"file":"CouponCollectionV2.CyQFrxCo.mjs","names":["Fragment","DEFAULT_INDEX","memo","containerStyle","Fragment","createContext","useMemo","useContext","isBefore","Fragment","Headline","memo","useMemo"],"sources":["https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/Brand/Brand.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/Brand/Brand.js","https:/asset.29cm.co.kr/contents/framer/apis/brand-group/BrandGroupApiService.js","https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useFetchBrandGroups.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/BrandGroupTags/BrandGroupTags.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/BrandGroupTags/BrandGroupTags.utils.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/BrandGroupTags/BrandGroupIdsNotice.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/BrandGroupTags/BrandGroupTags.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/BrandProfiles/BrandProfiles.utils.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/CouponCollectionV2.utils.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/BrandProfiles/BrandProfiles.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/provider/CouponScheduleProvider/CouponScheduleProvider.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/provider/CouponScheduleProvider/CouponScheduleProvider.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/BrandProfilesHeadline/BrandProfilesHeadline.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/CalendarTags/CalendarTags.utils.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/CalendarTags/CalendarTags.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/CalendarTags/CalendarTags.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/CouponCollectionV2.types.js","https:/asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/CouponCollectionV2.js","https:/framerusercontent.com/modules/YiKInSHlMFf1dbPSBPRF/pODF9RZoDUDtF8PChUS5/CouponCollectionV2.js"],"sourcesContent":["import { useFetchCouponCollectionProducts } from \"../../../../../hooks/fetchers/useFetchCouponCollectionProducts.js\";\nconst useCouponCollectionProducts = (couponCollectionId, sort) => {\n  const hasCouponCollectionId = couponCollectionId !== void 0;\n  const enabled = hasCouponCollectionId;\n  const {\n    products,\n    isPending,\n    hasNext,\n    setSize\n  } = useFetchCouponCollectionProducts(couponCollectionId ?? 0, enabled, sort);\n  return {\n    isPending,\n    products,\n    setSize,\n    hasNext\n  };\n};\nexport {\n  useCouponCollectionProducts\n};\n","import { jsxs, Fragment, jsx } from \"react/jsx-runtime\";\nimport { env } from \"../../../../../config/index.js\";\nimport { useComponentId } from \"../../EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../../EventTrackingProvider/EventTrackingProvider.js\";\nimport { useCouponCollectionProducts } from \"./Brand.hooks.js\";\nimport { Products } from \"../../Products/index.js\";\nimport { CARD_HORIZONTAL_AUTO } from \"../../Products/Root.constants.js\";\nimport { typography } from \"../../../../../styles/typography.js\";\nimport { createSearchParams } from \"../../../../../utils/createSearchParams.js\";\nimport { createContentEventProperties } from \"../../../../../utils/event-properties/content.js\";\nimport { PREVIOUS_SECTION_NAME_QUERY_STRING_KEY, PREVIOUS_SECTION_TITLE_QUERY_STRING_KEY, PREVIOUS_PAGE_NAME_QUERY_STRING_KEY, PREVIOUS_CONTENT_NO_QUERY_STRING_KEY } from \"../../../../../constants/query-params.js\";\nimport { useNavigatePage } from \"../../../../../hooks/useNavigatePage.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { EventTrigger } from \"../../../../@shared/EventTrigger/index.js\";\nimport \"react\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport { useBreakpoint } from \"../../../../../hooks/useBreakpoint.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport merge from \"../../../../../node_modules/lodash-es/merge.js\";\nconst DEFAULT_COMPONENT_ID = \"CouponCollection\";\nconst ACTION_BUTTON_NAME = \"브랜드 상품 전체보기\";\nconst Brand = ({\n  couponCollectionId,\n  frontBrand,\n  sort\n}) => {\n  const componentId = useComponentId();\n  const breakpoint = useBreakpoint();\n  const {\n    isPending,\n    products,\n    hasNext,\n    setSize\n  } = useCouponCollectionProducts(couponCollectionId, sort);\n  const loading = isPending || products.length === 0;\n  const {\n    curr_screen,\n    content_no\n  } = createContentEventProperties();\n  const sectionTitle = `${(frontBrand == null ? void 0 : frontBrand.nameKor) ?? \"\"} 인기 아이템`;\n  const couponCollectionSearchParams = createSearchParams({\n    [PREVIOUS_SECTION_NAME_QUERY_STRING_KEY]: componentId || DEFAULT_COMPONENT_ID,\n    [PREVIOUS_SECTION_TITLE_QUERY_STRING_KEY]: sectionTitle,\n    [PREVIOUS_PAGE_NAME_QUERY_STRING_KEY]: curr_screen,\n    [PREVIOUS_CONTENT_NO_QUERY_STRING_KEY]: content_no,\n    ...sort ? {\n      sort\n    } : {}\n  });\n  const couponCollectionPageUrl = `${env.workspace.content}/coupon-collection/${couponCollectionId}?${couponCollectionSearchParams}`;\n  const navigateCouponCollectionPage = useNavigatePage(couponCollectionPageUrl, {\n    webview: {\n      home: true\n    }\n  });\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const handleButtonClick = () => {\n    if (!couponCollectionId) {\n      return;\n    }\n    navigateCouponCollectionPage();\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      button_id: \"more\",\n      button_name: ACTION_BUTTON_NAME,\n      layout_position: -1\n    });\n  };\n  return /* @__PURE__ */ jsxs(Fragment, { children: [\n    /* @__PURE__ */ jsx(Products.Root, { hasNext, options: merge({}, CARD_HORIZONTAL_AUTO, {\n      mobile: {\n        card: {\n          hasBrandName: false\n        }\n      },\n      tablet: {\n        card: {\n          hasBrandName: false\n        }\n      },\n      desktop: {\n        card: {\n          hasBrandName: false\n        }\n      }\n    }), products, loading, onLastItemView: () => {\n      setSize((prev) => prev + 1);\n    }, children: ({\n      index\n    }) => /* @__PURE__ */ jsx(Products.Card, { index, componentName: componentId, showLazyFallback: false }) }),\n    /* @__PURE__ */ jsx(EventTrigger.Target, { onClick: handleButtonClick, children: /* @__PURE__ */ jsx(\"div\", { style: {\n      ...buttonStyle,\n      ...buttonStyleByBreakpoint[breakpoint]\n    }, children: ACTION_BUTTON_NAME }) })\n  ] });\n};\nconst buttonStyle = {\n  padding: \"16px 20px\",\n  borderRadius: 4,\n  border: \"1px solid #303033\",\n  backgroundColor: \"#000000\",\n  textAlign: \"center\",\n  color: \"#ffffff\",\n  cursor: \"pointer\",\n  ...typography(14, 700, 1.4)\n};\nconst buttonStyleByBreakpoint = {\n  desktop: {\n    marginTop: 16,\n    width: 400,\n    margin: \"16px auto 0px\"\n  },\n  tablet: {\n    marginRight: 20,\n    marginLeft: 20\n  },\n  mobile: {\n    marginRight: 20,\n    marginLeft: 20\n  }\n};\nexport {\n  Brand\n};\n","import { env } from \"../../config/index.js\";\nimport { throwFailError } from \"../@middlewares/throwFailError.js\";\nimport { APIService } from \"../APIService.js\";\nclass BrandGroupApiService extends APIService {\n  constructor() {\n    super();\n    this.setMiddleware(throwFailError);\n  }\n  async getBrandGroups({\n    brandGroupIds\n  }) {\n    return this.post(`${env.api.content}/api/v4/brand-groups/front-brands`, brandGroupIds);\n  }\n}\nconst brandGroupApi = new BrandGroupApiService();\nexport {\n  brandGroupApi\n};\n","import useSWR from \"../../node_modules/swr/core/dist/index.js\";\nimport { brandGroupApi } from \"../../apis/brand-group/BrandGroupApiService.js\";\nconst BRAND_GROUPS = \"brand-groups\";\nconst useFetchBrandGroups = (brandGroupIds, enabled = true) => {\n  const {\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [BRAND_GROUPS, brandGroupIds] : null, () => brandGroupApi.getBrandGroups({\n    brandGroupIds\n  }));\n  return {\n    isLoading: isLoading || !enabled,\n    ...rest\n  };\n};\nexport {\n  useFetchBrandGroups\n};\n","import { useFetchBrandGroups } from \"../../../../../hooks/fetchers/useFetchBrandGroups.js\";\nimport { useFetchBrandSales } from \"../../../../../hooks/fetchers/useFetchBrandSales.js\";\nconst useBrandSales = (brandSaleId) => {\n  var _a;\n  const hasBrandSaleId = brandSaleId !== void 0;\n  const enabled = hasBrandSaleId;\n  const {\n    isLoading,\n    error,\n    data\n  } = useFetchBrandSales(brandSaleId ?? 0, enabled);\n  const brandSaleCouponList = ((_a = data == null ? void 0 : data.data) == null ? void 0 : _a.brandSaleCouponList.filter((item) => Boolean(item.couponCollectionId))) ?? [];\n  const hasError = error !== void 0;\n  const isPending = isLoading || hasError || !enabled;\n  return {\n    isPending,\n    brandSaleCouponList\n  };\n};\nconst useBrandGroups = (brandGroupIds) => {\n  const enabled = brandGroupIds.length > 0;\n  const {\n    isLoading,\n    error,\n    data\n  } = useFetchBrandGroups(brandGroupIds, enabled);\n  const hasError = error !== void 0;\n  return {\n    isPending: isLoading || hasError || !enabled,\n    brandGroups: (data == null ? void 0 : data.data) ?? []\n  };\n};\nexport {\n  useBrandGroups,\n  useBrandSales\n};\n","const createFilteredBrandGroups = (brandGroups, brandSaleCouponList) => {\n  const frontBrandIds = new Set(brandSaleCouponList.map((item) => item.frontBrand.frontBrandId));\n  return brandGroups.map((group) => {\n    return {\n      ...group,\n      frontBrandIds: group.frontBrandIds.filter((id) => frontBrandIds.has(id))\n    };\n  }).filter((group) => group.frontBrandIds.length > 0).map((item) => ({\n    ...item,\n    filteredBrandSaleCouponList: brandSaleCouponList.filter((_item) => item.frontBrandIds.includes(_item.frontBrand.frontBrandId))\n  }));\n};\nconst createBrandGroupsWithAll = (filteredBrandGroups, brandSaleCouponList) => {\n  if (filteredBrandGroups.length === 0) {\n    return [{\n      brandGroupId: -1,\n      title: \"전체\",\n      frontBrandIds: [],\n      filteredBrandSaleCouponList: brandSaleCouponList\n    }];\n  }\n  if (filteredBrandGroups.length === 1) {\n    return filteredBrandGroups;\n  }\n  const allFrontBrandIds = filteredBrandGroups.reduce((acc, group) => {\n    return [...acc, ...group.frontBrandIds];\n  }, []);\n  const allGroup = {\n    brandGroupId: -1,\n    title: \"전체\",\n    frontBrandIds: allFrontBrandIds,\n    filteredBrandSaleCouponList: brandSaleCouponList\n  };\n  return [allGroup, ...filteredBrandGroups];\n};\nexport {\n  createBrandGroupsWithAll,\n  createFilteredBrandGroups\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nconst BrandGroupIdsNotice = () => /* @__PURE__ */ jsxs(\"section\", { role: \"alert\", style: {\n  padding: \"20px\",\n  backgroundColor: \"#fef7e6\",\n  border: \"1px solid #f4d03f\",\n  borderRadius: \"12px\",\n  margin: \"16px 0\",\n  fontFamily: '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n  boxShadow: \"0 2px 8px rgba(0, 0, 0, 0.08)\"\n}, children: [\n  /* @__PURE__ */ jsxs(\"header\", { style: {\n    display: \"flex\",\n    alignItems: \"center\",\n    marginBottom: \"12px\"\n  }, children: [\n    /* @__PURE__ */ jsx(\"span\", { style: {\n      fontSize: \"20px\",\n      marginRight: \"8px\"\n    }, \"aria-label\": \"info\", children: \"ℹ️\" }),\n    /* @__PURE__ */ jsx(\"h3\", { style: {\n      margin: \"0\",\n      color: \"#7c4a03\",\n      fontSize: \"16px\",\n      fontWeight: \"600\",\n      letterSpacing: \"-0.01em\"\n    }, children: \"브랜드 그룹 ID 필요\" })\n  ] }),\n  /* @__PURE__ */ jsxs(\"div\", { style: {\n    color: \"#7c4a03\",\n    fontSize: \"14px\",\n    lineHeight: \"1.6\"\n  }, children: [\n    /* @__PURE__ */ jsxs(\"p\", { style: {\n      margin: \"0 0 12px 0\"\n    }, children: [\n      /* @__PURE__ */ jsx(\"strong\", { children: \"brandGroupIds\" }),\n      \" 값이 입력되지 않았습니다.\"\n    ] }),\n    /* @__PURE__ */ jsxs(\"p\", { style: {\n      margin: \"0 0 16px 0\"\n    }, children: [\n      \"CouponCollectionV2 스펙상 \",\n      /* @__PURE__ */ jsx(\"strong\", { style: {\n        color: \"#0f5132\"\n      }, children: \"브랜드 그룹 ID는 필수값\" }),\n      \"입니다.\"\n    ] }),\n    /* @__PURE__ */ jsxs(\"details\", { open: true, style: {\n      cursor: \"pointer\"\n    }, children: [\n      /* @__PURE__ */ jsx(\"summary\", { style: {\n        fontWeight: \"500\",\n        marginBottom: \"8px\"\n      }, children: \"어떻게 해결하나요?\" }),\n      /* @__PURE__ */ jsxs(\"div\", { style: {\n        backgroundColor: \"#fff\",\n        padding: \"12px\",\n        borderRadius: \"8px\",\n        marginTop: \"8px\"\n      }, children: [\n        /* @__PURE__ */ jsx(\"p\", { style: {\n          margin: \"0 0 8px 0\",\n          fontWeight: \"500\"\n        }, children: \"브랜드 그룹 ID 입력\" }),\n        /* @__PURE__ */ jsxs(\"p\", { style: {\n          margin: \"0\",\n          fontSize: \"13px\",\n          color: \"#666\"\n        }, children: [\n          \"프레이머 속성 패널에서 \",\n          /* @__PURE__ */ jsx(\"strong\", { children: \"brandGroupIds\" }),\n          \" 값을 입력해주세요.\",\n          /* @__PURE__ */ jsx(\"br\", {}),\n          \"복수 입력 시 콤마(,)로 구분합니다. (예: 1,2,3)\"\n        ] })\n      ] })\n    ] })\n  ] })\n] });\nexport {\n  BrandGroupIdsNotice\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { memo } from \"react\";\nimport { useBrandSales, useBrandGroups } from \"./BrandGroupTags.hooks.js\";\nimport { createFilteredBrandGroups, createBrandGroupsWithAll } from \"./BrandGroupTags.utils.js\";\nimport { BrandGroupIdsNotice } from \"./BrandGroupIdsNotice.js\";\nimport { Tags } from \"../../Tags/index.js\";\nimport { useComponentId } from \"../../EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../../EventTrackingProvider/EventTrackingProvider.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { isCanvas } from \"../../../../../utils/framer/isCanvas.js\";\nimport { isFramerPreview } from \"../../../../../utils/framer/isFramerPreview.js\";\nconst DEFAULT_INDEX = 0;\nconst BrandGroupTags = memo(({\n  children,\n  brandSaleId,\n  brandGroupIds\n}) => {\n  const componentId = useComponentId();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const {\n    isPending,\n    brandSaleCouponList\n  } = useBrandSales(brandSaleId);\n  const brandGroupIdsArray = brandGroupIds === \"\" ? [] : brandGroupIds.split(\",\").map(Number);\n  const {\n    isPending: isBrandGroupsPending,\n    brandGroups\n  } = useBrandGroups(brandGroupIdsArray);\n  const filteredBrandGroups = createFilteredBrandGroups(brandGroups, brandSaleCouponList);\n  const brandGroupsWithAll = createBrandGroupsWithAll(filteredBrandGroups, brandSaleCouponList);\n  const handleClick = (title, index) => () => {\n    if (!title) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: index + 1,\n      button_id: \"tag\",\n      button_name: title,\n      layout_position: -1\n    });\n  };\n  const isFramer = isCanvas() || isFramerPreview();\n  const shouldShowNotice = isFramer && brandGroupIdsArray.length === 0;\n  return /* @__PURE__ */ jsxs(Tags.Root, { defaultValue: DEFAULT_INDEX, loading: isPending || isBrandGroupsPending, children: [\n    /* @__PURE__ */ jsx(\"div\", { style: containerStyle, children: /* @__PURE__ */ jsx(Tags.List, { list: brandGroupsWithAll, style: {\n      marginBottom: 0\n    }, children: ({\n      index,\n      item\n    }) => /* @__PURE__ */ jsx(Tags.Item, { value: index, onClick: handleClick(item == null ? void 0 : item.title, index), children: item == null ? void 0 : item.title }) }) }),\n    shouldShowNotice && /* @__PURE__ */ jsx(BrandGroupIdsNotice, {}),\n    /* @__PURE__ */ jsx(Tags.Panels, { list: brandGroupsWithAll, children: ({\n      item,\n      index,\n      pending\n    }) => {\n      return /* @__PURE__ */ jsx(Tags.Panel, { value: index, children: children({\n        brandSaleId,\n        index,\n        pending: pending || isPending,\n        brandSaleCouponList: item == null ? void 0 : item.filteredBrandSaleCouponList\n      }) }, item == null ? void 0 : item.brandGroupId);\n    } })\n  ] });\n});\nconst containerStyle = {\n  width: \"100%\",\n  display: \"flex\",\n  alignItems: \"center\",\n  paddingBottom: 16,\n  paddingTop: 16\n};\nexport {\n  BrandGroupTags\n};\n","import { DiscountType } from \"../../../../../types/models/coupon.js\";\nconst formatCoupon = ({\n  coupon,\n  brand\n}) => {\n  if (!coupon || !brand) {\n    return void 0;\n  }\n  const couponNamePostFix = coupon.discountType === DiscountType.FIXED_PRICE ? \"원\" : \"%\";\n  const couponName = `${brand.nameKor} ${coupon.discountValue}${couponNamePostFix}`;\n  return {\n    ...coupon,\n    id: coupon.couponId,\n    couponName\n  };\n};\nexport {\n  formatCoupon\n};\n","const findCurrentIndex = ({\n  list,\n  queryId,\n  idKey,\n  fallbackIndex = 0,\n  getCurrentIndex\n}) => {\n  if (queryId !== void 0) {\n    const targetIndex = list.findIndex((item) => {\n      const itemId = item == null ? void 0 : item[idKey];\n      return itemId === Number(queryId);\n    });\n    if (targetIndex !== -1) {\n      return targetIndex;\n    }\n  }\n  if (getCurrentIndex) {\n    const currentIndex = getCurrentIndex(list);\n    if (currentIndex !== void 0) {\n      return currentIndex;\n    }\n  }\n  return fallbackIndex;\n};\nconst findCurrentIndexByValue = (list, targetValue, compareKey) => {\n  if (targetValue !== void 0) {\n    const targetIndex = list.findIndex((item) => {\n      const itemValue = item == null ? void 0 : item[compareKey];\n      return itemValue === targetValue;\n    });\n    return targetIndex;\n  }\n  return -1;\n};\nexport {\n  findCurrentIndex,\n  findCurrentIndexByValue\n};\n","import { jsxs, jsx, Fragment } from \"react/jsx-runtime\";\nimport { useComponentId, useTrackEvent } from \"../../EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../../EventTrackingProvider/EventTrackingProvider.js\";\nimport { Profiles } from \"../../Profiles/index.js\";\nimport \"react\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../config/index.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport { ThemeProvider } from \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport { useBreakpoint } from \"../../../../../hooks/useBreakpoint.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { DownloadableCoupon } from \"../../DownloadableCoupon/DownloadableCoupon.js\";\nimport { formatCoupon } from \"./BrandProfiles.utils.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { findCurrentIndexByValue } from \"../CouponCollectionV2.utils.js\";\nconst ConditionalThemeProvider = ({\n  theme,\n  children\n}) => theme ? /* @__PURE__ */ jsx(ThemeProvider, { theme, children }) : /* @__PURE__ */ jsx(Fragment, { children });\nconst COUPON_MAX_WIDTH = 429;\nconst GAP = 16;\nconst BrandProfiles = ({\n  children,\n  couponColor,\n  couponLayout,\n  couponTheme,\n  queryBrandSaleCouponId,\n  brandSaleCouponList = [],\n  isPending\n}) => {\n  const breakpoint = useBreakpoint();\n  const componentId = useComponentId();\n  const {\n    trackEvent\n  } = useTrackEvent();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const foundIndex = findCurrentIndexByValue(brandSaleCouponList ?? [], queryBrandSaleCouponId ? Number(queryBrandSaleCouponId) : void 0, \"brandSaleCouponId\");\n  const currentIndex = foundIndex === -1 ? 0 : foundIndex;\n  const handleClick = (brand, index) => () => {\n    if (!brand) {\n      return;\n    }\n    trackEvent({\n      component_type: \"tag\",\n      tag_type: \"brand\",\n      tag_name: brand.nameKor,\n      tag_value: brand.frontBrandId,\n      position: index + 1\n    });\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      button_id: \"image_tag\",\n      button_name: brand.nameKor,\n      layout_position: -1\n    });\n  };\n  return /* @__PURE__ */ jsxs(Profiles.Root, { loading: isPending, value: currentIndex, children: [\n    /* @__PURE__ */ jsxs(\"div\", { style: {\n      ...profilesLayoutBaseStyle,\n      ...profilesLayoutStyleByBreakpoint[breakpoint]\n    }, children: [\n      /* @__PURE__ */ jsx(\"div\", { style: profilesListStyleByBreakpoint[breakpoint], children: /* @__PURE__ */ jsx(Profiles.List, { list: brandSaleCouponList, style: {\n        marginBottom: 4\n      }, children: ({\n        item,\n        index\n      }) => /* @__PURE__ */ jsx(Profiles.Item, { value: index, name: (item == null ? void 0 : item.frontBrand.nameKor) ?? \"\", imageSrc: (item == null ? void 0 : item.frontBrand.iconImageUrl) ?? \"\", onClick: handleClick(item == null ? void 0 : item.frontBrand, index) }) }) }),\n      /* @__PURE__ */ jsx(\"div\", { style: {\n        ...brandCouponBaseStyle,\n        ...brandCouponStyleByBreakpoint[breakpoint]\n      }, children: /* @__PURE__ */ jsx(Profiles.Panels, { list: brandSaleCouponList, children: ({\n        item,\n        index\n      }) => /* @__PURE__ */ jsx(Profiles.Panel, { value: index, children: /* @__PURE__ */ jsx(ConditionalThemeProvider, { theme: couponTheme, children: /* @__PURE__ */ jsx(DownloadableCoupon, { coupon: formatCoupon({\n        coupon: item == null ? void 0 : item.coupon,\n        brand: item == null ? void 0 : item.frontBrand\n      }), backgroundColor: couponColor, layout: couponLayout }) }) }) }) })\n    ] }),\n    /* @__PURE__ */ jsx(Profiles.Panels, { list: brandSaleCouponList, children: ({\n      item,\n      index\n    }) => /* @__PURE__ */ jsx(Profiles.Panel, { value: index, children: children(item == null ? void 0 : item.couponCollectionId, item == null ? void 0 : item.frontBrand) }) })\n  ] });\n};\nconst profilesLayoutBaseStyle = {\n  display: \"flex\",\n  width: \"100%\"\n};\nconst profilesLayoutStyleByBreakpoint = {\n  desktop: {\n    flexDirection: \"row\",\n    gap: GAP\n  },\n  tablet: {\n    flexDirection: \"row\",\n    gap: GAP\n  },\n  mobile: {\n    flexDirection: \"column\"\n  }\n};\nconst profilesListStyleByBreakpoint = {\n  desktop: {\n    width: `calc(100% - ${COUPON_MAX_WIDTH}px - ${GAP}px)`\n  },\n  tablet: {\n    width: `calc(100% - ${COUPON_MAX_WIDTH}px - ${GAP}px)`\n  },\n  mobile: {\n    width: \"100%\"\n  }\n};\nconst brandCouponBaseStyle = {\n  width: \"100%\"\n};\nconst brandCouponStyleByBreakpoint = {\n  desktop: {\n    maxWidth: COUPON_MAX_WIDTH,\n    padding: 0\n  },\n  tablet: {\n    maxWidth: COUPON_MAX_WIDTH,\n    padding: \"0px 20px 0px 0px\"\n  },\n  mobile: {\n    padding: \"0px 20px 16px\"\n  }\n};\nexport {\n  BrandProfiles\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { createContext, useMemo } from \"react\";\nimport { isBefore } from \"../../../../../../node_modules/date-fns/isBefore.js\";\nconst CouponScheduleContext = createContext(null);\nconst CouponScheduleProvider = ({\n  children,\n  startDate,\n  endDate\n}) => {\n  const hasDate = startDate !== void 0 && endDate !== void 0;\n  const isBefore$1 = useMemo(() => hasDate && isBefore(/* @__PURE__ */ new Date(), startDate), [hasDate, startDate]);\n  const isAfter = useMemo(() => hasDate && isBefore(endDate, /* @__PURE__ */ new Date()), [hasDate, endDate]);\n  const isActive = useMemo(() => hasDate && isBefore(startDate, /* @__PURE__ */ new Date()) && isBefore(/* @__PURE__ */ new Date(), endDate), [hasDate, startDate, endDate]);\n  return /* @__PURE__ */ jsx(CouponScheduleContext.Provider, { value: {\n    startDate,\n    endDate,\n    isBefore: isBefore$1,\n    isAfter,\n    isActive\n  }, children });\n};\nexport {\n  CouponScheduleContext,\n  CouponScheduleProvider\n};\n","import { useContext } from \"react\";\nimport { CouponScheduleContext } from \"./CouponScheduleProvider.js\";\nconst useCouponScheduleContext = () => {\n  const context = useContext(CouponScheduleContext);\n  if (!context) {\n    throw new Error(\"useCouponScheduleContext should be used within CouponCollection\");\n  }\n  return context;\n};\nexport {\n  useCouponScheduleContext\n};\n","import { jsxs, Fragment, jsx } from \"react/jsx-runtime\";\nimport { Headline } from \"../../Headline/index.js\";\nimport { SectionDivider } from \"../../SectionDivider/SectionDivider.js\";\nimport { useCouponScheduleContext } from \"../provider/CouponScheduleProvider/CouponScheduleProvider.hooks.js\";\nimport { typography } from \"../../../../../styles/typography.js\";\nimport { Countdown } from \"../../../Countdown/Countdown.js\";\nimport { SubscriptionButton } from \"../../SubscriptionButton/SubscriptionButton.js\";\nimport { formatScheduleTime } from \"../../../../../utils/formatScheduleTime.js\";\nimport { splitToStringArray } from \"../../../../../utils/splitToStringArray.js\";\nimport { restOf } from \"../../../../../utils/restOf.js\";\nimport \"react\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../config/index.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport { useTheme } from \"../../../../../hooks/useTheme.js\";\nimport \"../../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { Skeleton } from \"../../../../@shared/Skeleton/Skeleton.js\";\nimport { formatDate as format } from \"../../../../../node_modules/date-fns/format.js\";\nconst BrandProfilesHeadline = ({\n  brandSaleGroupId,\n  subscription,\n  index,\n  isPending\n}) => {\n  const {\n    isActive,\n    isBefore,\n    isAfter,\n    startDate,\n    endDate\n  } = useCouponScheduleContext();\n  const theme = useTheme();\n  const eventKeys = splitToStringArray(subscription.eventKeys);\n  const renderHeadlineAction = () => {\n    if (isActive && endDate) {\n      return /* @__PURE__ */ jsx(Countdown, { targetDateString: format(endDate, \"yyyy-MM-dd\"), targetTimeString: format(endDate, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 15, color: countdownColorByTheme[theme], style: {\n        ...typography(15, 500)\n      } });\n    }\n    if (isBefore) {\n      return subscription.visible ? /* @__PURE__ */ jsx(SubscriptionButton, { activeColor: subscription.activeColor, sectionKey: `${brandSaleGroupId}`, eventKey: eventKeys[index] ?? \"\", restEventKeys: restOf(eventKeys, index) }) : null;\n    }\n    return null;\n  };\n  const renderHeadlineTitle = () => {\n    if (isActive) {\n      return \"종료까지 남은 시간\";\n    }\n    if (isBefore && startDate) {\n      return formatScheduleTime(startDate, \"오픈\");\n    }\n    if (isAfter) {\n      return \"종료된 이벤트\";\n    }\n    return \"\";\n  };\n  return /* @__PURE__ */ jsxs(Fragment, { children: [\n    /* @__PURE__ */ jsx(Headline.Root, { priority: \"secondary\", style: {\n      paddingTop: 0\n    }, children: /* @__PURE__ */ jsxs(Headline.Content, { contentStyle: {\n      minHeight: \"unset\"\n    }, style: {\n      paddingTop: 18,\n      paddingBottom: 16\n    }, children: [\n      /* @__PURE__ */ jsx(Headline.Body, { style: headlineTitleStyle, children: /* @__PURE__ */ jsx(Headline.Title, { children: isPending ? /* @__PURE__ */ jsx(Skeleton, { style: {\n        ...headlineTitleSkeletonStyle,\n        ...skeletonStyleByTheme[theme]\n      } }) : renderHeadlineTitle() }) }),\n      /* @__PURE__ */ jsx(Headline.Action, { style: {\n        color: \"#FFFFFF\"\n      }, children: isPending ? /* @__PURE__ */ jsx(Skeleton, { style: {\n        ...headlineTitleSkeletonStyle,\n        ...skeletonStyleByTheme[theme]\n      } }) : renderHeadlineAction() })\n    ] }) }),\n    /* @__PURE__ */ jsx(SectionDivider, {})\n  ] });\n};\nconst headlineTitleStyle = {\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\"\n};\nconst headlineTitleSkeletonStyle = {\n  width: 90,\n  height: 21,\n  borderRadius: 2\n};\nconst skeletonStyleByTheme = {\n  light: {\n    backgroundColor: \"#dee2e6\"\n  },\n  dark: {\n    backgroundColor: \"#27272a\"\n  }\n};\nconst countdownColorByTheme = {\n  light: \"#FF4800\",\n  dark: \"#D53E00\"\n};\nexport {\n  BrandProfilesHeadline\n};\n","import { createKRTimeZoneDate } from \"../../../../../utils/createUTCDate.js\";\nimport { isAbove } from \"../../../../../utils/date.js\";\nimport { ko } from \"../../../../../node_modules/date-fns/locale/ko.js\";\nimport { isWithinInterval } from \"../../../../../node_modules/date-fns/isWithinInterval.js\";\nimport { formatDate as format } from \"../../../../../node_modules/date-fns/format.js\";\nimport { differenceInHours } from \"../../../../../node_modules/date-fns/differenceInHours.js\";\nconst STANDARD_DIFF_HOURS = 48;\nconst getCurrentBrandSaleIndex = (brandSaleList) => {\n  const now = createKRTimeZoneDate();\n  const currentIndex = brandSaleList.findIndex((brandSale, index) => {\n    const nextInterval = brandSaleList[index + 1];\n    const hasNext = nextInterval !== void 0;\n    const start = new Date(brandSale.displayStartAt);\n    const end = new Date(brandSale.displayEndAt);\n    const isWithin = hasNext && isWithinInterval(now, {\n      start,\n      end\n    });\n    const isLast = !hasNext && isAbove(now, start);\n    return isWithin || isLast;\n  });\n  return currentIndex === -1 ? void 0 : currentIndex;\n};\nconst getCalendarTagName = ({\n  displayStartAt,\n  displayEndAt\n}) => {\n  const defaultTagName = format(displayStartAt, \"M. d eeeee\", {\n    locale: ko\n  });\n  if (!displayEndAt) {\n    return defaultTagName;\n  }\n  const diff = differenceInHours(displayEndAt, displayStartAt);\n  if (diff > STANDARD_DIFF_HOURS) {\n    return `${defaultTagName} 시작`;\n  }\n  return defaultTagName;\n};\nexport {\n  getCalendarTagName,\n  getCurrentBrandSaleIndex\n};\n","import { useFetchBrandSaleGroup } from \"../../../../../hooks/fetchers/useFetchBrandSaleGroup.js\";\nconst useBrandSaleGroup = (brandSaleGroupId) => {\n  const {\n    isLoading,\n    error,\n    data\n  } = useFetchBrandSaleGroup(brandSaleGroupId);\n  const hasError = error !== void 0;\n  const isPending = isLoading || hasError;\n  const brandSaleList = (data == null ? void 0 : data.data.brandSaleList) ?? [];\n  const title = data == null ? void 0 : data.data.title;\n  return {\n    title,\n    brandSaleList,\n    isPending\n  };\n};\nexport {\n  useBrandSaleGroup\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { memo, useMemo } from \"react\";\nimport { useComponentId, useTrackEvent } from \"../../EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../../EventTrackingProvider/EventTrackingProvider.js\";\nimport { getCurrentBrandSaleIndex, getCalendarTagName } from \"./CalendarTags.utils.js\";\nimport { useBrandSaleGroup } from \"./CalendarTags.hooks.js\";\nimport { Tags } from \"../../Tags/index.js\";\nimport { Tag } from \"../../../../@shared/Tag/Tag.js\";\nimport \"framer-motion\";\nimport \"react-dom\";\nimport { Icon } from \"../../../../@shared/Icon/Icon.js\";\nimport \"../../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport \"../../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../../config/index.js\";\nimport \"../../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"../../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../../apis/preuser/PreuserApiService.js\";\nimport \"framer\";\nimport \"../../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../../../hooks/stores/content/content.store.js\";\nimport \"../../../../../hooks/stores/dialog/dialog.store.js\";\nimport \"../../../../../hooks/stores/global-layout/global-layout.store.js\";\nimport \"../../../../../hooks/stores/toast/toast.store.js\";\nimport \"../../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport { useBreakpoint } from \"../../../../../hooks/useBreakpoint.js\";\nimport \"../../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../Dialog/Dialog.module.css.js\";\nimport \"../../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../../utils/redirectLogin.js\";\nimport \"../../../../../utils/event-properties/source.js\";\nimport { useTrackSnowplowEvent } from \"../../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { EventTrigger } from \"../../../../@shared/EventTrigger/index.js\";\nimport { findCurrentIndexByValue } from \"../CouponCollectionV2.utils.js\";\nconst DEFAULT_INDEX = 0;\nconst SCHEDULE_BUTTON_NAME = \"스케줄\";\nconst CalendarTags = memo(({\n  children,\n  brandSaleGroupId,\n  scheduleTag,\n  queryBrandSaleId\n}) => {\n  const componentId = useComponentId();\n  const {\n    trackEvent\n  } = useTrackEvent();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const breakpoint = useBreakpoint();\n  const {\n    brandSaleList,\n    isPending\n  } = useBrandSaleGroup(brandSaleGroupId);\n  const currentIndex = useMemo(() => {\n    const foundIndex = findCurrentIndexByValue(brandSaleList, queryBrandSaleId ? Number(queryBrandSaleId) : void 0, \"brandSaleId\");\n    if (foundIndex === -1) {\n      return getCurrentBrandSaleIndex(brandSaleList) ?? 0;\n    }\n    return foundIndex;\n  }, [brandSaleList, queryBrandSaleId]);\n  const handleClickSchedule = () => {\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      button_id: \"brand_schedule\",\n      button_name: SCHEDULE_BUTTON_NAME,\n      layout_position: -1\n    });\n  };\n  const handleClick = (item, index) => () => {\n    if (!item) {\n      return;\n    }\n    trackEvent({\n      component_type: \"tag\",\n      tag_type: \"time\",\n      tag_name: item.title,\n      position: index + 1\n    });\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: index + 1,\n      button_id: \"tag\",\n      button_name: getCalendarTagName({\n        displayStartAt: item.displayStartAt,\n        displayEndAt: item.displayEndAt\n      }),\n      layout_position: -1\n    });\n  };\n  return /* @__PURE__ */ jsxs(Tags.Root, { defaultValue: DEFAULT_INDEX, value: currentIndex, loading: isPending, dragPaddingLeft: scheduleTag.visible ? 8 : void 0, children: [\n    /* @__PURE__ */ jsxs(\"div\", { style: containerStyle, children: [\n      scheduleTag.visible ? /* @__PURE__ */ jsx(\"div\", { style: {\n        ...wrapperStyleByBreakpoint[breakpoint],\n        ...wrapperStyle\n      }, children: /* @__PURE__ */ jsx(EventTrigger.Target, { onClick: handleClickSchedule, children: /* @__PURE__ */ jsx(\"a\", { style: anchorStyle, href: scheduleTag.href, target: \"_blank\", rel: \"noreferrer\", children: /* @__PURE__ */ jsxs(Tag, { style: {\n        ...tagStyle,\n        color: scheduleTag.color,\n        borderColor: scheduleTag.color\n      }, children: [\n        /* @__PURE__ */ jsx(Icon, { type: \"checkCalendar\", color: scheduleTag.color, weight: \"bold\", size: 16 }),\n        SCHEDULE_BUTTON_NAME\n      ] }) }) }) }) : null,\n      /* @__PURE__ */ jsx(Tags.List, { list: brandSaleList, style: {\n        marginBottom: 0\n      }, children: ({\n        index,\n        item\n      }) => /* @__PURE__ */ jsx(Tags.Item, { value: index, onClick: handleClick(item, index), children: item ? getCalendarTagName({\n        displayStartAt: item.displayStartAt,\n        displayEndAt: item.displayEndAt\n      }) : \"\" }) })\n    ] }),\n    /* @__PURE__ */ jsx(Tags.Panels, { list: brandSaleList, children: ({\n      item,\n      index,\n      pending\n    }) => {\n      return /* @__PURE__ */ jsx(Tags.Panel, { value: index, children: children({\n        brandSaleId: item == null ? void 0 : item.brandSaleId,\n        startDate: item ? new Date(item.displayStartAt) : void 0,\n        endDate: item ? new Date(item.displayEndAt) : void 0,\n        index,\n        pending\n      }) }, item == null ? void 0 : item.brandSaleId);\n    } })\n  ] });\n});\nconst containerStyle = {\n  width: \"100%\",\n  display: \"flex\",\n  alignItems: \"center\"\n};\nconst wrapperStyle = {\n  boxSizing: \"border-box\"\n};\nconst wrapperStyleByBreakpoint = {\n  desktop: {\n    paddingLeft: 0\n  },\n  tablet: {\n    paddingLeft: 20\n  },\n  mobile: {\n    paddingLeft: 20\n  }\n};\nconst anchorStyle = {\n  textDecoration: \"none\"\n};\nconst tagStyle = {\n  display: \"flex\",\n  alignItems: \"center\",\n  gap: 2,\n  paddingRight: 12,\n  paddingLeft: 10,\n  backgroundColor: \"transparent\",\n  borderWidth: 1,\n  borderStyle: \"solid\"\n};\nexport {\n  CalendarTags\n};\n","const TARGET_FRAGMENT = \"#timesalebrand\";\nconst COUPON_COLLECTION_SORT_TYPE = {\n  BEST: \"BEST\",\n  // 추천순\n  NEW: \"NEW\",\n  // 신상품순\n  REVIEW_DESC: \"REVIEW_DESC\",\n  // 리뷰많은순\n  PRICE_DESC: \"PRICE_DESC\",\n  // 높은가격순\n  PRICE_ASC: \"PRICE_ASC\",\n  // 낮은가격순\n  DISCOUNT_DESC: \"DISCOUNT_DESC\",\n  // 높은 할인순\n  LIKE_DESC: \"LIKE_DESC\",\n  // 좋아요 많은순\n  ORDER_DESC: \"ORDER_DESC\"\n  // 판매순\n};\nconst COUPON_COLLECTION_SORT_LABELS = {\n  [COUPON_COLLECTION_SORT_TYPE.BEST]: \"추천순\",\n  [COUPON_COLLECTION_SORT_TYPE.NEW]: \"신상품순\",\n  [COUPON_COLLECTION_SORT_TYPE.REVIEW_DESC]: \"리뷰많은순\",\n  [COUPON_COLLECTION_SORT_TYPE.PRICE_DESC]: \"높은가격순\",\n  [COUPON_COLLECTION_SORT_TYPE.PRICE_ASC]: \"낮은가격순\",\n  [COUPON_COLLECTION_SORT_TYPE.DISCOUNT_DESC]: \"높은 할인순\",\n  [COUPON_COLLECTION_SORT_TYPE.LIKE_DESC]: \"좋아요 많은순\",\n  [COUPON_COLLECTION_SORT_TYPE.ORDER_DESC]: \"판매순\"\n};\nexport {\n  COUPON_COLLECTION_SORT_LABELS,\n  COUPON_COLLECTION_SORT_TYPE,\n  TARGET_FRAGMENT\n};\n","import { jsx, jsxs } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { EventTrigger } from \"../../../@shared/EventTrigger/index.js\";\nimport { SWRErrorBoundary } from \"../../../@shared/SWRErrorBoundary/SWRErrorBoundary.js\";\nimport { Headline } from \"../../Headline/Headline.js\";\nimport { useTrackSnowplowEvent } from \"../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { COUPON_CONTROLS, COUPON_THEME_CONTROLS, toBackgroundColor, resolveCouponTheme, resolveCouponLayout } from \"../../../../libs/property-controls/coupon.js\";\nimport { SECTION_CONTROLS } from \"../../../../libs/property-controls/section.js\";\nimport { SUBSCRIPTION_CONTROLS } from \"../../../../libs/property-controls/subscription.js\";\nimport \"../../../../hooks/stores/content/content.store.js\";\nimport { getQueryParams } from \"../../../../utils/location.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport \"react\";\nimport { isClient } from \"../../../../utils/context.js\";\nimport { NoContent } from \"../NoContent/NoContent.js\";\nimport { SectionLayout } from \"../SectionLayout/SectionLayout.js\";\nimport { Brand } from \"./Brand/Brand.js\";\nimport { BrandGroupTags } from \"./BrandGroupTags/BrandGroupTags.js\";\nimport { BrandProfiles } from \"./BrandProfiles/BrandProfiles.js\";\nimport { BrandProfilesHeadline } from \"./BrandProfilesHeadline/BrandProfilesHeadline.js\";\nimport { CalendarTags } from \"./CalendarTags/CalendarTags.js\";\nimport { COUPON_COLLECTION_SORT_TYPE, COUPON_COLLECTION_SORT_LABELS, TARGET_FRAGMENT } from \"./CouponCollectionV2.types.js\";\nimport { CouponScheduleProvider } from \"./provider/CouponScheduleProvider/CouponScheduleProvider.js\";\nconst CouponCollectionV2 = ({\n  brandSaleGroupId,\n  componentId,\n  headline,\n  theme,\n  breakpoint,\n  backgroundColor,\n  couponLayout,\n  couponTheme,\n  subscription,\n  scheduleTag,\n  brandGroupIds,\n  sort = COUPON_COLLECTION_SORT_TYPE.NEW\n}) => {\n  const query = getQueryParams();\n  const hash = isClient() ? window.location.hash : \"\";\n  const isTargetFragment = hash === TARGET_FRAGMENT;\n  const queryBrandSaleId = isTargetFragment ? query.brandSaleId : void 0;\n  const queryBrandSaleCouponId = isTargetFragment ? query.brandSaleCouponId : void 0;\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const resolvedCouponLayout = resolveCouponLayout(couponLayout, breakpoint);\n  const handleImpression = () => {\n    trackSnowplowEvent(\"impression_content\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1\n    });\n  };\n  return /* @__PURE__ */ jsx(SectionLayout, { theme, breakpoint, componentId, children: /* @__PURE__ */ jsxs(EventTrigger.Root, { types: [\"impression\"], onImpression: handleImpression, children: [\n    /* @__PURE__ */ jsx(Headline, { ...headline, priority: \"primary\" }),\n    /* @__PURE__ */ jsx(SWRErrorBoundary, { fallback: (retry) => /* @__PURE__ */ jsx(NoContent, { onClick: retry }), children: /* @__PURE__ */ jsx(CalendarTags, { brandSaleGroupId, scheduleTag, queryBrandSaleId, children: ({\n      brandSaleId,\n      startDate,\n      endDate,\n      index,\n      pending\n    }) => /* @__PURE__ */ jsxs(CouponScheduleProvider, { startDate, endDate, children: [\n      /* @__PURE__ */ jsx(BrandProfilesHeadline, { isPending: pending, brandSaleGroupId, subscription, index }),\n      /* @__PURE__ */ jsx(BrandGroupTags, { brandSaleId, brandGroupIds, children: ({\n        brandSaleCouponList,\n        pending: brandGroupPending\n      }) => /* @__PURE__ */ jsx(BrandProfiles, { isPending: brandGroupPending, couponColor: toBackgroundColor(backgroundColor), couponLayout: resolvedCouponLayout, couponTheme: resolveCouponTheme(couponTheme), queryBrandSaleCouponId, brandSaleCouponList, children: (couponCollectionId, frontBrand) => /* @__PURE__ */ jsx(Brand, { couponCollectionId, frontBrand, sort }) }) })\n    ] }) }) })\n  ] }) });\n};\naddPropertyControls(CouponCollectionV2, {\n  ...SECTION_CONTROLS,\n  ...COUPON_CONTROLS,\n  ...COUPON_THEME_CONTROLS,\n  brandSaleGroupId: {\n    type: ControlType.String,\n    title: \"타임 세일 브랜드 ID\"\n  },\n  brandGroupIds: {\n    type: ControlType.String,\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    title: \"브랜드 그룹 ID\"\n  },\n  ...SUBSCRIPTION_CONTROLS,\n  sort: {\n    type: ControlType.Enum,\n    title: \"상품 정렬\",\n    description: \"쿠폰 컬렉션 상품 목록의 정렬 기준을 설정합니다.\",\n    options: Object.values(COUPON_COLLECTION_SORT_TYPE),\n    optionTitles: Object.values(COUPON_COLLECTION_SORT_TYPE).map((sortType) => COUPON_COLLECTION_SORT_LABELS[sortType]),\n    defaultValue: COUPON_COLLECTION_SORT_TYPE.NEW\n  },\n  scheduleTag: {\n    type: ControlType.Object,\n    title: \"스케줄 태그\",\n    controls: {\n      visible: {\n        type: ControlType.Boolean,\n        title: \"노출 여부\",\n        defaultValue: true\n      },\n      color: {\n        type: ControlType.Color,\n        title: \"색상\",\n        defaultValue: \"#000\"\n      },\n      href: {\n        type: ControlType.Link,\n        title: \"URL\"\n      }\n    }\n  }\n});\nexport {\n  CouponCollectionV2\n};\n","/** local */// import { CouponCollectionV2 } from \"https://localhost:4173/components/systems/curations/CouponCollectionV2/CouponCollectionV2.js\"\n/** dev */// import { CouponCollectionV2 } from \"https://asset.29cm.co.kr/contents/framer/dev/components/systems/curations/CouponCollectionV2/CouponCollectionV2.js\"\n/** production */import{CouponCollectionV2}from\"https://asset.29cm.co.kr/contents/framer/components/systems/curations/CouponCollectionV2/CouponCollectionV2.js\";CouponCollectionV2.displayName=\"[완성형]TimeSaleBrandV2\";/**\n * @framerDisableUnlink\n */export default CouponCollectionV2;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CouponCollectionV2\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CouponCollectionV2.map"],"mappings":"i1DAAqH,CAC/G,IAA+B,EAAoB,IAAS,CAGhE,GAAM,CACJ,WACA,YACA,UACA,WACE,GAAiC,GAAsB,EAP7B,IAAuB,IAAK,GAOa,EAAK,CAC5E,MAAO,CACL,YACA,WACA,UACA,UACD,kCCfqD,IACH,IACuC,IAC9B,KACC,KACZ,KACqB,KACP,KACe,KACgB,KACsH,KAC5I,IACqB,IACtB,IAC1D,IACoE,IACX,IACZ,IACc,IACL,IACsB,IAC1B,IACP,IAC1C,IAC8D,IACd,IACF,IACF,IACc,IAChB,KACY,IACA,IACE,IACrD,IAC2B,IACvB,IACuD,IAC/B,IACU,KACU,CAC7D,GAAuB,mBACvB,GAAqB,cACrB,IAAS,CACb,qBACA,aACA,UACI,CACJ,IAAM,EAA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