const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-gsXqzV_3.js","assets/vendor-react-C630P38J.js","assets/vendor-overlay-B61Jbn6n.js","assets/feature-order-CyMOR5ND.js","assets/vendor-utils-Cb1MAKRV.js","assets/vendor-query-BjC2S-sR.js","assets/vendor-i18n-D_F5k183.js","assets/vendor-fxts-IS4CCBC4.js","assets/vendor-rhf-CXRF5ML7.js","assets/vendor-zod-BNDLCzeL.js","assets/vendor-runtime-BrGgGswE.js","assets/vendor-hooks-D-WB61cZ.js","assets/vendor-cookie-BFUm5jHE.js","assets/vendor-state-BxLZOG0B.js","assets/vendor-form-ui-C6F7344s.js","assets/vendor-date-XKm2J5pk.js","assets/vendor-form-ui-3MQXPqBX.css","assets/feature-order-vRhoSQS7.css","assets/index-CPg4qOH8.js","assets/useMyReviewableList-fnDTscqv.js","assets/useMyReviewableList-BYjK7K81.css","assets/index-C1BMC10b.css","assets/index-CiAMQUDP.js","assets/useProductSectionProductList-cRfRDZxK.js","assets/useProductSectionProductList-nztXiRiu.css","assets/vendor-swiper-CwUwDtZu.js","assets/vendor-swiper-CPwnKXDO.css","assets/index-Cqr0ypdb.js","assets/vendor-meta-D6H5T8-B.js","assets/index-CUOC1_4M.css","assets/index-QdXwQ8Wy.js","assets/index-BZHlzUjl.js","assets/useBrandInfoByBrandNo-Bs0QBnRc.js","assets/usePageGuard-Cc_fp9Gy.js","assets/index-Dt2t3tNg.js","assets/index-DaHaQbCN.css","assets/index-BYWFu7Hu.js","assets/index-Y2alW6Js.css","assets/event-C9uVjvCQ.js","assets/event-C5SXUBGs.css","assets/product-D4wdTcuy.js","assets/product-DAt6ob65.css","assets/index-DBEI34A6.css","assets/index-BNYS2SgI.js","assets/index-DJOSvzgv.js","assets/index-l6biiQJ1.js","assets/index-Cm1RqQJU.css"])))=>i.map(i=>d[i]); import{c as Ae,h as be,r as ee,j as ae,cc as on,cd as rn,ce as an,cf as je,N as ve,u as Q,bF as cn,bL as Me,cg as en,H as ln,ch as dn,ci as q,cj as Ee,aG as V,ck as mn,az as un,d as ze,aH as G,cl as hn,o as xn,cm as gn,cn as bn,co as vn,cp as pn,cq as jn,cr as fn,cs as nn,Q as me,a3 as re,B as yn,ct as Nn,cu as Cn,cv as _n,b8 as Fe,cw as Pn,R as In,cx as Sn,L as On,z as $e,cy as Tn,cz as kn,cA as wn}from"./feature-order-CyMOR5ND.js";import{j as e,L as ce,o as Ue,r as x,R as K,c as fe}from"./vendor-react-C630P38J.js";import{q as Z,p as He,j as Ln,f as Rn,t as Bn,m as An}from"./vendor-fxts-IS4CCBC4.js";import{P as pe,w as Mn}from"./vendor-overlay-B61Jbn6n.js";import{q as En}from"./vendor-utils-Cb1MAKRV.js";import{u as zn}from"./index-C7mEKh20.js";import{g as Fn,e as $n,i as Un,S as Hn}from"./index-Cqr0ypdb.js";import{u as le}from"./vendor-i18n-D_F5k183.js";import{c as qn}from"./vendor-query-BjC2S-sR.js";import{S as ie}from"./vendor-runtime-BrGgGswE.js";import{d as Vn,b as Gn,k as Kn,g as Wn,a as Yn}from"./index-Dt2t3tNg.js";import{L as Jn}from"./useProductSectionProductList-cRfRDZxK.js";import{S as Qn}from"./index-C7-6CTPc.js";import{S as ue,P as Xn,a as Zn,b as he,N as qe,T as Dn}from"./vendor-swiper-CwUwDtZu.js";import{a as es}from"./vendor-hooks-D-WB61cZ.js";import"./vendor-rhf-CXRF5ML7.js";import"./vendor-zod-BNDLCzeL.js";import"./vendor-cookie-BFUm5jHE.js";import"./vendor-state-BxLZOG0B.js";import"./vendor-form-ui-C6F7344s.js";import"./vendor-date-XKm2J5pk.js";import"./vendor-meta-D6H5T8-B.js";var sn="plhfhu0",D="plhfhu1",Ve="plhfhu2",ns="plhfhu3",xe="plhfhu5";const ss=({categoryNo:t,currentCategoryNo:o,search:a}={})=>{const n=t??0,s=o??0,{data:c}=zn({categoryNo:n}),r=Fn(),i=$n(n,c==null?void 0:c.multiLevelCategories),g=a??En.stringify({by:void 0,direction:void 0});return i?e.jsxs("ul",{className:sn,children:[!!r&&e.jsxs("li",{className:D,children:[e.jsx(ce,{className:Ae(Ve),to:{pathname:Ue(be.PRODUCTS.LIST,{categoryNo:String(r)}),search:g},children:"홈"}),i.length>0&&e.jsx(ee,{size:14,strokeWidth:2,color:ae.mediumGray})]}),i.map((f,u)=>e.jsxs("li",{className:D,children:[e.jsx(ce,{className:Ae(Ve,f.categoryNo===Number(s)&&ns),to:{pathname:Ue(be.PRODUCTS.LIST,{categoryNo:String(f.categoryNo)}),search:g},children:f.label}),u!==i.length-1&&e.jsx(ee,{size:14,strokeWidth:2,color:ae.mediumGray})]},`breadcrumb-${u}-${f.categoryNo}`))]}):null},ts=()=>e.jsxs("ul",{className:sn,children:[e.jsxs("li",{className:D,children:[e.jsx("div",{className:xe,style:{width:"30px"}}),e.jsx(ee,{size:14,strokeWidth:2,color:ae.mediumGray})]}),e.jsxs("li",{className:D,children:[e.jsx("div",{className:xe,style:{width:"50px"}}),e.jsx(ee,{size:14,strokeWidth:2,color:ae.mediumGray})]}),e.jsx("li",{className:D,children:e.jsx("div",{className:xe,style:{width:"70px"}})})]}),ye=({productNo:t,enabled:o=!0})=>{var r;const{productDetailSearchParams:a}=on(),{data:n,isFetched:s}=rn({productNo:t,searchParams:a,options:{enabled:o}}),c=!!((r=n==null?void 0:n.baseInfo)!=null&&r.usableRestockNoti);return x.useMemo(()=>{var S,A,O,L,E,F,R,I,M,b,T,k,$,U,H,z;const i=!!(n!=null&&n.liked),g=!!(n!=null&&n.limitations.naverPayHandling),f=(n==null?void 0:n.relatedProductNos)||[],u=n&&an((S=n==null?void 0:n.status)==null?void 0:S.soldout,(A=n==null?void 0:n.stock)==null?void 0:A.stockCnt,(O=n==null?void 0:n.reservationData)==null?void 0:O.reservationStockCnt),P=(((L=n==null?void 0:n.price)==null?void 0:L.immediateDiscountAmt)??0)>0,h=(((E=n==null?void 0:n.price)==null?void 0:E.immediateDiscountAmt)??0)+(((F=n==null?void 0:n.price)==null?void 0:F.additionDiscountAmt)??0)+(((R=n==null?void 0:n.price)==null?void 0:R.couponDiscountAmt)??0)>0,d=((I=n==null?void 0:n.limitations)==null?void 0:I.maxBuyTimeCnt)??0,y=((M=n==null?void 0:n.limitations)==null?void 0:M.minBuyCnt)||1,l=((b=n==null?void 0:n.limitations)==null?void 0:b.maxBuyDays)||0,m=((T=n==null?void 0:n.limitations)==null?void 0:T.maxBuyPeriodCnt)||0,v=((k=n==null?void 0:n.limitations)==null?void 0:k.maxBuyPersonCnt)||0,p=(($=n==null?void 0:n.price)==null?void 0:$.salePrice)??0,j=((U=n==null?void 0:n.price)==null?void 0:U.immediateDiscountAmt)??0,N=((H=n==null?void 0:n.price)==null?void 0:H.additionDiscountAmt)??0,C=((z=n==null?void 0:n.price)==null?void 0:z.couponDiscountAmt)??0,B=je(p).subtract(j).subtract(N),w=B.subtract(C);return{productDetailData:n,isProductDetailFetched:s,liked:i,isNaverPayAvailable:g,relatedProductNos:f,isRestockAvailable:c,isSoldOut:u,isDefaultDiscount:P,isMaxDiscount:h,maxBuyTimeCnt:d,minBuyCnt:y,maxBuyDays:l,maxBuyPeriodCnt:m,maxBuyPersonCnt:v,salePrice:p,immediateDiscountAmt:j,additionDiscountAmt:N,couponDiscountAmt:C,benefitPrice:B,couponBenefitPrice:w}},[n,s,c])};var os="wzx3sj0",rs="wzx3sj1";const is=K.memo(({content:t})=>{const{t:o}=le();return e.jsx("div",{className:os,children:t?e.jsx("div",{className:rs,dangerouslySetInnerHTML:{__html:t||""}}):e.jsx(ve,{text:o("상품 상세 정보가 없습니다.")})})});var as="_1obj9bj0",Ge={selected:"_1obj9bj2 _1obj9bj1",default:"_1obj9bj3 _1obj9bj1"};const cs=({tabList:t=[]})=>{const{isMobile:o}=Q(),a=x.useRef(null),n=o?110:140,{tabList:s,selectedTab:c,onTabClick:r}=cn({type:"single",list:t}),i=x.useRef(null),g=x.useRef({});x.useEffect(()=>{i.current&&i.current.disconnect();const u=t.filter(h=>{var d;return(d=h.ref)==null?void 0:d.current});if(Z(u))return;const P=`-${n}px 0px -50% 0px`;return i.current=new IntersectionObserver(h=>{if(h.forEach(y=>{var m;const l=(m=u.find(v=>v.ref.current===y.target))==null?void 0:m.id;if(l){if(y.isIntersecting){g.current[l]=!0;return}delete g.current[l]}}),Object.keys(g.current).length>0){const l=u.filter(m=>g.current[m.id]).reduce((m,v)=>{var N,C;const p=((N=m.ref.current)==null?void 0:N.getBoundingClientRect().top)??1/0;return(((C=v.ref.current)==null?void 0:C.getBoundingClientRect().top)??1/0)
{var d;h.ref.current&&((d=i.current)==null||d.observe(h.ref.current))}),()=>{i.current&&i.current.disconnect()}},[t,n,c,r]);const f=u=>{const P=d=>{var y,l,m,v;try{const p=((y=document.getElementById("header"))==null?void 0:y.offsetHeight)??parseInt(getComputedStyle(document.documentElement).getPropertyValue("--header-height"))??0,j=((l=a.current)==null?void 0:l.offsetHeight)??0;Me&&d.current?Me.scrollTo(d.current,{offset:-(p+j)}):window.scrollTo({top:(((m=d.current)==null?void 0:m.offsetTop)??0)-p-j,behavior:"smooth"})}catch{window.scrollTo({top:(((v=d.current)==null?void 0:v.offsetTop)??0)-0,behavior:"smooth"})}},h=t.find(d=>d.id===u);h&&P(h.ref)};return Z(s)?null:e.jsx("ul",{ref:a,className:as,children:s.map(({id:u,label:P,counter:h})=>e.jsx("li",{className:(c==null?void 0:c.id)===u?Ge.selected:Ge.default,onClick:()=>{f(u)},children:e.jsxs("p",{children:[P,!Z(h)&&` (${h})`]})},u))})},ls=K.memo(cs);var ds="tp1v3z0",ms="tp1v3z1",us="tp1v3z2",hs="tp1v3z3",xs="tp1v3z4",gs="tp1v3z5";const bs=({dutyInfo:t})=>{const o=x.useMemo(()=>t?en(t):[],[t]);return e.jsxs("div",{className:ds,children:[e.jsx("h4",{className:ms,children:"상품 정보고시"}),e.jsx("ul",{className:us,children:o.map(({key:a,value:n},s)=>e.jsxs("li",{className:hs,children:[e.jsx("p",{className:xs,children:a}),e.jsx("pre",{className:gs,children:n})]},`${a}-${s}`))})]})},vs=K.memo(bs);var ps="paihoe0",js="paihoe1",fs="paihoe2";const Ke=({title:t,children:o})=>e.jsxs("div",{className:ps,children:[e.jsx("h4",{className:js,children:t}),e.jsx("div",{className:fs,children:o})]});var ys="_1gtwyi0",Ns="_1gtwyi1",Cs="_1gtwyi2",_s="_1gtwyi3",Ps="_1gtwyi4",Is="_1gtwyi5",Ss="_1gtwyi6",Os="_1gtwyi7",Ts="_1gtwyi8",ks="_1gtwyi9",ws="_1gtwyin",Ls="_1gtwyio",Rs="_1gtwyip",Bs="_1kjazzj0",As="_1kjazzj1",Ms="_1kjazzj2",Es="_1kjazzj3",zs="_1kjazzj4",Fs="_1kjazzj5",$s="_1kjazzj6",Us="_1kjazzj7";const We=20,Hs=15e3,qs=({discountBasePrice:t})=>{const{data:o}=Vn({type:"id",banners:[Gn.CREDIT_CARD_BENEFIT]}),a=Kn(o??[])[0];if(!a)return null;const n=Math.min(Math.floor(t*(We/100)),Hs),s=t-n;return e.jsxs("section",{className:Bs,children:[e.jsxs("div",{className:As,children:[e.jsx("p",{className:Ms,children:a.name}),e.jsxs("p",{className:Es,children:[e.jsxs("strong",{className:zs,children:[We,"%"]}),e.jsx("span",{className:Fs,children:je(s).format()})]})]}),e.jsx(ce,{className:$s,to:Yn({landingUrlType:a.landingUrlType,landingUrl:a.landingUrl}),target:Wn(a.browerTargetType),rel:"noopener noreferrer","aria-label":a.name,children:e.jsx("img",{className:Us,src:a.imageUrl,alt:a.name})})]})};var Vs="_18svzbe0",Gs="_18svzbe1",Ks="_18svzbe2",Ws="_18svzbe3",Ys="_18svzbe4",Js="_18svzbe5",Qs="_18svzbe6",Xs="_18svzbe7",Zs="_18svzbea",Ye="_18svzbeb";const Ds=V(()=>G(async()=>{const{CouponDownloadBottomSheet:t}=await import("./index-gsXqzV_3.js");return{CouponDownloadBottomSheet:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])).then(({CouponDownloadBottomSheet:t})=>({default:t}))),et=V(()=>G(async()=>{const{CouponDownloadModal:t}=await import("./index-gsXqzV_3.js");return{CouponDownloadModal:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])).then(({CouponDownloadModal:t})=>({default:t}))),nt=V(()=>G(async()=>{const{RestockNotificationModal:t}=await import("./feature-order-CyMOR5ND.js").then(o=>o.e1);return{RestockNotificationModal:t}},__vite__mapDeps([3,1,4,5,2,6,7,8,9,10,11,12,13,14,15,16,17])).then(({RestockNotificationModal:t})=>({default:t}))),st=V(()=>G(async()=>{const{RestockNotificationBottomSheet:t}=await import("./feature-order-CyMOR5ND.js").then(o=>o.e1);return{RestockNotificationBottomSheet:t}},__vite__mapDeps([3,1,4,5,2,6,7,8,9,10,11,12,13,14,15,16,17])).then(({RestockNotificationBottomSheet:t})=>({default:t}))),tt=({isPartialRestockAvailable:t})=>{var R,I,M;const{t:o}=le(),{isMobile:a}=Q(),n=fe(),s=Number(n.productNo)||0,{openLoginDialog:c}=ln(),{productDetailData:r,salePrice:i,immediateDiscountAmt:g,additionDiscountAmt:f,couponDiscountAmt:u,benefitPrice:P,couponBenefitPrice:h,minBuyCnt:d,maxBuyTimeCnt:y,maxBuyDays:l,maxBuyPeriodCnt:m,maxBuyPersonCnt:v}=ye({productNo:s}),{productLimitCount:p}=x.useMemo(()=>dn({salePrice:i,immediateDiscountAmt:g,additionDiscountAmt:f,couponDiscountAmt:u,benefitPrice:P,couponBenefitPrice:h,minBuyCnt:d,maxBuyTimeCnt:y,maxBuyDays:l,maxBuyPeriodCnt:m,maxBuyPersonCnt:v,t:o}),[f,P,h,u,g,l,m,v,y,d,i,o]),{productImageUrl:j,productBaseName:N,productBrandNameKo:C}=x.useMemo(()=>{var b,T;return{productImageUrl:(b=r==null?void 0:r.baseInfo.imageUrlInfo.find(k=>k.type==="IMAGE_URL"))==null?void 0:b.url,productBaseName:q(r==null?void 0:r.baseInfo.productName),productBrandNameKo:q((T=r==null?void 0:r.brand)==null?void 0:T.nameKo)}},[r]),W=x.useCallback(()=>{if(!Ee()){c();return}pe.open(b=>a?e.jsx(ie,{fallback:null,children:e.jsx(Ds,{productNo:s,...b})}):e.jsx(ie,{fallback:null,children:e.jsx(et,{productNo:s,...b})}))},[a,s,c]),B=x.useCallback(()=>{if(!Ee()){c();return}pe.open(b=>a?e.jsx(ie,{fallback:null,children:e.jsx(st,{productNo:s,productName:N,brandName:C,imageUrl:j,...b})}):e.jsx(ie,{fallback:null,children:e.jsx(nt,{productNo:s,productName:N,brandName:C,imageUrl:j,...b})}))},[N,C,j,s,a,c]),{deliveryFeeLabel:w,remoteDeliveryFeeLabel:S}=mn(r==null?void 0:r.deliveryFee),A=w||S?e.jsxs("div",{className:Qs,children:[w&&e.jsx("p",{children:w}),S&&e.jsx("span",{className:Xs,children:S})]}):null,O=((R=r==null?void 0:r.baseInfo)==null?void 0:R.placeOriginLabel)||((I=r==null?void 0:r.baseInfo)==null?void 0:I.placeOriginEtcLabel),L=(M=r==null?void 0:r.baseInfo)==null?void 0:M.productManagementCd,E=Math.max(i-g-f,0),F=[{key:"purchase-limit",label:o("구매제한"),content:p?e.jsx("p",{children:p}):null},{key:"origin",label:o("원산지"),content:O?e.jsx("p",{children:O}):null},{key:"product-code",label:o("상품코드"),content:L?e.jsx("p",{children:L}):null},{key:"delivery-fee",label:o("배송비"),content:A}].filter(({content:b})=>!!b);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:Vs,children:[e.jsx(un,{salePrice:i,immediateDiscountAmt:g,additionDiscountAmt:f,containerClassName:Gs,priceTextClassName:Ks,standardPriceClassName:Ws}),e.jsxs("div",{className:Zs,children:[e.jsx(ze,{tone:"dark",className:Ye,onClick:W,children:e.jsx("span",{children:o("쿠폰받기")})}),t&&e.jsx(ze,{tone:"gray",variant:"outline",className:Ye,onClick:B,children:e.jsx("p",{children:o("재입고 알림")})})]})]}),e.jsx(qs,{discountBasePrice:E}),e.jsx("div",{className:Ys,children:F.map(({key:b,label:T,content:k})=>e.jsxs("div",{className:Js,children:[e.jsx("label",{children:T}),k]},b))})]})},ot=K.memo(tt),rt=({liked:t,productNo:o})=>{const{isMobile:a}=Q();return e.jsx("div",{className:Ts,id:"productNo","data-product-no":o,children:e.jsxs("div",{className:ks,children:[e.jsx(Jn,{isMobile:a,liked:t,productNo:o,variant:"product-detail"}),e.jsx(Qn,{})]})})},it=K.memo(rt),at=({onGiftButtonClick:t,onCartButtonClick:o,onPurchaseButtonClick:a})=>{const{isTablet:n}=Q(),{t:s}=le(),c=fe(),r=Number(c.productNo)||0,{productDetailData:i,liked:g,isRestockAvailable:f,isSoldOut:u}=ye({productNo:r}),{productName:P,promotionText:h,brandName:d,brandNo:y}=x.useMemo(()=>{var ne,se,X;const z=q(((ne=i==null?void 0:i.baseInfo)==null?void 0:ne.productName)??""),Y=q(((se=i==null?void 0:i.brand)==null?void 0:se.name)??"");return{productName:Y?`[${Y}] ${z}`:z,promotionText:(i==null?void 0:i.baseInfo.promotionText)||"",brandName:Y,brandNo:((X=i==null?void 0:i.brand)==null?void 0:X.brandNo)??0}},[i]),{optionView:{productOptionListData:l,getFlatOptionLabel:m,getMultiLevelOptionLabel:v,getOptionImage:p,isFlatOption:j,isOptionDisabled:N,isSomeOptionSoldOut:C,getSelectedOptionValue:W,isFlatOptionUsed:B,isMultiLevelOptionUsed:w,isRequiredOptionUsed:S},selectedOptionState:{filteredSelectedOptionList:A,totalPrice:O},textOptionState:{textOptionInputs:L,productTextOptionInputs:E},optionActions:{onFlatOptionChange:F,onMultiOptionChange:R,onRequiredOptionChange:I,onOptionDeleteClick:M,onPlusClick:b,onMinusClick:T,onChangeProductCount:k,onInputOptionChange:$}}=hn({productNo:r}),U=f&&C,H=qn({mutationKey:xn.write(),status:"pending"});return e.jsxs("div",{className:ys,children:[e.jsxs("div",{className:Ns,children:[d&&e.jsxs(ce,{to:{pathname:`${be.BRANDS.MAIN}/${y}`},className:Cs,children:[e.jsx("span",{children:d}),e.jsx(ee,{className:_s,size:14,strokeWidth:2})]}),e.jsxs("div",{className:Ps,children:[e.jsx("h1",{className:Is,children:P}),e.jsx(it,{liked:g,productNo:r})]})]}),h&&e.jsx("p",{className:Ss,children:h}),e.jsx(ot,{isPartialRestockAvailable:U}),!n&&e.jsx(e.Fragment,{children:e.jsxs("div",{className:Os,children:[B&&e.jsx(gn,{selectState:"relative",onChange:F,optionContext:{flatOptions:(l==null?void 0:l.flatOptions)??[],getFlatOptionLabel:m,getOptionImage:p,isOptionDisabled:N}}),w&&e.jsx(bn,{selectState:"relative",onChange:R,optionContext:{labels:(l==null?void 0:l.labels)??[],multiLevelOptions:(l==null?void 0:l.multiLevelOptions)??[],getMultiLevelOptionLabel:v,getOptionImage:p,isFlatOption:j,isOptionDisabled:N}}),S&&e.jsx(vn,{selectState:"relative",onChange:I,optionContext:{multiLevelOptions:(l==null?void 0:l.multiLevelOptions)??[],getMultiLevelOptionLabel:v,getOptionImage:p,isOptionDisabled:N}}),e.jsx(pn,{selectedOptionList:A,onOptionDeleteClick:M,onPlusClick:b,onMinusClick:T,onChangeProductCount:k,getSelectedOptionValue:W,textOptionList:L.OPTION,onInputOptionChange:$}),e.jsx(jn,{target:{type:"product",productNo:r},textOptionInputs:E,onInputOptionChange:$}),e.jsx(fn,{baseProductNo:r}),e.jsxs("div",{className:ws,children:[e.jsx("label",{className:Ls,children:s("총 상품금액")}),e.jsx("p",{className:Rs,children:je(O).format()})]}),e.jsx(nn,{canAddToCart:i==null?void 0:i.limitations.canAddToCart,isSoldOut:!!u,isPending:H>0,onGiftButtonClick:t,onCartButtonClick:o,onPurchaseButtonClick:a})]})})]})},ct=K.memo(at);var lt="_1bul0yv0",Je="_1bul0yv1",ge="_1bul0yv2",dt="_1bul0yv3",mt="_1bul0yv4",Qe="_1bul0yv5",ut="_1bul0yv6";const ht=({imageUrls:t})=>{const{isMobile:o}=Q(),a={modules:[qe,Dn],loop:t.length>1,pagination:{enabled:!0,el:".product-swiper-pagination"},thumbs:{swiper:`.${Qe}`}},n={modules:[qe],watchSlidesProgress:!0,slidesPerView:4,direction:"horizontal",slideToClickedSlide:!0,breakpoints:{[yn.MD]:{direction:"vertical",slidesPerView:5}}},s={modules:[Xn,Zn],loop:!0,autoplay:{delay:3e3,disableOnInteraction:!1,pauseOnMouseEnter:!0},pagination:{enabled:!0,el:".product-swiper-pagination"}};return e.jsx("div",{className:lt,children:o?e.jsxs(e.Fragment,{children:[e.jsx(ue,{className:Je,...s,children:t.map(c=>e.jsx(he,{className:ge,children:e.jsx(me,{className:dt,src:re(c,860,860),srcSet:[`${re(c,670,670)} 670w`,`${re(c,860,860)} 860w`,`${re(c,1536,1536)} 1536w`].join(", ")})},c))}),t.length>1&&e.jsx("div",{className:`${mt} product-swiper-pagination`})]}):e.jsxs("div",{className:ut,children:[e.jsx(ue,{className:Qe,...n,children:t.map(c=>e.jsx(he,{className:ge,children:e.jsx(me,{src:c})},c))}),e.jsx(ue,{className:Je,...a,children:t.map(c=>e.jsx(he,{className:ge,children:e.jsx(me,{src:c})},c))})]})})},xt=K.memo(ht),J=({children:t,errorFallback:o=e.jsx(e.Fragment,{}),suspenseFallback:a=e.jsx(e.Fragment,{})})=>e.jsx(Nn,{fallback:a,errorFallback:o,children:t}),Xe=({children:t,minHeight:o=320,rootMargin:a="400px 0px"})=>{const{ref:n,isIntersecting:s}=es({threshold:0,rootMargin:a,freezeOnceVisible:!0});return e.jsx("div",{ref:n,style:s?void 0:{minHeight:`${o}px`},children:s?t:null})};var gt="_1u5bggl0",bt="_1u5bggl1",vt="_1u5bggl2",pt="_1u5bggl3",Ze="_1u5bggl4",jt="_1u5bggl5",De="_1u5bggl6",ft="_1u5bggl7",yt="_1u5bggl8",Nt="_1u5bggl9",Ct="_1u5bggla",_t="_1u5bgglb";const Pt=V(()=>G(async()=>{const{RelatedProductList:t}=await import("./index-CiAMQUDP.js").then(o=>o.i);return{RelatedProductList:t}},__vite__mapDeps([22,1,4,3,5,2,6,7,8,9,10,11,12,13,14,15,16,17,23,24,25,26,27,28,29])).then(({RelatedProductList:t})=>({default:t}))),It=V(()=>G(async()=>{const{ProductReviewSection:t}=await import("./index-QdXwQ8Wy.js");return{ProductReviewSection:t}},__vite__mapDeps([30,31,1,7,8,9,32,5,3,4,2,6,10,11,12,13,14,15,16,17,19,20,33,34,28,25,26,35,36,37,38,39,40,41,42,27])).then(({ProductReviewSection:t})=>({default:t}))),St=V(()=>G(async()=>{const{ProductInquirySection:t}=await import("./index-BNYS2SgI.js").then(o=>o.i);return{ProductInquirySection:t}},__vite__mapDeps([43,44,1,8,9,3,4,5,2,6,7,10,11,12,13,14,15,16,17,45,34,28,25,26,35,38,39,46,22,23,24,27,29,33])).then(({ProductInquirySection:t})=>({default:t}))),Qt=()=>{var X,Ne;const{t}=le(),{isTablet:o}=Q(),a=fe(),n=Number(a.productNo)||0,{productDetailData:s,isProductDetailFetched:c,isNaverPayAvailable:r,relatedProductNos:i,isSoldOut:g,maxBuyTimeCnt:f,maxBuyDays:u,maxBuyPeriodCnt:P,maxBuyPersonCnt:h}=ye({productNo:n}),{selectedOptionList:d,textOptionRequiredInfoList:y,isDefaultOptionUsed:l,productOptionListData:m,productOptionImagesData:v}=Cn({productNo:n}),p=_n(_=>_.addOption),{productTitle:j,productImageUrl:N,productMetaImageUrl:C,productContent:W,productDutyInfo:B,exchangeGuide:w,deliveryGuide:S,reviewCount:A,inquiryCount:O,categoryNo:L}=x.useMemo(()=>{var _e,Pe,Ie,Se,Oe,Te,ke,we,Le,Re,Be;const _=q(((_e=s==null?void 0:s.brand)==null?void 0:_e.name)??""),te=_?`[${_}] `:"",tn=q((s==null?void 0:s.baseInfo.productName)??""),oe=(s==null?void 0:s.baseInfo.imageUrls[0])??"",Ce=((Pe=s==null?void 0:s.categories[0])==null?void 0:Pe.categories)??[];return{productTitle:`${te}${tn}`,productImageUrl:oe,productMetaImageUrl:oe.includes(" ")?`http:${oe.replace(" ","%20")}`:`https:${oe}`,restockImageUrl:((Ie=s==null?void 0:s.baseInfo.imageUrlInfo.find(de=>de.type==="IMAGE_URL"))==null?void 0:Ie.url)??"",productContent:He([(Se=s==null?void 0:s.baseInfo)==null?void 0:Se.contentHeader,(Oe=s==null?void 0:s.baseInfo)==null?void 0:Oe.content,(Te=s==null?void 0:s.baseInfo)==null?void 0:Te.contentFooter],Rn(de=>!!de),Ln("")),productDutyInfo:((ke=s==null?void 0:s.baseInfo)==null?void 0:ke.dutyInfo)||"",exchangeGuide:(s==null?void 0:s.exchangeGuide)||"",deliveryGuide:(s==null?void 0:s.deliveryGuide)||"",reviewCount:((we=s==null?void 0:s.counter)==null?void 0:we.reviewCnt)??0,inquiryCount:((Le=s==null?void 0:s.counter)==null?void 0:Le.inquiryCnt)??0,brandNameKo:(Re=s==null?void 0:s.brand)==null?void 0:Re.nameKo,categoryNo:(Be=Ce[Ce.length-1])==null?void 0:Be.categoryNo}},[s]),E=x.useMemo(()=>({title:j,og:{title:j,image:C},meta:{title:j,image:C}}),[C,j]),R=!!((X=Mn()[Fe.OPTION_BOTTOM_SHEET])!=null&&X.isOpen),I=x.useCallback(()=>{pe.open(()=>null,{overlayId:Fe.OPTION_BOTTOM_SHEET})},[]),M=x.useCallback(()=>o&&!R?(I(),!0):!1,[o,R,I]),{onCartButtonClick:b,onPurchaseButtonClick:T,onGiftButtonClick:k}=Pn({productNo:n,isSoldOut:!!g,canAddToCart:s==null?void 0:s.limitations.canAddToCart,memberOnly:s==null?void 0:s.limitations.memberOnly,quantityLimit:{maxBuyDays:u,maxBuyPeriodCnt:P,maxBuyPersonCnt:h},selectedOptionList:d,textOptionRequiredInfoList:y,isDefaultOptionUsed:l,shouldStopAction:M,clearOptionsAfterAddToCart:!0}),$=x.useCallback(_=>{if(_.saleType!=="SOLD_OUT")if(p({productNo:n,optionNo:_.optionNo,label:_.label||_.value||"",price:_.buyPrice??0,buyPrice:_.buyPrice??0,addPrice:_.addPrice??0,orderCnt:1,stockCnt:_.stockCnt??0,isRequiredOption:!1}),o)I();else{const te=document.querySelector(`.${Ze}`);te&&te.scrollIntoView({behavior:"smooth"})}},[p,o,I,n]);Un(n);const U=x.useRef(null),H=x.useRef(null),z=x.useRef(null),Y=x.useRef(null),ne=x.useRef(null),se=x.useMemo(()=>[{id:"baseInfo",label:"상세정보",isSelected:!0,ref:U},{id:"basicInfo",label:"기본정보",isSelected:!1,ref:H},{id:"review",label:"리뷰",isSelected:!1,ref:z,counter:A},{id:"productInquiry",label:"상품문의",isSelected:!1,ref:Y,counter:O}],[O,A]);return In({product:s}),Sn(),e.jsxs(e.Fragment,{children:[e.jsx(Hn,{...E}),e.jsx(On,{isLoading:!c,isLoadedAnimation:!0,shouldAnimateOverflow:!1,loadingStyle:{height:"50vh"},children:e.jsxs("div",{className:gt,children:[e.jsx("div",{className:vt,children:e.jsx($e,{fallback:e.jsx(ts,{}),errorFallback:e.jsx(e.Fragment,{}),children:e.jsx(ss,{categoryNo:L,currentCategoryNo:L})})}),e.jsxs("div",{className:bt,children:[e.jsxs("div",{className:pt,children:[e.jsxs("div",{className:Ze,children:[e.jsx(J,{errorFallback:e.jsx(e.Fragment,{}),children:e.jsx(xt,{imageUrls:((Ne=s==null?void 0:s.baseInfo)==null?void 0:Ne.imageUrls)??[]})}),e.jsx(J,{errorFallback:e.jsx(e.Fragment,{}),children:e.jsx(ct,{onGiftButtonClick:k,onCartButtonClick:b,onPurchaseButtonClick:T})}),!o&&!g&&r&&e.jsx("div",{className:ft,id:"optionList","data-option-list":He(d,An(_=>({..._,productNo:n})),Bn,JSON.stringify),children:e.jsx(Tn,{pageType:kn.PRODUCT_DETAIL,productNo:n})})]}),!Z(i)&&e.jsx($e,{errorFallback:e.jsx(e.Fragment,{}),children:e.jsx(Pt,{productNos:i})})]}),e.jsxs("div",{className:jt,ref:ne,children:[e.jsx(ls,{tabList:se}),e.jsxs("div",{className:Nt,children:[e.jsx(J,{errorFallback:e.jsx(e.Fragment,{}),children:e.jsxs("div",{ref:U,children:[e.jsx(wn,{productNo:n,optionImages:v,flatOptions:(m==null?void 0:m.flatOptions)??[],multiLevelOptions:(m==null?void 0:m.multiLevelOptions)??[],onSelectOption:$}),e.jsx(is,{content:W})]})}),e.jsx(J,{errorFallback:e.jsx(e.Fragment,{}),children:e.jsxs("div",{ref:H,className:Ct,children:[!Z(en(B))&&e.jsx(vs,{dutyInfo:B}),e.jsx(Ke,{title:t("배송 및 반품"),children:S?e.jsx("div",{className:De,dangerouslySetInnerHTML:{__html:S}}):e.jsx(ve,{text:t("등록된 배송 및 반품 안내가 없습니다.")})}),e.jsx(Ke,{title:t("교환안내"),children:w?e.jsx("div",{className:De,dangerouslySetInnerHTML:{__html:w}}):e.jsx(ve,{text:t("등록된 교환 안내가 없습니다.")})})]})}),e.jsx("div",{ref:z,children:e.jsx(Xe,{minHeight:900,rootMargin:"300px 0px",children:e.jsx(J,{errorFallback:e.jsx(e.Fragment,{}),children:e.jsx(It,{productNo:n})})})}),e.jsx("div",{ref:Y,className:O===0?_t:void 0,children:e.jsx(Xe,{minHeight:720,rootMargin:"240px 0px",children:e.jsx(J,{errorFallback:e.jsx(e.Fragment,{}),children:e.jsx(St,{productNo:n,productName:q(s==null?void 0:s.baseInfo.productName),productImageUrl:N})})})})]})]})]}),o&&e.jsx("div",{className:yt,children:e.jsx(nn,{cartNoticeVariant:"compact",canAddToCart:s==null?void 0:s.limitations.canAddToCart,isSoldOut:!!g,onGiftButtonClick:k,onCartButtonClick:b,onPurchaseButtonClick:I})})]})})]})};export{Qt as default};