PageSourceSearch

https://www.creator.hypd.store/assets/SearchView-Bv5P8zrM.js

js hypd.store collected 2026-10-02 11:37:03 UTC 10,628 bytes, 1 lines download raw bytes

1import{_ as T,c as o,a as n,o as a,C as B,B as L,bo as q,v as F,b as C,d as l,e as h,g,y as I,z as M,G as R,b4 as O,s as x,q as D,F as p,r as m,t as y,n as z,f as v,i as V,D as A}from"./index-D4lqpvgS.js";import{P as j}from"./ProductCard-C0KyOnZp.js";import{S as G}from"./SelectedProductsPanel-BdjucyE7.js";import{_ as N}from"./no_products_found-DOck2v8m.js";import"./AnalyticsIcon-Cof9_6vV.js";const J={},H={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function U(s,e){return a(),o("svg",H,e[0]||(e[0]=[n("path",{d:"M6.07355 3.38676C6.65355 3.21343 7.29355 3.1001 8.00022 3.1001C11.1935 3.1001 13.7802 5.68676 13.7802 8.8801C13.7802 12.0734 11.1935 14.6601 8.00022 14.6601C4.80688 14.6601 2.22021 12.0734 2.22021 8.8801C2.22021 7.69343 2.58021 6.58676 3.19355 5.66676",stroke:"#DEDEDE","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),n("path",{d:"M5.24658 3.54683L7.17325 1.3335",stroke:"#DEDEDE","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),n("path",{d:"M5.24658 3.54688L7.49325 5.18687",stroke:"#DEDEDE","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const W=T(J,[["render",U]]),K={},X={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Y(s,e){return a(),o("svg",X,e[0]||(e[0]=[n("path",{d:"M15.3346 4L9.0013 10.3333L5.66797 7L0.667969 12",stroke:"#DEDEDE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),n("path",{d:"M11.332 4H15.332V8",stroke:"#DEDEDE","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Z=T(K,[["render",Y]]),$={components:{ImageView:F,ProductCard:j,SelectedProductsPanel:G,ProductPreview:q,BackArrow:L,CrossIcon:B,ReloadIcon:W,TrendingIcon:Z},data(){return{observer:"",searchQuery:"",brands:[],products:[],searchTimer:"",searched:!0,recentSearches:[],trendingSearches:[{id:0,name:"Sneakers",value:"Sneakers"},{id:1,name:"Moisturisers",value:"Moisturisers"},{id:2,name:"Perfumes",value:"Perfumes"},{id:3,name:"Liquid Lipstick",value:"Liquid Lipstick"},{id:4,name:"Sunscreen",value:"Sunscreen"},{id:5,name:"Fragrance",value:"Fragrance"},{id:6,name:"Hair Oil",value:"Hair Oil"},{id:7,name:"Lip Gloss",value:"Lip Gloss"},{id:8,name:"Face Wash",value:"Face Wash"},{id:9,name:"Lipstick",value:"Lipstick"},{id:10,name:"Jeans",value:"Jeans"},{id:11,name:"Mask & Peels",value:"Mask & Peels"},{id:12,name:"Toner",value:"Toner"},{id:13,name:"Shrugs",value:"Shrugs"},{id:14,name:"Face Serum",value:"Face Serum"},{id:15,name:"Dresses",value:"Dresses"},{id:16,name:"Skincare",value:"Skincare"},{id:17,name:"Slides",value:"Slides"},{id:18,name:"Trousers & Pants",value:"Trousers & Pants"},{id:19,name:"Combo & Gift Packs",value:"Combo & Gift Packs"}],page:0,suggestionIndex:0,animationSearches:["Sneakers","Hoodies","Jacket","Shoes","Perfumes","Joggers","Dress","Boots","Tops","Pants"],animationTimer:null}},beforeUnmount(){clearInterval(this.animationTimer),this.$store.dispatch("globalState/clearSelectedProducts")},computed:{noOfSelectedProducts(){return this.$getObjectLength(this.$store.state.globalState.selectedProducts)}},mounted(){var d;v("search:visit",{query:this.searchQuery}),this.$refs.searchInput&&this.$refs.searchInput.focus(),(d=this.$route.params)!=null&&d.searchQuery&&(this.searchQuery=this.$route.params.searchQuery),this.target=document.querySelector(".page-footer"),this.target&&(this.observer=V(this.target,this.callback)),this.animationTimer=setInterval(()=>{this.suggestionIndex++,this.animationSearches.length==this.suggestionIndex&&(this.suggestionIndex=0)},2250);let s=localStorage.getItem("recentlySearched");if(s){var e=JSON.parse(s);this.recentSearches=[...new Set(e)]}else this.recentSearches=[]},methods:{openCopyToCollection(){this.$store.dispatch("globalState/openCopyToCollection")},clearRecentSearches(){if(confirm("Are you sure you want to clear, recent searches?"))localStorage.removeItem("recentlySearched"),this.recentSearches=[];else return},clearInput(){v("search:query_clear_click",{query:this.searchQuery}),this.searchQuery="",this.brands=[],this.products=[],this.page=0,this.searched=!0},goToBrandPage(s){this.$router.push({name:"SearchedBrand",params:{brandId:s}})},goBack(){this.$router.go(-1)}
1,callback(s){s.forEach(async e=>{e.isIntersecting&&this.searchQuery.length>0&&await this.search()})},selectProduct(s){var e;v("search_result:product_add_to",{product_id:s==null?void 0:s.id,brand_id:(e=s==null?void 0:s.brand_info)==null?void 0:e.id}),this.$store.dispatch("globalState/addSelectedProduct",s)},deselectProduct(s){this.$store.dispatch("globalState/deleteSelectedProduct",s)},debounceInput(s){this.products=[],this.brands=[],this.page=0,s.length==0&&(this.searchQuery=""),this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout(()=>{clearTimeout(this.searchTimer),this.searchQuery=s,this.search()},1e3)},async searchForThis(s){this.searchQuery=s,await this.search()},async search(){var e,d,b,t,i,k,S,_,f,w,P;if(this.searchQuery.length>0){this.page>0?v("search_result:page_scroll",{query:this.searchQuery,page:this.page}):v("search_result:visit",{query:this.searchQuery});var s=new URLSearchParams;s.append("query",this.searchQuery),s.append("page",this.page);try{let c=await this.axios({method:"GET",url:this.$catalogURL+"/api/app/search/v2/discover",params:s,withCredentials:!0,headers:{"Content-Type":"application/json"}});(e=c==null?void 0:c.data)!=null&&e.payload&&(this.searching=!1,(b=(d=c.data)==null?void 0:d.payload)!=null&&b.brand&&(this.brands=(i=(t=c.data)==null?void 0:t.payload)==null?void 0:i.brand),(S=(k=c.data)==null?void 0:k.payload)!=null&&S.catalog&&((f=(_=c==null?void 0:c.data)==null?void 0:_.payload)!=null&&f.catalog?(this.products=[...this.products,...(P=(w=c.data)==null?void 0:w.payload)==null?void 0:P.catalog],this.page++):this.observer.unobserve(this.target))),this.products.length>0&&this.brands.length>0&&(this.searched=!1),this.recentSearches=[...new Set([this.searchQuery,...this.recentSearches])],localStorage.setItem("recentlySearched",JSON.stringify(this.recentSearches))}catch(c){console.log(c)}}}}},ee={class:"search-layout"},se={class:"search-bar-section"},te={class:"input-container"},re={key:0,class:"recent-searches-section section-with-horizontal-scroll"},ne={class:"heading"},ae=["onClick"],oe={key:1,class:"trending-searches-section section-with-horizontal-scroll"},ie=["onClick"],ce={key:2,class:"brands-section section-with-horizontal-scroll"},le={class:"brands container-with-horizontal-scroll"},he=["onClick"],de={key:3,class:"products-section section-with-horizontal-scroll"},ue={class:"product-listing-wrapper"},ge={key:4,class:"empty-screen"},pe={class:"content"},me={key:1,class:"panel-wrapper"};function ye(s,e,d,b,t,i){var Q;const k=h("ProductPreview"),S=h("BackArrow"),_=h("CrossIcon"),f=h("ReloadIcon"),w=h("TrendingIcon"),P=h("ImageView"),c=h("ProductCard"),E=h("SelectedProductsPanel");return a(),o("div",{class:z(["search-layout-wrapper",{"showing-selected-products":i.noOfSelectedProducts>0}])},[s.$store.state.globalState.clickedProductInfo.id?(a(),C(k,{key:0,source:"search"})):l("",!0),n("div",ee,[n("section",se,[n("div",te,[g(S,{onClick:i.goBack,width:"21px"},null,8,["onClick"]),I(n("input",{ref:"searchInput",type:"text","onUpdate:modelValue":e[0]||(e[0]=r=>t.searchQuery=r),onInput:e[1]||(e[1]=r=>i.debounceInput(r.target.value)),class:"search-input",placeholder:"Search for "},null,544),[[M,t.searchQuery]]),t.searchQuery.length==0?(a(),o("div",{key:0,class:"search-animation-container",onClick:e[2]||(e[2]=(...r)=>s.$refs.searchInput.focus&&s.$refs.searchInput.focus(...r))},[g(O,{name:"translate-up"},{default:R(()=>[(a(!0),o(p,null,m(t.animationSearches,(r,u)=>I((a(),o("div",{class:"search-animation",key:u},' "'+y(r)+'" ',1)),[[A,t.suggestionIndex==u]])),128))]),_:1})])):l("",!0),t.searchQuery&&t.searchQuery.length>0?(a(),C(_,{key:1,width:"21px",onClick:i.clearInput},null,8,["onClick"])):l("",!0)])]),t.searchQuery.length==0&&(t.brands.length==0||t.products.length==0)&&((Q=t.recentSearches)==null?void 0:Q.length)>0?(a(),o("section",re,[n("div",ne,[e[4]||(e[4]=x(" Recent Searches ")),n("button",{onClick:e[3]||(e[3]=(...r)=>i.clearRecentSearches&&i.clearRecentSearches(...r))},"Clear All")]),n("div",{class:"recent-searches container-with-horizontal-scroll",style:D({"grid-template-columns":`repeat(${Math.ceil(t.recentSearches.length/2)}, minmax(min-content, 200px))`})},[(a(!0),o(p,null,m(t.recentSearches||[],(r,u)=>(a(),o("div",{class:"recent-search",onClick:ve=>i.searchForThis(r),key:u},[g(f),x(" "+y(r),1)],8,ae))),128))],4)])):l("",!0),t.searchQuery.length==0&&(t.brands.length==0||t.products.length==0)?(a(),o("section",oe,[e[5]||
1(e[5]=n("div",{class:"heading"},"Trending Searches",-1)),n("div",{class:"trending-searches container-with-horizontal-scroll",style:D({"grid-template-columns":`repeat(${Math.ceil(t.trendingSearches.length/2)}, minmax(min-content, 200px))`})},[(a(!0),o(p,null,m(t.trendingSearches,r=>(a(),o("div",{class:"trending-search",onClick:u=>i.searchForThis(r.value),key:r.id},[g(w),n("span",null,y(r.name),1)],8,ie))),128))],4)])):l("",!0),t.brands.length>0&&t.searchQuery.length>0?(a(),o("section",ce,[e[6]||(e[6]=n("div",{class:"heading"},"Brands",-1)),n("div",le,[(a(!0),o(p,null,m(t.brands,r=>(a(),o("div",{class:"brand",onClick:u=>i.goToBrandPage(r.id),key:r.id},[g(P,{class:"brand-logo",src:r.logo.src},null,8,["src"]),n("span",null,y(r.name),1)],8,he))),128))])])):l("",!0),t.products.length>0&&t.searchQuery.length>0?(a(),o("section",de,[e[7]||(e[7]=n("div",{class:"heading"},"Products",-1)),n("div",ue,[(a(!0),o(p,null,m(t.products,r=>(a(),C(c,{product_info:r,isSelected:!!s.$store.state.globalState.selectedProducts[r.id],onAddProduct:i.selectProduct,onRemoveProduct:i.deselectProduct,key:r.id,source:"search",search_query:t.searchQuery},null,8,["product_info","isSelected","onAddProduct","onRemoveProduct","search_query"]))),128))])])):l("",!0),!t.searched&&t.searchQuery.length>0&&t.brands.length==0&&t.products.length==0?(a(),o("section",ge,[e[9]||(e[9]=n("img",{class:"panda-illustration",src:N,alt:""},null,-1)),n("div",pe,[e[8]||(e[8]=n("div",null,"No Result Found",-1)),n("span",null,`Oops! we couldn't find anything for "`+y(t.searchQuery)+'"',1)])])):l("",!0),e[10]||(e[10]=n("div",{class:"page-footer"},null,-1))]),i.noOfSelectedProducts>0?(a(),o("div",me,[g(E,{topOffset:0,onAddToStore:i.openCopyToCollection},null,8,["onAddToStore"])])):l("",!0)],2)}const Pe=T($,[["render",ye],["__scopeId","data-v-6857dcac"]]);export{Pe as default};

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.