PageSourceSearch

https://display.goodwearmall.com/_next/static/chunks/6558-2c046c9f3ba9ccc2.js

js goodwearmall.com collected 2026-10-07 04:10:24 UTC 87,376 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6558],{3218:(e,t,a)=>{a.d(t,{A:()=>v});var l=a(95155),c=a(12115),s=a(68072),n=a(20063),r=a(31778),o=a(81495),i=a(95177),d=a(22120),u=a(90933),m=a(74948),p=a(6582),h=a(99067),g=a(43209),b=a(25016);let y={color:10,brand:10,style:5},x=/^\/(?:selectshop\/|polhamshop\/)?category\/(?:strategy\/|outlet\/|new\/)?main\/[^/]+(?:\/.*)?$/,N=/^\/(?:selectshop\/|polhamshop\/)?(?:special|event)\/(?!list(?:$|[/?#]))[^/?#]+(?:\/view)?(?:\/)?(?:$|[?#])/;function v(){let e=(0,n.useRouter)(),t=(0,n.useSearchParams)(),a=(0,n.usePathname)(),v=(0,u.gc)(),f="/search"===a,j=(0,r.j)(e=>e.searchResult),C=(0,r.j)(e=>e.resultType),k=(0,r.j)(e=>e.showCategoryFilter),S=(0,r.j)(e=>e.showSortOption),w=(0,r.j)(e=>e.isLeafCategory),E=(0,r.j)(e=>e.sortType),_=(0,r.j)(e=>e.setSortType),T=(0,r.j)(e=>e.gridType),L=(0,r.j)(e=>e.setGridType),z=(0,r.j)(e=>e.categoryType),{brandCd:F}=(0,o.NH)(a,t),R="NEW"!==z||S,P="category"!==C||!!F||k,A=(0,d.l)(e=>e.setOverflowHidden),{categories:I=[],totalSize:B=0,attributes:M=[],koreanBrands:D=[],englishBrands:V=[],sizes:Y=[],styles:O=[],chipFilters:H=[]}=j||{},G=(0,c.useMemo)(()=>(null!=I?I:[]).filter(e=>"STRTGY_CTGRY"!==e.categoryType),[I]),U={BST:"인기순",NEW:"신상품순",LAST:"낮은가격순",HIGH:"높은가격순",DIC:"할인율순",SCORE:"별점높은순",MD:"MD추천순"},K="special"===C||"event"===C||"magazine"===C||"category"===C&&w&&(0,b.sv)(z),[W,q]=(0,c.useState)(-1),[$,J]=(0,c.useState)("korean"),[Q,X]=(0,c.useState)(0),[Z,ee]=(0,c.useState)(0),[et,ea]=(0,c.useState)(0),[el,ec]=(0,c.useState)(0),[es,en]=(0,c.useState)(0),[er,eo]=(0,c.useState)(0),[ei,ed]=(0,c.useState)(!1),eu=(0,c.useRef)(null),em=(0,c.useRef)({}),ep=(0,c.useRef)({}),eh=(0,c.useRef)({}),eg=(0,c.useRef)({}),eb=(0,c.useRef)({}),ey=(0,c.useRef)(null),[ex,eN]=(0,c.useState)(!1);(0,c.useRef)(null);let[ev,ef]=(0,c.useState)(!1),[ej,eC]=(0,c.useState)(new Set),[ek,eS]=(0,c.useState)(!1),ew=(0,r.j)(e=>e.hasSubCategoryNav),eE=(0,r.j)(e=>e.isCategoryNavEmpty),e_=(0,i.RW)(a),eT="/search"===e_||"/selectshop/search"===e_||"/polhamshop/search"===e_,eL=x.test(e_),ez=(e_.startsWith("/category/")||e_.startsWith("/selectshop/category/")||e_.startsWith("/selectshop/outlet/")||e_.startsWith("/polhamshop/category/"))&&!eL,eF=N.test(e_),eR=ez&&!eT||eF,[eP,eA]=(0,c.useState)(null),eI=(0,c.useRef)({});(0,c.useEffect)(()=>{if(!eR){eS(!1),eA(null);return}let e=()=>{let e=window.scrollY,t=(()=>{let e=document.querySelector(".page-utility"),t=e?e.getBoundingClientRect().height:0;if(eF){var a,l;let e=document.querySelector("#catalogScrollSpySecond .navigator:not(.d-none)"),c=null!=(l=null!=(a=null==e?void 0:e.closest("#catalogScrollSpySecond"))?a:document.getElementById("catalogScrollSpy"))?l:document.getElementById("viewScrollSpyCont");if(c)return Math.max(0,("fixed"===getComputedStyle(c).position&&c.parentElement?c.parentElement:c).getBoundingClientRect().bottom+window.scrollY-t);let s=document.getElementById("divOsGodArea");return s?Math.max(0,s.getBoundingClientRect().top+window.scrollY-t):0}let c=document.getElementById("secCtgryGodList");if(c)return Math.max(0,c.getBoundingClientRect().top+window.scrollY-t);let s=document.getElementById("divCnrArea");if(s)return Math.max(0,s.getBoundingClientRect().bottom+window.scrollY-t);let n=document.getElementById("categoryScrollSpy");return n?Math.max(0,n.getBoundingClientRect().top+window.scrollY-t):0})();eS(a=>a?e>=t-8:e>=t),(()=>{if(!eF)return eA(null);let e=(()=>{var e,t,a,l;let c=document.querySelector("#catalogScrollSpySecond .navigator:not(.d-none)"),s=document.querySelector("#catalogScrollSpy .navigator");return null!=(l=null!=(a=null!=(t=null==c?void 0:c.getBoundingClientRect().bottom)?t:null==s?void 0:s.getBoundingClientRect().bottom)?a:null==(e=document.querySelector(".page-utility"))?void 0:e.getBoundingClientRect().bottom)?l:0})();eA("".concat(Math.round(e),"px"))})()};e();let t=requestAnimationFrame(()=>requestAnimationFrame(e)),a=[0,120,300].map(t=>setTimeout(e,t));window.addEventListener("scroll",e,{passive:!0}),window.addEventListener("resize",e,{passive:!0});let l=[document.querySelector(".page-utility"),document.getElementById("viewScrollSpyCont"),document.getElementById("catalogScrollSpy"),document.getElementById("catalogScrollSpySecond"),document.getElementById("divOsGodArea")].filter(e=>e instanceof HTMLElement).map(t=>{let a=new ResizeObserver(()=>{e()});return a.observe(t),a}),c=document.getElementById("catalogScrollSpySecond"),s=c&&new MutationObserver(()=>{e()});return c&&s&&s.observe(c,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),()=>{cancelAnimationFrame(t),a.forEach(clearTimeout),window.removeEventListener("scroll",e),window.removeEventListener("resize",e),l.forEach(e
1=>e.disconnect()),null==s||s.disconnect()}},[eR,a]);let eB=ek?{position:"fixed",top:eF&&eP?eP:eE?"13.8888888889vw":ew?"35vw":"25vw",left:0,right:0,zIndex:eR?104:3,backgroundColor:"#fff"}:void 0,[eM,eD]=(0,c.useState)([]),eV=(0,c.useRef)(eM);eV.current=eM;let eY=(0,c.useMemo)(()=>eM.reduce((e,t)=>(e[t.type]||(e[t.type]=[]),e[t.type].push(t),e),{}),[eM]),eO=(0,c.useMemo)(()=>{let e=new Set;return eM.forEach(t=>e.add("".concat(t.type,"-").concat(t.code).concat(t.depth?"-".concat(t.depth):""))),e},[eM]),eH=(0,c.useMemo)(()=>{var e;let t=new Map;return null==(e=eY.category)||e.forEach(e=>{void 0!==e.depth&&t.set(e.code,e.depth)}),t},[eY]),eG=(0,c.useMemo)(()=>G&&0!==G.length&&G[W]||null,[G,W]),[eU,eK]=(0,c.useState)(""),eW=(0,c.useRef)(null),eq=(0,c.useRef)(null),e$=(0,c.useRef)(null),eJ=(0,c.useRef)({min:"",max:""}),[eQ,eX]=(0,c.useState)(!1),[eZ,e0]=(0,c.useState)(0),e1=(0,c.useCallback)(e=>e.startsWith("#"),[]),e3=(0,c.useCallback)(e=>/\.(jpg|jpeg|png|gif|webp)$/i.test(e),[]),[e2]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[e5]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[e7,e6]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[e4]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[e8]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[e9]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[te,tt]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[ta,tl]=(0,s.A)({align:"start",containScroll:"trimSnaps",dragFree:!0}),[tc,ts]=(0,c.useState)(!1),[tn,tr]=(0,c.useState)(!1),[to,ti]=(0,c.useState)(!1),[td,tu]=(0,c.useState)(!1);(0,c.useLayoutEffect)(()=>{e6&&0!==eM.length&&requestAnimationFrame(()=>{e6.reInit(),requestAnimationFrame(()=>{let e=e6.scrollSnapList().length-1;e>=0&&e6.scrollTo(e)})})},[eM.length,e6]),(0,c.useEffect)(()=>{to&&3===et&&("korean"===$&&tt?tt.reInit():"english"===$&&tl&&tl.reInit())},[to,et,$,tt,tl]);let tm=(0,c.useCallback)(()=>3===et?"".concat(et,"-").concat($):"".concat(et),[et,$]);(0,c.useEffect)(()=>{let e=()=>{if(ey.current){let e=tm();eI.current[e]=ey.current.scrollTop}},t=ey.current;if(t)return t.addEventListener("scroll",e,{passive:!0}),()=>{t.removeEventListener("scroll",e)}},[et,$,to]),(0,c.useEffect)(()=>{if(ey.current){let e=tm(),t=eI.current[e];void 0!==t?requestAnimationFrame(()=>{ey.current&&(ey.current.scrollTop=t)}):ey.current.scrollTop=0}},[et,$]);let tp=(0,c.useMemo)(()=>M?M.map(e=>{let t=new Map;return e.values.forEach(e=>{let a="".concat(e.attrVal,"|").concat(e.attrValNm);if(t.has(a)){let l=t.get(a);l.attrCd="".concat(l.attrCd,"@").concat(e.attrCd)}else t.set(a,{...e})}),{...e,values:Array.from(t.values())}}):[],[M]),th=(0,c.useMemo)(()=>(null!=Y?Y:[]).filter(e=>{var t,a;return(null!=(a=null==(t=e.sizes)?void 0:t.length)?a:0)>0}),[Y]),tg=(0,c.useMemo)(()=>(null!=O?O:[]).filter(e=>{var t,a;return(null!=(a=null==(t=e.styles)?void 0:t.length)?a:0)>0}),[O]),tb=th.length>0,ty=tg.length>0;(0,c.useEffect)(()=>{let e=t.get("color"),a=t.get("brand"),l=t.get("size"),c=t.get("style"),s=t.get("category"),n=t.get("minPrice"),r=t.get("maxPrice"),o=t.get("freeDlv"),i=t.get("chipFilter");if(!(e||a||l||c||s||n||r||o||i)){eD(e=>0===e.length?e:[]),eK(e=>""===e?e:""),eX(e=>!e&&e),eW.current&&(eW.current.value=""),eq.current&&(eq.current.value="");return}if(!((!e||tp.length>0)&&(!a||(null!=D?D:[]).length>0||(null!=V?V:[]).length>0)&&(!l||(null!=Y?Y:[]).length>0)&&(!c||(null!=O?O:[]).length>0)&&(!s||(null!=G?G:[]).length>0)&&(!i||(null!=H?H:[]).length>0)))return;let d=[];if(e&&tp.length>0){let t=e.split("@"),a=new Set;t.forEach(e=>{for(let t of tp){let l=t.values.find(t=>t.attrCd.split("@").includes(e));if(l&&!a.has(l.attrCd)){a.add(l.attrCd),d.push({code:l.attrCd,label:l.attrValNm,type:"color"});break}}})}if(a&&(D||V)&&a.split("@").forEach(e=>{for(let t of D||[]){let a=t.brands.find(t=>t.brandCd===e);if(a)return void d.push({code:e,label:a.brandNmKr,type:"brand"})}for(let t of V||[]){let a=t.brands.find(t=>t.brandCd===e);if(a)return void d.push({code:e,label:a.brandNmEn,type:"brand"})}}
1),l&&Y&&l.split("@").forEach(e=>{for(let t of Y){let a=t.sizes.find(t=>t.sizeCd===e);if(a){d.push({code:e,label:"".concat(t.sizeCategoryNm," > ").concat(a.sizeNm),type:"size"});break}}}),c&&O&&c.split("@").forEach(e=>{for(let t of O){let a=t.styles.find(t=>t.styleCd===e);if(a){d.push({code:e,label:a.styleNm,type:"style"});break}}}),s&&G&&s.split("@").forEach(e=>{for(let t of G){if(t.categoryCd===e)return void d.push({code:e,label:"".concat(t.categoryNm," > 전체"),type:"category",depth:1});if(t.children)for(let a of t.children){if(a.categoryCd===e)return void d.push({code:e,label:"".concat(t.categoryNm," > ").concat(a.categoryNm," > 전체"),type:"category",depth:2,parentCode:t.categoryCd});if(a.children){for(let l of a.children)if(l.categoryCd===e)return void d.push({code:e,label:"".concat(t.categoryNm," > ").concat(a.categoryNm," > ").concat(l.categoryNm),type:"category",depth:3,parentCode:a.categoryCd})}}}}),n||r){let e=n?Number(n):0,t=r?Number(r):1/0,a="",l="";n||"10000"!==r?"10000"===n&&"30000"===r?(a="1만원 ~ 3만원",l="10000to30000"):"30000"===n&&"70000"===r?(a="3만원 ~ 7만원",l="30000to70000"):"70000"===n&&"100000"===r?(a="7만원 ~ 10만원",l="70000to100000"):"100000"===n&&"300000"===r?(a="10만원 ~ 30만원",l="100000to300000"):"300000"!==n||r?(a=n&&r?"".concat(e.toLocaleString(),"원 ~ ").concat(t.toLocaleString(),"원"):r?"".concat(t.toLocaleString(),"원 이하"):"".concat(e.toLocaleString(),"원 이상"),l="custom_".concat(n||"","_").concat(r||"")):(a="30만원 이상",l="over300000"):(a="1만원 미만",l="under10000"),d.push({code:l,label:a,type:"price"}),eK(l),eJ.current={min:n||"",max:r||""},eW.current&&(eW.current.value=n?Number(n).toLocaleString():""),eq.current&&(eq.current.value=r?Number(r).toLocaleString():"")}n||r||(eJ.current={min:"",max:""}),v||"true"!==o?eX(!1):(d.push({code:"free",label:"무료배송",type:"shipping"}),eX(!0)),i&&i.split(",").forEach(e=>{e&&d.push({code:e,label:e,type:"chipFilter"})}),eD(e=>e.length===d.length&&e.every((e,t)=>{let a=d[t];return e.code===a.code&&e.label===a.label&&e.type===a.type&&e.depth===a.depth&&e.parentCode===a.parentCode})?e:d)},[t,eZ,tp,D,V,Y,O,G,H,v]),(0,c.useEffect)(()=>{if(!v||"true"!==t.get("freeDlv"))return;eX(!1),eD(e=>e.some(e=>"shipping"===e.type)?e.filter(e=>"shipping"!==e.type):e);let l=new URLSearchParams(t.toString());l.delete("freeDlv");let c=l.toString();e.replace(c?"".concat(a,"?").concat(c):a,{scroll:!1})},[v,t,e,a]),(0,c.useLayoutEffect)(()=>{var e,a;if(!to||2!==et)return;let l=null!=(e=t.get("minPrice"))?e:"",c=null!=(a=t.get("maxPrice"))?a:"",s=l||eJ.current.min||"",n=c||eJ.current.max||"";eJ.current={min:s,max:n},eW.current&&(eW.current.value=s?Number(s).toLocaleString():""),eq.current&&(eq.current.value=n?Number(n).toLocaleString():"")},[to,et,t]);let tx=(0,c.useCallback)(()=>{("category"===C||F)&&m.E.track(p.yo.SORT_CATEGORY,{...(0,h.U)(U[E]||"인기순"),__providerSelection:["Amplitude"]}),tr(!0),setTimeout(()=>{ts(!0)},10)},[C,E,U]),tN=(0,c.useCallback)(()=>{ts(!1),setTimeout(()=>{tr(!1)},300)},[]),tv=(0,c.useCallback)(e=>{if(e){if("size"===e&&!tb||"style"===e&&!ty)return;let t={category:0,color:1,price:2,brand:3,size:4,style:5};void 0!==t[e]&&ea(t[e])}tu(!0),setTimeout(()=>{ti(!0)},10)},[tb,ty]),tf=(0,c.useCallback)(()=>{ti(!1),setTimeout(()=>{tu(!1),e0(e=>e+1)},300)},[]);(0,c.useEffect)(()=>{(4!==et||tb)&&(5!==et||ty)||ea(+!P)},[et,tb,ty,C]);let tj=(0,c.useCallback)(a=>{let l=a!==E;"keyword"===C&&l&&m.E.track(p.AC.SORT_SEARCH_RESULTS,{...(0,h.M)(U[a]||a,t.get("keyword")||""),__providerSelection:["Amplitude"]}),_(a),tN();let c=new URLSearchParams(t.toString());c.set("sort",a),e.push("?".concat(c.toString()),{scroll:!1})},[tN,C,e,t,_,U,E]),tC=(0,c.useCallback)(()=>{ed(e=>!e)},[]),tk=(0,c.useCallback)(()=>{L("triple"===T?"double":"triple")},[T,L]);(0,c.useEffect)(()=>{let e=e=>{eu.current&&!eu.current.contains(e.target)&&ed(!1)};return ei&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[ei]),(0,c.useEffect)(()=>(A(to),()=>{A(!1)}),[to,A]),(0,c.useEffect)(()=>(A(tc),()=>{A(!1)}),[tc,A]),(0,c.useEffect)(()=>((0,g.cF)(!to),()=>{(0,g.cF)(!0)}),[to]);let tS=(0,c.useCallback)((e,t)=>eH.get(e)===t,[eH]),tw=(0,c.useCallback)(e=>{let t=e.target.value.replace(/[^\d]/g,""),a=t?Number(t).toLocaleStr
1ing():"";e.target.value=a},[]),tE=(0,c.useCallback)((e,t,a,l)=>{eU===e?(eK(""),eJ.current={min:"",max:""},eD(e=>e.filter(e=>"price"!==e.type)),eW.current&&(eW.current.value=""),eq.current&&(eq.current.value="")):(eK(e),eD(t=>[...t.filter(e=>"price"!==e.type),{code:e,label:l,type:"price"}]),eW.current&&(eW.current.value=t?Number(t).toLocaleString():"0"),eq.current&&(eq.current.value=a?Number(a).toLocaleString():""),eJ.current={min:t||"",max:a||""})},[eU]),t_=(0,c.useCallback)(()=>{var e,t;let a=(null==(e=eW.current)?void 0:e.value.replace(/[^\d]/g,""))||"",l=(null==(t=eq.current)?void 0:t.value.replace(/[^\d]/g,""))||"";if(!a&&!l){eK(""),eJ.current={min:"",max:""},eD(e=>e.filter(e=>"price"!==e.type));return}let c=a?Number(a):0,s=l?Number(l):1/0;if(l&&c>s)return void alert("최소 가격이 최대 가격보다 클 수 없습니다.");eK(""),eJ.current={min:a,max:l};let n=a&&l?"".concat(c.toLocaleString(),"원 ~ ").concat(s.toLocaleString(),"원"):l?"".concat(s.toLocaleString(),"원 이하"):"".concat(c.toLocaleString(),"원 이상"),r="custom_".concat(a,"_").concat(l);eD(e=>[...e.filter(e=>"price"!==e.type),{code:r,label:n,type:"price"}])},[]),tT=(0,c.useCallback)((e,t,a)=>{eD(l=>{let c=l.findIndex(t=>t.code===e&&t.type===a);if(c>=0)return l.filter((e,t)=>t!==c);let s=y[a];return void 0!==s&&l.filter(e=>e.type===a).length>=s?(alert("".concat("color"===a?"색상":"brand"===a?"브랜드":"스타일","은(는) 최대 ").concat(s,"개까지 선택할 수 있습니다.")),l):[...l,{code:e,label:t,type:a}]})},[]),tL=(0,c.useCallback)((e,t)=>{eD(a=>a.filter(a=>a.code!==e||a.type!==t)),"category"===t&&0===eV.current.filter(a=>"category"===a.type&&(a.code!==e||a.type!==t)).length&&q(-1),"price"===t&&(eK(""),eJ.current={min:"",max:""},eW.current&&(eW.current.value=""),eq.current&&(eq.current.value="")),"shipping"===t&&eX(!1)},[]),tz=(0,c.useCallback)((e,t,a)=>{let l="".concat(t,"-").concat(e).concat(a?"-".concat(a):""),c="chipFilter"===t?",":"@";return!!eO.has(l)||!a&&!!e.includes(c)&&e.split(c).some(e=>eO.has("".concat(t,"-").concat(e)))},[eO]),tF=(0,c.useCallback)(()=>{var a,l,c,s,n,r;let o=new URLSearchParams(t.toString()),d=!v&&eQ;o.delete("pageNo");let u=eM.filter(e=>"color"===e.type).map(e=>e.code).join("@"),h=eM.filter(e=>"brand"===e.type).map(e=>e.code).join("@"),g=eM.filter(e=>"size"===e.type).map(e=>e.code).join("@"),b=eM.filter(e=>"style"===e.type).map(e=>e.code).join("@"),y=eM.filter(e=>"category"===e.type).map(e=>e.code).join("@"),x=null!=(n=null==(l=eW.current)||null==(a=l.value)?void 0:a.replace(/[^\d]/g,""))?n:"",N=null!=(r=null==(s=eq.current)||null==(c=s.value)?void 0:c.replace(/[^\d]/g,""))?r:"",f=x||eJ.current.min||"",j=N||eJ.current.max||"";u?o.set("color",u):o.delete("color"),h?(o.set("brand",h),F&&(o.set("brandshop","Y"),o.set("brandCd",F))):F?(o.set("brand",(0,i.V1)(F)),o.set("brandshop","Y"),o.set("brandCd",F)):(o.delete("brand"),o.delete("brandshop"),o.delete("brandCd")),g?o.set("size",g):o.delete("size"),b?o.set("style",b):o.delete("style"),y?o.set("category",y):o.delete("category"),f?o.set("minPrice",f):o.delete("minPrice"),j?o.set("maxPrice",j):o.delete("maxPrice"),d?o.set("freeDlv","true"):o.delete("freeDlv");let k=eM.filter(e=>"chipFilter"===e.type).map(e=>e.code).join(",");k?o.set("chipFilter",k):o.delete("chipFilter"),u||h||g||b||y||f||j||d||k||F?o.set("filtered","true"):o.delete("filtered");let S=eM.filter(e=>"category"===e.type).map(e=>e.label),w=eM.filter(e=>"color"===e.type).map(e=>e.label),E=eM.filter(e=>"brand"===e.type).map(e=>e.label),_=eM.filter(e=>"size"===e.type).map(e=>e.label),T=eM.filter(e=>"style"===e.type).map(e=>e.label),L=eM.filter(e=>"chipFilter"===e.type).map(e=>e.label).filter(Boolean),z={filter_category:S,filter_color:w,filter_price:[f,j].filter(e=>""!==e).map(e=>Number(e)).filter(e=>!Number.isNaN(e)),filter_brand:E,filter_size:_,filter_style:T,promotion_keyword:L.length>0?"Y":"N",is_free_shipping:d?"Y":"N"};L.length>0&&(z.promotion_keyword_name=L.join(",")),("category"===C||"keyword"===C||F)&&m.E.track("category"===C||F?p.yo.APPLY_CATEGORY_FILTER:p.yo.APPLY_SEARCH_RESULT_FILTER,{...z,__providerSelection:["Amplitude"]}),eJ.current={min:f||"",max:j||""},e.push("?".concat(o.toString()),{scroll:!1})},[eM,eQ,v,t,e,C,F]),tR=(0,c.useCallback)(()=>{var a;eD([]),eK(""),eX(!1),eJ.current={min:"",max:""}
1,null==(a=e$.current)||a.querySelectorAll("input").forEach(e=>{e.value=""}),q(-1);let l=new URLSearchParams(t.toString());l.delete("color"),l.delete("brand"),l.delete("size"),l.delete("style"),l.delete("category"),l.delete("minPrice"),l.delete("maxPrice"),l.delete("freeDlv"),l.delete("chipFilter"),l.delete("filtered"),l.delete("pageNo"),F?(l.set("brand",(0,i.V1)(F)),l.set("filtered","true"),l.set("brandshop","Y"),l.set("brandCd",F)):(l.delete("brandshop"),l.delete("brandCd")),e.push("?".concat(l.toString()),{scroll:!1})},[t,e,F]),tP=(0,c.useCallback)(()=>{eD(e=>e.filter(e=>"category"!==e.type)),q(-1)},[]),tA=()=>{let e=tI();eD(t=>t.filter(t=>"category"!==t.type||e.has(t.code)))},tI=()=>{let e=new Set;if(!G||0===G.length)return e;let t=G[W];return t&&(e.add(t.categoryCd),t.children&&t.children.forEach(t=>{e.add(t.categoryCd),t.children&&t.children.forEach(t=>{e.add(t.categoryCd)})})),e},tB=(0,c.useCallback)(()=>{if(v)return;let a=!eQ;eX(a),a?eD(e=>[...e.filter(e=>"shipping"!==e.type),{code:"free",label:"무료배송",type:"shipping"}]):eD(e=>e.filter(e=>"shipping"!==e.type));let l=new URLSearchParams(t.toString());a?(l.set("freeDlv","true"),l.set("filtered","true")):(l.delete("freeDlv"),l.has("color")||l.has("brand")||l.has("size")||l.has("style")||l.has("category")||l.has("minPrice")||l.has("maxPrice")||l.has("chipFilter")||l.delete("filtered")),e.push("?".concat(l.toString()),{scroll:!1})},[eQ,v,t,e]),tM=(0,c.useCallback)(a=>{let l=eV.current,c=l.some(e=>"chipFilter"===e.type&&e.code===a)?l.filter(e=>"chipFilter"!==e.type||e.code!==a):[...l,{code:a,label:a,type:"chipFilter"}];eD(c);let s=new URLSearchParams(t.toString()),n=c.filter(e=>"chipFilter"===e.type).map(e=>e.code).join(",");
1n?s.set("chipFilter",n):s.delete("chipFilter"),n||s.has("color")||s.has("brand")||s.has("size")||s.has("style")||s.has("category")||s.has("minPrice")||s.has("maxPrice")||s.has("freeDlv")?s.set("filtered","true"):s.delete("filtered"),e.push("?".concat(s.toString()),{scroll:!1})},[t,e]),tD=(e,t,a)=>{var l;let c=null==G?void 0:G.find(e=>e.categoryCd===t),s=new Set;return(null==c||null==(l=c.children)||l.forEach(e=>{var t;s.add(e.categoryCd),null==(t=e.children)||t.forEach(e=>{s.add(e.categoryCd)})}),e.some(e=>"category"===e.type&&s.has(e.code)))?e:[...e,{code:t,label:"".concat(a," > 전체"),type:"category",depth:1}]},tV=(e,t)=>{"korean"===$?ee(e):X(e);let a=("korean"===$?eb:eg).current[t];a&&a.scrollIntoView({behavior:"smooth",block:"start"})},tY=(0,c.useMemo)(()=>{let e={};return["category","color","price","brand","size","style","shipping","chipFilter"].forEach(t=>{let a=eY[t]||[],l=a.length;0===l?e[t]={count:0,label:""}:1===l?e[t]={count:1,label:a[0].label}:e[t]={count:l,label:"".concat(a[0].label," 외 ").concat(l-1)}}),e},[eY]),tO=(0,c.useCallback)(e=>tY[e]||{count:0,label:""},[tY]),tH=(0,c.useCallback)((a,l)=>{var c,s;a.stopPropagation(),eD(e=>e.filter(e=>e.type!==l));let n=new URLSearchParams(t.toString());"category"===l?n.delete("category"):"color"===l?n.delete("color"):"price"===l?(n.delete("minPrice"),n.delete("maxPrice"),eK(""),eJ.current={min:"",max:""},null==(s=e$.current)||s.querySelectorAll("input").forEach(e=>{e.value=""})):"brand"===l?F?(n.set("brand",(0,i.V1)(F)),n.set("brandshop","Y"),n.set("brandCd",F)):(n.delete("brand"),n.delete("brandshop"),n.delete("brandCd")):"size"===l?n.delete("size"):"style"===l?n.delete("style"):"shipping"===l?(n.delete("freeDlv"),eX(!1)):"chipFilter"===l&&n.delete("chipFilter");let r=(null==(c=eY[l])?void 0:c.length)||0;eM.length-r<=0&&n.delete("filtered"),e.push("?".concat(n.toString()),{scroll:!1})},[eY,t,e,eM.length,F]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{id:"filterScrollSpy",className:"nav-scrollspy ".concat(f?"":"st-filter-brief").concat(eF?" st-catalog":"").concat(ez&&!eT?" st-category-catalog":"").concat(ek?" st-fixed":""),children:(0,l.jsxs)("div",{className:"filter-bubble-brief".concat(f?" py-0 mb-8":""),style:eB,children:[(0,l.jsx)("div",{className:"add-on".concat(eM.length>0?" active":""),children:(0,l.jsx)("button",{role:"button",className:"reset","aria-label":"필터 초기화",onClick:tR,children:(0,l.jsx)("span",{className:"pictogram"})})}),(0,l.jsx)("div",{className:"mx-0 carousel swiper st-free bubbles",children:(0,l.jsx)("div",{className:"embla",ref:e2,style:{overflow:"visible"},children:(0,l.jsxs)("div",{className:"carousel-list embla__container",children:[Array.isArray(H)&&H.map(e=>(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tz(e,"chipFilter")?" st-selected":""),onClick:()=>tM(e),children:[(0,l.jsx)("span",{className:"bubble-text",children:e}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tz(e,"chipFilter")?"":" d-none"),onClick:t=>{t.stopPropagation(),tM(e)}})]},e)),P&&(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tO("category").count>0?" st-selected":""),onClick:()=>tv("category"),children:[(0,l.jsx)("span",{className:"bubble-text",children:tO("category").count>0?tO("category").label:"카테고리"}),(0,l.jsx)("i",{className:"icon icon-chevron-down st-gray st-xs".concat(tO("category").count>0?" d-none":"")}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tO("category").count>0?"":" d-none"),onClick:e=>tH(e,"category")})]}),(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tO("color").count>0?" st-selected":""),onClick:()=>tv("color"),children:[(0,l.jsx)("span",{className:"bubble-text",children:tO("color").count>0?tO("color").label:"색상"}),(0,l.jsx)("i",{className:"icon icon-chevron-down st-gray st-xs".concat(tO("color").count>0?" d-none":"")}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tO("color").count>0?"":" d-none"),onClick:e=>tH(e,"color")})]}),(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tO("price").count>0?" st-selected":""),onClick:()=>tv("price"),children:[(0,l.jsx)("span",{className:"bubble-text",children:tO("price").count>0?tO("price").label:"가격"}),(0,l.jsx)("i",{className:"icon icon-chevron-down st-gray st-xs".concat(tO("price").count>0?" d-none":"")}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tO("price").count>0?"":" d-none"),onClick:e=>tH(e,"price")})]}),(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tO("brand").count>0?" st-selected":""),onClick:()=>tv("brand"),children:[(0,l.jsx)("span",{className:"bubble-text",children:tO("brand").count>0?tO("brand").label:"브랜드"}),(0,l.jsx)("i",{className:"icon icon-chevron-down st-gray st-xs".concat(tO("brand").count>0?" d-none":"")}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tO("brand").count>0?"":" d-none"),onClick:e=>tH(e,"brand")})]}),tb&&(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tO("size").count>0?" st-selected":""),onClick:()=>tv("size"),children:[(0,l.jsx)("span",{className:"bubble-text",children:tO("size").count>0?tO("size").label:"사이즈"}),(0,l.jsx)("i",{className:"icon icon-chevron-down st-gray st-xs".concat(tO("size").count>0?" d-none":"")}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tO("size").count>0?"":" d-none"),onClick:e=>tH(e,"size")})]}
1),ty&&(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tO("style").count>0?" st-selected":""),onClick:()=>tv("style"),children:[(0,l.jsx)("span",{className:"bubble-text",children:tO("style").count>0?tO("style").label:"스타일"}),(0,l.jsx)("i",{className:"icon icon-chevron-down st-gray st-xs".concat(tO("style").count>0?" d-none":"")}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tO("style").count>0?"":" d-none"),onClick:e=>tH(e,"style")})]}),!v&&(0,l.jsxs)("button",{type:"button",className:"carousel-item bubble-select embla__slide".concat(tO("shipping").count>0?" st-selected":""),onClick:tB,children:[(0,l.jsx)("span",{className:"bubble-text",children:tO("shipping").count>0?tO("shipping").label:"무료배송"}),(0,l.jsx)("i",{className:"icon icon-x st-gray st-xs".concat(tO("shipping").count>0?"":" d-none"),onClick:e=>tH(e,"shipping")})]})]})})})]})}),(0,l.jsxs)("div",{className:"container catalog-utility mb-5",children:[(0,l.jsx)("div",{className:"utility-start",children:(0,l.jsxs)("em",{className:"utility-number",children:[B.toLocaleString()," ",(0,l.jsx)("small",{children:"Items"})]})}),(0,l.jsxs)("div",{className:"utility-end",children:[!R&&(0,l.jsx)("div",{className:"update-info",children:(0,l.jsx)("p",{className:"update-info-text",children:"매주 업데이트되는 신상품을 확인해 보세요!"})}),R&&(0,l.jsxs)(l.Fragment,{children:["BST"===E&&(0,l.jsx)("div",{className:"align-self-center me-8",children:(0,l.jsxs)("div",{className:"tooltip-wrap",ref:eu,children:[(0,l.jsx)("button",{type:"button",className:"button-tooltip text-decoration-underline ".concat(ei?"active":""),onClick:tC,children:(0,l.jsx)("i",{className:"icon icon-question-circle st-xs st-grayBD","aria-label":"인기순 정렬 기준 안내"})}),(0,l.jsx)("div",{className:"tooltip",style:{width:"calc(41.3889vw)"},children:(0,l.jsx)("p",{children:(0,l.jsx)("span",{children:"인기순은 최근 3일간의 판매금액, 판매수량, 조회수를 기준으로 정렬됩니다."})})})]})}),(0,l.jsx)("button",{type:"button",className:"selectbox-text",onClick:tx,children:U[E]||"인기순"}),(0,l.jsx)("button",{type:"button",className:"button-icon",onClick:tk,children:(0,l.jsx)("i",{className:"icon icon-gallery-sprite ".concat("triple"===T?"icon-triple-grid-fill":"icon-grid-fill")})})]})]})]}),(0,l.jsxs)("div",{className:"modal ".concat(tc?"modal-open":""),id:"modal-arrange",role:"dialog",style:{opacity:+!!tc,visibility:tn?"visible":"hidden",transition:"opacity 0.3s ease-in-out"},children:[(0,l.jsx)("div",{className:"modal-dialog modal-sheet",style:{translate:"none",rotate:"none",scale:"none",transform:"translate3d(0px, ".concat(tc?"0%":"100%",", 0px)"),transition:"transform 0.3s ease-out"},children:(0,l.jsxs)("div",{className:"modal-content",children:[(0,l.jsx)("button",{type:"button",className:"modal-close-bar",onClick:tN,style:{touchAction:"pan-x",cursor:"grab",userSelect:"none"},children:"닫기"}),(0,l.jsx)("div",{className:"modal-body container pb-60",children:(0,l.jsxs)("div",{className:"row gy-10",children:[(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat("BST"===E?"fw-semibold text-black":"text-light"),"data-sort-type":"BST",onClick:()=>tj("BST"),children:"인기순"}),(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat("NEW"===E?"fw-semibold text-black":"text-light"),"data-sort-type":"NEW",onClick:()=>tj("NEW"),children:"신상품순"}),(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat("LAST"===E?"fw-semibold text-black":"text-light"),"data-sort-type":"LAST",onClick:()=>tj("LAST"),children:"낮은가격순"}),(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat("HIGH"===E?"fw-semibold text-black":"text-light"),"data-sort-type":"HIGH",onClick:()=>tj("HIGH"),children:"높은가격순"}),(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat("DIC"===E?"fw-semibold text-black":"text-light"),"data-sort-type":"DIC",onClick:()=>tj("DIC"),children:"할인율순"}),(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat("SCORE"===E?"fw-semibold text-black":"text-light"),"data-sort-type":"SCORE",onClick:()=>tj("SCORE"),children:"별점높은순"}),K&&(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat("MD"===E?"fw-semibold text-black":"text-light"),"data-sort-type":"MD",onClick:()=>tj("MD"),children:"MD추천순"})]})})]})}),(0,l.jsx)("button",{type:"button",className:"modal-overlay modal-close",onClick:tN,style:{opacity:+!!tc,transition:"opacity 0.3s ease-in-out"},children:(0,l.jsx)("span",{className:"text-hide",children:"닫기"})})]}),td&&(0,l.jsxs)("div",{className:"modal modal-filter ".concat(to?"modal-open":""),style:{opacity:+!!to,visibility:td?"visible":"hidden",transition:"opacity 0.3s ease-in-out"},children:[(0,l.jsx)("div",{className:"modal-dialog modal-full",children:(0,l.jsxs)("div",{className:"modal-content",children:[(0,l.jsxs)("header",{className:"modal-header page-utility",children:[(0,l.jsx)("div",{className:"utility-start",children:(0,l.jsx)("h1",{className:"utility-label ms-15",children:(0,l.jsx)("span",{className:"utility-text",children:"필터"})})}),(0,l.jsx)("div",{className:"utility-end",children:(0,l.jsx)("button",{type:"button",className:"button-icon page-utility__button modal-close",onClick:tf,children:(0,l.jsx)("i",{className:"icon icon-x-page-utility",children:"닫기"})})})]}),(0,l.jsxs)("div",{className:"modal-body overflow-hidden d-flex flex-column",children:[(0,l.jsxs)("nav",{className:"navigator carousel st-free flex-shrink-0 w-per-100",ref:e5,children:[(0,l.jsxs)("ul",{className:"navigator-list carousel-list embla__container",children:[P&&(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide ".concat(0===et?"swiper-slide-thumb-active":""),children:(0,l.jsx)("button",{type:"button",className:"navigator-button",onClick:()=>ea(0),children:(0,l.jsx)("span",{className:"navigator-text",children:"카테고리"})})}),(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide ".concat(1===et?"swiper-slide-thumb-active":""),children:(0,l.jsx)("button",{type:"button",className:"navigator-button",onClick:()=>ea(1),children:(0,l.jsx)("span",{className:"navigator-text",children:"색상"})})}),(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide ".concat(2===et?"swiper-slide-thumb-active":""),children:(0,l.jsx)("button",{type:"button",className:"navigator-button",onClick:()=>ea(2),children:(0,l.jsx)("span",{className:"navigator-text",children:"가격"})})}),(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide ".concat(3===et?"swiper-slide-thumb-active":""),children:(0,l.jsx)("button",{type:"button",className:"navigator-button",onClick:()=>ea(3),children:(0,l.jsx)("span",{className:"navigator-text",children:"브랜드"})})}),tb&&(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide ".concat(4===et?"swiper-slide-thumb-active":""),children:(0,l.jsx)("button",{type:"button",className:"navigator-button",onClick:()=>ea(4),children:(0,l.jsx)("span",{className:"navigator-text",children:"사이즈"})})}
1),ty&&(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide ".concat(5===et?"swiper-slide-thumb-active":""),children:(0,l.jsx)("button",{type:"button",className:"navigator-button",onClick:()=>ea(5),children:(0,l.jsx)("span",{className:"navigator-text",children:"스타일"})})})]}),(0,l.jsx)("hr",{className:"divider st-dimmed navigator-border"})]}),1===et&&(0,l.jsx)("div",{className:"carousel flex-shrink-0 w-per-100",children:(0,l.jsx)("div",{className:"carousel-list",children:(0,l.jsx)("div",{className:"carousel-item bg-white",children:(0,l.jsx)("nav",{className:"navigator carousel st-free st-sub py-15",ref:e8,children:(0,l.jsx)("ul",{className:"navigator-list carousel-list embla__container",children:tp.map((e,t)=>(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide",children:(0,l.jsx)("a",{className:"navigator-button ".concat(t===el?"active":""),onClick:()=>((e,t)=>{ec(e);let a=em.current[t];a&&a.scrollIntoView({behavior:"smooth",block:"start"})})(t,e.attrNm),children:(0,l.jsx)("span",{className:"navigator-text",children:e.attrNm})})},e.attrNm))})})})})}),2===et&&(0,l.jsx)("div",{className:"carousel flex-shrink-0 w-per-100",children:(0,l.jsx)("div",{className:"carousel-list",children:(0,l.jsx)("div",{className:"carousel-item bg-white",children:(0,l.jsx)("nav",{className:"navigator st-sub py-15",children:(0,l.jsx)("ul",{className:"navigator-list",children:(0,l.jsx)("li",{className:"navigator-item",children:(0,l.jsx)("span",{className:"navigator-button active",children:(0,l.jsx)("span",{className:"navigator-text",children:"가격"})})})})})})})}),3===et&&(0,l.jsx)("div",{className:"carousel flex-shrink-0 w-per-100",children:(0,l.jsx)("div",{className:"carousel-list",children:(0,l.jsx)("div",{className:"carousel-item bg-white",children:(0,l.jsxs)("div",{className:"d-flex align-items-center py-15 ps-20",children:[(0,l.jsx)("button",{type:"button",className:"bubble st-dimmed",onClick:()=>{J(e=>"korean"===e?"english":"korean")},children:(0,l.jsx)("span",{className:"bubble-text",children:"korean"===$?"가나다":"ABC"})}),"korean"===$&&(0,l.jsx)("div",{className:"nav-scrollspy st-sub w-per-100",children:(0,l.jsx)("nav",{className:"navigator st-sub swiper carousel st-free",ref:ta,children:(0,l.jsx)("ul",{className:"navigator-list carousel-list embla__container",children:null==V?void 0:V.map((e,t)=>(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide",children:(0,l.jsx)("button",{type:"button",className:"navigator-button ".concat(t===Z?"active":""),"data-brand-letter":e.groupName,onClick:()=>tV(t,e.groupName),children:(0,l.jsx)("span",{className:"navigator-text",children:e.groupName})})},e.groupName))})})}),"english"===$&&(0,l.jsx)("div",{className:"nav-scrollspy st-sub w-per-100",children:(0,l.jsx)("nav",{className:"navigator st-sub swiper carousel st-free",ref:te,children:(0,l.jsx)("ul",{className:"navigator-list carousel-list embla__container",children:null==D?void 0:D.map((e,t)=>(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide",children:(0,l.jsx)("button",{type:"button",className:"navigator-button ".concat(t===Q?"active":""),"data-brand-letter":e.groupName,onClick:()=>tV(t,e.groupName),children:(0,l.jsx)("span",{className:"navigator-text",children:e.groupName})})},e.groupName))})})})]})})})}),4===et&&(0,l.jsx)("div",{className:"carousel flex-shrink-0 w-per-100",children:(0,l.jsx)("div",{className:"carousel-list",children:(0,l.jsx)("div",{className:"carousel-item bg-white",children:(0,l.jsx)("nav",{className:"navigator carousel st-free st-sub py-15",ref:e4,children:(0,l.jsx)("ul",{className:"navigator-list carousel-list embla__container",children:th.map((e,t)=>(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide",children:(0,l.jsx)("a",{className:"navigator-button ".concat(t===es?"active":""),onClick:()=>((e,t)=>{en(e);let a=ep.current[t];a&&a.scrollIntoView({behavior:"smooth",block:"start"})})(t,e.sizeCategoryNm),children:(0,l.jsx)("span",{className:"navigator-text",children:e.sizeCategoryNm})})},e.sizeCategoryNm))})})})})}),5===et&&(0,l.jsx)("div",{className:"carousel flex-shrink-0 w-per-100",children:(0,l.jsx)("div",{className:"carousel-list",children:(0,l.jsx)("div",{className:"carousel-item bg-white",children:(0,l.jsx)("nav",{className:"navigator carousel st-free st-sub py-15",ref:e9,children:(0,l.jsx)("ul",{className:"navigator-list carousel-list embla__container",children:tg.map((e,t)=>(0,l.jsx)("li",{className:"navigator-item carousel-item embla__slide",children:(0,l.jsx)("a",{className:"navigator-button ".concat(t===er?"active":""),onClick:()=>((e,t)=>{eo(e);let a=eh.current[t];a&&a.scrollIntoView({behavior:"smooth",block:"start"})})(t,e.styleTypeNm),children:(0,l.jsx)("span",{className:"navigator-text",children:e.styleTypeNm})})},e.styleTypeNm))})})})})}),(0,l.jsxs)("div",{className:"modal-scroll",ref:ey,children:[0===et&&P&&(0,l.jsxs)("div",{className:"filter-category-wrap",children:[(0,l.jsx)("nav",{className:"filter-category",children:(0,l.jsx)("ul",{className:"depth1-list",children:null==G?void 0:G.map((e,t)=>(0,l.jsx)(l.Fragment,{children:(W===t||-1===W)&&(0,l.jsx)("li",{className:"depth1-item",children:(0,l.jsxs)("div",{className:"depth1-button-wrap",children:[(0,l.jsx)("button",{className:"depth1-button ".concat(W===t?"active":""),onClick:()=>(e=>{q(e);let t=null==G?void 0:G[e];t&&eD(e=>[...e.filter(e=>"category"!==e.type),{code:t.categoryCd,label:"".concat(t.categoryNm," > 전체"),type:"category",depth:1}])})(t),children:(0,l.jsx)("span",{className:"depth1-text",children:e.categoryNm})}),W===t&&(0,l.jsx)("button",{className:"icon icon-cancel depth1-close-button",onClick:()=>{tP()},children:"카테고리초기화"})]})},e.categoryCd)}))})}),(0,l.jsx)("div",{className:"depth1-sub-wrap",children:eG&&(0,l.jsx)(l.Fragment,{children:eG.children&&eG.children.length>0&&eG.children.map(e=>(0,l.jsxs)("div",{className:"depth2-list-wrap ".concat(ej.has(e.categoryCd)?"active":""),children:[(0,l.jsx)("button",{type:"button",className:"depth2-button",onClick:()=>{var t;return t=e.categoryCd,void eC(e=>e.has(t)?new Set:new Set([t]))},"data-tt-toggle":"collapse",children:(0,l.jsx)("span",{className:"depth2-text",children:e.categoryNm})}),(0,l.jsx)("div",{className:"depth3-list-wrap collapse ".concat(ej.has(e.categoryCd)?"active":""),children:(0,l.jsxs)("ul",{className:"depth3-list",children:[(0,l.jsx)("li",{className:"depth3-item",children:(0,l.jsxs)("label",{className:"checkbox",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:!!tS(e.categoryCd,2),"data-category-depth":"2","data-category-code":e.categoryCd,onChange:()=>((e,t,a,l)=>{var c;if(tA(),!G)return;let s=G.find(t=>t.categoryCd===e),n=null==s||null==(c=s.children)?void 0:c.find(e=>e.categoryCd===a);if(!n)return;let r=new Set;
1n.children&&n.children.forEach(e=>{r.add(e.categoryCd)}),eD(c=>{let s=c.filter(t=>"category"!==t.type||t.code!==e&&t.code!==a&&!r.has(t.code));return c.some(e=>"category"===e.type&&e.code===a&&2===e.depth)?tD(s,e,t):[...s,{code:a,label:"".concat(t," > ").concat(l," > 전체"),type:"category",depth:2,parentCode:e}]})})(eG.categoryCd,eG.categoryNm,e.categoryCd,e.categoryNm)}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:"전체"})]})}),e.children&&e.children.map(t=>(0,l.jsx)("li",{className:"depth3-item",children:(0,l.jsxs)("label",{className:"checkbox",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:!!tS(t.categoryCd,3),"data-category-depth":"3","data-category-code":t.categoryCd,onChange:()=>{var a,l,c,s,n,r;return a=eG.categoryCd,l=eG.categoryNm,c=e.categoryCd,s=e.categoryNm,n=t.categoryCd,r=t.categoryNm,void(tA(),eD(e=>{let t=e.filter(e=>"category"!==e.type||e.code!==a&&e.code!==c);return e.some(e=>"category"===e.type&&e.code===n&&3===e.depth)?tD(t.filter(e=>"category"!==e.type||e.code!==n||3!==e.depth),a,l):[...t,{code:n,label:"".concat(l," > ").concat(s," > ").concat(r),type:"category",depth:3,parentCode:c}]}))}}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:t.categoryNm})]})},t.categoryCd))]})})]},e.categoryCd))})})]}),(0,l.jsx)("div",{className:"carousel",children:(0,l.jsxs)("div",{className:"carousel-list",children:[1===et&&(0,l.jsx)("div",{className:"carousel-item bg-white",children:tp.map((e,t)=>(0,l.jsxs)("div",{ref:t=>{em.current[e.attrNm]=t},className:0===t?"container pb-30":"container divider st-fatty pt-20 pb-30",children:[(0,l.jsx)("div",{className:"heading-group st-reduced mb-15",children:(0,l.jsx)("h4",{className:"heading",children:(0,l.jsx)("span",{className:"text-inner",children:e.attrNm})})}),(0,l.jsx)("div",{className:"row row-cols-auto gx-125-dot gy-15",children:e.values.map((t,a)=>{let c=e1(t.attrVal),s=e3(t.attrVal),n="#FFFFFF"===t.attrVal.toUpperCase();return(0,l.jsx)("div",{children:(0,l.jsxs)("button",{type:"button",className:"hole-item st-sm ms-0 ".concat(n?"st-light":""," ").concat(tz(t.attrCd,"color")?"st-focus":""),"data-attr-cd":t.attrCd,"data-attr-val":t.attrVal,"data-attr-nm":t.attrValNm,onClick:()=>tT(t.attrCd,t.attrValNm,"color"),children:[(0,l.jsxs)("div",{className:"hole-thumb image-placeholder st-circle",children:[c&&(0,l.jsx)("div",{className:"hole-color",style:{backgroundColor:t.attrVal}}),s&&(0,l.jsx)("img",{src:"https://img.goodwearmall.com/goods/omni/".concat(t.attrVal.toLowerCase()),className:"hole-img img-fluid",alt:t.attrValNm})]}),(0,l.jsx)("span",{className:"hole-text",children:t.attrValNm})]})},"".concat(e.attrNm,"-").concat(t.attrCd,"-").concat(a))})})]},e.attrNm))}),2===et&&(0,l.jsx)("div",{className:"carousel-item bg-white",children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsxs)("div",{className:"d-flex mb-60",children:[(0,l.jsxs)("div",{className:"input-group",ref:e$,children:[(0,l.jsxs)("div",{className:"text-input-box",children:[(0,l.jsx)("input",{type:"text",className:"text-input-currency",ref:eW,maxLength:10,onChange:tw}),(0,l.jsx)("p",{className:"text-input-currency-text",children:"원"})]}),(0,l.jsx)("div",{className:"input-group-text",children:(0,l.jsx)("p",{className:"fs-13 lh-19",children:"~"})}),(0,l.jsxs)("div",{className:"text-input-box",children:[(0,l.jsx)("input",{type:"text",className:"text-input-currency",ref:eq,maxLength:10,onChange:tw}),(0,l.jsx)("p",{className:"text-input-currency-text",children:"원"})]})]}),(0,l.jsx)("button",{type:"button",className:"button-ghost w-62 flex-shrink-0 ms-10",onClick:t_,children:(0,l.jsx)("span",{className:"button-text",children:"적용"})})]}),(0,l.jsxs)("div",{className:"row gx-5 gy-10",children:[(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("label",{className:"check-button",children:[(0,l.jsx)("input",{type:"checkbox",className:"check-input",checked:"under10000"===eU,onChange:()=>tE("under10000","","10000","1만원 미만")}),(0,l.jsx)("strong",{className:"check-label",children:"1만원 미만"})]})}),(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("label",{className:"check-button",children:[(0,l.jsx)("input",{type:"checkbox",className:"check-input",checked:"10000to30000"===eU,onChange:()=>tE("10000to30000","10000","30000","1만원 ~ 3만원")}),(0,l.jsx)("strong",{className:"check-label",children:"1만원 ~ 3만원"})]})}),(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("label",{className:"check-button",children:[(0,l.jsx)("input",{type:"checkbox",className:"check-input",checked:"30000to70000"===eU,onChange:()=>tE("30000to70000","30000","70000","3만원 ~ 7만원")}),(0,l.jsx)("strong",{className:"check-label",children:"3만원 ~ 7만원"})]})}),(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("label",{className:"check-button",children:[(0,l.jsx)("input",{type:"checkbox",className:"check-input",checked:"70000to100000"===eU,onChange:()=>tE("70000to100000","70000","100000","7만원 ~ 10만원")}),(0,l.jsx)("strong",{className:"check-label",children:"7만원 ~ 10만원"})]})}),(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("label",{className:"check-button",children:[(0,l.jsx)("input",{type:"checkbox",className:"check-input",checked:"100000to300000"===eU,onChange:()=>tE("100000to300000","100000","300000","10만원 ~ 30만원")}),(0,l.jsx)("strong",{className:"check-label",children:"10만원 ~ 30만원"})]})}),(0,l.jsx)("div",{className:"col-6",children:(0,l.jsxs)("label",{className:"check-button",children:[(0,l.jsx)("input",{type:"checkbox",className:"check-input",checked:"over300000"===eU,onChange:()=>tE("over300000","300000","","30만원 이상")}),(0,l.jsx)("strong",{className:"check-label",children:"30만원 이상"})]})})]})]})}),3===et&&(0,l.jsxs)("div",{className:"carousel-item bg-white",children:["korean"===$&&(null==V?void 0:V.map((e,t)=>(0,l.jsxs)("div",{ref:t=>{eb.current[e.groupName]=t},className:0===t?"container pb-20":"container divider st-fatty py-20",children:[(0,l.jsx)("div",{className:"heading-group st-reduced mb-10",children:(0,l.jsx)("h4",{className:"heading",children:(0,l.jsx)("span",{className:"text-inner",children:e.groupName})})}),(0,l.jsx)("div",{className:"row",children:[...e.brands].sort((e,t)=>
1e.brandNmEn.localeCompare(t.brandNmEn)).map((t,a)=>(0,l.jsxs)("button",{type:"button",className:"button-extra st-30brand ".concat(tz(t.brandCd,"brand")?"st-active":""),"data-brand-cd":t.brandCd,"data-brand-nm":t.brandNmEn,onClick:()=>tT(t.brandCd,t.brandNmEn,"brand"),children:[(0,l.jsx)("span",{className:"button-text",children:t.brandNmEn}),(0,l.jsx)("span",{className:"button-text st-sm",children:t.brandNmKr})]},"en-".concat(e.groupName,"-").concat(t.brandCd,"-").concat(a)))})]},e.groupName))),"english"===$&&(null==D?void 0:D.map((e,t)=>(0,l.jsxs)("div",{ref:t=>{eg.current[e.groupName]=t},className:0===t?"container pb-20":"container divider st-fatty py-20",children:[(0,l.jsx)("div",{className:"heading-group st-reduced mb-10",children:(0,l.jsx)("h4",{className:"heading",children:(0,l.jsx)("span",{className:"text-inner",children:e.groupName})})}),(0,l.jsx)("div",{className:"row",children:[...e.brands].sort((e,t)=>e.brandNmKr.localeCompare(t.brandNmKr,"ko")).map((t,a)=>(0,l.jsxs)("button",{type:"button",className:"button-extra st-30brand ".concat(tz(t.brandCd,"brand")?"st-active":""),"data-brand-cd":t.brandCd,"data-brand-nm":t.brandNmKr,onClick:()=>tT(t.brandCd,t.brandNmKr,"brand"),children:[(0,l.jsx)("span",{className:"button-text",children:t.brandNmKr}),(0,l.jsx)("span",{className:"button-text st-sm",children:t.brandNmEn})]},"kr-".concat(e.groupName,"-").concat(t.brandCd,"-").concat(a)))})]},e.groupName)))]}),4===et&&(0,l.jsx)("div",{className:"carousel-item bg-white",children:th.map((e,t)=>(0,l.jsxs)("div",{ref:t=>{ep.current[e.sizeCategoryNm]=t},className:0===t?"container pb-30":"container divider st-fatty pt-20 pb-30",children:[(0,l.jsx)("div",{className:"heading-group st-reduced mb-20",children:(0,l.jsx)("h4",{className:"heading",children:(0,l.jsx)("span",{className:"text-inner",children:e.sizeCategoryNm})})}),(0,l.jsx)("div",{className:"row gx-5 gy-10",children:e.sizes.map((t,a)=>(0,l.jsx)("div",{className:"col-4",children:(0,l.jsxs)("label",{className:"check-button",children:[(0,l.jsx)("input",{type:"checkbox",className:"check-input",checked:tz(t.sizeCd,"size"),"data-size-category":e.sizeCategoryNm,"data-size-cd":t.sizeCd,"data-sizenm":"".concat(e.sizeCategoryNm," > ").concat(t.sizeNm),onChange:()=>tT(t.sizeCd,"".concat(e.sizeCategoryNm," > ").concat(t.sizeNm),"size")}),(0,l.jsx)("strong",{className:"check-label",children:t.sizeNm})]})},"".concat(e.sizeCategoryNm,"-").concat(t.sizeCd,"-").concat(a)))})]},e.sizeCategoryNm))}),5===et&&(0,l.jsx)("div",{className:"carousel-item bg-white",children:tg.map((e,t)=>(0,l.jsxs)("div",{ref:t=>{eh.current[e.styleTypeNm]=t},className:0===t?"container pb-20":"container divider st-fatty py-20",children:[(0,l.jsx)("div",{className:"heading-group st-reduced mb-10",children:(0,l.jsx)("h4",{className:"heading",children:(0,l.jsx)("span",{className:"text-inner",children:e.styleTypeNm})})}),(0,l.jsx)("div",{className:"row gx-5 gy-10",children:e.styles.map((t,a)=>(0,l.jsx)("div",{className:"col-6",children:(0,l.jsx)("button",{type:"button",className:"button-text st-reduced ".concat(tz(t.styleCd,"style")?"fw-semibold text-black":"text-light"),"data-style-type":e.styleTypeNm,"data-style-cd":t.styleCd,"data-style-nm":t.styleNm,onClick:()=>tT(t.styleCd,t.styleNm,"style"),children:t.styleNm})},"".concat(e.styleTypeNm,"-").concat(t.styleCd,"-").concat(a)))})]},e.styleTypeNm))})]})})]})]}),(0,l.jsxs)("footer",{className:"modal-footer py-20",children:[eM.length>0&&(0,l.jsx)("div",{className:"filter-selected-wrap",children:(0,l.jsx)("div",{className:"carousel st-free swiper",children:(0,l.jsx)("div",{className:"embla",ref:e7,children:(0,l.jsx)("div",{className:"carousel-list embla__container",children:eM.map((e,t)=>(0,l.jsxs)("button",{type:"button",className:"filter-selected-button",children:[(0,l.jsx)("span",{children:e.label}),(0,l.jsx)("i",{className:"icon icon-cancel st-xxs",onClick:()=>tL(e.code,e.type)})]},"".concat(e.type,"-").concat(e.code,"-").concat(t)))})})})}),(0,l.jsxs)("div",{className:"filter-footer-actions",children:[(0,l.jsx)("button",{type:"button",className:"button-ghost ".concat(0===eM.length?"st-secondary":""),onClick:tR,children:(0,l.jsx)("span",{className:"button-text st-elevated",children:"초기화"})}),(0,l.jsx)("button",{type:"button",className:"button modal-close ".concat(0===eM.length?"st-disabled":""),onClick:()=>{tF(),tf()},children:(0,l.jsx)("span",{className:"button-text st-elevated",children:"적용"})})]})]})]})}),(0,l.jsx)("button",{type:"button",className:"modal-overlay modal-close",onClick:tf,style:{opacity:+!!to,transition:"opacity 0.3s ease-in-out"},children:(0,l.jsx)("span",{className:"text-hide",children:"닫기"})})]})]})}},16136:(e,t,a)=>{a.d(t,{ProductClickTrackingProvider:()=>r,W:()=>o});var l=a(95155),c=a(12115);let s={trackNo:"unknown",trackDtl:"default",autoTrack:!0},n=(0,c.createContext)({config:s});function r(e){let{children:t,config:a}=e,s=(0,c.useContext)(n),r=(0,c.useMemo)(()=>{var e;let t=s.config.trackNo;return{...a,amplitudeFallbackTrackNo:null!=(e=a.amplitudeFallbackTrackNo)?e:t&&"unknown"!==t?t:void 0}},[a,s.config.trackNo]),o=(0,c.useMemo)(()=>({config:r}),[r]);return(0,l.jsx)(n.Provider,{value:o,children:t})}function o(){let e=(0,c.useContext)(n);return e||{config:s}}},31778:(e,t,a)=>{a.d(t,{j:()=>s});var l=a(25959);let c={searchResult:null,currentPage:1,itemsPerPage:60,filtered:!1,resultType:"keyword",showCategoryFilter:!1,showSortOption:!1,ownBrandOnly:!1,isLeafCategory:!1,sortType:"BST",categoryType:"GENERAL",categoryCd:"",categoryGodDspUnitCd:"",lockedBrandId:"",gridType:"triple",activeTab:0,hasSubCategoryNav:!1,isCategoryNavEmpty:!1,categoryContext:void 0,dspType:"",dspKey:"",section:"",catalogPrdtType:""},s=(0,l.v)(e=>({...c,setSearchResult:t=>e({searchResult:t}),setCurrentPage:t=>e({currentPage:t}),setItemsPerPage:t=>e({itemsPerPage:t}),setFiltered:t=>e({filtered:t}),setResultType:t=>e({resultType:t}),setIsLeafCategory:t=>e({isLeafCategory:t}),setSortType:t=>e({sortType:t}),setCategoryType:t=>e({categoryType:t}),setCategoryCd:t=>e({categoryCd:t}),setGridType:t=>e({gridType:t}),setActiveTab:t=>e({activeTab:t}),setHasSubCategoryNav:t=>e({hasSubCategoryNav:t}),setIsCategoryNavEmpty:t=>e({isCategoryNavEmpty:t}),setDspType:t=>e({dspType:t}),setDspKey:t=>e({dspKey:t}),setSection:t=>e({section:t}),setCategoryContext:t=>e({categoryContext:t}),setSearchState:t=>{var a,l,c,s,n,r,o,i,d,u,m,p,h,g;return e({searchResult:t.searchResult,currentPage:t.currentPage,filtered:t.filtered,resultType:t.resultType,itemsPerPage:null!=(a=t.itemsPerPage)?a:60,showCategoryFilter:null!=(l=t.showCategoryFilter)&&l,showSortOption:null!=(c=t.showSortOption)&&c,ownBrandOnly:null!=(s=t.ownBrandOnly)&&s,isLeafCategory:null!=(n=t.isLeafCategory)&&n,sortType:null!=(r=t.sortType)?r:"BST",categoryType:null!=(o=t.categoryType)?o:"GENERAL",categoryCd:null!=(i=t.categoryCd)?i:"",categoryGodDspUnitCd:null!=(d=t.categoryGodDspUnitCd)?d:"",lockedBrandId:null!=(u=t.lockedBrandId)?u:"",hasSubCategoryNav:null!=(m=t.hasSubCategoryNav)&&m,categoryContext:void 0,dspType:t.dspType,dspKey:null!=(p=t.dspKey)?p:"",section:null!=(h=t.section)?h:"",catalogPrdtType:null!=(g=t.catalogPrdtType)?g:""})},reset:()=>e(c)}))},32423:(e,t,a)=>{a.d(t,{Df:()=>i,d9:()=>o,uA:()=>r,uz:()=>n});var l=a(70759);let c=e=>{let t=new Headers(e),a=window.location.host;return a&&t.set("x-forwarded-host",a),t},s={get:(e,t)=>l.uE.get(e,{...t,useExternal:!0,headers:c(null==t?void 0:t.headers)}),post:(e,t,a)=>l.uE.post(e,t,{...a,useExternal:!0,headers:c(null==a?void 0:a.headers)}),put:(e,t,a)=>l.uE.put(e,t,{...a,useExternal:!0,headers:c(null==a?void 0:a.headers)}),delete:(e,t)=>
1l.uE.delete(e,{...t,useExternal:!0,headers:c(null==t?void 0:t.headers)})},n=(e,t)=>s.get(e,t),r=(e,t,a)=>s.post(e,t,a),o=(e,t,a)=>s.put(e,t,a),i=(e,t)=>s.delete(e,t)},44924:(e,t,a)=>{a.d(t,{A:()=>h});var l=a(95155),c=a(12115),s=a(20063),n=a(90933),r=a(31778),o=a(74948),i=a(6582),d=a(81495),u=a(99067),m=a(25016);let p={color:10,brand:10,style:5};function h(){let e=(0,s.useRouter)(),t=(0,s.useSearchParams)(),a=(0,s.usePathname)(),h=(0,n.gc)(),g=(0,r.j)(e=>e.searchResult),b=(0,r.j)(e=>e.resultType),y=(0,r.j)(e=>e.showCategoryFilter),x=(0,r.j)(e=>e.showSortOption),N=(0,r.j)(e=>e.isLeafCategory),v=(0,r.j)(e=>e.sortType),f=(0,r.j)(e=>e.setSortType),j=(0,r.j)(e=>e.categoryType),{brandCd:C}=(0,d.NH)(a,t),k="NEW"!==j||x,S="category"!==b||!!C||y,{categories:w=[],totalSize:E=0,attributes:_=[],koreanBrands:T=[],englishBrands:L=[],sizes:z=[],styles:F=[],chipFilters:R=[]}=g||{},P=(0,c.useMemo)(()=>(null!=w?w:[]).filter(e=>"STRTGY_CTGRY"!==e.categoryType),[w]),A={BST:"인기순",NEW:"신상품순",LAST:"낮은가격순",HIGH:"높은가격순",DIC:"할인율순",SCORE:"별점높은순",MD:"MD추천순"},I="special"===b||"event"===b||"magazine"===b||"category"===b&&N&&(0,m.sv)(j),[B,M]=(0,c.useState)(0),[D,V]=(0,c.useState)(""),[Y,O]=(0,c.useState)("korean"),[H,G]=(0,c.useState)(0),[U,K]=(0,c.useState)(0),[W,q]=(0,c.useState)(!1),$=(0,c.useRef)(null),[J,Q]=(0,c.useState)(!1),X=(0,c.useRef)(null),[Z,ee]=(0,c.useState)(!1),et=(0,c.useRef)(null),ea=(0,c.useRef)({korean:0,english:0}),[el,ec]=(0,c.useState)([]),es=(0,c.useMemo)(()=>el.reduce((e,t)=>(e[t.type]||(e[t.type]=[]),e[t.type].push(t),e),{}),[el]),en=(0,c.useMemo)(()=>{let e=new Set;return el.forEach(t=>e.add("".concat(t.type,"-").concat(t.code).concat(t.depth?"-".concat(t.depth):""))),e},[el]),er=(0,c.useMemo)(()=>{var e;let t=new Map;return null==(e=es.category)||e.forEach(e=>{void 0!==e.depth&&t.set(e.code,e.depth)}),t},[es]),eo=(0,c.useMemo)(()=>P&&0!==P.length&&P[B]||null,[P,B]),[ei,ed]=(0,c.useState)(""),eu=(0,c.useRef)(null),em=(0,c.useRef)(null),ep=(0,c.useRef)({min:"",max:""}),[eh,eg]=(0,c.useState)(!1),eb=e=>{D===e?(V(""),ee(!1)):(V(e),ee(!0))},ey=(0,c.useCallback)((e,t,a)=>{ec(l=>{let c=l.findIndex(t=>t.code===e&&t.type===a);if(c>=0)return l.filter((e,t)=>t!==c);let s=p[a];return void 0!==s&&l.filter(e=>e.type===a).length>=s?(alert("".concat("color"===a?"색상":"brand"===a?"브랜드":"스타일","은(는) 최대 ").concat(s,"개까지 선택할 수 있습니다.")),l):[...l,{code:e,label:t,type:a}]})},[]),ex=(0,c.useCallback)((e,t)=>{if(en.has("".concat(t,"-").concat(e)))return!0;let a="chipFilter"===t?",":"@";return!!e.includes(a)&&e.split(a).some(e=>en.has("".concat(t,"-").concat(e)))},[en]),eN=e=>{let t=e.target.value.replace(/[^\d]/g,""),a=t?Number(t).toLocaleString():"";e.target.value=a},ev=(e,t,a,l)=>{ei===e?(ed(""),ep.current={min:"",max:""},ec(e=>e.filter(e=>"price"!==e.type)),eu.current&&(eu.current.value=""),em.current&&(em.current.value="")):(ed(e),ec(t=>[...t.filter(e=>"price"!==e.type),{code:e,label:l,type:"price"}]),eu.current&&(eu.current.value=t?Number(t).toLocaleString():"0"),em.current&&(em.current.value=a?Number(a).toLocaleString():""),ep.current={min:t||"",max:a||""})},ef=(e,t,a)=>{a.preventDefault(),"korean"===Y?G(t):K(t);let l=document.getElementById(e);if(!l)return;let c=et.current;if(!c)return;let s=c.getBoundingClientRect(),n=l.getBoundingClientRect().top-s.top+c.scrollTop;c.scrollTo({top:n,behavior:"smooth"})};(0,c.useEffect)(()=>{let e=e=>{$.current&&!$.current.contains(e.target)&&q(!1)};return W&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[W]);let ej=a=>{let l=a!==v;"keyword"===b&&l&&o.E.track(i.AC.SORT_SEARCH_RESULTS,{...(0,u.M)(A[a]||a,t.get("keyword")||""),__providerSelection:["Amplitude"]}),f(a),Q(!1);let c=new URLSearchParams(t.toString());c.set("sort",a),e.push("?".concat(c.toString()),{scroll:!1})};(0,c.useEffect)(()=>{let e=e=>{X.current&&!X.current.contains(e.target)&&Q(!1)};return J&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[J]),(0,c.useEffect)(()=>
1{if("brand"!==D)return;let e=document.querySelector("korean"===Y?'[id^="catalogFilterScrollSpyKr"]':'[id^="catalogFilterScrollSpyEn"]');if(!e)return;let t=e.parentElement;for(;t&&t!==document.body;){let e=window.getComputedStyle(t).overflowY,a=t.scrollHeight>t.clientHeight;if(("auto"===e||"scroll"===e)&&a)break;t=t.parentElement}if(!t||!(t instanceof HTMLElement))return;et.current=t;let a=ea.current[Y];t.scrollTop=a||0;let l=()=>{ea.current[Y]=t.scrollTop};return t.addEventListener("scroll",l,{passive:!0}),()=>{t.removeEventListener("scroll",l)}},[D,Y]);let eC=(0,c.useMemo)(()=>_?_.map(e=>{let t=new Map;return e.values.forEach(e=>{let a="".concat(e.attrVal,"|").concat(e.attrValNm);if(t.has(a)){let l=t.get(a);l.attrCd="".concat(l.attrCd,"@").concat(e.attrCd)}else t.set(a,{...e})}),{...e,values:Array.from(t.values())}}):[],[_]),ek=(0,c.useMemo)(()=>(null!=z?z:[]).filter(e=>{var t,a;return(null!=(a=null==(t=e.sizes)?void 0:t.length)?a:0)>0}),[z]),eS=(0,c.useMemo)(()=>(null!=F?F:[]).filter(e=>{var t,a;return(null!=(a=null==(t=e.styles)?void 0:t.length)?a:0)>0}),[F]),ew=ek.length>0,eE=eS.length>0,e_=(0,c.useCallback)((e,t)=>er.get(e)===t,[er]),eT=(0,c.useCallback)(()=>{var e;let t=null==(e=el.find(e=>"category"===e.type))?void 0:e.code;return t?P.findIndex(e=>{var a;return e.categoryCd===t||(null==(a=e.children)?void 0:a.some(e=>{var a;return e.categoryCd===t||(null==(a=e.children)?void 0:a.some(e=>e.categoryCd===t))}))}):-1},[P,el]),eL=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=Z&&"category"===D;if(e&&!eL.current){let e=eT();e>=0&&M(e)}eL.current=e},[Z,D,eT]);let ez=()=>{let e=(()=>{let e=new Set;if(!P||0===P.length)return e;let t=P[B];return t&&(e.add(t.categoryCd),t.children&&t.children.forEach(t=>{e.add(t.categoryCd),t.children&&t.children.forEach(t=>{e.add(t.categoryCd)})})),e})();ec(t=>t.filter(t=>"category"!==t.type||e.has(t.code)))};return(0,c.useEffect)(()=>{let e=t.get("color"),a=t.get("brand"),l=t.get("size"),c=t.get("style"),s=t.get("category"),n=t.get("minPrice"),r=t.get("maxPrice"),o=t.get("freeDlv"),i=t.get("chipFilter");if(!(e||a||l||c||s||n||r||o||i))return void ec(e=>0===e.length?e:[]);if(!((!e||eC.length>0)&&(!a||(null!=T?T:[]).length>0||(null!=L?L:[]).length>0)&&(!l||(null!=z?z:[]).length>0)&&(!c||(null!=F?F:[]).length>0)&&(!s||(null!=P?P:[]).length>0)))return;let d=[];if(e&&eC.length>0){let t=e.split("@"),a=new Set;t.forEach(e=>{eC.forEach(t=>{let l=t.values.find(t=>t.attrCd.split("@").includes(e));l&&!a.has(l.attrCd)&&(a.add(l.attrCd),d.push({code:l.attrCd,label:l.attrValNm,type:"color"}))})})}if(a&&T&&L&&a.split("@").forEach(e=>{let t=[...T,...L].flatMap(e=>e.brands).find(t=>t.brandCd===e);t&&d.push({code:t.brandCd,label:t.brandNmKr||t.brandNmEn,type:"brand"})}),l&&z&&l.split("@").forEach(e=>{z.forEach(t=>{let a=t.sizes.find(t=>t.sizeCd===e);a&&d.push({code:a.sizeCd,label:"".concat(t.sizeCategoryNm," > ").concat(a.sizeNm),type:"size"})})}),c&&F&&c.split("@").forEach(e=>{F.forEach(t=>{let a=t.styles.find(t=>t.styleCd===e);a&&d.push({code:a.styleCd,label:a.styleNm,type:"style"})})}),s&&P&&s.split("@").forEach(e=>{let t=P.find(t=>t.categoryCd===e);if(t)return void d.push({code:t.categoryCd,label:"".concat(t.categoryNm," > 전체"),type:"category",depth:1});for(let t of P){if(!t.children)continue;let a=t.children.find(t=>t.categoryCd===e);if(a)return void d.push({code:a.categoryCd,label:"".concat(t.categoryNm," > ").concat(a.categoryNm," > 전체"),type:"category",depth:2,parentCode:t.categoryCd});for(let a of t.children){if(!a.children)continue;let l=a.children.find(t=>t.categoryCd===e);if(l){d.push({code:l.categoryCd,label:"".concat(t.categoryNm," > ").concat(a.categoryNm," > ").concat(l.categoryNm),type:"category",depth:3,parentCode:a.categoryCd});break}}}}),n||r){let e=n?Number(n):0,t=r?Number(r):0;ed(n||"10000"!==r?"10000"===n&&"30000"===r?"10000to30000":"30000"===n&&"70000"===r?"30000to70000":"70000"===n&&"100000"===r?"70000to100000":"100000"===n&&"300000"===r?"100000to300000":"300000"!==n||r?"custom_".concat(n||"","_").concat(r||""):"over300000":"under10000"),ep.current={min:n||"",max:r||""}
1,eu.current&&(eu.current.value=n?e.toLocaleString():""),em.current&&(em.current.value=r?t.toLocaleString():"");let a=n&&r?"".concat(e.toLocaleString(),"원 ~ ").concat(t.toLocaleString(),"원"):r?"".concat(t.toLocaleString(),"원 이하"):"".concat(e.toLocaleString(),"원 이상"),l="custom_".concat(n||"","_").concat(r||"");d.push({code:l,label:a,type:"price"})}else ed(""),ep.current={min:"",max:""},eu.current&&(eu.current.value=""),em.current&&(em.current.value="");h||"true"!==o?eg(!1):(d.push({code:"free",label:"무료배송",type:"shipping"}),eg(!0)),i&&i.split(",").forEach(e=>{e&&d.push({code:e,label:e,type:"chipFilter"})}),(e||a||l||c||s||n||r||o||i||0===d.length)&&ec(e=>e.length===d.length&&e.every((e,t)=>{let a=d[t];return e.code===a.code&&e.label===a.label&&e.type===a.type&&e.depth===a.depth&&e.parentCode===a.parentCode})?e:d)},[t,eC,T,L,z,F,P,R,h]),(0,c.useEffect)(()=>{if(!h||"true"!==t.get("freeDlv"))return;eg(!1),ec(e=>e.some(e=>"shipping"===e.type)?e.filter(e=>"shipping"!==e.type):e);let l=new URLSearchParams(t.toString());l.delete("freeDlv");let c=l.toString();e.replace(c?"".concat(a,"?").concat(c):a,{scroll:!1})},[h,t,e,a]),(0,c.useEffect)(()=>{h&&"shipping"===D&&(V(""),ee(!1))},[h,D]),(0,c.useEffect)(()=>{("size"!==D||ew)&&("style"!==D||eE)||(V(""),ee(!1))},[D,ew,eE]),(0,c.useEffect)(()=>{if("price"!==D)return;let{min:e,max:t}=ep.current;eu.current&&(eu.current.value=e?Number(e).toLocaleString():""),em.current&&(em.current.value=t?Number(t).toLocaleString():"")},[D,t]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"catalog-utility divider st-sm st-focus st-bottom mb-40",children:[(0,l.jsxs)("div",{className:"utility-start",children:[(0,l.jsxs)("em",{className:"utility-number",children:[E.toLocaleString()," Items"]}),(0,l.jsxs)("div",{className:"utility-filter",children:[Array.isArray(R)&&R.map(e=>(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat(D==="chipFilter-".concat(e)?"active":""),"data-filter-type":"chipFilter",onClick:()=>eb("chipFilter-".concat(e)),children:e},e)),S&&(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat("category"===D?"active":""),"data-filter-type":"category",onClick:()=>eb("category"),children:"카테고리"}),(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat("color"===D?"active":""),"data-filter-type":"color",onClick:()=>eb("color"),children:"색상"}),(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat("price"===D?"active":""),"data-filter-type":"price",onClick:()=>eb("price"),children:"가격"}),(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat("brand"===D?"active":""),"data-filter-type":"brand",onClick:()=>eb("brand"),children:"브랜드"}),ew&&(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat("size"===D?"active":""),"data-filter-type":"size",onClick:()=>eb("size"),children:"사이즈"}),eE&&(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat("style"===D?"active":""),"data-filter-type":"style",onClick:()=>eb("style"),children:"스타일"}),!h&&(0,l.jsx)("button",{className:"utility-button button-text st-elevated ".concat("shipping"===D?"active":""),"data-filter-type":"shipping",onClick:()=>eb("shipping"),children:"무료배송"})]})]}),(0,l.jsxs)("div",{className:"utility-end",children:[k&&"BST"===v&&(0,l.jsx)("div",{className:"align-self-center me-8",children:(0,l.jsxs)("div",{className:"tooltip-wrap",ref:$,children:[(0,l.jsx)("button",{type:"button",className:"button-tooltip text-decoration-underline ".concat(W?"active":""),onClick:()=>{q(e=>!e)},children:(0,l.jsx)("i",{className:"icon icon-question-circle st-grayBD","aria-label":"인기순 정렬 기준 안내"})}),(0,l.jsx)("div",{className:"tooltip w-[250px]",children:(0,l.jsx)("p",{children:(0,l.jsx)("span",{className:"text-inner",children:"인기순은 최근 3일간의 판매금액, 판매수량, 조회수를 기준으로 정렬됩니다."})})})]})}),k&&(0,l.jsxs)("div",{className:"selectbox st-text st-change ".concat(J?"active":""),ref:X,children:[(0,l.jsx)("button",{type:"button",className:"selectbox-text selectbox-current","data-sort-type":v,onClick:()=>{"category"===b&&o.E.track(i.yo.SORT_CATEGORY,{...(0,u.U)(A[v]||"인기순"),__providerSelection:["Amplitude"]}),Q(e=>!e)},children:(0,l.jsx)("span",{className:"text-inner",children:A[v]||"인기순"})}),(0,l.jsxs)("ul",{className:"selectbox-layer",style:{opacity:+!!J,visibility:J?"visible":"hidden",transition:"opacity 0.3s ease-in-out, visibility 0.3s ease-in-out"},children:[(0,l.jsx)("li",{className:"selectbox-item",children:(0,l.jsx)("button",{type:"button",className:"selectbox-button","data-sort-type":"BST",onClick:()=>ej("BST"),children:(0,l.jsx)("span",{className:"text-inner",children:"인기순"})})}),(0,l.jsx)("li",{className:"selectbox-item",children:(0,l.jsx)("button",{type:"button",className:"selectbox-button","data-sort-type":"NEW",onClick:()=>ej("NEW"),children:(0,l.jsx)("span",{className:"text-inner",children:"신상품순"})})}),(0,l.jsx)("li",{className:"selectbox-item",children:(0,l.jsx)("button",{type:"button",className:"selectbox-button","data-sort-type":"LAST",onClick:()=>ej("LAST"),children:(0,l.jsx)("span",{className:"text-inner",children:"낮은가격순"})})}),(0,l.jsx)("li",{className:"selectbox-item",children:(0,l.jsx)("button",{type:"button",className:"selectbox-button","data-sort-type":"HIGH",onClick:()=>ej("HIGH"),children:(0,l.jsx)("span",{className:"text-inner",children:"높은가격순"})})}),(0,l.jsx)("li",{className:"selectbox-item",children:(0,l.jsx)("button",{type:"button",className:"selectbox-button","data-sort-type":"DIC",onClick:()=>ej("DIC"),children:(0,l.jsx)("span",{className:"text-inner",children:"할인율순"})})}),(0,l.jsx)("li",{className:"selectbox-item",children:(0,l.jsx)("button",{type:"button",className:"selectbox-button","data-sort-type":"SCORE",onClick:()=>ej("SCORE"),children:(0,l.jsx)("span",{className:"text-inner",children:"별점높은순"})})}),I&&(0,l.jsx)("li",{className:"selectbox-item",children:(0,l.jsx)("button",{type:"button",className:"selectbox-button","data-sort-type":"MD",onClick:()=>ej("MD"),children:(0,l.jsx)("span",{className:"text-inner",children:"MD추천순"})})})]})]})]})]}),Z&&(0,l.jsxs)("div",{className:"filter-content",children:[D.startsWith("chipFilter")&&(()=>{let e=D.split("-")[1];return(0,l.jsx)("div",{className:"filter-pane tab-pane active","data-filter-type":D,children:(0,l.jsx)("div",{className:"row gy-16",children:(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:"프로모션"})}),(0,l.jsx)("div",{className:"row gy-16",children:(0,l.jsx)("button",{type:"button",className:"col-auto button-toggle-text st-spacing me-16 ".concat(ex(e,"chipFilter")?"st-strong":""),"data-chip-filter":e,onClick:()=>{ec(t=>t.some(t=>"chipFilter"===t.type&&t.code===e)?t.filter(t=>"chipFilter"!==t.type||t.code!==e):[...t,{code:e,label:e,type:"chipFilter"}])},children:(0,l.jsx)("span",{className:"text-inner",children:e})})})]})})})})(),"category"===D&&(0,l.jsxs)("div",{className:"filter-pane tab-pane active","data-filter-type":"category",children:[(0,l.jsxs)("nav",{className:"d-flex filter-title pt-0",children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:"카테고리"})}),null==P?void 0:P.map((e,t)=>(0,l.jsx)("button",{type:"button",className:"button-toggle-text me-24 ".concat(t===B?"active st-strong":""),onClick:()=>{M(t)},children:(0,l.jsx)("span",{className:"text-inner",children:e.categoryNm})},e.categoryCd))]}),(0,l.jsx)("hr",{className:"divider st-sm my-16"}),eo&&(0,l.jsxs)("div",{className:"tab-pane mt-0 active",id:"catalogFilterCategory".concat(B),children:[(0,l.jsx)("div",{className:"d-flex mb-16",children:(0,l.jsx)("button",{type:"button",className:"col-auto button-toggle-text st-spacing px-0 ".concat(e_(eo.categoryCd,1)?"st-strong":""),"data-category-depth":"1","data-category-code":eo.categoryCd,onClick:()=>((e,t)=>{if(ez(),!P)return;let a=P.find(t=>t.categoryCd===e);if(!a)return;let l=new Set;
1a.children&&a.children.forEach(e=>{l.add(e.categoryCd),e.children&&e.children.forEach(e=>{l.add(e.categoryCd)})}),ec(a=>{let c=a.filter(t=>"category"!==t.type||t.code!==e&&!l.has(t.code));return a.some(t=>"category"===t.type&&t.code===e&&1===t.depth)?c:[...c,{code:e,label:"".concat(t," > 전체"),type:"category",depth:1}]})})(eo.categoryCd,eo.categoryNm),children:(0,l.jsx)("span",{className:"text-inner",children:"전체상품"})})}),eo.children&&eo.children.length>0&&(0,l.jsx)("div",{className:"row",children:(0,l.jsx)("div",{className:"col-4",children:(0,l.jsx)("div",{className:"row gy-16",children:eo.children.map(e=>(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:e.categoryNm})}),(0,l.jsx)("i",{className:"icon icon-chevron-down st-xs st-black"}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("button",{type:"button",className:"col-auto button-toggle-text st-spacing ".concat(e_(e.categoryCd,2)?"st-strong":""),"data-category-depth":"2","data-category-code":e.categoryCd,onClick:()=>((e,t,a,l)=>{var c;if(ez(),!P)return;let s=P.find(t=>t.categoryCd===e),n=null==s||null==(c=s.children)?void 0:c.find(e=>e.categoryCd===a);if(!n)return;let r=new Set;n.children&&n.children.forEach(e=>{r.add(e.categoryCd)}),ec(c=>{let s=c.filter(t=>"category"!==t.type||t.code!==e&&t.code!==a&&!r.has(t.code));return c.some(e=>"category"===e.type&&e.code===a&&2===e.depth)?s:[...s,{code:a,label:"".concat(t," > ").concat(l," > 전체"),type:"category",depth:2,parentCode:e}]})})(eo.categoryCd,eo.categoryNm,e.categoryCd,e.categoryNm),children:(0,l.jsx)("span",{className:"text-inner",children:"전체"})}),e.children&&e.children.map(t=>(0,l.jsx)("button",{type:"button",className:"col-auto button-toggle-text st-spacing ".concat(e_(t.categoryCd,3)?"st-strong":""),"data-category-depth":"3","data-category-code":t.categoryCd,onClick:()=>{var a,l,c,s,n,r;return a=eo.categoryCd,l=eo.categoryNm,c=e.categoryCd,s=e.categoryNm,n=t.categoryCd,r=t.categoryNm,void(ez(),ec(e=>{let t=e.filter(e=>"category"!==e.type||e.code!==a&&e.code!==c);return e.some(e=>"category"===e.type&&e.code===n&&3===e.depth)?t.filter(e=>"category"!==e.type||e.code!==n||3!==e.depth):[...t,{code:n,label:"".concat(l," > ").concat(s," > ").concat(r),type:"category",depth:3,parentCode:c}]}))},children:(0,l.jsx)("span",{className:"text-inner",children:t.categoryNm})},t.categoryCd))]})]},e.categoryCd))})})})]})]}),"color"===D&&(0,l.jsx)("div",{className:"filter-pane tab-pane active","data-filter-type":"color",children:(0,l.jsx)("div",{className:"row gy-32 py-8",children:eC.map(e=>(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:e.attrNm})}),(0,l.jsx)("div",{className:"row align-items-start gy-32",children:e.values.map((t,a)=>{let c,s=t.attrVal.startsWith("#"),n=(c=t.attrVal,/\.(jpg|jpeg|png|gif|webp)$/i.test(c)),r="#FFFFFF"===t.attrVal.toUpperCase();return(0,l.jsxs)("button",{type:"button",className:"col-auto button-toggle-thumb ".concat(r?"st-light":""," ").concat(ex(t.attrCd,"color")?"st-selected":""),"data-attr-cd":t.attrCd,"data-attr-val":t.attrVal,"data-attr-nm":t.attrValNm,onClick:()=>ey(t.attrCd,t.attrValNm,"color"),children:[(0,l.jsx)("span",{className:"button-thumb",...s&&{style:{backgroundColor:t.attrVal}},children:n&&(0,l.jsx)("img",{src:"".concat("https://img.goodwearmall.com","/goods/omni/").concat(t.attrVal.toLowerCase()),className:"img-fluid",alt:t.attrValNm})}),(0,l.jsx)("span",{className:"text-inner",children:t.attrValNm})]},"".concat(e.attrNm,"-").concat(t.attrCd,"-").concat(a))})})]},e.attrNm))})}),"price"===D&&(0,l.jsx)("div",{className:"filter-pane tab-pane active","data-filter-type":"price",children:(0,l.jsxs)("div",{className:"py-8",children:[(0,l.jsxs)("div",{className:"d-flex justify-content-center align-items-center",children:[(0,l.jsx)("div",{className:"text-input-box w-272",children:(0,l.jsx)("input",{ref:eu,type:"text",className:"text-input st-dimmed",maxLength:10,onChange:eN})}),(0,l.jsx)("div",{className:"text-input-addon mx-8",children:"-"}),(0,l.jsx)("div",{className:"text-input-box w-272",children:(0,l.jsx)("input",{ref:em,type:"text",className:"text-input st-dimmed",maxLength:10,onChange:eN})}),(0,l.jsx)("button",{type:"button",className:"button-ghost st-dimmed w-135 ms-8",onClick:()=>{var e,t;let a=(null==(e=eu.current)?void 0:e.value.replace(/[^\d]/g,""))||"",l=(null==(t=em.current)?void 0:t.value.replace(/[^\d]/g,""))||"";if(!a&&!l){ed(""),ep.current={min:"",max:""},ec(e=>e.filter(e=>"price"!==e.type));return}let c=a?Number(a):0,s=l?Number(l):1/0;
1if(l&&c>s)return void alert("최소 가격이 최대 가격보다 클 수 없습니다.");ed(""),ep.current={min:a,max:l};let n=a&&l?"".concat(c.toLocaleString(),"원 ~ ").concat(s.toLocaleString(),"원"):l?"".concat(s.toLocaleString(),"원 이하"):"".concat(c.toLocaleString(),"원 이상"),r="custom_".concat(a,"_").concat(l);ec(e=>[...e.filter(e=>"price"!==e.type),{code:r,label:n,type:"price"}])},children:(0,l.jsx)("span",{className:"button-text",children:"적용"})})]}),(0,l.jsxs)("div",{className:"row justify-content-center gx-24 mt-40",children:[(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsxs)("label",{className:"checkbox st-dimmed st-ghost",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:"under10000"===ei,onChange:()=>ev("under10000","","10000","1만원 미만")}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:"1만원 미만"})]})}),(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsxs)("label",{className:"checkbox st-dimmed st-ghost",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:"10000to30000"===ei,onChange:()=>ev("10000to30000","10000","30000","1만원 ~ 3만원")}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:"1만원 ~ 3만원"})]})}),(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsxs)("label",{className:"checkbox st-dimmed st-ghost",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:"30000to70000"===ei,onChange:()=>ev("30000to70000","30000","70000","3만원 ~ 7만원")}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:"3만원 ~ 7만원"})]})}),(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsxs)("label",{className:"checkbox st-dimmed st-ghost",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:"70000to100000"===ei,onChange:()=>ev("70000to100000","70000","100000","7만원 ~ 10만원")}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:"7만원 ~ 10만원"})]})}),(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsxs)("label",{className:"checkbox st-dimmed st-ghost",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:"100000to300000"===ei,onChange:()=>ev("100000to300000","100000","300000","10만원 ~ 30만원")}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:"10만원 ~ 30만원"})]})}),(0,l.jsx)("div",{className:"col-auto",children:(0,l.jsxs)("label",{className:"checkbox st-dimmed st-ghost",children:[(0,l.jsx)("input",{type:"checkbox",className:"checkbox-input",checked:"over300000"===ei,onChange:()=>ev("over300000","300000","","30만원 이상")}),(0,l.jsx)("span",{className:"checkbox-icon"}),(0,l.jsx)("span",{className:"checkbox-label",children:"30만원 이상"})]})})]})]})}),"brand"===D&&(0,l.jsxs)("div",{className:"filter-pane tab-pane active","data-filter-type":"brand",children:[(0,l.jsxs)("div",{className:"d-flex pb-8",children:[(0,l.jsxs)("nav",{className:"d-flex filter-title pt-0",children:[(0,l.jsx)("button",{type:"button",className:"button-toggle-text me-24 ".concat("korean"===Y?"active":""),onClick:()=>O("korean"),children:(0,l.jsx)("span",{className:"text-inner",children:"가나다"})}),(0,l.jsx)("button",{type:"button",className:"button-toggle-text me-24 ".concat("english"===Y?"active":""),onClick:()=>O("english"),children:(0,l.jsx)("span",{className:"text-inner",children:"ABC"})})]}),"korean"===Y&&(0,l.jsx)("div",{className:"d-flex",children:null==T?void 0:T.map((e,t)=>(0,l.jsx)("button",{type:"button",className:"button-toggle-text st-spacing ".concat(t===H?"active":""),"data-brand-letter":e.groupName,onClick:e=>ef("catalogFilterScrollSpyKr".concat(t),t,e),children:(0,l.jsx)("span",{className:"text-inner",children:e.groupName})},e.groupName))}),"english"===Y&&(0,l.jsx)("div",{className:"d-flex",children:null==L?void 0:L.map((e,t)=>(0,l.jsx)("button",{type:"button",className:"button-toggle-text st-spacing ".concat(t===U?"active":""),"data-brand-letter":e.groupName,onClick:e=>ef("catalogFilterScrollSpyEn".concat(t),t,e),children:(0,l.jsx)("span",{className:"text-inner",children:e.groupName})},e.groupName))})]}),(0,l.jsx)("hr",{className:"divider st-sm mt-16 mb-24"}),"korean"===Y&&(0,l.jsx)("div",{className:"tab-pane active",children:(0,l.jsx)("div",{className:"row gy-32",children:null==T?void 0:T.map((e,t)=>(0,l.jsxs)("div",{className:"d-flex",id:"catalogFilterScrollSpyKr".concat(t),children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:e.groupName})}),(0,l.jsx)("div",{className:"row gy-32",children:[...e.brands].sort((e,t)=>
1e.brandNmKr.localeCompare(t.brandNmKr,"ko")).map((t,a)=>(0,l.jsxs)("button",{type:"button",className:"col-auto button-toggle-text st-double me-16 ".concat(ex(t.brandCd,"brand")?"st-strong":""),"data-brand-cd":t.brandCd,"data-brand-nm":t.brandNmKr,onClick:()=>ey(t.brandCd,t.brandNmKr,"brand"),children:[(0,l.jsx)("span",{className:"text-inner",children:t.brandNmKr}),(0,l.jsx)("span",{className:"text-inner",children:t.brandNmEn})]},"kr-".concat(e.groupName,"-").concat(t.brandCd,"-").concat(a)))})]},e.groupName))})}),"english"===Y&&(0,l.jsx)("div",{className:"tab-pane active",children:(0,l.jsx)("div",{className:"row gy-32",children:null==L?void 0:L.map((e,t)=>(0,l.jsxs)("div",{className:"d-flex",id:"catalogFilterScrollSpyEn".concat(t),children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:e.groupName})}),(0,l.jsx)("div",{className:"row gy-32",children:[...e.brands].sort((e,t)=>e.brandNmEn.localeCompare(t.brandNmEn)).map((t,a)=>(0,l.jsxs)("button",{type:"button",className:"col-auto button-toggle-text st-double me-16 ".concat(ex(t.brandCd,"brand")?"st-strong":""),"data-brand-cd":t.brandCd,"data-brand-nm":t.brandNmEn,onClick:()=>ey(t.brandCd,t.brandNmEn,"brand"),children:[(0,l.jsx)("span",{className:"text-inner",children:t.brandNmEn}),(0,l.jsx)("span",{className:"text-inner",children:t.brandNmKr})]},"en-".concat(e.groupName,"-").concat(t.brandCd,"-").concat(a)))})]},e.groupName))})})]}),"size"===D&&(0,l.jsx)("div",{className:"filter-pane tab-pane active","data-filter-type":"size",children:(0,l.jsx)("div",{className:"row gy-16",children:ek.map(e=>(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:e.sizeCategoryNm})}),(0,l.jsx)("div",{className:"row gy-16",children:e.sizes.map((t,a)=>(0,l.jsx)("button",{type:"button",className:"col-auto button-toggle-text st-spacing me-16 ".concat(ex(t.sizeCd,"size")?"st-strong":""),"data-sizecd":t.sizeCd,"data-sizenm":"".concat(e.sizeCategoryNm," > ").concat(t.sizeNm),onClick:()=>ey(t.sizeCd,"".concat(e.sizeCategoryNm," > ").concat(t.sizeNm),"size"),children:(0,l.jsx)("span",{className:"text-inner",children:t.sizeNm})},"".concat(e.sizeCategoryNm,"-").concat(t.sizeCd,"-").concat(a)))})]},e.sizeCategoryNm))})}),"style"===D&&(0,l.jsx)("div",{className:"filter-pane tab-pane active","data-filter-type":"style",children:(0,l.jsx)("div",{className:"row gy-16",children:eS.map(e=>(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:e.styleTypeNm})}),(0,l.jsx)("div",{className:"row gy-16",children:e.styles.map((t,a)=>(0,l.jsx)("button",{type:"button",className:"col-auto button-toggle-text st-spacing me-16 ".concat(ex(t.styleCd,"style")?"st-strong":""),"data-stylecd":t.styleCd,"data-stylenm":t.styleNm,onClick:()=>ey(t.styleCd,t.styleNm,"style"),children:(0,l.jsx)("span",{className:"text-inner",children:t.styleNm})},"".concat(e.styleTypeNm,"-").concat(t.styleCd,"-").concat(a)))})]},e.styleTypeNm))})}),!h&&"shipping"===D&&(0,l.jsx)("div",{className:"filter-pane tab-pane active","data-filter-type":"shipping",children:(0,l.jsx)("div",{className:"row gy-16",children:(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsx)("strong",{className:"filter-title",children:(0,l.jsx)("span",{className:"text-inner",children:"배송비"})}),(0,l.jsx)("div",{className:"row gy-16",children:(0,l.jsx)("button",{type:"button",className:"col-auto button-toggle-text st-spacing me-16 ".concat(eh?"st-strong":""),"data-shipping-type":"free",onClick:()=>{if(h)return;let e=!eh;eg(e),e?ec(e=>[...e.filter(e=>"shipping"!==e.type),{code:"free",label:"무료배송",type:"shipping"}]):ec(e=>e.filter(e=>"shipping"!==e.type))},children:(0,l.jsx)("span",{className:"text-inner",children:"무료배송"})})})]})})}),(0,l.jsxs)("footer",{className:"filter-footer",children:[(0,l.jsx)("div",{className:"filter-start",children:el.map((e,t)=>(0,l.jsxs)("p",{className:"button-remove-self",children:[(0,l.jsx)("span",{className:"text-inner",children:e.label}),(0,l.jsx)("button",{type:"button",className:"button-del icon icon-x st-gray st-xs",onClick:()=>{var t,a;return t=e.code,a=e.type,void(ec(e=>e.filter(e=>e.code!==t||e.type!==a)),"price"===a&&(ed(""),ep.current={min:"",max:""},eu.current&&(eu.current.value=""),em.current&&(em.current.value="")),"shipping"===a&&eg(!1))},children:"삭제"})]},"".concat(e.type,"-").concat(e.code,"-").concat(t)))}),(0,l.jsxs)("div",{className:"filter-end",children:[(0,l.jsx)("button",{type:"button",className:"button-text st-elevated ms-24",onClick:()=>{ec([]),ed(""),eg(!1),ep.current={min:"",max:""},eu.current&&(eu.current.value=""),em.current&&(em.current.value="");let a=new URLSearchParams(t.toString());a.delete("color"),a.delete("brand"),a.delete("size"),a.delete("style"),a.delete("category"),a.delete("minPrice"),a.delete("maxPrice"),a.delete("freeDlv"),a.delete("chipFilter"),a.delete("filtered"),a.delete("pageNo"),C?(a.set("brand",(0,m.V1)(C)),a.set("filtered","true"),a.set("brandshop","Y"),a.set("brandCd",C)):(a.delete("brandshop"),a.delete("brandCd")),e.push("?".concat(a.toString()),{scroll:!1})},children:"초기화"}),(0,l.jsx)("button",{type:"button",className:"button st-pill ms-24",onClick:()=>{var a,l;
1let c=new URLSearchParams(t.toString()),s=!h&&eh;c.delete("pageNo");let n=el.filter(e=>"color"===e.type).map(e=>e.code).join("@"),r=el.filter(e=>"brand"===e.type).map(e=>e.code).join("@"),d=el.filter(e=>"size"===e.type).map(e=>e.code).join("@"),u=el.filter(e=>"style"===e.type).map(e=>e.code).join("@"),p=el.filter(e=>"category"===e.type).map(e=>e.code).join("@"),g=(null==(a=eu.current)?void 0:a.value.replace(/[^\d]/g,""))||ep.current.min||"",y=(null==(l=em.current)?void 0:l.value.replace(/[^\d]/g,""))||ep.current.max||"";n?c.set("color",n):c.delete("color"),r?(c.set("brand",r),C&&(c.set("brandshop","Y"),c.set("brandCd",C))):C?(c.set("brand",(0,m.V1)(C)),c.set("brandshop","Y"),c.set("brandCd",C)):(c.delete("brand"),c.delete("brandshop"),c.delete("brandCd")),d?c.set("size",d):c.delete("size"),u?c.set("style",u):c.delete("style"),p?c.set("category",p):c.delete("category");let x=el.filter(e=>"chipFilter"===e.type).map(e=>e.code).join(",");g?c.set("minPrice",g):c.delete("minPrice"),y?c.set("maxPrice",y):c.delete("maxPrice"),s?c.set("freeDlv","true"):c.delete("freeDlv"),x?c.set("chipFilter",x):c.delete("chipFilter"),n||r||d||u||p||g||y||s||x||C?c.set("filtered","true"):c.delete("filtered");let N=el.filter(e=>"category"===e.type).map(e=>e.label),v=el.filter(e=>"color"===e.type).map(e=>e.label),f=el.filter(e=>"brand"===e.type).map(e=>e.label),j=el.filter(e=>"size"===e.type).map(e=>e.label),k=el.filter(e=>"style"===e.type).map(e=>e.label),S=el.filter(e=>"chipFilter"===e.type).map(e=>e.label).filter(Boolean),w={filter_category:N,filter_color:v,filter_price:[g,y].filter(e=>""!==e).map(e=>Number(e)).filter(e=>!Number.isNaN(e)),filter_brand:f,filter_size:j,filter_style:k,promotion_keyword:S.length>0?"Y":"N",is_free_shipping:s?"Y":"N"};S.length>0&&(w.promotion_keyword_name=S.join(",")),("category"===b||"keyword"===b)&&o.E.track("category"===b?i.yo.APPLY_CATEGORY_FILTER:i.yo.APPLY_SEARCH_RESULT_FILTER,{...w,__providerSelection:["Amplitude"]}),e.push("?".concat(c.toString()),{scroll:!1})},children:(0,l.jsx)("span",{className:"button-text fw-semibold",children:"필터적용"})})]})]}),(0,l.jsx)("button",{type:"button",className:"filter-close button-icon",onClick:()=>{ee(!1),V("")},children:(0,l.jsx)("i",{className:"icon icon-x st-black",children:"닫기"})})]})]})}},87417:(e,t,a)=>{a.d(t,{d:()=>s});var l=a(12115),c=a(74948);function s(){let e=(0,l.useCallback)((e,t)=>{c.E.track(e,t)},[]),t=(0,l.useCallback)(async(e,t,a)=>{await c.E.trackBeforeNavigate(e,t,a)},[]),a=(0,l.useCallback)(function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),l=1;l<t;l++)a[l-1]=arguments[l];let s=a.reduce((e,t)=>({...e,...t}),{});c.E.track(e,s)},[]),s=(0,l.useCallback)((e,t,a)=>{c.E.trackTo(e,t,a)},[]);return{track:e,trackBeforeNavigate:t,trackWith:a,trackTo:s,identify:(0,l.useCallback)((e,t)=>{c.E.identify(e,t)},[]),setUserId:(0,l.useCallback)(e=>{c.E.setUserId(e)},[])}}},90933:(e,t,a)=>{a.d(t,{PT:()=>c.useAlertConfirmToast,Us:()=>l.useAppContext,Y0:()=>l.useDevice,gc:()=>l.useIsTopten,nO:()=>l.useIsApp,s3:()=>l.useIsGoodwearmall});var l=a(35062);a(38406),a(44512),a(66431);var c=a(40861)},99067:(e,t,a)=>{function l(e,t){return{sorting_type:e,keyword:t}}function c(e){return{category_id:"",category_name:"",sorting_type:e}}a.d(t,{M:()=>l,U:()=>c})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.