PageSourceSearch

https://chromaworks.co.kr/build/assets/ProductSearchPage-0cab7dac.js

js chromaworks.co.kr collected 2026-09-24 14:25:24 UTC 3,692 bytes, 2 lines download raw bytes

1import{u as F,U as K,f as g,C as w,o as R,ab as T,H as U,E as V,m as c,p as x,z as h,t as a,F as b,r as $,y as B,w as C,n as d,l as j,k as o,G as D}from"./entry-client-6684a004.js";import{u as z}from"./useProduct-7ca4230c.js";import{u as G}from"./useCategory-101116a8.js";import{_ as H}from"./ProductList-f1ffd579.js";import"./productDiscount-1d11eaf3.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},y=new Error().stack;y&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[y]="0974e2a1-90f8-49f9-9698-d465a678d4f3",l._sentryDebugIdIdentifier="sentry-dbid-0974e2a1-90f8-49f9-9698-d465a678d4f3")}catch{}})();const J={class:"px-4 py-6 flex-col flex items-center gap-4 w-full max-w-screen-2xl mx-auto"},L={class:"flex items-center justify-center w-full"},O={key:0,class:"flex flex-wrap gap-2 items-center justify-center text-sm lg:text-lg max-w-xl"},A={class:"text-stone-500 text-sm"},W=["onClick"],X={class:"flex flex-wrap gap-2 items-center justify-center text-sm lg:text-lg max-w-xl"},se={__name:"ProductSearchPage",setup(l){const y=F(),n=K(),r=z();r.$reset();const p=G(),S=g(()=>JSON.stringify(n.query)||""),E=async()=>{if(f.value===!1)return;r.query.keyword=n.query.keyword||n.query.q||"",r.query.page=1;let e={...n.query,...r.query};r.setQuery(e),await r.index(),p.setQuery({page:1,keyword:r.query.keyword,version:"new"}),await p.index()},v=w(null);async function I(){i.value=n.query.keyword||n.query.q||"",f.value=!0,await E(),v.value&&v.value.focus()}R(()=>{I()});const f=w(!1);T(()=>{f.value=!1}),U(S,()=>{S.value!=="{}"&&I()},{immediate:!1});const P=g(()=>{var e;return((e=r.getPagination)==null?void 0:e.similar_keywords)||[]});function m(){const e={...n.query,...r.query};e.page=1,e.keyword=i.value,f.value=!0,y.push({name:"ProductSearch",query:e})}const i=w(null),_=w(!1),M=g(()=>{var e;return((e=p.getData)==null?void 0:e.length)>10}),N=g(()=>{let e=p.getData;return e?e.length?e[0].products_count?(e=e.filter(t=>t.products_count>0&&t.parent_id!==304&&t.id!==304).sort((t,k)=>t.products_count<k.products_count?1:-1),_.value||(e=e.slice(0,10)),e):[]:[]:[]});return(e,t)=>{var Q;const k=V("iconic-input"),q=V("small-round-button");return o(),c(b,null,[x("div",J,[x("div",L,[h(k,{ref_key:"searchInput",ref:v,value:i.value,"onUpdate:value":t[0]||(t[0]=s=>i.value=s),class:"bg-clear text-lg lg:text-2xl max-w-xl lg:py-8",icon:"/images/icons/search.svg",onSubmit:t[1]||(t[1]=()=>{m()})},null,8,["value"])]),P.value.length>0?(o(),c("div",O,[x("span",A,a(e.$t("추천검색어")),1),(o(!0),c(b,null,$(P.value,(s,u)=>(o(),c("span",{key:u,class:"py-1 px-3 text-stone-600 cursor-pointer hover:underline",onClick:()=>{i.value=s.keyword,m()}},a(s.keyword),9,W))),128))])):B("",!0),x("div",X,[h(q,{class:"py-1 px-3",primary:!((Q=d(n).query)!=null&&Q.new_category_id),onClick:t[2]||(t[2]=()=>{d(r).setQuery({new_category_id:null,page:1}),m()})},{default:C(()=>[D(a(e.$t("전체보기"))+" "+a(N.value.reduce((s,u)=>s+u.products_count,0)),1)]),_:1},8,["primary"]),(o(!0),c(b,null,$(N.value,s=>{var u;return o(),j(q,{key:s.id,class:"py-1 px-3",primary:((u=d(n).query)==null?void 0:u.new_category_id)===s.id.toString(),onClick:()=>{d(r).setQuery({new_category_id:s.id,page:1}),m()}},{default:C(()=>[D(a(s.name)+" "+a(s.products_count),1)]),_:2},1032,["primary","onClick"])}),128)),M.value?(o(),j(q,{key:0,class:"py-1 px-3",primary:_.value,onClick:t[3]||(t[3]=()=>{_.value=!_.value})},{default:C(()=>[D(" ... "+a(e.$t("더 보기")),1)]),_:1},8,["primary"])):B("",!0)])]),h(H,{class:"p-4 max-w-screen-2xl mx-auto",controller:d(r)},null,8,["controller"])],64)}}};export{se as default};
2//# sourceMappingURL=ProductSearchPage-0cab7dac.js.map

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.