const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BW5c4MxO.js","assets/react-WWJ_A68P.js","assets/call-bind-oCmkau44.js","assets/get-intrinsic-BKEvijrG.js","assets/es-errors-DzOT6E3C.js","assets/has-symbols-eVqrYdw7.js","assets/has-proto-JnoBQRdH.js","assets/function-bind-BbkWVFrm.js","assets/hasown-DYqjtFKE.js","assets/set-function-length-B5OANX0j.js","assets/define-data-property-DO9o5wXF.js","assets/es-define-property-tzmkNPou.js","assets/gopd-CEkvUycD.js","assets/has-property-descriptors-DphFXkuo.js","assets/react-device-detect-BAEcyX2V.js","assets/ua-parser-js-BBZA8f28.js","assets/react-router-dom-MWrvRGzi.js","assets/react-dom-CvjNlBjt.js","assets/scheduler-CzFDRTuY.js","assets/react-router-UVekkiTI.js","assets/@remix-run-DhIrJP8L.js","assets/styled-components-BHeWolSk.js","assets/@emotion-DwO3GsBP.js","assets/hoist-non-react-statics-Buxaj0Kl.js","assets/react-is-8JwjhRSi.js","assets/stylis-YPZU7XtI.js","assets/framer-motion-DbOul5S8.js","assets/@tanstack-BR86rpua.js","assets/dayjs-CZ9ViMNG.js","assets/usehooks-ts-CCkIaz9n.js","assets/lodash.debounce-CDHjgjOA.js","assets/react-helmet-async-jeYtsOp6.js","assets/react-fast-compare-Dxyd5FYM.js","assets/invariant-Bm-uj-iG.js","assets/shallowequal-F1vAqOm6.js","assets/react-redux-DlpFpBQ0.js","assets/use-sync-external-store-KK8Bpy9o.js","assets/redux-persist-Cbb21slr.js","assets/redux-DITMfSWq.js","assets/@fxts-cXD7MMns.js","assets/axios-Da_2YOEl.js","assets/crypto-js-C0tVhymU.js","assets/universal-cookie-Cmu-M0pA.js","assets/react-error-boundary-DEyRbsfJ.js","assets/dompurify-CqxHTgmJ.js","assets/qs-LNWgR29u.js","assets/side-channel-CpYS7sho.js","assets/object-inspect-CL2AiSqO.js","assets/@reduxjs-DYPsSoVN.js","assets/immer-DqxjFn0G.js","assets/redux-thunk-ClJT1hhx.js","assets/redux-logger-B8JP_rc7.js","assets/qrcode.react-CJWQPexu.js","assets/swiper-DLv7ejQn.js","assets/swiper-Be9b3THL.css","assets/@hookform-Dc6jS12O.js","assets/react-hook-form-BJXGuiwr.js","assets/@marsidev-F19kFZ1X.js","assets/currency.js-9OAR_aOO.js","assets/react-select-CI241hL_.js","assets/@babel-CabbEptY.js","assets/@floating-ui-NvD4EidW.js","assets/use-isomorphic-layout-effect-MPmsYcaj.js","assets/memoize-one-BdPwpGay.js","assets/styled-reset-B7ZXsPC1.js","assets/pretendard-D6ja04b6.css","assets/index-jTWQh7in.js","assets/plus-black-DWz4trt7.js","assets/index-CUMvbq0n.js","assets/useCouponMutation-DgCb9UUU.js","assets/download-completed-XfSWzt5z.js","assets/index-BW_0bEIg.js","assets/WithAuth-DUnJxka2.js","assets/useMyOrderList-pLdjpk7a.js","assets/ordersKeys-CtX7SqDP.js","assets/index-JrfKUEK6.js","assets/react-hot-toast-SJywmiH6.js","assets/goober-vt3s6TGe.js","assets/index-CkmP4_F0.js","assets/useInput-DBpVLyZx.js","assets/index-DJedF4Ob.js","assets/index-C3okCSon.js","assets/index-BuyCYZGb.js","assets/useProductListByProductNos-6ZMJ6G1S.js","assets/line-style-dot-gray-BRuOHXOD.js","assets/warning-round-small-gray-DostLkGx.js","assets/useDeactivateCheck-fmWRJMS6.js","assets/index-HfuzNgWN.js","assets/index-DeVW8E8B.js","assets/index-30yfYkS_.js","assets/index-WugqFcpx.js","assets/index.styled-BiZJOaym.js","assets/guest-BRvqbSxd.js","assets/member-6LKsSYec.js","assets/claimsKeys-DH8ECKCQ.js","assets/index-CzoqFbxj.js","assets/index-1fn0AwBl.js","assets/useOrderDetail-B-th5KNL.js","assets/index.styled-BPl45La1.js","assets/index-BF8EGsvx.js","assets/regex-DiqzAF1R.js","assets/index-BwBlC8qr.js","assets/index-BbUprFsh.js","assets/useBannerList-Ciq0NDos.js","assets/useShippingAddressList-CUvIv2V1.js","assets/shippingAddress-8w_VKQqj.js","assets/addressKeys-HcUS3wht.js","assets/index-DCvtKbg8.js","assets/index-DeJ3so7K.js","assets/upload-image-DLJ731jb.js","assets/index-CyYb5aC9.js","assets/index-C6rKKWUT.js","assets/useClaimDetail-DPeSCzi0.js","assets/index-Bwh26cXp.js","assets/index-D10ALWEM.js","assets/claim-Bm7PHfCw.js","assets/index-PmOLFCB7.js","assets/index-DDjZRg-j.js","assets/index-Btm1Mv7p.js","assets/index-C4ctQUfE.js","assets/index-DMukTYYC.js","assets/index-CU_EZaAh.js","assets/index-BMFAc53V.js","assets/useShippingAddressMutation-BCz36M6d.js","assets/index-CFSP5RU_.js","assets/index-D9LWQtNt.js","assets/index-COeHdR_5.js","assets/index-B_Ac1bLd.js","assets/index-Dl3jwI15.js","assets/index-0FnX4OFA.js","assets/index-CzuslYxr.js","assets/index-qCGcWfFt.js","assets/index--dzI07kn.js","assets/index-AiRDreaX.js","assets/index-BW13wCrK.js","assets/useInfiniteBoardArticleList-Cu00P1Zm.js","assets/index-h0MLnDAA.js","assets/index-UHX-TF01.js","assets/index-Bzfp0G6u.js","assets/index-DP0ZhePt.js","assets/index-Clo4MTrd.js"])))=>i.map(i=>d[i]); var cs=Object.defineProperty;var ls=(e,n,o)=>n in e?cs(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o;var Gn=(e,n,o)=>ls(e,typeof n!="symbol"?n+"":n,o);import{j as t,r as s,a as ds}from"./react-WWJ_A68P.js";import{a as wr,c as us}from"./react-dom-CvjNlBjt.js";import{u as se,a as Ht,b as fo,k as Oe,c as Ut,_ as B,d as Ae,e as ps,Q as ms,f as hs,g as xs}from"./@tanstack-BR86rpua.js";import{H as gs,a as fs}from"./react-helmet-async-jeYtsOp6.js";import{u as ys,a as Es,s as Cs,P as ws}from"./react-redux-DlpFpBQ0.js";import{L as W,u as Tt,S as bs,c as Ss,R as Ts}from"./react-router-dom-MWrvRGzi.js";import{p as vs,d as As,a as Ps,P as js}from"./redux-persist-Cbb21slr.js";import{l as re,d as r,m as vt,f as Is,o as Ls}from"./styled-components-BHeWolSk.js";import{u as yo,a as br,b as Ns,c as ks,d as Rs,e as $s,f as Qo,g as Os,h as _s}from"./usehooks-ts-CCkIaz9n.js";import{i as X,p as U,t as ae,a as cn,b as Ke,c as ln,f as so,k as Ms,d as Bs,e as Qe,m as Xe,s as Pn,g as rt,h as Ds,j as un,l as Hs,n as Sr,o as ao,q as Zo,r as Us,u as zn,v as Fs,w as Gs,x as zs,y as Vs,z as xn,A as Ys,B as qs,C as Ws,D as Ks}from"./@fxts-cXD7MMns.js";import{m as Je,A as Eo}from"./framer-motion-DbOul5S8.js";import{a as st,i as Ue,A as Ft}from"./axios-Da_2YOEl.js";import{d as Y}from"./dayjs-CZ9ViMNG.js";import{c as Ie}from"./crypto-js-C0tVhymU.js";import{C as et}from"./universal-cookie-Cmu-M0pA.js";import{a as Ce,u as Ge,h as Qs,i as Gt,j as Zs}from"./react-router-UVekkiTI.js";import{E as Tr}from"./react-error-boundary-DEyRbsfJ.js";import{p as Xs}from"./dompurify-CqxHTgmJ.js";import{d as Js,i as vr,a as ea}from"./react-device-detect-BAEcyX2V.js";import{f as ie}from"./@remix-run-DhIrJP8L.js";import{q as Fe}from"./qs-LNWgR29u.js";import{c as Ar,a as ta}from"./@reduxjs-DYPsSoVN.js";import"./redux-logger-B8JP_rc7.js";import{c as na}from"./redux-DITMfSWq.js";import{Q as oa}from"./qrcode.react-CJWQPexu.js";import{S as _e,A as ra,P as kn,a as Le,b as ia,T as Xo}from"./swiper-DLv7ejQn.js";import{s as rn}from"./@hookform-Dc6jS12O.js";import{a as Pr,b as Vn,C as sa}from"./react-hook-form-BJXGuiwr.js";import{E as aa}from"./@marsidev-F19kFZ1X.js";import{c as Bt}from"./currency.js-9OAR_aOO.js";import{S as ca}from"./react-select-CI241hL_.js";import{r as la}from"./styled-reset-B7ZXsPC1.js";/* empty css */import"./call-bind-oCmkau44.js";import"./get-intrinsic-BKEvijrG.js";import"./es-errors-DzOT6E3C.js";import"./has-symbols-eVqrYdw7.js";import"./has-proto-JnoBQRdH.js";import"./function-bind-BbkWVFrm.js";import"./hasown-DYqjtFKE.js";import"./set-function-length-B5OANX0j.js";import"./define-data-property-DO9o5wXF.js";import"./es-define-property-tzmkNPou.js";import"./gopd-CEkvUycD.js";import"./has-property-descriptors-DphFXkuo.js";import"./scheduler-CzFDRTuY.js";import"./react-fast-compare-Dxyd5FYM.js";import"./invariant-Bm-uj-iG.js";import"./shallowequal-F1vAqOm6.js";import"./use-sync-external-store-KK8Bpy9o.js";import"./@emotion-DwO3GsBP.js";import"./hoist-non-react-statics-Buxaj0Kl.js";import"./react-is-8JwjhRSi.js";import"./stylis-YPZU7XtI.js";import"./lodash.debounce-CDHjgjOA.js";import"./ua-parser-js-BBZA8f28.js";import"./side-channel-CpYS7sho.js";import"./object-inspect-CL2AiSqO.js";import"./immer-DqxjFn0G.js";import"./redux-thunk-ClJT1hhx.js";import"./@babel-CabbEptY.js";import"./@floating-ui-NvD4EidW.js";import"./use-isomorphic-layout-effect-MPmsYcaj.js";import"./memoize-one-BdPwpGay.js";(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const l of a)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function o(a){const l={};return a.integrity&&(l.integrity=a.integrity),a.referrerPolicy&&(l.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?l.credentials="include":a.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(a){if(a.ep)return;a.ep=!0;const l=o(a);fetch(a.href,l)}})();const jr=({title:e="해피마켓",description:n,meta:o,og:i,twitter:a,itemprop:l,canonical:d})=>t.jsxs(gs,{children:[t.jsx("title",{children:e}),d&&t.jsx("link",{rel:"canonical",href:d}),(o==null?void 0:o.title)&&t.jsx("meta",{name:"title",content:o.title||e}),(o==null?void 0:o.description)&&t.jsx("meta",{name:"description",content:o.description||n}),(o==null?void 0:o.image)&&t.jsx("meta",{name:"image",content:o.image}),t.jsx("meta",{property:"og:type",content:"website"}),(i==null?void 0:i.title)&&t.jsx("meta",{property:"og:title",content:i.title}),(i==null?void 0:i.description)&&t.jsx("meta",{property:"og:description",content:i.description}),(i==null?void 0:i.image)&&t.jsx("meta",{property:"og:image",content:i.image}),(a==null?void 0:a.card)&&t.jsx("meta",{property:"twitter:card",content:a.card}),(a==null?void 0:a.title)&&t.jsx("meta",{property:"twitter:title",content:a.title}),(a==null?void 0:a.description)&&t.jsx("meta",{property:"twitter:description",content:a.description}),(a==null?void 0:a.image)&&t.jsx("meta",{property:"twitter:image",content:a.image}),(l==null?void 0:l.name)&&t.jsx("meta",{itemProp:"name",content:l.name||""}),(l==null?void 0:l.description)&&t.jsx("meta",{itemProp:"description",content:l.description||""}),(l==null?void 0:l.image)&&t.jsx("meta",{itemProp:"image",content:l.image||""})]}),z=()=>re` display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: nowrap; `,Co=e=>re` width: 100%; overflow: hidden; position: relative; display: -webkit-box; -webkit-line-clamp: ${e}; -webkit-box-orient: vertical; word-wrap: break-word; word-break: break-all; `,T={regular:()=>re` font-weight: 400; `,medium:()=>re` font-weight: 500; `,semiBold:()=>re` font-weight: 600; `,bold:()=>re` font-weight: 700; `,extraBold:()=>re` font-weight: 800; `,heavy:()=>re` font-weight: 900; `},da=re` position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: polygon(0 0, 0 0, 0 0); `,wo=()=>re` -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ &::-webkit-scrollbar { display: none; /* Chrome, Safari, Opera*/ } `,bo=re` img, video, iframe { max-width: 100% !important; } `,ua=e=>re` background-image: url('${e}'); background-size: cover; `;re` position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); `;const pa=r.div` display: flex; flex-direction: column; `,ma=r.div` ${z}; min-height: 100px; flex: 1; padding: 20px; flex-direction: column; > p { text-align: center; font-size: 1.6rem; line-height: 20.8px; color: var(--color-textSecondary); } `,ha=r.div` display: flex; align-items: center; justify-content: center; height: 52px; width: 100%; border-top: 1px solid #f2f3f5; `,Ir=r.button` flex: 1; height: 100%; > span { ${T.medium}; font-size: 1.6rem; color: ${({$isConfirm:e})=>e?"var(--color-sub)":"var(--color-textGray)"}; } `,xa=r(Ir)` border-left: 1px solid #f2f3f5; `,gn={Container:pa,MessageContainer:ma,ButtonContainer:ha,Button:Ir,CancelButton:xa},ga=({message:e,onClickOk:n,onClickCancel:o,buttonList:i})=>t.jsxs(gn.Container,{children:[t.jsx(gn.MessageContainer,{children:typeof e=="string"?t.jsx("p",{dangerouslySetInnerHTML:{__html:e}}):e}),t.jsx(gn.ButtonContainer,{children:i==null?void 0:i.map(({type:a,label:l,style:d})=>{const u=a==="ok";return t.jsx(gn.Button,{onClick:u?n:o,autoFocus:u,$isConfirm:u,children:t.jsx("span",{style:d,children:l})},a)})})]}),fa=r(Je.div)` position: fixed; left: 0; top: 0; background: rgba(0, 0, 0, 0.3); width: 100vw; height: 100vh; z-index: 1009; opacity: 0.7; `,ya=r(Je.div)` position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; width: 278px; z-index: 1010; border-radius: 16px; `,Jo={Dimmed:fa,MotionContainer:ya},Lr=s.createContext({dialog:()=>new Promise((e,n)=>n())}),So=({isLock:e})=>{s.useEffect(()=>{if(!e)return;const n=i=>{i.target.closest("#root")&&i.preventDefault()},o=i=>{i.target.closest("#root")&&i.preventDefault()};return document.body.style.overflow="hidden",document.addEventListener("touchmove",n,{passive:!1}),document.addEventListener("wheel",o,{passive:!1}),()=>{document.body.style.overflow="",document.removeEventListener("touchmove",n),document.removeEventListener("wheel",o)}},[e])},Ea=({children:e})=>{const[n,o]=s.useState();So({isLock:!!n}),s.useEffect(()=>{const a=d=>{d.key==="Escape"&&n&&o(void 0)},l=()=>{n&&o(void 0)};return window.addEventListener("keydown",a),window.addEventListener("popstate",l),()=>{window.removeEventListener("keydown",a),window.removeEventListener("popstate",l)}},[n]);const i=(a,l)=>new Promise(d=>{o({message:a??"",onClickOk:()=>{o(void 0),d(!0)},onClickCancel:()=>{o(void 0),d(!1)},buttonList:X(l)?[{type:"ok",label:"확인"}]:U(l,cn(2),ae)})});return t.jsxs(Lr.Provider,{value:{dialog:i},children:[e,n&&t.jsxs(t.Fragment,{children:[t.jsx(Jo.Dimmed,{initial:{opacity:0},animate:{opacity:[0,1]},transition:{type:"keyframes",ease:"easeInOut",duration:.3}},"dialogDimmed"),t.jsx(Jo.MotionContainer,{initial:{opacity:0,top:"51%"},animate:{opacity:[0,1],top:"50%"},transition:{type:"keyframes",ease:"easeInOut",duration:.3},children:t.jsx(ga,{message:n.message,onClickOk:n.onClickOk,onClickCancel:n.onClickCancel,buttonList:n.buttonList})},"dialogContianer")]})]})},Ca=r.div` ${z}; flex-direction: column; `,wa=r.div` ${z}; flex-direction: column; padding: 14px 20px 36px 20px; gap: 24px; h4 { font-size: 1.8rem; ${T.bold}; color: #1e1e22; } `,ba=r.div` display: flex; flex-direction: column; gap: 24px; font-size: 1.6rem; ${T.regular}; color: #59595f; b { color: #ff2626; } `,Sa=r.div` width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; button { border-radius: 8px; padding: 15.5px 0; border: 1px solid #0d0f71; } button:first-child { background-color: #fff; span { font-size: 1.6rem; ${T.medium}; color: #0d0f71; } } button:last-child { background-color: #0d0f71; span { font-size: 1.6rem; ${T.medium}; color: #fff; } } `,fn={Container:Ca,ContentsContainer:wa,Contents:ba,ButtonContainer:Sa},gt={XXS:375,XS:430,SM:768,MD:1024},Ta=r(Je.div)` position: fixed; z-index: 1004; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.3); `,va=r(Je.section)` position: fixed; left: 50%; bottom: 0; display: flex; flex-direction: column; justify-content: flex-end; width: 100%; /* max-width: ${gt.SM}px; */ max-width: 600px; z-index: 1005; background-color: white; border-top-right-radius: 16px; border-top-left-radius: 16px; ${wo}; `,Aa=r.div` color: #1e1e22; padding: 13px 0; position: relative; ${z}; h4 { font-size: 1.8rem; ${T.medium}; } button { position: absolute; top: 17px; right: 21px; } `,Yn={Dimmed:Ta,Container:va,Header:Aa},Pa=e=>s.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L15 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15 1L1 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Nr=({id:e,isVisible:n,setIsVisible:o,title:i,children:a,headerCloseIcon:l=t.jsx(Pa,{}),headerStyle:d,...u})=>{const c=()=>{o(!1)};return So({isLock:n}),wr.createPortal(t.jsx(Eo,{children:n&&t.jsxs(t.Fragment,{children:[t.jsx(Yn.Dimmed,{initial:{opacity:0},animate:{opacity:[0,1]},exit:{opacity:[1,0]},transition:{type:"keyframes",duration:.3,ease:"easeInOut"},onClick:m=>{m.stopPropagation(),o(!1)}}),t.jsxs(Yn.Container,{initial:{y:"100%",x:"-50%"},animate:{y:0,x:"-50%"},exit:{y:"100%",x:"-50%"},transition:{type:"keyframes",duration:.3,ease:"easeInOut"},...u,children:[t.jsxs(Yn.Header,{style:d,children:[i&&t.jsx("h4",{children:i}),t.jsx("button",{onClick:c,children:l})]}),a]},e)]})}),document.querySelector("#bottomSheet"))},p={MAIN:"/",AUTH:{LOGIN:"/login",TERMS:"/terms",TERM_DETAIL:"/terms/:termsTypes"},PRODUCT:{LIST:"/products",DETAIL:"/products/:productNo",BRAND:{MAIN:"/products/brand",LIST:"/products/brand/:brandNo"},PARTNER:{MAIN:"/products/partners",LIST:"/products/partners/:partnerNo"},REVIEW:"/products/:productNo/:reviewNo"},CART:"/cart",ORDER:{MAIN:"/order",ORDER_SHEET:"/order/:orderSheetNo",ORDER_COMPLETE:"/order/complete",GIFT:{MAIN:"/order/gift",DETAIL:"/order/gift/:orderSheetNo",ADDRESS:"/order/gift/shipping-info/:encryptedShippingNo"}},GUEST:{MAIN:"/guest",LOGIN:"/guest/login",ORDER:"/guest/order",ORDER_DETAIL:"/guest/order/:orderNo",CLAIMS:{LIST:"/guest/claim",REQUESTS:{REQUEST:"/guest/claim/request",CHANGE_ADDRESS:"/guest/claim/request/change-address/:orderNo"},INFO:"/guest/claim/info/:claimNo"}},MY_PAGE:{MAIN:"/mypage",ORDERS:{LIST:"/mypage/orders",ORDER_DETAIL:"/mypage/orders/:orderNo"},CLAIMS:{LIST:"/mypage/claims",DETAIL:"/mypage/claims/:claimNo",REQUESTS:{REQUEST:"/mypage/claims/request",CHANGE_ADDRESS:"/mypage/claims/request/change-address/:orderNo"},INFO:"/mypage/claims/info/:claimNo"},COUPONS:"/mypage/coupons",ACCUMULATION:"/mypage/accumulation",REVIEWS:{LIST:"/mypage/reviews",REVIEWS_WRITE:"/mypage/reviews/write/:productNo",REVIEWS_MODIFY:"/mypage/reviews/modify/:reviewNo"},WISH:"/mypage/wish",EDIT:"/mypage/edit",ADDRESSES:{LIST:"/mypage/addresses",REGISTER:"/mypage/addresses/register",MODIFY:"/mypage/addresses/:addressNo"},PRODUCT_INQUIRIES:"/mypage/product-inquiries",INQUIRIES:{LIST:"/mypage/inquiries",WRITE:"/mypage/inquiries/write",EDIT:{LIST:"/mypage/inquiries/edit",DETAIL:"/mypage/inquiries/edit/:inquiryNo"}},CHECK_ACCOUNT:"/mypage/check-account",WITHDRAWAL:"/mypage/withdrawal"},CALLBACK:{AUTH:"/callback/auth-callback",KCP_AUTH:"/callback/kcp-auth-callback",NICE_AUTH_SUCCESS:"/callback/nice-auth-callback/success",NICE_AUTH_ERROR:"/callback/nice-auth-callback/error"},SEARCH:"/search",HAPPY_DEAL:"/happy-deal",SPECIAL_DEAL:"/special-deal",BEST:"/best",CATEGORIES:{LIST:"/categories",DETAIL:"/categories/:categoryNo"},BOARDS:{NOTICE:{LIST:"/boards/notice",DETAIL:"/boards/notice/:articleNo"},FAQ:"/boards/faq"},EXHIBITIONS:{LIST:"/exhibitions",DETAIL:"/exhibitions/:eventNo"},EVENT:{LIST:"/events",DETAIL:"/events/:eventNo"}},kr={general:"89815",employee:"89816"},Rr="A811BD270E28D3EDADF4220B29B0447E",$r="8363D06723398C9A",ja=e=>Ie.AES.encrypt(e,Ie.enc.Utf8.parse(Rr),{iv:Ie.enc.Utf8.parse($r),padding:Ie.pad.Pkcs7,mode:Ie.mode.CBC,format:Ie.format.Hex}).toString(),To=e=>Ie.AES.decrypt(e,Ie.enc.Utf8.parse(Rr),{iv:Ie.enc.Utf8.parse($r),padding:Ie.pad.Pkcs7,mode:Ie.mode.CBC,format:Ie.format.Hex}).toString(Ie.enc.Utf8);class Ia{constructor(n){Gn(this,"storage");Gn(this,"prefix");this.prefix=n,this.storage=typeof window<"u"?window.localStorage:null}getOriginKey(n){return`${this.prefix}_${n}`}get(n){var o;return typeof window<"u"&&((o=this.storage)==null?void 0:o.getItem(this.getOriginKey(n)))||""}set(n,o){var i;typeof window<"u"&&((i=this.storage)==null||i.setItem(this.getOriginKey(n),o))}clearItem(n){var o;typeof window<"u"&&((o=this.storage)==null||o.removeItem(n))}clearItems(n){n.forEach(o=>this.clearItem(this.getOriginKey(o)))}}class La extends Ia{getAccessToken(){const n=this.get("ACCESS_TOKEN");return n?JSON.parse(n):null}setAccessToken(n){this.set("ACCESS_TOKEN",JSON.stringify(n))}getGuestToken(){const n=this.get("GUEST_TOKEN");return n?JSON.parse(n):""}setGuestToken(n){this.set("GUEST_TOKEN",n)}getRefreshToken(){const n=this.get("REFRESH_TOKEN");return n?JSON.parse(n):""}setRereshToken(n){this.set("REFRESH_TOKEN",n)}getHmUuid(){this.get("HM_UUID")}setHmUuid(n){this.set("HM_UUID",n)}clearHmUuid(){this.clearItems(["HM_UUID"])}clear(){this.clearItems(["ACCESS_TOKEN"])}clearAccessToken(){this.clearItems(["ACCESS_TOKEN"])}}const ee=new La("SHOPBY"),Or=()=>{const e=ee.getAccessToken();return!!(e!=null&&e.accessToken)&&(e==null?void 0:e.expiry)-new Date().getTime()>0},Na=new et,er=(typeof navigator<"u"?navigator.userAgent:"").toLowerCase(),ka=er.includes("happypointcardapp")||er.includes("happypointcardapiversion"),Ra=!!Na.get("hm_aut"),K=ka||Ra,qn="happyMarket_jwt",Wn="happyMarket_jwt_exp",$a=30*60*1e3,_r={save(e){localStorage.setItem(qn,e),localStorage.setItem(Wn,String(Date.now()+$a))},load(){const e=localStorage.getItem(qn),n=Number(localStorage.getItem(Wn));return!e||!n||Date.now()>n?(this.clear(),null):e},clear(){localStorage.removeItem(qn),localStorage.removeItem(Wn)}},Oa=5,$e=st.create({baseURL:"https://market-api.happypointcard.com/market/api/v1",withCredentials:!0,timeout:1e4}),Mr=new et,ft=(()=>{let e=null;const n=async()=>{const o=await st.get("https://market-api.happypointcard.com/market/api/v1/common/token",{withCredentials:!0}),i=o.data.data.jwt,a=o.data.data.extraData,l=To(a);return _r.save(i),Mr.set("hm_uuid",l,{domain:".happypointcard.com",maxAge:60*30,path:"/",secure:!0,sameSite:"none"}),ee.setHmUuid(l),o};return async function(){if(e)return await e;e=n();try{return await e}finally{e=null}}})(),_a=e=>{if(!e)return"";const n=decodeURIComponent(e),o=n.toLowerCase();return o==="undefined"||o==="null"?"":n},Ma=async e=>{var d;const n=Mr.get("hm_aut"),o=_a(n),i=e.jwt,a={userAgent:window.navigator.userAgent,isAgree:!0,hmAut:o||"undefined"},l=await st.post("https://market-api.happypointcard.com/market/api/v1/member/app/login",a,{headers:{Authorization:i},withCredentials:!0});return ee.setAccessToken({accessToken:To(l.data.data.accessToken),expiry:new Date().getTime()+l.data.data.expireIn*1e3,hmAut:o||((d=ee.getAccessToken())==null?void 0:d.hmAut),memberGrade:l.data.data.memberGrade||"",isEmployee:l.data.data.memberGrade===kr.employee}),l};let Jt=null;const Ba=2e3;let yn=0;const tr=[2e3,4e3,8e3],nr=e=>new Promise(n=>setTimeout(n,e)),co=async e=>Jt||(Jt=(async()=>{try{if(yn>=3){const o=Math.min(yn-3,tr.length-1),i=tr[o];await nr(i)}const n=await Ma(e);return yn=0,await nr(Ba),n}catch(n){throw yn+=1,n}finally{Jt=null}})(),Jt),J={lock:"hm:appLogin:lock",lastSuccessAt:"hm:appLogin:lastSuccessAt",failCount:"hm:appLogin:failCount",breakerUntil:"hm:appLogin:breakerUntil",bucket:"hm:appLogin:bucket",tabId:"hm:appLogin:tabId"},oe={get(e){try{return localStorage.getItem(e)}catch{return null}},set(e,n){try{localStorage.setItem(e,n)}catch{}},remove(e){try{localStorage.removeItem(e)}catch{}}},Ze=()=>Date.now(),In=e=>new Promise(n=>setTimeout(n,e)),lo=(e,n=200)=>{const o=Math.floor(Math.random()*n)-Math.floor(n/2);return Math.max(0,e+o)};function Br(){var n;let e=null;try{e=sessionStorage.getItem(J.tabId),e||(e=((n=crypto==null?void 0:crypto.randomUUID)==null?void 0:n.call(crypto))||String(Math.random()),sessionStorage.setItem(J.tabId,e))}catch{e=String(Math.random())}return e}function uo(){const e=oe.get(J.lock);if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Da(e){oe.set(J.lock,JSON.stringify(e))}function Ha(){oe.remove(J.lock)}async function Dr(e,n=50,o=5e3){const i=Br(),a=Ze()+o;for(;Ze()=n&&(o.tokens=e,o.refilledAt=i,Ur(o))}function Fa(e,n){Ua(e,n);const o=Hr();return o.tokens<=0?!1:(o.tokens-=1,Ur(o),!0)}function Fr(e){const n=Number(oe.get(J.lastSuccessAt)||"0");return Ze()-n{if(K){await Ga();return}await za()},Ga=async()=>{if(Fr(Be.minIntervalMs))return;const e=Number(oe.get(J.lastSuccessAt)||"0");if(!await Dr(Be.lockTtlMs)){if(await In(lo(Be.minIntervalMs)),Number(oe.get(J.lastSuccessAt)||"0")>e)return;const i=await ft();await co(i.data.data),oe.set(J.lastSuccessAt,String(Ze()));return}try{const o=await ft();await co(o.data.data),oe.set(J.lastSuccessAt,String(Ze()))}finally{po()}},za=async()=>{const e=Number(oe.get(J.breakerUntil)||"0");if(Ze()0&&(oe.remove(J.breakerUntil),oe.set(J.failCount,"0")),Fr(Be.minIntervalMs))return;const n=Number(oe.get(J.lastSuccessAt)||"0");if(!await Dr(Be.lockTtlMs)){if(await In(lo(Be.minIntervalMs)),Number(oe.get(J.lastSuccessAt)||"0")<=n)throw new Error("appLogin failed in concurrent tab");return}if(!Fa(Be.bucketMax,Be.bucketRefillMs))throw po(),new Error("Rate limit exceeded: please retry later");try{const i=Number(oe.get(J.failCount)||"0");i>0&&await In(lo(Be.baseBackoffMs*Math.min(3,i)));const a=await ft();await co(a.data.data),oe.set(J.failCount,"0"),oe.set(J.lastSuccessAt,String(Ze()))}catch(i){const a=1+Number(oe.get(J.failCount)||"0");throw oe.set(J.failCount,String(a)),a>=Be.circuitFailThreshold&&oe.set(J.breakerUntil,String(Ze()+Be.circuitSleepMs)),i}finally{po()}};$e.interceptors.request.use(async e=>{try{let n=_r.load();return n||(n=(await ft()).data.data.jwt),e.headers.Authorization=n,e}catch(n){throw console.error("🔑 인터셉터 토큰 가져오기 실패:",{url:e.url,error:n}),n}});$e.interceptors.response.use(void 0,async e=>{var n;if(Ue(e)){if(((n=e.response)==null?void 0:n.status)===401&&e.response.data.errorCode==="8202"){const o=e.config,i=((o==null?void 0:o.url)||"").toLowerCase(),a=i.includes("/member/app/login"),l=i.includes("/member/common/deactivate");if(a||l)return Promise.reject(e);const u=(await ft()).data.data.jwt;if(K){try{await Rn()}catch(E){console.error("인터셉터에서 앱 로그인 실패:",E)}const m=e.config,x=1;if(m.retryCount=m.retryCount??0,m.retryCount{try{const o=(await ft()).data.data.jwt;return e.headers.Authorization=o,e}catch(n){throw console.error("🔑 V2 인터셉터 토큰 가져오기 실패:",{url:e.url,error:n}),n}});Dt.interceptors.response.use(void 0,async e=>{var n;if(!Ue(e))return Promise.reject(e);if(((n=e.response)==null?void 0:n.status)===401&&e.response.data.errorCode==="8202")try{if(K){await Rn();const d=(await ft()).data.data.jwt,u=e.config,c=1;return u.retryCount=u.retryCount??0,u.retryCountDt({method:"POST",url:"/member/common/uas/ready",data:{...e,userAgent:e.userAgent||""},headers:{Authorization:n}}),sendNiceSuccess:(e,n)=>Dt({method:"POST",url:"/member/common/uas/confirm",data:{...e,userAgent:e.userAgent||"",isCheckAdult:e.isCheckAdult??!0},headers:{Authorization:n}}),sendNiceFail:(e,n)=>Dt({method:"POST",url:"/member/common/uas/fail",data:{...e,userAgent:e.userAgent||""},headers:{Authorization:n}})},jn={all:["banners"],lists:()=>[...jn.all,"list"],list:(e,n)=>[...jn.lists(),e,n],extraInfos:e=>[...jn.all,"extraInfos",e]},Me={all:["boards"],config:()=>[...Me.all,"config"],categories:()=>[...Me.all,"category"],category:e=>[...Me.categories(),e],lists:()=>[...Me.all,"list"],list:(e,n,o)=>[...Me.lists(),e,n,o],infiniteList:(e,n,o)=>[...Me.lists(),e,n,o,"infinite"],details:()=>[...Me.all,"detail"],detail:(e,n,o,i)=>[...Me.details(),e,n,o,i],replies:()=>[...Me.all,"replies"],reply:(e,n,o)=>[...Me.replies(),e,n,o]},St={all:["cart"],lists:()=>[...St.all,"list"],list:(e,n)=>[...St.lists(),e,n],count:e=>[...St.all,"count",e],price:(e,n)=>[...St.all,"price",e,n]},qe={all:["coupons"],lists:()=>[...qe.all,"list"],list:(e,n)=>[...qe.lists(),n,e],infiniteList:(e,n)=>[...qe.lists(),n,e,"infinite"],issuableList:e=>[...qe.lists(),"issuable",e],listByProductNo:(e,n,o)=>[...qe.lists(),e,n,o],summary:(e,n)=>[...qe.all,"summary",e,n],happyCouponList:()=>[...qe.all,"happyCouponList"],happyCouponInfiniteList:e=>[...qe.happyCouponList(),e,"infinite"]},De={all:["events"],lists:()=>[...De.all,"list"],list:e=>[...De.lists(),e],infiniteList:e=>[...De.lists(),e,"infinite"],details:()=>[...De.all,"detail"],detail:(e,n)=>[...De.details(),e,n],detailById:(e,n)=>[...De.details(),e,n],detailByProduct:e=>[...De.details(),e]},mo={all:["popups"],lists:()=>[...mo.all,"list"],list:(e,n)=>[...mo.lists(),e,n]},he={all:["inquiries"],config:()=>[...he.all,"config"],lists:()=>[...he.all,"list"],list:(e,n)=>[...he.lists(),e,n],infiniteList:(e,n)=>[...he.lists(),e,n,"infinite"],myLists:()=>[...he.all,"myList"],myList:(e,n)=>[...he.myLists(),e,n],myInfiniteList:(e,n)=>[...he.myLists(),e,n,"infinite"],details:()=>[...he.all,"detail"],detail:(e,n)=>[...he.details(),e,n]},fe={all:["products"],lists:()=>[...fe.all,"list"],list:(e,n)=>[...fe.lists(),e,n],infiniteList:(e,n)=>[...fe.lists(),"infinite",e,n],likes:()=>[...fe.all,"likes"],like:(e,n)=>[...fe.likes(),e,n],infiniteLikedList:(e,n)=>[...fe.likes(),"infinite",e,n],likeCount:e=>[...fe.likes(),"count",e],details:()=>[...fe.all,"detail"],detail:(e,n,o)=>[...fe.details(),e,n,o],options:()=>[...fe.all,"option"],option:(e,n,o)=>[...fe.options(),e,n,o],groupManagementCode:e=>[...fe.all,"groupManagementCode",e]},He={all:["profile"],getProfile:e=>[...He.all,{headers:e}],getEmployee:e=>[...He.all,"happyMarket","employee",e],getHappyPoint:(e,n)=>[...He.all,"point",e,n],getEmployeeDiscount:e=>[...He.all,"happyMarket","employee","available",e],getNice:e=>[...He.all,"happyMarket","nice",e],getNiceSuccess:e=>["nice-success",e]},ge={all:["reviews"],configs:()=>[...ge.all,"config"],lists:()=>[...ge.all,"list"],list:(e,n)=>[...ge.lists(),e,n],infiniteList:(e,n)=>[...ge.lists(),"infinite",e,n],photoList:e=>[...ge.lists(),"photo",e],details:()=>[...ge.all,"detail"],detail:(e,n)=>[...ge.details(),e,n],comments:()=>[...ge.all,"comments"],comment:e=>[...ge.comments(),e],myReviewedLists:()=>[...ge.all,"myReviewedList"],myReviewedList:(e,n)=>[...ge.lists(),e,n],myReviewedInfiniteList:(e,n)=>[...ge.lists(),"infinite",e,n],myReviewableLists:()=>[...ge.all,"myReviewableList"],myReviewableList:(e,n)=>[...ge.lists(),e,n],myReviewableInfiniteList:(e,n)=>[...ge.lists(),"infinite",e,n]},qa=({data:e,options:n})=>{const o=ee.getAccessToken(),i=new et,a=i.get("hm_aut"),l=i.get("wHmAut"),d=K?decodeURIComponent(a)||"undefined":l||"",u=K?window.navigator.userAgent:"";return se({queryKey:He.getNice(e),queryFn:async()=>{const c={hmAut:d,userAgent:u,returnUrl:e.returnUrl||"",errorUrl:e.errorUrl||"",customParam:e.customParam||{}},{data:m}=await Ya.callNicePayment({...c,returnUrl:e.returnUrl||"",errorUrl:e.errorUrl||"",customParam:e.customParam||{}},o==null?void 0:o.accessToken);return m},...n})},Et=()=>{const{dialog:e}=s.useContext(Lr);return{openDialog:(o,i)=>e(o,i)}},Gr={signIn:e=>$e({method:"POST",url:"/member/web/login",data:e}),signInWithCloudFlare:e=>Dt({method:"POST",url:"/member/web/login",data:e}),checkCloudFlare:e=>$e({method:"POST",url:"/member/web/check/token",data:e}),signOut:e=>$e({method:"POST",url:"/member/web/logout",data:e}),deleteMember:e=>$e({method:"POST",url:"/member/web/withdrawal",data:e}),updateMember:e=>$e({method:"POST",url:"/member/web/modify",data:e}),deactivateMember:e=>$e({method:"POST",url:"/member/common/deactivate",data:e}),getMemberPageUrls:()=>$e({method:"GET",url:"/member/web/getUrls"}),checkLogin:e=>$e({method:"POST",url:"/member/web/check/login",data:e})},sn={FIND_ID:"https://www.happypointcard.com/page/member-info/find-id-pw-form.spc?findType=id",FIND_PASSWORD:"https://www.happypointcard.com/page/member-info/find-id-pw-form.spc?findType=pw",JOIN:"https://www.happypointcard.com/page/join/index.spc",CHANGE_PASSWORD:"https://www.happypointcard.com/page/member-info/index.spc",CHANGE_MEMBER_INFO:"https://www.happypointcard.com/page/member-info/index.spc",PREVIOUS_PURCHASE_HISTORY:"https://happymarket.happypointcard.com/hm_front/mypage/order/list?shopYn=Y",MEMBER_DELETE:"https://www.happypointcard.com/page/member-info/index.spc",LOGOUT:"https://www.happypointcard.com/page/main.spc/page/main.spc"},zr=(e,n,o)=>{const a=new Date(o*1e3).toUTCString();document.cookie=`${e}=${n}; expires=${a}; path=/`},Pe=()=>{const{openDialog:e}=Et(),n=ee.getAccessToken(),o=Ht(),i=s.useMemo(()=>!!n&&!!n.accessToken&&n.expiry-new Date().getTime()>0,[n]);return{accessTokenInfo:n,isLogin:i,login:async d=>{var u,c;try{const m=await Gr.signInWithCloudFlare({...d,pwd:ja(d.pwd),isAgree:!0,turnstileToken:d.turnstileToken});if(((u=m.data.data)==null?void 0:u.errorCode)==="2728"||((c=m.data.data)==null?void 0:c.errorCode)==="8008")throw new Ft(m.data.data.errorMessage,m.data.data.errorCode);const x=d.id;return ee.setAccessToken({accessToken:To(m.data.data.accessToken),expiry:new Date().getTime()+m.data.data.expireIn*1e3,memberGrade:m.data.data.memberGrade||"",isEmployee:m.data.data.memberGrade===kr.employee,memberId:x}),zr("wHmAut",m.data.data.wHmAut,m.data.data.expireIn),o.invalidateQueries(),m}catch(m){throw Ue(m)?m.code==="2728"?(await e(`${m.message}`,[{type:"cancel",label:"비밀번호 변경"},{type:"ok",label:"아이디 찾기"}])?window.open(sn.FIND_ID):window.open(sn.CHANGE_PASSWORD),m):m.code==="8008"?(await e((m==null?void 0:m.message)||"로그인에 실패했습니다."),m.code):(await e((m==null?void 0:m.message)||"로그인에 실패했습니다."),m):(await e("로그인에 실패했습니다."),m)}},appLogin:async()=>{try{await Rn(),o.invalidateQueries(),o.invalidateQueries({queryKey:He.getProfile(),type:"active"});return}catch(d){throw console.error(d),d}}}},$n=e=>s.createElement("svg",{width:65,height:64,viewBox:"0 0 65 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:32.5,cy:32,r:30,stroke:"#E9EAEF",strokeWidth:4}),s.createElement("path",{d:"M29.5003 42.9937C29.4751 41.3446 30.8518 40 32.5065 40C34.098 40 35.4874 41.3446 35.5 42.9937C35.4874 44.6554 34.098 46 32.5065 46C30.8518 46 29.4751 44.6554 29.5003 42.9937Z",fill:"#E9EAEF"}),s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5016 18C33.827 18 34.9016 19.0332 34.9016 20.3077V35.6923C34.9016 36.9668 33.827 38 32.5016 38C31.1761 38 30.1016 36.9668 30.1016 35.6923V20.3077C30.1016 19.0332 31.1761 18 32.5016 18Z",fill:"#E9EAEF"})),zt=({isVisible:e,setIsVisible:n,productNo:o,redirectUrl:i})=>{const a=Ce(),{openDialog:l}=Et(),{isLogin:d}=Pe(),u=()=>{n==null||n(!1)},c=`${window.location.origin}${p.CALLBACK.NICE_AUTH_SUCCESS}`,m=`${window.location.origin}${p.CALLBACK.NICE_AUTH_ERROR}`,x=new et,E=x.get("hm_aut"),S=x.get("wHmAut"),f=K?decodeURIComponent(E)||"undefined":S||"",C=K?window.navigator.userAgent:"",A=window.location.pathname+window.location.search,v=i!==void 0&&i!=="",w=v?`${window.location.origin}${i}`:A,{refetch:g,isFetching:b}=qa({data:{hmAut:f,userAgent:C,returnUrl:c,errorUrl:m,customParam:{returnPath:w}},options:{enabled:d&&e,staleTime:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1}}),P=async()=>{var I,D,$;if(!d){await l("로그인 후 성인인증을 진행해주세요.");const F=v?i:`${p.PRODUCT.LIST}/${o}`;a({pathname:p.AUTH.LOGIN,search:`?returnUrl=${encodeURIComponent(F)}`},{replace:!0});return}const L=window.screen.width/2-500/2,y=`width=500, height=550, top=${window.screen.height/2-800/2}, left=${L}, fullscreen=no, menubar=no, status=no, toolbar=no, titlebar=yes, location=no, scrollbar=no`,N=window.open("","popupChk",y);if(!N){l("팝업이 차단되었습니다. 팝업 차단을 해제해주세요.");return}try{const{data:F}=await g(),pe=(I=F==null?void 0:F.data)==null?void 0:I.errorCode,me=(D=F==null?void 0:F.data)==null?void 0:D.pgUrl;if(pe!=="0000"||!me){N.close(),l((($=F==null?void 0:F.data)==null?void 0:$.errorMessage)||"본인인증 호출에 실패했습니다.");return}const Ne=document.forms.namedItem("form_chk");Ne?(Ne.action=me,Ne.target="popupChk",Ne.submit()):N.location.href=me}catch(F){N.close(),console.error("UAS call error: ",F),l("본인인증 호출 중 오류가 발생했습니다. 잠시 후 다시 시도해주세요.")}};return t.jsxs(t.Fragment,{children:[t.jsx("form",{name:"form_chk",method:"POST",style:{display:"none"}}),t.jsx(Nr,{id:"adultBottomSheet",title:"",isVisible:!!e,setIsVisible:L=>n==null?void 0:n(L),style:{zIndex:1005},children:t.jsxs(fn.Container,{children:[t.jsxs(fn.ContentsContainer,{children:[t.jsx($n,{}),t.jsx("h4",{children:"성인인증이 필요한 서비스입니다."}),t.jsxs(fn.Contents,{children:[t.jsx("p",{dangerouslySetInnerHTML:{__html:"본 상품 및 내용은 청소년에게 유해한 정보를 포함하고 있어 성인인증 절차를 거쳐야 합니다."}}),t.jsx("p",{children:"본 상품 및 내용은 청소년유해매체물로서 정보통신망 이용촉진 및 종보보호 등에 관한 법률 및 청소년 보허법의 규정에 의하여 19세 미만의 청소년이 이용, 구매할 수 없습니다."})]})]}),t.jsxs(fn.ButtonContainer,{children:[t.jsx("button",{type:"button",onClick:u,children:t.jsx("span",{children:"19세 미만 나가기"})}),t.jsx("button",{type:"button",onClick:P,disabled:b,children:t.jsx("span",{children:"회원 성인인증"})})]})]})})]})},Vr=vt` 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } `,At=vt` 0% { opacity: 0.5; } 100% { opacity: 1; } `,pn=vt` 0% { opacity: 0; } 100% { opacity: 1; } `;vt` 0% { opacity: 0; transform: translateY(100%); } 100% { opacity: 1; transform: translateY(0%); } `;const Wa=vt` 0% { opacity: 0; left: 11%; } 100% { opacity: 1; left: 5.5%; } `,Ka=vt` 0% { opacity: 0; left: 11%; } 100% { opacity: 0.7; left: 5.5%; } `,Qa=r.div` display: flex; background: #fff; width: 100%; height: 300px; justify-content: center; align-items: center; animation: ${At} 0.3s ease-in-out; `,Za=r.div` box-sizing: border-box; width: 40px; height: 40px; border: 4px solid var(--color-textLightGray); border-top-color: #0d0f71; border-radius: 50%; animation: ${Vr} 1s linear infinite; `,or={Container:Qa,Spinner:Za},We=({...e})=>t.jsx(or.Container,{...e,children:t.jsx(or.Spinner,{})}),En=({children:e})=>{const[n,o]=s.useState(!1);return s.useEffect(()=>{const i=setTimeout(()=>{o(!0)},200);return()=>clearTimeout(i)},[]),n?t.jsx(t.Fragment,{children:e}):null},Yr=({errorMessage:e,returnUrl:n=p.MAIN})=>{const o=Ce(),{openDialog:i}=Et();return s.useEffect(()=>{(async()=>(await i(e),o(n)))()},[e,n]),t.jsx(t.Fragment,{})},Xa=r.div` width: 100%; height: 100vh; ${z}; `,Ja=r.div` ${z}; flex-direction: column; padding: 14px 20px 36px 20px; gap: 24px; max-width: 400px; text-align: center; h4 { font-size: 1.8rem; ${T.bold}; color: #1e1e22; margin: 0; } `,ec=r($n)` width: 64px; height: 64px; `,tc=r.h4` font-size: 1.8rem; ${T.bold}; color: #1e1e22; `,nc=r.p` font-size: 1.6rem; ${T.regular}; color: #59595f; margin: 0; `,oc=r.div` width: 100%; display: flex; flex-direction: column; gap: 10px; padding: 12px; button { border-radius: 8px; padding: 15.5px 0; border: 1px solid #0d0f71; cursor: pointer; background-color: #0d0f71; span { font-size: 1.6rem; ${T.medium}; color: #fff; } &:hover { opacity: 0.9; } &:active { opacity: 0.8; } } `,Nt={Container:Xa,ContentsContainer:Ja,Icon:ec,ErrorText:tc,ErrorSubText:nc,ButtonContainer:oc},rc=()=>{const e=Ce(),n=()=>{e(p.MAIN)};return t.jsx(Nt.Container,{children:t.jsxs(Nt.ContentsContainer,{children:[t.jsx(Nt.Icon,{}),t.jsx(Nt.ErrorText,{children:"페이지를 찾을 수 없습니다."}),t.jsx(Nt.ErrorSubText,{children:"요청하신 페이지가 존재하지 않습니다."}),t.jsx(Nt.ButtonContainer,{children:t.jsx("button",{type:"button",onClick:n,children:t.jsx("span",{children:"메인으로 이동하기"})})})]})})},ic=r.section` font-size: 1.6rem; ${z}; flex-direction: column; gap: 40px; padding: 40px; height: 100vh; text-align: center; line-height: 1.6; `,sc=r.div` ${z}; flex-direction: column; `,rr={Container:ic,ButtonContaier:sc},ac=({error:e,resetErrorBoundary:n})=>{const[o,i]=s.useState("이용에 불편을 드려 죄송합니다.
동일한 현상이 계속될 경우 문의 주시기 바랍니다.");s.useEffect(()=>{var l,d;if(Ue(e)){const u=((d=(l=e.response)==null?void 0:l.data)==null?void 0:d.message)??"";i(Xs.sanitize(u,{ALLOWED_TAGS:["br"],ALLOWED_ATTR:[]}))}},[e]);const a=Ce();return K?t.jsx(t.Fragment,{}):t.jsxs(rr.Container,{children:[t.jsx("p",{dangerouslySetInnerHTML:{__html:o}}),t.jsxs(rr.ButtonContaier,{children:[t.jsx("button",{onClick:n,children:t.jsx("span",{children:"다시 시도하기"})}),t.jsx("button",{onClick:()=>{n(),a(p.MAIN)},children:t.jsx("span",{children:"메인으로 이동하기"})})]})]})},dn={HTTP_CONTINUE:100,HTTP_SWITCHING_PROTOCOLS:101,HTTP_PROCESSING:102,HTTP_OK:200,HTTP_CREATED:201,HTTP_ACCEPTED:202,HTTP_NON_AUTHORITATIVE_INFORMATION:203,HTTP_NO_CONTENT:204,HTTP_RESET_CONTENT:205,HTTP_PARTIAL_CONTENT:206,HTTP_MULTI_STATUS:207,HTTP_ALREADY_REPORTED:208,HTTP_IM_USED:226,HTTP_MULTIPLE_CHOICES:300,HTTP_MOVED_PERMANENTLY:301,HTTP_FOUND:302,HTTP_SEE_OTHER:303,HTTP_NOT_MODIFIED:304,HTTP_USE_PROXY:305,HTTP_RESERVED:306,HTTP_TEMPORARY_REDIRECT:307,HTTP_PERMANENTLY_REDIRECT:308,HTTP_BAD_REQUEST:400,HTTP_UNAUTHORIZED:401,HTTP_PAYMENT_REQUIRED:402,HTTP_FORBIDDEN:403,HTTP_NOT_FOUND:404,HTTP_METHOD_NOT_ALLOWED:405,HTTP_NOT_ACCEPTABLE:406,HTTP_PROXY_AUTHENTICATION_REQUIRED:407,HTTP_REQUEST_TIMEOUT:408,HTTP_CONFLICT:409,HTTP_GONE:410,HTTP_LENGTH_REQUIRED:411,HTTP_PRECONDITION_FAILED:412,HTTP_REQUEST_ENTITY_TOO_LARGE:413,HTTP_REQUEST_URI_TOO_LONG:414,HTTP_UNSUPPORTED_MEDIA_TYPE:415,HTTP_REQUESTED_RANGE_NOT_SATISFIABLE:416,HTTP_EXPECTATION_FAILED:417,HTTP_I_AM_A_TEAPOT:418,HTTP_UNPROCESSABLE_ENTITY:422,HTTP_LOCKED:423,HTTP_FAILED_DEPENDENCY:424,HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL:425,HTTP_UPGRADE_REQUIRED:426,HTTP_PRECONDITION_REQUIRED:428,HTTP_TOO_MANY_REQUESTS:429,HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE:431,HTTP_INTERNAL_SERVER_ERROR:500,HTTP_NOT_IMPLEMENTED:501,HTTP_BAD_GATEWAY:502,HTTP_SERVICE_UNAVAILABLE:503,HTTP_GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL:506,HTTP_INSUFFICIENT_STORAGE:507,HTTP_LOOP_DETECTED:508,HTTP_NOT_EXTENDED:510,HTTP_NETWORK_AUTHENTICATION_REQUIRED:511},qr=({children:e,fallback:n=ac})=>{const o=(i,a)=>{var u;console.error(a);const{HTTP_UNAUTHORIZED:l,HTTP_SERVICE_UNAVAILABLE:d}=dn;if(i instanceof Ft){if(K)return;if(Ke((u=i.response)==null?void 0:u.status,[l,d]))throw i}};return t.jsx(Tr,{onError:o,fallbackRender:i=>t.jsx(n,{...i}),children:e})},de=({children:e,suspenseFallback:n,errorFallback:o})=>t.jsx(qr,{fallback:o,children:t.jsx(s.Suspense,{fallback:n,children:e})}),cc=r.footer` display: flex; flex-direction: column; padding: 32px 36px 62px 20px; background: #f6f6fa; gap: 24px; `,lc=r.div` display: flex; flex-direction: column; gap: 12px; `,Wr=r.ul` display: flex; gap: 16px; flex-wrap: wrap; font-size: 1.3rem; color: var(--color-textGray); `,dc=r.div` font-size: 1.3rem; color: var(--color-textGray); display: flex; flex-direction: column; gap: 16px; p { color: #b3b4b9; } `,uc=r.div` display: flex; flex-direction: column; gap: 2px; `,pc=r.p` font-size: 1rem; ${T.regular}; color: #b3b4b9; `,mc=r(Wr)` display: flex; gap: 16px; > li { > a { line-height: 0; } } `,dt={Container:cc,LinkList:Wr,ContentsContainer:dc,InfoContainer:uc,WaringText:pc,IconLinkList:mc,LinkContainer:lc},Kn={TERMS:"https://napi.happypointcard.com/page/term-view.spc?pre=11",PRIVACY_POLICY:"https://www.happypointcard.com/page/customer/term.spc?no=2",BUSINESS_INFO:"http://www.ftc.go.kr/bizCommPop.do?wrkr_no=2148554039",CUSTOMER_SERVICE:"https://pf.kakao.com/_bGpixb"},hc={TERMS:"https://napi.happypointcard.com/page/term-view.spc?pre=11",PRIVACY_POLICY:"https://napi.happypointcard.com/page/term-view.spc?pre=3 ",BUSINESS_INFO:"http://www.ftc.go.kr/bizCommPop.do?wrkr_no=2148554039",CUSTOMER_SERVICE:"https://pf.kakao.com/_bGpixb"},at=()=>Js(navigator.userAgent).isMobile?vr?"IOS":ea?"AOS":"MOBILE_WEB":"PC",Wy=(e,n)=>e/n*100,ir=e=>`${typeof window<"u"?window.location.protocol:"http:"}${e}`,Qn={"/":"MAIN","/products/:productNo":"PRODUCT","/cart":"CART","/mypage":"MY_PAGE","/categories/:categoryNo":"PRODUCT_LIST","/search":"PRODUCT_SEARCH","/order/complete":"ORDER_COMPLETE","/order/:orderSheetNo":"ORDER","/mypage/orders/:orderNo":"ORDER_DETAIL","/mypage/product-inquiries":"MY_PAGE"},xc=e=>U(Qn,Ms,so(n=>ie(n,e.pathname)?Qn[n]:null),n=>n?ln(n,Qn):null),ho=e=>{},gc=()=>({version:"1.0",clientId:"X+Ai2NGAWJyC/wapyz1xag==",platform:at(),language:"ko"}),xo=new AbortController,h=st.create({baseURL:"https://shop-api.e-ncp.com",headers:gc(),signal:xo.signal,validateStatus:e=>K&&e===dn.HTTP_UNAUTHORIZED?!0:e>=200&&e<400});h.defaults.timeout=1e4;h.interceptors.request.use(e=>{var o;ho(`[API] ${(o=e.method)==null?void 0:o.toUpperCase()} ${e.url} | Request`),e.headers=e.headers??{};const n=ee.getAccessToken();return n?e.headers.accessToken=(n==null?void 0:n.accessToken)||"":ee.clear(),e});h.interceptors.response.use(async e=>{var n,o,i;if(ho(`[API] ${(o=(n=e==null?void 0:e.config)==null?void 0:n.method)==null?void 0:o.toUpperCase()} ${(i=e==null?void 0:e.config)==null?void 0:i.url} | Request ${e.status}`),e.status===dn.HTTP_UNAUTHORIZED&&K)try{ee.clear(),xo.abort("Request was canceled");const a=`${window.location.pathname}${window.location.search}`;window.location.replace(a)}catch(a){console.error(a)}return e},async e=>{var n,o,i,a,l,d,u,c;if(!(e instanceof Ft))return Promise.reject(e);switch(ho(`[API] ${(o=(n=e==null?void 0:e.config)==null?void 0:n.method)==null?void 0:o.toUpperCase()} ${(i=e==null?void 0:e.config)==null?void 0:i.url} | Error ${(a=e.response)==null?void 0:a.status} ${(l=e==null?void 0:e.response)==null?void 0:l.statusText} | ${e==null?void 0:e.message}`),(d=e.response)==null?void 0:d.status){case dn.HTTP_UNAUTHORIZED:if(((u=e.config)==null?void 0:u.baseURL)==="https://shop-api.e-ncp.com"){if(Ke((c=e.config)==null?void 0:c.url,["/authentications","/oauth/token"]))return Promise.reject(e);if(ee.clear(),xo.abort("Request was canceled"),!K){alert("로그인 상태가 만료되었습니다. 다시 로그인해주세요.");const m=`${p.AUTH.LOGIN}?returnUrl=${encodeURIComponent(`${window.location.pathname}${window.location.search}`)}`;window.location.replace(m)}}return Promise.reject(e);default:return Promise.reject(e)}});const fc={getMall:()=>h({method:"GET",url:"/malls"}),getMallInternationalizationSettings:()=>h({method:"GET",url:"/malls/internationalization"}),getMallPartners:()=>h({method:"GET",url:"/malls/partners"}),getSslInfo:()=>h({method:"GET",url:"/malls/ssl"})},Kr=({options:e}={})=>se({queryKey:["mallInfo"],queryFn:async()=>{const{data:n}=await fc.getMall();return n},staleTime:1e3*60*10,gcTime:1e3*60*10,...e}),Qr=()=>{const e=at(),n=s.useMemo(()=>Ke(e,["AOS","IOS"])&&navigator.userAgent.includes("happypointcardapp")||navigator.userAgent.includes("happypointcardapiversion"),[e]),o=s.useMemo(()=>{if(n)return vr?{appUrl:"happypointcard://"}:{appUrl:"happypointcard://deeplink"}},[n]);return{platform:e,isApp:n,extraData:o}},yc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAeASURBVHgBlVZtbBxXFT3vzZuP/bC9ju0ocQPdpoK2FKmOIC6NCnEqIUUKEY4KfxpB7D9Ai4BKAVShishICAkJKRSohKhUF/60f4iDKoEUkbpSXdKYErcVom6hWYyBpI7j9Xq9692ZeZfzZuuQtmrSrn39djxv7rn33HPvG4X38Xmwvzmirfq8nyYjkU3K+TQu5dMWirZd7Upac0XVngtt++Q+7J6+ni91rZsPDCRjxqbHfCtl36YIrAUBkbdtFNKYqwONEUmMEAkCSMXoZGI4HZ78QIAPbpOyiJwwVoYMQYI0QUiAkKD5JEFB2sgRNC8MgBbAIpQUBpuWVAoS77sJd1WuC3h0mxzRSo4bUaVAJAPJJW0U4xbXFjNLUKTziP8Pud+ZB4FPYI+mCa5Vm2u7amRjfBCfmXpPwIcHk1Gx+kSgFHJ0kiNgPo7RFTdpBE02CMgAHIV07vNpj6aVpqMUivvdCsT83oZIk9eNsX587ol3Af4oo9Ge85QqRQTLC9DTtYHbjigM3A0UBg2UplMGo3kPzpTNntVtwC4lSH63Cm+qClloQOwGrDSQSr0K1Hf1YrzyNsBHtyXnFVTZp8OI14PDLex+zCAoKUhNYBfbUGsEZA0zsOyPzn4lzyDK5KREcpc2gC/Nw0xfIrlNxOka9zXmivjqriuAJ25ojqWiH9d82hCwezDF0EnWp6Ww/LUl+H9aQyFpUDgtmJTpyFtgGW5ntY7MPZTPE7cC3Qb+7X+EulRDyzpABoHWeA7fncx2b6X0t7Mu2ynt7eT/xv1U4VaN5fsvIJhdRVHXEak6PK7iNVi4JkN11mKeXAcF8W93Qu/Kwxufgyr5SL+ynZ7XKagNhtZ06zGHZV7fsTQC2yyrLGb+tYL+/XlglZJ/sYqcV6cSm9AEEhYr3bMF6sAOpwvguRV4T19EvDOAPjAA6aLDR19Bq0rB3LMN+OE6PdZpbSekcoyHRkyPLI16WS0IJh6jTmD6ikj/2UTBXITPKLVmVh9maz/2acgQATdL/03G9/Jl+F84C3vgGaiXLmVZyeIazA05+iKdmVJjMuHUK6MmwuIdyoExaSdv10cqGIRaacA3C1Ql+ZcNxJP3Abf3wzv+AvCbeeggR5Ay7Pc+gfipYfh7TgBsGUELeo1UdxknFoK1uCZcXZXtXhOa14c64erODzNM1K6s0DqqMMoYyb7bCDYAHD8F88gLkNQnEaTxkf8ijgRy9JOIR3oRnHbKJ1jqlGw79c3odCJLCYmy1tFCSYcVeOE/4EWvQeXm2W/cpLk5/y8gdwHyqX42MqU/PcvrNahoHYjqNNL91GwWrnfwQ3ymnlGqOYk6St7IsusU3PWsLhmEF7jBRcMbrrENwVTa6ebCm1nnqKgNm02UZQZB8cQBt3CoJaStt9BpC91iwKxfy00YOldu6iRZZo49YcnAqat1sFJFtASVf5MNfJEOuZJWMSx04TJBV2FffC6jxd57F2tTg6JJfpV7a7AHb87uqT//tZN1rgHrpZ0xJplQ3F1axBy7qgaFixUWZMjVSnGjGJcpI3SDsoeAKoB//jTiyquQw6PUxQbUzF+AWgK7/7PAl/cD8wvQM2fg5qHyaGZzftlMjDxLaI6JrjmDfPVZgg1Bk2cXWZB0ZFxkL3ZT1iqEG3b+r44ieeAnsEcOA0fu+/8k/vsbMA//GKrA7ByQR53nfZiEPgJ+b/kEy5PYLm7PvWRsuD6lvea34JFGn1kS0Fb/DbXjY0CpxmwDOuYcta/B/PSLsLfeA9k5TLo4xs6egTf7CvXFGnWzlxukzg9gbmTTzy+y9swwNbCJm845AgZTxp9anE4P5yvwk7IKmWFOoBdOQT56N+zHh+BdmM3EBCHVlLv3nz8A509R/QEnHIMpESzwSCPT0x6Smz9CcJ43p886DAqL7wESulaq5HD/dDZLJYwneLqSYvLfzYRe/SVZXkE6+mukt9wJW6L6SqtQW1YhfRRLPzPvI91buPZyfPVwEnWvw+6+BfYHD0Eu1xBMPw+JyHlIdRrS6qmJtx1P9jv6HN8dhlSBtLB8trwX6d4n+UAfs1nhkXae0TapYNVJmH2pEnfWM0O/hwIbYA9zbbBPvz8Bf+YNtmQfktWtiNe3VvK1b9+UDe9NQFWwh6Sgz0kRJUVA3aCWZu5EsuNeYOAg6eGk0b3ZgHcyd6e7uOYUpzXLA5hD4+XnoZ8+SdrJVlRigBxnEaq5ZrzvCg6u+sgvvDEpyuMOUHIseKiykJTu7HRZ8QjP5gJ4VqJJ8HXWcZVDYCXi/GWt+F1Vi8Aaman3I631HTJ/+/mV9xp9NaD6ejpJZR0SRsUDkB0h2VuSOJG5t6WO2LJrobhQYFB5DucCrdhkO3CUhWyHkIoPN3i21cevBntXhlcy/T3KLPgzMHzP8RmTkc2DndnxkUQ6M5k4ap1Z1nnzsk9jVMuU/0pxTqV9h9STZyrv9H3NF+FkBmPK6GMZ8Fu0quRqQNLboGjcW8SK50Arcik3YX62PPlePq8JuPmJZzHCqTvqabmD7ThEsFJ2ALRQVQ1UpKaetTU95X8jmb6er/8BowZmbMbHGbgAAAAASUVORK5CYII=",Ec="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAROSURBVHgBvVZtaFtVGH7OuUmTtEmM+7SdxkxHHYp0Q6XGz/aPQ1DWwmDTTtuBPwQFnT8cOGGU6R9F/yhDBsMNnY4NXP0AHVW6MmlsEdNO/DHsZsY6t9lhrvQjbZJ7ju85zcfNTZp0c/hcLvdw3nPf7/c9L8MSEIptbxNMbqZlmxQsAiZDmiCZSetRxjDKJfvSjH56shYvVo0YiD3bw8D2SCCCpSFBWvRORT87iGsRGIr1RATLHJcSG3B9SBhwt5vRgwkngTs3AsNd3ZbMxv+DMIWIxTLxwPD2DieBlQp7pgOCH8eNBEfPVOvhQ2UClRuVZYWEuFFgMA3p3ph3ryu/L5AZIGKoeI4hKwW9adTIrRykPufjHuIl7dshlQ+02og8J5WNtPw4f8bFDPwz9xfWNdyOx0ItSEurpjiVDIIUPHqlH9yoh8HdToV2qOzVAoOxrj/sqT+bTmJ35Hn0hrfiehAe7kFSZrSXbEhMRQ+vZaqoLcgBO8Uj5jH50DFY5ByjPJGrQtCTmLuKO4e2IlC/poQmwdq5kChL3UZfk/7mhamY5ONSEp8K4PQsczVQhMrjzqXooI6EFifBEkJ/zewsvkuOEQum9dt3uV+vVayKFkmHFTnlWKVEY49zSLlogY/P/YkXzryDdye+omPAgQtH8OHlE8SL4+VzB3CeXKcU+Gn6d7x38Rv0m78641aqDEeE20uhqMjCp97wYpKYNnpCWHnqaXxw1+tIZedxz3A31pPbI0NbcG7uCjb98gru8K3GEyPdqAoqEb4IQSNNmRaub0LXykeRtGZxKWPCIFedTV3ES41PkpAmjEyPI+y7FVF/M7hnFWrBRczNMitzFt5s+BEhZqEfOzF43z6kSIEGw4fTD34C/8lN2L3uRWxb8TDGU5fw1sSxXKyrgLqOi3yeoEBvKN1fMDzsWYH+e/cWjNbsbloo8Jm2E3o/I7J487YteOq3t7Fr7XNFfWVFz42q1jZIb4nAGXJfuXJFcFaMhJu7dAv8+u43KJkY0sJCll5U6E5MyjEuGPqchATFZWz2fMWMq1SHLlJACVOUOm7g1cQheDzLy/9lvK9ia3NTL/07NYH3m1/DI8H1yOS0VYejgWbdTVQlqph9b56Gn+Kaj9/eC0fx7dVTCNatyp0q2qFam74tKIa99uatBIS8a7Dr7H5krBkUHDo/iS8e2I/Ny+6nbONoje/ESPJnkuzN/Snhq1teSZii9QK20ASHuuLUdare8tryqTNItv2gG8Ce8Y/g967W3aUGtHVqUbgPObM6LWnEKzYCu+Xk0kYqcJUcQe8tusFXBU12Bsu2F+TkF2b0SILSaOfC5uI3hEUZ6SIXNlCDriZMeUPDsHZo3k6BCnq8k6yT6sxEFSzl/s8IxYMu3dbP+2r+G4pti9BNOHAN82ipQnowtjrtllUVmMf/Ngg74aepgDPRISVvgZpXbaM+U0K4GBSS900vYdT/F+6WvWmM+YsFAAAAAElFTkSuQmCC",Cc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKQSURBVHgBvZbNThNRFMd/MwgWCqJRQFhAWPAARnZE40YSH8BXMGHhioULU+Up3BJD9AFcmLBS485EF7JRBBKI1KYubKQlqfPlOb0z2FtLZ2wr/+T2YyZzfvee+Z9zL6TLWYML2/DwCD75cCTDC8yo/YCPcr1wDwbpUe4hXAuhGkEoI+o0AvMdvoGbdCHXg0MJEKSB2oD1mZJmJgvIeQqXgy5AbcD+E7jUkbYOFyWFfq+wZGis53DFWlHzb5nVLxfO0UcJNBwwhgr1v5vckBkV+w2LAa64+isxqwF4DTcEOHGyXCf+NTsLCwswPw+Tk5DPmzEYV4An1jo+lkKRwiiX4eAA9vZgZ8fE0MQa0tS+OH4O3iers22/vBz1pCAwMWwT1RrsuzAUtL7wfigMW00UrkkDUWwh+h9AVUtc6VYFKtKarBvDw52DrKxEke9HmZTPW0B505/R3FrAiYkoddauG0UbG+lAjdUUW9xaVaBnAefm0oEJVL93d41J2klj2cbxXHrR2BiMjv4poxQJ1HHlo25d1bpKkyvz3NyESsXU52nAWs1+TFm6x1kpHRnpnNLVVWP5LMrlrJT+hC22z7AsZHGPuS/FaHUax8m+gn8AanO5A+cbqf2rNJaWTndeFumENUbLChXWeNtFuH4V3jnJ7pGYYHraNO6ZGWm/UzA+Drmcad4awpfKqteNeZLmvS9tulSKbRkl7gw+wO1FeHViIHm0mLah9jC+J6BmPyvUG2jaI/sh3fUl5hBxSpuDhy8lcbp8+iSNtS4xiWHt5DyTg4/Xn0NU8MKcZ7Kd3uShctDdMTGUCX+jm1fzFm7FQbICa+L4RXr1gRasdgkx/1ZoataPi6Kqe9wXePRAiiYL6DdZRfCL59NuugAAAABJRU5ErkJggg==",wc=[{url:`${p.AUTH.TERMS}/USE`,appUrl:`${p.AUTH.TERMS}/USE`,label:"이용약관",fontWeight:400},{url:Kn.PRIVACY_POLICY,appUrl:hc.PRIVACY_POLICY,label:"개인정보처리방침",fontWeight:700},{url:Kn.CUSTOMER_SERVICE,appUrl:Kn.CUSTOMER_SERVICE,label:"고객센터",fontWeight:400}],bc=[{url:p.BOARDS.NOTICE.LIST,label:"공지사항",fontWeight:400},{url:p.BOARDS.FAQ,label:"FAQ",fontWeight:400},{url:"https://www.ftc.go.kr/bizCommPop.do?wrkr_no=2148554039",label:"사업자정보확인",fontWeight:400,target:"_blank"}],Sc=()=>{const{data:e}=Kr(),{isApp:n}=Qr();return t.jsxs(dt.Container,{id:"footer",children:[t.jsxs(dt.LinkContainer,{children:[t.jsx(dt.LinkList,{children:wc.map(({url:o,appUrl:i,label:a,fontWeight:l})=>t.jsx("li",{children:t.jsx(W,{to:n?i:o,style:{fontWeight:l},children:a})},a))}),t.jsx(dt.LinkList,{children:bc.map(({url:o,label:i,fontWeight:a,target:l})=>t.jsx("li",{children:t.jsx(W,{to:o,style:{fontWeight:a},target:l,children:i})},i))})]}),t.jsxs(dt.ContentsContainer,{children:[t.jsxs(dt.InfoContainer,{children:[t.jsx("p",{children:`${e==null?void 0:e.serviceBasicInfo.companyName} | ${`대표자명 : ${(e==null?void 0:e.serviceBasicInfo.representativeName)||""}`}`}),t.jsx("p",{children:`사업자 등록번호: ${(e==null?void 0:e.serviceBasicInfo.businessRegistrationNo)||""}`}),t.jsx("p",{children:`소재지: ${(e==null?void 0:e.serviceBasicInfo.address)||""}`}),t.jsx("p",{children:`통신판매번호: ${(e==null?void 0:e.serviceBasicInfo.onlineMarketingBusinessDeclarationNo)||""}`}),t.jsxs("p",{children:[`고객센터 : ${e==null?void 0:e.serviceBasicInfo.representPhoneNo}`," ","|"," ",`이메일 : ${e==null?void 0:e.serviceBasicInfo.representEmail}`]}),t.jsx("p",{children:"호스트제공 : 엔에이치엔커머스(주)"})]}),t.jsx("div",{children:t.jsx(dt.WaringText,{children:"개별 판매자가 등록한 오픈마켓 상품에 대한 광고, 상품의 주문·배송·환불 등 거래와 관련한 의무와 책임은 각 판매자가 부담하며, (주)섹타나인은 통신판매중개자로서 해당 거래의 당사자가 아닙니다. 다만, 회사의 고의 또는 과실이 있는 경우에는 관계 법령에 따른 책임을 부담할 수 있습니다."})})]}),t.jsxs(dt.IconLinkList,{children:[t.jsx("li",{children:t.jsx(W,{to:"https://m.blog.naver.com/happypoints",children:t.jsx("img",{src:Ec,alt:"naver-blog"})})}),t.jsx("li",{children:t.jsx(W,{to:"https://www.instagram.com/happypoint_official?igsh=MTQxcXV6c2c5em9zcA==",children:t.jsx("img",{src:yc,alt:"instagram"})})}),t.jsx("li",{children:t.jsx(W,{to:"https://youtube.com/@happypoint_official?feature=shared",children:t.jsx("img",{src:Cc,alt:"youtube"})})})]})]})},Tc=r.nav` height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; background: var(--color-white); border-bottom: 1px solid #f2f3f5; background: #fff; `,vc=r.ul` width: 100%; height: 100%; display: flex; justify-content: space-between; `,Ac=r.li` position: relative; display: flex; align-items: center; height: 100%; padding: 0 4px; > a { font-size: 1.6rem; line-height: 20.8px; color: ${({$active:e})=>e?" var(--color-textSecondary)":" var(--color-textPrimary)"}; font-weight: ${({$active:e})=>e?" 700":" 400"}; } &::after { content: ''; position: absolute; left: 0; bottom: 0; opacity: ${({$active:e})=>e?"1":"0"}; transform: ${({$active:e})=>e?"scaleX(1)":"scaleX(0.5)"}; transition: ${({$active:e})=>e?"all 0.3s ease-in-out":"none"}; width: 100%; height: 3px; border-radius: 3px; background: #161a2a; } `,Zn={Container:Tc,MenuList:vc,MenuItem:Ac},Pc={DESSERT:"745921",HEALTH_FOOD:"633963",DRINK:"633965",PROCESSED_FOOD:"633967",FRESH_FOOD:"633969",LIFE_STYLE:"633971",HOME_BAKING:"818770",DIGITAL:"818771"},vo=[{name:"마켓홈",url:"/"},{name:"해피딜",url:`${p.HAPPY_DEAL}`},{name:"베스트",url:`${p.BEST}`},{name:"카테고리",url:`${p.CATEGORIES.LIST}/${Pc.DESSERT}`},{name:"My",url:`${p.MY_PAGE.MAIN}`}],jc=()=>{const{pathname:e}=Ge();return t.jsx(Zn.Container,{id:"gnb",children:t.jsx(Zn.MenuList,{children:vo.map(({name:n,url:o})=>{const i=(a,l)=>a==="카테고리"?p.CATEGORIES.DETAIL:l;return t.jsx(Zn.MenuItem,{$active:!!ie(i(n,o),e),children:t.jsx(W,{to:o,children:n})},n)})})})},Ic=r.header` position: sticky; top: 0; /* left: 50%; transform: translateX(-50%); */ z-index: 11; width: 100%; /* max-width: calc(${gt.SM}px + 1px); */ max-width: 601px; height: fit-content; display: flex; flex-direction: column; background: #fff; `,Lc=r.div` display: flex; width: 100%; justify-content: space-between; height: 56px; padding: 0 20px; `,Nc=r.div` display: flex; align-items: center; justify-content: space-between; gap: 16px; h1 { font-family: Pretendard; font-size: 1.8rem; ${T.medium} line-height: 23.4px; text-align: left; color: var(--color-textSecondary); } > a { line-height: 0; } `,kc=r.div` display: flex; justify-content: space-around; align-items: center; gap: 16px; > a { position: relative; line-height: 0; span { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; background: var(--color-highlight); border-radius: 50%; font-size: 1.1rem; ${T.medium} text-indent: 1px; text-align: center; line-height: 19px; color: var(--color-white); } } > button { line-height: 0; } `,Cn={Container:Ic,InnerContainer:Lc,LogoContainer:Nc,IconContainer:kc},Rc={getProfile:({headers:e}={})=>h({method:"GET",url:"/profile",headers:e}),updateProfile:e=>h({method:"PUT",url:"/profile",data:e,headers:{version:1.1}}),createProfile:e=>h({method:"POST",url:"/profile",data:e}),deleteProfile:e=>h({method:"DELETE",url:"/profile",params:e}),updateProfileAddress:e=>h({method:"PUT",url:"/profile/address",data:e}),getBlockedMembers:e=>h({method:"GET",url:"/profile/blocked-members",params:e}),blockMember:e=>h({method:"POST",url:"/profile/blocked-members",data:e}),createBrandMemberProfile:e=>h({method:"POST",url:"/profile/brand-oauth",data:e}),updatePasswordByCertificationNo:e=>h({method:"POST",url:"/profile/change-password-after-cert",data:e}),checkPassword:e=>h({method:"POST",url:"/profile/check-password",data:e}),getDormantAccount:()=>h({method:"GET",url:"/profile/dormancy"}),releaseDormancyAccount:e=>h({method:"PUT",url:"/profile/dormancy",data:e}),withDrawByPassword:e=>h({method:"PUT",url:"/profile/expel",data:e}),findId:e=>h({method:"POST",url:"/profile/find-id",data:e}),findPassword:e=>h({method:"POST",url:"/profile/find-password",data:e}),getGrade:()=>h({method:"GET",url:"/profile/grade"}),findIdByCertification:e=>h({method:"GET",url:"/profile/id",params:e}),updateId:e=>h({method:"PUT",url:"/profile/id",data:e}),getNonMaskingMember:e=>h({method:"POST",url:"/profile/non-masking",data:e}),signUpByOpenId:(e,n)=>h({method:"POST",url:"/profile/openid",data:e,headers:{accessToken:n}}),updatePassword:e=>h({method:"PUT",url:"/profile/password",data:e,headers:{version:1.1}}),updateProfileByCertification:e=>h({method:"POST",url:"/profile/rename",data:e}),reportMember:e=>h({method:"POST",url:"/profile/report",data:e}),synchronizeProfile:e=>h({method:"POST",url:"/profile/synchronize",data:e}),checkDuplicateCI:e=>h({method:"GET",url:"/profile/ci/exists",params:e}),checkDuplicateEmail:e=>h({method:"GET",url:"/profile/email/exist",params:e}),sendUpdateIdEmail:e=>h({method:"POST",url:"/profile/id/email",data:e}),checkDuplicateId:e=>h({method:"GET",url:"/profile/id/exist",params:e}),checkDuplicateMobileNo:e=>h({method:"GET",url:"/profile/mobile/exist",params:e}),checkDuplicateNickname:e=>h({method:"GET",url:"/profile/nickname/exist",params:e}),getMaskingAccountInfo:e=>h({method:"GET",url:"/profile/password/search-account",params:e}),sendUpdatePasswordEmail:e=>h({method:"PUT",url:"/profile/password/sending-email-with-url",data:e}),checkDuplicateMemberByEmail:e=>h({method:"GET",url:"/profile/member/equals/with-email",params:e}),checkDuplicateMemberByMobile:e=>h({method:"GET",url:"/profile/member/equals/with-mobile",params:e}),updatePasswordByCertificationKey:e=>h({method:"PUT",url:"/profile/password/no-authentication/after-certification",data:e}),updatePasswordByEmailCertification:e=>h({method:"PUT",url:"/profile/password/no-authentication/certificated-by-email",data:e}),updatePasswordBySMSCertification:e=>h({method:"PUT",url:"/profile/password/no-authentication/certificated-by-sms",data:e})},we=({headers:e,options:n}={})=>{const o=ee.getAccessToken();return se({queryKey:He.getProfile(e),queryFn:async()=>{const{data:i}=await Rc.getProfile({headers:e});return i},enabled:!!(o!=null&&o.accessToken),staleTime:1e3*60*60,gcTime:1e3*60*60,...n})},Ao={getCartList:(e={})=>h({method:"GET",url:"/cart",params:e}),updateCart:e=>h({method:"PUT",url:"/cart",data:e}),registerCart:e=>h({method:"POST",url:"/cart",data:e}),deleteCart:e=>h({method:"DELETE",url:"/cart",params:e,paramsSerializer:{serialize:n=>Fe.stringify(n,{arrayFormat:"comma"})}}),getSelectedCartPrice:e=>h({method:"GET",url:"/cart/calculate",params:e,paramsSerializer:{serialize:n=>Fe.stringify(n,{arrayFormat:"comma"})}}),getCartCount:()=>h({method:"GET",url:"/cart/count"}),getSelectedCartGroupPrice:e=>h({method:"GET",url:"/cart/subset",params:e}),checkCartValidation:()=>h({method:"GET",url:"/cart/validate"}),getMaximumCouponCartPrice:e=>h({method:"GET",url:"/cart/coupons/maximum",params:e==null?void 0:e.cartNo})},$c={getCart:(e,n)=>h({method:"POST",url:"/guest/cart",params:n,data:e}),getOrderDetail:(e,n,o)=>h({method:"GET",url:`/guest/orders/${n}`,params:o,headers:{guestToken:e}}),issueOrderToken:(e,n)=>h({method:"POST",url:`/guest/orders/${e}`,data:n}),confirmOrder:e=>{const n=ee.getGuestToken().accessToken;return h({method:"PUT",url:`/guest/order-options/${e}/confirm`,headers:{guestToken:n||""}})},confirmDeliveryCompletion:e=>{const n=ee.getGuestToken().accessToken;return h({method:"PUT",url:`/guest/order-options/${e}/delivery-done`,data:{orderOptionNo:e},headers:{guestToken:n||""}})},requestReceipt:(e,n)=>{const o=ee.getGuestToken().accessToken;return h({method:"POST",url:`/guest/orders/${e}/cashReceipt`,data:n,headers:{guestToken:o||""}})},getGuestOrderDetail:(e,n,o)=>h({method:"GET",url:`/guest/orders/${n}/claim`,params:{orderRequestType:o==null?void 0:o.orderRequestType,claimType:o==null?void 0:o.claimType},headers:{guestToken:e}}),updateDeliveryInfo:(e,{receiverZipCd:n,receiverAddress:o,receiverJibunAddress:i,receiverDetailAddress:a,receiverName:l,receiverContact1:d,receiverContact2:u,customsIdNumber:c,countryCd:m,deliveryMemo:x,add:E})=>{const S=ee.getGuestToken().accessToken;return h({method:"PUT",url:`/guest/orders/${e}/deliveries`,params:{add:E},data:{receiverZipCd:n,receiverAddress:o,receiverJibunAddress:i,receiverDetailAddress:a,receiverName:l,receiverContact1:d,receiverContact2:u,customsIdNumber:c,countryCd:m,deliveryMemo:x},headers:{guestToken:S||""}})},sendPasswordByEmail:(e,n)=>h({method:"GET",url:`guest/orders/${e}/forgot-password`,params:n})},en={writeOrderSheet:e=>h({method:"POST",url:"/order-sheets",data:e}),getOrderSheet:(e,n)=>h({method:"GET",url:`/order-sheets/${e}`,params:n}),getCalculatedOrderSheet:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/calculate`,data:n}),getAvailableCoupons:(e,n)=>h({method:"GET",url:`/order-sheets/${e}/coupons`,params:n}),applyCoupon:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/coupons/apply`,data:n}),getAppliedCouponPrice:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/coupons/calculate`,data:n}),getMaximumAppliedCouponPrice:(e,n)=>h({method:"POST",url:`/order-sheets/${e}/coupons/maximum`,data:n})},Oc=({memberNo:e,params:n,options:o})=>{const{isLogin:i}=Pe();return se({queryKey:St.list(e,n),queryFn:async()=>{const{data:a}=await Ao.getCartList(n);return a},enabled:!X(e)&&i,...o})},Po=({memberId:e,options:n})=>{const{isLogin:o}=Pe();return se({queryKey:["cartCount",{memberId:e}],queryFn:async()=>{const{data:i}=await Ao.getCartCount();return i},...n,enabled:!X(e)&&o})},_c=({data:e,params:n,options:o})=>se({queryKey:["guestCartList",{data:e,params:n}],queryFn:async()=>(await $c.getCart(e,n)).data,...o}),Mc={isInitialized:!1},Zr=Ar({name:"app",initialState:Mc,reducers:{setInitialized(e,n){e.isInitialized=n.payload}}}),{setInitialized:Xn}=Zr.actions,Bc=Zr.reducer,Dc={loading:!1,data:[],error:{}},Xr=Ar({name:"cart",initialState:Dc,reducers:{setCart:(e,n)=>{if(e.data.length>0){const i=[...n.payload,...e.data].reduce((a,l)=>{const d=Bs(u=>u.optionNo===l.optionNo,a);return d===-1?a.push(l):a[d].orderCnt+=l.orderCnt,a},[]);return{...e,data:i}}return{...e,data:[...n.payload,...e.data]}},updateCart:(e,n)=>({...e,data:U(e.data,Xe(o=>o.optionNo===n.payload.optionNo?{...o,orderCnt:n.payload.orderCnt}:o),ae)}),checkCart:(e,n)=>({...e,data:U(e.data,Xe(o=>o.optionNo===n.payload.optionNo?{...o,isChecked:!o.isChecked}:o),ae)}),deleteCart:(e,n)=>({...e,data:ae(Qe(o=>!Ke(o.optionNo,n.payload.deleteList),e.data))})}}),{setCart:Hc,updateCart:Ky,checkCart:Qy,deleteCart:Zy}=Xr.actions,Uc=na({cart:Xr.reducer,app:Bc}),Fc=!0,Gc={key:"root",storage:As,timeout:1e3},zc=vs(Gc,Uc),Jr=ta({reducer:zc,middleware:e=>e({serializableCheck:!1}),devTools:!Fc}),ei=()=>ys(),Vc=Es,Yc=()=>{const[e,n]=s.useState(),[o,i]=s.useState(0),[a,l]=s.useState(0),{isLogin:d}=Pe(),{data:u}=we(),{cart:c}=Vc(({cart:b})=>({cart:b.data}),Cs),m=Ht(),{data:x}=_c({data:c,options:{enabled:!d}}),E=s.useMemo(()=>x!=null&&x.deliveryGroups?U(x.deliveryGroups,Xe(b=>b.orderProducts.length),Pn):0,[x==null?void 0:x.deliveryGroups]),S=s.useMemo(()=>x!=null&&x.deliveryGroups?U(x.deliveryGroups,rt(b=>b.orderProducts),rt(b=>b.orderProductOptions),rt(b=>b.orderCnt),Pn):0,[x==null?void 0:x.deliveryGroups]),f=()=>{m.invalidateQueries({predicate:b=>["guestCartList","cartPrice"].includes(b.queryKey[0])})},{data:C}=Oc({memberNo:(u==null?void 0:u.memberNo)||0,params:{divideInvalidProducts:!1},options:{enabled:d&&!!(u!=null&&u.memberNo)}}),A=()=>{m.invalidateQueries({predicate:b=>Ke(b.queryKey[0],[...St.all])})};s.useEffect(()=>{if(d){n(C);return}n(x)},[d,C,x]);const{data:v,refetch:w}=Po({memberId:(u==null?void 0:u.memberId)||"",options:{enabled:d}});s.useEffect(()=>{i(d?(v==null?void 0:v.count)||0:E)},[d,v,E]);const g=s.useMemo(()=>C!=null&&C.deliveryGroups?U(C.deliveryGroups,rt(b=>b.orderProducts),rt(b=>b.orderProductOptions),rt(b=>b.orderCnt),Pn):0,[C]);return s.useEffect(()=>{l(d?g||0:S)},[d,g,S]),{cartInfo:e,totalCount:o,totalCountByOption:a,refetch:d?A:f,cartCountRefetch:w}},qc=e=>e?`${p.ORDER.MAIN}/${e}`:p.CART,ti=e=>e.get("result")!=="SUCCESS",Wc=(e,n)=>e===p.ORDER.ORDER_COMPLETE&&ti(new URLSearchParams(n)),Kc=e=>ti(e)?{to:qc(e.get("orderSheetNo")),options:{replace:!0,state:{from:p.ORDER.ORDER_COMPLETE}}}:{to:p.MY_PAGE.ORDERS.LIST,options:{state:{from:p.ORDER.ORDER_COMPLETE}}},Qc=e=>(e==null?void 0:e.from)===p.ORDER.ORDER_COMPLETE,Zc="orderSheetPaymentHistoryLength",Xc="orderSheetPaymentFailed",ni=e=>`${Zc}:${e}`,oi=e=>`${Xc}:${e}`,ri=new Map,Xy=e=>{const{length:n}=window.history;ri.set(e,n),sessionStorage.setItem(ni(e),String(n))},Jy=e=>{sessionStorage.setItem(oi(e),"1")},e2=e=>sessionStorage.getItem(oi(e))==="1",Jc=3,t2=e=>{const n=ri.get(e);return n!==void 0&&window.history.length>=n+Jc},sr=50,el=30,n2=e=>{if(!e)return-1;const n=Number(sessionStorage.getItem(ni(e))),o=window.history.length;if(!n||!o||n>=sr||o>=sr)return-1;const i=n-o+1;return i>-1||i<-el?-1:i},tl=[{url:p.MAIN,title:"마켓"},{url:p.BEST,title:"베스트"},{url:p.CATEGORIES.DETAIL,title:"카테고리"},{url:p.HAPPY_DEAL,title:"해피딜"},{url:p.SPECIAL_DEAL,title:"특가"},{url:p.PRODUCT.DETAIL,title:"상품상세"},{url:p.PRODUCT.REVIEW,title:"사진후기"},{url:p.AUTH.LOGIN,title:"로그인"},{url:p.SEARCH,title:"상품검색"},{url:p.CART,title:"장바구니"},{url:p.PRODUCT.PARTNER.LIST,title:"판매자 상품"},{url:p.PRODUCT.BRAND.LIST,title:"브랜드 상품"},{url:p.MY_PAGE.ORDERS.LIST,title:"주문/배송 내역"},{url:p.MY_PAGE.ORDERS.ORDER_DETAIL,title:"구매내역 상세"},{url:p.MY_PAGE.CLAIMS.LIST,title:"취소/반품/교환 내역"},{url:p.MY_PAGE.CLAIMS.REQUESTS.REQUEST,title:""},{url:p.MY_PAGE.CLAIMS.DETAIL,title:"취소/반품/교환 상세"},{url:p.MY_PAGE.PRODUCT_INQUIRIES,title:"상품문의 내역"},{url:p.BOARDS.NOTICE.LIST,title:"공지사항"},{url:p.BOARDS.NOTICE.DETAIL,title:"공지사항"},{url:p.BOARDS.FAQ,title:"FAQ"},{url:p.MY_PAGE.COUPONS,title:"쿠폰"},{url:p.EXHIBITIONS.LIST,title:"기획전 전체보기"},{url:p.EXHIBITIONS.DETAIL,title:"기획전"},{url:p.MY_PAGE.REVIEWS.LIST,title:"리뷰"},{url:p.MY_PAGE.REVIEWS.REVIEWS_WRITE,title:"리뷰 작성"},{url:p.MY_PAGE.REVIEWS.REVIEWS_MODIFY,title:"리뷰 수정"},{url:p.MY_PAGE.CHECK_ACCOUNT,title:"회원탈퇴"},{url:p.MY_PAGE.WITHDRAWAL,title:"회원탈퇴"},{url:p.MY_PAGE.CLAIMS.INFO,title:"정보"},{url:p.GUEST.ORDER_DETAIL,title:"구매내역 상세"},{url:p.GUEST.CLAIMS.INFO,title:"정보"},{url:p.MY_PAGE.ADDRESSES.LIST,title:"배송지 관리"},{url:p.MY_PAGE.ADDRESSES.REGISTER,title:"배송지 등록"},{url:p.MY_PAGE.ADDRESSES.MODIFY,title:"배송지 수정"},{url:p.MY_PAGE.CLAIMS.REQUESTS.CHANGE_ADDRESS,title:"배송지 변경"},{url:p.AUTH.TERM_DETAIL,title:"약관"},{url:p.ORDER.ORDER_SHEET,title:"결제하기"},{url:p.EVENT.LIST,title:"이벤트 전체보기"},{url:p.EVENT.DETAIL,title:"이벤트"}],nl=e=>[p.MAIN,p.BEST,p.HAPPY_DEAL,p.SPECIAL_DEAL,p.CATEGORIES.DETAIL].some(i=>ie(i,e)!==null),ol=e=>{var o;return((o=tl.find(i=>ie(i.url,e)!==null))==null?void 0:o.title)||""},rl=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M8.86914 22C9.97371 22 10.8691 21.1046 10.8691 20C10.8691 18.8954 9.97371 18 8.86914 18C7.76457 18 6.86914 18.8954 6.86914 20C6.86914 21.1046 7.76457 22 8.86914 22Z",fill:"#232634"}),s.createElement("path",{d:"M15.7598 22C16.8643 22 17.7598 21.1046 17.7598 20C17.7598 18.8954 16.8643 18 15.7598 18C14.6552 18 13.7598 18.8954 13.7598 20C13.7598 21.1046 14.6552 22 15.7598 22Z",fill:"#232634"}),s.createElement("path",{d:"M0.3 2C0.134315 2 0 2.13431 0 2.3V4.7C0 4.86569 0.134315 5 0.3 5H2.6L4.95177 16.7588C4.97981 16.8991 5.10294 17 5.24594 17H19.7541C19.8971 17 20.0202 16.8991 20.0482 16.7588L21.9282 7.35883C21.9654 7.1732 21.8234 7 21.6341 7H6L5.04823 2.24117C5.02019 2.10094 4.89706 2 4.75406 2H0.3Z",fill:"#232634"})),il=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.9092 4.78787C16.0263 4.90502 16.0263 5.09497 15.9092 5.21213L9.1213 12L15.9092 18.7879C16.0263 18.905 16.0263 19.095 15.9092 19.2121L14.2121 20.9092C14.095 21.0263 13.905 21.0263 13.7879 20.9092L5.09079 12.2121C4.97364 12.095 4.97364 11.905 5.09079 11.7879L13.7879 3.09081C13.905 2.97365 14.095 2.97365 14.2121 3.09081L15.9092 4.78787Z",fill:"#232634"})),sl=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22 8L12.172 1.12043C12.0687 1.04812 11.9313 1.04812 11.828 1.12043L2 8V20.7C2 20.8657 2.13431 21 2.3 21H9V13H15V21H21.7C21.8657 21 22 20.8657 22 20.7V8Z",fill:"#232634"})),al=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("g",{clipPath:"url(#clip0_6018_4149)"},s.createElement("path",{d:"M14.6094 17.75L15.0694 18.21L14.6094 17.75Z",fill:"#272727"}),s.createElement("path",{d:"M18.8803 22.02L15.0703 18.21L18.8803 22.02Z",fill:"#272727"}),s.createElement("path",{d:"M17.47 15.35C18.43 13.97 19 12.3 19 10.5C19 5.81 15.19 2 10.5 2C5.81 2 2 5.81 2 10.5C2 15.19 5.81 19 10.5 19V16C7.47 16 5 13.53 5 10.5C5 7.47 7.47 5 10.5 5C13.53 5 16 7.47 16 10.5C16 12.56 14.86 14.36 13.18 15.3L13.42 15.54L19.88 22L22 19.88L17.47 15.35Z",fill:"#232634"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_6018_4149"},s.createElement("rect",{width:24,height:24,fill:"white"})))),cl=e=>s.createElement("svg",{width:61,height:30,viewBox:"0 0 61 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("g",{clipPath:"url(#clip0_7075_37787)"},s.createElement("path",{d:"M7.52052 11.7401H11.1147V0H7.52052V4.40512H3.59196V0H0V11.7401H3.59196V7.33501H7.52052V11.7401Z",fill:"#040674"}),s.createElement("path",{d:"M18.831 2.25849V2.93216C18.6999 2.72206 17.7466 1.9776 16.3912 1.9776C13.94 1.9776 12.0898 4.34344 12.0898 6.99244C12.0898 9.85154 13.7683 12.0073 16.2985 12.0073C17.9093 12.0073 18.6028 11.2742 18.831 11.0527V11.7355H22.1292V2.26077H18.831V2.25849ZM18.7722 6.99244C18.7722 8.10457 18.0267 9.02944 17.0824 9.02944C16.1381 9.02944 15.3859 8.15024 15.3859 6.99244C15.3859 5.91914 16.0546 4.95545 17.0598 4.95545C17.9974 4.95545 18.7722 5.83008 18.7722 6.99244Z",fill:"#040674"}),s.createElement("path",{d:"M23.4961 2.25854V14.2453H26.9141V11.0482C27.1445 11.272 27.8765 12.0028 29.4872 12.0028C31.6989 12.0028 33.6575 9.84703 33.6575 6.98793C33.6575 4.3412 31.848 1.97308 29.3946 1.97308C28.0369 1.97308 27.0451 2.71755 26.9141 2.92764V2.25397H23.4961V2.25854ZM28.6852 4.9555C29.6928 4.9555 30.3592 5.91919 30.3592 6.99249C30.3592 8.15029 29.6318 9.02949 28.6626 9.02949C27.6935 9.02949 26.9728 8.10462 26.9728 6.99249C26.9728 5.88037 27.7477 4.9555 28.6852 4.9555Z",fill:"#040674"}),s.createElement("path",{d:"M34.4883 2.25854V14.2453H37.9063V11.0482C38.1367 11.272 38.8687 12.0028 40.4794 12.0028C42.691 12.0028 44.6497 9.84703 44.6497 6.98793C44.6497 4.3412 42.8379 1.97308 40.3868 1.97308C39.0291 1.97308 38.0373 2.71755 37.9063 2.92764V2.25397H34.4883V2.25854ZM39.6774 4.9555C40.685 4.9555 41.3514 5.91919 41.3514 6.99249C41.3514 8.15029 40.624 9.02949 39.6548 9.02949C38.6857 9.02949 37.965 8.10462 37.965 6.99249C37.965 5.88037 38.7399 4.9555 39.6774 4.9555Z",fill:"#040674"}),s.createElement("path",{d:"M51.2808 2.26538L49.5029 6.69105L47.7273 2.26538H44.1602L47.7837 11.0847L46.286 14.7363H49.7988L54.8411 2.26538H51.2786H51.2808Z",fill:"#040674"}),s.createElement("path",{d:"M21.3389 20.2512V20.9249C21.2079 20.7148 20.2455 19.9703 18.8765 19.9703C16.4051 19.9703 14.5391 22.3362 14.5391 24.9852C14.5391 27.8443 16.2311 30 18.7839 30C20.4082 30 21.1062 29.267 21.3389 29.0455V29.7283H24.6169V20.2535H21.3389V20.2512ZM21.2779 24.9829C21.2779 26.095 20.5257 27.0199 19.5746 27.0199C18.6235 27.0199 17.8622 26.1407 17.8622 24.9829C17.8622 23.9096 18.5354 22.9459 19.5497 22.9459C20.4963 22.9459 21.2757 23.8205 21.2757 24.9829H21.2779Z",fill:"#040674"}),s.createElement("path",{d:"M10.5341 29.7259V24.1676L8.02655 29.7259H5.59125L3.06785 24.1333L3.23502 29.7259H0V17.9881H3.47674L6.84957 24.7271L10.2224 17.9881H13.5997V29.7259H10.5319H10.5341Z",fill:"#040674"}),s.createElement("path",{d:"M33.0659 20.2763C30.8407 19.6072 29.7405 20.8381 29.3429 22.0119V20.2489H25.9023V29.7259H29.3429C29.3429 29.7259 29.3429 26.8417 29.3429 25.9054C29.3407 24.2589 30.8136 23.0989 33.0659 23.8753C33.0659 23.4597 33.0727 20.5001 33.0659 20.2763Z",fill:"#040674"}),s.createElement("path",{d:"M40.0648 24.8025L44.1447 20.2398H40.0716L37.4104 23.3021V17.9813H33.9766V29.7237H37.4104V26.5152H37.4962L40.2704 29.7237H44.5649L40.0648 24.8025Z",fill:"#040674"}),s.createElement("path",{d:"M59.0477 18.0064H55.7178V20.2603H54.2539V23.0418H55.7178V26.1521C55.7178 28.5248 57.1297 29.9977 59.4001 29.9977C59.9807 29.9977 60.2495 29.9589 60.8053 29.8676L60.8866 29.8539V26.8692L60.7759 26.8851C60.6629 26.9011 60.4641 26.9194 60.1682 26.9194C59.5424 26.9194 59.0477 26.5357 59.0477 25.8895V23.0372H60.9973V20.2558H59.0477V18.0018V18.0064Z",fill:"#040674"}),s.createElement("path",{d:"M54.0065 24.9851C54.0065 22.19 51.7971 19.9703 48.718 19.9703C45.6388 19.9703 43.4023 22.3315 43.4023 24.9851C43.4023 27.6387 45.4672 29.9954 48.7157 29.9954C51.2595 29.9954 53.069 28.6458 53.7693 26.5517H50.5863C50.3649 26.9194 49.6962 27.351 48.8377 27.351C47.6381 27.351 46.8362 26.643 46.7187 25.8803H53.9139C53.9681 25.6337 54.0065 25.3231 54.0065 24.9828V24.9851ZM48.7812 22.5942C49.9266 22.5942 50.6608 23.2998 50.8506 23.8981H46.7187C46.861 23.2587 47.6043 22.5942 48.7812 22.5942Z",fill:"#040674"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_7075_37787"},s.createElement("rect",{width:61,height:30,fill:"white"})))),ll=()=>{const e=Ce(),{pathname:n,state:o}=Ge(),[i]=Tt(),{totalCountByOption:a}=Yc(),l=i.get("claimType"),d=i.get("orderNo"),u=s.useMemo(()=>{if(ie(p.MY_PAGE.CLAIMS.REQUESTS.REQUEST,n)||ie(p.GUEST.CLAIMS.REQUESTS.REQUEST,n))switch(l){case"CANCEL":return d?"전체 취소 신청":"취소 신청";case"EXCHANGE":return"교환 신청";case"RETURN":return"반품 신청";default:return"취소/반품/교환 상세"}if(ie(p.MY_PAGE.CLAIMS.INFO,n)||ie(p.GUEST.CLAIMS.INFO,n))switch(l){case"CANCEL":return"취소";case"EXCHANGE":return"교환";case"RETURN":return"반품";default:return null}return null},[l,n,d]),c=nl(n),m=ol(n),x=L=>t.jsx("button",{onClick:L,children:t.jsx(il,{})}),E=L=>t.jsxs("h1",{children:[u&&u,L]}),{isLogin:S}=Pe(),{data:f}=we(),{data:C}=Po({memberId:(f==null?void 0:f.memberId)||(f==null?void 0:f.memberNo.toString())||"",options:{enabled:S}}),A=at(),v=n!==p.ORDER.ORDER_COMPLETE&&Qc(o)?ie(p.ORDER.ORDER_SHEET,n):null,w=n===p.ORDER.ORDER_COMPLETE||n===p.MY_PAGE.ORDERS.LIST&&(o==null?void 0:o.from)===p.ORDER.ORDER_COMPLETE||!!v,g=n===p.ORDER.ORDER_COMPLETE||K&&!w,b=()=>{if(n===p.ORDER.ORDER_COMPLETE){e(p.MY_PAGE.ORDERS.LIST,{replace:!0,state:{from:n}});return}if(n===p.MY_PAGE.ORDERS.LIST&&(o==null?void 0:o.from)===p.ORDER.ORDER_COMPLETE){e(p.MAIN,{replace:!0});return}e(-1)},P=s.useCallback(()=>{if(K){if(w){const N={visibility:!1},I={visibility:!1};A==="AOS"?(window.android.setHeaderProperty(JSON.stringify(N)),window.android.setNaviProperty(JSON.stringify(I))):(window.webkit.messageHandlers.setHeaderProperty.postMessage(JSON.stringify(N)),window.webkit.messageHandlers.setNaviProperty.postMessage(JSON.stringify(I)));return}const L=vo.find(({name:N,url:I})=>ie((($,F)=>$==="카테고리"?p.CATEGORIES.DETAIL:F)(N,I),n)),O={visibility:!0,title:(L==null?void 0:L.name)||"",items:[{type:"search",url:"https://happymarket.happypointcard.com/hm_front/product/search/list"},{type:"basket",url:"https://happymarket.happypointcard.com/hm_front/cart/list",notice:C?C.count.toString():"0"}]},y={visibility:!1};if(A==="AOS"){window.android.setHeaderProperty(JSON.stringify(O)),window.android.setNaviProperty(JSON.stringify(y));return}else{window.webkit.messageHandlers.setHeaderProperty.postMessage(JSON.stringify(O)),window.webkit.messageHandlers.setNaviProperty.postMessage(JSON.stringify(y));return}}},[C,n,A,w]);return s.useEffect(()=>{P()},[P]),s.useEffect(()=>{const L=()=>{P()};return window.addEventListener("pageshow",L),()=>{window.removeEventListener("pageshow",L)}},[P]),t.jsxs(Cn.Container,{id:"header",children:[g?null:t.jsxs(Cn.InnerContainer,{children:[t.jsx(Cn.LogoContainer,{children:!K||w?n===p.MAIN&&!w?t.jsx(W,{to:p.MAIN,children:t.jsx(cl,{})}):t.jsxs(t.Fragment,{children:[x(b),E(m)]}):null}),t.jsxs(Cn.IconContainer,{children:[t.jsx(W,{to:p.SEARCH,onClick:L=>{if(window.scrollY>1){L.preventDefault();try{window.scrollTo({top:0,behavior:"smooth"})}catch{window.scrollTo(0,0)}const O=()=>{window.scrollY<=1?e(p.SEARCH):requestAnimationFrame(O)};requestAnimationFrame(O)}},"aria-label":"검색",children:t.jsx(al,{})}),t.jsxs(W,{to:p.CART,children:[t.jsx(rl,{}),t.jsx("span",{children:a})]}),t.jsx(W,{to:p.MAIN,children:t.jsx(sl,{})})]})]}),c&&t.jsx(jc,{})]})},dl=()=>{const e=Qs(),[n]=s.useState(e);return s.useEffect(()=>{const o=document.querySelector("#header"),i=document.querySelector("#footer"),a=document.querySelector("#floatingButton"),l=o?new ResizeObserver(c=>{requestAnimationFrame(()=>{for(const m of c)document.documentElement.style.setProperty("--header-top",`${m.contentRect.height}px`)})}):null,d=i?new ResizeObserver(c=>{requestAnimationFrame(()=>{for(const m of c)document.documentElement.style.setProperty("--footer-bottom",`${m.contentRect.height+94}px`)})}):null,u=a?new ResizeObserver(c=>{requestAnimationFrame(()=>{for(const m of c)document.documentElement.style.setProperty("--floating-button",`${m.contentRect.height}px`)})}):null;return l&&l.observe(o),d&&d.observe(i),u&&u.observe(a),()=>{l&&l.disconnect(),d&&d.disconnect(),u&&u.disconnect()}},[]),n},ii={XS:`@media (max-width: ${gt.XS}px)`,SM:`@media (max-width: ${gt.SM}px)`,MD:`@media (max-width: ${gt.MD}px)`},ul=r(W)` width: 100%; height: 100%; border-radius: 12px; overflow: hidden; position: relative; `,pl=r.p` position: absolute; top: 49%; left: 5.5%; font-size: clamp(0.1rem, 4.38vw, 2.34rem); line-height: 135%; letter-spacing: 0.03vw; transform: translateY(-50%); z-index: 10; ${T.bold}; display: ${({$isAnimation:e})=>e==="none"||e?"block":"none"}; animation: ${({$isAnimation:e})=>e==="none"?"none":e?Wa:"none"} 0.6s ease-in-out; ${ii.XS} { font-size: clamp(0.1rem, 4.38vw, 1.63rem); } `,ml=r.p` position: absolute; bottom: 7.5%; left: 5.5%; font-size: clamp(0.5rem, 3.6vw, 1.6rem); transform: translateY(-50%); z-index: 10; letter-spacing: 0.03vw; ${T.regular}; opacity: 0.7; color: #fff; display: ${({$isAnimation:e})=>e==="none"||e?"block":"none"}; animation: ${({$isAnimation:e})=>e==="none"?"none":e?Ka:"none"} 0.8s ease-in-out; `,hl=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); /* backdrop-filter: blur(5px); color: var(--color-white); */ svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${({$isBig:e})=>e?"initial":"48px"}; height: ${({$isBig:e})=>e?"initial":"48px"}; } `,wn={DescriptionText:pl,DateText:ml,StyledLink:ul,AdultDimmed:hl},si=r.div` width: 100%; height: 100%; background: #f2f3f5; `,xl=r(si)` display: flex; align-items: center; justify-content: center; > p { font-size: 1rem; color: #84858a; text-align: center; } `,gl=r.img` width: 100%; height: 100%; animation: ${At} 0.3s ease-in-out; `,Jn={EmptyContainer:si,ErrorContainer:xl,Image:gl},yt=({isPlaceHolder:e,...n})=>{const[o,i]=s.useState("loading");return s.useEffect(()=>{if(!n.src){i("error");return}const a=new Image,l=setTimeout(()=>{i("error")},3e4),d=()=>{clearTimeout(l),i("loaded")},u=()=>{clearTimeout(l),i("error")};return a.addEventListener("load",d),a.addEventListener("error",u),a.src=n.src,()=>{clearTimeout(l),a.removeEventListener("load",d),a.removeEventListener("error",u)}},[n.src]),o==="loading"&&e?t.jsx(Jn.EmptyContainer,{}):o==="error"?t.jsx(Jn.ErrorContainer,{children:t.jsx("p",{children:"이미지를 불러올 수 없습니다."})}):t.jsx(Jn.Image,{loading:K?"eager":n.loading,...n})},jo=e=>e==="CURRENT"?"_self":"_blank",ai=e=>s.createElement("svg",{width:80,height:80,viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:40,cy:40,r:38,fill:"white",stroke:"#F40000",strokeWidth:4}),s.createElement("path",{d:"M32.7667 27.5223V52.5714H27.5424V32.4699H27.404L21.6607 36.0681V31.4665L27.8538 27.5223H32.7667ZM47.7132 27.1764C52.9029 27.211 57.8158 30.2902 57.8158 39.3895C57.8504 47.9007 53.8025 52.9174 47.5056 52.9174C42.4542 52.9174 39.029 49.769 38.51 45.5134H43.6306C44.0458 47.3471 45.4989 48.4543 47.5056 48.4543C50.9308 48.4543 52.7299 45.4096 52.7299 40.3929H52.5223C51.346 42.6072 48.8895 43.9219 46.0871 43.9219C41.5893 43.9219 38.2679 40.5313 38.2333 35.8605C38.2333 30.8092 42.0391 27.1418 47.7132 27.1764ZM47.7478 31.2589C45.1875 31.2589 43.2846 33.231 43.3192 35.7221C43.3192 38.1786 45.1529 40.1161 47.7132 40.1161C50.2388 40.1161 52.2109 38.1094 52.2109 35.6875C52.1763 33.3002 50.308 31.2589 47.7478 31.2589Z",fill:"black"})),ci=({accountNo:e,banner:n,isTextAnimation:o="none",bannerStyle:i,descriptionStyle:a,dateStyle:l,isAdultBanner:d,onAdultClick:u})=>{var A;const c=(A=n.description)==null?void 0:A.replace(/\n/g,"
"),m=(v,w)=>{d&&(v.preventDefault(),u==null||u(w))},{data:x}=we(),E=(x==null?void 0:x.adultCertificated)||!1,S=x!=null&&x.adultCertificatedYmdt?Y(x.adultCertificatedYmdt):null,f=Y().subtract(3,"month"),C=d&&(E===!1||!S||S.isBefore(f));return t.jsxs(wn.StyledLink,{to:n.landingUrl,target:jo(n.browerTargetType),onClick:v=>m(v,n),style:i,children:[t.jsx(yt,{src:n.imageUrl,alt:n.name,isPlaceHolder:!0,style:{objectFit:"cover"}}),n.description&&t.jsx(wn.DescriptionText,{$isAnimation:o,style:{...a,color:n.descriptionColor},dangerouslySetInnerHTML:{__html:c}}),n.displayPeriodType==="PERIOD"&&t.jsxs(wn.DateText,{$isAnimation:o,style:l,children:[Y(n.displayStartYmdt).format("MM.DD")," -"," ",Y(n.displayEndYmdt).format("MM.DD")]}),d&&C&&t.jsx(wn.AdultDimmed,{$isBig:e===0,children:t.jsx(ai,{})})]})},fl=r.section` width: 100%; height: 100%; `,li=r(_e)` width: 100%; height: 100%; border-radius: 12px; `,yl=r.div` position: absolute; right: 16px; bottom: 16px; z-index: 10; display: flex; align-items: center; gap: 5px; padding: 5px 10px 4px; background: rgba(255, 255, 255, 0.15); border-radius: 100px; font-size: 1.2rem; color: var(--color-white); .main-swiper-pagination { line-height: 1.5; } `,El=r(W)` display: flex; align-items: center; `;li.displayName="SwiperWrapper";const eo={Container:fl,CustomBannerSwiper:li,CustomPagination:yl,PlusIcon:El},Cl=e=>s.createElement("svg",{width:10,height:10,viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.88867 1V8.77778",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.77778 4.88892H1",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})),Io=({bannerList:e,accountNo:n,isTextAnimation:o,bannerSwiperStyle:i,bannerStyle:a,descriptionStyle:l,dateStyle:d})=>{const u=Ce(),c=s.useRef(null),[m,x]=s.useState(0),E=s.useMemo(()=>({modules:[ra,kn],slidesPerView:1,spaceBetween:20,autoplay:{delay:3e3,disableOnInteraction:!1},pagination:{type:"fraction",el:".main-swiper-pagination",enabled:n===0},passiveListeners:!0,onSlideChange(y){x(y.activeIndex)}}),[n]),S=s.useMemo(()=>e.filter(y=>y.name.includes("adult")),[e]),[f,C]=s.useState(null),A=y=>{var N;C(y),(N=c.current)==null||N.autoplay.stop()},v=()=>{var y;C(null),(y=c.current)==null||y.autoplay.start()},{data:w}=we(),g=(w==null?void 0:w.adultCertificated)||!1,b=w!=null&&w.adultCertificatedYmdt?Y(w.adultCertificatedYmdt):null,P=Y().subtract(3,"month"),L=!g||!b||b.isBefore(P),O=y=>{L?A(y):u(y.landingUrl)};return t.jsxs(t.Fragment,{children:[t.jsxs(eo.CustomBannerSwiper,{...E,onSwiper:y=>c.current=y,style:i,children:[e.map((y,N)=>{const I=S.some(D=>D.bannerNo===y.bannerNo);return t.jsx(Le,{children:t.jsx(ci,{accountNo:n,banner:y,isTextAnimation:o?N===m:"none",bannerStyle:a,descriptionStyle:l,dateStyle:d,isAdultBanner:I,onAdultClick:()=>O(y)})},y.bannerNo)}),n===0&&t.jsxs(eo.CustomPagination,{children:[t.jsx("div",{className:"main-swiper-pagination"}),t.jsx(eo.PlusIcon,{to:p.EXHIBITIONS.LIST,children:t.jsx(Cl,{})})]})]}),t.jsx(zt,{isVisible:!!f,setIsVisible:v,redirectUrl:f==null?void 0:f.landingUrl})]})},wl=r.div` position: fixed; top: 50%; left: calc(50% + 300px + 60px); transform: translateY(-50%); display: flex; flex-direction: column; justify-content: flex-end; gap: 32px; padding: 16px; width: 260px; height: auto; min-height: 104px; max-height: ${({$isEmptyBannerList:e})=>e?"104px":"365px"}; background-color: var(--color-white); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); `,bl=r.section` flex: 1; aspect-ratio: 1/1; overflow: hidden; `,Sl=r.section` display: flex; justify-content: space-between; align-items: center; gap: 8px; `,Tl=r.div` max-width: 72px; svg { display: block; } `,vl=r.div` display: flex; flex-direction: column; gap: 6px; `,Al=r.strong` font-size: 1.6rem; ${T.bold} word-break: keep-all; line-height: 1.4; `,Pl=r.p` font-size: 1.2rem; line-height: 1.25; `,wt={Container:wl,Banner:bl,QRCode:Sl,Code:Tl,Description:vl,MainText:Al,SubText:Pl},Pt={WEB_SITE_BANNER:"013",MAIN_PAGE_BANNER:"003",MAIN_PAGE_ICON_BANNER:"004",PRODUCT_DETAIL_BANNER:"005",SEARCH_PAGE_BANNER:"006",BEST_PAGE_BANNER:"007",PRODCUT_DETAIL_COUPON_BANNER:"008",EXHIBITION_LIST_BANNER:"009",EMPLOYEE_EXHIBITION_LIST_BANNER:"010",ORDER_BANNER:"011",ORDER_COMPLETE_BANNER:"012"},jl={getBannerExtraInfos:e=>h({method:"GET",url:"/display/banners/extraInfos",params:e,paramsSerializer:{serialize:n=>Fe.stringify(n,{arrayFormat:"comma"})}}),getBanners:e=>h({method:"GET",url:`/display/banners/${e}`}),getBannersByIds:e=>h({method:"GET",url:`/display/banners/id/${e}`})},di={getCategories:e=>h({method:"GET",url:"/categories",params:{keyword:e==null?void 0:e.keyword}}),getNewProductCategories:()=>h({method:"GET",url:"/categories/new-product-categories"}),get1depthCategory:()=>h({method:"GET",url:"/categories/simple-1depth"}),getCategory:e=>h({method:"GET",url:`/categories/${e}`})};var ui=(e=>(e.DESC_DELIVERY_FEIGN_CLIENT="DESCDeliveryFeignClient",e.DESC="DESC",e.ASC="ASC",e))(ui||{}),pi=(e=>(e[e.Y=0]="Y",e[e.N=1]="N",e))(pi||{}),Il=(e=>(e.DEPOSIT_WAIT="DEPOSIT_WAIT",e.PAY_DONE="PAY_DONE",e.PRODUCT_PREPARE="PRODUCT_PREPARE",e.DELIVERY_PREPARE="DELIVERY_PREPARE",e.DELIVERY_ING="DELIVERY_ING",e.DELIVERY_DONE="DELIVERY_DONE",e.BUY_CONFIRM="BUY_CONFIRM",e.CANCEL_DONE="CANCEL_DONE",e.RETURN_DONE="RETURN_DONE",e.EXCHANGE_DONE="EXCHANGE_DONE",e.PAY_WAIT="PAY_WAIT",e.PAY_CANCEL="PAY_CANCEL",e.PAY_FAIL="PAY_FAIL",e.DELETE="DELETE",e.EXCHANGE_WAIT="EXCHANGE_WAIT",e.REFUND_DONE="REFUND_DONE",e))(Il||{}),Ll=(e=>(e.CANCEL="CANCEL",e.RETURN="RETURN",e.EXCHANGE="EXCHANGE",e))(Ll||{}),mi=(e=>(e.PRODUCT_COUNT="PRODUCT_COUNT",e.RECENT_PRODUCT="RECENT_PRODUCT",e))(mi||{}),Nl=(e=>(e.SELLER_COLLECT="SELLER_COLLECT",e.BUYER_DIRECT_RETURN="BUYER_DIRECT_RETURN",e))(Nl||{}),kl=(e=>(e.BOOK="BOOK",e.RECENT="RECENT",e.RECURRING_PAYMENT="RECURRING_PAYMENT",e))(kl||{});const hi={getCategoryProductReviews:({hasAttachmentFile:e,categoryDepth:n,categoryNo:o,productName:i,orderBy:a,orderDirection:l,brandName:d,bestReviewYn:u,myReviewYn:c=pi.N,pageNumber:m=1,pageSize:x=20,hasTotalCount:E=!1})=>h({method:"GET",url:"/category/product-reviews",params:{hasAttachmentFile:e,categoryDepth:n,categoryNo:o,productName:i,order:{by:a,direction:l},brandName:d,bestReviewYn:u,myReviewYn:c,pageNumber:m,pageSize:x,hasTotalCount:E}}),getReviewBoardConfig:()=>h({method:"GET",url:"/product-reviews/configurations"}),getPhotoReviewList:(e,n)=>h({method:"GET",url:`/products/${e}/photo-reviews`,params:n}),getProductReviewList:(e,n)=>h({method:"GET",url:`/products/${e}/product-reviews`,params:n,paramsSerializer:{serialize:o=>Fe.stringify(o,{arrayFormat:"repeat",allowDots:!0})}}),registerProductReview:(e,n)=>h({method:"POST",url:`/products/${e}/product-reviews`,data:n}),getReviewableOptions:(e,n)=>h({method:"GET",url:`/products/${e}/reviewable-options`,params:n}),getProductReview:(e,n)=>h({method:"GET",url:`/products/${e}/product-reviews/${n}`}),updateProductReview:(e,n,o)=>h({method:"PUT",url:`/products/${e}/product-reviews/${n}`,data:o}),deleteProductReview:(e,n)=>h({method:"DELETE",url:`/products/${e}/product-reviews/${n}`}),getProductReviewComments:(e,n,o)=>h({method:"GET",url:`/products/${e}/product-reviews/${n}/comments`,params:o}),recommendProductReview:(e,n)=>h({method:"POST",url:`/products/${e}/product-reviews/${n}/recommend`}),cancelProductReviewRecommend:(e,n)=>h({method:"DELETE",url:`/products/${e}/product-reviews/${n}/recommend`}),reportProductReview:(e,n,{reportReasonCd:o,content:i})=>h({method:"POST",url:`/products/${e}/product-reviews/${n}/report`,data:{reviewNo:n,reportReasonCd:o,content:i}}),getMyProductReviews:e=>h({method:"GET",url:"/profile/product-reviews",params:e}),getReviewableProducts:e=>h({method:"GET",url:"/profile/order-options/product-reviewable",params:e}),getReviewBoardList:e=>h({method:"GET",url:"/reviews/boards",params:e}),getReviewedProducts:e=>h({method:"GET",url:"/reviews/boards/reviewed-products",params:e})},mn={getEvents:e=>h({method:"GET",url:"/display/events",params:e}),getEventsV2:e=>h({method:"GET",url:"/display/events/",params:e,paramsSerializer:{serialize:n=>Fe.stringify(n,{arrayFormat:"repeat",allowDots:!0})},headers:{version:"2.0"}}),getClosedEvents:e=>h({method:"GET",url:"/display/events/close",params:e}),getEventsByProducts:e=>h({method:"GET",url:"/display/events/products",params:e}),searchEventsByName:e=>h({method:"GET",url:"/display/events/search-by-name",params:e}),searchEventsByNos:e=>h({method:"GET",url:"/display/events/search-by-nos",params:e}),searchEventsByProgress:e=>h({method:"GET",url:"/display/events/search-by-name",params:e}),getEvent:(e,n)=>{const o=new Date().getTime();return h({method:"GET",url:`/display/events/${e}`,params:{...n,timestamp:o}})},getEventById:(e,n)=>h({method:"GET",url:`/display/events/ids/${e}`,params:n}),getEventsByProduct:e=>h({method:"GET",url:`/display/events/products/${e}`})},Rl={getDesignPopups:({displayUrl:e,parameter:n,popupId:o})=>h({method:"POST",url:"/design-popups",data:{displayUrl:e,parameter:n,popupId:o}}),getAllPopups:(e,n)=>h({method:"GET",url:"/display/popups",params:e,headers:{platform:n}}),getPopups:(e,n)=>h({method:"GET",url:`/display/popups/${e}`,params:n})},_t={getAllProductInquiries:e=>h({method:"GET",url:"/products/inquiries",params:e}),getProductInquiriesConfig:()=>h({method:"GET",url:"/products/inquiries/configurations"}),updateProductInquiry:(e,n)=>h({method:"PUT",url:`/products/inquiries/${e}`,data:n}),deleteProductInquiry:e=>h({method:"DELETE",url:`/products/inquiries/${e}`}),getProductInquiries:(e,n)=>h({method:"GET",url:`/products/${e}/inquiries`,params:n}),writeProductInquiry:(e,n)=>h({method:"POST",url:`/products/${e}/inquiries`,data:n}),reportProductInquiry:(e,n)=>h({method:"POST",url:`/products/${e}/inquiries/report`,data:n}),getProductInquiry:(e,n)=>h({method:"GET",url:`/products/${e}/inquiries/${n}`}),getMyProductInquiries:e=>h({method:"GET",url:"/profile/product-inquiries",params:e}),getMyProductInquiriesCount:e=>h({method:"GET",url:"/profile/product-inquiries/count",params:e})},$l={getProductSections:()=>h({method:"GET",url:"/display/sections"}),getProductSection:(e,n)=>h({method:"GET",url:`display/sections/${e}`,params:n,headers:{version:"1.1"}}),getDisplaySection:(e,n)=>h({method:"GET",url:`/display/sections/ids/${e}`,params:n})},jt=({banners:e,memberNo:n=0,options:o})=>fo({queryKey:jn.list(e,n),queryFn:async()=>{const{data:i}=await jl.getBanners(e);return i},staleTime:1e3*60*60,gcTime:1e3*60*60,...o}),Ol=()=>{const{data:e}=jt({banners:[Pt.WEB_SITE_BANNER]}),n=s.useMemo(()=>{if(!e||!e[0])return[];try{return e[0].accounts[0].banners}catch{return[]}},[e]),o=X(n);return!o&&t.jsxs(wt.Container,{$isEmptyBannerList:o,children:[t.jsx(wt.Banner,{children:t.jsx(Io,{bannerList:n,isTextAnimation:!0,bannerSwiperStyle:{borderRadius:"6px"},bannerStyle:{borderRadius:"6px"},descriptionStyle:{top:"20px",transform:"translateX(-5.5%)",width:"100%",fontSize:"1.8rem",lineHeight:"140%",letterSpacing:"0px",textAlign:"center"},dateStyle:{top:"72px",bottom:"auto",transform:"translateX(-5.5%)",width:"100%",fontSize:"1.2rem",letterSpacing:"0px",textAlign:"center",color:"#000"}})}),t.jsxs(wt.QRCode,{children:[t.jsx(wt.Code,{children:t.jsx(oa,{value:"https://napi.happypointcard.com/page/main/index.spc",size:72,level:"L",minVersion:1})}),t.jsxs(wt.Description,{children:[t.jsx(wt.MainText,{children:"해피포인트 앱 설치하고 할인소식 받아보세요!"}),t.jsx(wt.SubText,{children:"QR스캔하고 앱 연결하기"})]})]})]})},_l=r.div` position: sticky; bottom: 78px; display: flex; flex-direction: column; align-items: center; justify-content: end; gap: 8px; z-index: 10; transition: 0.3s; opacity: ${({$isScroll:e})=>e?0:1}; visibility: ${({$isScroll:e})=>e?"hidden":"visible"}; `,Ml=r.button` position: absolute; right: 20px; border-radius: 50px; height: 44px; box-shadow: 0px 2px 4px 0px #0000001a; `,ar={FloatingBarContainer:_l,FloatingBarButton:Ml},Bl=e=>{const[n,o]=s.useState(!0);return s.useEffect(()=>{const i=()=>{o(window.scrollY<=e)};return window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",i)}},[e]),{isScrollTop:n}},Dl=e=>s.createElement("svg",{width:44,height:44,viewBox:"0 0 44 44",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:22,cy:22,r:21.5,fill:"white",stroke:"#C2C3C8"}),s.createElement("g",{clipPath:"url(#clip0_8807_39304)"},s.createElement("path",{d:"M22 29L22 15",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16 21L22 15L28 21",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),s.createElement("defs",null,s.createElement("clipPath",{id:"clip0_8807_39304"},s.createElement("rect",{width:24,height:24,fill:"white",transform:"translate(10 34) rotate(-90)"})))),Hl=()=>{const{isScrollTop:e}=Bl(200),n=()=>{window.scrollTo({top:0,behavior:"smooth"})};return t.jsx(ar.FloatingBarContainer,{$isScroll:e,children:t.jsx(ar.FloatingBarButton,{onClick:n,children:t.jsx(Dl,{})})})},Ul=r.div` display: flex; justify-content: center; background-color: #f9f9f9; `,Fl=r.div` width: 100%; /* max-width: ${gt.SM}px; */ max-width: 600px; /* margin-left: auto; margin-right: auto; */ min-height: calc(var(--vh, 1vh) * 100); ${wo()}; background-color: #fff; position: relative; `,Gl=r(Je.main)` display: flex; flex-direction: column; background-color: #f2f3f5; overflow-x: hidden; min-height: calc( calc(var(--vh, 1vh) * 100) - calc(var(--footer-bottom) + var(--floating-button)) ); margin-bottom: ${({$isFullScreen:e})=>e?0:"48px"}; `,zl=r.div` height: var(--header-top); background: #fff; `,Vl=r.div` flex: 1; background: #fff; `,Yl=r.div` position: sticky; bottom: 0; left: 0; width: 100%; z-index: 11; `,tn={ContainerWrapper:Ul,Container:Fl,StyledMotionContainer:Gl,HeaderEmptyContainer:zl,EmptyContainer:Vl,FloatingContainer:Yl},ql=r.div` width: 100vw; `,Wl=r.div` position: fixed; top: 0; left: 0; background-color: #000000; opacity: 0.6; width: 100vw; height: 100vh; z-index: 1001; animation: fadeIn 0.3s ease-in-out; @keyframes fadeIn { from { opacity: 0; } to { opacity: 0.6; } } `,Kl=r.div` position: fixed; top: 0; left: 0; z-index: 1002; width: 100vw; height: 100vh; animation: up 0.3s ease-in-out; @keyframes up { from { transform: translateY(100%); } to { transform: translateY(0%); } } `,Ql=r.div` position: fixed; z-index: 1003; width: ${e=>`${e.$screenWidth}${e.$screenWidthUnit}`}; top: ${e=>`${e.$screenTopPosition}${e.$screenTopUnit}`}; left: ${e=>`${e.$screenLeftPosition}${e.$screenLeftUnit}`}; height: ${e=>e.$screenHeightUnit==="px"?`${(e.$screenHeight??0)+72}px`:`calc(${e.$screenHeight??0}${e.$screenHeightUnit} + 72px)`}; transform: ${e=>{const{$screenTopUnit:n,$screenLeftUnit:o,$screenTopPosition:i,$screenLeftPosition:a}=e;if(i&&a&&i>=50&&a>=50)return n==="%"&&o==="%"?"translate(-50%, -50%)":n==="%"?"translate(0, -50%)":o==="%"?"translate(-50%, 0%)":""}}; display: flex; flex-direction: column; `,Zl=r(_e)` width: 100%; height: 100%; overflow-x: hidden; border-radius: 12px 12px 0 0; .swiper-pagination { position: initial; display: flex; justify-content: center; gap: 8px; z-index: 3000; width: 100%; margin-top: 16px; } .swiper-pagination-bullet { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); } .swiper-pagination-bullet-active { width: 16px; border-radius: 100px; background: #ffffff; } `,Xl=r.div` position: absolute; bottom: 0; left: 0; right: 0; z-index: 100; `,Jl=r.div` display: flex; justify-content: space-between; align-items: center; width: 100%; height: 56px; padding: 0 20px; border-radius: 0 0 12px 12px; background-color: #fff; button { display: flex; align-items: flex-start; gap: 4px; font-size: 15px; } `,bt={Container:ql,Dimmed:Wl,PopupListContainer:Kl,SwiperContainer:Ql,CustomSwiper:Zl,FooterContainer:Xl,Footer:Jl},ed=r.div``,td=r.div` display: flex; flex-direction: column; overflow: auto; position: relative; background-color: ${e=>e.$bgColor}; `,nd=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); cursor: pointer; /* backdrop-filter: blur(5px); color: var(--color-white); */ svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: ${({$isBig:e})=>e?"initial":"48px"}; height: ${({$isBig:e})=>e?"initial":"48px"}; } `,od=r.div` width: 100%; height: 100%; ${e=>e.$maxHeightAvailable&&re` max-height: ${e.$screenHeightUnit==="px"?`${e.$screenHeight}${e.$screenHeightUnit}`:`${e.$screenHeight}vh`}; `} overflow-y: auto; ${e=>e.$isResizable&&{...bo}} a, p { font-size: 0; height: fit-content; line-height: ${e=>e.$isResizable?"0.9":"normal"}; } img { display: block; width: 100% !important; object-fit: cover; } `,bn={Container:ed,Body:td,AdultDimmed:nd,ContentsContainer:od},rd=({popupData:e})=>{const n=e.detailInfo,o=n.screenHeightUnit==="PIXEL"?"px":"%",[i,a]=s.useState(null),l=s.useRef(null);s.useEffect(()=>{if(!l.current)return;const v=l.current.querySelector("p"),w=l.current.querySelector("img");w&&(w.complete?a((v==null?void 0:v.clientHeight)??0):w.onload=()=>{a((v==null?void 0:v.clientHeight)??0)})},[e.content]);const d=({screenHeight:v,screenHeightUnit:w})=>w==="%"?window.innerHeight*v/100:v,u=e.title.includes("adult"),[c,m]=s.useState(""),{data:x}=we(),E=(x==null?void 0:x.adultCertificated)||!1,S=x!=null&&x.adultCertificatedYmdt?Y(x.adultCertificatedYmdt):null,f=Y().subtract(3,"month"),C=u&&(E===!1||!S||S.isBefore(f)),A=()=>{m("")};return t.jsxs(bn.Container,{children:[t.jsxs(bn.Body,{$bgColor:n.bgColor,children:[t.jsx(bn.ContentsContainer,{ref:l,$maxHeightAvailable:(i??0)>d({screenHeight:n.screenHeight,screenHeightUnit:o}),$isResizable:n.resizable,$screenHeight:n.screenHeight,$screenHeightUnit:o,dangerouslySetInnerHTML:{__html:e.content}}),u&&C&&t.jsx(bn.AdultDimmed,{onClick:()=>{if(!l.current)return;const v=l.current.querySelector("a");if(v){const w=v.getAttribute("href");w&&m(w)}},children:t.jsx(ai,{})})]}),t.jsx(zt,{isVisible:!!c,setIsVisible:A,redirectUrl:c})]})},id=s.memo(rd),sd=({params:e,platform:n,options:o})=>se({queryKey:mo.list(n,e),queryFn:async()=>{const{data:i}=await Rl.getAllPopups(e,n);return i},...o}),ad=e=>s.createElement("svg",{width:18,height:19,viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M3 9.50009L6.71231 13.2124L14.6673 5.25745",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),cd=e=>s.createElement("svg",{width:18,height:19,viewBox:"0 0 18 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.5 5L13.5 14M4.5 14L13.5 5",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),ld=()=>{const e=yo("(max-width: 600px)"),{pathname:n}=Ge(),{productNo:o,categoryNo:i,eventNo:a}=Gt(),l=s.useMemo(()=>e?at()==="PC"?"MOBILE_WEB":at():"PC",[e]),d=s.useMemo(()=>{if(ie(p.MAIN,n))return"MAIN";if(ie(p.PRODUCT.DETAIL,n))return"PRODUCT";if(ie(p.PRODUCT.LIST,n))return"CATEGORY";if(ie(p.EXHIBITIONS.DETAIL,n))return"EVENT"},[n]),u=s.useMemo(()=>{if(d==="PRODUCT")return Number(o);if(d==="CATEGORY")return Number(i);if(d==="EVENT")return Number(a)},[d,i,o,a]),[c,m]=br("POPUP_EXPIRE_DATE",[]);s.useEffect(()=>{m(g=>X(g)?[]:U(g,Qe(b=>b.type!=="CLOSE"),ae))},[]);const x=s.useCallback(g=>{var L,O;const b=(L=so(y=>y.popupNo===g,c))==null?void 0:L.time,P=(O=so(y=>y.popupNo===g,c))==null?void 0:O.type;return P==="CLOSE"?!1:P==="DAY"?Y(b).add(1,"day").set("hour",0).set("minute",0).set("second",0)U(g||[],Qe(b=>x(b.popupNo)),Ds(b=>b.detailInfo.screenType==="WINDOW"?"WINDOW":"NOT_WINDOW")),enabled:!!d}}),S=s.useMemo(()=>(E==null?void 0:E.NOT_WINDOW)??[],[E==null?void 0:E.NOT_WINDOW]),f=s.useMemo(()=>{const g=new Map;return S.forEach(b=>{var L;const P=b.popupId.split("-")[0];P&&(g.has(P)||g.set(P,[]),(L=g.get(P))==null||L.push(b))}),Array.from(g.entries()).map(([b,P])=>({prefix:b,items:P}))},[S]),C=(g,b,P)=>{const L=Y().format("YYYY-MM-DDTHH:mm:ss");if(!g)return[{popupNo:b,type:P,time:L}];const O=g.findIndex(y=>y.popupNo===b);return O>=0?g.map((y,N)=>N===O?{...y,type:P,time:L}:y):[...g,{popupNo:b,type:P,time:L}]},A=s.useCallback((g,b)=>{m(P=>C(P,g,b))},[]),v=s.useCallback((g,b)=>{g.forEach(P=>{A(P.popupNo,b)})},[A]),w=s.useCallback(g=>({modules:[kn],slidesPerView:1,slidesPerGroup:1,loop:!0,pagination:{el:".swiper-pagination",clickable:!0,enabled:g>1}}),[]);return Ns({autoLock:!X(S)}),!X(S)&&t.jsxs(bt.Container,{children:[t.jsx(bt.Dimmed,{}),t.jsx(bt.PopupListContainer,{onClick:()=>v(S,"CLOSE"),children:f.map(({prefix:g,items:b})=>{const P=b[0];return t.jsx(bt.SwiperContainer,{onClick:L=>L.stopPropagation(),$screenType:P.detailInfo.screenType,$screenTopPosition:P.detailInfo.screenTopPosition,$screenLeftPosition:P.detailInfo.screenLeftPosition,$screenTopUnit:P.detailInfo.screenTopUnit==="PIXEL"?"px":"%",$screenLeftUnit:P.detailInfo.screenLeftUnit==="PIXEL"?"px":"%",$screenWidth:P.detailInfo.screenWidth,$screenHeight:P.detailInfo.screenHeight,$screenWidthUnit:P.detailInfo.screenWidthUnit==="PIXEL"?"px":"%",$screenHeightUnit:P.detailInfo.screenHeightUnit==="PIXEL"?"px":"%",children:t.jsxs(bt.CustomSwiper,{...w(b.length),children:[b.map(L=>t.jsx(Le,{children:t.jsx(id,{popupData:L})},L.popupNo)),t.jsxs(bt.FooterContainer,{children:[t.jsxs(bt.Footer,{children:[b.some(L=>L.visibleToday)&&t.jsxs("button",{onClick:()=>v(b,"DAY"),children:[t.jsx(ad,{}),"오늘 하루 보지 않기"]}),t.jsxs("button",{onClick:()=>v(b,"CLOSE"),children:[t.jsx(cd,{}),"닫기"]})]}),t.jsx("div",{className:"swiper-pagination"})]})]})},g)})})]})},dd=s.memo(ld),ud=()=>{const{isLogin:e}=Pe(),{data:n}=we(),o=!0,i=ks("https://rl3flznkr.toastcdn.net/shopby-statistics-recorder.js",{shouldPreventLoad:!o});s.useEffect(()=>{i==="ready"&&typeof window.shopbyStatistics=="function"&&window.shopbyStatistics({clientId:"X+Ai2NGAWJyC/wapyz1xag==",memberNo:e?n==null?void 0:n.memberNo:""})},[o,e,n==null?void 0:n.memberNo,i])},pd=()=>{const e=Ge();s.useLayoutEffect(()=>{document.documentElement.scrollTo(0,0)},[e.pathname])},md=()=>{const e=yo("(min-width: 1024px)"),{pathname:n}=Ge(),{height:o}=Rs();ud(),pd(),s.useEffect(()=>{const w=o*.01;return document.documentElement.style.setProperty("--vh",`${w}px`),()=>{document.documentElement.style.removeProperty("--vh")}},[o]);const i=Ge(),{appLogin:a}=Pe(),l=ei(),d=Ht(),u=Ce(),{state:c,search:m}=Ge();s.useEffect(()=>{const w=()=>{if(n===p.ORDER.ORDER_COMPLETE){const{to:g,options:b}=Kc(new URLSearchParams(m));u(g,{...b,replace:!0})}else n===p.MY_PAGE.ORDERS.LIST&&(c==null?void 0:c.from)===p.ORDER.ORDER_COMPLETE?u(p.MAIN,{replace:!0}):u(-1)};window.pageback=w},[n,c,m,u]),s.useEffect(()=>{if(!K){l(Xn(!0));return}(async()=>{try{await a(),l(Xn(!0)),d.invalidateQueries({queryKey:He.getProfile()})}catch(g){console.error("앱 초기화 실패",g),l(Xn(!0))}})()},[]);const E=new et().get("wHmAut"),S=ee.getAccessToken();s.useEffect(()=>{var w;E||S!=null&&S.wHmAut&&zr("wHmAut",S.wHmAut,((w=ee.getAccessToken())==null?void 0:w.expiry)||0)},[E,S]),s.useEffect(()=>{var w;(w=window.ShopbyExternalScript)==null||w.initialize({apiOption:{clientId:"X+Ai2NGAWJyC/wapyz1xag==",profile:"real",platform:at()}})},[]),s.useEffect(()=>{var g;const w=xc(i);return(g=window.ShopbyExternalScript)==null||g.setPageScriptType(w),()=>{var b;(b=window.ShopbyExternalScript)==null||b.clearGlobalObjectSb()}},[i]);const f=Or(),{data:C}=we();s.useEffect(()=>{var w;f&&!C||(w=window.ShopbyExternalScript)==null||w.setGlobalObjectSb({profile:C||null,getPlatform:at})},[C,i,f]),s.useEffect(()=>{function w(g){var b;((b=g.data)==null?void 0:b.type)==="NICE_AUTH_FAIL"&&(alert(g.data.message),window.location.href="/")}return window.addEventListener("message",w),()=>{window.removeEventListener("message",w)}},[]);const A=i.pathname===p.MAIN,v=Wc(n,m);return t.jsxs(tn.ContainerWrapper,{children:[t.jsxs(tn.Container,{children:[t.jsx(de,{errorFallback:()=>t.jsx(t.Fragment,{}),children:t.jsx(dd,{})}),t.jsx(ll,{}),t.jsxs(tn.StyledMotionContainer,{className:"main-layout",$isFullScreen:v,animate:{opacity:[0,1]},transition:{type:"tween"},exit:{opacity:[1,0]},children:[t.jsx(Eo,{mode:"wait"}),t.jsx(dl,{},i.pathname),t.jsx(tn.EmptyContainer,{})]},n),t.jsx(tn.FloatingContainer,{id:"floatingButton"}),!v&&t.jsx(Sc,{}),t.jsx(Hl,{})]}),e&&A&&t.jsx(de,{errorFallback:()=>t.jsx(t.Fragment,{}),children:t.jsx(Ol,{})})]})},xi={color:{main:"#FF5F00",sub:"#0D0F71",black:"#000",white:"#FFFFFF",textPrimary:"#3A3A3F",textSecondary:"#1E1E22",textDarkGray:"#59595F",textGray:"#84858A",textLightGray:"#C2C3C8",highLight:"#FF5F00"}},hd={color:{main:"#FF5F00",sub:"#0D0F71",black:"#000",white:"#FFFFFF",textPrimary:"#3A3A3F",textSecondary:"#1E1E22",textDarkGray:"#59595F",textGray:"#84858A",textLightGray:"#C2C3C8",highLight:"#FF5F00"}},it={color:xi.color},xd=r.div` width: 100%; height: 48px; position: relative; > button { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); animation: ${pn} 0.2s ease-in-out; line-height: 0; } `,gd=r.input` width: 100%; height: 100%; border-radius: 8px; border: 1px solid #e9eaef; transition: border 0.2s ease-in-out; padding: 0 46px 0 16px; &:focus { border: 1px solid #000; } &::placeholder { color: #b3b4b9; font-size: 1.5rem; } `,fd=r.div` display: flex; flex-direction: column; gap: 8px; `,yd=r.div` display: ${({$gridRatio:e})=>X(e)?"flex":"grid"}; flex-direction: ${({$isFlex:e})=>e?"row":"column"}; gap: 8px; width: 100%; grid-template-columns: ${({$gridRatio:e})=>X(e)?"none":`${e==null?void 0:e.join("fr ")}fr`}; `,Ed=r.input` width: 100%; height: 42px; padding: 10px 16px; border-radius: 6px; background: ${it.white}; border: 1px solid ${it.textLightGray}; font-size: 1.4rem; &::placeholder { color: ${it.darkGray}; } &:read-only { background-color: ${it.lightGray}; pointer-events: none; } &:disabled { background-color: ${it.lightGray}; pointer-events: none; cursor: not-allowed; } `,Cd=r.textarea` width: 100%; padding: 12px 16px; border-radius: 6px; background: ${it.white}; border: 1px solid ${it.textLightGray}; resize: none; font-size: 1.4rem; &::placeholder { color: ${it.textDarkGray}; } &:read-only { background-color: ${it.textLightGray}; pointer-events: none; } &:focus { outline: none; } `,cr={InputWrapper:xd,Input:gd,Container:fd,FieldContainer:yd,Field:Ed,TextArea:Cd},wd=e=>s.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:9,cy:9,r:9,fill:"#D9D9D9"}),s.createElement("path",{d:"M12 6L6 12M12 12L6 6.00001",stroke:"white",strokeWidth:1.5,strokeLinecap:"round"})),lr=({register:e,setValue:n,onReset:o,wrapperStyle:i,...a})=>{const[l,d]=s.useState(!1),[u,c]=s.useState(!1),m=()=>{if(n&&(e!=null&&e.name)){n(e.name,""),c(!1);return}if(o){o(),c(!1);return}};return t.jsxs(cr.InputWrapper,{style:i,children:[t.jsx(cr.Input,{...e,...a,onFocus:()=>d(!0),onBlur:()=>d(!1),onChange:x=>{const{onChange:E}=a,S=e==null?void 0:e.onChange;if(S){S(x),c(x.target.value.length>0);return}if(E){E(x),c(x.target.value.length>0);return}}}),(n||o)&&l&&u&&t.jsx("button",{type:"button",tabIndex:-1,onMouseDown:x=>x.preventDefault(),onClick:m,children:t.jsx(wd,{})})]})},gi=r.button` width: 100%; height: 52px; background: #0d0f71; color: var(--color-white); border: 0; border-radius: 8px; font-size: 1.6rem; ${T.medium} transition: all 0.2s ease-in-out; &:disabled { background: ${({$isLoading:e})=>e?"#0d0f71":"#e9eaef"}; color: ${({$isLoading:e})=>e?"var(--color-white)":"#b3b4b9"}; opacity: ${({$isLoading:e})=>e?"0.8":"1"}; cursor: not-allowed; } `,bd=r(gi)` background: var(--color-white); color: #0d0f71; border: 1px solid #0d0f71; &:disabled { background: var(--color-white); color: ${({$isLoading:e})=>e?"#0d0f71":"#b3b4b9"}; opacity: ${({$isLoading:e})=>e?"0.5":"1"}; border: ${({$isLoading:e})=>e?"1px solid #0d0f71":"1px solid #e9eaef"}; } `,dr={Button:gi,OutLineButton:bd},fi=({isOutLine:e,isLoadingDisabled:n,children:o,...i})=>e?t.jsx(dr.OutLineButton,{...i,disabled:i.disabled||!!n,$isLoading:!!n,children:o}):t.jsx(dr.Button,{...i,disabled:i.disabled||!!n,$isLoading:!!n,children:o}),Sd=e=>n=>{const o=Or(),{state:i}=Ge(),a=Ce();return s.useEffect(()=>{if(o){a(p.MAIN);return}},[o,a]),!o||i!=null&&i.isRegisterCompleted?t.jsx(e,{...n}):t.jsx(Zs,{to:{pathname:p.MAIN}})},Td=s.forwardRef((e,n)=>{const o=s.useRef(null),i=l=>{e.state.token!=""&&e.state.token!=null||e.dispatch({...e.state,token:l,isLoading:!1})};s.useImperativeHandle(n,()=>({handleReset:a}));const a=()=>{var l;(l=o.current)==null||l.reset()};return t.jsx("div",{children:t.jsx(aa,{style:{textAlign:"center"},ref:o,siteKey:"0x4AAAAAAAzuykZtN5K12w6l",onSuccess:i,onExpire:a})})}),yi=s.memo(Td,(e,n)=>e.state.token===n.state.token&&e.state.isLoading===n.state.isLoading);yi.displayName="MemoizedTurnstileComponent";const vd=r.section` padding: 24px 20px 165px; display: flex; flex-direction: column; gap: 60px; background: #fff; `,Ad=r.div` display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; `,Pd=r.div` display: flex; justify-content: center; gap: 17px; > a { font-size: 1.4rem; color: var(--color-textPrimary); ${T.medium}; position: relative; &:not(&:last-child) { &:after { content: ''; display: block; position: absolute; right: -8px; top: 50%; transform: translateY(-50%); width: 1px; height: 65%; background: #e9eaef; } } } `,jd=r.p` color: #ff5f00; font-size: 1.2rem; margin-left: 5px; `,Id=r.p` font-size: 1.4rem; color: var(--color-textPrimary); `,Ld=r(W)` ${z}; width: 100%; border: 1px solid #0d0f71; border-radius: 8px; padding: 15.5px 0; font-size: 1.6rem; ${T.medium}; color: #0d0f71; `,Nd=r.form` display: flex; flex-direction: column; gap: 20px; h3 { text-align: center; font-size: 1.6rem; ${T.bold}; color: var(--color-textPrimary); } `,kd=r(fi)` border: 1px solid #0d0f71; border-end-end-radius: 8px; `,nn={Container:vd,InputContainer:Ad,LinkContainer:Pd,ErrorText:jd,LabelText:Id,GuestOrderLink:Ld,GuestLoginForm:Nd,GuestLoginButton:kd},Rd=[{title:"아이디 찾기",url:sn.FIND_ID},{title:"비밀번호 찾기",url:sn.CHANGE_PASSWORD},{title:"회원가입",url:sn.JOIN}],$d=Sd(()=>{const{register:e,handleSubmit:n,setValue:o,watch:i,formState:{errors:a}}=Pr(),l=i("memberId")&&i("password"),{login:d}=Pe(),[u]=Tt(),c=decodeURIComponent(u.get("returnUrl")||""),m=Ce(),[x,E]=s.useState(!1),[S,f]=s.useState({isLoading:!0,token:""}),C=s.useCallback(w=>{f(w)},[]),A=s.useRef(null),v=n(async({memberId:w,password:g})=>{try{E(!0);const{data:b}=await d({id:w,pwd:g,turnstileToken:S.token});b.success&&(E(!1),m(c||p.MAIN))}catch(b){b==="8008"&&A.current&&A.current.handleReset(),E(!1),console.error(b)}});return t.jsxs(nn.Container,{children:[t.jsxs("div",{children:[t.jsxs("form",{onSubmit:v,children:[t.jsxs(nn.InputContainer,{children:[t.jsx(lr,{placeholder:"아이디",register:e("memberId",{required:"아이디를 입력해주세요."}),setValue:o}),t.jsx(rn,{errors:a,name:"memberId",render:({message:w})=>t.jsx(nn.ErrorText,{children:w})}),t.jsx(lr,{placeholder:"비밀번호를 입력해주세요.",type:"password",register:e("password",{required:"비밀번호를 입력해주세요."}),setValue:o}),t.jsx(rn,{errors:a,name:"password",render:({message:w})=>t.jsx(nn.ErrorText,{children:w})})]}),t.jsx(fi,{type:"submit",style:{marginTop:"22px",marginBottom:"16px"},isLoadingDisabled:x&&!S.isLoading,disabled:!l,children:"로그인"})]}),t.jsx(nn.LinkContainer,{children:Rd.map(w=>t.jsx(W,{to:w.url,target:"_blank",children:w.title},w.title))})]}),t.jsx(yi,{state:S,dispatch:C,ref:A})]})}),Od=r.div` box-sizing: border-box; width: 40px; height: 40px; border: 4px solid var(--color-textLightGray); border-top-color: #0d0f71; border-radius: 50%; animation: ${Vr} 1s linear infinite; `,_d={Spinner:Od},Lo=()=>t.jsx(_d.Spinner,{}),Md=r.div` margin-top: ${e=>e.$isList?"0":"2px"}; > p { display: ${e=>e.$isList?"inline-block":"block"}; margin-right: ${e=>e.$isList?"5px":"0"}; line-height: 1.3; } `,Bd=r.div` display: flex; align-items: center; gap: 2px; flex-wrap: wrap; p, span { line-height: 1.2; } > div { flex: 1; display: flex; align-items: center; gap: 2px; } `,Dd=r.p` font-size: 1.2rem; ${T.medium} color: var(--color-highlight); `,Hd=r.p` font-size: 1.2rem; ${T.medium} color: var(--color-highlight); `,Ud=r.p` font-size: 1.2rem; text-decoration: line-through; ${({$isWish:e})=>e&&re` ${T.medium} `} color: var(--color-textLightGray); `,Fd=r.div` /* display: flex; align-items: center; gap: ${({$isOverMillion:e,$isWish:n})=>e?"3px":n?"4px":"5px"}; */ font-size: ${({$isOverMillion:e,$isSmallCard:n})=>e?"1.3rem":n?"1.4rem":"1.5rem"}; ${T.bold} line-height: ${({$isSmallCard:e})=>e?"1.2":"1.3"}; ${({$isWish:e})=>e&&re` display: flex; align-items: center; gap: 4px; & > span:first-child { ${T.medium}; color: var(--color-highlight); } `} `,Gd=r.span` font-size: 1.2rem; ${T.medium}/* color: var(--color-highlight); */ `,zd=r.span` vertical-align: middle; ${({$isExecutive:e})=>e&&re` text-decoration: line-through; `} `,V={PriceBox:Md,PriceText:Bd,CouponText:Dd,ExecutivesText:Hd,OriginPrice:Ud,Price:Fd,DiscountRate:Gd,ProductPrice:zd},Vd=new Set([128823260]),Yd=new Set([]),Ei=e=>Vd.has(e),Ci=e=>Yd.has(e),wi=30,bi={getUserCoupons:e=>h({method:"GET",url:"/coupons",params:e,paramsSerializer:{serialize:n=>Fe.stringify(n,{arrayFormat:"comma"})}}),getIssuableCoupons:()=>h({method:"GET",url:"/coupons/issuable"}),getCouponSummary:e=>h({method:"GET",url:"/coupons/summary",params:e}),issueCouponByPromotionCode:e=>h({method:"POST",url:`coupons/register-code/${e}`}),issueCoupon:(e,n)=>h({method:"POST",url:`/coupons/${e}/download`,data:n}),getExcludeTargetsByCouponNumber:(e,n)=>h({method:"GET",url:`/coupons/${e}/exclude-targets`,params:n}),getCouponTargets:(e,n)=>h({method:"GET",url:`/coupons/${e}/targets`,params:n}),issueEventCoupons:e=>h({method:"POST",url:`/coupons/events/${e}/download`}),issueProductCoupons:(e,n)=>h({method:"POST",url:`/coupons/products/${e}/download`,data:n}),getIssuableCouponsByProductNo:(e,n)=>h({method:"GET",url:`/coupons/products/${e}/issuable/coupons`,params:n})},No=({searchParams:e,memberNo:n=0,options:o})=>se({queryKey:qe.list(e,n),queryFn:async()=>{const{data:i}=await bi.getUserCoupons(e);return i},enabled:n!==0,...o}),ko=({productNo:e,memberNo:n=0,searchParams:o,options:i})=>se({queryKey:qe.listByProductNo(e,n,o),queryFn:async()=>{const{data:a}=await bi.getIssuableCouponsByProductNo(e,o);return a},...i}),Si={isEmployee:e=>$e({method:"POST",url:"/member/common/employee",data:e}),isEmployeeDiscount:(e,n)=>$e({method:"POST",url:"/order/common/emp/use-available",data:{...e,hmAut:e.hmAut,userAgent:e.userAgent||""},headers:{Authorization:n}})},Ro=({data:e,options:n}={})=>{const{isLogin:o}=Pe(),i=ee.getAccessToken();return se({queryKey:He.getEmployee(e),queryFn:async()=>{const{data:a}=await Si.isEmployee(e);return a},...n,enabled:o&&(i==null?void 0:i.isEmployee)})},Ti=({data:e,options:n}={})=>{const{isLogin:o}=Pe(),i=ee.getAccessToken(),a=new et,l=a.get("hm_aut"),d=a.get("wHmAut"),u=K?decodeURIComponent(l)||"undefined":d||"",c=K?window.navigator.userAgent:"";return se({queryKey:He.getEmployeeDiscount(e),queryFn:async()=>{const m={hmAut:u,userAgent:c},{data:x}=await Si.isEmployeeDiscount(m,i==null?void 0:i.accessToken);return x},...n,enabled:o&&(i==null?void 0:i.isEmployee)})},Vt={getBundleProducts:({deliveryTemplateNo:e,hasOptionValues:n=!1,pageSize:o=30,pageNumber:i=1,productSort:a={criterion:mi.RECENT_PRODUCT,direction:ui.DESC_DELIVERY_FEIGN_CLIENT}})=>h({method:"GET",url:"/products/bundle-shipping",params:{deliveryTemplateNo:e,hasOptionValues:n,pageSize:o,pageNumber:i,"productSort.criterion":a==null?void 0:a.criterion,"productSort.direction":a==null?void 0:a.direction}}),getProductExtraInfo:e=>h({method:"GET",url:"/products/extraInfo",params:e,paramsSerializer:{serialize:n=>Fe.stringify(n,{arrayFormat:"comma"})}}),getFavoriteKeywords:e=>h({method:"GET",url:"/products/favoriteKeywords",params:e}),getGroupManagementCodes:e=>h({method:"POST",url:"/products/group-management-code",data:e}),getProductOptions:e=>h({method:"GET",url:"/products/options",params:{productNos:e},paramsSerializer:n=>Fe.stringify(n,{arrayFormat:"comma"})}),getRegularDeliveryProducts:e=>h({method:"GET",url:"/products/regular-delivery",params:e}),requestRestockNotification:({optionNos:e,privacyInfoAgreement:n=!1,name:o,phone:i})=>h({method:"POST",url:"/products/restock",data:{optionNos:e,privacyInfoAgreement:n,name:o,phone:i}}),searchProducts:e=>{var n,o,i,a,l,d,u,c,m,x,E,S,f,C,A,v,w,g,b;return h({method:"GET",url:"/products/search",params:{"filter.discountedPrices":(n=e.filter)==null?void 0:n.discountedPrices,"filter.keywords":(o=e.filter)==null?void 0:o.keywords,"filter.keywordInResult":(i=e.filter)==null?void 0:i.keywordInResult,"filter.discountedComparison":(a=e.filter)==null?void 0:a.discountedComparison,"filter.deliveryConditionType":(l=e.filter)==null?void 0:l.deliveryConditionType,"filter.saleStatus":(d=e.filter)==null?void 0:d.saleStatus,"filter.soldout":(u=e.filter)==null?void 0:u.soldout,"filter.totalReviewCount":(c=e.filter)==null?void 0:c.totalReviewCount,"filter.familyMalls":(m=e.filter)==null?void 0:m.familyMalls,"filter.productManagementCd":(x=e.filter)==null?void 0:x.productManagementCd,"filter.excludeMallProductNo":(E=e.filter)==null?void 0:E.excludeMallProductNo,"filter.includeMallProductNo":(S=e.filter)==null?void 0:S.includeMallProductNo,"filter.customProperties.propValueNos":(C=(f=e.filter)==null?void 0:f.customProperties)==null?void 0:C.propValueNos,"filter.customProperties.propNos":(v=(A=e.filter)==null?void 0:A.customProperties)==null?void 0:v.propNos,"order.by":(w=e.order)==null?void 0:w.by,"order.direction":(g=e.order)==null?void 0:g.direction,"order.soldoutPlaceEnd":(b=e.order)==null?void 0:b.soldoutPlaceEnd,categoryNos:e.categoryNos,brandNos:e.brandNos,partnerNo:e.partnerNo,clientKey:e.clientKey,pageNumber:e.pageNumber,pageSize:e.pageSize,onlySaleProduct:e.onlySaleProduct,hasMaxCouponAmt:e.hasMaxCouponAmt,hasTotalCount:e.hasTotalCount,hasOptionValues:e.hasOptionValues,includeSummaryInfo:e.includeSummaryInfo,shippingAreaType:e.shippingAreaType}})},getProductsInfoByProductNos:e=>h({method:"POST",url:"/products/search-by-nos",data:e}),getProductDetail:(e,n)=>h({method:"GET",url:`/products/${e}`,params:n}),getBestReviewProducts:e=>h({method:"GET",url:"/products/best-review/search",params:e,paramsSerializer:n=>Fe.stringify(n,{arrayFormat:"comma"})}),getBestSellerProducts:({filter:e={familyMalls:!1},categoryNos:n,clientKey:o,pageNumber:i,pageSize:a,hasTotalCount:l=!1,hasOptionValues:d=!1})=>h({method:"GET",url:"/products/best-seller/search",params:{"filter.familyMalls":e.familyMalls,categoryNos:n,clientKey:o,pageNumber:i,pageSize:a,hasTotalCount:l,hasOptionValues:d}}),getKeywordsByProductNo:e=>h({method:"GET",url:"/products/search/keywords",params:e,paramsSerializer:n=>Fe.stringify(n,{arrayFormat:"comma"})}),getProductSearchSummary:e=>h({method:"GET",url:"/products/search/summary",params:e}),getProductDisplayCategories:e=>h({method:"GET",url:`/products/${e}/display-categories`}),getProductOption:(e,n)=>h({method:"GET",url:`/products/${e}/options`,params:n}),getPriorityPurchasableRight:e=>h({method:"GET",url:`/products/${e}/purchasable`}),getRelatedProducts:e=>h({method:"GET",url:`/products/${e}/related-products`}),getShortUrl:e=>h({method:"GET",url:`/products/${e}/url-shortening`}),getProductOptionImages:e=>h({method:"GET",url:`/products/${e}/options/images`}),getOptionImages:(e,n)=>h({method:"GET",url:`/products/${e}/options/${n}/images`})},qd={getGuestRecentViewProducts:e=>h({method:"GET",url:"/guest/recent-products",params:e,paramsSerializer:{serialize:n=>Fe.stringify(n,{arrayFormat:"comma"})}}),getLikeProducts:e=>h({method:"GET",url:"/profile/like-products",params:e}),updateProductsLikeOld:e=>h({method:"POST",url:"/profile/like-products",data:e}),updateProductsLike:e=>h({method:"POST",url:"/profile/like-products",data:e,headers:{version:"1.1"}}),getRecentViewProducts:e=>h({method:"GET",url:"/profile/recent-products",params:e}),registerRecentViewProduct:e=>h({method:"POST",url:"/profile/recent-products",data:e}),deleteRecentViewProducts:e=>h({method:"DELETE",url:"/profile/recent-products",params:e}),getLikeProductsCount:()=>h({method:"GET",url:"/profile/like-products/count"})},$o=({productNo:e,memberNo:n=0,searchParams:o,options:i})=>se({queryKey:fe.detail(e,n,o),queryFn:async()=>{const{data:a}=await Vt.getProductDetail(e,o);return a},enabled:!!e,...i}),Wd=({searchParams:e,memberNo:n=0,options:o})=>fo({queryKey:fe.list(n,e),queryFn:async()=>{const{data:i}=await Vt.searchProducts(e);return i},placeholderData:Oe,...o}),Kd=({productNo:e,memberNo:n=0,searchParams:o,options:i})=>se({queryKey:fe.option(e,n,o),queryFn:async()=>{const{data:a}=await Vt.getProductOption(e,o);return a},enabled:e!==0,...i}),ue=(e,n={symbol:"원",precision:0,pattern:"#!",negativePattern:"- #!"})=>Bt(e,{...n}),o2=e=>Bt(e,{symbol:"P",precision:0,pattern:"# !"}),r2=e=>Bt(e,{symbol:"%",precision:0,pattern:"#!"}),i2=e=>ue(e).multiply(-1).format({pattern:"",negativePattern:"(+#!)"}),Qd=wi/100,Oo=({productNo:e=0,...n}={})=>{const{data:o}=$o({productNo:e,options:{enabled:e!==0}}),i=ue((o==null?void 0:o.price.salePrice)??n.salePrice??0),a=ue((o==null?void 0:o.price.immediateDiscountAmt)??n.immediateDiscountAmt??0),l=ue((o==null?void 0:o.price.additionDiscountAmt)??n.additionDiscountAmt??0),d=ue((o==null?void 0:o.price.couponDiscountAmt)??n.couponDiscountAmt??0),u=ue(i).subtract(a).subtract(l).subtract(d).multiply(Qd),c=u.subtract(u.value%10),m=i.subtract(a),x=m.subtract(l).subtract(d),E=x.subtract(c),S=s.useMemo(()=>{const A=Bt(m,{precision:0,pattern:"#%",negativePattern:"0%"}).subtract(x).multiply(100).divide(m);return A.intValue===0||isNaN(A.intValue)||!isFinite(A.intValue)?"":A.format()},[x,m]),f=s.useMemo(()=>{const A=Bt(i,{precision:0,pattern:"#%",negativePattern:"0%"}).subtract(m).multiply(100).divide(i);return A.intValue===0||isNaN(A.intValue)||!isFinite(A.intValue)?"":A.format()},[m,i]),C=s.useMemo(()=>{const A=Bt(i,{precision:0,pattern:"#%",negativePattern:"0%"}).subtract(E).multiply(100).divide(i);return A.intValue===0||isNaN(A.intValue)||!isFinite(A.intValue)?"":A.format()},[i,E]);return{productSalePrice:i,immediateDiscountAmt:a,additionalDiscountAmt:l,couponDiscountAmt:d,employeeDiscountAmt:c,salePrice:m,benefitPrice:x,employeeBenefitPrice:E,discountRate:S,saleDiscountRate:f,employeeDiscountRate:C}},vi=({isEmployee:e,errorCode:n,pointUsageAllowedStatus:o,partnerNo:i,partnerNoSet:a})=>!e||n!=="0000"||o==="0"?!1:o==="1"?!0:o==="2"&&i&&a?(Array.isArray(i)?i:[i]).every(d=>a.includes(d)):!1,Zd=({products:e})=>{var Ve,tt,Ct;const n=ee.getAccessToken(),o=!!(n!=null&&n.isEmployee),i=new et,a=i.get("hm_aut"),l=i.get("wHmAut"),d=K?decodeURIComponent(a)||"undefined":l||"",{data:u,isLoading:c}=Ro({data:{hmAut:d,userAgent:navigator.userAgent}}),{data:m}=we(),{data:x}=ko({productNo:e.productNo}),E=U(x,Q=>Q==null?void 0:Q.some(ye=>ye.downloadable),Q=>Q||!1),{data:S}=No({memberNo:(m==null?void 0:m.memberNo)||0,searchParams:{pageSize:100,pageNumber:1,usable:!0},options:{enabled:!!(m!=null&&m.memberNo)}}),f=U((S==null?void 0:S.items)||[],Q=>Q.some(ye=>x&&x.length>0&&x.some(ce=>ce.couponNo===ye.couponNo))),C=x&&x.length>0,A=E||C&&f,v=s.useMemo(()=>{if(!x||x.length===0)return e.couponDiscountAmt;const Q=x.find(be=>{var xe;return(xe=S==null?void 0:S.items)==null?void 0:xe.some(R=>R.couponNo===be.couponNo)});if(!Q)return e.couponDiscountAmt;const{discountInfo:ye}=Q,{discountRate:ce,discountAmt:Wt,maxDiscountAmt:It,fixedAmt:Kt}=ye;if(Kt)return Wt||0;{const xe=(e.salePrice-(e.immediateDiscountAmt||0))*(ce||0)/100;return Math.min(xe,It)}},[x,S,e.salePrice,e.immediateDiscountAmt,e.couponDiscountAmt]),w=Oo({salePrice:e.salePrice,immediateDiscountAmt:e.immediateDiscountAmt,additionDiscountAmt:e.additionDiscountAmt,couponDiscountAmt:e.couponDiscountAmt}),g=Ci(e.productNo),b=g?w.productSalePrice:w.salePrice,P=s.useMemo(()=>e.salePrice-(e.immediateDiscountAmt||0)-(e.additionDiscountAmt||0)-v,[e.salePrice,e.immediateDiscountAmt,e.additionDiscountAmt,v]),L=v>0,{data:O,isLoading:y}=Ti({data:{hmAut:(n==null?void 0:n.hmAut)||"",userAgent:navigator.userAgent}}),N=vi({isEmployee:o,errorCode:((Ve=O==null?void 0:O.data)==null?void 0:Ve.errorCode)||"",pointUsageAllowedStatus:((tt=O==null?void 0:O.data)==null?void 0:tt.pointUsageAllowedStatus)||"0",partnerNo:e.partnerNo?String(e.partnerNo):void 0,partnerNoSet:Array.from(((Ct=O==null?void 0:O.data)==null?void 0:Ct.partnerNoSet)||[])}),I=(u==null?void 0:u.data.remainEmployeePoint)||0,D=s.useMemo(()=>{const Q=P,ye=Q*.3,ce=I>=ye?Q*.7:Q-I;return Math.round(ce/10)*10},[I,P]),$=ue(D),F=s.useMemo(()=>{if(!o)return null;const Q=w.salePrice.value,ce=Math.round((Q-D)/Q*100);return ue(ce)},[D,o,w.salePrice.value]),pe=s.useMemo(()=>{if(!A||v<=0)return null;const Q=e.salePrice-(e.immediateDiscountAmt||0),ye=v/Q*100;return Math.round(ye)},[A,v,e.salePrice,e.immediateDiscountAmt]),me=A?pe?`${pe}%`:w.discountRate:w.saleDiscountRate,ct=A?ue(P):w.salePrice;return{price:w,isCouponExist:L,isCouponPriceVisible:A,productPrice:ct,productDiscountRate:me,displayBasePrice:b,shouldDisplayOriginalPrice:g,isEmployeeDataLoading:c||y,isEmployeeDiscount:N,finalPrice:$,employeeDiscountRate:F}},Ai=({products:e,isWish:n})=>{const{isCouponExist:o,isCouponPriceVisible:i,productPrice:a,productDiscountRate:l,displayBasePrice:d,shouldDisplayOriginalPrice:u,isEmployeeDataLoading:c,isEmployeeDiscount:m,finalPrice:x,employeeDiscountRate:E}=Zd({products:e,isWish:n});return t.jsx(V.PriceBox,{$isList:e.isListCard,children:!c&&m&&!Ei(e.productNo)?n?t.jsxs(V.Price,{$isWish:n,children:[t.jsx(V.DiscountRate,{children:E==null?void 0:E.format({pattern:"#%"})}),t.jsx(V.ProductPrice,{children:x.format({negativePattern:"0!"})}),t.jsx(V.OriginPrice,{$isWish:n,children:d.format()})]}):t.jsxs(t.Fragment,{children:[t.jsxs(V.PriceText,{children:[t.jsx(V.ExecutivesText,{children:"임직원 할인가"}),t.jsxs("div",{children:[t.jsx(V.DiscountRate,{children:E==null?void 0:E.format({pattern:"#%"})}),t.jsx(V.OriginPrice,{$isWish:n,children:d.format()})]})]}),t.jsx(V.Price,{$isWish:n,children:t.jsx(V.ProductPrice,{children:x.format({negativePattern:"0!"})})})]}):o&&i?n?t.jsxs(V.Price,{$isWish:n,children:[l&&t.jsx(V.DiscountRate,{children:l}),t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})}),t.jsx(V.OriginPrice,{children:d.format()})]}):t.jsxs(t.Fragment,{children:[t.jsxs(V.PriceText,{children:[t.jsx(V.CouponText,{children:"쿠폰할인가"}),t.jsxs("div",{children:[l&&t.jsx(V.DiscountRate,{children:l}),t.jsx(V.OriginPrice,{children:d.format()})]})]}),t.jsx(V.Price,{children:t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})})})]}):u&&d.value!==a.value?n?t.jsxs(V.Price,{$isWish:n,children:[t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})}),t.jsx(V.OriginPrice,{$isWish:n,children:d.format()})]}):t.jsxs(t.Fragment,{children:[t.jsx(V.PriceText,{children:t.jsx(V.OriginPrice,{children:d.format()})}),t.jsx(V.Price,{children:t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})})})]}):t.jsx(V.Price,{children:t.jsx(V.ProductPrice,{children:a.format({negativePattern:"0!"})})})})},Xd=r.div` > a { display: flex; flex-direction: ${e=>e.$isList?"row":"column"}; gap: 8px; } `,Jd=r.div` flex-shrink: 0; position: relative; width: ${e=>e.$isList?"144px":"100%"}; max-width: ${e=>e.$isList?"144px":"100%"}; border-radius: 8px; overflow: hidden; aspect-ratio: 1/1; img { width: 100%; object-fit: cover; } `,eu=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.16); backdrop-filter: blur(5px); color: var(--color-white); svg { position: absolute; top: 8px; right: 8px; } `,tu=r.p` font-size: 1.6rem; ${T.bold} word-break: keep-all; `,nu=r.div` position: absolute; top: 6px; left: 6px; display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; background: ${e=>e.$isHighlight?"var(--color-highlight)":"var(--color-textPrimary)"}; border-radius: 4px; font-size: 1.4rem; color: var(--color-white); opacity: 0.9; `,ou=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); `,ru=r.p` font-size: 2.2rem; ${T.medium} text-align: center; word-break: keep-all; line-height: 1; color: var(--color-white); `,iu=r.div` display: flex; flex-direction: column; gap: 6px; flex: ${e=>e.$isList?"1":"initial"}; padding: ${e=>e.$isList?"4px 0":"0"}; `,su=r.div``,au=r.p``,cu=r.p` font-size: 1.5rem; line-height: 1.3; ${Co(2)} color: var(--color-textPrimary); `,lu=r.div` display: flex; align-items: center; gap: 4px; line-height: 1.4; color: var(--color-textDarkGray); font-size: 0.9rem; @media (min-width: 316px) and (max-width: 340px) { & { font-size: 1rem; } } @media (min-width: 341px) and (max-width: 365px) { & { font-size: 1.1rem; } } @media (min-width: 366px) { & { font-size: 1.2rem; } } `,du=r.div` > span { line-height: 1.1; } ${z}; gap: 2px; `,uu=r.span` display: inline-block; width: 2px; height: 2px; background: var(--color-textDarkGray); border-radius: 50%; `,pu=r.span``,mu=r.div` display: flex; align-items: center; gap: 4px; `,hu=r.span` > span { color: #007afb; } `,Ee={Container:Xd,Thumbnail:Jd,AdultDimmed:eu,AdultText:tu,Rank:nu,SoldOutDimmed:ou,SoldOutText:ru,Info:iu,NameBox:su,BrandName:au,ProductName:cu,AddInfoBox:lu,ReviewCountContainer:du,DeliveryType:pu,BorderBox:uu,AccumulationContainer:mu,MaxAccumulationText:hu},Pi=e=>s.createElement("svg",{width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:11,cy:11,r:10.3,stroke:"white",strokeWidth:1.4}),s.createElement("path",{d:"M14.1743 5.5C14.8688 5.5 15.5086 5.65699 16.0938 5.97096C16.6837 6.28018 17.1642 6.80347 17.5352 7.54084C17.911 8.27344 18.0989 9.23915 18.0989 10.438C18.0989 11.632 17.9348 12.6548 17.6066 13.5064C17.2783 14.3579 16.8097 15.0073 16.2008 15.4544C15.5967 15.8968 14.8831 16.1181 14.0601 16.1181C13.4369 16.1181 12.8755 15.9991 12.376 15.7613C11.8813 15.5186 11.4769 15.1809 11.163 14.748C10.8537 14.3151 10.6587 13.8203 10.5778 13.2637H12.1334C12.2428 13.7109 12.464 14.0701 12.797 14.3412C13.1301 14.6076 13.5511 14.7432 14.0601 14.748C14.5881 14.748 15.0401 14.6005 15.4159 14.3056C15.7965 14.0059 16.0866 13.5753 16.2864 13.014C16.491 12.4526 16.5957 11.7795 16.6004 10.9946H16.472C16.1913 11.4322 15.8179 11.7747 15.3517 12.0221C14.8902 12.2695 14.3836 12.3932 13.8317 12.3932C13.2181 12.3932 12.6567 12.2481 12.1477 11.9579C11.6387 11.6629 11.2343 11.2586 10.9346 10.7448C10.6397 10.2263 10.4922 9.64352 10.4922 8.99654C10.4922 8.3448 10.6444 7.75253 10.9489 7.21973C11.2533 6.68692 11.6839 6.26829 12.2405 5.96383C12.8018 5.65461 13.4464 5.5 14.1743 5.5ZM12.0192 8.95372C12.0192 9.34857 12.112 9.71249 12.2975 10.0455C12.4831 10.3737 12.7376 10.633 13.0611 10.8233C13.3893 11.0136 13.7604 11.1087 14.1743 11.1087C14.5786 11.1087 14.9497 11.0112 15.2874 10.8162C15.63 10.6164 15.8987 10.35 16.0938 10.017C16.2888 9.68395 16.3863 9.32954 16.3863 8.95372C16.3863 8.58266 16.2912 8.23301 16.1009 7.90476C15.9106 7.57176 15.649 7.30773 15.316 7.11269C14.983 6.91289 14.6119 6.81299 14.2028 6.81299C13.7984 6.81299 13.4298 6.91051 13.0968 7.10555C12.7637 7.29584 12.4997 7.55511 12.3047 7.88335C12.1144 8.20684 12.0192 8.56363 12.0192 8.95372Z",fill:"white"}),s.createElement("path",{d:"M8.02232 15.9752H6.43818V7.21245H6.38109L3.91211 8.82514V7.32662L6.48099 5.64258H8.02232V15.9752Z",fill:"white"})),ji=e=>s.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M7.875 6.70825C7.875 7.1915 7.48325 7.58325 7 7.58325C6.51675 7.58325 6.125 7.1915 6.125 6.70825C6.125 6.225 6.51675 5.83325 7 5.83325C7.48325 5.83325 7.875 6.225 7.875 6.70825Z",fill:"#84858A"}),s.createElement("path",{d:"M10.5 6.70825C10.5 7.1915 10.1082 7.58325 9.625 7.58325C9.14175 7.58325 8.75 7.1915 8.75 6.70825C8.75 6.225 9.14175 5.83325 9.625 5.83325C10.1082 5.83325 10.5 6.225 10.5 6.70825Z",fill:"#84858A"}),s.createElement("path",{d:"M5.25 6.70825C5.25 7.1915 4.85825 7.58325 4.375 7.58325C3.89175 7.58325 3.5 7.1915 3.5 6.70825C3.5 6.225 3.89175 5.83325 4.375 5.83325C4.85825 5.83325 5.25 6.225 5.25 6.70825Z",fill:"#84858A"}),s.createElement("path",{d:"M12.25 9.33341C12.25 9.64283 12.1271 9.93958 11.9083 10.1584C11.6895 10.3772 11.3928 10.5001 11.0833 10.5001H4.08333L1.75 12.2501V4.08341C1.75 3.774 1.87292 3.47725 2.09171 3.25846C2.3105 3.03966 2.60725 2.91675 2.91667 2.91675H11.0833C11.3928 2.91675 11.6895 3.03966 11.9083 3.25846C12.1271 3.47725 12.25 3.774 12.25 4.08341V9.33341Z",stroke:"#84858A",strokeLinecap:"round",strokeLinejoin:"round"})),Yt=({products:e,index:n})=>{const{data:o}=we(),i=s.useMemo(()=>e.accumulationInfo.amount>0,[e.accumulationInfo.amount]),[a,l]=s.useState(!1),d=s.useMemo(()=>{if(!e.adult)return!1;if(!o||!o.adultCertificated)return!0;const m=o.adultCertificatedYmdt?Y(o.adultCertificatedYmdt):null;if(!m)return!0;const x=Y().subtract(3,"month");return m.isBefore(x)},[e.adult,o]),u=m=>{d&&(m.preventDefault(),l(!0))},c=e.imageUrls[0].includes("cdn-nhncommerce.com")||e.imageUrls[0].includes("nhncommerce.com");return t.jsxs(t.Fragment,{children:[t.jsx(Ee.Container,{$isList:e.isListCard,children:t.jsxs(W,{to:`${p.PRODUCT.LIST}/${e.productNo}`,onClick:u,children:[t.jsxs(Ee.Thumbnail,{$isList:e.isListCard,children:[t.jsx(yt,{src:c?`${e.imageUrls[0]}?300x300`:e.imageUrls[0],srcSet:[c?`${e.imageUrls[0]}?300x300 300w`:e.imageUrls[0],c?`${e.imageUrls[0]}?450x450 450w`:e.imageUrls[0],c?`${e.imageUrls[0]}?600x600 600w`:e.imageUrls[0],c?`${e.imageUrls[0]}?900x900 900w`:e.imageUrls[0]].join(", "),sizes:"(max-width: 768px) 45vw, 300px",loading:n&&n<10?"eager":"lazy",decoding:"async",alt:e.productName,isPlaceHolder:!0,style:{objectFit:"cover"}}),e.adult&&d&&t.jsxs(Ee.AdultDimmed,{children:[t.jsx(Pi,{}),t.jsx(Ee.AdultText,{children:"성인인증 필요"})]}),e.rankIndex&&t.jsx(Ee.Rank,{$isHighlight:!!(e.rankIndex&&e.rankIndex<4),children:t.jsx("span",{children:e.rankIndex})}),e.isSoldOut&&t.jsx(Ee.SoldOutDimmed,{children:t.jsx(Ee.SoldOutText,{children:"SOLD OUT"})})]}),t.jsxs(Ee.Info,{$isList:e.isListCard,children:[t.jsx(Ee.NameBox,{children:t.jsx(Ee.ProductName,{dangerouslySetInnerHTML:{__html:e.productName}})}),t.jsx(de,{suspenseFallback:t.jsx(t.Fragment,{}),children:t.jsx(Ai,{products:e})}),t.jsxs(Ee.AddInfoBox,{children:[Ke(e.deliveryConditionType,["FREE","무료배송"])&&t.jsxs(t.Fragment,{children:[t.jsx(Ee.DeliveryType,{children:"무료배송"}),i&&t.jsx(Ee.BorderBox,{})]}),i&&t.jsx(Ee.AccumulationContainer,{children:t.jsxs(Ee.MaxAccumulationText,{children:["최대"," ",t.jsx("span",{children:ue(e.accumulationInfo.amount).format({symbol:"P"})})," ","적립"]})}),!i&&e.totalReviewCount>0&&t.jsxs(Ee.ReviewCountContainer,{children:[t.jsx(ji,{}),t.jsx("span",{children:e.totalReviewCount>1e3?"999+":e.totalReviewCount})]})]})]})]})}),t.jsx(zt,{isVisible:a,setIsVisible:l,productNo:e.productNo})]})},xu=({searchParams:e})=>Ut({queryKey:["infiniteProductList",{searchParams:e}],queryFn:async({pageParam:n})=>{const{data:o}=await Vt.getBestSellerProducts({...e,pageNumber:n});return{data:o,pageNumber:n}},getNextPageParam:(n,o)=>{if(e.pageSize)return e.pageSize*o.length{const[n,o]=s.useState(!1);return s.useEffect(()=>{const i=()=>{const{scrollTop:a,scrollHeight:l,clientHeight:d}=document.documentElement;l-a<=d+e?o(!0):o(!1)};return window.addEventListener("scroll",i),()=>{window.removeEventListener("scroll",i)}},[e]),n},gu=r.div` padding: 20px 20px 0 20px; background: var(--color-white); `,fu=r.section` margin-bottom: 28px; aspect-ratio: 67 / 24; img { width: 100%; } `,yu=r.section` animation: ${pn} 0.3s ease-in-out; `,Eu=r.ul` display: flex; flex-direction: column; gap: 16px; `,Cu=r.li``,wu=r.div` display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; min-height: 50vh; `,bu=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,Su=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin-top: 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,Tu=r.div` > * { margin: 10px auto; } `,ut={Container:gu,BannerSection:fu,ProductSection:yu,ProductList:Eu,ProductListItem:Cu,Nodata:wu,NodataText:bu,MoreButton:Su,SpinnerContainer:Tu},vu=30,Au=()=>{const{data:e}=jt({banners:[Pt.BEST_PAGE_BANNER]}),n=s.useMemo(()=>!e||!e[0]?[]:U(e[0].accounts[0].banners,un(x=>x.bannerNo),ae),[e]),{data:o,fetchNextPage:i,hasNextPage:a,isFetched:l,isFetching:d}=xu({searchParams:{pageNumber:1,pageSize:vu}}),u=On({threshold:400});s.useEffect(()=>{!a||!u||i()},[a,u]);const c=!o||(o==null?void 0:o.pages[0].data.items.length)<=0,m=x=>U((o==null?void 0:o.pages)||[],cn(x),ao("data"),ao("items"),Sr,Hs);return t.jsxs(ut.Container,{children:[!X(n)&&t.jsx(ut.BannerSection,{children:t.jsx("img",{src:n[0].imageUrl,alt:"베스트 배너 이미지"})}),l?t.jsx(ut.ProductSection,{children:c?t.jsxs(ut.Nodata,{children:[t.jsx($n,{}),t.jsx(ut.NodataText,{children:"상품이 존재하지 않습니다."})]}):t.jsxs(t.Fragment,{children:[t.jsx(ut.ProductList,{children:o==null?void 0:o.pages.map((x,E)=>x.data.items.map((S,f)=>{const C=m(E)+(f+1);return t.jsx(ut.ProductListItem,{children:t.jsx(Yt,{products:{...S,rankIndex:C,isListCard:!0},index:f})},S.productNo)}))}),d&&t.jsx(ut.SpinnerContainer,{children:t.jsx(Lo,{})})]})}):t.jsx(We,{style:{height:"50vh"}})]})},s2={FAQ:"260523",NOTICE:"260521"},Ii={EVENT:"event",COMMENT:"comment"},ur={EVENT:{DEFAULT_PAGE_NUMBER:1,DEFAULT_PAGE_SIZE:10}},Li={getConfig:()=>h({method:"GET",url:"/boards/configurations"}),getArticleList:(e,n)=>h({method:"GET",url:`/boards/${e}/articles`,params:n}),writeArticle:(e,n)=>h({method:"POST",url:`/boards/${e}/articles`,data:{images:n.images,password:n.password,articleTitle:n.articleTitle,thumbnailUrl:n.thumbnailUrl,parentBoardArticleNo:n.parentBoardArticleNo,articleContent:n.articleContent,boardCategoryNo:n.boardCategoryNo,secreted:n.secreted,tags:n==null?void 0:n.tags,guestName:n.guestName}}),getCategories:e=>h({method:"GET",url:`/boards/${e}/categories`}),getArticle:(e,n,o)=>h({method:"GET",url:`boards/${e}/articles/${n}`,params:o}),updateArticle:(e,n,o)=>h({method:"PUT",url:`boards/${e}/articles/${n}`,data:{images:o.images,password:o.password,articleTitle:o.articleTitle,thumbnailUrl:o.thumbnailUrl,articleContent:o.articleContent,boardCategoryNo:o.boardCategoryNo,secreted:o.secreted,tags:o==null?void 0:o.tags,guestName:o.guestName}}),deleteArticle:(e,n,o)=>h({method:"DELETE",url:`boards/${e}/articles/${n}`,data:o}),checkEditableArticle:(e,n,o)=>h({method:"PUT",url:`boards/${e}/articles/${n}/editable`,data:o}),recommendArticle:(e,n)=>h({method:"POST",url:`boards/${e}/articles/${n}/recommend`}),cancelArticleRecommend:(e,n)=>h({method:"DELETE",url:`boards/${e}/articles/${n}/recommend`}),getRepliesByBoardNo:(e,n,o)=>h({method:"GET",url:`/boards/${e}/articles/${n}/replies`,params:o}),reportArticle:(e,n,o)=>h({method:"POST",url:`/boards/${e}/articles/${n}/report`,data:o}),cancelReportArticle:(e,n)=>h({method:"DELETE",url:`/boards/${e}/articles/${n}/report`})},Pu=({boardNo:e,articleNo:n,memberNo:o,searchParams:i,options:a})=>se({queryKey:Me.detail(e,n,o,i),queryFn:async()=>{const{data:l}=await Li.getArticle(e,n,i);return l},enabled:!Zo(e)&&!Zo(n),...a}),ju=r.div` display: flex; flex-direction: column; background: var(--color-white); `,Iu=r.div` width: 100%; height: 8px; background: #f2f3f5; `,Lu=r.div` position: relative; padding: 12px 20px; color: var(--color-textPrimary); `,Nu=r.div` display: flex; flex-direction: column; gap: 4px; max-width: 302px; > h3 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; font-size: 1.4rem; font-weight: bold; line-height: 130%; } > div { display: flex; align-items: center; gap: 4px; font-size: 1.2rem; line-height: 120%; > b { font-weight: bold; } } `,ku=r.button` position: absolute; top: 50%; right: 16px; transform: translateY(-50%); `,Ru=r.div` ${bo}; img { width: 100%; vertical-align: middle; } `,kt={Container:ju,Divider:Iu,HeadContainer:Lu,TitleContainer:Nu,ShareButton:ku,ContentContainer:Ru},Ni=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M20 14V17.9962C20 18.5253 19.81 19.0319 19.48 19.4146C19.15 19.7861 18.69 20 18.22 20H5.78C5.31 20 4.86 19.7861 4.52 19.4146C4.19 19.0431 4 18.5253 4 17.9962V14",stroke:"#232634",strokeWidth:2,strokeLinecap:"round"}),s.createElement("path",{d:"M16 8L11.9955 4L8 8",stroke:"#232634",strokeWidth:2,strokeLinecap:"round"}),s.createElement("path",{d:"M12 5.78027V14.7803",stroke:"#232634",strokeWidth:2,strokeLinecap:"round"})),$u=s.lazy(()=>B(()=>import("./index-BW5c4MxO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Ou=()=>{const{eventNo:e}=Gt(),{data:n}=Pu({boardNo:Ii.EVENT,articleNo:Number(e)}),o=(n==null?void 0:n.tags[0])??"",[i,a]=String(o).split("/"),l=i?Y(new Date(2e3+Number(i.slice(0,2)),Number(i.slice(2,4))-1,Number(i.slice(4,6)))):null,d=a?Y(new Date(2e3+Number(a.slice(0,2)),Number(a.slice(2,4))-1,Number(a.slice(4,6)))):null,u=Y(d).diff(Y().startOf("day"),"day"),[c,m]=s.useState(!1),x=()=>{m(E=>!E)};return t.jsxs(kt.Container,{children:[t.jsx($u,{isVisible:c,setIsVisible:m,isEventBoard:!0}),t.jsx(kt.Divider,{}),t.jsxs(kt.HeadContainer,{children:[t.jsxs(kt.TitleContainer,{children:[t.jsx("h3",{children:n==null?void 0:n.title.replace(//gi," ")}),t.jsxs("div",{children:[t.jsx("span",{children:l&&d?`${l.format("YYYY.MM.DD")} - ${l.year()===d.year()?d.format("MM.DD"):d.format("YYYY.MM.DD")}`:""}),u!==null&&u>=0&&t.jsx("b",{children:u===0?"D-DAY":`D-${u}`})]})]}),t.jsx(kt.ShareButton,{onClick:x,children:t.jsx(Ni,{})})]}),t.jsx(kt.ContentContainer,{dangerouslySetInnerHTML:{__html:(n==null?void 0:n.content)??""}})]})},_u=({boardNo:e,searchParams:n})=>Ut({queryKey:["boardArticleList",{boardNo:e,searchParams:n}],queryFn:async({pageParam:o})=>{const{data:i}=await Li.getArticleList(e,{...n,pageNumber:o});return{data:i,pageNumber:o}},getNextPageParam:(o,i)=>{if(n.pageSize)return n.pageSize*i.length a { display: flex; justify-content: space-between; gap: 10px; width: 100%; max-height: 200px; padding: 20px; border-radius: 16px; background: #e9eaef; } `,Hu=r.div` width: 60%; min-width: 143px; min-height: 134px; display: flex; flex-direction: column; justify-content: space-between; margin-top: 26px; color: var(--color-textPrimary); `,Uu=r.h1` font-size: clamp(1.2rem, 6.5vw, 2rem); font-weight: bold; line-height: 130%; word-break: keep-all; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; `,Fu=r.p` font-size: 1.2rem; line-height: 120%; `,Gu=r.div` width: 120px; max-width: 40%; border-radius: 50%; aspect-ratio: 1/1; align-self: center; > img { width: 100%; height: 100%; } `,zu=r.div` ${z}; min-height: 200px; `,Vu=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,Yu=r.button` display: flex; justify-content: center; align-items: center; gap: 4px; width: 100%; height: 44px; margin: 16px 0; border: 1px solid #d4d5da; border-radius: 8px; font-size: 1.5rem; background: #fff; > svg { transform: translateY(-2px); } `,je={Container:Mu,EventList:Bu,EventListItem:Du,TitleContainer:Hu,Title:Uu,Date:Fu,ImageContainer:Gu,Nodata:zu,NodataText:Vu,MoreButton:Yu},qu=e=>s.createElement("svg",{width:14,height:9,viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M13 1.66699L7 7.66699L1 1.66699",stroke:"#3A3A3F",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Wu=()=>{const{data:e,fetchNextPage:n,hasNextPage:o,isFetched:i}=_u({boardNo:Ii.EVENT,searchParams:{pageNumber:ur.EVENT.DEFAULT_PAGE_NUMBER,pageSize:ur.EVENT.DEFAULT_PAGE_SIZE,hasTotalCount:!0}}),a=s.useMemo(()=>e?U(e.pages,d=>d.flatMap(u=>u.data.items),ae):[],[e]),l=d=>{const u=String(d),[c,m]=u.split("/");if(!c||!m)return"";const x=c.slice(2),E=m.slice(2),S=x.slice(0,2)+"."+x.slice(2,4),f=E.slice(0,2)+"."+E.slice(2,4);return`${S} - ${f}`};return t.jsx(je.Container,{children:i?X(a)?t.jsx(je.Nodata,{children:t.jsx(je.NodataText,{children:"등록된 이벤트가 없습니다."})}):t.jsxs(t.Fragment,{children:[t.jsx(je.EventList,{children:a.map(d=>{const u=l(d.tags[0]);return d.displayStatusType==="DISPLAY"?t.jsx(je.EventListItem,{children:t.jsxs(W,{to:`/events/${d.articleNo}`,children:[t.jsxs(je.TitleContainer,{children:[t.jsx(je.Title,{dangerouslySetInnerHTML:{__html:d.title}}),u&&t.jsx(je.Date,{children:u})]}),t.jsx(je.ImageContainer,{children:t.jsx("img",{src:d.imageUrl,alt:d.title})})]})},d.articleNo):t.jsx(je.EventListItem,{onClick:()=>{alert("블라인드된 글입니다.")},children:t.jsx(je.TitleContainer,{children:t.jsx(je.Title,{children:"블라인드된 글입니다."})})},d.articleNo)})}),o&&t.jsxs(je.MoreButton,{onClick:()=>n(),children:[t.jsx("span",{children:"더보기"}),t.jsx(qu,{})]})]}):t.jsx(We,{})})},Ku=vt` 0% { background-color: #f0f0f0; } 50% { background-color: #e0e0e0; } 100% { background-color: #f0f0f0; } `,ze=r.div` animation: ${Ku} 1.5s ease-in-out infinite; background-color: #f2f3f5; border-radius: 4px; `,Qu=r.div` background: #f6f6fa; `,Zu=r.section` width: 100%; `,Xu=r(ze)` width: 60%; height: 24px; margin-bottom: 8px; `,Ju=r(ze)` width: 40%; height: 18px; `,ep=r.section` display: flex; flex-direction: column; padding: 5.3333vw; `,tp=r(ze)` position: relative; width: 100%; aspect-ratio: 560 / 600; border-radius: 5.3333vw; left: 50%; transform: translateX(-50%); margin-bottom: 5.3333vw; `,np=r(ze)` width: 50%; height: 9.0667vw; margin-bottom: 2.1333vw; `,op=r(ze)` width: 80%; height: 9.0667vw; margin-bottom: 7.4667vw; `,rp=r(ze)` width: 20.2667vw; height: 5.3333vw; margin-bottom: 4.2667vw; `,ip=r(ze)` width: 30vw; height: 4.2667vw; `,sp=r(ze)` width: 60px; height: 32px; border-radius: 100px; `,ap=r(ze)` width: 100%; aspect-ratio: 1 / 1; margin-bottom: 8px; `,cp=r(ze)` width: 80%; height: 16px; margin-bottom: 4px; `,lp=r(ze)` width: 50%; height: 20px; `,dp=r.div` background: var(--color-white); `,up=r.div` display: flex; justify-content: space-between; padding: 12px 20px; `,pp=r.div``,mp=r.h2` margin-bottom: 4px; font-size: 1.4rem; ${T.bold} `,hp=r.p` font-size: 1.2rem; color: var(--color-textPrimary); span { display: inline-block; margin-left: 4px; ${T.bold} color: var(--color-highlight); } `,xp=r.button.attrs({type:"button"})``,gp=r.div``,fp=r.section` img { width: 100%; } `,yp=r.section` iframe { width: 100%; aspect-ratio: 560 / 315; } `,Ep=r.section` padding: 24px 20px; `,Cp=r.ul``,wp=r.li` img { max-width: 100%; } `,bp=r.button.attrs({type:"button"})` display: inline-block; width: 100%; padding: 15px; background: #007afb; border-radius: 100px; font-size: 1.5rem; ${T.bold} line-height: 1.5; color: var(--color-white); svg { margin-right: 4px; vertical-align: middle; } `,Sp=r.div` background: #65656a; `,Tp=r.ul` padding: 24px 20px 24px 12px; opacity: 0.8; color: var(--color-white); `,vp=r.h2` margin-bottom: 12px; font-size: 1.5rem; ${T.bold} `,Ap=r.li` display: inline-flex; font-size: 1.3rem; line-height: 1.5; &::before { content: '•'; padding: 0 4px; } `,Pp=r.section``,jp=r.ul` position: ${({$isSticky:e})=>e?"fixed":"static"}; top: ${({$isSticky:e,$headerHeight:n,$isApp:o})=>e?o?"0":`${n}px`:"auto"}; left: 50%; z-index: 10; transform: ${({$isSticky:e})=>e?"translate(-50%, -1px)":"none"}; display: flex; flex-wrap: nowrap; gap: 6px; width: 100%; /* max-width: 768px; */ max-width: 600px; padding: 12px 20px; background: var(--color-white); border-bottom: 1px solid #e9eaef; overflow: auto hidden; `,Ip=r.li` flex-shrink: 0; `,Lp=r.button.attrs({type:"button"})` padding: 6.5px 12px; border: 1px solid ${({$isActive:e})=>e?"#161a2a":"#e9eaef"}; border-radius: 100px; font-size: 1.3rem; background: ${({$isActive:e})=>e?"#161A2A":"var(--color-white)"}; color: ${({$isActive:e})=>e?"var(--color-white)":"var(--color-textPrimary)"}; `,Np=r.div` padding: 0 20px 30px; border-bottom: 8px solid #f2f3f5; &:last-of-type { border-bottom: none; } `,kp=r.div` display: flex; justify-content: space-between; align-items: center; padding: 20px 0; `,Rp=r.h3` font-size: 1.8rem; ${T.bold} color: var(--color-textPrimary); `,$p=r.ul` display: flex; flex-wrap: wrap; gap: 20px 11px; `,Op=r.li` width: calc((100% - 11px) / 2); `,_p=r.div` display: flex; justify-content: center; align-items: center; min-height: 200px; `,Mp=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,Bp=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border: 1px solid #e9eaef; border-radius: 8px; `,Z={SkeletonContainer:Qu,SkeletonTextBox:Zu,SkeletonTitle:Xu,SkeletonSubTitle:Ju,SkeletonBannerSection:ep,SkeletonBanner:tp,SkeletonBannerTitleFirstLine:np,SkeletonBannerTitleSecondLine:op,SkeletonBannerSubTitle:rp,SkeletonBannerCaption:ip,SkeletonTag:sp,SkeletonProductImage:ap,SkeletonProductText:cp,SkeletonProductPrice:lp,Container:dp,TitleBox:up,TextBox:pp,Title:mp,SubTitle:hp,ShareButton:xp,ContentsBox:gp,ImageSection:fp,VideoSection:yp,CouponSection:Ep,CouponList:Cp,CouponListItem:wp,CouponDownloadButton:bp,CouponInfoSection:Sp,InfoList:Tp,InfoTitle:vp,InfoListItem:Ap,ProductSection:Pp,TagList:jp,TagListItem:Ip,TagLabel:Lp,ProductListContainer:Np,ProductListTitleBox:kp,ProductListTitle:Rp,ProductList:$p,ProductListItem:Op,Nodata:_p,NodataText:Mp,MoreButton:Bp},Dp=()=>t.jsxs("div",{children:[t.jsx(Z.TitleBox,{children:t.jsxs(Z.SkeletonTextBox,{children:[t.jsx(Z.SkeletonTitle,{}),t.jsx(Z.SkeletonSubTitle,{})]})}),t.jsx(Z.SkeletonContainer,{children:t.jsxs(Z.ContentsBox,{children:[t.jsxs(Z.SkeletonBannerSection,{children:[t.jsx(Z.SkeletonBanner,{}),t.jsx(Z.SkeletonBannerSubTitle,{}),t.jsx(Z.SkeletonBannerTitleFirstLine,{}),t.jsx(Z.SkeletonBannerTitleSecondLine,{}),t.jsx(Z.SkeletonBannerCaption,{})]}),t.jsxs(Z.ProductSection,{children:[t.jsx(Z.TagList,{$isSticky:!1,$headerHeight:56,$isApp:K,style:{overflow:"hidden"},children:Array(5).fill(null).map((e,n)=>t.jsx(Z.TagListItem,{children:t.jsx(Z.SkeletonTag,{})},n))}),t.jsxs(Z.ProductListContainer,{children:[t.jsx(Z.ProductListTitleBox,{children:t.jsx(Z.SkeletonTitle,{style:{width:"150px",height:"24px"}})}),t.jsx(Z.ProductList,{children:Array(4).fill(null).map((e,n)=>t.jsxs(Z.ProductListItem,{children:[t.jsx(Z.SkeletonProductImage,{}),t.jsxs("div",{style:{padding:"8px 4px"},children:[t.jsx(Z.SkeletonProductText,{style:{width:"90%"}}),t.jsx(Z.SkeletonProductText,{style:{width:"70%"}}),t.jsx(Z.SkeletonProductPrice,{style:{marginTop:"8px"}})]})]},n))})]})]})]})})]}),Hp=r.div` min-width: 100px; position: relative; z-index: 2; `,Up=r.div``,Fp=r.button` display: flex; justify-content: flex-end; align-items: center; min-width: 100px; font-size: 1.4rem; > span { line-height: 0; } &:focus-visible { box-shadow: 0 0 0 1px var(--color-textPrimary); } `,Gp=r.span` margin-right: 4px; `,zp=r.div` position: absolute; top: calc(100% + 8px); right: 0; width: 100%; `,Vp=r.ul` border-radius: 8px; border: 1px solid #f2f3f5; background: #fff; `,Yp=r.li` border-bottom: 1px solid #f2f3f5; min-height: 40px; line-height: 40px; text-align: center; `,qp=r.button` color: ${({$isSelected:e})=>e?"var(--color-textSecondary)":"var(--color-textGray)"}; ${({$isSelected:e})=>e?T.medium:T.regular}; font-size: 1.4rem; &:focus-visible { box-shadow: 0 0 0 1px var(--color-textPrimary); } `,xt={Container:Hp,SortButtonContainer:Up,SortButton:Fp,SortButtonText:Gp,SortDropdownContainer:zp,SortDropdownList:Vp,SortDropdownListItem:Yp,SortDropdownListButton:qp},Wp=({onClickOutside:e})=>{const n=s.useRef(null),o=s.useCallback(i=>{var a;if(n.current instanceof HTMLElement){if((a=n.current)==null?void 0:a.contains(i.target))return;e()}},[e,n]);return s.useEffect(()=>(document.addEventListener("click",o),()=>document.removeEventListener("click",o)),[o]),n},Kp=e=>s.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14 7L9 12L4 7",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Qp=({selectedDropdown:e,toggleDropdown:n})=>t.jsx(xt.SortButtonContainer,{children:t.jsxs(xt.SortButton,{onClick:n,children:[t.jsx(xt.SortButtonText,{children:e.label}),t.jsx("span",{children:t.jsx(Kp,{})})]})}),Zp=({dropdownList:e,selectedDropdown:n,onSelectDropdown:o,toggleDropdown:i,setSelectedDropdown:a,isOpen:l})=>{const d=u=>n.value===u.value;return l&&t.jsx(xt.SortDropdownContainer,{children:t.jsx(xt.SortDropdownList,{children:e.map(u=>t.jsx(xt.SortDropdownListItem,{children:t.jsx(xt.SortDropdownListButton,{$isSelected:d(u),onClick:()=>{a(u),o(u),i()},children:u.label})},u.value))})})},_n=({dropdownList:e,selectedValue:n=e[0],onSelect:o})=>{const[i,a]=s.useState(n);s.useEffect(()=>{a(n)},[n]);const[l,d]=s.useState(!1),u=()=>{d(!l)},c=Wp({onClickOutside:()=>{d(!1)}});return t.jsxs(xt.Container,{ref:c,children:[t.jsx(Qp,{selectedDropdown:i,toggleDropdown:u}),t.jsx(Zp,{dropdownList:e,selectedDropdown:i,setSelectedDropdown:a,onSelectDropdown:o,toggleDropdown:u,isOpen:l})]})},ve=[{value:"POPULAR",label:"인기순",by:"POPULAR",direction:"DESC"},{value:"SALE_CNT",label:"판매순",by:"SALE_CNT",direction:"DESC"},{value:"DISCOUNTED_PRICE_ASC",label:"낮은 가격순",by:"DISCOUNTED_PRICE",direction:"ASC"},{value:"DISCOUNTED_PRICE_DESC",label:"높은 가격순",by:"DISCOUNTED_PRICE",direction:"DESC"},{value:"REVIEW",label:"상품 후기순",by:"REVIEW",direction:"DESC"}],a2=[{value:"3month",label:"최근 3개월"},{value:"6month",label:"최근 6개월",startYmd:Y().subtract(6,"month").format("YYYY-MM-DD")},{value:"1year",label:"최근 1년",startYmd:Y().subtract(1,"year").format("YYYY-MM-DD")}],Sn=[{value:"ADMIN_SETTING",label:"신상품순",by:"ADMIN_SETTING"},{value:"BEST_SELLER",label:"인기순",by:"BEST_SELLER"},{value:"SALE",label:"판매순",by:"SALE"},{value:"BEST_REVIEW",label:"상품 후기순",by:"BEST_REVIEW"}],Xp=[{value:"BEST_REVIEW",by:"BEST_REVIEW",label:"베스트순",direction:"DESC"},{value:"REGISTER_YMDT",by:"REGISTER_YMDT",label:"등록일순",direction:"DESC"},{value:"RATING_DESC",by:"RATING",label:"평점높은순",direction:"DESC"},{value:"RATING_ASC",by:"RATING",label:"평점낮은순",direction:"ASC"}],Jp=({eventId:e,params:n,options:o})=>se({queryKey:De.detailById(e,n),queryFn:async()=>{const{data:i}=await mn.getEventById(e,n);return i},placeholderData:Oe,...o}),em=r.div` padding: 20px 20px 0 20px; background: var(--color-white); animation: ${pn} 0.3s ease-in-out; `,tm=r.section` margin-bottom: 28px; aspect-ratio: 67 / 32; img { width: 100%; } `,nm=r.section``,om=r.div` display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1.4rem; color: var(--color-textPrimary); `,rm=r.p` color: var(--color-black); strong { ${T.bold} } `,im=r.div``,sm=r.ul` display: flex; flex-wrap: wrap; gap: 20px 11px; `,am=r.li` width: calc((100% - 11px) / 2); `,cm=r.div` ${z}; flex-direction: column; gap: 16px; min-height: 50vh; `,lm=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,dm=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin-top: 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,um=r.div` > * { margin: 10px auto; } `,ke={Container:em,BannerSection:tm,ProductSection:nm,SortContainer:om,SortTotalCount:rm,SortDropdown:im,ProductList:sm,ProductListItem:am,Nodata:cm,NodataText:lm,MoreButton:dm,SpinnerContainer:um},pm=20,mm=()=>{const e="happyDeal",[n,o]=Tt({order:Sn[0].by}),i=n.get("order")||Sn[0].by,{data:a,isFetched:l}=Jp({eventId:e,params:{order:i,soldout:!0,saleStatus:"ONSALE"},options:{enabled:!!e}}),[d,u]=s.useState(1),c=s.useMemo(()=>a?a.section.flatMap(f=>f.products):[],[a]),m=s.useMemo(()=>c?c==null?void 0:c.slice(0,d*pm):[],[d,c]),x=f=>{o({order:f.by},{replace:!0})},E=X(c),S=On({threshold:400});return s.useEffect(()=>{c.length!==m.length&&S&&u(f=>f+1)},[S,m.length,c.length]),l?t.jsxs(ke.Container,{children:[(a==null?void 0:a.top.mobile.url)&&t.jsx(ke.BannerSection,{children:t.jsx("img",{src:a==null?void 0:a.top.mobile.url,alt:""})}),E?t.jsxs(ke.Nodata,{children:[t.jsx($n,{}),t.jsx(ke.NodataText,{children:"해피딜 상품이 존재하지 않습니다."})]}):t.jsxs(ke.ProductSection,{children:[t.jsxs(ke.SortContainer,{children:[t.jsxs(ke.SortTotalCount,{children:[t.jsx("strong",{children:(c==null?void 0:c.length)||0}),"개"]}),t.jsx(ke.SortDropdown,{children:t.jsx(_n,{dropdownList:Sn,onSelect:f=>{x(f)},selectedValue:Sn.find(f=>f.by===i)})})]}),X(c)?t.jsx(ke.Nodata,{children:t.jsx(ke.NodataText,{children:"상품이 존재하지 않습니다."})}):t.jsx(t.Fragment,{children:t.jsx(ke.ProductList,{children:m==null?void 0:m.map((f,C)=>t.jsx(ke.ProductListItem,{children:t.jsx(Yt,{products:f,index:C})},f.productNo))})})]})]}):t.jsx(We,{style:{height:"50vh"}})},hm=r.section` width: 100%; aspect-ratio: 67/24; animation: ${At} 0.3s ease-in-out; `,pr={Container:hm},xm=r.section` width: 100%; animation: ${At} 0.3s ease-in-out; `,gm=r.div` width: 100%; aspect-ratio: 67/40; background: #f2f3f5; border-radius: 15px; `,fm=r(gm)` aspect-ratio: 67/24; `,go={Container:xm,EmptyMainCenterBannerContainer:fm},ym=r.section` width: 100%; `,Em=r.div` width: 100%; display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; > div { display: flex; align-items: center; gap: 6px; } `,Cm=r.h3` ${T.bold}; font-size: 2rem; line-height: 26px; `,wm=r.p` font-size: 1.4rem; line-height: 18.2px; color: #84858a; `,bm=r(W)` display: flex; align-items: center; gap: 6px; font-size: 1.4rem; line-height: 18.2px; color: var(--color-textPrimary); `,Sm=r(W)` width: 100%; height: auto; `,Tm=r.div` width: 100%; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; `,ki=r(_e)` margin-right: -20px; padding-right: 20px; `;ki.displayName="SwiperWrapper";const Rt={Container:ym,TitleContainer:Em,Title:Cm,SubTitle:wm,MoreLink:bm,CustomProductSwiper:ki,ProductLink:Sm,ProductImageContainer:Tm},vm=e=>s.createElement("svg",{width:6,height:10,viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L5 5L1 9",stroke:"#3A3A3F",strokeLinecap:"round",strokeLinejoin:"round"})),Ri=({title:e,subTitle:n,moreLink:o,productCardList:i})=>{const a=s.useMemo(()=>({slidesPerView:2.24,spaceBetween:10,observer:!0,observeParents:!0,preloadImages:!0,lazy:!1,passiveListeners:!0}),[]);return!X(i)&&t.jsxs(Rt.Container,{children:[t.jsxs(Rt.TitleContainer,{children:[t.jsxs("div",{children:[t.jsx(Rt.Title,{children:e}),n&&t.jsx(Rt.SubTitle,{children:n})]}),o&&t.jsxs(Rt.MoreLink,{to:o,children:["더보기 ",t.jsx(vm,{})]})]}),t.jsx(Rt.CustomProductSwiper,{...a,children:i.map((l,d)=>t.jsx(Le,{children:t.jsx(Yt,{products:l,index:d})},l.productNo))})]})},Am=({eventNo:e,searchParams:n,options:o})=>fo({queryKey:De.detail(e,n),queryFn:async()=>{const{data:i}=await mn.getEvent(e,n);return i},placeholderData:Oe,...o}),Pm=({params:e,options:n})=>se({queryKey:De.list(e),queryFn:async()=>{const{data:o}=await mn.getEventsV2(e);return o},placeholderData:Oe,...n}),jm=9,Tn=2,Im=e=>({...e,brandName:e.brandName||"",productName:e.productName||"",productNo:e.productNo||0,imageUrls:e.imageUrls||[],salePrice:e.salePrice||0,isSoldOut:e.isSoldOut||!1,liked:e.liked||!1,adult:e.adult||!1,accumulationInfo:e.accumulationInfo||{},partnerNo:e.partnerNo||0,deliveryConditionType:e.deliveryConditionType||null}),Lm=()=>{const{data:e,isLoading:n}=Pm({params:{keywordInfo:{type:"TAG",value:"MAIN"},page:{number:1,size:100}}}),[o,i]=s.useState([]),[a,l]=s.useState(0),d=s.useRef(!1),u=s.useRef(new Set),c=s.useMemo(()=>e!=null&&e.contents?e.contents.map(f=>f.eventNo):[],[e==null?void 0:e.contents]),{data:m}=jt({banners:[Pt.MAIN_PAGE_BANNER]}),x=s.useMemo(()=>{var f;return(f=m==null?void 0:m[0])!=null&&f.accounts?m[0].accounts.slice(1).map(C=>U(C.banners,un(A=>A.bannerNo),ae)):[]},[m]),E=s.useCallback(async()=>{if(!d.current){d.current=!0;try{const f=a*Tn,C=f+Tn,A=c.slice(f,C).filter(g=>!u.current.has(g));if(!A.length){d.current=!1;return}const w=(await Promise.all(A.map(g=>mn.getEvent(g)))).map(g=>({eventNo:g.data.eventNo,label:g.data.label,section:U(g.data.section??[],rt(b=>b.products??[]),Xe(Im),Qe(b=>b.productNo>0),ae,b=>b.slice(0,jm))}));i(g=>[...g,...w.filter(b=>b.section.length>0)]),w.forEach(g=>{u.current.add(g.eventNo)}),l(g=>g+1)}catch(f){console.error("Failed to load event chunk:",f)}finally{d.current=!1}}},[a,c]);s.useEffect(()=>{!n&&a===0&&E()},[n,a,E]);const S=s.useRef(null);return s.useEffect(()=>{const f=S.current;if(!f)return;const C=new IntersectionObserver(A=>{A.forEach(v=>{v.isIntersecting&&!d.current&&E()})},{root:null,rootMargin:"700px",threshold:.1});return C.observe(f),()=>{C.unobserve(f)}},[E]),n?t.jsx(pr.Container,{children:t.jsx(go.EmptyMainCenterBannerContainer,{})}):t.jsxs(t.Fragment,{children:[x.map((f,C)=>{const A=o.slice(C*Tn,(C+1)*Tn);return X(A)?null:t.jsxs(ds.Fragment,{children:[t.jsx(pr.Container,{children:t.jsx(Io,{bannerList:f,isTextAnimation:!0})}),A.map(v=>t.jsx(go.Container,{children:t.jsx(Ri,{productCardList:v.section,title:v.label,moreLink:`${p.EXHIBITIONS.LIST}/${v.eventNo}`})},v.eventNo))]},C)}),t.jsx("div",{ref:S})]})},Nm=r.section` width: 100%; aspect-ratio: 67/40; animation: ${At} 0.3s ease-in-out; `,km={Container:Nm},Rm=()=>{const{data:e}=jt({banners:[Pt.MAIN_PAGE_BANNER]}),n=s.useMemo(()=>{if(!e||!e[0])return[];try{return e[0].accounts[0].banners}catch{return[]}},[e]);return!X(n)&&t.jsx(km.Container,{children:t.jsx(Io,{accountNo:0,bannerList:n,isTextAnimation:!0,bannerSwiperStyle:{borderRadius:"15px"},bannerStyle:{borderRadius:"15px"},descriptionStyle:{top:"45%",fontSize:"clamp(1rem, 5.1vw, 2.7rem)",lineHeight:"138%",letterSpacing:"0.05vw"},dateStyle:{bottom:"7.3%",letterSpacing:"0.03vw"}})})},$m=r.section` width: 100%; animation: ${At} 0.3s ease-in-out; /* 섹션 바깥으로 슬라이드가 튀어나오지 않도록 안전 가드 */ overflow: hidden; `,Om=r.div` aspect-ratio: 1/1; display: flex; justify-content: center; align-items: center; border-radius: 20px; overflow: hidden; padding-right: 0; /* 하위 이미지가 컨테이너 경계 밖으로 보이지 않도록 안전 가드 */ img { display: block; max-width: 100%; max-height: 100%; } `,$i=r(_e)` /* 우측으로 튀는 현상 방지를 위해 음수 마진 제거 */ margin-right: 0; padding-right: 0; `;$i.displayName="SwiperWrapper";const Oi=r(Le)` min-width: 56px; width: 18%; display: flex; flex-direction: column; gap: 16px; `;Oi.displayName="SwiperSlide";const _m=r(W)` > p { margin-top: 8px; text-align: center; font-size: 1.5rem; color: #59595f; white-space: nowrap; } ${ii.XS} { > p { font-size: 1.2rem; } } `,Mm=r.div` margin: 16px auto 0; width: fit-content; height: 4px; background: #f6f6fa; border-radius: 100px; overflow: hidden; width: 32px; > div { width: 50% !important; border-radius: 100px; background: #0d0f71; height: 100%; } `,$t={Container:$m,IconContainer:Om,CustomMainIconBannerSwiper:$i,CustomMainIconBannerSwiperSlide:Oi,StyledLink:_m,ScrollBar:Mm},Bm=()=>{const{data:e}=jt({banners:[Pt.MAIN_PAGE_ICON_BANNER]}),n=s.useRef(null),[o,i]=s.useState(5),a=s.useCallback(u=>{n.current=(u==null?void 0:u.el)??null},[]);s.useEffect(()=>{const u=n.current;if(!u)return;const c=()=>{const E=u.querySelectorAll(".swiper-slide");if(!E.length)return;const S=E[0],f=E[1];let C=S.getBoundingClientRect().width;if(f){const w=S.getBoundingClientRect(),b=f.getBoundingClientRect().left-w.left;b>0&&(C=b)}else C+=12;const A=u.clientWidth,v=Math.max(1,Math.floor(A/C));i(v)},m=new ResizeObserver(()=>c());m.observe(u);const x=setTimeout(c,50);return()=>{clearTimeout(x),m.disconnect()}},[]);const l=s.useMemo(()=>({modules:[ia],slidesPerView:"auto",slidesPerGroup:5,spaceBetween:8,breakpoints:{768:{slidesPerView:5,slidesPerGroup:5,spaceBetween:12},1024:{slidesPerView:5,slidesPerGroup:5,spaceBetween:16}},resistanceRatio:.6,onBeforeInit:a,scrollbar:{el:".icon-swiper-scrollbar",dragSize:16}}),[a]),d=s.useMemo(()=>!e||!e[0]?[]:U(e[0].accounts[0].banners,un(u=>u.name==="레시피공유"?1e7:u.bannerNo),Us(2),ae),[e]);return!X(d)&&t.jsx($t.Container,{children:t.jsxs($t.CustomMainIconBannerSwiper,{...l,children:[d.map((u,c)=>{const m=o>0&&(c+1)%o===0;return t.jsx($t.CustomMainIconBannerSwiperSlide,{children:u.map(({bannerNo:x,landingUrl:E,browerTargetType:S,imageUrl:f,name:C})=>t.jsxs($t.StyledLink,{to:E,target:jo(S),children:[t.jsx($t.IconContainer,{$edgeFitRight:m,children:t.jsx(yt,{src:f,alt:C,isPlaceHolder:!0,style:{background:"#f6f6fa",objectFit:"contain"}})}),t.jsx("p",{children:C})]},x))},c)}),t.jsx($t.ScrollBar,{className:"icon-swiper-scrollbar"})]})})},Dm={HAPPY_DEAL:42465,EMPLOYEE:43271},Hm=()=>{const{data:e}=Am({eventNo:Dm.HAPPY_DEAL,searchParams:{order:"ADMIN_SETTING",soldout:!0,saleStatus:"ONSALE"}}),n=s.useMemo(()=>e?U(e.section,ao("products"),Sr,cn(9),Xe(o=>({brandName:o.brandName,productName:o.productName,productNo:o.productNo,imageUrls:o.imageUrls,salePrice:o.salePrice,immediateDiscountAmt:o.immediateDiscountAmt,additionDiscountAmt:o.additionDiscountAmt,couponDiscountAmt:o.couponDiscountAmt,defaultDeliveryCondition:o.deliveryConditionType,totalReviewCount:o.totalReviewCount,isSoldOut:o.isSoldOut,liked:o.liked,adult:o.adult,isExecutives:!1,accumulationInfo:o.accumulationInfo,partnerNo:o.partnerNo,deliveryConditionType:o.deliveryConditionType})),ae):[],[e]);return e&&!X(n)&&t.jsx(go.Container,{children:t.jsx(Ri,{productCardList:n,title:e.label,subTitle:"10% 적립 혜택에 무료배송까지!",moreLink:p.HAPPY_DEAL})})},Um=r.div` padding: 20px 20px 42px; display: flex; flex-direction: column; gap: 28px; background: #fff; `,_i=r.div` width: 100%; aspect-ratio: 67/40; background: #f2f3f5; border-radius: 15px; `,Fm=r(_i)` aspect-ratio: 67/24; `,Gm=r.div` width: 100%; display: flex; gap: 10px; `,zm=r.div` width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); row-gap: 16px; column-gap: 12px; `,Vm=r.div` min-width: 42.7%; aspect-ratio: 1/1; border-radius: 8px; background: #f2f3f5; `,Ym=r.div` width: 100%; aspect-ratio: 1/1; border-radius: 20px; background: #f2f3f5; `,Ot={Container:Um,EmptyMainBannerContainer:_i,EmptyMainCenterBannerContainer:Fm,EmptyProductSwiperContainer:Gm,EmptyIconSectionContainer:zm,EmptyProductBlock:Vm,EmptyIconBlock:Ym},qm="https://t1.daumcdn.net/kas/static/ba.min.js",mr="kakao-adfit-script";let vn=null;const Wm=()=>typeof window>"u"?Promise.reject(new Error("window is undefined")):window.adfit?Promise.resolve():vn||(vn=new Promise((e,n)=>{const o=document.getElementById(mr);if(o){o.addEventListener("load",()=>e(),{once:!0}),o.addEventListener("error",()=>n(new Error("adfit load failed")),{once:!0});return}const i=document.createElement("script");i.id=mr,i.src=qm,i.async=!0,i.onload=()=>e(),i.onerror=()=>n(new Error("adfit load failed")),document.body.appendChild(i)}),vn),Km=({unitId:e,slotId:n,width:o=400,height:i=100,timeoutMs:a=4e3,enabled:l=!0})=>{const d=s.useRef(null),[u,c]=s.useState(!1),[m,x]=s.useState(!1),[E,S]=s.useState(null);return s.useEffect(()=>{if(!l||typeof window>"u")return;const f=d.current;if(!f)return;let C,A=!1;const v=new MutationObserver(()=>{!!f.querySelector("iframe")&&(c(!0),v.disconnect(),C&&window.clearTimeout(C))});return(async()=>{var g,b,P;try{if(S(null),c(!1),x(!1),f.id=n,f.setAttribute("data-ad-unit",e),f.setAttribute("data-ad-width",String(o)),f.setAttribute("data-ad-height",String(i)),f.style.display="block",f.style.width="100%",f.style.height=`${i}px`,v.observe(f,{childList:!0,subtree:!0}),await Wm(),A)return;try{(b=(g=window.adfit)==null?void 0:g.destroy)==null||b.call(g,f)}catch(L){console.error("[useAdfit] destroy before render failed",L)}await new Promise(L=>requestAnimationFrame(()=>L(null))),await new Promise(L=>requestAnimationFrame(()=>L(null))),(P=window.adfit)!=null&&P.render?window.adfit.render(f):window.adfit&&window.adfit(),x(!0),C=window.setTimeout(()=>{v.disconnect()},a)}catch(L){const O=L instanceof Error?L:new Error("adfit render failed");S(O),v.disconnect()}})(),()=>{var g,b;A=!0,v.disconnect(),C&&window.clearTimeout(C);try{(b=(g=window.adfit)==null?void 0:g.destroy)==null||b.call(g,f)}catch(P){console.error("[useAdfit] destroy on unmount failed",P)}}},[l,e,n,o,i,a]),{ref:d,hasAd:u,isReady:m,error:E}},Qm=({unitId:e,slotId:n,width:o=400,height:i=100,timeoutMs:a=4e3,enabled:l=!0,wrapperStyle:d,slotStyle:u,showOnlyWhenLoaded:c=!1})=>{const{ref:m,hasAd:x}=Km({unitId:e,slotId:n,width:o,height:i,timeoutMs:a,enabled:l});if(!l)return null;const E=c?x:!0;return t.jsx("div",{style:{margin:x?"24px 16px 0":0,display:E?"block":"none",...d},children:t.jsx("div",{style:{borderRadius:12,overflow:"hidden",background:"#ffffff"},children:t.jsx("ins",{ref:m,className:"kakao_ad_area","data-ad-unit":e,"data-ad-width":String(o),"data-ad-height":String(i),style:{display:"block",width:"100%",height:`${i}px`,...u}})})})},Zm=()=>{const e=()=>{if(!K)return null;const a=at()==="IOS"?"DAN-cv08MFGDxvwUrOjT":"DAN-8xnqQTYT4roLzxu7";return t.jsx(Qm,{unitId:a,slotId:"kakaoAdMain",width:400,height:100,showOnlyWhenLoaded:!0,wrapperStyle:{margin:"12px 0 0"}})},n=()=>{const i=Array(3).fill(null);return t.jsx(Ot.EmptyProductSwiperContainer,{children:i.map((a,l)=>t.jsx(Ot.EmptyProductBlock,{},l))})},o=()=>{const i=Array(10).fill(null);return t.jsx(Ot.EmptyIconSectionContainer,{children:i.map((a,l)=>t.jsx(Ot.EmptyIconBlock,{},l))})};return t.jsxs(Ot.Container,{children:[t.jsx(de,{suspenseFallback:t.jsx(Ot.EmptyMainBannerContainer,{}),children:t.jsx(Rm,{})}),t.jsx(de,{suspenseFallback:o(),children:t.jsx(Bm,{})}),t.jsx(e,{}),t.jsx(de,{suspenseFallback:n(),children:t.jsx(Hm,{})}),t.jsx(Lm,{})]})},Mi=({searchParams:e})=>Ut({queryKey:["infiniteProductList",{searchParams:e}],queryFn:async({pageParam:n})=>{const{data:o}=await Vt.searchProducts({...e,pageNumber:n});return{data:o,pageNumber:n}},getNextPageParam:(n,o)=>{if(e.pageSize)return e.pageSize*o.length{const u=Ge();s.useEffect(()=>{if(ie(p.PRODUCT.DETAIL,u.pathname)&&e){window.ShopbyExternalScript.setGlobalObjectSb({product:e});return}if(ie(p.SEARCH,u.pathname)&&n){window.ShopbyExternalScript.setGlobalObjectSb({searchedProduct:n}),d&&(window.m_skey=d);return}if(zn(C=>ie(C,u.pathname),[p.PRODUCT.LIST,p.PRODUCT.BRAND.LIST,p.PRODUCT.PARTNER.LIST,p.CATEGORIES.DETAIL])&&n&&l){window.ShopbyExternalScript.setGlobalObjectSb({searchedProduct:n,currentCategory:l});return}if(ie(p.CART,u.pathname)&&o){window.ShopbyExternalScript.setGlobalObjectSb({cart:o});return}if(zn(C=>ie(C,u.pathname),[p.ORDER.ORDER_SHEET,p.GUEST.ORDER_DETAIL])&&i){window.ShopbyExternalScript.setGlobalObjectSb({orderSheet:i});return}if(zn(C=>ie(C,u.pathname),[p.ORDER.ORDER_COMPLETE,p.MY_PAGE.ORDERS.ORDER_DETAIL,p.GUEST.ORDER_DETAIL])&&a){window.ShopbyExternalScript.setGlobalObjectSb({order:a});return}},[u.pathname,e,l,n,o,i,a,d])},Xm=({categoryNo:e,options:n})=>se({queryKey:["category",{categoryNo:e}],queryFn:async()=>{const{data:o}=await di.getCategory(e);return o},enabled:!!e,placeholderData:Oe,...n}),Jm=e=>se({queryKey:["category_all"],queryFn:async()=>(await di.getCategories()).data,...e}),eh=r.section``,Bi=r(_e)` padding: 12px 20px; background: #f6f6fa; `,Di=r(Le)` width: auto; font-size: 1.4rem; ${({$isSelected:e})=>T[e?"medium":"regular"]}; white-space: nowrap; color: ${({$isSelected:e})=>e?"var(--color-textSecondary)":"var(--color-textGray)"}; cursor: pointer; `,Hi=r(_e)` padding: 12px 20px; background: var(--color-white); `,Ui=r(Le)` width: auto; display: inline-block; padding: 6.5px 12px; border: 1px solid #e9eaef; border-radius: 100px; font-size: 1.3rem; white-space: nowrap; background: ${({$isSelected:e})=>e?"var(--color-black)":"var(--color-white)"}; color: ${({$isSelected:e})=>e?"var(--color-white)":"var(--color-textPrimary)"}; cursor: pointer; `,th=r.section` padding: 0 20px; background: var(--color-white); animation: ${pn} 0.3s ease-in-out; `,nh=r.div` display: flex; justify-content: flex-end; align-items: center; padding: 8px 0 15px; `,oh=r.div``,rh=r.ul` display: grid; grid-template-columns: repeat(2, 1fr); grid-column-gap: 10px; grid-row-gap: 20px; `,ih=r.li``,sh=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; grid-column: span 2; border: 1px solid #d4d5da; margin-top: 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,ah=r.div` display: flex; justify-content: center; align-items: center; min-height: 60vh; `,ch=r.p` font-size: 1.6rem; text-align: center; color: var(--color-textLightGray); `,lh=r.div` > * { margin: 10px auto; } `;Bi.displayName="SwiperWrapper";Hi.displayName="SwiperWrapper";Di.displayName="SwiperSlide";Ui.displayName="SwiperSlide";const Se={CategorySection:eh,CategoryList:Bi,CategoryListItem:Di,ChildCategoryList:Hi,ChildCategoryListItem:Ui,ProductSection:th,SortContainer:nh,SortDropdown:oh,ProductList:rh,ProductListItem:ih,MoreButton:sh,Nodata:ah,NodataText:ch,SpinnerContainer:lh},dh=()=>{const e=Ce(),[n]=Tt(),i=Gt().categoryNo,a=n.get("childCategoryNo"),[l,d]=s.useState({categoryNos:i,pageSize:20,pageNumber:1,order:{by:ve[0].by,direction:ve[0].direction},filter:{soldout:!0},sortValue:ve[0].value}),{data:u}=Jm(),{data:c}=Xm({categoryNo:i}),m=s.useMemo(()=>({slidesPerView:"auto",spaceBetween:16}),[]),x=s.useMemo(()=>({slidesPerView:"auto",spaceBetween:6}),[]),{data:E,fetchNextPage:S,hasNextPage:f,isFetched:C,isFetching:A}=Mi({searchParams:l});s.useEffect(()=>{i&&d(y=>({...y,categoryNos:a??i}))},[i,a]);const v=s.useMemo(()=>u?u.multiLevelCategories:[],[u]),w=s.useMemo(()=>{const y=v.find(N=>N.categoryNo===Number(i));return y?y.children:[]},[i,v]),g=!a||a===i,b=y=>{d(N=>({...N,pageNumber:1,childCategoryNo:y})),e(`/categories/${y}?childCategoryNo=${y}`)},P=y=>{d(N=>({...N,pageNumber:1,childCategoryNo:y})),e(`/categories/${i}?childCategoryNo=${y}`,{replace:!0})},L=y=>{d(N=>({...N,pageNumber:1,order:{by:y.by,direction:y.direction,sortValue:y.value}}))},O=On({threshold:400});return s.useEffect(()=>{!f||!O||S()},[f,O]),_o({searchedProduct:E==null?void 0:E.pages[0].data.items,currentCategory:c}),t.jsxs(t.Fragment,{children:[t.jsxs(Se.CategorySection,{children:[v&&t.jsx(Se.CategoryList,{...m,children:v.map(y=>t.jsx(Se.CategoryListItem,{onClick:()=>b(y.categoryNo),$isSelected:i===y.categoryNo.toString(),children:y.label},y.categoryNo))}),t.jsxs(Se.ChildCategoryList,{...x,children:[t.jsx(Se.ChildCategoryListItem,{onClick:()=>P(Number(i)),$isSelected:g,children:"전체"}),w.map(y=>t.jsx(Se.ChildCategoryListItem,{onClick:()=>P(y.categoryNo),$isSelected:a===y.categoryNo.toString(),children:y.label},y.categoryNo))]})]}),t.jsxs(Se.ProductSection,{children:[t.jsx(Se.SortContainer,{children:t.jsx(Se.SortDropdown,{children:t.jsx(_n,{dropdownList:ve,onSelect:y=>{L(y)}})})}),C?X(E==null?void 0:E.pages[0].data.items)?t.jsx(Se.Nodata,{children:t.jsx(Se.NodataText,{children:"상품이 존재하지 않습니다."})}):t.jsxs(t.Fragment,{children:[t.jsx(Se.ProductList,{children:E==null?void 0:E.pages.map(y=>y.data.items.map((N,I)=>t.jsx(Se.ProductListItem,{children:t.jsx(Yt,{products:N,index:I})},N.productNo)))}),A&&t.jsx(Se.SpinnerContainer,{children:t.jsx(Lo,{})})]}):t.jsx(We,{style:{height:"50vh"}})]})]})},uh=r(Je.header)` display: flex; justify-content: space-between; align-items: center; cursor: pointer; padding: 18.5px 0; `,ph=r.h4` font-size: 1.6rem; ${T.medium}; color: var(--color-textPrimary); `,hr={Header:uh,Title:ph},mh=e=>s.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4 13.1667L10 7.16675L16 13.1667",stroke:"#232634",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),Mt=({visible:e,title:n,titleElement:o,children:i})=>{const[a,l]=s.useState(e);s.useEffect(()=>{l(e)},[e]);const d=()=>{l(!a)};return t.jsxs("div",{children:[t.jsxs(hr.Header,{className:"accordion-header",onClick:d,initial:!1,children:[o||t.jsx(hr.Title,{children:n}),t.jsx(Je.span,{animate:{rotate:a?0:180},initial:{rotate:180},transition:{duration:.3},children:t.jsx(mh,{})})]}),t.jsx(Eo,{initial:a,children:a&&t.jsx(Je.div,{className:"accordion-content",initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.3,ease:[.04,.62,.23,.98]},children:i})})]})},hh=r.span` width: ${e=>e.$width||"16px"}; height: ${e=>e.$height||"16px"}; svg { width: ${e=>e.$width||"16px"}; height: ${e=>e.$height||"16px"}; } > span:first-child { width: ${e=>e.$rateDecimal*100}%; overflow: hidden; > svg { float: inline-start; } } > span:last-child { width: ${e=>(1-e.$rateDecimal)*100}%; overflow: hidden; > svg { width: ${e=>e.$width||"16px"}; height: ${e=>e.$height||"16px"}; float: inline-end; } } `,xh={ReviewIcon:hh},gh=e=>s.createElement("svg",{width:29,height:28,viewBox:"0 0 29 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14.5023 22.4311L22.4804 27.2463C22.9306 27.5181 23.4859 27.1144 23.3665 26.6024L21.2493 17.5269L28.2986 11.4201C28.696 11.0758 28.4836 10.4229 27.9596 10.3785L18.6783 9.59106L15.0496 1.02947C14.8448 0.546167 14.1598 0.546166 13.955 1.02947L10.3263 9.59106L1.04502 10.3785C0.52106 10.4229 0.308601 11.0758 0.706046 11.4201L7.75535 17.5269L5.63818 26.6024C5.51872 27.1144 6.07407 27.5181 6.52425 27.2463L14.5023 22.4311Z",fill:"#007AFB"})),fh=e=>s.createElement("svg",{width:29,height:28,viewBox:"0 0 29 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14.5023 22.4311L22.4804 27.2463C22.9306 27.5181 23.4859 27.1144 23.3665 26.6024L21.2493 17.5269L28.2986 11.4201C28.696 11.0758 28.4836 10.4229 27.9596 10.3785L18.6783 9.59106L15.0496 1.02947C14.8448 0.546167 14.1598 0.546166 13.955 1.02947L10.3263 9.59106L1.04502 10.3785C0.52106 10.4229 0.308601 11.0758 0.706046 11.4201L7.75535 17.5269L5.63818 26.6024C5.51872 27.1144 6.07407 27.5181 6.52425 27.2463L14.5023 22.4311Z",fill:"#E9EAEF"})),Ln=({rate:e,activeIcon:n=t.jsx(gh,{}),emptyIcon:o=t.jsx(fh,{}),iconSize:i})=>e===1?n:e===0?o:t.jsxs(xh.ReviewIcon,{$rateDecimal:e,$width:i==null?void 0:i.width,$height:i==null?void 0:i.height,children:[t.jsx("span",{children:n}),t.jsx("span",{children:o})]}),yh=r.section` aspect-ratio: 67 / 14; `,Eh=r(W)` height: 100%; border-radius: 12px; overflow: hidden; `,Fi=r(_e)` height: 100%; border-radius: 12px; `;Fi.displayName="SwiperWrapper";const to={Container:yh,StyledLink:Eh,CustomSwiper:Fi},Ch=()=>{const{data:e}=jt({banners:[Pt.PRODUCT_DETAIL_BANNER]}),n=s.useMemo(()=>!e||!e[0]?[]:U(e[0].accounts[0].banners,un(i=>i.bannerNo),ae),[e]),o=s.useMemo(()=>({slidesPerView:1}),[]);return e&&t.jsx(to.Container,{children:t.jsx(to.CustomSwiper,{...o,children:n.map(({imageUrl:i,landingUrl:a,browerTargetType:l,bannerNo:d,name:u})=>t.jsx(Le,{children:t.jsx(to.StyledLink,{to:a,target:jo(l),children:t.jsx(yt,{src:i,alt:u,isPlaceHolder:!0,style:{objectFit:"cover"}})})},d))})})},wh=r.div` display: flex; flex-direction: column; gap: 8px; padding: 20px 0; `,bh=r.dl` display: flex; align-items: center; font-size: 1.4rem; ${T.regular}; dt { width: 152px; margin-right: 37px; color: #84858a; } dd { color: var(--color-textPrimary); } `,xr={ContentsContainer:wh,List:bh},Gi=(e,n)=>e||n===0,Sh=e=>U(e,JSON.parse,ln("contents"),rt(n=>Fs(n)),Xe(([n,o])=>({key:n,value:o})),ae),Nn=e=>{const n=Math.floor(e),o=parseFloat((e%1).toFixed(2)),i=Array(n).fill(1);for(o>0&&i.push(o);i.length<5;)i.push(0);return i},Th=({dutyInfo:e})=>{const n=s.useMemo(()=>{try{return Sh(e)}catch(o){return console.error(o),[]}},[e]);return t.jsx(Mt,{title:"상품판매 일반정보",children:t.jsx(xr.ContentsContainer,{children:n.map((o,i)=>t.jsxs(xr.List,{children:[t.jsx("dt",{children:o.key}),t.jsx("dd",{children:o.value})]},i))})})},vh=()=>Ae({mutationFn:async e=>await Ao.registerCart(e)}),Ah=()=>({write:Ae({mutationFn:async({data:e})=>await en.writeOrderSheet(e)}),calculate:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.getCalculatedOrderSheet(e,n)}),couponApply:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.applyCoupon(e,n)}),couponCalculate:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.getAppliedCouponPrice(e,n)}),maxCouponCalculate:Ae({mutationFn:async({orderSheetNo:e,data:n})=>await en.getMaximumAppliedCouponPrice(e,n)})}),zi=()=>({register:Ae({mutationFn:async({productNo:e,data:n})=>await _t.writeProductInquiry(e,n)}),modify:Ae({mutationFn:async({inquiryNo:e,data:n})=>await _t.updateProductInquiry(e,n)}),delete:Ae({mutationFn:async({inquiryNo:e})=>await _t.deleteProductInquiry(e)}),report:Ae({mutationFn:async({productNo:e,data:n})=>await _t.reportProductInquiry(e,n)})}),Ph=()=>({recent:Ae({}),brandLike:Ae({}),like:Ae({mutationFn:async({data:e})=>await qd.updateProductsLike(e)})}),gr=new et,c2=()=>{const e=Ce(),{isLogin:n}=Pe(),{isApp:o}=Qr(),i=decodeURIComponent(gr.get("hm_aut")||"undefined"),a=gr.get("wHmAut"),l=o?i:a,{mutateAsync:d}=Ae({mutationFn:async()=>{if(n&&X(l)){e(p.MAIN);return}return(await Gr.deactivateMember({hmAut:l,userAgent:o?window.navigator.userAgent:""})).data.success}});return{checkDeactivation:d}},jh=r.div``,Ih=r.div` > .swiper { background: var(--color-white); } > div:last-child { margin-bottom: 0; } `,Lh=r.div``,Nh=r.img` width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center; `,kh=r.div` position: relative; margin-bottom: 8px; padding: 20px; background-color: var(--color-white); `,Rh=r.div` padding: 10px 0; color: #84858a; span, p { font-size: 1.4rem !important; font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif !important; } span { display: inline; } `,$h=r.div` > div { position: relative; margin-bottom: 8px; } /* 형제 요소가 있는 경우에만 스타일 적용 */ &:has(+ *) { margin-bottom: 20px; } `,Oh=r.p` position: relative; display: flex; align-items: center; gap: 4px; font-size: 1.8rem; ${T.bold}; color: var(--color-main); span { ${z}; gap: 3px; font-size: 1.4rem; ${T.medium}; /* line-height: 25px; */ } `,_h=r.button.attrs({type:"button"})` ${z}; `,Mh=r.button.attrs({type:"button"})` position: absolute; bottom: 0; right: 0; ${z}; gap: 2px; padding: 8px 12px; background: #007afb; border-radius: 30px; font-size: 1.4rem; ${T.bold}; color: var(--color-white); `,Bh=r.div` display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; margin-top: 16px; `,Dh=r.div` display: flex; flex-direction: column; gap: 2px; `,Hh=r.span` font-size: 2rem; ${T.bold}; color: initial; /* color: var(--color-main); */ `,Uh=r.span` font-size: 2.2rem; ${T.bold}; color: var(--color-textPrimary); `,Fh=r.span` font-size: 1.2rem; ${T.regular}; color: var(--color-textLightGray); text-decoration: line-through; `,Gh=r.button.attrs({type:"button"})` position: absolute; right: 16px; top: 16px; z-index: 10; `,zh=r.h3` margin-bottom: 12px; font-size: 1.6rem; ${T.bold}; `,Vh=r(W)` width: 50%; p { margin-bottom: 6px; font-size: 1.4rem; ${T.semiBold}; color: var(--color-textGray); } `,Yh=r.h2` margin-bottom: 8px; width: 100%; max-width: 295px; font-size: 2rem; ${T.regular}; `,qh=r.div` display: flex; align-items: center; gap: 4px; `,Wh=r.p` font-size: 1.2rem; color: var(--color-textGray); margin-top: 8px; `,Kh=r.ul` display: flex; `,Qh=r.li` svg { width: 12px; height: 12px; } `,Zh=r.span` font-size: 1.2rem; ${T.regular}; color: var(--color-textGray); `,Xh=r.div` display: flex; flex-direction: column; gap: 8px; `,Jh=r.dl` display: flex; gap: 12px; dt { width: 60px; font-size: 1.4rem; ${T.regular}; color: var(--color-textGray); } dd { font-size: 1.4rem; ${T.regular}; color: var(--color-textPrimary); } `,e0=r.div` margin-bottom: 8px; padding: 0 20px; background-color: var(--color-white); `,t0=r.div` padding: 20px 0 0; h2 { margin-bottom: 8px; font-size: 1.3rem; font-weight: 600; } p { padding: 0; font-size: 1.2rem; } `,n0=r.div` img { display: block; width: 100%; max-width: 100%; } `,o0=r.section` padding: 20px 0; ${bo}; display: flex; flex-direction: column; gap: 8px; `,r0=r.section` padding: 24px 0; `,i0=r.p` font-size: 1.2rem; color: #84858a; `,s0=r.span` margin: 0 4px; width: 1px; height: 8px; background-color: #e9eaef; `,a0=r.section` padding: 24px 0 48px 0; `,c0=r.ul` display: flex; border-bottom: 1px solid #f2f3f5; background-color: var(--color-white); li { flex: 1; } `,l0=r.li` position: relative; font-size: 1.5rem; ${({$isSelected:e})=>e?T.bold:T.regular}; text-align: center; color: ${({$isSelected:e})=>e?"#1E1E22":"#84858A"}; cursor: pointer; button { width: 100%; height: 100%; padding: 12.5px 0; font-weight: inherit; &::after { content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background-color: #161a2a; border-radius: 3px; transform: scaleX(0); transition: transform 0.3s ease-in-out; } &[aria-selected='true']::after { transform: scaleX(1); } } span { font-size: 1.2rem; font-weight: inherit; } `,d0=r.div` position: fixed; bottom: 0; ${z}; z-index: 1005; gap: 5.5px; padding: 8px; width: 100%; /* max-width: ${gt.SM}px; */ max-width: 600px; background-color: var(--color-white); `,u0=r.button.attrs({type:"button"})` ${z}; padding: 14px; border: 1px solid #e9eaef; border-radius: 8px; `,p0=r.button.attrs({type:"button"})` flex: 1; padding: 13.5px 0; border: 1px solid var(--color-sub); border-radius: 8px; color: var(--color-white); span { font-size: 1.6rem; ${T.medium}; color: var(--color-sub); } `,m0=r.button.attrs({type:"button"})` flex: 1; padding: 13.5px 0; background-color: var(--color-sub); border-radius: 8px; span { font-size: 1.6rem; ${T.medium}; color: var(--color-white); } `,h0=r.button.attrs({type:"button"})` flex: 1; padding: 13.5px 0; background-color: #e9eaef; border-radius: 8px; span { font-size: 1.6rem; ${T.medium}; ${T.medium}; color: #b3b4b9; } `,x0=r(W)` ${z}; flex-direction: column; gap: 4px; width: 108px; height: 108px; span { font-size: 1.3rem; ${T.regular}; } `,Vi=r(Le)` ${z}; `;Vi.displayName="SwiperSlide";const k={ContainerWrapper:jh,Container:Lh,ContentsContainerWrapper:Ih,ThumbnailImage:Nh,RateContainer:qh,ReviewList:Kh,ReviewListItem:Qh,Rate:Zh,PlaceOriginLabel:Wh,ProductInfoContainer:kh,AdditionalInfoContainer:Rh,InfoContentsContainer:$h,MaxBenefit:Oh,InfoButton:_h,CouponDownloadButton:Mh,PriceContainer:Bh,PriceBox:Dh,DiscountRate:Hh,Price:Uh,SalePrice:Fh,ShareButton:Gh,ProductInfoTitle:zh,BrandNameLink:Vh,ProductName:Yh,ProductInfoContentsContainer:Xh,ProductInfo:Jh,ContentsContainer:e0,TabList:c0,TabListItem:l0,PartnerNotice:t0,PartnerNoticeContent:n0,Description:o0,ProductInquiry:r0,PartnerInfo:a0,ButtonContainer:d0,WishButton:u0,CartButton:p0,OrderButton:m0,SoldOutButton:h0,MoreLink:x0,MoreSwiperSlide:Vi,SubPayInfo:i0,SubPayInfoLine:s0},g0=(e,n)=>{switch(n.type){case"OPTION_ADD":return U(e,zs(n.payload),Gs(o=>o.optionNo),ae);case"OPTION_DELETE":return e.filter(o=>o.optionNo!==n.payload.optionNo);case"OPTION_COUNT_UP":return e.map(o=>({...o,orderCnt:o.optionNo===n.payload.optionNo?o.orderCnt+1:o.orderCnt}));case"OPTION_COUNT_DOWN":return e.map(o=>({...o,orderCnt:o.optionNo===n.payload.optionNo?Math.max(o.orderCnt-1,1):o.orderCnt}));case"OPTION_COUNT_CHANGE":return e.map(o=>({...o,orderCnt:o.optionNo===n.payload.optionNo?n.payload.orderCnt:o.orderCnt}));case"OPTION_RESET":return Yi;default:return e}},Yi=[],f0=()=>{const[e,n]=s.useReducer(g0,Yi);return{state:e,dispatch:n}},y0=({productCount:e})=>{var n;(n=window.AM_PRODUCT)==null||n.call(window,e)},l2=({productNo:e,count:n})=>{var i;const o="a"+String(e);(i=window.AM_INOUT)==null||i.call(window,o,n),window.AM_Cart&&window.AM_Cart[o]&&(window.AM_Cart[o].qy=n)},d2=({productList:e})=>{e.forEach(n=>{var i;const o="a"+String(n.productNo);(i=window.AM_DEL)==null||i.call(window,o,n.count),window.AM_Cart&&window.AM_Cart[o]&&delete window.AM_Cart[o]})},E0=e=>{e&&(window.m_skey=e)},C0=e=>s.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M10 18C10 18 0 12.3609 0 5.59388C0 -1.17312 7.77778 -1.73704 10 3.55748C12.2222 -1.73704 20 -1.17312 20 5.59388C20 12.3609 10 18 10 18Z",fill:"#FF5F00"})),w0=e=>s.createElement("svg",{width:20,height:18,viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M10 18C10 18 0 12.3609 0 5.59388C0 -1.17312 7.77778 -1.73704 10 3.55748C12.2222 -1.73704 20 -1.17312 20 5.59388C20 12.3609 10 18 10 18Z",fill:"#E9EAEF"})),b0=s.lazy(()=>B(()=>import("./index-jTWQh7in.js"),__vite__mapDeps([66,1,2,3,4,5,6,7,8,9,10,11,12,13,39,59,60,22,23,24,25,17,18,61,62,63,21,67,27,31,32,33,34,35,36,16,19,20,37,38,29,30,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,64,65]))),S0=/iPad|iPhone|iPod/.test(navigator.userAgent),qi=({productNo:e})=>{const{openDialog:n}=Et(),o=Ht(),i=Ce(),[a]=Tt(),l=a.get("preview"),d=a.get("channelType"),{data:u}=$o({productNo:e,searchParams:l?{preview:!!l}:{}}),[c,m]=s.useState(!1),{isLogin:x}=Pe(),{like:{mutate:E}}=Ph(),S=async N=>{if(!x){await n("로그인 후 관심 상품을 추가해 주세요.",[{type:"cancel",label:"닫기"},{type:"ok",label:"로그인"}])&&i(`${p.AUTH.LOGIN}?returnUrl=${window.location.pathname}`);return}E({data:{items:N.map(I=>({...I,partnerNo:u==null?void 0:u.partner.partnerNo}))}},{onSuccess:()=>{o.invalidateQueries({predicate:I=>Ke(I.queryKey[0],[...fe.all])}),o.invalidateQueries({predicate:I=>Ke(I.queryKey[1],[...fe.likes()]),refetchType:"inactive"})},onError:I=>{var D;n(Ue(I)?(D=I.response)==null?void 0:D.data.message:"알 수 없는 오류가 발생했습니다.")}})},f=ei(),{state:C,dispatch:A}=f0(),v=vh(),{data:w}=Kd({productNo:e}),g=s.useMemo(()=>!!w&&w.type==="DEFAULT",[w]),b=U(C,Xe(N=>N.orderCnt),Pn),P=async()=>{if(m(!0),c){if(!(u!=null&&u.limitations.canAddToCart)){n("해당 상품은 장바구니에 담을 수 없습니다.");return}if(C.length===0){n("옵션을 먼저 선택해주세요.");return}if(y0({productCount:b}),x)v.mutate(C,{onSuccess:async()=>{const N=await n(`${C.length}개의 상품을 장바구니에 담았습니다.`,[{type:"cancel",label:"닫기"},{type:"ok",label:"장바구니 보기"}]);g||A({type:"OPTION_RESET"}),o.invalidateQueries({predicate:I=>Ke(I.queryKey[0],[...St.all])}),N&&i(p.CART)},onError:N=>{var I;n(Ue(N)?((I=N.response)==null?void 0:I.data.message)??"장바구니 담기에 실패했습니다.":"장바구니 담기에 실패했습니다.")}});else{const N=await n(`${C.length}개의 상품을 장바구니에 담았습니다.`,[{type:"cancel",label:"닫기"},{type:"ok",label:"장바구니 보기"}]);f(Hc(C)),g||A({type:"OPTION_RESET"}),N&&i(p.CART)}}},{write:{mutate:L}}=Ah(),O=()=>{m(!0);const N={products:U(C,Xe(I=>({productNo:e,optionNo:I.optionNo,orderCnt:I.orderCnt})),ae)};if(c){if(N.products.length===0){n("옵션을 먼저 선택해주세요.");return}L({data:d!==null?{...N,channelType:d}:N},{onSuccess:({data:I})=>{x?i({pathname:`${p.ORDER.MAIN}/${I.orderSheetNo}`}):i({pathname:p.AUTH.LOGIN,search:`returnUrl=${p.ORDER.MAIN}/${I.orderSheetNo}`},{state:{type:"guestOrder"}})},onError:async I=>{var D,$;if(Ue(I)&&((D=I.response)==null?void 0:D.data.code)==="PPVE0004"){await n("비회원 구매 불가 상품입니다.
로그인 후 구매해주세요.",[{type:"cancel",label:"닫기"},{type:"ok",label:"로그인"}])&&i(`${p.AUTH.LOGIN}?returnUrl=${window.location.pathname}`);return}n(Ue(I)?(($=I.response)==null?void 0:$.data.message)??"알 수 없는 오류가 발생했습니다.":"알 수 없는 오류가 발생했습니다.")}})}},y=!!u&&Gi(u.status.soldout,u.stock.stockCnt);return t.jsxs(t.Fragment,{children:[t.jsxs(k.ButtonContainer,{style:{borderTop:c?"none":"1px solid #f2f3f5",paddingBottom:S0?"max(calc(8px + env(safe-area-inset-bottom)), 34px)":"8px"},children:[t.jsx(k.WishButton,{onClick:()=>S([{productNo:e,like:u!=null&&u.liked?"N":"Y"}]),children:u!=null&&u.liked?t.jsx(C0,{}):t.jsx(w0,{})}),y?t.jsx(k.SoldOutButton,{disabled:!0,children:t.jsx("span",{children:"품절"})}):t.jsxs(t.Fragment,{children:[t.jsx(k.CartButton,{onClick:P,children:t.jsx("span",{children:"장바구니"})}),t.jsx(k.OrderButton,{onClick:O,children:t.jsx("span",{children:"구매하기"})})]})]}),t.jsx(b0,{productNo:e,isVisible:c,setIsVisible:m,state:C,dispatch:A})]})},T0=r.div` display: flex; flex-direction: column; gap: 8px; `,v0=r.dl` display: flex; gap: 12px; font-size: 1.4rem; ${T.regular}; dt { color: var(--color-textGray); width: 100%; max-width: 100px; } dd { color: var(--color-textPrimary); } `,pt={Container:T0,List:v0},A0=({partner:e})=>e&&t.jsxs(pt.Container,{children:[t.jsxs(pt.List,{children:[t.jsx("dt",{children:"상호명"}),t.jsx("dd",{children:e.companyName})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"대표자"}),t.jsx("dd",{children:e.ownerName})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"대표번호"}),t.jsx("dd",{children:e.phoneNo})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"사업자번호"}),t.jsx("dd",{children:e.businessRegistrationNo})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"주소"}),t.jsx("dd",{dangerouslySetInnerHTML:{__html:e.officeAddressLabel.split("
")[0]}})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"통신판매신고번호"}),t.jsx("dd",{children:e.onlineMarketingBusinessDeclarationNo})]}),t.jsxs(pt.List,{children:[t.jsx("dt",{children:"대표이메일"}),t.jsx("dd",{children:e.email})]})]}),P0=r.div` padding: 24px 20px; max-height: 75vh; overflow: auto; `,j0=r.h6` font-size: 1.5rem; ${T.medium}; text-align: left; color: var(--color-textPrimary); margin-bottom: 24px; `,I0=r.form` display: flex; flex-direction: column; gap: 12px; `,L0=r.div` margin-bottom: 32px; display: flex; flex-direction: column; gap: 12px; `,N0=r.input` width: 100%; border: 1px solid #e9eaef; border-radius: 8px; padding: 14.5px 16px; font-size: 1.5rem; ${T.regular}; text-align: left; color: var(--color-textPrimary); `,k0=r.div` display: flex; flex-direction: column; gap: 16px; `,R0=r.div` display: flex; flex-direction: column; gap: 16px; position: relative; `,$0=r.textarea` font-size: 1.5rem; ${T.regular}; line-height: 19.5px; border: 1px solid #e9eaef; border-radius: 8px; padding: 18px 16px 14px 16px; position: relative; min-height: 164px; resize: none; &:focus { border-color: #000000; outline: none; } `,O0=r.span` position: absolute; bottom: 14px; right: 16px; font-size: 1.2rem; color: #888; font-size: 1.2rem; ${T.regular}; line-height: 14.4px; text-align: right; b { color: #000; } `,_0=r.div` padding: 16px; background: #f6f6fa; border: 1px solid #e9eaef; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; color: #84858a; margin-bottom: 45px; `,M0=r.h6` font-size: 1.3rem; ${T.bold}; display: flex; align-items: center; gap: 4px; svg { width: 18px; height: 18px; } `,B0=r.ul` display: flex; flex-direction: column; gap: 4px; li { position: relative; padding-left: 10px; &::before { position: absolute; content: '·'; left: 0; width: 10px; display: inline-block; } } `,D0=r.div` padding: 12px 0; `,H0=r.button.attrs({type:"submit"})` width: 100%; border-radius: 8px; ${z}; color: ${({disabled:e})=>e?"#B3B4B9":"#ffffff"}; background-color: ${({disabled:e})=>e?"#E9EAEF":"#0D0F71"}; padding: 15.5px 0; span { font-size: 1.6rem; ${T.medium}; } `,U0=r.span` font-size: 1.3rem; ${T.regular}; color: var(--color-textPrimary); `,F0=r.p` color: var(--color-main); font-size: 1.2rem; margin-left: 5px; `,G0=r.p` font-size: 1.5rem; ${T.regular}; color: var(--color-textPrimary); `,le={Container:P0,ProudctName:j0,Form:I0,FormContainer:L0,Input:N0,ContentsContainer:k0,TextAreaContainer:R0,TextArea:$0,TextCount:O0,ButtonContainer:D0,InquiryButton:H0,NoticeContainer:_0,NoticeTitle:M0,NoticeList:B0,SecretCheckLabelText:U0,ErrorText:F0,FormatOptionLabel:G0},z0=r.label` display: flex; align-items: center; gap: 8px; cursor: pointer; width: fit-content; `,V0=r.p` font-size: 1.4rem; color: var(--color-textPrimary); `,Y0=r.input` cursor: pointer; ${da}; `,fr={Label:z0,LabelText:V0,HiddenCheckbox:Y0},q0=e=>s.createElement("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("rect",{x:1,y:1,width:20,height:20,rx:3,fill:"#FF5F00"}),s.createElement("path",{d:"M17 8L10.4211 16L6 11.9167",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),W0=e=>s.createElement("svg",{width:20,height:20,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("rect",{x:1,y:1,width:20,height:20,rx:3,fill:"white",stroke:"#E9EAEF",strokeWidth:1})),Wi=s.forwardRef(({register:e,checked:n,labelStyle:o,labelElement:i,...a},l)=>t.jsxs(fr.Label,{style:o,children:[n?t.jsx(q0,{}):t.jsx(W0,{}),t.jsx(fr.HiddenCheckbox,{checked:n,type:"checkbox",readOnly:!0,...a,...e,ref:l}),i]}));Wi.displayName="CheckBox";const K0=({productNo:e,inquiryNo:n,options:o})=>se({queryKey:he.detail(e,n),queryFn:async()=>{const{data:i}=await _t.getProductInquiry(e,n);return i},enabled:n!==0&&e!==0,...o}),an=e=>s.createElement("svg",{width:14,height:15,viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:7,cy:7.5,r:6.5,fill:"#C2C3C8",stroke:"#C2C3C8"}),s.createElement("path",{d:"M7.99989 4.50211C8.00831 5.0518 7.54939 5.5 6.99784 5.5C6.46734 5.5 6.00421 5.0518 6 4.50211C6.00421 3.9482 6.46734 3.5 6.99784 3.5C7.54939 3.5 8.00831 3.9482 7.99989 4.50211Z",fill:"white"}),s.createElement("path",{d:"M7 7V11",stroke:"white",strokeWidth:1.6,strokeLinecap:"round"})),Ki=({productNo:e,productName:n,inquiryNo:o=0,isVisible:i,setIsVisible:a})=>{const{openDialog:l}=Et(),{data:d}=Kr(),u=Ht(),{data:c}=K0({productNo:e,inquiryNo:o,options:{enabled:i&&o!==0&&e!==0}}),m=s.useMemo(()=>d?U(d,ln("productInquiryType")):[],[d]),{control:x,register:E,setValue:S,handleSubmit:f,formState:{errors:C}}=Pr({defaultValues:{title:"",content:"",isSecreted:!1}}),A=Vn({control:x,name:"title"}),v=Vn({control:x,name:"content"}),w=Vn({control:x,name:"isSecreted"}),g=!X(A)&&!X(v),b=!!o&&!!c,[P,L]=s.useState(!1);s.useEffect(()=>{if(!b)return;const I=m.find(D=>D.value===(c==null?void 0:c.type));L(!0),S("title",c==null?void 0:c.title),S("content",c==null?void 0:c.content),S("isSecreted",c==null?void 0:c.secreted),I&&S("type",I)},[b]);const{register:{mutate:O},modify:{mutate:y}}=zi(),N=f(({title:I,content:D,type:$,isSecreted:F})=>{b?y({inquiryNo:o,data:{title:I,content:D,type:$==null?void 0:$.value,secreted:!!F,tagValueNos:[]}},{onSuccess:async()=>{await l("상품 문의가 수정되었습니다."),u.invalidateQueries({queryKey:he.detail(e,o)}),u.invalidateQueries({queryKey:he.lists(),refetchType:"all"}),u.invalidateQueries({queryKey:he.myLists()}),a(!1)},onError:pe=>{var me;l(Ue(pe)?((me=pe.response)==null?void 0:me.data.message)??"상품 문의 수정에 실패했습니다.
관리자에게 문의해주세요.":"상품 문의 수정에 실패했습니다.
관리자에게 문의해주세요.")}}):O({productNo:e,data:{title:I,content:D,productNo:e,type:$==null?void 0:$.value,secreted:!!F}},{onSuccess:async({data:pe})=>{pe.inquiryNo&&(await l("상품 문의가 완료되었습니다."),u.invalidateQueries({queryKey:he.lists()}),u.invalidateQueries({queryKey:he.myLists(),refetchType:"all"}),a(!1))},onError:pe=>{var me;l(Ue(pe)?((me=pe.response)==null?void 0:me.data.message)??"상품 문의에 실패했습니다.
관리자에게 문의해주세요.":"상품 문의에 실패했습니다.
관리자에게 문의해주세요.")}})});return t.jsx(Nr,{id:"shareBottomSheet",title:"상품 문의하기",isVisible:i,setIsVisible:a,children:t.jsxs(le.Container,{children:[t.jsx(le.ProudctName,{children:n}),t.jsxs(le.Form,{onSubmit:N,children:[t.jsxs(le.FormContainer,{children:[t.jsx(sa,{control:x,name:"type",rules:{required:"문의 종류를 선택해주세요."},render:({field:{onChange:I,ref:D}})=>t.jsx(ca,{name:"type",placeholder:"문의 종류 선택",isSearchable:!1,options:m,ref:D,value:P?m.find($=>$.value===(c==null?void 0:c.type)):void 0,styles:{control:$=>({...$,borderRadius:"8px",height:"48px",borderColor:C.type?"#000000":"#E9EAEF","&:focus":{borderColor:"#000000"}}),placeholder:$=>({...$,fontSize:"15px",fontWeight:"400",padding:"0 16px",color:"#3a3a3f"}),valueContainer:$=>({...$,padding:0}),singleValue:$=>({...$,fontSize:"15px",fontWeight:"400",color:"#3A3A3F",display:"flex",alignItems:"center",padding:"0 16px",marginLeft:0}),indicatorSeparator:$=>({...$,display:"none"}),option:($,F)=>({...$,backgroundColor:F.isSelected?"#E9EAEF":F.isFocused?"#F0F0F5":$.backgroundColor,"&:hover":{backgroundColor:F.isSelected?"#D0D0D5":"#F0F0F5"}})},formatOptionLabel:({label:$})=>t.jsx(le.FormatOptionLabel,{children:$}),onChange:$=>{L(!1),I($)}})}),t.jsx(rn,{errors:C,name:"type",render:({message:I})=>t.jsx(le.ErrorText,{children:I})}),t.jsx(le.Input,{placeholder:"제목을 작성해주세요.",...E("title",{required:{value:!0,message:"제목을 입력해주세요."}})}),t.jsx(rn,{errors:C,name:"title",render:({message:I})=>t.jsx(le.ErrorText,{children:I})}),t.jsxs(le.ContentsContainer,{children:[t.jsxs(le.TextAreaContainer,{children:[t.jsx(le.TextArea,{placeholder:"내용을 작성해주세요.",...E("content",{required:{value:!0,message:"내용을 입력해주세요."},maxLength:{value:1e3,message:"1000자 이하로 입력해주세요."}})}),t.jsx(le.TextCount,{dangerouslySetInnerHTML:{__html:`${v.length} / 1,000`}})]}),t.jsx(rn,{errors:C,name:"content",render:({message:I})=>t.jsx(le.ErrorText,{children:I})}),t.jsx(Wi,{checked:!!w,labelElement:t.jsx(le.SecretCheckLabelText,{children:"비밀글로 문의하기"}),...E("isSecreted")})]})]}),t.jsxs(le.NoticeContainer,{children:[t.jsxs(le.NoticeTitle,{children:[t.jsx(an,{}),"유의사항"]}),t.jsx(le.NoticeList,{children:t.jsx("li",{children:"성격에 맞지않는 글, 비방성 글, 음람글, 욕설 등은 통보 없이 이동 또는 삭제될 수 있습니다."})})]}),t.jsx(le.ButtonContainer,{children:t.jsx(le.InquiryButton,{disabled:!g,children:t.jsx("span",{children:o?"수정하기":"등록하기"})})})]})]})})},Q0=Object.freeze(Object.defineProperty({__proto__:null,default:Ki},Symbol.toStringTag,{value:"Module"})),Z0=r.div` display: flex; flex-direction: column; gap: 20px; `,X0=r.div` padding: 16px; background: #f6f6fa; border: 1px solid #e9eaef; border-radius: 8px; display: flex; flex-direction: column; gap: 8px; color: #84858a; `,J0=r.h6` font-size: 1.3rem; ${T.bold}; display: flex; align-items: center; gap: 4px; svg { width: 18px; height: 18px; } `,ex=r.ul` display: flex; flex-direction: column; gap: 4px; li { position: relative; padding-left: 10px; &::before { position: absolute; content: '·'; left: 0; width: 10px; display: inline-block; } } `,tx=r.button.attrs({type:"button"})` border-radius: 8px; border: 1px solid #0d0f71; width: 100%; ${z}; padding: 13.5px 0; span { font-size: 1.6rem; ${T.medium}; color: #0d0f71; } `,nx=r.ul``,ox=r.li` padding: 20px 0; border-bottom: 1px solid #f2f3f5; `,rx=r.div` display: flex; flex-direction: column; gap: 12px; `,ix=r.div` header { padding: 0; } h4 { font-size: 1.4rem; ${T.regular}; color: var(--color-textPrimary); } `,sx=r.div` display: flex; justify-content: space-between; `,ax=r.div` display: flex; gap: 8px; margin-top: 12px; font-size: 1.4rem; `,cx=r.span` color: var(--color-textGray); `,lx=r.span` color: var(--color-textPrimary); `,dx=r.div` display: flex; justify-content: space-between; align-items: center; `,ux=r.span` font-size: 1.4rem; ${T.medium}; color: ${({$replied:e})=>e?"#007AFB":"#84858A"}; display: flex; align-items: center; gap: 6px; small { font-size: 1.2rem; ${T.regular}; color: #b3b4b9; } `,px=r.span` font-size: 1.2rem; color: #b3b4b9; `,mx=r.p` font-size: 1.4rem; ${T.regular}; color: ${({$secreted:e})=>e?"#B3B4B9":"#3A3A3F"}; display: flex; justify-content: flex-start; align-items: center; gap: 2px; `,hx=r.button` svg { transform: ${({$isOpened:e})=>e?"rotate(180deg)":"rotate(0)"}; } `,xx=r.div` display: flex; align-items: center; gap: 8px; button { font-size: 1.3rem; ${T.regular}; color: var(--color-textGray); } `,gx=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin: 10px 0 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,ne={Container:Z0,NoticeContainer:X0,NoticeTitle:J0,NoticeList:ex,InquiryButton:tx,List:nx,ListItem:ox,Contents:rx,Accordion:ix,ContentsBox:sx,ReplyContents:ax,InfoText:cx,ReplyText:lx,StatusContainer:dx,Status:ux,RegisterYmdt:px,Title:mx,ArrowButton:hx,ButtonContainer:xx,MoreButton:gx},fx=({productNo:e,searchParams:n,options:o})=>Ut({queryKey:he.infiniteList(e,n),queryFn:async({pageParam:i})=>{const{data:a}=await _t.getProductInquiries(e,n?{...n,pageNumber:i}:void 0);return{data:a,pageNumber:i}},getNextPageParam:(i,a)=>{if(n!=null&&n.pageSize)return n.pageSize*a.lengths.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M7 8V5.77778C7 5.04107 7.31607 4.33453 7.87868 3.81359C8.44129 3.29266 9.20435 3 10 3C10.7956 3 11.5587 3.29266 12.1213 3.81359C12.6839 4.33453 13 5.04107 13 5.77778V8",stroke:"#C2C3C8",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4 8.9C4 8.40294 4.38376 8 4.85714 8H15.1429C15.6162 8 16 8.40294 16 8.9V16.1C16 16.5971 15.6162 17 15.1429 17H4.85714C4.38376 17 4 16.5971 4 16.1V8.9Z",stroke:"#C2C3C8",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("circle",{cx:10,cy:12,r:.5,fill:"#C2C3C8",stroke:"#C2C3C8"})),yx=({productNo:e,onButtonClick:n})=>{const o=Ht(),{data:i,hasNextPage:a,fetchNextPage:l}=fx({productNo:e,searchParams:{startYmd:Y().subtract(1,"year").format("YYYY-MM-DD"),pageNumber:1,pageSize:10,hasTotalCount:!0,isMyInquiries:!1}}),{openDialog:d}=Et(),{delete:{mutate:u}}=zi(),[c,m]=s.useState(!1),[x,E]=s.useState(0),[S,f]=s.useState(""),C=({inquiryNo:v,productName:w})=>{c||(E(v),f(w),m(!0))},A=async({inquiryNo:v})=>{await d("상품 문의를
삭제하시겠습니까?",[{type:"cancel",label:"아니요"},{type:"ok",label:"삭제하기"}])&&u({inquiryNo:v},{onSuccess:({data:w})=>{o.invalidateQueries({queryKey:he.lists(),refetchType:"all"}),o.invalidateQueries({queryKey:he.myLists()})},onError:w=>{var g;d(Ue(w)?((g=w.response)==null?void 0:g.data.message)??"알 수 없는 오류가 발생했습니다.":"알 수 없는 오류가 발생했습니다.")}})};return t.jsxs(t.Fragment,{children:[t.jsxs(ne.Container,{children:[t.jsxs(ne.NoticeContainer,{children:[t.jsxs(ne.NoticeTitle,{children:[t.jsx(an,{}),"상품문의 안내"]}),t.jsxs(ne.NoticeList,{children:[t.jsx("li",{children:"상품에 대해 궁굼한 내용을 문의해주세요"}),t.jsx("li",{children:"주문/배송 문의는 주문AS, 1:1문의로 문의해 주세요"})]})]}),t.jsx(ne.InquiryButton,{onClick:n,children:t.jsx("span",{children:"상품 문의하기"})}),t.jsx(ne.List,{children:i==null?void 0:i.pages.map(v=>{var w;return(w=v.data.items)==null?void 0:w.map(g=>t.jsx(ne.ListItem,{children:t.jsxs(ne.Contents,{children:[t.jsxs(ne.StatusContainer,{children:[t.jsxs(ne.Status,{$replied:g.replied,children:[g.replied?"답변완료":"답변대기",t.jsx("small",{children:g.memberId})]}),t.jsx(ne.RegisterYmdt,{children:Y(g.registerYmdt).format("YYYY.MM.DD")})]}),g.replied?g.secreted&&!g.myInquiry?t.jsx(ne.ContentsBox,{children:t.jsx(ne.Title,{$secreted:g.secreted&&!g.myInquiry,children:g.secreted&&!g.myInquiry?t.jsxs(t.Fragment,{children:[t.jsx(yr,{}),t.jsx("span",{children:"비밀글입니다."})]}):g.title})}):t.jsx(ne.Accordion,{children:t.jsx(Mt,{title:g.title,children:t.jsx(ne.ReplyContents,{children:g.answers.map(b=>t.jsxs(s.Fragment,{children:[t.jsx(ne.InfoText,{children:"답변"}),t.jsx(ne.ReplyText,{children:b.content})]},b.inquiryNo))})})}):t.jsx(ne.ContentsBox,{children:t.jsx(ne.Title,{$secreted:g.secreted&&!g.myInquiry,children:g.secreted&&!g.myInquiry?t.jsxs(t.Fragment,{children:[t.jsx(yr,{}),t.jsx("span",{children:"비밀글입니다."})]}):g.title})}),g.myInquiry&&t.jsxs(ne.ButtonContainer,{children:[t.jsx("button",{onClick:()=>C({inquiryNo:g.inquiryNo,productName:g.productName}),children:t.jsx("span",{children:"수정"})}),t.jsx("button",{onClick:()=>A({inquiryNo:g.inquiryNo}),children:t.jsx("span",{children:"삭제"})})]})]})},g.inquiryNo))})}),a&&t.jsx(ne.MoreButton,{onClick:()=>l(),children:t.jsx("span",{children:"더보기"})})]}),t.jsx(Ki,{isVisible:c,setIsVisible:m,productNo:e,inquiryNo:x,productName:S})]})},Ex=r.div` > a { display: flex; flex-direction: column; gap: 6px; } `,Cx=r.div` position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; img { width: 100%; object-fit: cover; } `,wx=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.16); backdrop-filter: blur(5px); color: var(--color-white); svg { position: absolute; top: 8px; right: 8px; width: 18px; } `,bx=r.p` font-size: 1.3rem; ${T.bold} word-break: keep-all; `,Sx=r.div` position: absolute; top: 0; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); `,Tx=r.p` font-size: 1.6rem; ${T.medium} text-align: center; word-break: keep-all; line-height: 1; color: var(--color-white); `,vx=r.div` display: flex; flex-direction: column; gap: 4px; `,Ax=r.div``,Px=r.p``,jx=r.p` font-size: 1.3rem; line-height: 1.2; ${Co(2)} color: var(--color-textPrimary); `,Ix=r.div` > p { line-height: 1.3; } `,Lx=r.p` margin-bottom: 2px; font-size: 1.2rem; ${T.medium} color: var(--color-highlight); `,Nx=r.p` margin-bottom: 2px; font-size: 1.2rem; ${T.medium} color: var(--color-highlight); `,kx=r.p` font-size: 1.2rem; text-decoration: line-through; color: var(--color-textLightGray); `,Rx=r.div` display: flex; align-items: center; gap: ${({$isOverMillion:e})=>e?"3px":"5px"}; font-size: ${({$isOverMillion:e})=>e?"1.3rem":"1.4rem"}; ${T.bold}; line-height: 1.2; color: var(--color-textPrimary); `,$x=r.span` color: var(--color-highlight); `,Ox=r.span` ${({$isExecutive:e})=>e&&re` text-decoration: line-through; `} `,_x=r.div` display: flex; gap: 8px; margin-top: 2px; font-size: 1.2rem; color: var(--color-textGray); `,Mx=r.div` ${z}; gap: 2px; `,Bx=r.span``,Re={Container:Ex,Thumbnail:Cx,AdultDimmed:wx,AdultText:bx,SoldOutDimmed:Sx,SoldOutText:Tx,Info:vx,NameBox:Ax,BrandName:Px,ProductName:jx,PriceBox:Ix,CouponText:Lx,ExecutivesText:Nx,OriginPrice:kx,Price:Rx,DiscountRate:$x,ProductPrice:Ox,AddInfoBox:_x,DeliveryType:Bx,ReviewCountContainer:Mx},Dx=({products:e})=>{const[n,o]=s.useState(!1),{data:i}=we(),a=s.useMemo(()=>{if(!e.adult)return!1;if(!i||!i.adultCertificated)return!0;const d=i.adultCertificatedYmdt?Y(i.adultCertificatedYmdt):null;if(!d)return!0;const u=Y().subtract(3,"month");return d.isBefore(u)},[e.adult,i]),l=d=>{a&&(d.preventDefault(),o(!0))};return t.jsxs(t.Fragment,{children:[t.jsx(Re.Container,{children:t.jsxs(W,{to:`${p.PRODUCT.LIST}/${e.productNo}`,onClick:l,children:[t.jsxs(Re.Thumbnail,{children:[t.jsx("img",{src:e.imageUrls[0],alt:e.productName}),e.adult&&a&&t.jsxs(Re.AdultDimmed,{children:[t.jsx(Pi,{}),t.jsx(Re.AdultText,{children:"성인인증 필요"})]}),e.isSoldOut&&t.jsx(Re.SoldOutDimmed,{children:t.jsx(Re.SoldOutText,{children:"SOLD OUT"})})]}),t.jsxs(Re.Info,{children:[t.jsx(Re.NameBox,{children:t.jsx(Re.ProductName,{dangerouslySetInnerHTML:{__html:e.productName}})}),t.jsx(de,{suspenseFallback:t.jsx(t.Fragment,{}),children:t.jsx(Ai,{products:e,isSmallCard:!0})}),t.jsxs(Re.AddInfoBox,{children:[e.totalReviewCount>0&&t.jsxs(Re.ReviewCountContainer,{children:[t.jsx(ji,{}),t.jsx("span",{children:e.totalReviewCount>1e3?"999+":e.totalReviewCount})]}),Ke(e.deliveryConditionType,["FREE","무료배송"])&&t.jsx(Re.DeliveryType,{children:"무료배송"})]})]})]})}),t.jsx(zt,{isVisible:n,setIsVisible:o,productNo:e.productNo})]})},Hx=r.div` padding: 20px; background-color: white; margin-bottom: 8px; margin-right: -20px; `,Ux=r.h3` margin-bottom: 12px; font-size: 1.6rem; ${T.bold}; color: var(--color-textSecondary); `,Qi=r(Le)` img { width: 100%; border-radius: 8px; object-fit: cover; } `;Qi.displayName="SwiperSlide";const no={Container:Hx,Title:Ux,CustomSwiperSlide:Qi},Er=({title:e,searchParams:n={pageNumber:1,pageSize:10},moreSlide:o})=>{const{data:i}=Wd({searchParams:n}),a=s.useMemo(()=>({spaceBetween:8,slidesPerView:3.13,autoHeight:!0}),[]);return(i==null?void 0:i.items.length)>0&&t.jsxs(no.Container,{children:[e&&t.jsx(no.Title,{children:e}),t.jsxs(_e,{...a,children:[i.items.map(d=>{var u;return t.jsx(no.CustomSwiperSlide,{children:t.jsx(Dx,{products:{...d,isSoldOut:Gi(d.isSoldOut,d.stockCnt),deliveryConditionType:((u=d.deliveryConditionInfo)==null?void 0:u.summary)||null}})},d.productNo)}),o]})]})},Fx=r.div``,Gx=r.div` ${z}; gap: 8px; padding: 28px 0; `,zx=r.ul` display: flex; gap: 3px; `,Vx=r.li` ${z}; svg { width: 20px; height: 21px; } `,Yx=r.ul` display: flex; gap: 1px; `,qx=r.li` svg { width: 11px; height: 11px; } `,Wx=r.span` font-size: 1.8rem; ${T.bold}; color: var(--color-textLightGray); strong { color: var(--color-textPrimary); } `,Kx=r.span` color: var(--color-textPrimary); font-size: 1.4rem; ${T.regular}; strong { ${T.bold}; } `,Qx=r.div` ${z}; justify-content: space-between; padding: 8px 0 12px 0; `,Zx=r.ul` padding: 12px 0; `,Xx=r.li` padding: 20px 0; display: flex; flex-direction: column; gap: 16px; border-bottom: 1px solid #f2f3f5; `,Jx=r.div` display: flex; flex-direction: column; gap: 8px; `,eg=r.p` font-size: 1.4rem; ${T.regular}; color: var(--color-textPrimary); cursor: ${({$isPointer:e})=>e?"pointer":"default"}; `,tg=r.p` font-size: 1.2rem; ${T.regular}; color: #b3b4b9; `,ng=r.ul` display: flex; gap: 2px; overflow: hidden; li:first-of-type { border-top-left-radius: 8px; border-bottom-left-radius: 8px; } li:last-of-type { border-top-right-radius: 8px; border-bottom-right-radius: 8px; } li:only-child { border-radius: 8px; } li { aspect-ratio: 1/1; overflow: hidden; } li img { display: inline-block; font-size: 0; } `,og=r.span` font-size: 1.2rem; ${T.regular}; color: #b3b4b9; `,rg=r.div` display: flex; justify-content: space-between; align-items: center; `,ig=r.div` display: flex; gap: 6px; `,sg=r.span` font-size: 1.2rem; ${T.regular}; color: #b3b4b9; `,ag=r.button.attrs({type:"button"})` width: 100%; padding: 10px; border-radius: 8px; border: 1px solid #d4d5da; margin: 10px 0 24px; height: 44px; font-size: 1.5rem; color: var(--color-textSecondary); `,q={Container:Fx,RateContainer:Gx,StarList:zx,StarListItem:Vx,ContentsStarList:Yx,ContentsStarListItem:qx,Rate:Wx,Count:Kx,SortContainer:Qx,ReviewList:Zx,ReviewListItem:Xx,ReviewImageList:ng,ContentsContainer:Jx,Contents:eg,ProductName:tg,RegisterYmdt:og,ReviewHeader:rg,NameContainer:ig,MemberName:sg,MoreButton:ag},cg=({productNo:e,searchParams:n,options:o})=>Ut({queryKey:ge.infiniteList(e,n),queryFn:async({pageParam:i})=>{const{data:a}=await hi.getProductReviewList(e,{...n,pageNumber:i});return{data:a,pageNumber:i}},initialPageParam:1,getNextPageParam:(i,a)=>{if(n.pageSize)return n.pageSize*a.length{var x,E,S;const[o,i]=s.useState({by:"BEST_REVIEW",direction:"DESC"}),a=f=>{i({by:f.by,direction:f.direction})},l=Ce(),{data:d,hasNextPage:u,fetchNextPage:c}=cg({productNo:e,searchParams:{pageNumber:1,pageSize:10,hasTotalCount:!0,order:o}}),m=(f,C,A)=>{if(C)return sessionStorage.setItem("productDetailScrollY",window.scrollY.toString()),sessionStorage.setItem("activeTab","review"),l(`${p.PRODUCT.LIST}/${e}/${f.reviewNo}`,{state:{initialIndex:A??0}})};return t.jsxs(q.Container,{children:[t.jsxs(q.RateContainer,{children:[t.jsx(q.StarList,{children:Nn(n).map((f,C)=>t.jsx(q.StarListItem,{children:t.jsx(Ln,{rate:f,iconSize:{width:"20px",height:"21px"}})},C))}),t.jsxs(q.Rate,{children:[t.jsx("strong",{children:n})," / 5"]})]}),t.jsxs(q.SortContainer,{children:[t.jsx(q.Count,{dangerouslySetInnerHTML:{__html:`${((S=(E=(x=d==null?void 0:d.pages)==null?void 0:x[0])==null?void 0:E.data)==null?void 0:S.totalCount)||0} 건`}}),t.jsx(_n,{dropdownList:Xp,onSelect:a})]}),t.jsx(q.ReviewList,{children:d==null?void 0:d.pages.map(f=>f.data.items.map(C=>{const A=C.fileUrls.length>0;return t.jsxs(q.ReviewListItem,{children:[t.jsxs(q.ContentsContainer,{children:[t.jsxs(q.ReviewHeader,{children:[t.jsxs(q.NameContainer,{children:[t.jsx(q.ContentsStarList,{children:Nn(C.rate).map((v,w)=>t.jsx(q.ContentsStarListItem,{children:t.jsx(Ln,{rate:v,iconSize:{width:"11px",height:"11px"}})},w))}),t.jsx(q.MemberName,{children:C.registerName})]}),t.jsx(q.RegisterYmdt,{children:Y(C.registerYmdt).format("YYYY.MM.DD")})]}),t.jsx(q.ProductName,{children:C.productName}),t.jsx(q.Contents,{onClick:()=>m(C,A),$isPointer:A,children:C.content})]}),t.jsx("div",{children:t.jsx(q.ReviewImageList,{children:C.fileUrls.map((v,w)=>t.jsx("li",{children:t.jsx("img",{src:v,width:"82",height:"82",onClick:g=>{g.preventDefault(),g.stopPropagation(),m(C,A,w)},style:{cursor:"pointer"},alt:"리뷰 이미지"})},v))})})]},C.reviewNo)}))}),u&&t.jsx(q.MoreButton,{onClick:()=>c(),children:t.jsx("span",{children:"더보기"})})]})},dg=r.div` position: relative; `,ug=r.div` position: absolute; border-radius: 8px; border: 1px solid #e9eaef; padding: 16px; background-color: white; z-index: 10; left: 0; width: min(calc(100vw - 40px), 560px); ${({$isVisible:e})=>e?re` visibility: visible; opacity: 1; transition: visibility 0.5s, opacity 0.3s ease-in-out; `:re` visibility: hidden; opacity: 0; transition: visibility 0.5s, opacity 0.3s ease-in-out; `} `,pg=r.h6` font-size: 1.3rem; ${T.bold}; color: var(--color-textGray); margin-bottom: 16px; `,mg=r.div` margin-bottom: 16px; `,hg=r.div` display: flex; flex-direction: column; gap: 4px; `,xg=r.dl` display: flex; justify-content: space-between; align-items: center; dt { font-size: 1.2rem; ${T.regular}; color: var(--color-textGray); } dd { font-size: 1.2rem; color: ${({$isMaxBenefit:e})=>e?"var(--color-main)":"var(--color-textPrimary)"}; } `,gg=r.ul` display: flex; flex-direction: column; gap: 4px; `,fg=r.li` font-size: 1.2rem; ${T.regular}; color: #b3b4b9; &::before { content: '·'; width: 10px; display: inline-block; } `,yg=r.hr` border: 1px solid #e9eaef; margin: 8px 0; `,Te={Container:dg,TooltipContainer:ug,Title:pg,PriceContainer:mg,DiscountListContainer:hg,DescriptionList:gg,DescriptionListItem:fg,DiscountList:xg,Line:yg},Eg=({productNo:e,isEmployeeBenefit:n})=>{const{data:o}=we(),{data:i}=ko({productNo:e,memberNo:(o==null?void 0:o.memberNo)||0,options:{enabled:e!==0}}),{data:a}=No({memberNo:(o==null?void 0:o.memberNo)||0,searchParams:{pageSize:100,pageNumber:1,usable:!0},options:{enabled:!!(o!=null&&o.memberNo)}}),l=new et,d=l.get("hm_aut"),u=l.get("wHmAut"),c=K?decodeURIComponent(d)||"undefined":u||"",{data:m}=Ro({data:{hmAut:c,userAgent:navigator.userAgent}}),{salePrice:x,additionalDiscountAmt:E,couponDiscountAmt:S,benefitPrice:f,employeeDiscountAmt:C}=Oo({productNo:e}),A=s.useMemo(()=>{if(!i||i.length===0)return S.value;const P=i.find(D=>{var $;return($=a==null?void 0:a.items)==null?void 0:$.some(F=>F.couponNo===D.couponNo)});if(!P)return S.value;const{discountInfo:L}=P,{discountRate:O,discountAmt:y,maxDiscountAmt:N,fixedAmt:I}=L;if(I)return y||0;{const $=x.value*(O||0)/100;return Math.min($,N)}},[i,a,S.value,x.value]),v=s.useMemo(()=>x.value-E.value-A,[x.value,E.value,A]),w=s.useMemo(()=>{if(!n)return C.value;const P=(m==null?void 0:m.data.remainEmployeePoint)||0,L=v,O=L*.3;return P>=O?L*(wi/100):Math.floor(P/10)*10},[n,C.value,v,m==null?void 0:m.data.remainEmployeePoint]),g=s.useMemo(()=>{if(!n)return f.value;const P=v-w;return Math.round(P/10)*10},[n,v,w,f.value]),b=s.useMemo(()=>{if(!n)return null;const P=x.value;return Math.round((P-g)/P*100)},[n,x.value,g]);return{salePrice:x,additionalDiscountAmt:E,couponDiscountAmt:S,benefitPrice:f,employeeDiscountAmt:C,actualCouponDiscountAmt:ue(A),actualBenefitPrice:ue(v),actualEmployeeDiscountAmt:ue(w),actualEmployeeBenefitPrice:ue(g),actualEmployeeDiscountRate:b}},oo=({productNo:e,isVisible:n,setIsVisible:o,isEmployeeBenefit:i,children:a})=>{const l=s.useRef(null);$s(l,()=>{o(!1)});const{salePrice:d,additionalDiscountAmt:u,actualCouponDiscountAmt:c,actualBenefitPrice:m,actualEmployeeDiscountAmt:x,actualEmployeeBenefitPrice:E,actualEmployeeDiscountRate:S}=Eg({productNo:e,isEmployeeBenefit:i});return t.jsxs(Te.Container,{ref:l,children:[a,t.jsxs(Te.TooltipContainer,{$isVisible:n,children:[t.jsx(Te.Title,{children:"최대혜택"}),t.jsxs(Te.PriceContainer,{children:[t.jsxs(Te.DiscountListContainer,{children:[t.jsxs(Te.DiscountList,{children:[t.jsx("dt",{children:"판매가"}),t.jsx("dd",{children:d.format()})]}),t.jsxs(Te.DiscountList,{children:[t.jsx("dt",{children:"추가할인"}),t.jsx("dd",{children:u.multiply(-1).format()})]}),t.jsxs(Te.DiscountList,{children:[t.jsx("dt",{children:"쿠폰할인"}),t.jsx("dd",{children:c.multiply(-1).format()})]}),i&&t.jsxs(Te.DiscountList,{children:[t.jsxs("dt",{children:["임직원할인 (",S,"% )"]}),t.jsx("dd",{children:x.multiply(-1).format()})]})]}),t.jsx(Te.Line,{}),t.jsxs(Te.DiscountList,{$isMaxBenefit:!0,children:[t.jsx("dt",{children:"최대 혜택가"}),t.jsx("dd",{children:i?E.format():m.format()})]})]}),t.jsxs(Te.DescriptionList,{children:[t.jsx(Te.DescriptionListItem,{children:"상품 옵션에 따라 할인혜택이 상이할 수 있습니다."}),t.jsx(Te.DescriptionListItem,{children:"비회원 구매시 할인적용이 불가능할 수 있습니다."})]})]})]})},Cg=({type:e="single",list:n})=>{const[o,i]=s.useState(()=>U(n,Qe(u=>u.isSelected),Xe(u=>u.id),ae)),a=s.useCallback(u=>{e==="single"&&i([u]),e==="multi"&&i(c=>[...c,u])},[e]),l=s.useMemo(()=>n.map(u=>({...u,isSelected:o.length>=1?o.includes(u.id):u.isSelected})),[n,o]),d=s.useMemo(()=>U(l,Qe(u=>u.isSelected),Vs),[l]);return{tabList:l,onTabClick:a,selectedTab:d}},ro=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'"),wg=e=>s.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M14 10V12.6667C14 13.0203 13.8595 13.3594 13.6095 13.6095C13.3594 13.8595 13.0203 14 12.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V10",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.66797 6.66675L8.0013 10.0001L11.3346 6.66675",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8 10V2",stroke:"white",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),bg=e=>s.createElement("svg",{width:40,height:40,viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("circle",{cx:20,cy:20,r:19.5,fill:"white",stroke:"#E9EAEF"}),s.createElement("path",{d:"M18.1811 16.3637L22.7266 20.9091L18.1811 25.4546",stroke:"#232634",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Sg=s.lazy(()=>B(()=>import("./index-CUMvbq0n.js"),__vite__mapDeps([68,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,28,16,17,18,19,20,21,22,23,24,25,69,70,31,32,33,34,35,36,37,38,29,30,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Tg=s.lazy(()=>B(()=>import("./index-BW5c4MxO.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),vg=s.lazy(()=>B(()=>Promise.resolve().then(()=>Q0),void 0)),Ag=()=>{var Uo,Fo,Go,zo,Vo,Yo,qo,Wo,Ko;const{openDialog:e}=Et(),n=Gt(),o=Ce(),i=s.useMemo(()=>Number(n.productNo)||0,[n]),[a]=Tt(),l=a.get("preview"),d=ee.getAccessToken(),u=!!(d!=null&&d.isEmployee),{data:c}=$o({productNo:i,searchParams:l?{preview:!!l}:{}}),{productSalePrice:m,salePrice:x,discountRate:E}=Oo({productNo:i}),S=Ci(i),f=S?m:x,C=s.useMemo(()=>{if(c){const{baseInfo:j,brand:_}=c;return{title:`${xn(_)?"":`[${_==null?void 0:_.name}]`} ${ro(j.productName)}`,og:{title:`${xn(_)?"":`[${_==null?void 0:_.name}]`} ${ro(j.productName)}`,image:ir(j.imageUrls[0]??"")},meta:{title:`${xn(_)?"":`[${_==null?void 0:_.name}]`} ${ro(j.productName)}`,image:ir(j.imageUrls[0]??"")}}}},[c]),A=s.useMemo(()=>({loop:!0}),[]),{tabList:v,onTabClick:w,selectedTab:g}=Cg({type:"single",list:[{id:"description",label:"상품설명",isSelected:!0},{id:"review",label:"후기",isSelected:!1},{id:"inquiry",label:"문의",isSelected:!1},{id:"partnerInfo",label:"판매자 정보",isSelected:!1}]}),b=({id:j,label:_})=>{if(c){if(j==="review"){const te=c.counter.reviewCnt;return`${_} ${te>=1e3?"999+":te}`}if(j==="inquiry"){const te=c.counter.inquiryCnt;return`${_} ${te>=1e3?"999+":te}`}return _}return _};s.useEffect(()=>{const j=sessionStorage.getItem("productDetailScrollY");if(!j)return;const _=sessionStorage.getItem("activeTab");_&&j&&w(_);const te=parseInt(j,10),ot=()=>{const lt=document.scrollingElement;lt?lt.scrollTop=te:window.scrollTo(0,te)},Zt=document.querySelectorAll("img");let Xt=0;Zt.length===0?requestAnimationFrame(()=>requestAnimationFrame(ot)):(Zt.forEach(lt=>{lt.complete?Xt++:lt.onload=()=>{Xt++,Xt===Zt.length&&requestAnimationFrame(()=>requestAnimationFrame(ot))}}),setTimeout(ot,200)),sessionStorage.removeItem("productDetailScrollY")},[w]);const P=s.useMemo(()=>{if(c)return JSON.parse(c.baseInfo.dutyInfo)},[c]),L=P?X(P.contents):!1,{isLogin:O}=Pe(),[y,N]=s.useState(!1),I=()=>{N(j=>!j)},[D,$]=s.useState(!1),F=()=>{$(j=>!j)},[pe,me]=s.useState(!1),Ne=async()=>{O||(await e("비회원 문의글 작성이 불가능합니다."),o({pathname:p.AUTH.LOGIN,search:`returnUrl=${p.PRODUCT.LIST}/${i}`})),me(j=>!j)},[ct,qt,Ve]=Qo(!1),[tt,Ct,Q]=Qo(!1),ye=(j,_)=>{if(j.stopPropagation(),_==="maxBenefit"){Q(!1),qt();return}if(_==="employeeBenefit"){Ve(!1),Ct();return}},ce=s.useMemo(()=>{if(c)try{return c.categories.length===0?void 0:U(c,ln("categories"),rt(j=>j.categories),Ys,ln("categoryNo"))}catch(j){console.error(j)}},[c]),Wt=s.useMemo(()=>{if(!c)return"";const{contentHeader:j,content:_,contentFooter:te}=c.baseInfo;return U([j,_,te],Qe(ot=>!!ot),Xe(ot=>`
${ot}
`),qs(""))},[c]),It=!xn(c==null?void 0:c.partnerNotice),Kt=()=>c!=null&&c.baseInfo.placeOriginLabel?c!=null&&c.baseInfo.placeOriginLabel.includes("직접입력")?c==null?void 0:c.baseInfo.placeOriginEtcLabel:c==null?void 0:c.baseInfo.placeOriginLabel:"상품 상세 참조";_o({product:c});const{data:be}=we(),{data:xe}=ko({productNo:i,memberNo:(be==null?void 0:be.memberNo)||0,options:{enabled:i!==0}}),R=U(xe,j=>j==null?void 0:j.some(_=>_.downloadable),j=>j||!1),{data:H}=No({memberNo:(be==null?void 0:be.memberNo)||0,searchParams:{pageSize:100,pageNumber:1,usable:!0},options:{enabled:!!(be!=null&&be.memberNo)}}),Ye=U((H==null?void 0:H.items)||[],j=>j.some(_=>xe&&xe.length>0&&xe.some(te=>te.couponNo===_.couponNo))),Qt=xe&&xe.length>0,Mn=R||Qt&&Ye,Lt=s.useMemo(()=>{if(!xe||xe.length===0)return(c==null?void 0:c.price.couponDiscountAmt)||0;const j=xe.find(lt=>{var hn;return(hn=H==null?void 0:H.items)==null?void 0:hn.some(as=>as.couponNo===lt.couponNo)});if(!j)return(c==null?void 0:c.price.couponDiscountAmt)||0;const{discountInfo:_}=j,{discountRate:te,discountAmt:ot,maxDiscountAmt:Zt,fixedAmt:Xt}=_;if(Xt)return ot||0;{const hn=(((c==null?void 0:c.price.salePrice)||0)-((c==null?void 0:c.price.immediateDiscountAmt)||0))*(te||0)/100;return Math.min(hn,Zt)}},[xe,H,c==null?void 0:c.price.salePrice,c==null?void 0:c.price.immediateDiscountAmt,c==null?void 0:c.price.couponDiscountAmt]),Bn=s.useMemo(()=>((c==null?void 0:c.price.salePrice)||0)-((c==null?void 0:c.price.immediateDiscountAmt)||0)-((c==null?void 0:c.price.additionDiscountAmt)||0)-Lt,[c==null?void 0:c.price.salePrice,c==null?void 0:c.price.immediateDiscountAmt,c==null?void 0:c.price.additionDiscountAmt,Lt]),Mo=Lt>0&&Mn,Bo=s.useMemo(()=>{if(!Mn||Lt<=0)return null;const j=((c==null?void 0:c.price.salePrice)||0)-((c==null?void 0:c.price.immediateDiscountAmt)||0),_=Lt/j*100;return Math.round(_)},[Mn,Lt,c==null?void 0:c.price.salePrice,c==null?void 0:c.price.immediateDiscountAmt]),Do=new et,os=Do.get("hm_aut"),rs=Do.get("wHmAut"),is=K?decodeURIComponent(os)||"undefined":rs||"",{data:Dn}=Ro({data:{hmAut:is,userAgent:navigator.userAgent}}),{data:nt}=Ti({data:{hmAut:(d==null?void 0:d.hmAut)||"",userAgent:navigator.userAgent}}),Ho=vi({isEmployee:u,errorCode:((Uo=nt==null?void 0:nt.data)==null?void 0:Uo.errorCode)||"",pointUsageAllowedStatus:((Fo=nt==null?void 0:nt.data)==null?void 0:Fo.pointUsageAllowedStatus)||"0",partnerNo:(Go=c==null?void 0:c.partner)!=null&&Go.partnerNo?String(c==null?void 0:c.partner.partnerNo):void 0,partnerNoSet:Array.from(((zo=nt==null?void 0:nt.data)==null?void 0:zo.partnerNoSet)||[])}),Hn=(Dn==null?void 0:Dn.data.remainEmployeePoint)||0,Un=s.useMemo(()=>{const j=Bn,_=j*.3,te=Hn>=_?j*.7:j-Hn;return Math.round(te/10)*10},[Hn,Bn]),ss=ue(Un),Fn=s.useMemo(()=>{if(!u)return null;const j=x.value,te=Math.round((j-Un)/j*100);return ue(te)},[Un,u,x.value]);return t.jsxs(k.ContainerWrapper,{children:[t.jsx(bs,{}),c&&t.jsxs(t.Fragment,{children:[t.jsx(jr,{...C}),t.jsxs(k.ContentsContainerWrapper,{children:[t.jsx(_e,{...A,children:c.baseInfo.imageUrls.map(j=>{const _=j.includes("cdn-nhncommerce.com")||j.includes("nhncommerce.com");return t.jsx(Le,{children:t.jsx(yt,{src:_?`${j}?750x750`:j,srcSet:[_?`${j}?300x300 300w`:j,_?`${j}?450x450 450w`:j,_?`${j}?600x600 600w`:j,_?`${j}?900x900 900w`:j].join(", "),alt:c.baseInfo.productName,loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",aspectRatio:"1 / 1",objectFit:"cover",objectPosition:"center"}})},j)})}),t.jsxs(k.ProductInfoContainer,{children:[t.jsx(k.ShareButton,{onClick:I,children:t.jsx(Ni,{})}),t.jsxs(k.InfoContentsContainer,{children:[t.jsxs("div",{children:[c.brand&&t.jsx(k.BrandNameLink,{to:{pathname:`${p.PRODUCT.BRAND.MAIN}/${c.brand.brandNo}`},children:t.jsx("p",{dangerouslySetInnerHTML:{__html:c.brand.name}})}),t.jsx(k.ProductName,{dangerouslySetInnerHTML:{__html:c.baseInfo.productName}}),t.jsxs(k.RateContainer,{children:[t.jsx(k.ReviewList,{children:Nn(c.reviewRate).map((j,_)=>t.jsx(k.ReviewListItem,{children:t.jsx(Ln,{rate:j,iconSize:{width:"11px",height:"11px"}})},_))}),t.jsx(k.Rate,{children:`(상품후기 ${c.counter.reviewCnt}건)`})]}),t.jsxs(k.PlaceOriginLabel,{children:["원산지: ",Kt()]}),t.jsxs(k.PriceContainer,{children:[Ho?t.jsxs(k.PriceBox,{children:[t.jsx(oo,{productNo:i,isVisible:tt,setIsVisible:Q,isEmployeeBenefit:u,children:Ei(i)?t.jsx(t.Fragment,{}):t.jsxs(k.MaxBenefit,{children:[t.jsx("span",{children:"임직원할인가"}),t.jsx(k.DiscountRate,{children:Fn==null?void 0:Fn.format({pattern:"#%"})}),t.jsx(k.SalePrice,{children:f.format()}),t.jsx(k.InfoButton,{onClick:j=>ye(j,"employeeBenefit"),children:t.jsx(an,{})})]})}),t.jsx(k.Price,{children:`${ss.format()}`})]}):!Ho&&Mo?t.jsxs(k.PriceBox,{children:[t.jsx(oo,{productNo:i,isVisible:ct,setIsVisible:Ve,children:t.jsxs(k.MaxBenefit,{children:[t.jsx("span",{children:"쿠폰할인가"}),t.jsx(k.DiscountRate,{children:Bo?`${Bo}%`:E}),t.jsx(k.SalePrice,{children:f.format()}),t.jsx(k.InfoButton,{onClick:j=>ye(j,"maxBenefit"),children:t.jsx(an,{})})]})}),t.jsx(k.Price,{children:`${ue(Bn).format()}`})]}):S&&m.value!==x.value?t.jsxs(k.PriceBox,{children:[t.jsx(oo,{productNo:i,isVisible:ct,setIsVisible:Ve,children:t.jsxs(k.MaxBenefit,{children:[t.jsx(k.SalePrice,{children:f.format()}),t.jsx(k.InfoButton,{onClick:j=>ye(j,"maxBenefit"),children:t.jsx(an,{})})]})}),t.jsx(k.Price,{children:x.format()})]}):t.jsx(k.Price,{children:f.format()}),Mo&&t.jsxs(k.CouponDownloadButton,{onClick:F,children:[t.jsx(wg,{}),t.jsx("span",{children:"쿠폰받기"})]})]})]}),t.jsxs(k.SubPayInfo,{children:["최대"," ",ue((c==null?void 0:c.price.accumulationAmtWhenBuyConfirm)||0).format({symbol:""}),"적립",c.baseInfo.accumulationUseYn==="Y"&&t.jsx(k.SubPayInfoLine,{}),c.baseInfo.accumulationUseYn==="Y"?((Vo=c.baseInfo.accumulationUseLimitInfo)==null?void 0:Vo.limitValue)===0?"최대 100% 해피포인트 사용가능":`최대 ${ue(((Yo=c.baseInfo.accumulationUseLimitInfo)==null?void 0:Yo.limitValue)||0).format({symbol:""})}${((qo=c.baseInfo.accumulationUseLimitInfo)==null?void 0:qo.unitType)==="AMOUNT"?"":"%"} 해피포인트 사용가능`:null]})]}),t.jsx(de,{children:t.jsx(Ch,{})})]}),t.jsxs(k.ProductInfoContainer,{children:[t.jsx(k.ProductInfoTitle,{children:"상품정보"}),t.jsx(k.ProductInfoContentsContainer,{children:((Wo=c.deliveryFee)==null?void 0:Wo.defaultDeliveryConditionLabel)&&t.jsxs(k.ProductInfo,{children:[t.jsx("dt",{children:"배송비"}),t.jsx("dd",{children:(Ko=c.deliveryFee)==null?void 0:Ko.defaultDeliveryConditionLabel})]})})]}),t.jsx(de,{children:t.jsx(Er,{title:"판매자의 다른 상품",searchParams:{filter:{excludeMallProductNo:i},partnerNo:c.partner.partnerNo,order:{by:"POPULAR",direction:"DESC"},pageNumber:1,pageSize:10,hasTotalCount:!1},moreSlide:t.jsx(k.MoreSwiperSlide,{children:t.jsxs(k.MoreLink,{to:{pathname:`${p.PRODUCT.PARTNER.MAIN}/${c.partner.partnerNo}`},children:[t.jsx(bg,{}),t.jsx("span",{children:"더보기"})]})})})}),t.jsxs(k.Container,{children:[t.jsx(k.TabList,{role:"tablist",children:v.map(({id:j,label:_,isSelected:te})=>t.jsx(k.TabListItem,{role:"presentation",$isSelected:te,children:t.jsx("button",{role:"tab",id:j,"aria-selected":te,"aria-controls":j,onClick:()=>w(j),dangerouslySetInnerHTML:{__html:b({id:j,label:_})}})},j))}),t.jsxs(k.ContentsContainer,{children:[(g==null?void 0:g.id)==="description"&&It&&t.jsxs(k.PartnerNotice,{children:[t.jsx("h2",{children:"공지사항"}),t.jsx(k.PartnerNoticeContent,{dangerouslySetInnerHTML:{__html:c.partnerNotice.content}})]}),t.jsx(k.Description,{id:"description",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="description","aria-labelledby":"description",dangerouslySetInnerHTML:{__html:Wt}}),t.jsx("section",{id:"review",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="review","aria-labelledby":"review",children:t.jsx(de,{children:t.jsx(lg,{productNo:i,reviewRate:c.reviewRate})})}),t.jsx(k.ProductInquiry,{id:"inquiry",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="inquiry","aria-labelledby":"inquiry",children:t.jsx(de,{children:t.jsx(yx,{productNo:i,onButtonClick:Ne})})}),t.jsx(k.PartnerInfo,{id:"partnerInfo",role:"tabpanel",hidden:(g==null?void 0:g.id)!=="partnerInfo","aria-labelledby":"partnerInfo",children:t.jsx(A0,{partner:c.partner})})]})]}),t.jsx(de,{children:t.jsx(Er,{title:"동일 카테고리 특가 상품",searchParams:{filter:{excludeMallProductNo:i},categoryNos:(ce==null?void 0:ce.toString())??"",order:{by:"POPULAR",direction:"DESC"},pageNumber:1,pageSize:10,hasTotalCount:!1}})}),t.jsxs(k.Container,{children:[!L&&t.jsx(k.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Th,{dutyInfo:c.baseInfo.dutyInfo})}),(c==null?void 0:c.deliveryGuide)&&t.jsx(k.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"배송안내",children:t.jsx(k.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.deliveryGuide}})})}),(c==null?void 0:c.refundGuide)&&t.jsx(k.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"AS 안내",children:t.jsx(k.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.refundGuide}})})}),(c==null?void 0:c.afterServiceGuide)&&t.jsx(k.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"교환안내",children:t.jsx(k.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.afterServiceGuide}})})}),(c==null?void 0:c.exchangeGuide)&&t.jsx(k.ProductInfoContainer,{style:{padding:"0 20px"},children:t.jsx(Mt,{title:"환불안내",children:t.jsx(k.AdditionalInfoContainer,{dangerouslySetInnerHTML:{__html:c==null?void 0:c.exchangeGuide}})})})]})]}),t.jsx(qi,{productNo:i})]}),t.jsx(Tg,{isVisible:y,setIsVisible:N,isEventBoard:!1}),t.jsx(Sg,{productNo:i,isVisible:D,setIsVisible:$}),t.jsx(vg,{productNo:i,productName:(c==null?void 0:c.baseInfo.productName)??"",isVisible:pe,setIsVisible:me})]})},Pg=r(Je.div)` position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); z-index: 999; `,jg=r(Je.section)` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2000; display: flex; flex-direction: column; width: 100%; max-width: 600px; height: 100vh; background-color: var(--color-black); color: var(--color-white); `,Ig=r.button` position: absolute; top: 20px; right: 20px; z-index: 10; svg { width: 14px; height: 14px; path { stroke: var(--color-white); } } `,Lg=r.div` height: 100%; .swiper-pagination-fraction { padding: 17px; font-size: 1.8rem; } .swiper-wrapper { display: flex; align-items: center; } .swiper-slide { height: auto; max-height: calc(100% - 90px); overflow: hidden; } `,An={Dimmed:Pg,Container:jg,CloseButton:Ig,Contents:Lg},Ng=e=>s.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L15 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15 1L1 15",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),kg=({isVisible:e,setIsVisible:n,review:o,initialIndex:i,...a})=>{So({isLock:e});const l=()=>{n(!1)},d=s.useMemo(()=>({modules:[kn],loop:!0,pagination:{type:"fraction"},initialSlide:i,grabCursor:!0}),[i]);return wr.createPortal(t.jsxs(t.Fragment,{children:[t.jsx(An.Dimmed,{onClick:u=>{u.stopPropagation(),n(!1)},initial:{opacity:0},animate:{opacity:[0,1]},transition:{type:"keyframes",duration:.3,ease:"easeInOut"}},"dimmedreviewImageModal"),t.jsxs(An.Container,{initial:{top:"51%",opacity:0},animate:{top:"50%",opacity:[0,1]},transition:{type:"keyframes",duration:.3,ease:"easeInOut"},...a,children:[t.jsx(An.CloseButton,{onClick:l,children:t.jsx(Ng,{})}),t.jsx(An.Contents,{children:t.jsx(_e,{...d,style:{display:"flex",flexDirection:"column-reverse",alignItems:"center",justifyContent:"space-between",height:"100%"},children:o.map((u,c)=>{const m=u.includes("cdn-nhncommerce.com")||u.includes("nhncommerce.com");return t.jsx(Le,{children:t.jsx(yt,{src:m?`${u}?600x600`:u,srcSet:[m?`${u}?300x300 300w`:u,m?`${u}?450x450 450w`:u,m?`${u}?900x900 900w`:u].join(", "),alt:o[c],loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",height:"auto",objectFit:"cover",objectPosition:"center"}})},u)})})})]},"reviewImageModal")]}),document.querySelector("#modal"))},Rg=({productNo:e,reviewNo:n,options:o})=>se({queryKey:ge.detail(e,n),queryFn:async()=>{const{data:i}=await hi.getProductReview(e,n);return i},enabled:!!e&&!!n,...o}),$g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAC2SURBVHgB7dfRCYMwFEbhO0pHcAQ3SUboCN2ko3WEjnAbaQIpaKJWyL1wPgj4Ip5ffFEEAAAAuIqqzuk80rmJNyk66K9JvFiJX9zFg414dfEZNeKjWEf8KMT/8eB3Oq/lWk7QkW8+h9cOjdDRn01++3pmxPD4HBE3IkLnvjA8voo5NMJUfBW1a4TJ+KI3wnR80RjxNB9fNEbYjy92jIhiXWNEFC9WRkTxJkVP+v0hnwUAAADo+QDHm+diOYlo6AAAAABJRU5ErkJggg==",Og=r.div` background-color: var(--color-white); `,_g=r.div``,Zi=r(_e)``,Xi=r(Le)` aspect-ratio: 1/1; overflow: hidden; `,Mg=r.div` padding: 20px; `,Ji=r(_e)``,es=r(Le)` position: relative; aspect-ratio: 1/1; overflow: hidden; width: clamp( 48px, calc(48px + (16 * ((100vw - 375px) / (600 - 375)))), 64px ); height: clamp( 48px, calc(48px + (16 * ((100vw - 375px) / (600 - 375)))), 64px ); border-radius: clamp( 4px, calc(4px + (2.5 * ((100vw - 375px) / (600 - 375)))), 6.5px ); ${e=>e.$isActive&&re` &::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.4); } &::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; ${ua($g)} background-repeat: no-repeat; background-position: center; background-size: 32px; @media (max-width: 600px) { background-size: 24px; } } `} `;Zi.displayName="SwiperWrapper";Xi.displayName="SwiperSlide";Ji.displayName="SwiperWrapper";es.displayName="SwiperSlide";const Bg=r.div` display: flex; flex-direction: column; gap: 8px; padding: 0 20px; `,mt={Container:Og,MainImage:_g,MainSwiper:Zi,MainSwiperSlide:Xi,ThumbnailImage:Mg,ThumbSwiper:Ji,ThumbSwiperSlide:es,ContentsContainer:Bg},Dg=()=>{const e=Gt(),n=e.productNo,o=e.reviewNo,a=Ge().state.initialIndex,{data:l}=Rg({productNo:Number(n),reviewNo:Number(o)}),[d,u]=s.useState(null),[c,m]=s.useState(null),[x,E]=s.useState(a),S=yo("(max-width: 600px)"),f=s.useMemo(()=>({modules:[Xo,kn],loop:!0,grabCursor:!0,initialSlide:a,...c?{thumbs:{swiper:c}}:{},onSlideChange:y=>{E(y.realIndex)}}),[a,c]),C=s.useMemo(()=>({modules:[Xo],loop:!1,spaceBetween:S?2:4,watchSlidesProgress:!0,slidesPerView:"auto",initialSlide:a}),[a,S]),[A,v]=s.useState(!1),w=y=>{v(!0),E(y)},g=at(),{pathname:b}=Ge(),{isLogin:P}=Pe(),{data:L}=we(),{data:O}=Po({memberId:(L==null?void 0:L.memberId)||(L==null?void 0:L.memberNo.toString())||"",options:{enabled:P}});return s.useEffect(()=>{if(!K)return;const y=vo.find(({name:D,url:$})=>ie(((pe,me)=>pe==="카테고리"?p.CATEGORIES.DETAIL:me)(D,$),b)),N={visibility:!A,title:(y==null?void 0:y.name)||"",items:A?[]:[{type:"search",url:"https://happymarket.happypointcard.com/hm_front/product/search/list"},{type:"basket",url:"https://happymarket.happypointcard.com/hm_front/cart/list",notice:O?O.count.toString():"0"}]},I={visibility:!1};if(g==="AOS"){window.android.setHeaderProperty(JSON.stringify(N)),window.android.setNaviProperty(JSON.stringify(I));return}else{window.webkit.messageHandlers.setHeaderProperty.postMessage(JSON.stringify(N)),window.webkit.messageHandlers.setNaviProperty.postMessage(JSON.stringify(I));return}},[O,A,b,g]),l&&t.jsxs(mt.Container,{children:[t.jsx(mt.MainImage,{children:t.jsx(mt.MainSwiper,{...f,onSwiper:u,children:l==null?void 0:l.fileUrls.map((y,N)=>{const I=y.includes("cdn-nhncommerce.com")||y.includes("nhncommerce.com");return t.jsx(mt.MainSwiperSlide,{onClick:()=>w(N),children:t.jsx(yt,{src:I?`${y}?600x600`:y,srcSet:[I?`${y}?300x300 300w`:y,I?`${y}?450x450 450w`:y,I?`${y}?900x900 900w`:y].join(", "),alt:l.productName,loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",aspectRatio:"1 / 1",objectFit:"cover",objectPosition:"center"}})},y)})})}),t.jsx(mt.ThumbnailImage,{children:t.jsx(mt.ThumbSwiper,{...C,onSwiper:m,children:l==null?void 0:l.fileUrls.map((y,N)=>{const I=N===x,D=y.includes("cdn-nhncommerce.com")||y.includes("nhncommerce.com");return t.jsx(mt.ThumbSwiperSlide,{$isActive:I,onClick:()=>{d&&d.slideToLoop(N)},children:t.jsx(yt,{src:D?`${y}?40x40`:y,srcSet:[D?`${y}?30x30 30w`:y,D?`${y}?45x45 45w`:y,D?`${y}?60x60 60w`:y,D?`${y}?90x90 90w`:y].join(", "),alt:l.productName,loading:"lazy",decoding:"async",isPlaceHolder:!0,style:{width:"100%",aspectRatio:"1 / 1",objectFit:"cover",objectPosition:"center",cursor:"pointer"}})},y)})})}),t.jsxs(mt.ContentsContainer,{children:[t.jsxs(q.ReviewHeader,{children:[t.jsxs(q.NameContainer,{children:[t.jsx(q.ContentsStarList,{children:Nn((l==null?void 0:l.rate)??0).map((y,N)=>t.jsx(q.ContentsStarListItem,{children:t.jsx(Ln,{rate:y,iconSize:{width:"11px",height:"11px"}})},N))}),t.jsx(q.MemberName,{children:l==null?void 0:l.registerName})]}),t.jsx(q.RegisterYmdt,{children:Y(l==null?void 0:l.registerYmdt).format("YYYY.MM.DD")})]}),t.jsx(q.ProductName,{children:l==null?void 0:l.productName}),t.jsx(q.Contents,{children:l==null?void 0:l.content})]}),t.jsx(qi,{productNo:Number(n)}),A&&t.jsx(kg,{isVisible:A,setIsVisible:v,review:l.fileUrls,initialIndex:x})]})},Hg=r.div` height: 300px; ${z}; flex-direction: column; gap: 16px; ${T.regular}; background: #fff; animation: ${At} 0.3s ease-in-out; > p { text-align: center; font-size: 1.6rem; color: var(--color-textLightGray); } `,Ug=r(W)` ${z}; background: var(--color-sub); color: var(--color-white); height: 44px; padding: 0 16px; border-radius: 24px; font-size: 1.6rem; line-height: 0; margin-top: 16px; `,Cr={Container:Hg,MarketLink:Ug},Fg=({text:e="검색 결과가 없습니다.",isMarketLink:n=!1,icon:o,...i})=>t.jsxs(Cr.Container,{...i,children:[o&&o,t.jsx("p",{dangerouslySetInnerHTML:{__html:e}}),n&&t.jsx(Cr.MarketLink,{to:p.BEST,children:"마켓 랭킹 보기"})]}),Gg=({size:e=10,options:n})=>se({queryKey:["favoriteKeywords",{size:e}],queryFn:async()=>{const{data:o}=await Vt.getFavoriteKeywords({size:e});return o},staleTime:1e3*60*5,gcTime:1e3*60*5,...n}),zg=r.div` padding: 8px 20px 20px; background: #fff; `,Vg=r.div` margin-bottom: 20px; `,Yg=r.label` border-radius: 100px; border: 1px solid #e9eaef; padding: 15px 19px; width: 100%; display: flex; align-items: center; > svg { margin-right: 10px; } input { width: 100%; &::placeholder { font-size: 1.5rem; color: #b3b4b9; } } `,qg=r.div``,Wg=r.div` margin-bottom: 32px; `,Kg=r.div` display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; `,Qg=r.div` font-size: 1.8rem; ${T.bold}; color: var(--color-textSecondary); `,Zg=r.div``,Xg=r.button` color: #232634; ${T.medium}; font-size: 1.4rem; `,Jg=r.ul``,e1=r.li` display: flex; justify-content: space-between; align-items: center; &:not(:last-child) { margin-bottom: 12px; } `,t1=r.button` color: var(--color-textPrimary); font-size: 1.5rem; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; `,n1=r.button``,o1=r.div``,r1=r.p` color: #84858a; font-size: 1.2rem; `,i1=r.ul` display: flex; flex-wrap: wrap; gap: 8px 6px; `,s1=r.li` > a { border: 1px solid #e9eaef; border-radius: 100px; text-align: center; color: var(--color-textPrimary); font-size: 1.4rem; width: fit-content; padding: 11px 16px; } `,a1=r.div``,c1=r.div` aspect-ratio: 67 / 24; &:not(:last-child) { margin-bottom: 8px; } `,l1=r.div` opacity: ${({$isFetching:e})=>e?.5:1}; `,d1=r.p` font-size: 1.4rem; color: var(--color-textSecondary); > span { ${T.bold}; color: var(--color-highlight); } `,u1=r.div``,p1=r.ul` display: flex; flex-wrap: wrap; gap: 24px 11px; margin-bottom: 22px; > li { width: calc((50%) - 5.5px); } `,m1=r.button` width: 100%; padding: 10px; border: 1px solid #e9eaef; border-radius: 8px; `,h1=r.div``,x1=r.div` height: 1px; margin-top: 20px; visibility: hidden; `,M={Container:zg,SearchInputContainer:Vg,SearchInputLabel:Yg,SearchContainer:qg,Section:Wg,SectionHeader:Kg,SectionTitle:Qg,RecentKeywordContainer:Zg,RecentKeywordDeleteAllButton:Xg,RecentKeywordList:Jg,RecentKeywordListItem:e1,RecentKeyword:t1,RecentKeywordDeleteButton:n1,PopularKeywordContainer:o1,PopularKeywordDate:r1,PopularKeywordList:i1,PopularKeywordListItem:s1,ExhibitionContainer:a1,Exhibition:c1,SearchResultContainer:l1,SearchResultTitle:d1,SearchResultSortContainer:u1,ProductList:p1,NoSearchResultContainer:h1,MoreButton:m1,ObserverTarget:x1},g1=e=>s.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M13.5 13.5L4.5 4.5",stroke:"#B3B4B9",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M13.5 4.5L4.49997 13.5",stroke:"#B3B4B9",strokeWidth:1.6,strokeLinecap:"round",strokeLinejoin:"round"})),f1=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21 21L16.6569 16.6569M16.6569 16.6569C18.1046 15.2091 19 13.2091 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C13.2091 19 15.2091 18.1046 16.6569 16.6569Z",stroke:"#2E2E34",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),y1=()=>{const{openDialog:e}=Et(),n=Ce(),[o,i]=Tt({keyword:"",pageNumber:"1",pageSize:"30",by:ve[0].by,direction:ve[0].direction,sortValue:ve[0].value}),a=o.get("keyword")??"",l=o.get("pageNumber")||"1",d=o.get("pageSize")||"30",u=o.get("by")||ve[0].by,c=o.get("direction")||ve[0].direction,m=o.get("sortValue")||ve[0].value,x=R=>{i(H=>({...H,keyword:R,by:ve[0].by,direction:ve[0].direction,pageNumber:"1"}),{replace:!0})},E=R=>{i(H=>({...H,keyword:a,pageNumber:"1",by:R.by,direction:R.direction,sortValue:R.value}),{replace:!0})},[S,f]=s.useState("beforeSearch"),[C,A]=br("keywordList",[]);s.useEffect(()=>{const H=Date.now()-7*24*60*60*1e3;A(Ye=>U(Ye,Qe(Qt=>Qt.id>H),ae))},[A]),s.useEffect(()=>{if(K)try{window.scrollTo(0,0)}catch{}},[]);const v=R=>{A(H=>U(H,Qe(Ye=>Ye.keyword!==R),cn(9),Ks({id:Date.now(),keyword:R}),ae))},w=R=>{var Ye;const H=(Ye=C.find(Qt=>Qt.id===R))==null?void 0:Ye.keyword;H&&(v(H),x(H))},g=R=>{U(C,Qe(H=>H.id!==R),ae,Ws(A))},b=()=>{A([])},{data:P}=Gg({size:8}),{fetchNextPage:L,hasNextPage:O,data:y,isFetching:N,isFetchingNextPage:I}=Mi({searchParams:{filter:{keywords:a},pageNumber:Number(l),pageSize:Number(d),order:{by:u,direction:c}},options:{enabled:!!a,placeholderData:Oe}}),{ref:D}=Os({threshold:.1,onChange:R=>{R&&O&&L()}});s.useEffect(()=>{if(!a){f("beforeSearch");return}if(N&&!I){f("searching");return}if(y&&y.pages[0].data.totalCount>0){f("result");return}f("noResult")},[y,N,I,a]);const[$,F]=s.useState(""),pe=R=>{F(R.target.value)},me=R=>{if(R.preventDefault(),!$){e("검색어를 입력해주세요.");return}v($),x($)};s.useEffect(()=>{a&&F(a)},[a]);const{data:Ne}=jt({banners:[Pt.SEARCH_PAGE_BANNER]}),ct=s.useMemo(()=>!Ne||!Ne[0]?[]:U(Ne[0].accounts[0].banners,un(R=>R.bannerNo),cn(2),ae),[Ne]),qt=Y().format("YYYY.MM.DD");_o({searchedProduct:y==null?void 0:y.pages[0].data.items}),E0(a);const Ve=s.useMemo(()=>ct.filter(R=>R.name.includes("adult")),[ct]),[tt,Ct]=s.useState(null),Q=R=>{Ct(R)},ye=()=>{Ct(null)},{data:ce}=we(),Wt=(ce==null?void 0:ce.adultCertificated)||!1,It=ce!=null&&ce.adultCertificatedYmdt?Y(ce.adultCertificatedYmdt):null,Kt=Y().subtract(3,"month"),be=!Wt||!It||It.isBefore(Kt),xe=R=>{be?Q(R):n(R.landingUrl)};return t.jsxs(t.Fragment,{children:[t.jsxs(M.Container,{children:[t.jsx(M.SearchInputContainer,{children:t.jsx("form",{onSubmit:me,children:t.jsxs(M.SearchInputLabel,{children:[t.jsx(f1,{}),t.jsx("input",{placeholder:"찾으시는 상품이 있으신가요?",onChange:pe,value:$})]})})}),S==="beforeSearch"&&t.jsxs(M.SearchContainer,{children:[C.length>0&&t.jsxs(M.Section,{children:[t.jsxs(M.SectionHeader,{children:[t.jsx(M.SectionTitle,{children:"최근 검색어"}),t.jsx(M.RecentKeywordDeleteAllButton,{onClick:b,children:"전체 삭제"})]}),t.jsx(M.RecentKeywordContainer,{children:t.jsx(M.RecentKeywordList,{children:C.map(({keyword:R,id:H})=>t.jsxs(M.RecentKeywordListItem,{children:[t.jsx(M.RecentKeyword,{onClick:()=>w(H),children:R}),t.jsx(M.RecentKeywordDeleteButton,{onClick:()=>g(H),children:t.jsx(g1,{})})]},H))})})]}),t.jsxs(M.Section,{children:[t.jsxs(M.SectionHeader,{children:[t.jsx(M.SectionTitle,{children:"인기 검색어"}),t.jsxs(M.PopularKeywordDate,{children:[qt," 기준"]})]}),t.jsx(M.PopularKeywordContainer,{children:t.jsx(M.PopularKeywordList,{children:P==null?void 0:P.map((R,H)=>t.jsx(M.PopularKeywordListItem,{children:t.jsxs(W,{to:`${p.SEARCH}?keyword=${R}`,replace:!0,children:["#",R]})},H))})})]}),t.jsxs(M.Section,{children:[t.jsx(M.SectionHeader,{children:t.jsx(M.SectionTitle,{children:"기획전"})}),t.jsx(M.ExhibitionContainer,{children:ct.map(R=>t.jsx(M.Exhibition,{children:t.jsx(ci,{banner:R,isAdultBanner:Ve==null?void 0:Ve.some(H=>H.bannerNo===R.bannerNo),onAdultClick:()=>xe(R)})},R.bannerNo))})]})]}),S==="searching"&&t.jsx(We,{style:{height:"auto",padding:"56px 0"}}),S==="result"&&t.jsxs(M.SearchResultContainer,{$isFetching:I,children:[t.jsxs(M.SectionHeader,{children:[t.jsxs(M.SearchResultTitle,{children:[t.jsx("span",{children:(y==null?void 0:y.pages[0].data.totalCount)||0}),"개의 검색결과"]}),t.jsx(M.SearchResultSortContainer,{children:t.jsx(_n,{dropdownList:ve,onSelect:R=>{E(R)},selectedValue:ve.find(R=>R.value===m)})})]}),t.jsx(M.ProductList,{children:y==null?void 0:y.pages.map(R=>R.data.items.map((H,Ye)=>t.jsx("li",{children:t.jsx(Yt,{products:{...H,isListCard:!1},index:Ye})},H.productNo)))}),O&&t.jsx(M.ObserverTarget,{ref:D})]}),S==="noResult"&&t.jsxs(M.NoSearchResultContainer,{children:[t.jsx(Fg,{text:`검색 결과가 없습니다.
다른 키워드로 검색해보세요`,style:{color:"#c2c3c8",height:"auto",padding:"56px 0",margin:" 0 -20px 20px",borderBottom:"8px solid #f2f3f5"}}),t.jsxs(M.Section,{children:[t.jsxs(M.SectionHeader,{children:[t.jsx(M.SectionTitle,{children:"인기 검색어"}),t.jsxs(M.PopularKeywordDate,{children:[qt," 기준"]})]}),t.jsx(M.PopularKeywordContainer,{children:t.jsx(M.PopularKeywordList,{children:P==null?void 0:P.map((R,H)=>t.jsx(M.PopularKeywordListItem,{children:t.jsxs(W,{to:`${p.SEARCH}?keyword=${R}`,replace:!0,children:["#",R]})},H))})})]})]})]}),t.jsx(zt,{isVisible:!!tt,setIsVisible:ye,redirectUrl:tt==null?void 0:tt.landingUrl})]})},E1=({sectionId:e,params:n})=>Ut({queryKey:["infiniteDisplaySection",{sectionId:e,params:n}],queryFn:async({pageParam:o})=>{const{data:i}=await $l.getDisplaySection(e,{...n,pageNumber:o});return{data:i,pageNumber:o}},getNextPageParam:(o,i)=>{if(n.pageSize)return n.pageSize*i.length * { margin: 10px auto; } `,ht={Container:C1,BannerSection:w1,ProductSection:b1,SortContainer:S1,SortTotalCount:T1,SortDropdown:v1,ProductList:A1,ProductListItem:P1,Nodata:j1,NodataText:I1,ExhibitionTitle:L1,MoreButton:N1,SpinnerContainer:k1},R1=e=>s.createElement("svg",{width:6,height:10,viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M1 1L5 5L1 9",stroke:"#007AFB",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round"})),$1=()=>{const{data:e,fetchNextPage:n,hasNextPage:o,isFetched:i,isFetching:a}=E1({sectionId:"SPECIAL_DEAL",params:{by:"ADMIN_SETTING",soldout:!0,saleStatus:"ONSALE",pageNumber:1,pageSize:20,hasTotalCount:!0,hasOptionValues:!1,includeStopProduct:!1}}),l=On({threshold:400});s.useEffect(()=>{!o||!l||n()},[o,l]);const d=(e==null?void 0:e.pages.flatMap(c=>c.data.products))||[],u=ps({queries:d.map(({productNo:c})=>({queryKey:De.detailByProduct(c),queryFn:async()=>{const{data:m}=await mn.getEventsByProduct(c);return m},enabled:!!c})),combine:c=>c.map((m,x)=>{const E=d[x];return E&&m.data?{productNo:E.productNo,events:m.data.filter(S=>S.progressStatus==="ING")}:null})});return t.jsx(ht.Container,{children:i?t.jsx(ht.ProductSection,{children:X(e==null?void 0:e.pages[0].data.products)?t.jsx(ht.Nodata,{children:t.jsx(ht.NodataText,{children:"특가 상품이 존재하지 않습니다."})}):t.jsxs(t.Fragment,{children:[t.jsx(ht.ProductList,{children:e==null?void 0:e.pages.flatMap(c=>c.data.products.map((m,x)=>{var f;const E=u.find(C=>(C==null?void 0:C.productNo)===m.productNo),S=(f=E==null?void 0:E.events)==null?void 0:f[0];return t.jsxs(ht.ProductListItem,{children:[t.jsx(Yt,{products:m,index:x}),S&&t.jsx(ht.ExhibitionTitle,{to:`${p.EXHIBITIONS.LIST}/${S.eventNo}`,children:t.jsxs("p",{children:[t.jsx("span",{children:S.label}),t.jsx(R1,{})]})})]},m.productNo)}))}),a&&t.jsx(ht.SpinnerContainer,{children:t.jsx(Lo,{})})]})}):t.jsx(We,{style:{height:"50vh"}})})},G=e=>s.lazy(async()=>{const n=JSON.parse(window.sessionStorage.getItem("pageRefreshed")??"false");try{const o=await e();return window.sessionStorage.setItem("pageRefreshed","false"),o}catch(o){if(!n)return window.sessionStorage.setItem("pageRefreshed","true"),window.location.reload();throw o}}),O1=G(()=>B(()=>import("./index-BW_0bEIg.js"),__vite__mapDeps([71,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,72,27,73,74,28,45,46,47,41,39,40,42,21,22,23,24,25,31,32,33,34,35,36,37,38,29,30,26,43,44,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),_1=G(()=>B(()=>import("./index-JrfKUEK6.js"),__vite__mapDeps([75,1,2,3,4,5,6,7,8,9,10,11,12,13,76,77,72,16,17,18,19,20,39,27,40,28,59,60,22,23,24,25,61,62,63,21,67,31,32,33,34,35,36,37,38,29,30,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,64,65]))),M1=G(()=>B(()=>import("./index-CkmP4_F0.js"),__vite__mapDeps([78,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,16,17,18,19,20,21,22,23,24,25,70,28,72,69,79,31,32,33,34,35,36,37,38,29,30,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),B1=G(()=>B(()=>import("./index-DJedF4Ob.js"),__vite__mapDeps([80,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,16,17,18,19,20,28,29,30,81,59,60,22,23,24,25,61,62,63,21,67,82,83,84,85,86,42,31,32,33,34,35,36,37,38,26,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,64,65]))),D1=G(()=>B(()=>import("./index-HfuzNgWN.js"),__vite__mapDeps([87,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,39,72,88,28,21,22,23,24,25,89,90,91,27,92,93,74,45,46,47,41,94,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),H1=G(()=>B(()=>import("./index-CzoqFbxj.js"),__vite__mapDeps([95,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,90,39,28,91,21,22,23,24,25,27,92,93,74,45,46,47,41,94,96,97,98,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),U1=G(()=>B(()=>import("./index-BF8EGsvx.js").then(e=>e.i),__vite__mapDeps([99,27,1,2,3,4,5,6,7,8,9,10,11,12,13,39,56,16,17,18,19,20,29,30,21,22,23,24,25,81,59,60,61,62,63,55,40,28,100,73,74,45,46,47,41,82,96,53,54,101,102,26,103,104,105,106,86,42]))),F1=G(()=>B(()=>import("./index-DCvtKbg8.js"),__vite__mapDeps([107,1,2,3,4,5,6,7,8,9,10,11,12,13,39,44,16,17,18,19,20,53,54,103,27,28,97,74,45,46,47,41,14,15,21,22,23,24,25,83,31,32,33,34,35,36,37,38,29,30,26,40,42,43,48,49,50,51,52,55,56,57,58,59,60,61,62,63,64,65]))),ts=G(()=>B(()=>import("./index-DeJ3so7K.js"),__vite__mapDeps([108,27,1,2,3,4,5,6,7,8,9,10,11,12,13,39,55,56,40,16,17,18,19,20,92,93,28,109,74,45,46,47,41,81,59,60,22,23,24,25,61,62,63,21,101,82,91,100,104,105,84,85,31,32,33,34,35,36,37,38,29,30,26,42,43,44,14,15,48,49,50,51,52,53,54,57,58,64,65]))),G1=G(()=>B(()=>import("./index-CyYb5aC9.js"),__vite__mapDeps([110,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,39,72,88,28,21,22,23,24,25,89,90,91,27,92,93,74,45,46,47,41,94,86,42,31,32,33,34,35,36,37,38,29,30,26,40,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),z1=G(()=>B(()=>import("./index-C6rKKWUT.js"),__vite__mapDeps([111,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,90,39,28,91,21,22,23,24,25,27,92,93,74,45,46,47,41,94,112,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),V1=G(()=>B(()=>import("./index-Bwh26cXp.js"),__vite__mapDeps([113,1,2,3,4,5,6,7,8,9,10,11,12,13,82,17,18,21,22,23,24,25,72,16,19,20,114,115,112,27,93,28,31,32,33,34,35,36,37,38,29,30,39,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),Y1=G(()=>B(()=>import("./index-PmOLFCB7.js"),__vite__mapDeps([116,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,90,39,28,91,21,22,23,24,25,27,92,93,74,45,46,47,41,94,96,98,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),q1=G(()=>B(()=>import("./index-DDjZRg-j.js"),__vite__mapDeps([117,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,114,21,22,23,24,25,115,27,92,94,31,32,33,34,35,36,37,38,29,30,39,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),W1=G(()=>B(()=>import("./index-Btm1Mv7p.js"),__vite__mapDeps([118,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,28,16,17,18,19,20,89,21,22,23,24,25,72,114,86,42,31,32,33,34,35,36,37,38,29,30,26,40,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),K1=G(()=>B(()=>import("./index-C4ctQUfE.js"),__vite__mapDeps([119,1,2,3,4,5,6,7,8,9,10,11,12,13,72,16,17,18,19,20,114,21,22,23,24,25,120,39,27,56,109,82,85,31,32,33,34,35,36,37,38,29,30,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65]))),Q1=G(()=>B(()=>import("./index-CU_EZaAh.js"),__vite__mapDeps([121,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,72,120,39,27,56,109,82,21,22,23,24,25,85,114,31,32,33,34,35,36,37,38,29,30,26,40,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65]))),Z1=G(()=>B(()=>import("./index-BMFAc53V.js"),__vite__mapDeps([122,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,82,17,18,21,22,23,24,25,72,16,19,20,28,123,105,41,104,106,86,42,31,32,33,34,35,36,37,38,29,30,26,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),X1=G(()=>B(()=>import("./index-CFSP5RU_.js"),__vite__mapDeps([124,1,2,3,4,5,6,7,8,9,10,11,12,13,27,56,125,21,22,23,24,25,28,106,17,18,31,32,33,34,35,36,16,19,20,37,38,29,30,39,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,82,72,100,123,105]))),J1=G(()=>B(()=>import("./index-COeHdR_5.js"),__vite__mapDeps([126,1,2,3,4,5,6,7,8,9,10,11,12,13,27,40,56,16,17,18,19,20,125,21,22,23,24,25,28,106,31,32,33,34,35,36,37,38,29,30,39,26,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,82,72,100,123,105]))),ns=G(()=>B(()=>import("./index-B_Ac1bLd.js"),__vite__mapDeps([127,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,56,16,17,18,19,20,74,28,45,46,47,41,125,21,22,23,24,25,106,31,32,33,34,35,36,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,57,58,59,60,61,62,63,64,65,81,82,100]))),ef=G(()=>B(()=>import("./index-Dl3jwI15.js"),__vite__mapDeps([128,1,2,3,4,5,6,7,8,9,10,11,12,13,39,21,22,23,24,25,27,28,45,46,47,41,19,20,17,18,31,32,33,34,35,36,16,37,38,29,30,26,40,42,43,44,14,15,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),tf=G(()=>B(()=>import("./index-0FnX4OFA.js"),__vite__mapDeps([129,1,2,3,4,5,6,7,8,9,10,11,12,13,39,29,30,0,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),nf=G(()=>B(()=>import("./index-CzuslYxr.js"),__vite__mapDeps([130,1,2,3,4,5,6,7,8,9,10,11,12,13,0,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),of=G(()=>B(()=>import("./index-qCGcWfFt.js"),__vite__mapDeps([131,1,2,3,4,5,6,7,8,9,10,11,12,13,27,40,16,17,18,19,20,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,39,26,28,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),rf=G(()=>B(()=>import("./index--dzI07kn.js"),__vite__mapDeps([132,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,27,42,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,39,26,40,28,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),sf=G(()=>B(()=>import("./index-AiRDreaX.js"),__vite__mapDeps([133,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,27,42,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,39,26,40,28,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),af=G(()=>B(()=>import("./index-BW13wCrK.js"),__vite__mapDeps([134,1,2,3,4,5,6,7,8,9,10,11,12,13,39,16,17,18,19,20,135,27,28,79,21,22,23,24,25,31,32,33,34,35,36,37,38,29,30,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),cf=G(()=>B(()=>import("./index-h0MLnDAA.js"),__vite__mapDeps([136,1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,19,20,28,39,135,27,21,22,23,24,25,79,31,32,33,34,35,36,37,38,29,30,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),lf=G(()=>B(()=>import("./index-UHX-TF01.js"),__vite__mapDeps([137,1,2,3,4,5,6,7,8,9,10,11,12,13,28,21,22,23,24,25,19,20,17,18,27,31,32,33,34,35,36,16,37,38,29,30,39,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),df=G(()=>B(()=>import("./index-Bzfp0G6u.js"),__vite__mapDeps([138,1,2,3,4,5,6,7,8,9,10,11,12,13,39,27,40,28,16,17,18,19,20,72,21,22,23,24,25,86,42,31,32,33,34,35,36,37,38,29,30,26,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),uf=G(()=>B(()=>import("./index-DP0ZhePt.js"),__vite__mapDeps([139,1,2,3,4,5,6,7,8,9,10,11,12,13,39,28,103,27,21,22,23,24,25,19,20,17,18,31,32,33,34,35,36,16,37,38,29,30,26,40,41,42,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),pf=G(()=>B(()=>import("./index-Clo4MTrd.js"),__vite__mapDeps([140,27,1,2,3,4,5,6,7,8,9,10,11,12,13,39,40,28,16,17,18,19,20,69,86,42,31,32,33,34,35,36,37,38,21,22,23,24,25,29,30,26,41,43,44,14,15,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65]))),mf=[{path:p.CART,element:t.jsx(B1,{})}],hf=[{path:p.GUEST.MAIN,children:[{path:p.GUEST.ORDER_DETAIL,element:t.jsx(Y1,{})},{path:p.GUEST.CLAIMS.INFO,element:t.jsx(q1,{})},{path:p.GUEST.CLAIMS.REQUESTS.REQUEST,children:[{index:!0,element:t.jsx(ts,{})},{path:p.GUEST.CLAIMS.REQUESTS.CHANGE_ADDRESS,element:t.jsx(ns,{})}]}]}],xf=[{path:p.MY_PAGE.MAIN,loader:async()=>{if(!K)return null;try{await Rn()}catch{}return null},children:[{index:!0,element:t.jsx(O1,{})},{path:p.MY_PAGE.ORDERS.LIST,children:[{index:!0,element:t.jsx(D1,{})},{path:p.MY_PAGE.ORDERS.ORDER_DETAIL,element:t.jsx(H1,{})}]},{path:p.MY_PAGE.CLAIMS.LIST,children:[{index:!0,element:t.jsx(G1,{})},{path:p.MY_PAGE.CLAIMS.REQUESTS.REQUEST,children:[{index:!0,element:t.jsx(ts,{})},{path:p.MY_PAGE.CLAIMS.REQUESTS.CHANGE_ADDRESS,element:t.jsx(ns,{})}]},{path:p.MY_PAGE.CLAIMS.DETAIL,element:t.jsx(z1,{})},{path:p.MY_PAGE.CLAIMS.INFO,element:t.jsx(V1,{})}]},{path:p.MY_PAGE.PRODUCT_INQUIRIES,element:t.jsx(df,{})},{path:p.MY_PAGE.COUPONS,element:t.jsx(M1,{})},{path:p.MY_PAGE.REVIEWS.LIST,children:[{index:!0,element:t.jsx(W1,{})},{path:p.MY_PAGE.REVIEWS.REVIEWS_WRITE,element:t.jsx(de,{errorFallback:({error:e})=>{var n;return e instanceof Ft&&((n=e.response)==null?void 0:n.data.code)==="PNPE001"?t.jsx(Yr,{errorMessage:"판매중지된 상품으로 리뷰 작성이 불가합니다.",returnUrl:p.MY_PAGE.REVIEWS.LIST}):t.jsx(t.Fragment,{})},children:t.jsx(Q1,{})})},{path:p.MY_PAGE.REVIEWS.REVIEWS_MODIFY,element:t.jsx(K1,{})}]},{path:p.MY_PAGE.WISH,element:t.jsx(_1,{})},{path:p.MY_PAGE.ADDRESSES.LIST,children:[{index:!0,element:t.jsx(Z1,{})},{path:p.MY_PAGE.ADDRESSES.REGISTER,element:t.jsx(J1,{})},{path:p.MY_PAGE.ADDRESSES.MODIFY,element:t.jsx(X1,{})}]}]}],gf=[{path:p.ORDER.MAIN,children:[{path:p.ORDER.ORDER_SHEET,element:t.jsx(U1,{})},{path:p.ORDER.ORDER_COMPLETE,element:t.jsx(F1,{})}]}],ff=[{path:p.BOARDS.NOTICE.LIST,children:[{index:!0,element:t.jsx(cf,{})},{path:p.BOARDS.NOTICE.DETAIL,element:t.jsx(lf,{})}]},{path:p.BOARDS.FAQ,element:t.jsx(af,{})}],yf="/assets/service-unavailable-DCqIOZkA.png",Ef=Ss([{path:p.MAIN,element:t.jsx(qr,{children:t.jsx(s.Suspense,{fallback:t.jsx(t.Fragment,{}),children:t.jsx(md,{})})}),children:[{index:!0,element:t.jsx(Zm,{})},{path:p.AUTH.LOGIN,element:t.jsx($d,{})},{path:p.PRODUCT.DETAIL,element:t.jsx(de,{errorFallback:({error:e,resetErrorBoundary:n})=>{var a,l;const{data:o}=we(),{productNo:i}=Gt();if(e instanceof Ft){const d=(o==null?void 0:o.adultCertificated)??!1,u=o!=null&&o.adultCertificatedYmdt?Y(o.adultCertificatedYmdt):null,c=d===!1||u&&u.isBefore(Y().subtract(3,"month"));if(((a=e.response)==null?void 0:a.data.code)==="PNPE001")return t.jsx(Yr,{errorMessage:"접근 불가한 상품입니다."});if(((l=e.response)==null?void 0:l.data.code)==="E0008"&&c){const m=()=>{window.history.back();const x=setTimeout(()=>window.location.replace(p.MAIN),300);return()=>{clearTimeout(x)}};return t.jsx(zt,{isVisible:!0,productNo:Number(i),setIsVisible:x=>{x||(n(),m())}})}}throw e},children:t.jsx(Ag,{})})},{path:p.PRODUCT.PARTNER.LIST,element:t.jsx(tf,{})},{path:p.AUTH.TERM_DETAIL,element:t.jsx(de,{suspenseFallback:t.jsx(En,{children:t.jsx(We,{})}),children:t.jsx(ef,{})})},{path:p.SEARCH,element:t.jsx(y1,{})},{path:p.CATEGORIES.DETAIL,element:t.jsx(dh,{})},{path:p.PRODUCT.BRAND.LIST,element:t.jsx(nf,{})},{path:p.PRODUCT.REVIEW,element:t.jsx(Dg,{})},{path:p.HAPPY_DEAL,element:t.jsx(mm,{})},{path:p.SPECIAL_DEAL,element:t.jsx($1,{})},{path:p.BEST,element:t.jsx(Au,{})},{path:p.EXHIBITIONS.LIST,children:[{index:!0,element:t.jsx(uf,{})},{path:p.EXHIBITIONS.DETAIL,element:t.jsx(de,{suspenseFallback:t.jsx(Dp,{}),children:t.jsx(pf,{})})}]},{path:p.EVENT.LIST,children:[{index:!0,element:t.jsx(Wu,{})},{path:p.EVENT.DETAIL,element:t.jsx(Ou,{})}]},...xf,...gf,...mf,...hf,...ff]},{path:p.CALLBACK.KCP_AUTH,element:t.jsx(de,{suspenseFallback:t.jsx(En,{children:t.jsx(We,{})}),children:t.jsx(of,{})})},{path:p.CALLBACK.NICE_AUTH_SUCCESS,element:t.jsx(de,{suspenseFallback:t.jsx(En,{children:t.jsx(We,{})}),children:t.jsx(rf,{})})},{path:p.CALLBACK.NICE_AUTH_ERROR,element:t.jsx(de,{suspenseFallback:t.jsx(En,{children:t.jsx(We,{})}),children:t.jsx(sf,{})})},{path:"*",element:t.jsx(rc,{})}]),Cf=Is` ${la}; :root { --color-main: ${e=>e.theme.color.main}; --color-sub: ${e=>e.theme.color.sub}; --color-black: ${e=>e.theme.color.black}; --color-white: ${e=>e.theme.color.white}; --color-textPrimary: ${e=>e.theme.color.textPrimary}; --color-textSecondary: ${e=>e.theme.color.textSecondary}; --color-textDarkGray: ${e=>e.theme.color.textDarkGray}; --color-textGray: ${e=>e.theme.color.textGray}; --color-textLightGray: ${e=>e.theme.color.textLightGray}; --color-highlight: ${e=>e.theme.color.highLight}; } * { box-sizing: border-box; word-break: keep-all; } html { font-size: 62.5%; padding: 0; margin: 0; } html, body { height: 100%; width: 100%; ${wo}; } html * { line-height: 1.3; } body { font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; } a { display: block; color: inherit; text-decoration: none; } span, strong { display: inline-block; } input, button { background-color: transparent; border: none; outline: none; font-family: inherit; } /* input 기본 스타일 초기화 */ input { -webkit-border-radius: 0; border-radius: 0; -webkit-appearance: none; -moz-appearance: none; appearance: none; } input:focus { outline: none; } /* input[type=number]에서 화살표 제거 */ /* Chrome, Safari, Edge, Opera */ input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { -webkit-appearance: none; -moz-appearance: none; appearance: none; } /* Firefox */ input[type=number] { -moz-appearance: textfield; } /* IE10 이상에서 input box 에 추가된 지우기 버튼 제거 */ input::-ms-clear { display: none; } /** 버튼 기본 스타일 초기화 */ button { padding: 0; color: inherit; font-size: inherit; cursor: pointer; } /** select 기본 스타일 초기화 */ select { /*webkit browsers */ -webkit-appearance: none; /*Firefox */ -moz-appearance: none; /* modern browsers */ appearance: none; background: #fff; color: inherit; } ::-webkit-scrollbar, ::-moz-scrollbar { display: none; height: 0; } b { font-weight: bold; color: var(--color-main); } textarea { font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; } `,wf=new ms({defaultOptions:{queries:{retry:2,throwOnError:!0,refetchOnMount:!1,refetchOnReconnect:!0,refetchOnWindowFocus:!1,networkMode:"always",staleTime:60*1e3,gcTime:30*60*1e3},mutations:{throwOnError:!1}}}),bf=Ps(Jr);function Sf(){const{isDarkMode:e}=_s();return t.jsx(Ls,{theme:e?hd:xi,children:t.jsx(fs,{children:t.jsx(hs,{client:wf,children:t.jsx(ws,{store:Jr,children:t.jsxs(js,{loading:null,persistor:bf,children:[t.jsx(Cf,{}),t.jsx(jr,{}),!1,t.jsx(Ea,{children:t.jsx(Ts,{router:Ef})})]})})})})})}const Tf=r.section` ${z}; flex-direction: column; height: 100vh; margin: 0 auto; background: #f5f6f8; img { /* max-width: ${gt.SM}px; */ max-width: 600px; } `,vf=r.h1` padding: 50px 0 15px; font-size: 2.6rem; ${T.bold}; color: #000; `,Af=r.p` font-size: 1.6rem; line-height: 36px; text-align: center; color: #727171; `,io={Section:Tf,Title:vf,Description:Af},Pf=()=>t.jsxs(io.Section,{children:[t.jsx("img",{src:yf,alt:"error",width:256,height:167}),t.jsx(io.Title,{children:"서비스 점검 중입니다."}),t.jsxs(io.Description,{children:["보다 안정적인 서비스 제공을 위해 ",t.jsx("br",{}),"shop by DB 시스템 점검을 진행중입니다. ",t.jsx("br",{}),"점검 기간 동안 서비스 접속 및 이용이 제한되오니 ",t.jsx("br",{}),"고객님의 양해 부탁 드립니다."]})]}),jf=e=>s.createElement("svg",{width:14,height:14,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M7 4.6V7M7 9.4H7.006M13 7C13 10.3137 10.3137 13 7 13C3.68629 13 1 10.3137 1 7C1 3.68629 3.68629 1 7 1C10.3137 1 13 3.68629 13 7Z",stroke:"#F88177",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),If=r.div` width: 100%; height: 85vh; display: flex; `,Lf=r.div` width: 100%; ${z}; flex-direction: column; `,Nf=r(jf)` width: 64px; height: 64px; `,kf=r.p` font-size: 1.6rem; font-weight: 800; margin-top: 22px; `,Rf=r.p` font-size: 1.4rem; ${T.regular}; color: #999999; margin-top: 20px; text-align: center; `,$f=r.a` ${z}; width: 90%; max-width: 400px; height: 50px; font-size: 1.4rem; ${T.regular}; color: #ffffff; background-color: #000000; margin-top: 40px; `,on={Container:If,ContainerTest:Lf,Warning:Nf,ErrorText:kf,ErrorSubText:Rf,MoveMain:$f},Of=()=>t.jsx(on.Container,{children:t.jsxs(on.ContainerTest,{children:[t.jsx(on.Warning,{}),t.jsx(on.ErrorText,{children:"일시적인 오류가 발생했습니다."}),t.jsx(on.ErrorSubText,{children:"잠시 후 다시 시도해주세요."})]})}),_f=({children:e})=>{const n=({error:o})=>{var l,d;const{HTTP_UNAUTHORIZED:i,HTTP_SERVICE_UNAVAILABLE:a}=dn;if(o instanceof Ft)return((l=o.response)==null?void 0:l.status)===a?t.jsx(Pf,{}):((d=o.response)==null?void 0:d.status)===i?t.jsx(t.Fragment,{}):t.jsx(Of,{})};return t.jsx(xs,{children:({reset:o})=>t.jsx(Tr,{onReset:o,fallbackRender:n,children:e})})};us(document.getElementById("root")).render(t.jsx(s.StrictMode,{children:t.jsx(_f,{children:t.jsx(Sf,{})})}));export{St as $,Qm as A,Nr as B,Ah as C,i2 as D,C0 as E,w0 as F,Hc as G,sn as H,f0 as I,yt as J,ue as K,Pi as L,Ai as M,Ki as N,zt as O,p as P,gt as Q,r2 as R,g1 as S,Fg as T,We as U,o2 as V,pn as W,Cg as X,lr as Y,fi as Z,qu as _,T as a,ir as a$,Ao as a0,$c as a1,l2 as a2,Ky as a3,q0 as a4,W0 as a5,Yc as a6,_o as a7,dn as a8,d2 as a9,Kc as aA,Vt as aB,Nl as aC,da as aD,Ll as aE,Sd as aF,Pa as aG,vm as aH,h as aI,ge as aJ,hi as aK,Kp as aL,gh as aM,fh as aN,Rg as aO,$o as aP,gc as aQ,$n as aR,kl as aS,fc as aT,ve as aU,Mi as aV,Ni as aW,_n as aX,Yt as aY,Gi as aZ,mn as a_,Zy as aa,Il as ab,an as ac,$e as ad,en as ae,Mt as af,At as ag,Vr as ah,Wi as ai,wi as aj,Ei as ak,c2 as al,Qr as am,Xy as an,Ti as ao,vi as ap,mh as aq,de as ar,Qc as as,e2 as at,t2 as au,Jm as av,n2 as aw,So as ax,Jy as ay,qc as az,Et as b,Pu as b0,Ii as b1,Ya as b2,f1 as b3,s2 as b4,jn as b5,jl as b6,Ng as b7,Li as b8,he as b9,_t as ba,a2 as bb,ci as bc,Dp as bd,Am as be,Z as bf,wg as bg,Me as bh,wo as bi,cr as bj,we as c,ko as d,jt as e,z as f,Wy as g,jo as h,De as i,qe as j,Pt as k,bi as l,qd as m,Gr as n,ja as o,fe as p,He as q,K as r,ee as s,at as t,Pe as u,Co as v,ei as w,Kd as x,Ph as y,vh as z};