{"version":3,"file":"CouponModule.DBzyK9uu.mjs","names":["createContext","forwardRef","useCallback","containerStyle","useContext","forwardRef","forwardRef","containerStyle","forwardRef","containerStyle","containerStyleByLayout","forwardRef","forwardRef","COUPON_CONTROLS","initialState","sortCouponsByDiscountValueAscending","useMemo","useRef","useState","useCallback","useState","useState","useMemo","useRef","useState","Fragment","COUPON_CONTROLS"],"sources":["https:/asset.29cm.co.kr/contents/framer/utils/object.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.constants.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Root.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Description.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Divider.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Button.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Summary.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/Title.js","https:/asset.29cm.co.kr/contents/framer/components/@shared/Coupon/index.js","https:/asset.29cm.co.kr/contents/framer/hooks/fetchers/useFetchCouponsDownloadStatus.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/coupon.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.types.js","https:/asset.29cm.co.kr/contents/framer/components/modules/query-store/query.store.js","https:/asset.29cm.co.kr/contents/framer/components/modules/module-store/module.store.js","https:/asset.29cm.co.kr/contents/framer/components/modules/hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/types.js","https:/asset.29cm.co.kr/contents/framer/utils/spacing.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/NoticesElement/NoticesElement.utils.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/coupon-notices.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/NoticesElement/NoticesElement.js","https:/asset.29cm.co.kr/contents/framer/hooks/useVisibilityAwareInterval.js","https:/asset.29cm.co.kr/contents/framer/components/systems/RandomDiscountValue/RandomDiscountValue.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.utils.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.validate.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponElement/CouponElement.js","https:/asset.29cm.co.kr/contents/framer/components/modules/utils/key.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/LinkedCouponModule/LinkedCouponModule.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/component-id.js","https:/asset.29cm.co.kr/contents/framer/libs/property-controls/helpers.js","https:/asset.29cm.co.kr/contents/framer/components/modules/controls.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.controls.js","https:/asset.29cm.co.kr/contents/framer/apis/collection/CollectionApiService.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/AutoCouponModule/AutoCouponModule.hooks.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/AutoCouponModule/AutoCouponModule.js","https:/asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.js","https:/framerusercontent.com/modules/v2w1uRsZPJslVNIRLCeW/yhkl6WqA7KyG9pSUFZiW/CouponModule.js"],"sourcesContent":["const pick = (obj, keys) => {\n  const picked = {};\n  keys.forEach((key) => {\n    picked[key] = obj[key];\n  });\n  return picked;\n};\nconst isObject = (object) => {\n  return typeof object === \"object\" && object !== null && !Array.isArray(object);\n};\nexport {\n  isObject,\n  pick\n};\n","const variantByType = {\n  neutral: {\n    background: {\n      light: \"#dee2e6\",\n      dark: \"#27272a\"\n    },\n    primary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    secondary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    tertiary: {\n      light: \"rgba(0, 0, 0, 0.5)\",\n      dark: \"rgba(255, 255, 255, 0.5)\"\n    },\n    border: \"rgba(255, 255, 255, 0.13)\"\n  },\n  accent: {\n    // NOTE(임규민): 기본 key color, 외부에서 커스터마이즈가 가능한 값입니다.\n    background: {\n      light: \"#ff4800\",\n      dark: \"#ff4800\"\n    },\n    primary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    secondary: {\n      light: \"#000\",\n      dark: \"#fff\"\n    },\n    tertiary: {\n      light: \"rgba(0, 0, 0, 0.73)\",\n      dark: \"#fff\"\n    },\n    border: \"rgba(255, 255, 255, 0.5)\"\n  },\n  disabled: {\n    background: {\n      light: \"#dee2e6\",\n      dark: \"#27272a\"\n    },\n    primary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    secondary: {\n      light: \"#474747\",\n      dark: \"#a0a0a0\"\n    },\n    tertiary: {\n      light: \"rgba(0, 0, 0, 0.5)\",\n      dark: \"rgba(255, 255, 255, 0.5)\"\n    },\n    border: \"rgba(255, 255, 255, 0.13)\"\n  }\n};\nconst variantByStatus = {\n  upcoming: variantByType.neutral,\n  downloadable: variantByType.accent,\n  redownloadable: variantByType.accent,\n  downloaded: variantByType.neutral,\n  expired: variantByType.disabled,\n  disabled: variantByType.disabled,\n  issuanceLimitedReached: variantByType.disabled\n};\nexport {\n  variantByStatus,\n  variantByType\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { createContext, forwardRef, useCallback } from \"react\";\nimport { isObject } from \"../../../utils/object.js\";\nimport { Skeleton } from \"../Skeleton/Skeleton.js\";\nimport { variantByStatus } from \"./Root.constants.js\";\nconst CouponContext = createContext(null);\nconst Root = forwardRef(({\n  children,\n  style,\n  theme = \"light\",\n  loading = false,\n  status = \"downloadable\",\n  layout = \"detail\",\n  backgroundColor: _backgroundColor,\n  ...rest\n}, ref) => {\n  const variant = variantByStatus[status];\n  const backgroundColor = status === \"downloadable\" || status === \"redownloadable\" ? _backgroundColor ?? variant.background : variant.background;\n  const getBackground = useCallback(() => {\n    if (!isObject(backgroundColor)) {\n      return backgroundColor;\n    }\n    if (\"stops\" in backgroundColor) {\n      return getLinearGradient(backgroundColor);\n    }\n    return backgroundColor[theme];\n  }, [backgroundColor, theme]);\n  return /* @__PURE__ */ jsx(CouponContext.Provider, { value: {\n    status,\n    variant,\n    layout\n  }, children: /* @__PURE__ */ jsx(\"div\", { ref, style: {\n    ...containerStyle,\n    ...style\n  }, ...rest, children: loading ? /* @__PURE__ */ jsx(Skeleton, { style: {\n    ...skeletonStyle,\n    ...skeletonStyleByTheme[theme],\n    ...skeletonStyleByLayout[layout]\n  } }) : /* @__PURE__ */ jsx(\"div\", { style: {\n    ...wrapperStyle,\n    background: getBackground(),\n    ...wrapperStyleByLayout[layout],\n    ...layout === \"compact\" ? compactWrapperStyleByStatus[status] : {}\n  }, children }) }) });\n});\nconst getLinearGradient = (linearGradient) => {\n  const {\n    stops,\n    degree\n  } = linearGradient;\n  const gradient = [...stops].sort((x, y) => x.offsetPercent - y.offsetPercent).map((stop) => `${stop.color} ${stop.offsetPercent}%`).join(\", \");\n  return `linear-gradient(${degree}deg, ${gradient})`;\n};\nconst containerStyle = {\n  width: \"100%\"\n};\nconst wrapperStyle = {\n  position: \"relative\",\n  width: \"100%\",\n  display: \"flex\",\n  borderRadius: 4,\n  overflow: \"hidden\"\n};\nconst wrapperStyleByLayout = {\n  compact: {\n    height: 44,\n    WebkitMaskImage: `url('data:image/svg+xml;utf8,<svg width=\"7\" height=\"14\" viewBox=\"0 0 7 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 7C7 10.866 3.866 14 0 14C0 9.18 0 4.822 0 0C3.866 0 7 3.134 7 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    maskImage: `url('data:image/svg+xml;utf8,<svg width=\"7\" height=\"14\" viewBox=\"0 0 7 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 7C7 10.866 3.866 14 0 14C0 9.18 0 4.822 0 0C3.866 0 7 3.134 7 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    WebkitMaskComposite: \"exclude\",\n    maskComposite: \"exclude\",\n    WebkitMaskPosition: \"0 50%\",\n    maskPosition: \"0 50%\",\n    WebkitMaskSize: \"7px 14px, auto\",\n    maskSize: \"7px 14px, auto\",\n    WebkitMaskRepeat: \"no-repeat\",\n    maskRepeat: \"no-repeat\"\n  },\n  detail: {\n    height: 64,\n    WebkitMaskImage: `url('data:image/svg+xml;utf8,<svg width=\"7\" height=\"14\" viewBox=\"0 0 7 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 7C7 10.866 3.866 14 0 14C0 9.18 0 4.822 0 0C3.866 0 7 3.134 7 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    maskImage: `url('data:image/svg+xml;utf8,<svg width=\"7\" height=\"14\" viewBox=\"0 0 7 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M7 7C7 10.866 3.866 14 0 14C0 9.18 0 4.822 0 0C3.866 0 7 3.134 7 7Z\" fill=\"white\"/></svg>'), linear-gradient(#fff,#fff)`,\n    WebkitMaskComposite: \"exclude\",\n    maskComposite: \"exclude\",\n    WebkitMaskPosition: \"0 50%\",\n    maskPosition: \"0 50%\",\n    WebkitMaskSize: \"7px 14px, auto\",\n    maskSize: \"7px 14px, auto\",\n    WebkitMaskRepeat: \"no-repeat\",\n    maskRepeat: \"no-repeat\"\n  }\n};\nconst compactWrapperStyleByStatus = {\n  upcoming: {\n    cursor: \"not-allowed\"\n  },\n  downloadable: {\n    cursor: \"pointer\"\n  },\n  redownloadable: {\n    cursor: \"pointer\"\n  },\n  downloaded: {\n    cursor: \"pointer\"\n  },\n  expired: {\n    cursor: \"not-allowed\"\n  },\n  disabled: {\n    cursor: \"not-allowed\"\n  },\n  issuanceLimitedReached: {\n    cursor: \"not-allowed\"\n  }\n};\nconst skeletonStyle = {\n  width: \"100%\",\n  borderRadius: 4\n};\nconst skeletonStyleByTheme = {\n  light: {\n    backgroundColor: \"#dee2e6\"\n  },\n  dark: {\n    backgroundColor: \"#27272a\"\n  }\n};\nconst skeletonStyleByLayout = {\n  compact: {\n    height: 44\n  },\n  detail: {\n    height: 64\n  }\n};\nexport {\n  CouponContext,\n  Root\n};\n","import { useContext } from \"react\";\nimport { CouponContext } from \"./Root.js\";\nconst useCouponContext = () => {\n  const context = useContext(CouponContext);\n  if (!context) {\n    throw new Error(\"useCouponContext should be used with in Root\");\n  }\n  return context;\n};\nexport {\n  useCouponContext\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"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 \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../apis/user/UserApiService.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.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 \"../providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../hooks/useFeatureFlag.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Description = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  if (layout === \"compact\") {\n    return null;\n  }\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...typography(11, 500, 1.36),\n    color: variant.tertiary[theme],\n    ...style\n  }, children });\n});\nexport {\n  Description\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"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 \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../apis/user/UserApiService.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.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 \"../providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../hooks/useFeatureFlag.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Divider = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const theme = useTheme();\n  const {\n    layout\n  } = useCouponContext();\n  if (layout === \"compact\") {\n    return null;\n  }\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByTheme[theme],\n    ...style\n  }, children });\n});\nconst containerStyle = {\n  zIndex: 1,\n  height: \"100%\",\n  borderLeftWidth: \"1px\",\n  borderLeftStyle: \"dashed\",\n  opacity: 0.2\n};\nconst containerStyleByTheme = {\n  light: {\n    borderColor: \"#000\"\n  },\n  dark: {\n    borderColor: \"#fff\"\n  }\n};\nexport {\n  Divider\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"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 \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../apis/user/UserApiService.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.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 \"../providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../hooks/useFeatureFlag.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { playHaptic } from \"../../../utils/playHaptic.js\";\nimport { Icon } from \"../Icon/Icon.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Button = forwardRef(({\n  style,\n  onClick,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    status,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  const {\n    icon,\n    text\n  } = contentByStatus[status];\n  const shouldRenderIcon = layout === \"detail\" || status === \"downloadable\" || status === \"redownloadable\" || status === \"downloaded\";\n  const getIconSize = () => {\n    if (layout === \"detail\") {\n      return 24;\n    }\n    if (layout === \"compact\") {\n      return 14;\n    }\n    return 16;\n  };\n  const getIconType = () => {\n    if (layout === \"compact\" && icon === \"download\") {\n      return \"downloadSlim\";\n    }\n    return icon;\n  };\n  const handleClick = (e) => {\n    if (status === \"upcoming\" || status === \"expired\") {\n      return;\n    }\n    playHaptic(\"rigid\");\n    onClick == null ? void 0 : onClick(e);\n  };\n  return /* @__PURE__ */ jsxs(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByLayout[layout],\n    ...style,\n    ...containerStyleByStatus[status]\n  }, onClick: handleClick, children: [\n    shouldRenderIcon ? /* @__PURE__ */ jsx(Icon, { type: getIconType(), weight: layout === \"detail\" ? \"light\" : \"regular\", size: getIconSize(), color: variant.secondary[theme] }) : null,\n    /* @__PURE__ */ jsx(\"div\", { style: {\n      ...textStyleByLayout[layout],\n      color: variant.secondary[theme]\n    }, children: text })\n  ] });\n});\nconst contentByStatus = {\n  upcoming: {\n    icon: \"clock\",\n    text: \"발행예정\"\n  },\n  downloadable: {\n    icon: \"download\",\n    text: \"쿠폰받기\"\n  },\n  redownloadable: {\n    icon: \"download\",\n    text: \"다시 받기\"\n  },\n  downloaded: {\n    icon: \"check\",\n    text: \"받기완료\"\n  },\n  expired: {\n    icon: \"close\",\n    text: \"기간만료\"\n  },\n  disabled: {\n    icon: \"close\",\n    text: \"사용불가\"\n  },\n  issuanceLimitedReached: {\n    icon: \"close\",\n    text: \"받기마감\"\n  }\n};\nconst containerStyle = {\n  zIndex: 1,\n  height: \"100%\",\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  gap: 4\n};\nconst containerStyleByLayout = {\n  compact: {\n    paddingRight: 16,\n    flexShrink: 0\n  },\n  detail: {\n    aspectRatio: \"1 / 1\",\n    flexDirection: \"column\"\n  }\n};\nconst textStyleByLayout = {\n  compact: typography(12, 500),\n  detail: typography(10, 500, 1.2)\n};\nconst containerStyleByStatus = {\n  upcoming: {\n    cursor: \"not-allowed\"\n  },\n  downloadable: {\n    cursor: \"pointer\"\n  },\n  redownloadable: {\n    cursor: \"pointer\"\n  },\n  downloaded: {\n    cursor: \"pointer\"\n  },\n  expired: {\n    cursor: \"not-allowed\"\n  },\n  disabled: {\n    cursor: \"not-allowed\"\n  },\n  issuanceLimitedReached: {\n    cursor: \"not-allowed\"\n  }\n};\nexport {\n  Button\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Summary = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    layout\n  } = useCouponContext();\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...containerStyle,\n    ...containerStyleByLayout[layout],\n    ...style\n  }, children });\n});\nconst containerStyle = {\n  zIndex: 1,\n  flex: 1,\n  height: \"100%\",\n  display: \"flex\",\n  flexDirection: \"column\",\n  justifyContent: \"center\",\n  gap: 2\n};\nconst containerStyleByLayout = {\n  compact: {\n    flexDirection: \"row\",\n    alignItems: \"center\",\n    gap: 12,\n    padding: \"0px 0px 0px 18px\"\n  },\n  detail: {\n    gap: 1,\n    padding: \"0px 8px 0px 26px\"\n  }\n};\nexport {\n  Summary\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"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 \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../apis/user/UserApiService.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.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 \"../providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../hooks/useFeatureFlag.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../styles/typography.js\";\nimport { useCouponContext } from \"./Root.hooks.js\";\nconst Title = forwardRef(({\n  children,\n  style,\n  ...rest\n}, ref) => {\n  const {\n    variant,\n    layout\n  } = useCouponContext();\n  const theme = useTheme();\n  return /* @__PURE__ */ jsx(\"div\", { ref, ...rest, style: {\n    ...styleByLayout[layout],\n    color: variant.primary[theme],\n    ...style\n  }, children });\n});\nconst styleByLayout = {\n  compact: {\n    flex: \"1 0 0\",\n    overflow: \"hidden\",\n    textOverflow: \"ellipsis\",\n    whiteSpace: \"nowrap\",\n    ...typography(14, 500, 1.4)\n  },\n  detail: {\n    ...typography(14, 600)\n  }\n};\nexport {\n  Title\n};\n","import { Description } from \"./Description.js\";\nimport { Divider } from \"./Divider.js\";\nimport { Root } from \"./Root.js\";\nimport { Button } from \"./Button.js\";\nimport { Summary } from \"./Summary.js\";\nimport { Title } from \"./Title.js\";\nconst Coupon = {\n  Root,\n  Summary,\n  Title,\n  Description,\n  Divider,\n  Button\n};\nexport {\n  Coupon\n};\n","import useSWR from \"../../node_modules/swr/core/dist/index.js\";\nimport { couponApi } from \"../../apis/coupon/CouponApiService.js\";\nconst COUPONS_DOWNLOAD_STATUS_FETCHER_KEY = \"@coupon/coupons-download-status\";\nconst useFetchCouponsDownloadStatus = (couponIds, userNo, enabled = true) => {\n  const canFetch = couponIds.length > 0 && Boolean(userNo) && enabled;\n  const {\n    isLoading,\n    data,\n    ...rest\n  } = useSWR(canFetch ? [COUPONS_DOWNLOAD_STATUS_FETCHER_KEY, ...couponIds] : null, () => couponApi.getCouponsDownloadStatus(couponIds, Number(userNo)), {\n    revalidateIfStale: true\n  });\n  return {\n    isLoading: isLoading || !canFetch,\n    statuses: data ?? [],\n    ...rest\n  };\n};\nexport {\n  useFetchCouponsDownloadStatus\n};\n","import { ControlType } from \"framer\";\nimport { DiscountType, KindType } from \"../../types/models/coupon.js\";\nconst COUPON_LAYOUT_RESPONSIVE = \"responsive\";\nvar CouponColorType = /* @__PURE__ */ ((CouponColorType2) => {\n  CouponColorType2[\"DEFAULT\"] = \"default\";\n  CouponColorType2[\"SOLID\"] = \"solid\";\n  CouponColorType2[\"GRADIENT\"] = \"gradient\";\n  return CouponColorType2;\n})(CouponColorType || {});\nconst COUPON_CONTROLS = {\n  couponLayout: {\n    type: ControlType.Enum,\n    title: \"쿠폰 레이아웃\",\n    options: [\"detail\", \"compact\", COUPON_LAYOUT_RESPONSIVE],\n    optionTitles: [\"기본\", \"컴팩트\", \"반응형\"],\n    defaultValue: \"detail\"\n  },\n  backgroundColor: {\n    type: ControlType.Object,\n    title: \"쿠폰 배경색\",\n    controls: {\n      colorType: {\n        type: ControlType.Enum,\n        title: \"유형\",\n        optionTitles: [\"기본\", \"단색\", \"그라디언트\"],\n        options: [\n          \"default\",\n          \"solid\",\n          \"gradient\"\n          /* GRADIENT */\n        ]\n      },\n      color: {\n        type: ControlType.Color,\n        title: \"단색\",\n        optional: true,\n        hidden: ({\n          colorType\n        }) => colorType !== \"solid\"\n        /* SOLID */\n      },\n      gradient: {\n        type: ControlType.Object,\n        title: \"그라디언트\",\n        controls: {\n          stops: {\n            type: ControlType.Array,\n            title: \"색상 및 정지점들\",\n            control: {\n              type: ControlType.Object,\n              title: \"색상 및 정지점\",\n              controls: {\n                color: {\n                  type: ControlType.Color,\n                  title: \"색상\",\n                  optional: true\n                },\n                offsetPercent: {\n                  type: ControlType.Number,\n                  title: \"정지점\",\n                  unit: \"%\",\n                  min: 0,\n                  max: 100,\n                  defaultValue: 0,\n                  step: 1,\n                  displayStepper: true\n                }\n              }\n            }\n          },\n          degree: {\n            type: ControlType.Number,\n            title: \"각도\",\n            unit: \"deg\",\n            defaultValue: 0,\n            step: 1,\n            displayStepper: true\n          }\n        },\n        hidden: ({\n          colorType\n        }) => colorType !== \"gradient\"\n        /* GRADIENT */\n      }\n    }\n  }\n};\nconst COUPON_THEME_TYPE = {\n  DEFAULT: \"default\",\n  LIGHT: \"light\",\n  DARK: \"dark\"\n};\nconst COUPON_THEME_CONTROLS = {\n  couponTheme: {\n    type: ControlType.Enum,\n    title: \"쿠폰 테마\",\n    description: \"쿠폰 영역에 별도 테마를 적용합니다. 기본은 섹션 테마를 따릅니다.\",\n    options: [COUPON_THEME_TYPE.DEFAULT, COUPON_THEME_TYPE.LIGHT, COUPON_THEME_TYPE.DARK],\n    optionTitles: [\"기본 (테마 동일)\", \"Light\", \"Dark\"],\n    defaultValue: COUPON_THEME_TYPE.DEFAULT\n  }\n};\nconst DEFAULT_COUPON_NAME_VISIBILITY = {\n  discountValue: true,\n  brandName: true,\n  applicationType: true,\n  couponCount: false\n};\nconst DEFAULT_COUPON_MODULE_NAME_VISIBILITY = {\n  discountValue: true,\n  brandName: false,\n  applicationType: true,\n  couponCount: true\n};\nconst COUPON_MODULE_NAME_VISIBILITY_CONTROLS = {\n  couponNameVisibility: {\n    type: ControlType.Object,\n    title: \"쿠폰명 노출 옵션\",\n    controls: {\n      discountValue: {\n        type: ControlType.Boolean,\n        title: \"할인값\",\n        description: \"쿠폰명에 할인 수치(예: 10%, 3,000원)를 노출합니다.\",\n        defaultValue: true\n      },\n      applicationType: {\n        type: ControlType.Boolean,\n        title: \"적용방식\",\n        description: \"쿠폰명에 적용 대상을 노출합니다. (예: 상품, 장바구니)\",\n        defaultValue: true\n      },\n      couponCount: {\n        type: ControlType.Boolean,\n        title: \"쿠폰 개수\",\n        description: \"복수 발급 쿠폰일 때 쿠폰 장수(예: 2장)를 노출합니다.\",\n        defaultValue: true\n      }\n    }\n  }\n};\nconst COUPON_NAME_FIXED_TEXT = \"쿠폰\";\nconst getCouponDiscountValueText = (coupon) => {\n  if (coupon.discountType === DiscountType.FIXED_PRICE) {\n    return `${coupon.discountValue.toLocaleString(\"ko-KR\")}원`;\n  }\n  return `${coupon.discountValue}%`;\n};\nconst getCouponApplicationTypeText = (couponKindType) => {\n  if (couponKindType === KindType.PRODUCT) {\n    return \"상품\";\n  }\n  if (couponKindType === KindType.CART) {\n    return \"장바구니\";\n  }\n  return \"\";\n};\nconst getCouponCountText = (personMaxIssueCount) => (personMaxIssueCount ?? 0) > 1 ? `${personMaxIssueCount}장` : \"\";\nconst composeCouponName = ({\n  discountValue = \"\",\n  brandName = \"\",\n  applicationType = \"\",\n  couponCount = \"\",\n  visibility\n}) => {\n  return [visibility.discountValue ? discountValue : \"\", visibility.brandName ? brandName : \"\", visibility.applicationType ? applicationType : \"\", COUPON_NAME_FIXED_TEXT, visibility.couponCount ? couponCount : \"\"].filter(Boolean).join(\" \");\n};\nconst composeCouponNameFromCoupon = ({\n  coupon,\n  brandName = \"\",\n  visibility\n}) => composeCouponName({\n  discountValue: getCouponDiscountValueText(coupon),\n  brandName,\n  applicationType: getCouponApplicationTypeText(coupon.couponKindType),\n  couponCount: getCouponCountText(coupon.personMaxIssueCount),\n  visibility\n});\nconst resolveCouponTheme = (couponTheme) => couponTheme === COUPON_THEME_TYPE.DEFAULT ? void 0 : couponTheme;\nconst resolveCouponLayout = (couponLayout, breakpoint) => {\n  if (!couponLayout || couponLayout === COUPON_LAYOUT_RESPONSIVE) {\n    return breakpoint === \"mobile\" ? \"compact\" : \"detail\";\n  }\n  return couponLayout;\n};\nconst toBackgroundColor = (backgroundColor) => {\n  const {\n    colorType,\n    color,\n    gradient\n  } = backgroundColor;\n  const backgroundColorByType = {\n    [\n      \"default\"\n      /* DEFAULT */\n    ]: void 0,\n    [\n      \"solid\"\n      /* SOLID */\n    ]: color,\n    [\n      \"gradient\"\n      /* GRADIENT */\n    ]: gradient\n  };\n  return backgroundColorByType[colorType];\n};\nexport {\n  COUPON_CONTROLS,\n  COUPON_LAYOUT_RESPONSIVE,\n  COUPON_MODULE_NAME_VISIBILITY_CONTROLS,\n  COUPON_NAME_FIXED_TEXT,\n  COUPON_THEME_CONTROLS,\n  COUPON_THEME_TYPE,\n  CouponColorType,\n  DEFAULT_COUPON_MODULE_NAME_VISIBILITY,\n  DEFAULT_COUPON_NAME_VISIBILITY,\n  composeCouponName,\n  composeCouponNameFromCoupon,\n  getCouponApplicationTypeText,\n  getCouponCountText,\n  getCouponDiscountValueText,\n  resolveCouponLayout,\n  resolveCouponTheme,\n  toBackgroundColor\n};\n","var CouponModuleInputType = /* @__PURE__ */ ((CouponModuleInputType2) => {\n  CouponModuleInputType2[CouponModuleInputType2[\"Linked\"] = 0] = \"Linked\";\n  CouponModuleInputType2[CouponModuleInputType2[\"Manual\"] = 1] = \"Manual\";\n  CouponModuleInputType2[CouponModuleInputType2[\"Auto\"] = 2] = \"Auto\";\n  return CouponModuleInputType2;\n})(CouponModuleInputType || {});\nvar CouponUpdateType = /* @__PURE__ */ ((CouponUpdateType2) => {\n  CouponUpdateType2[CouponUpdateType2[\"NORMAL\"] = 0] = \"NORMAL\";\n  CouponUpdateType2[CouponUpdateType2[\"DAILY\"] = 1] = \"DAILY\";\n  return CouponUpdateType2;\n})(CouponUpdateType || {});\nexport {\n  CouponModuleInputType,\n  CouponUpdateType\n};\n","import { create } from \"../../../node_modules/zustand/esm/index.js\";\nconst initialState = {\n  queries: {}\n};\nconst useQueryStore = create((set) => ({\n  ...initialState,\n  dispatchSetQuery: (key, query) => set((prev) => ({\n    queries: {\n      ...prev.queries,\n      [key]: query\n    }\n  }))\n}));\nexport {\n  useQueryStore\n};\n","import { create } from \"../../../node_modules/zustand/esm/index.js\";\nimport { subscribeWithSelector } from \"../../../node_modules/zustand/esm/middleware.js\";\nconst initialState = {\n  rootModules: {}\n};\nconst useModuleStore = create(subscribeWithSelector((set) => ({\n  ...initialState,\n  dispatchSetRootModule: (key, module) => set((prev) => ({\n    rootModules: {\n      ...prev.rootModules,\n      [key]: module\n    }\n  }))\n})));\nexport {\n  useModuleStore\n};\n","import { useEffect } from \"react\";\nimport { useComponentId } from \"../systems/curations/EventTrackingProvider/EventTrackingProvider.hooks.js\";\nimport \"../systems/curations/EventTrackingProvider/EventTrackingProvider.js\";\nimport { useTrackSnowplowEvent } from \"../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { useModuleStore } from \"./module-store/module.store.js\";\nimport { shallow as shallow$1 } from \"../../node_modules/zustand/esm/shallow.js\";\nimport { useSegment } from \"../@shared/providers/SegmentProvider/SegmentProvider.js\";\nconst useRootComponentId = (query) => {\n  const componentId = useComponentId();\n  const root = useModuleStore((state) => state.rootModules[(query == null ? void 0 : query.rootOutput) ?? \"\"], shallow$1);\n  return (root == null ? void 0 : root.componentId) || componentId;\n};\nconst useSetRootModule = (query, output) => {\n  const componentId = useComponentId();\n  const segment = useSegment();\n  const dispatchSetRootModule = useModuleStore((state) => state.dispatchSetRootModule);\n  const {\n    isRoot = false\n  } = query ?? {};\n  useEffect(() => {\n    if (!isRoot) {\n      return;\n    }\n    if (!output) {\n      return;\n    }\n    dispatchSetRootModule(output, {\n      componentId,\n      segment: segment.segments\n    });\n  }, [isRoot, output, componentId, segment]);\n};\nconst useTrackClickButtonEvent = (query) => {\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const componentId = useRootComponentId(query);\n  const trackClickButtonEvent = ({\n    type,\n    layoutPosition = -1,\n    name = \"\"\n  }) => {\n    trackSnowplowEvent(\"click_button\", {\n      // TODO(임규민): section_name, position 프로퍼티에 할당한 약속된 임의 값 수정\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: layoutPosition,\n      button_id: type,\n      button_name: name\n    });\n  };\n  return trackClickButtonEvent;\n};\nconst useTrackImpressionContentEvent = () => {\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const componentId = useComponentId();\n  const trackImpressionContentEvent = () => {\n    trackSnowplowEvent(\"impression_content\", {\n      // TODO(임규민): section_name, position, layout_position 프로퍼티에 할당한 약속된 임의 값 수정\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1\n    });\n  };\n  return trackImpressionContentEvent;\n};\nexport {\n  useRootComponentId,\n  useSetRootModule,\n  useTrackClickButtonEvent,\n  useTrackImpressionContentEvent\n};\n","var QueryType = /* @__PURE__ */ ((QueryType2) => {\n  QueryType2[\"Product\"] = \"product\";\n  QueryType2[\"KeywordCollection\"] = \"keyword-collection\";\n  QueryType2[\"KeywordCollections\"] = \"keyword-collections\";\n  QueryType2[\"BrandCuration\"] = \"brand-curation\";\n  QueryType2[\"Recommendation\"] = \"recommendation\";\n  QueryType2[\"Ranking\"] = \"ranking\";\n  QueryType2[\"CouponCollection\"] = \"coupon-collection\";\n  QueryType2[\"RaffleGroup\"] = \"raffle-group\";\n  QueryType2[\"Coupon\"] = \"coupon\";\n  QueryType2[\"Preuser\"] = \"preuser\";\n  QueryType2[\"CustomCategory\"] = \"custom-category\";\n  QueryType2[\"Moloco\"] = \"moloco\";\n  return QueryType2;\n})(QueryType || {});\nvar RankingType = /* @__PURE__ */ ((RankingType2) => {\n  RankingType2[\"Popularity\"] = \"POPULARITY\";\n  RankingType2[\"Trending\"] = \"TRENDING\";\n  return RankingType2;\n})(RankingType || {});\nvar PopularityPeriodType = /* @__PURE__ */ ((PopularityPeriodType2) => {\n  PopularityPeriodType2[\"Realtime\"] = \"REALTIME\";\n  PopularityPeriodType2[\"Hourly\"] = \"HOURLY\";\n  PopularityPeriodType2[\"Daily\"] = \"DAILY\";\n  return PopularityPeriodType2;\n})(PopularityPeriodType || {});\nvar TrendingPeriodType = /* @__PURE__ */ ((TrendingPeriodType2) => {\n  TrendingPeriodType2[\"Hourly\"] = \"HOURLY\";\n  return TrendingPeriodType2;\n})(TrendingPeriodType || {});\nvar CategoryType = /* @__PURE__ */ ((CategoryType2) => {\n  CategoryType2[CategoryType2[\"Large\"] = 0] = \"Large\";\n  CategoryType2[CategoryType2[\"Middle\"] = 1] = \"Middle\";\n  return CategoryType2;\n})(CategoryType || {});\nexport {\n  CategoryType,\n  PopularityPeriodType,\n  QueryType,\n  RankingType,\n  TrendingPeriodType\n};\n","const getPaddingStyle = (value) => {\n  return value.isMixed ? `${value.paddingTop}px ${value.paddingRight}px ${value.paddingBottom}px ${value.paddingLeft}px` : `${value.padding}px`;\n};\nconst getPadding = (value) => {\n  return {\n    top: value.isMixed ? value.paddingTop : value.padding,\n    right: value.isMixed ? value.paddingRight : value.padding,\n    bottom: value.isMixed ? value.paddingBottom : value.padding,\n    left: value.isMixed ? value.paddingLeft : value.padding\n  };\n};\nexport {\n  getPadding,\n  getPaddingStyle\n};\n","const formatToCoupon = (coupon) => {\n  if (!coupon) {\n    return void 0;\n  }\n  return {\n    ...coupon,\n    id: coupon.couponId\n  };\n};\nexport {\n  formatToCoupon\n};\n","import { QueryType } from \"../types.js\";\nimport useSWR from \"../../../node_modules/swr/core/dist/index.js\";\nimport { couponApi } from \"../../../apis/coupon/CouponApiService.js\";\nimport { formatToCoupon } from \"./CouponModule.utils.js\";\nconst COUPONS_FETCHER_KEY = \"@coupon/coupons\";\nconst useCouponsQuery = ({\n  query,\n  couponIds,\n  enabled = true\n}) => {\n  const canFetch = couponIds.length > 0 && enabled && query !== void 0;\n  const {\n    data\n  } = useSWR(canFetch ? [COUPONS_FETCHER_KEY, couponIds] : null, () => queryCoupons(couponIds, query));\n  return {\n    coupons: (data == null ? void 0 : data.coupons) ?? []\n  };\n};\nconst fetchCoupons = async (couponIds) => {\n  const {\n    data\n  } = await couponApi.getCoupons(couponIds);\n  return {\n    coupons: data\n  };\n};\nconst fetchCouponCollectionCoupon = (query) => {\n  const coupon = formatToCoupon(query.coupon);\n  return {\n    coupons: coupon ? [coupon] : []\n  };\n};\nconst fetchKeywordCollectionCoupon = async (query) => {\n  if (!query.couponId) {\n    return {\n      coupons: []\n    };\n  }\n  const {\n    data\n  } = await couponApi.getCoupons([query.couponId]);\n  return {\n    coupons: data\n  };\n};\nconst queryCoupons = (couponIds, query) => {\n  if (query === void 0) {\n    return {\n      coupons: []\n    };\n  }\n  switch (query.type) {\n    case QueryType.Coupon:\n      return fetchCoupons(couponIds);\n    case QueryType.CouponCollection:\n      return fetchCouponCollectionCoupon(query);\n    case QueryType.KeywordCollection:\n      return fetchKeywordCollectionCoupon(query);\n    default:\n      return {\n        coupons: []\n      };\n  }\n};\nexport {\n  useCouponsQuery\n};\n","import { CouponType, DiscountType, AvailableDayType } from \"../../../../types/models/coupon.js\";\nimport { deduplicate } from \"../../../../utils/deduplicate.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nimport { parseISO } from \"../../../../node_modules/date-fns/parseISO.js\";\nimport { formatDate as format } from \"../../../../node_modules/date-fns/format.js\";\nconst DATE_FORMAT = \"yyyy.MM.dd HH:mm\";\nconst HOURS_IN_DAY = 24;\nconst getCouponNotices = (couponType, coupons) => {\n  const coupon = head(coupons);\n  if (!coupon) {\n    return [];\n  }\n  const formattedAvailablePeriod = formatAvailablePeriod(coupon);\n  const formattedMaxDiscountPrice = formatMaxDiscountPrice(couponType, sortCouponsByDiscountValueAscending(coupons));\n  const maxIssueCountNotice = createMaxIssueCountNotice(coupon.personMaxIssueCount);\n  if (couponType === CouponType.RANDOM) {\n    return getRandomCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice);\n  }\n  if (coupon.discountType === DiscountType.FIXED_RATE) {\n    return getRateCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice, maxIssueCountNotice);\n  }\n  return getAmountCouponNotices(formattedAvailablePeriod, formattedMaxDiscountPrice, maxIssueCountNotice);\n};\nconst createMaxIssueCountNotice = (maxIssueCount) => {\n  if (!maxIssueCount) {\n    return \"\";\n  }\n  const hasMaxIssueCount = maxIssueCount > 0;\n  if (!hasMaxIssueCount) {\n    return \"쿠폰은 이벤트 기간 중복 발급 가능합니다.\";\n  }\n  return `쿠폰은 이벤트 기간 동안 하나의 ID 당 ${maxIssueCount}회 발급 및 사용 가능합니다.`;\n};\nconst formatMaxDiscountPrice = (couponType, coupons) => {\n  const hasMaxDiscountPrice = coupons.some((coupon2) => coupon2.maxDiscountPrice > 0);\n  if (!hasMaxDiscountPrice) {\n    return \"제한 없음\";\n  }\n  const [coupon] = coupons;\n  if (couponType === CouponType.RANDOM) {\n    return formatRandomCouponMaxDiscountPrice(coupons);\n  }\n  if (coupon.discountType === DiscountType.FIXED_PRICE) {\n    return formatAmountCouponMaxDiscountPrice(coupons);\n  }\n  return formatRateCouponMaxDiscountPrice(coupons);\n};\nconst formatRateCouponMaxDiscountPrice = (coupons) => {\n  return `${composeWithUnit(getMaxDiscountPrice(coupons), \"원\")}`;\n};\nconst formatAmountCouponMaxDiscountPrice = (coupons) => {\n  const uniquified = uniquifyCouponsByMinPayAmount(coupons);\n  const formatted = uniquified.reduce((acc, curr) => {\n    const {\n      maxDiscountPrice,\n      minPayAmount\n    } = curr;\n    acc.push(`${composeWithUnit(minPayAmount, \"원\")} 이상 구매 시 ${composeWithUnit(maxDiscountPrice, \"원\")} 할인`);\n    return acc;\n  }, []);\n  return formatted.join(\", \");\n};\nconst formatRandomCouponMaxDiscountPrice = (coupons) => {\n  const uniquified = uniquifyCouponsByDiscountValue(coupons);\n  const formatted = uniquified.reduce((acc, curr) => {\n    const {\n      discountType,\n      discountValue,\n      maxDiscountPrice\n    } = curr;\n    acc.push(`${composeWithUnitByType(discountType, discountValue)} 쿠폰 ${composeWithUnit(maxDiscountPrice, \"원\")} 할인`);\n    return acc;\n  }, []);\n  return formatted.join(\", \");\n};\nconst formatAvailablePeriod = (coupon) => {\n  if (coupon.useAvailableDayType === AvailableDayType.DAY) {\n    return `쿠폰 발급 후 ${coupon.couponUseAfterDay * HOURS_IN_DAY}시간 이내`;\n  }\n  if (coupon.useAvailableDayType === AvailableDayType.RANGE) {\n    const availableStartAt = parseISO(coupon.couponUseStartAt);\n    const availableEndAt = parseISO(coupon.couponUseEndAt);\n    return `${format(availableStartAt, DATE_FORMAT)} - ${format(availableEndAt, DATE_FORMAT)}`;\n  }\n  return \"없음\";\n};\nconst uniquifyCouponsByDiscountValue = (coupons) => {\n  return deduplicate(coupons, (x, y) => x.discountValue === y.discountValue && x.maxDiscountPrice === y.maxDiscountPrice);\n};\nconst uniquifyCouponsByMinPayAmount = (coupons) => {\n  return deduplicate(coupons, (x, y) => x.minPayAmount === y.minPayAmount && x.maxDiscountPrice === y.maxDiscountPrice);\n};\nconst sortCouponsByDiscountValueAscending = (coupons) => {\n  return [...coupons].sort((x, y) => x.discountValue - y.discountValue);\n};\nconst getMaxDiscountPrice = (coupons) => {\n  return Math.max(...coupons.map((coupon) => coupon.maxDiscountPrice));\n};\nconst RANDOM_COUPON_PERIOD_CUTOFF = new Date(2026, 1, 18, 10, 0, 0);\nconst getRandomCouponUseablePeriod = (now = /* @__PURE__ */ new Date()) => {\n  if (now >= RANDOM_COUPON_PERIOD_CUTOFF) {\n    return \"발급일 기준 당일 23:59 까지\";\n  }\n  return \"발급일 기준 익일 09:59 까지\";\n};\nconst getRandomCouponNotices = (_availablePeriod, maxDiscountPrice) => [`쿠폰 사용 기간 : ${getRandomCouponUseablePeriod()}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `쿠폰을 사용한 이력이 있는 경우 쿠폰은 보이지 않습니다.`, `쿠폰 소멸, 발급 중단, 사용 완료된 쿠폰은 구매 취소 시 별도 재발급이 불가합니다.`, `브랜드 정책에 따라 일부 상품 쿠폰 적용이 불가할 수 있습니다.`];\nconst getRateCouponNotices = (availablePeriod, maxDiscountPrice, maxIssueCountNotice) => [`쿠폰 사용 기간 : ${availablePeriod}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, maxIssueCountNotice, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `해당 쿠폰은 이벤트 참여 상품 대상으로만 적용 가능합니다.`, `쿠폰 적용 가능 상품은 수시로 변경되며, 일부 품목에 한하여 쿠폰 적용이 제한될 수 있습니다.`, `브랜드 재고 사정에 따라 품절이나 환불 안내를 받게 될 수 있습니다.`];\nconst getAmountCouponNotices = (availablePeriod, maxDiscountPrice, maxIssueCountNotice) => {\n  return [`쿠폰 사용 기간 : ${availablePeriod}`, `쿠폰 최대 할인 금액 : ${maxDiscountPrice}`, maxIssueCountNotice, `다운로드한 쿠폰은 'MY PAGE > 사용 가능 쿠폰'에서 확인 가능합니다.`, `해당 쿠폰은 이벤트 참여 상품 대상으로만 적용 가능합니다.`, `쿠폰 적용 가능 상품은 수시로 변경되며, 일부 품목에 한하여 쿠폰 적용이 제한될 수 있습니다.`, `브랜드 재고 사정에 따라 품절이나 환불 안내를 받게 될 수 있습니다.`];\n};\nconst composeWithUnitByType = (discountType, discountValue) => {\n  switch (discountType) {\n    case DiscountType.FIXED_RATE:\n      return composeWithUnit(discountValue, \"%\");\n    case DiscountType.FIXED_PRICE:\n      return composeWithUnit(discountValue, \"원\");\n  }\n};\nconst composeWithUnit = (discountValue, unit) => {\n  return `${discountValue.toLocaleString(\"ko-KR\")}${unit}`;\n};\nexport {\n  composeWithUnit,\n  composeWithUnitByType,\n  getCouponNotices,\n  getRandomCouponUseablePeriod\n};\n","import { ControlType } from \"framer\";\nconst COUPON_NOTICE_THEME_TYPE = {\n  DEFAULT: \"default\",\n  LIGHT: \"light\",\n  DARK: \"dark\"\n};\nconst COUPON_NOTICES_CONTROLS = {\n  mainNotices: {\n    type: ControlType.Array,\n    title: \"메인 유의사항\",\n    description: \"상시 노출되는 유의사항으로, 최대 두 줄 입력이 가능합니다.\",\n    control: {\n      type: ControlType.String\n    },\n    maxCount: 2\n  },\n  hasAdditionalNotices: {\n    type: ControlType.Boolean,\n    title: \"추가 유의사항 노출\",\n    enabledTitle: \"노출\",\n    disabledTitle: \"미노출\",\n    defaultValue: false\n  },\n  additionalNotices: {\n    hidden: ({\n      hasAdditionalNotices\n    }) => hasAdditionalNotices === false,\n    type: ControlType.Array,\n    title: \"추가 유의사항\",\n    description: \"더보기 클릭 시 노출되는 추가 유의사항입니다.\",\n    control: {\n      type: ControlType.String\n    }\n  },\n  noticeTheme: {\n    type: ControlType.Enum,\n    title: \"유의사항 테마\",\n    description: \"기본은 쿠폰 테마를 따르며, Light/Dark로 유의사항만 별도 설정할 수 있습니다.\",\n    options: [COUPON_NOTICE_THEME_TYPE.DEFAULT, COUPON_NOTICE_THEME_TYPE.LIGHT, COUPON_NOTICE_THEME_TYPE.DARK],\n    optionTitles: [\"기본 (쿠폰 테마 동일)\", \"Light\", \"Dark\"],\n    defaultValue: COUPON_NOTICE_THEME_TYPE.DEFAULT\n  }\n};\nconst resolveCouponNoticeTheme = (noticeTheme, couponTheme) => noticeTheme === void 0 || noticeTheme === COUPON_NOTICE_THEME_TYPE.DEFAULT ? couponTheme : noticeTheme;\nexport {\n  COUPON_NOTICES_CONTROLS,\n  COUPON_NOTICE_THEME_TYPE,\n  resolveCouponNoticeTheme\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { useMemo } from \"react\";\nimport { FoldableList } from \"../../../@shared/FoldableList/index.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 \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.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 \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nimport { getCouponNotices } from \"./NoticesElement.utils.js\";\nimport { resolveCouponNoticeTheme } from \"../../../../libs/property-controls/coupon-notices.js\";\nimport { filterMap } from \"../../../../utils/filterMap.js\";\nconst NoticesElement = ({\n  couponType,\n  coupons,\n  mainNotices,\n  hasAdditionalNotices,\n  additionalNotices,\n  noticeTheme\n}) => {\n  const theme = useTheme();\n  const resolvedNoticeTheme = resolveCouponNoticeTheme(noticeTheme, theme);\n  const uniqueMainNotices = [...new Set(mainNotices)];\n  const mergedAdditionalNotices = useMemo(() => [...getCouponNotices(couponType, coupons), ...additionalNotices], [couponType, coupons, additionalNotices]);\n  const uniqueAdditionalNotices = [...new Set(mergedAdditionalNotices)];\n  const hasMainNotices = mainNotices.length > 0;\n  const hasNotices = hasMainNotices || hasAdditionalNotices;\n  if (!hasNotices) {\n    return null;\n  }\n  return /* @__PURE__ */ jsxs(\"div\", { style: noticesLayout, children: [\n    hasMainNotices ? /* @__PURE__ */ jsx(\"div\", { style: mainNoticesStyle, children: uniqueMainNotices.map((notice) => /* @__PURE__ */ jsxs(\"div\", { style: {\n      ...typography(12, 400),\n      ...mainNoticeStyleByTheme[resolvedNoticeTheme]\n    }, children: [\n      \"*\",\n      notice\n    ] }, notice)) }) : null,\n    hasAdditionalNotices ? /* @__PURE__ */ jsxs(FoldableList.Root, { theme: resolvedNoticeTheme, children: [\n      /* @__PURE__ */ jsx(FoldableList.Trigger, { style: {\n        gap: 2\n      }, textStyle: typography(12, 400), icons: {\n        initial: \"chevronDown\",\n        active: \"chevronUp\",\n        size: 12\n      }, children: \"유의사항\" }),\n      /* @__PURE__ */ jsx(FoldableList.Content, { children: filterMap(uniqueAdditionalNotices, (notice) => notice !== \"\", (notice) => /* @__PURE__ */ jsx(FoldableList.Item, { children: notice }, notice)) })\n    ] }) : null\n  ] });\n};\nconst noticesLayout = {\n  display: \"flex\",\n  flexDirection: \"column\",\n  gap: \"12px\",\n  marginTop: \"8px\"\n};\nconst mainNoticesStyle = {\n  width: \"100%\",\n  display: \"flex\",\n  flexDirection: \"column\"\n};\nconst mainNoticeStyleByTheme = {\n  light: {\n    color: \"#474747\"\n  },\n  dark: {\n    color: \"#a0a0a0\"\n  }\n};\nexport {\n  NoticesElement\n};\n","import { useRef, useState, useEffect, useCallback } from \"react\";\nconst useVisibilityAwareInterval = (callback, delay) => {\n  const savedCallback = useRef(callback);\n  const intervalIdRef = useRef(null);\n  const [isVisible, setIsVisible] = useState(false);\n  useEffect(() => {\n    savedCallback.current = callback;\n  }, [callback]);\n  const startInterval = useCallback(() => {\n    if (intervalIdRef.current !== null || delay === null) {\n      return;\n    }\n    intervalIdRef.current = setInterval(() => {\n      savedCallback.current();\n    }, delay);\n  }, [delay]);\n  const stopInterval = useCallback(() => {\n    if (intervalIdRef.current !== null) {\n      clearInterval(intervalIdRef.current);\n      intervalIdRef.current = null;\n    }\n  }, []);\n  useEffect(() => {\n    const handleVisibilityChange = () => {\n      setIsVisible(document.visibilityState === \"visible\");\n    };\n    document.addEventListener(\"visibilitychange\", handleVisibilityChange);\n    return () => {\n      document.removeEventListener(\"visibilitychange\", handleVisibilityChange);\n    };\n  }, []);\n  useEffect(() => {\n    if (delay === null) {\n      stopInterval();\n      return;\n    }\n    if (isVisible) {\n      startInterval();\n    } else {\n      stopInterval();\n    }\n    return () => {\n      stopInterval();\n    };\n  }, [isVisible, delay, startInterval, stopInterval]);\n  useEffect(() => {\n    setIsVisible(document.visibilityState === \"visible\");\n  }, []);\n};\nexport {\n  useVisibilityAwareInterval\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { useState } from \"react\";\nimport { DiscountType } from \"../../../types/models/coupon.js\";\nimport \"../Countdown/Countdown.js\";\nimport \"react-dom\";\nimport \"../Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../Expandable/Expandable.js\";\nimport \"../FixedScrollProgressBar/FixedScrollProgressBar.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 \"../../../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 \"../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../apis/user/UserApiService.js\";\nimport \"../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport \"framer\";\nimport \"../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../hooks/useFeatureFlag.js\";\nimport \"../../../utils/redirectLogin.js\";\nimport \"../../../utils/event-properties/source.js\";\nimport \"../ShareButtonWithReferralEvent/ShareButtonWithReferralEvent.js\";\nimport \"../../../constants/snowplow/snowplowSchema.js\";\nimport \"../Products/Products.js\";\nimport \"../ResponsiveSplitView/ResponsiveSplitView.js\";\nimport \"../ResponsiveSplitViewOverlayButton/ResponsiveSplitViewOverlayButton.js\";\nimport { RollingNumber } from \"../RollingNumber/RollingNumber.js\";\nimport \"../TabBar/TabBar.js\";\nimport \"../TimeProgressBar/TimeProgressBar.js\";\nimport \"../ViewportContainer/ViewportContainer.js\";\nimport \"../TabBarV2/TabBarV2.js\";\nimport \"../TabBarV3/TabBarV3.js\";\nimport \"../TabBarV4/TabBarV4.js\";\nimport { useVisibilityAwareInterval } from \"../../../hooks/useVisibilityAwareInterval.js\";\nconst RandomDiscountValue = ({\n  discountType,\n  discountValues\n}) => {\n  const [index, setIndex] = useState(0);\n  useVisibilityAwareInterval(() => {\n    setIndex((prev) => (prev + 1) % discountValues.length);\n  }, 800);\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    display: \"flex\",\n    alignItems: \"center\"\n  }, children: [\n    /* @__PURE__ */ jsx(RollingNumber, { value: discountValues[index] ?? 0 }),\n    discountType === DiscountType.FIXED_RATE ? \"%\" : \"원\"\n  ] });\n};\nexport {\n  RandomDiscountValue\n};\n","import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { Countdown } from \"../../../systems/Countdown/Countdown.js\";\nimport \"react-dom\";\nimport \"react\";\nimport \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../systems/Expandable/Expandable.js\";\nimport \"../../../systems/FixedScrollProgressBar/FixedScrollProgressBar.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 \"../../../../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 \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js\";\nimport { isCanvas } from \"../../../../utils/framer/isCanvas.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/mutation/dist/index.js\";\nimport \"../../../@shared/providers/ThemeProvider/ThemeProvider.js\";\nimport \"../../../@shared/providers/BreakpointProvider/BreakpointProvider.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { createKRTimeZoneDate } from \"../../../../utils/createUTCDate.js\";\nimport \"../../../systems/ShareButtonWithReferralEvent/ShareButtonWithReferralEvent.js\";\nimport \"../../../../constants/snowplow/snowplowSchema.js\";\nimport \"../../../systems/Products/Products.js\";\nimport \"../../../systems/ResponsiveSplitView/ResponsiveSplitView.js\";\nimport \"../../../systems/ResponsiveSplitViewOverlayButton/ResponsiveSplitViewOverlayButton.js\";\nimport \"../../../systems/RollingNumber/RollingNumber.js\";\nimport \"../../../systems/TabBar/TabBar.js\";\nimport \"../../../systems/TimeProgressBar/TimeProgressBar.js\";\nimport \"../../../systems/ViewportContainer/ViewportContainer.js\";\nimport \"../../../systems/TabBarV2/TabBarV2.js\";\nimport \"../../../systems/TabBarV3/TabBarV3.js\";\nimport \"../../../systems/TabBarV4/TabBarV4.js\";\nimport { typography } from \"../../../../styles/typography.js\";\nimport { DiscountType, KindType, CouponType, AvailableDayType } from \"../../../../types/models/coupon.js\";\nimport { RandomDiscountValue } from \"../../../systems/RandomDiscountValue/RandomDiscountValue.js\";\nimport { QueryType } from \"../../types.js\";\nimport { isAbove } from \"../../../../utils/date.js\";\nimport { composeCouponNameFromCoupon } from \"../../../../libs/property-controls/coupon.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nimport { isBefore } from \"../../../../node_modules/date-fns/isBefore.js\";\nimport { isAfter } from \"../../../../node_modules/date-fns/isAfter.js\";\nimport { formatDate as format } from \"../../../../node_modules/date-fns/format.js\";\nimport { isWithinInterval } from \"../../../../node_modules/date-fns/isWithinInterval.js\";\nimport { differenceInCalendarDays } from \"../../../../node_modules/date-fns/differenceInCalendarDays.js\";\nimport { ko } from \"../../../../node_modules/date-fns/locale/ko.js\";\nconst getCouponUseEndAt = (coupon) => {\n  if (coupon.useAvailableDayType === AvailableDayType.RANGE) {\n    return createKRTimeZoneDate(coupon.couponUseEndAt);\n  }\n  return void 0;\n};\nconst getCouponStatus = (coupon, logged, query, statuses) => {\n  var _a;\n  if (!coupon) {\n    return \"downloadable\";\n  }\n  if (isCanvas()) {\n    return \"downloadable\";\n  }\n  if (query.type === QueryType.Coupon && query.couponType === CouponType.RANDOM) {\n    return \"downloadable\";\n  }\n  const now = createKRTimeZoneDate();\n  const issueStartAt = createKRTimeZoneDate(coupon.couponIssueStartAt);\n  const issueEndAt = createKRTimeZoneDate(coupon.couponIssueEndAt);\n  const useEndAt = getCouponUseEndAt(coupon);\n  const isUpcoming = isBefore(now, issueStartAt);\n  const isEnd = isAfter(now, issueEndAt);\n  const isExpired = useEndAt !== void 0 && isAfter(now, useEndAt);\n  if (isUpcoming) {\n    return \"upcoming\";\n  }\n  if (isExpired || isEnd) {\n    return \"expired\";\n  }\n  if (!logged) {\n    return \"downloadable\";\n  }\n  const status = (_a = statuses.find((_status) => _status.couponId === coupon.id)) == null ? void 0 : _a.couponDownloadStatus;\n  switch (status) {\n    case \"NOT_ISSUED\":\n    case \"UPCOMING\":\n      return \"upcoming\";\n    case \"DOWNLOADABLE\":\n      return \"downloadable\";\n    case \"ISSUANCE_LIMIT_REACHED\":\n      return \"issuanceLimitedReached\";\n    case \"EXPIRED\":\n      return \"expired\";\n    case \"DOWNLOADED\":\n    case \"CLAIMED\":\n      return \"downloaded\";\n    case \"DISABLED\":\n      return \"disabled\";\n    default:\n      return \"downloadable\";\n  }\n};\nconst getCouponFallbackDescription = (coupons) => {\n  const discountValues = coupons.map((coupon) => coupon.discountValue);\n  const {\n    discountType = DiscountType.FIXED_RATE,\n    couponKindType = KindType.CART\n  } = head(coupons) ?? {};\n  const minDiscountValue = Math.min(...discountValues).toLocaleString(\"ko-KR\");\n  const maxDiscountValue = Math.max(...discountValues).toLocaleString(\"ko-KR\");\n  const unit = unitByDiscountType[discountType];\n  return `${minDiscountValue}${unit}~${maxDiscountValue}${unit} ${textByCouponKindType[couponKindType]} 쿠폰 랜덤 지급`;\n};\nconst unitByDiscountType = {\n  [DiscountType.FIXED_RATE]: \"%\",\n  [DiscountType.FIXED_PRICE]: \"원\"\n};\nconst textByCouponKindType = {\n  [KindType.CART]: \"장바구니\",\n  [KindType.PRODUCT]: \"상품\"\n};\nconst getUpcomingText = (issueStartAt) => {\n  const hour = format(issueStartAt, \"H\", {\n    locale: ko\n  });\n  const minute = format(issueStartAt, \"m\", {\n    locale: ko\n  });\n  const timeText = minute === \"0\" ? `${hour}시` : `${hour}시 ${minute}분`;\n  return `${format(issueStartAt, \"M월 d일(EEE)\", {\n    locale: ko\n  })} ${timeText} 발행 예정`;\n};\nconst getDescriptionByStatus = (coupon) => {\n  const issueStartAt = createKRTimeZoneDate(coupon.couponIssueStartAt);\n  const issueEndAt = createKRTimeZoneDate(coupon.couponIssueEndAt);\n  const useEndAt = getCouponUseEndAt(coupon);\n  return {\n    upcoming: getUpcomingText(issueStartAt),\n    redownloadable: /* @__PURE__ */ jsxs(\"div\", { style: descriptionStyle, children: [\n      /* @__PURE__ */ jsx(Countdown, { targetDateString: format(issueEndAt, \"yyyy-MM-dd\"), targetTimeString: format(issueEndAt, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 12, color: \"inherit\", style: typography(12, 400) }),\n      \"남음\"\n    ] }),\n    downloadable: /* @__PURE__ */ jsxs(\"div\", { style: descriptionStyle, children: [\n      /* @__PURE__ */ jsx(Countdown, { targetDateString: format(issueEndAt, \"yyyy-MM-dd\"), targetTimeString: format(issueEndAt, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 12, color: \"inherit\", style: typography(12, 400) }),\n      \"남음\"\n    ] }),\n    downloaded: useEndAt ? /* @__PURE__ */ jsxs(\"div\", { style: descriptionStyle, children: [\n      /* @__PURE__ */ jsx(Countdown, { targetDateString: format(useEndAt, \"yyyy-MM-dd\"), targetTimeString: format(useEndAt, \"HH:mm:ss\"), dateDisplayFormat: \"D일\", timeDisplayFormat: \"H시간 m분 s초\", fontSize: 12, color: \"inherit\", style: typography(12, 400) }),\n      \"남음\"\n    ] }) : null,\n    expired: \"쿠폰 사용 기간이 종료되었어요\",\n    disabled: \"사용할 수 없는 쿠폰입니다\",\n    issuanceLimitedReached: \"쿠폰이 모두 소진되었어요\"\n  };\n};\nconst descriptionStyle = {\n  display: \"flex\",\n  alignItems: \"center\",\n  gap: 3,\n  color: \"inherit\"\n};\nconst markAsDownloaded = (statuses, couponIds) => {\n  return statuses.map((status) => ({\n    ...status,\n    couponDownloadStatus: status.couponDownloadStatus === \"DOWNLOADABLE\" && couponIds.includes(status.couponId) ? \"DOWNLOADED\" : status.couponDownloadStatus\n  }));\n};\nconst getCouponCollectionCouponName = (query, visibility) => {\n  const coupon = query.coupon;\n  const frontBrand = query.frontBrand;\n  if (!coupon) {\n    return \"\";\n  }\n  return composeCouponNameFromCoupon({\n    coupon,\n    brandName: (frontBrand == null ? void 0 : frontBrand.nameKor) ?? \"\",\n    visibility\n  });\n};\nconst getRandomCouponName = (coupons) => {\n  var _a;\n  const sortByDiscountValue = sortCouponsByDiscountValueAscending(coupons);\n  const couponDiscountValues = sortByDiscountValue.map((coupon) => coupon.discountValue);\n  return /* @__PURE__ */ jsxs(\"div\", { style: {\n    display: \"flex\",\n    alignItems: \"center\",\n    gap: 6\n  }, children: [\n    /* @__PURE__ */ jsx(\"div\", { children: /* @__PURE__ */ jsx(RandomDiscountValue, { discountType: ((_a = head(coupons)) == null ? void 0 : _a.discountType) ?? DiscountType.FIXED_RATE, discountValues: couponDiscountValues }) }),\n    /* @__PURE__ */ jsx(\"span\", { children: \"쿠폰\" })\n  ] });\n};\nconst getGeneralCouponName = (coupons, visibility) => {\n  const topCoupon = coupons.reduce((maxCoupon, currentCoupon) => currentCoupon.discountValue > maxCoupon.discountValue ? currentCoupon : maxCoupon);\n  const couponName = composeCouponNameFromCoupon({\n    coupon: topCoupon,\n    visibility\n  });\n  if (coupons.length === 1) {\n    return couponName;\n  }\n  return `${couponName} 외 ${coupons.length - 1}장`;\n};\nconst getCouponNameByCouponType = (coupons, query, visibility) => {\n  switch (query.couponType) {\n    case CouponType.RANDOM:\n      return getRandomCouponName(coupons);\n    case CouponType.LIMITED:\n    case CouponType.NORMAL:\n      return getGeneralCouponName(coupons, visibility);\n  }\n};\nconst getCouponName = (coupons, query, visibility) => {\n  if (coupons.length === 0) {\n    return \"\";\n  }\n  switch (query.type) {\n    case QueryType.CouponCollection:\n      return getCouponCollectionCouponName(query, visibility);\n    case QueryType.KeywordCollection:\n      return getGeneralCouponName(coupons, visibility);\n    case QueryType.Coupon:\n      return getCouponNameByCouponType(coupons, query, visibility);\n  }\n};\nconst sortCouponsByDiscountValueAscending = (coupons) => {\n  return [...coupons].sort((x, y) => x.discountValue - y.discountValue);\n};\nconst findCurrentSchedule = (schedule) => {\n  const now = createKRTimeZoneDate();\n  const scheduleIndex = schedule.findIndex((item, index) => {\n    const {\n      shouldUpdateAt\n    } = item;\n    const next = schedule[index + 1];\n    const hasNext = next !== void 0;\n    const isFirst = index === 0 && isAbove(shouldUpdateAt, now);\n    const isWithin = hasNext && isWithinInterval(now, {\n      start: shouldUpdateAt,\n      end: next.shouldUpdateAt\n    });\n    const isLast = !hasNext && isAbove(now, shouldUpdateAt);\n    return isFirst || isWithin || isLast;\n  });\n  return schedule[scheduleIndex];\n};\nconst toSchedule = (options) => sortScheduleAscending(toCouponSchedule(options));\nconst sortScheduleAscending = (schedule) => {\n  return [...schedule].sort((x, y) => x.shouldUpdateAt.getTime() - y.shouldUpdateAt.getTime());\n};\nconst toCouponSchedule = (options) => {\n  return options.flatMap((option) => {\n    const {\n      dailyCouponIds,\n      updateSchedule,\n      updateAt\n    } = option;\n    const {\n      startAt,\n      endAt\n    } = updateSchedule;\n    if (!startAt || !endAt) {\n      return [];\n    }\n    const diff = differenceInCalendarDays(endAt, startAt);\n    return Array.from({\n      length: diff + 1\n    }, (_, index) => {\n      const {\n        hours,\n        minutes,\n        seconds\n      } = updateAt;\n      const date = createKRTimeZoneDate(startAt);\n      date.setDate(date.getDate() + index);\n      date.setHours(hours, minutes, seconds);\n      return {\n        shouldUpdateAt: date,\n        couponIdList: dailyCouponIds[index]\n      };\n    });\n  });\n};\nexport {\n  findCurrentSchedule,\n  getCouponFallbackDescription,\n  getCouponName,\n  getCouponStatus,\n  getDescriptionByStatus,\n  markAsDownloaded,\n  toSchedule\n};\n","import { toCouponNos } from \"../../../../hooks/useDownloadCoupons.js\";\nimport { CouponUpdateType } from \"../CouponModule.types.js\";\nimport { CouponType } from \"../../../../types/models/coupon.js\";\nimport { shallowUnique } from \"../../../../utils/unique.js\";\nimport { useState, useEffect } from \"react\";\nimport { useVisibilityAwareInterval } from \"../../../../hooks/useVisibilityAwareInterval.js\";\nimport { QueryType } from \"../../types.js\";\nimport { findCurrentSchedule, toSchedule } from \"./CouponElement.utils.js\";\nconst MS_IN_SECOND = 1e3;\nconst DEFAULT_COUPON_ITEM_ENTRY = {\n  couponIds: [],\n  updateType: CouponUpdateType.NORMAL,\n  couponType: CouponType.NORMAL\n};\nconst useCouponIds = ({\n  query\n}) => {\n  const [couponItemEntry, setCouponItemEntry] = useState(getCouponItemEntry({\n    query\n  }) ?? DEFAULT_COUPON_ITEM_ENTRY);\n  useVisibilityAwareInterval(() => {\n    if (couponItemEntry.updateType === CouponUpdateType.NORMAL) {\n      return;\n    }\n    const currentSchedule = findCurrentSchedule(couponItemEntry.schedules ?? []);\n    setCouponItemEntry((prev) => ({\n      ...prev,\n      couponIds: shallowUnique(toCouponNos((currentSchedule == null ? void 0 : currentSchedule.couponIdList) ?? \"\"))\n    }));\n  }, MS_IN_SECOND);\n  useEffect(() => {\n    setCouponItemEntry(getCouponItemEntry({\n      query\n    }) ?? DEFAULT_COUPON_ITEM_ENTRY);\n  }, [query]);\n  return {\n    couponIds: couponItemEntry.couponIds,\n    couponType: couponItemEntry.couponType\n  };\n};\nconst getCouponCollectionCouponItemEntry = ({\n  coupon\n}) => {\n  return {\n    couponIds: coupon ? [coupon.couponId] : [],\n    updateType: CouponUpdateType.NORMAL,\n    couponType: CouponType.NORMAL\n  };\n};\nconst getKeywordCollectionCouponItemEntry = ({\n  couponId\n}) => {\n  return {\n    couponIds: couponId ? [couponId] : [],\n    updateType: CouponUpdateType.NORMAL,\n    couponType: CouponType.NORMAL\n  };\n};\nconst getRandomCouponItemEntry = (query) => {\n  const {\n    couponType,\n    couponIds = \"\"\n  } = query;\n  return {\n    couponIds: shallowUnique(toCouponNos(couponIds)),\n    updateType: CouponUpdateType.NORMAL,\n    couponType\n  };\n};\nconst getNormalCouponItemEntry = (query) => {\n  const {\n    couponType,\n    couponIds = \"\",\n    couponUpdateType\n  } = query;\n  return {\n    couponIds: shallowUnique(toCouponNos(couponIds)),\n    updateType: couponUpdateType,\n    couponType\n  };\n};\nconst getDailyCouponItemEntry = (query) => {\n  const {\n    couponType,\n    dailyCouponOptions = [],\n    couponUpdateType\n  } = query;\n  const schedules = toSchedule(dailyCouponOptions);\n  const currentSchedule = findCurrentSchedule(schedules);\n  return {\n    couponIds: shallowUnique(toCouponNos((currentSchedule == null ? void 0 : currentSchedule.couponIdList) ?? \"\")),\n    updateType: couponUpdateType,\n    couponType,\n    schedules\n  };\n};\nconst getGeneralCouponItemEntry = (query) => {\n  switch (query.couponUpdateType) {\n    case CouponUpdateType.NORMAL:\n      return getNormalCouponItemEntry(query);\n    case CouponUpdateType.DAILY:\n      return getDailyCouponItemEntry(query);\n    default:\n      return null;\n  }\n};\nconst getCouponItemEntryByCouponType = (query) => {\n  switch (query.couponType) {\n    case CouponType.RANDOM:\n      return getRandomCouponItemEntry(query);\n    case CouponType.LIMITED:\n    case CouponType.NORMAL:\n      return getGeneralCouponItemEntry(query);\n    default:\n      return null;\n  }\n};\nconst getCouponItemEntry = ({\n  query\n}) => {\n  if (query === void 0) {\n    return null;\n  }\n  switch (query.type) {\n    case QueryType.CouponCollection:\n      return getCouponCollectionCouponItemEntry(query);\n    case QueryType.KeywordCollection:\n      return getKeywordCollectionCouponItemEntry(query);\n    case QueryType.Coupon:\n      return getCouponItemEntryByCouponType(query);\n    default:\n      return null;\n  }\n};\nexport {\n  useCouponIds\n};\n","import { CouponType } from \"../../../../types/models/coupon.js\";\nimport { QueryType } from \"../../types.js\";\nimport { CouponUpdateType } from \"../CouponModule.types.js\";\nimport { toSchedule } from \"./CouponElement.utils.js\";\nimport { filterMap } from \"../../../../utils/filterMap.js\";\nconst validateCoupon = ({\n  query,\n  enabled\n}) => {\n  if (!enabled) {\n    return {\n      isValid: true\n    };\n  }\n  return validateCouponByQuery(query);\n};\nconst validateDailyUpdateCoupon = (query) => {\n  const schedule = toSchedule(query.dailyCouponOptions ?? []);\n  const isValid = schedule.every(({\n    couponIdList\n  }) => couponIdList !== void 0);\n  const errorMessage = isValid ? void 0 : `[관리자용 메시지] 일자별 쿠폰이 모두 입력되어 있는지 확인해주세요.\n${filterMap(schedule, ({\n    couponIdList\n  }) => couponIdList === void 0, ({\n    shouldUpdateAt\n  }) => {\n    return `[${shouldUpdateAt.toLocaleDateString()}] 쿠폰이 없습니다.`;\n  }).join(\"\\n\")}`;\n  return {\n    isValid,\n    errorMessage\n  };\n};\nconst validateCouponQuery = (query) => {\n  if (query.couponType === CouponType.RANDOM) {\n    return {\n      isValid: true\n    };\n  }\n  switch (query.couponUpdateType) {\n    case CouponUpdateType.DAILY:\n      return validateDailyUpdateCoupon(query);\n    default:\n      return {\n        isValid: true\n      };\n  }\n};\nconst validateCouponByQuery = (query) => {\n  if (query === void 0) {\n    return {\n      isValid: false,\n      errorMessage: \"쿠폰 쿼리가 없습니다.\"\n    };\n  }\n  switch (query.type) {\n    case QueryType.Coupon:\n      return validateCouponQuery(query);\n    default:\n      return {\n        isValid: true\n      };\n  }\n};\nexport {\n  validateCoupon\n};\n","import { jsx, jsxs, Fragment } from \"react/jsx-runtime\";\nimport { useMemo, useRef, useState, useEffect } from \"react\";\nimport { Coupon } from \"../../../@shared/Coupon/index.js\";\nimport { EventTrigger } from \"../../../@shared/EventTrigger/index.js\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nimport { useRootComponentId, useSetRootModule } from \"../../hooks.js\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { QueryType } from \"../../types.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport \"../../../../node_modules/@firebase/analytics/dist/esm/index.esm2017.js\";\nimport \"../../../../node_modules/firebase/app/dist/esm/index.esm.js\";\nimport { useCurrentUser } from \"../../../../hooks/useCurrentUser.js\";\nimport { isCanvas } from \"../../../../utils/framer/isCanvas.js\";\nimport \"framer\";\nimport \"../../../../node_modules/@29cm/snowplow/dist/esm/core/snowplow.js\";\nimport \"../../../../node_modules/swr/core/dist/index.js\";\nimport \"../../../../apis/user-segment/CategoryFirstOrderApiService.js\";\nimport \"../../../../config/index.js\";\nimport \"../../../../node_modules/js-cookie/dist/js.cookie.js\";\nimport \"../../../../apis/highlight-products/HighlightProductsApiService.js\";\nimport \"../../../../apis/brand-mix/BrandMixApiService.js\";\nimport \"../../../../apis/one-brand-days/OneBrandDaysApiService.js\";\nimport \"../../../../apis/taste-sharing/TasteSharingApiService.js\";\nimport \"../../../../apis/user/UserApiService.js\";\nimport \"../../../../apis/preuser/PreuserApiService.js\";\nimport \"../../../../node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.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 { useBreakpoint } from \"../../../../hooks/useBreakpoint.js\";\nimport \"../../../../hooks/stores/bottom-sheet/bottom-sheet.store.js\";\nimport \"react-dom\";\nimport \"../../../systems/Dialog/Dialog.module.css.js\";\nimport \"framer-motion\";\nimport \"../../../../containers/DialogContainer/DialogContainer.emitter.js\";\nimport \"../../../../hooks/useFeatureFlag.js\";\nimport \"../../../../utils/redirectLogin.js\";\nimport \"../../../../utils/event-properties/source.js\";\nimport { useComponentTimingContext } from \"../../../../hooks/beacon/ComponentTimingContext.js\";\nimport { useFetchCouponsDownloadStatus } from \"../../../../hooks/fetchers/useFetchCouponsDownloadStatus.js\";\nimport { useTrackSnowplowEvent } from \"../../../../hooks/snowplow/useTrackSnowplowEvent.js\";\nimport { useDownloadCoupons } from \"../../../../hooks/useDownloadCoupons.js\";\nimport { resolveCouponLayout, DEFAULT_COUPON_MODULE_NAME_VISIBILITY, toBackgroundColor } from \"../../../../libs/property-controls/coupon.js\";\nimport { CouponType } from \"../../../../types/models/coupon.js\";\nimport { hideClosestParentByFramerName } from \"../../../../utils/hideParentElement.js\";\nimport { getPaddingStyle } from \"../../../../utils/spacing.js\";\nimport { useCouponsQuery } from \"../CouponModule.hooks.js\";\nimport { NoticesElement } from \"../NoticesElement/NoticesElement.js\";\nimport { useCouponIds } from \"./CouponElement.hooks.js\";\nimport { getCouponName, getCouponStatus, getCouponFallbackDescription, getDescriptionByStatus } from \"./CouponElement.utils.js\";\nimport { validateCoupon } from \"./CouponElement.validate.js\";\nimport head from \"../../../../node_modules/lodash-es/head.js\";\nconst CouponElement = ({\n  loading = false,\n  query: _query,\n  output,\n  layout\n}) => {\n  const {\n    logged,\n    userNo\n  } = useCurrentUser();\n  const breakpoint = useBreakpoint();\n  const trackSnowplowEvent = useTrackSnowplowEvent();\n  const dispatchSetQuery = useQueryStore((state) => state.dispatchSetQuery);\n  const theme = useTheme();\n  const {\n    isInView\n  } = useIntersectionContext();\n  const query = useMemo(() => attachAdditionalQuery(_query, output), [_query, output]);\n  const {\n    isVisible,\n    loading: isSegmentLoading\n  } = useSegment();\n  const canFetchBySegment = !isSegmentLoading && isVisible;\n  const rootRef = useRef(null);\n  const componentId = useRootComponentId(query);\n  const {\n    couponIds,\n    couponType\n  } = useCouponIds({\n    query\n  });\n  const isFramer = isCanvas();\n  const {\n    isValid,\n    errorMessage\n  } = validateCoupon({\n    query,\n    enabled: isFramer\n  });\n  const {\n    coupons\n  } = useCouponsQuery({\n    query,\n    couponIds,\n    enabled: isInView && canFetchBySegment\n  });\n  const headCoupon = head(coupons);\n  const hasCoupon = headCoupon !== void 0;\n  const isUnlimitedCoupon = (headCoupon == null ? void 0 : headCoupon.personMaxIssueCount) === 0;\n  const [isUnlimitedCouponDownloaded, setIsUnlimitedCouponDownloaded] = useState(false);\n  const [isCouponDownloaded, setIsCouponDownloaded] = useState(false);\n  const isRandomCoupon = (query == null ? void 0 : query.type) === QueryType.Coupon && (query == null ? void 0 : query.couponType) === CouponType.RANDOM;\n  const enabledFetchCouponDownloadStatus = isInView && !isRandomCoupon && canFetchBySegment;\n  const {\n    statuses,\n    isLoading\n  } = useFetchCouponsDownloadStatus(couponIds, userNo, enabledFetchCouponDownloadStatus);\n  const handleCouponDownloadSuccess = () => {\n    if (!headCoupon) {\n      return;\n    }\n    trackSnowplowEvent(\"click_button\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      button_id: \"coupondownload\",\n      coupon_no: headCoupon.id,\n      button_name: headCoupon.couponName,\n      layout_position: -1\n      // TODO(미티켓): filter_gender (F | M) — 브랜드데이 조립형 모듈의 쿼리 설계가 확정되면\n      // 티켓 발행 후 이벤트 적재를 연결합니다. 필터 미사용 시 필드 자체를 보내지 않습니다.\n    });\n    if (isRandomCoupon) {\n      return;\n    }\n    if (isUnlimitedCoupon) {\n      setIsUnlimitedCouponDownloaded(true);\n      return;\n    }\n    setIsCouponDownloaded(true);\n  };\n  const {\n    validate,\n    download\n  } = useDownloadCoupons(couponType, headCoupon == null ? void 0 : headCoupon.discountType, handleCouponDownloadSuccess);\n  const shouldRender = query && hasCoupon && (!loading || !isLoading || !logged);\n  const {\n    markReady\n  } = useComponentTimingContext();\n  useEffect(() => {\n    if (shouldRender) {\n      markReady();\n    }\n  }, [shouldRender, markReady]);\n  const paddingStyle = getPaddingStyle(layout);\n  useEffect(() => {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    if (!query) {\n      return;\n    }\n    if (!output) {\n      return;\n    }\n    dispatchSetQuery(output, query);\n  }, [output, query]);\n  useSetRootModule(query, output);\n  const shouldRenderError = !isValid && isFramer;\n  useEffect(() => {\n    if (rootRef.current) {\n      hideClosestParentByFramerName(rootRef.current, \"카테고리첫구매쿠폰\", isVisible);\n    }\n  }, [isVisible]);\n  useEffect(() => {\n    setIsUnlimitedCouponDownloaded(false);\n  }, [headCoupon == null ? void 0 : headCoupon.id]);\n  const resolvedCouponLayout = resolveCouponLayout(layout.couponLayout, breakpoint);\n  if (!isVisible) {\n    window == null ? void 0 : window.dispatchEvent(new CustomEvent(\"layout-done\"));\n    return /* @__PURE__ */ jsx(\"div\", { ref: rootRef });\n  }\n  if (!shouldRender) {\n    return /* @__PURE__ */ jsxs(Fragment, { children: [\n      /* @__PURE__ */ jsx(Coupon.Root, { ref: rootRef, style: {\n        padding: paddingStyle\n      }, loading: true, theme, layout: resolvedCouponLayout }),\n      shouldRenderError ? /* @__PURE__ */ jsx(\"div\", { style: errorMessageStyle, children: errorMessage ?? \"쿠폰 상태가 올바르지 않습니다.\" }) : null\n    ] });\n  }\n  const couponDownloadItems = coupons.map((coupon) => ({\n    couponId: coupon.id,\n    quantity: Math.max(coupon.personMaxIssueCount ?? 1, 1)\n  }));\n  const handleClick = () => {\n    if (!validate()) {\n      return;\n    }\n    download(couponDownloadItems, true);\n  };\n  const handleImpression = () => {\n    trackSnowplowEvent(\"impression_content\", {\n      section_name: componentId,\n      section_title: componentId,\n      position: -1,\n      layout_position: -1,\n      layout_id: `coupondown_${headCoupon.id}`\n    });\n  };\n  const couponName = getCouponName(coupons, query, layout.couponNameVisibility ?? DEFAULT_COUPON_MODULE_NAME_VISIBILITY);\n  const status = getCouponStatus(headCoupon, logged, query, statuses);\n  const resolvedStatus = isCouponDownloaded ? \"downloaded\" : isUnlimitedCoupon && isUnlimitedCouponDownloaded ? \"redownloadable\" : status;\n  const description = isRandomCoupon ? getCouponFallbackDescription(coupons) : getDescriptionByStatus(headCoupon)[resolvedStatus];\n  const {\n    backgroundColor,\n    ...rest\n  } = layout;\n  return /* @__PURE__ */ jsxs(EventTrigger.Root, { ref: rootRef, style: {\n    padding: paddingStyle\n  }, types: [\"impression\"], onImpression: handleImpression, children: [\n    /* @__PURE__ */ jsxs(Coupon.Root, { theme, backgroundColor: toBackgroundColor(backgroundColor), status: resolvedStatus, layout: resolvedCouponLayout, children: [\n      /* @__PURE__ */ jsxs(Coupon.Summary, { children: [\n        /* @__PURE__ */ jsx(Coupon.Title, { children: couponName }),\n        /* @__PURE__ */ jsx(Coupon.Description, { children: description })\n      ] }),\n      /* @__PURE__ */ jsx(Coupon.Divider, {}),\n      /* @__PURE__ */ jsx(EventTrigger.Target, { style: {\n        aspectRatio: resolvedCouponLayout === \"detail\" ? \"1 / 1\" : void 0\n      }, children: /* @__PURE__ */ jsx(Coupon.Button, { onClick: handleClick }) })\n    ] }),\n    /* @__PURE__ */ jsx(NoticesElement, { couponType, coupons, ...rest }),\n    shouldRenderError ? /* @__PURE__ */ jsx(\"div\", { style: errorMessageStyle, children: errorMessage ?? \"쿠폰 상태가 올바르지 않습니다.\" }) : null\n  ] });\n};\nconst errorMessageStyle = {\n  background: \"white\",\n  border: \"0.7px solid #00000066\",\n  borderRadius: \"2px\",\n  padding: \"8px\",\n  whiteSpace: \"pre-line\"\n};\nconst attachAdditionalQuery = (query, output) => {\n  return query ? {\n    ...query,\n    isRoot: query.rootOutput === void 0,\n    rootOutput: query.rootOutput || output\n  } : void 0;\n};\nexport {\n  CouponElement\n};\n","import { QueryType } from \"../types.js\";\nconst createKey = (query) => {\n  var _a;\n  return ((_a = query == null ? void 0 : query.keys) == null ? void 0 : _a.join(\"-\")) ?? void 0;\n};\nconst MOLOCO_SHARED_KEY = \"moloco-shared\";\nconst getMolocoCacheQuery = (query) => {\n  if (query.type !== QueryType.Moloco) {\n    return query;\n  }\n  const molocoQuery = query;\n  return {\n    type: molocoQuery.type,\n    tagId: molocoQuery.tagId,\n    inventoryId: molocoQuery.inventoryId,\n    pageId: molocoQuery.pageId\n    // facetName은 의도적으로 제외\n    // 이유: 모든 탭 데이터가 이미 API에서 반환되므로\n    //       탭마다 다른 cache를 만들 필요가 없음\n  };\n};\nconst createMolocoKey = (query) => {\n  return [MOLOCO_SHARED_KEY, getMolocoCacheQuery(query)];\n};\nexport {\n  createKey,\n  createMolocoKey,\n  getMolocoCacheQuery\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useQueryStore } from \"../../query-store/query.store.js\";\nimport { CouponElement } from \"../CouponElement/CouponElement.js\";\nimport { createKey } from \"../../utils/key.js\";\nconst LinkedCouponModule = ({\n  value,\n  output,\n  layout\n}) => {\n  const query = useQueryStore((state) => state.queries[value]);\n  return /* @__PURE__ */ jsx(CouponElement, { query, output, layout }, createKey(query));\n};\nexport {\n  LinkedCouponModule\n};\n","import { ControlType } from \"framer\";\nconst COMPONENT_ID_PROPS = {\n  componentId: {\n    type: ControlType.String,\n    title: \"컴포넌트 ID\",\n    description: \"이벤트 수집 시에 모듈을 구분하기 위한 값\\nex. 29welcoming\",\n    defaultValue: \"\"\n  }\n};\nexport {\n  COMPONENT_ID_PROPS\n};\n","import { ControlType } from \"framer\";\nimport { entries } from \"../../utils/entries.js\";\nconst combineObjectPropertyControls = (...controls) => {\n  return controls.flatMap(entries).reduce((prev, curr) => {\n    const [key, incoming] = curr;\n    const copied = {\n      ...prev\n    };\n    const existing = copied[key] ?? {};\n    if (existing.type === ControlType.Enum && incoming.type === ControlType.Enum) {\n      copied[key] = mergeEnumControlDescription(existing, incoming);\n      return prev = copied;\n    }\n    return prev = {\n      ...prev,\n      [key]: incoming\n    };\n  }, {});\n};\nconst mergeEnumControlDescription = (existing, incoming) => {\n  return {\n    ...existing,\n    options: [...existing.options, ...incoming.options],\n    optionTitles: [...existing.optionTitles ?? [], ...incoming.optionTitles ?? []]\n  };\n};\nexport {\n  combineObjectPropertyControls\n};\n","import { ControlType } from \"framer\";\nimport { CouponType } from \"../../types/models/coupon.js\";\nimport { CouponUpdateType } from \"./CouponModule/CouponModule.types.js\";\nimport { QueryType, RankingType, PopularityPeriodType, TrendingPeriodType, CategoryType } from \"./types.js\";\nconst PRODUCT_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Product],\n    optionTitles: [\"상품\"]\n  },\n  productIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Product,\n    type: ControlType.String,\n    title: \"상품 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst KEYWORD_COLLECTION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.KeywordCollection],\n    optionTitles: [\"키워드 컬렉션\"]\n  },\n  keywordCollectionId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.KeywordCollection,\n    type: ControlType.String,\n    title: \"키워드 컬렉션 ID\",\n    description: \"단수만 입력\",\n    defaultValue: \"\"\n  }\n};\nconst KEYWORD_COLLECTIONS_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.KeywordCollections],\n    optionTitles: [\"다중 키워드 컬렉션\"]\n  },\n  keywordCollectionIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.KeywordCollections,\n    type: ControlType.String,\n    title: \"키워드 컬렉션 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\",\n    placeholder: \"11628,11629,11630\"\n  }\n};\nconst BRAND_CURATION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.BrandCuration],\n    optionTitles: [\"브랜드 큐레이션\"]\n  },\n  brandGroupIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.BrandCuration,\n    type: ControlType.String,\n    title: \"브랜드 그룹 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  },\n  brandSize: {\n    hidden: ({\n      type\n    }) => type !== QueryType.BrandCuration,\n    type: ControlType.Number,\n    title: \"개수\",\n    description: \"최대 500개, 미입력 시 최대 개수로 노출\",\n    unit: \"개\",\n    defaultValue: 20,\n    min: 0,\n    displayStepper: true\n  },\n  brandCurationTagIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.BrandCuration,\n    type: ControlType.String,\n    title: \"태그 ID\",\n    description: \"태그 아이디 입력 시 매핑된 상품만 노출\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst RECOMMENDATION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Recommendation],\n    optionTitles: [\"개인화 추천\"]\n  },\n  recommendationTagIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Recommendation,\n    type: ControlType.String,\n    title: \"태그 ID\",\n    description: \"태그 아이디 입력 시 매핑된 상품만 노출\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst RANKING_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Ranking],\n    optionTitles: [\"랭킹\"]\n  },\n  rankingType: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.Enum,\n    title: \"랭킹 유형\",\n    options: [RankingType.Popularity, RankingType.Trending],\n    optionTitles: [\"인기\", \"급상승\"]\n  },\n  popularityPeriodType: {\n    hidden: ({\n      type,\n      rankingType\n    }) => type !== QueryType.Ranking || rankingType !== RankingType.Popularity,\n    type: ControlType.Enum,\n    title: \"기간\",\n    options: [PopularityPeriodType.Realtime, PopularityPeriodType.Hourly, PopularityPeriodType.Daily],\n    optionTitles: [\"실시간\", \"시간별\", \"일별\"]\n  },\n  trendingPeriodType: {\n    hidden: ({\n      type,\n      rankingType\n    }) => type !== QueryType.Ranking || rankingType !== RankingType.Trending,\n    type: ControlType.Enum,\n    title: \"기간\",\n    options: [TrendingPeriodType.Hourly],\n    optionTitles: [\"시간별\"]\n  },\n  rankingTagIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.String,\n    title: \"태그 ID\",\n    description: \"태그 아이디 입력 시 매핑된 상품만 노출\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  },\n  categoryType: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.Enum,\n    title: \"카테고리 유형\",\n    options: [CategoryType.Large, CategoryType.Middle],\n    optionTitles: [\"대카테고리\", \"중카테고리\"],\n    defaultValue: CategoryType.Large\n  },\n  excludeLargeCategoryIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    title: \"제외 대카테고리 ID\",\n    type: ControlType.String,\n    description: \"패싯에서 제외 시킬 대카테고리 ID 입력\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\",\n    placeholder: \"268100100,269100100,272100100,273100100\"\n  },\n  excludeMiddleCategoryIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Ranking,\n    type: ControlType.String,\n    title: \"제외 중카테고리 ID\",\n    description: \"패싯에서 제외 시킬 중카테고리 ID 입력\\n복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\",\n    placeholder: \"268103100,268106100,268104100,268117100\"\n  }\n};\nconst COUPON_COLLECTION_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.CouponCollection],\n    optionTitles: [\"타임 세일 브랜드\"]\n  },\n  brandSaleGroupId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.CouponCollection,\n    type: ControlType.String,\n    title: \"타임 세일 브랜드 ID\",\n    description: \"단수만 입력\",\n    defaultValue: \"\"\n  }\n};\nconst RAFFLE_GROUP_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.RaffleGroup],\n    optionTitles: [\"래플 그룹\"]\n  },\n  raffleGroupId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.RaffleGroup,\n    type: ControlType.String,\n    title: \"래플 그룹 ID\"\n  }\n};\nconst COUPON_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Coupon],\n    optionTitles: [\"쿠폰\"]\n  },\n  couponType: {\n    type: ControlType.Enum,\n    title: \"쿠폰 유형\",\n    description: \"랜덤 쿠폰은 쿠폰 번호 없이 당일에 발급 가능한 쿠폰이 발급됩니다.\",\n    options: [CouponType.NORMAL, CouponType.LIMITED, CouponType.RANDOM],\n    optionTitles: [\"일반\", \"선착순\", \"랜덤\"]\n  },\n  couponUpdateType: {\n    hidden: (props) => props.couponType === CouponType.RANDOM,\n    type: ControlType.Enum,\n    title: \"쿠폰 갱신 유형\",\n    options: [CouponUpdateType.NORMAL, CouponUpdateType.DAILY],\n    optionTitles: [\"고정\", \"일자별\"]\n  },\n  couponIds: {\n    hidden: (props) => props.couponType !== CouponType.RANDOM && props.couponUpdateType !== CouponUpdateType.NORMAL,\n    type: ControlType.String,\n    title: \"쿠폰 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\\n랜덤 쿠폰은 유의사항 문구 자동생성을 위해 첫 회차에 해당하는 쿠폰번호 목록을 입력해 주세요.\"\n  },\n  dailyCouponOptions: {\n    hidden: (props) => props.couponType === CouponType.RANDOM || props.couponUpdateType !== CouponUpdateType.DAILY,\n    type: ControlType.Array,\n    title: \"갱신 일자\",\n    control: {\n      type: ControlType.Object,\n      controls: {\n        dailyCouponIds: {\n          type: ControlType.Array,\n          title: \"쿠폰 번호 목록\",\n          description: \"일자별 쿠폰 번호 목록을 입력합니다.\\n하나의 쿠폰 번호 목록당 하나의 날짜에 연결됩니다.\",\n          control: {\n            type: ControlType.String,\n            title: \"쿠폰 번호 목록\"\n          }\n        },\n        updateSchedule: {\n          type: ControlType.Object,\n          title: \"갱신 기간\",\n          controls: {\n            startAt: {\n              type: ControlType.Date,\n              title: \"시작일\"\n            },\n            endAt: {\n              type: ControlType.Date,\n              title: \"종료일\"\n            }\n          }\n        },\n        updateAt: {\n          type: ControlType.Object,\n          title: \"갱신 주기\",\n          description: \"ex) 10시 0분 0초 입력 -> 매일 오전 10시에 쿠폰번호 갱신\",\n          controls: {\n            hours: {\n              type: ControlType.Number,\n              title: \"시\",\n              defaultValue: 0,\n              min: 0,\n              max: 23,\n              unit: \"시\",\n              step: 1,\n              displayStepper: true\n            },\n            minutes: {\n              type: ControlType.Number,\n              title: \"분\",\n              defaultValue: 0,\n              min: 0,\n              max: 59,\n              unit: \"분\",\n              step: 1,\n              displayStepper: true\n            },\n            seconds: {\n              type: ControlType.Number,\n              title: \"초\",\n              defaultValue: 0,\n              min: 0,\n              max: 59,\n              unit: \"초\",\n              step: 1,\n              displayStepper: true\n            }\n          }\n        }\n      }\n    }\n  }\n};\nconst PREUSER_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Preuser],\n    optionTitles: [\"체험단\"]\n  },\n  preuserIds: {\n    type: ControlType.String,\n    hidden: ({\n      type\n    }) => type !== QueryType.Preuser,\n    title: \"체험단 ID\",\n    description: \"복수 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst QUERY_CONTROL = {\n  type: ControlType.Object,\n  title: \"질의\",\n  controls: {}\n};\nconst CUSTOM_CATEGORY_CONTROLS = {\n  type: {\n    type: ControlType.Enum,\n    title: \"질의 유형\",\n    options: [QueryType.CustomCategory],\n    optionTitles: [\"카테고리\"]\n  },\n  categoryIds: {\n    hidden: ({\n      type\n    }) => type !== QueryType.CustomCategory,\n    type: ControlType.String,\n    title: \"카테고리 ID\",\n    description: \"복수개의 카테고리를 mix 하여 커스텀 카테고리 입력 시 콤마(,)로 구분\",\n    defaultValue: \"\"\n  }\n};\nconst MOLOCO_CONTROL = {\n  type: {\n    type: ControlType.Enum,\n    title: \"유형\",\n    options: [QueryType.Moloco],\n    optionTitles: [\"몰로코\"]\n  },\n  tagId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.String,\n    title: \"태그 ID\"\n  },\n  inventoryId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.String,\n    title: \"인벤토리 ID\",\n    description: \"몰로코와 협의된 값 ex) campaign_29week\"\n  },\n  pageId: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.String,\n    title: \"페이지 ID\",\n    description: \"해당 모듈이 노출될 이구위크 페이지 이름, 임의값으로 정해서 전달주시면 됩니다. *페이지당 1개의 고유 pageId 필요\"\n  },\n  categories: {\n    hidden: ({\n      type\n    }) => type !== QueryType.Moloco,\n    type: ControlType.Array,\n    title: \"카테고리\",\n    description: \"카테고리를 입력하면 기존 몰로코 데이터에서 해당 카테고리 데이터만 노출됩니다\",\n    control: {\n      type: ControlType.Object,\n      controls: {\n        categoryId: {\n          type: ControlType.String,\n          title: \"카테고리 ID\"\n        },\n        categoryName: {\n          type: ControlType.String,\n          title: \"카테고리 이름\"\n        }\n      }\n    }\n  }\n};\nexport {\n  BRAND_CURATION_CONTROLS,\n  COUPON_COLLECTION_CONTROLS,\n  COUPON_CONTROLS,\n  CUSTOM_CATEGORY_CONTROLS,\n  KEYWORD_COLLECTIONS_CONTROLS,\n  KEYWORD_COLLECTION_CONTROLS,\n  MOLOCO_CONTROL,\n  PREUSER_CONTROLS,\n  PRODUCT_CONTROLS,\n  QUERY_CONTROL,\n  RAFFLE_GROUP_CONTROLS,\n  RANKING_CONTROLS,\n  RECOMMENDATION_CONTROLS\n};\n","import { combineObjectPropertyControls } from \"../../../libs/property-controls/helpers.js\";\nimport { QUERY_CONTROL, COUPON_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS, KEYWORD_COLLECTION_CONTROLS } from \"../controls.js\";\nconst MANUAL_COUPON_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(COUPON_CONTROLS)\n};\nconst AUTO_COUPON_MODULE_QUERY = {\n  ...QUERY_CONTROL,\n  controls: combineObjectPropertyControls(KEYWORD_COLLECTION_CONTROLS, KEYWORD_COLLECTIONS_CONTROLS)\n};\nexport {\n  AUTO_COUPON_MODULE_QUERY,\n  MANUAL_COUPON_MODULE_QUERY\n};\n","import { APIService } from \"../APIService.js\";\nimport { throwFailError } from \"../@middlewares/throwFailError.js\";\nimport { environments, env } from \"../../config/index.js\";\nconst DEFAULT_COLLECTION_PRODUCTS_SIZE = 20;\nclass CollectionApiService extends APIService {\n  constructor() {\n    super();\n    this.setMiddleware(throwFailError);\n  }\n  async getCollection(collectionId, needShuffle, isDevMode) {\n    const baseUrl = isDevMode ? environments.development.api.content : env.api.content;\n    return this.get(`${baseUrl}/api/v4/framers/collections/${collectionId}/product-group-preview?productShuffleEnabled=${String(needShuffle)}`);\n  }\n  async getCollections(collectionIds) {\n    return this.get(`${env.api.content}/api/v4/framers/proxy/content-api/api/v4/collections`, {\n      collectionIds: collectionIds.join(\",\")\n    });\n  }\n  async getCollectionProducts({\n    collectionId,\n    productGroupId,\n    sort,\n    isDevMode\n  }) {\n    const baseUrl = isDevMode ? environments.development.api.content : env.api.content;\n    return this.get(`${baseUrl}/api/v4/framers/proxy/content-api/api/v5/keyword-collections/${collectionId}/product-groups/${productGroupId}/products`, {\n      sort,\n      page: 0,\n      size: DEFAULT_COLLECTION_PRODUCTS_SIZE\n    }).then((data) => formatProducts(data.data.resultList));\n  }\n}\nconst formatProducts = (products) => products.map((product) => {\n  var _a;\n  return {\n    frontBrand: {\n      frontBrandId: product.frontBrand.id,\n      nameKor: product.frontBrand.nameKor,\n      nameEng: product.frontBrand.nameEng\n    },\n    productId: product.productId,\n    productName: product.productName,\n    subjectDescriptions: product.subjectDescriptions,\n    imageUrl: product.imageUrl,\n    consumerPrice: product.consumerPrice,\n    lastSalePrice: product.lastSalePrice,\n    lastSalePercent: product.lastSalePercent,\n    heartCount: product.heartCount,\n    heartOn: product.heartOn,\n    reviewCount: product.reviewCount,\n    reviewAveragePoint: product.reviewAveragePoint,\n    isCoupon: product.saleInfo.coupon,\n    isFreeShipping: product.freeShipping,\n    isNew: product.newProperty,\n    isSoldOut: product.soldOut,\n    frontCategories: (_a = product.frontCategories) == null ? void 0 : _a.map((category) => ({\n      largeCategoryCode: category.largeCode ?? 0,\n      largeCategoryName: category.largeName ?? \"\",\n      mediumCategoryCode: category.mediumCode ?? 0,\n      mediumCategoryName: category.mediumName ?? \"\",\n      smallCategoryCode: category.smallCode ?? 0,\n      smallCategoryName: category.smallName ?? \"\"\n    }))\n  };\n});\nconst collectionApi = new CollectionApiService();\nexport {\n  collectionApi\n};\n","import useSWR from \"../../../../node_modules/swr/core/dist/index.js\";\nimport { collectionApi } from \"../../../../apis/collection/CollectionApiService.js\";\nimport { keywordCollectionApi } from \"../../../../apis/keyword-collections/KeywordCollectionApiService.js\";\nimport { QueryType } from \"../../types.js\";\nimport { orderByDateAsc, getCurrentScheduleIndex } from \"../../../../utils/date.js\";\nimport { splitToNumberArray } from \"../../../../utils/splitToNumberArray.js\";\nconst COUPON_ID_FETCHER_KEY = \"coupon-module/coupon-id\";\nconst useCouponIdQuery = (options) => {\n  const {\n    enabled: _enabled = true,\n    query\n  } = options;\n  const enabled = _enabled && query !== void 0;\n  const {\n    data,\n    isLoading,\n    ...rest\n  } = useSWR(enabled ? [COUPON_ID_FETCHER_KEY, query] : null, () => queryCouponId(query));\n  return {\n    isLoading: isLoading || !enabled,\n    query: data,\n    ...rest\n  };\n};\nconst fetchKeywordCollectionCouponId = async (query) => {\n  if (!query.keywordCollectionId) {\n    return query;\n  }\n  const {\n    data\n  } = await keywordCollectionApi.getKeywordCollection(Number(query.keywordCollectionId));\n  const {\n    title,\n    description,\n    displayEndAt,\n    productGroups,\n    couponId\n  } = data;\n  const [firstProductGroup] = productGroups;\n  return {\n    ...query,\n    title,\n    description: description ?? void 0,\n    displayEndAt: displayEndAt ?? void 0,\n    couponId: couponId ?? void 0,\n    productGroups,\n    selectedProductGroup: {\n      id: firstProductGroup.productGroupId,\n      sort: firstProductGroup.sort,\n      index: 0\n    }\n  };\n};\nconst fetchKeywordCollectionsCouponId = async (query) => {\n  if (!query.keywordCollectionIds) {\n    return query;\n  }\n  const {\n    data\n  } = await collectionApi.getCollections(splitToNumberArray(query.keywordCollectionIds));\n  const collections = orderByDateAsc(data, (x) => x.displayStartAt);\n  const currentIndex = getCurrentScheduleIndex(collections, (current) => current.displayStartAt, (_, next) => next == null ? void 0 : next.displayStartAt);\n  const collection = collections[currentIndex ?? 0];\n  if (!collection) {\n    return query;\n  }\n  const {\n    collectionId,\n    title,\n    description,\n    displayEndAt,\n    productGroupList,\n    couponId\n  } = collection;\n  const [firstProductGroup] = productGroupList;\n  return {\n    type: QueryType.KeywordCollection,\n    keywordCollectionId: `${collectionId}`,\n    title,\n    description: description ?? void 0,\n    displayEndAt: displayEndAt ?? void 0,\n    couponId: couponId ?? void 0,\n    productGroups: productGroupList.map((group) => ({\n      productGroupId: group.collectionProductGroupId,\n      title: group.title,\n      sort: group.sort\n    })),\n    selectedProductGroup: {\n      id: firstProductGroup.collectionProductGroupId,\n      sort: firstProductGroup.sort,\n      index: 0\n    }\n  };\n};\nconst queryCouponId = (query) => {\n  if (!query) {\n    return;\n  }\n  switch (query.type) {\n    case QueryType.KeywordCollection:\n      return fetchKeywordCollectionCouponId(query);\n    case QueryType.KeywordCollections:\n      return fetchKeywordCollectionsCouponId(query);\n    default:\n      return query;\n  }\n};\nexport {\n  useCouponIdQuery\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { useSegment } from \"../../../@shared/providers/SegmentProvider/SegmentProvider.js\";\nimport \"../../../systems/curations/IntersectionProvider/IntersectionProvider.js\";\nimport { useIntersectionContext } from \"../../../systems/curations/IntersectionProvider/IntersectionProvider.hooks.js\";\nimport { useCouponIdQuery } from \"./AutoCouponModule.hooks.js\";\nimport { CouponElement } from \"../CouponElement/CouponElement.js\";\nconst AutoCouponModule = ({\n  query: _query,\n  output,\n  layout\n}) => {\n  const {\n    isInView\n  } = useIntersectionContext();\n  const {\n    isVisible,\n    loading: isSegmentLoading\n  } = useSegment();\n  const canFetchBySegment = !isSegmentLoading && isVisible;\n  const {\n    isLoading,\n    query\n  } = useCouponIdQuery({\n    query: _query,\n    enabled: isInView && canFetchBySegment\n  });\n  return /* @__PURE__ */ jsx(CouponElement, { loading: isLoading, query, output, layout });\n};\nexport {\n  AutoCouponModule\n};\n","import { jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { COUPON_CONTROLS, COUPON_MODULE_NAME_VISIBILITY_CONTROLS } from \"../../../libs/property-controls/coupon.js\";\nimport { THEME_CONTROLS } from \"../../../libs/property-controls/theme.js\";\nimport { SEGMENT_CONTROLS } from \"../../../libs/property-controls/segment.js\";\nimport { CouponModuleInputType } from \"./CouponModule.types.js\";\nimport { LinkedCouponModule } from \"./LinkedCouponModule/LinkedCouponModule.js\";\nimport { COUPON_NOTICES_CONTROLS } from \"../../../libs/property-controls/coupon-notices.js\";\nimport { COMPONENT_ID_PROPS } from \"../../../libs/property-controls/component-id.js\";\nimport { SectionLayout } from \"../../systems/curations/SectionLayout/SectionLayout.js\";\nimport { ComponentTimingProvider } from \"../../../hooks/beacon/ComponentTimingContext.js\";\nimport { useComponentTiming } from \"../../../hooks/beacon/useComponentTiming.js\";\nimport { MANUAL_COUPON_MODULE_QUERY, AUTO_COUPON_MODULE_QUERY } from \"./CouponModule.controls.js\";\nimport { AutoCouponModule } from \"./AutoCouponModule/AutoCouponModule.js\";\nimport { CouponElement } from \"./CouponElement/CouponElement.js\";\nconst CouponModuleInner = ({\n  input,\n  output,\n  layout\n}) => {\n  switch (input.type) {\n    case CouponModuleInputType.Linked:\n      return /* @__PURE__ */ jsx(LinkedCouponModule, { value: input.value, output, layout });\n    case CouponModuleInputType.Auto:\n      return /* @__PURE__ */ jsx(AutoCouponModule, { query: input.autoQuery, output, layout });\n    case CouponModuleInputType.Manual:\n      return /* @__PURE__ */ jsx(CouponElement, { query: input.query, output, layout });\n    default:\n      return null;\n  }\n};\nconst CouponModule = ({\n  theme,\n  componentId,\n  segment,\n  ...rest\n}) => {\n  const timing = useComponentTiming(\"CouponModule\");\n  return /* @__PURE__ */ jsx(ComponentTimingProvider, { timing, children: /* @__PURE__ */ jsx(SectionLayout, { componentId, theme, segment, onVisible: timing.markVisible, children: /* @__PURE__ */ jsx(CouponModuleInner, { ...rest }) }) });\n};\naddPropertyControls(CouponModule, {\n  ...THEME_CONTROLS,\n  ...SEGMENT_CONTROLS,\n  componentId: {\n    hidden: ({\n      input\n    }) => (input == null ? void 0 : input.type) === CouponModuleInputType.Linked,\n    ...COMPONENT_ID_PROPS.componentId\n  },\n  input: {\n    type: ControlType.Object,\n    title: \"입력 값\",\n    controls: {\n      type: {\n        type: ControlType.Enum,\n        title: \"유형\",\n        options: [CouponModuleInputType.Manual, CouponModuleInputType.Linked, CouponModuleInputType.Auto],\n        optionTitles: [\"수동\", \"연결\", \"자동\"],\n        defaultValue: CouponModuleInputType.Manual\n      },\n      value: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Linked,\n        type: ControlType.String,\n        title: \"출력 값\",\n        defaultValue: \"\"\n      },\n      query: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Manual,\n        ...MANUAL_COUPON_MODULE_QUERY\n      },\n      autoQuery: {\n        hidden: ({\n          type\n        }) => type !== CouponModuleInputType.Auto,\n        ...AUTO_COUPON_MODULE_QUERY\n      }\n    }\n  },\n  output: {\n    type: ControlType.String,\n    title: \"출력 값\",\n    defaultValue: \"\"\n  },\n  layout: {\n    type: ControlType.Object,\n    title: \"레이아웃\",\n    controls: {\n      ...COUPON_CONTROLS,\n      ...COUPON_MODULE_NAME_VISIBILITY_CONTROLS,\n      ...COUPON_NOTICES_CONTROLS,\n      padding: {\n        type: ControlType.FusedNumber,\n        title: \"패딩\",\n        defaultValue: 0,\n        toggleKey: \"isMixed\",\n        toggleTitles: [\"All\", \"Individual\"],\n        valueKeys: [\"paddingTop\", \"paddingRight\", \"paddingBottom\", \"paddingLeft\"],\n        valueLabels: [\"T\", \"R\", \"B\", \"L\"],\n        min: 0\n      }\n    }\n  }\n});\nexport {\n  CouponModule\n};\n","import{CouponModule}from\"https://asset.29cm.co.kr/contents/framer/components/modules/CouponModule/CouponModule.js\";CouponModule.displayName=\"[조립형]Coupon\";export default CouponModule;\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CouponModule\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CouponModule.map"],"mappings":"0kDAOM,GAAY,GACT,OAAO,GAAW,YAAY,GAAmB,CAAC,MAAM,QAAQ,CAAM,sBCRzE,GAAgB,CACpB,QAAS,CACP,WAAY,CACV,MAAO,UACP,KAAM,SACR,EACA,QAAS,CACP,MAAO,OACP,KAAM,MACR,EACA,UAAW,CACT,MAAO,UACP,KAAM,SACR,EACA,SAAU,CACR,MAAO,qBACP,KAAM,0BACR,EACA,OAAQ,2BACV,EACA,OAAQ,CAEN,WAAY,CACV,MAAO,UACP,KAAM,SACR,EACA,QAAS,CACP,MAAO,OACP,KAAM,MACR,EACA,UAAW,CACT,MAAO,OACP,KAAM,MACR,EACA,SAAU,CACR,MAAO,sBACP,KAAM,MACR,EACA,OAAQ,0BACV,EACA,SAAU,CACR,WAAY,CACV,MAAO,UACP,KAAM,SACR,EACA,QAAS,CACP,MAAO,UACP,KAAM,SACR,EACA,UAAW,CACT,MAAO,UACP,KAAM,SACR,EACA,SAAU,CACR,MAAO,qBACP,KAAM,0BACR,EACA,OAAQ,2BACV,CACF,EACM,GAAkB,CACtB,SAAU,GAAc,QACxB,aAAc,GAAc,OAC5B,eAAgB,GAAc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