PageSourceSearch

https://www.creator.hypd.store/assets/StoreLinks-u0NT4gZY.js

js hypd.store collected 2026-10-02 11:36:02 UTC 14,183 bytes, 1 lines download raw bytes

1import{S as O}from"./SelectedAffiliateProduct-JbunBBc0.js";import{_ as T,c as l,a as o,o as n,ak as x,C as j,B as E,g as M,d as h,b as k,e as f,F as L,r as A,t as K,y as S,z as I,n as R,H as N,f as P,al as U,i as q,D as B}from"./index-D4lqpvgS.js";import{S as V}from"./StoreMenuPopup-BjK_paO8.js";import{C as G}from"./CopyToAffCollection-BFtqmksN.js";import{A as Z,F as z}from"./AfflinksFilterModal-0v8cDU7m.js";import{C as H}from"./CreateAffiliateCollection-BaNlJrIs.js";import{E as Y}from"./EmptyComponent-_L5bN_rq.js";import{e as J}from"./empty_collection_panda-D5-xsAz2.js";import{M as Q}from"./MagnifyingGlass-Com5-t8K.js";import{D as W}from"./DeleteIcon-CgQHzlQt.js";import{_ as X}from"./ListingStyleComponent-E82yRky4.js";import{S as $}from"./StoreAnalyticsComponent-fXT1BAZb.js";import"./CheckedBoxIcon-ZgniaaC1.js";import"./AnalyticsIcon-Cof9_6vV.js";import"./PinIcon-DezGCB6D.js";import"./OrdersIcon-fGY4UOTJ.js";import"./LinkIcon-B-1zYO2B.js";import"./index-CmMTYzwa.js";const ee={},te={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function se(i,e){return n(),l("svg",te,e[0]||(e[0]=[o("path",{d:"M11.6665 4.16667C11.6665 3.25 10.9165 2.5 9.99984 2.5C9.08317 2.5 8.33317 3.25 8.33317 4.16667C8.33317 5.08333 9.08317 5.83333 9.99984 5.83333C10.9165 5.83333 11.6665 5.08333 11.6665 4.16667Z",stroke:"#292D32","stroke-width":"1.5"},null,-1),o("path",{d:"M11.6665 15.8333C11.6665 14.9166 10.9165 14.1666 9.99984 14.1666C9.08317 14.1666 8.33317 14.9166 8.33317 15.8333C8.33317 16.75 9.08317 17.5 9.99984 17.5C10.9165 17.5 11.6665 16.75 11.6665 15.8333Z",stroke:"#292D32","stroke-width":"1.5"},null,-1),o("path",{d:"M11.6665 10C11.6665 9.08337 10.9165 8.33337 9.99984 8.33337C9.08317 8.33337 8.33317 9.08337 8.33317 10C8.33317 10.9167 9.08317 11.6667 9.99984 11.6667C10.9165 11.6667 11.6665 10.9167 11.6665 10Z",stroke:"#292D32","stroke-width":"1.5"},null,-1)]))}const ie=T(ee,[["render",se]]),ne={components:{StoreAnalyticsComponent:$,ListingStyleComponent:X,SelectedAffiliateProduct:O,EmptyComponent:Y,ThreeDotsIcon:ie,FilterIcon:z,AfflinksFilterModal:Z,StoreMenuPopup:V,CopyToAffCollection:G,CreateAffiliateCollection:H,MagnifyingGlass:Q,BackArrow:E,CrossIcon:j,DeleteIcon:W},computed:{isAutoReply(){return this.$route.fullPath.includes("/auto-dm")||this.$route.fullPath.includes("/auto-reply")},noOfAfflinks(){return Object.keys(this.$store.state.creatorStore.creatorLinks).length},menuItems(){return[{icon:"collection",label:"Add to Collection",sub:"Add selected afflinks to a collection",action:this.showAdd},{icon:"delete",label:"Delete Links",sub:"Remove selected links from your store",isDanger:!0,action:this.deleteLinks}]}},data(){return{listingMode:"grid",linkPageNo:0,showFilter:!1,linkMenu:!1,selectedProduct:null,convertedLinks:[],isCopied:!1,deleteMode:!1,fetchingLinks:!1,observer:null,target:null,showAddBtn:!1,is_copy_to_collection:!1,createAffCollection:!1,selectedFilterBrands:{},emptyPanda:J,linksFetched:!1,searchKeyword:"",page:0,afflinksCount:0}},unmounted(){this.$store.dispatch("creatorStore/resetCreatorLinks")},async mounted(){P("my_store:afflink_visit"),this.afflinksCount=await U(),await this.fetchInfluencerLinks(),this.target=document.querySelector(".pagination-footer"),this.target&&(this.observer=q(this.target,this.callback)),this.$route.query.mode&&(this.listingMode=this.$route.query.mode)},methods:{switchMode(i){let e={...this.$route.query};this.listingMode!==i&&(this.listingMode=i,e.mode=i,this.$router.push({name:this.$route.name,query:{...e}}))},createCollection(){this.$store.dispatch("globalState/setHideBottomBar",!0),this.$nextTick(()=>{this.createAffCollection=!0,this.$store.dispatch("creatorStore/setAffiliateCollection",{})}),this.$nextTick(()=>{this.is_copy_to_collection=!1})},copyToCollection(){this.is_copy_to_collection=!0},cancelCopyToCollection(){this.is_copy_to_collection=!1},cancelDeleteMode(){this.deleteMode=!1,this.showAddBtn=!1},showMenu(){this.linkMenu=!0},closeAffFilter(){this.showFilter=!1},openAffFilter(){P("my_store:afflink_brand_filter_click"),this.showFilter=!0}
1,callback(i){i.forEach(e=>{var a;e.isIntersecting&&!this.fetchingLinks&&(((a=this.searchKeyword)==null?void 0:a.length)==0?this.fetchInfluencerLinks():this.searchAfflinksProducts())})},reconnectObserver(){this.observer&&this.target&&this.observer.observe(this.target)},async applyBrandFilters(i){var e;P("my_store_afflink_brand_filter:click",{filter:Object.keys(i)}),this.closeAffFilter(),this.selectedFilterBrands=i,this.reconnectObserver(),((e=this.searchKeyword)==null?void 0:e.length)>0?(this.$store.dispatch("creatorStore/resetCreatorLinks"),this.page=0,this.linkPageNo=0,this.convertedLinks={},this.searchAfflinksProducts()):(this.page=0,this.linkPageNo=0,this.fetchInfluencerLinks(void 0,!0))},async fetchInfluencerLinks(i=[],e=!1){var t,s,d,p,y,m,C,v,w;e&&(this.linkPageNo=0,this.convertedLinks={});let a=new URLSearchParams;Object.keys(this.selectedFilterBrands).forEach(c=>{a.append("brand_id",c)}),a.append("page",this.linkPageNo);try{this.fetchingLinks=!0;const c=await this.axios({method:"GET",url:this.$catalogURL+"/api/v2/app/influencer/deeplinks",withCredentials:!0,headers:{"Content-Type":"application/json"},params:a});if(((t=c.data.payload)==null?void 0:t.length)>0||((d=(s=c.data.payload)==null?void 0:s.links)==null?void 0:d.length)>0){this.linkPageNo=this.linkPageNo+1,this.linksFetched=!0,this.fetchingLinks=!1;let g=((p=c.data.payload)!=null&&p.links?[...c.data.payload.links]:c.data.payload?[...c.data.payload]:[]).reduce((b,_)=>Object.assign(b,{[_.id]:_}),{});this.convertedLinks=e?{...g}:Object.keys(this.convertedLinks).length>0?{...this.convertedLinks,...g}:{...g},this.$store.dispatch("creatorStore/setCreatorLinks",this.convertedLinks)}else Object.keys(this.convertedLinks).length>0&&(!((y=c.data)!=null&&y.payload)||!((m=c.data.payload)!=null&&m.links))?this.observer&&this.target&&this.observer.unobserve(this.target):(this.convertedLinks={},this.$store.dispatch("creatorStore/setCreatorLinks",this.convertedLinks))}catch(c){this.fetchingLinks=!1;var u=(v=(C=c.response)==null?void 0:C.data)!=null&&v.error?(w=c.response.data.error[0])==null?void 0:w.message:"Something went wrong while fetching your links. Please try again.";console.error(u),this.linksFetched=!0}finally{this.fetchingLinks=!1}},toggleLinkMenu(i){i!=null&&i.id||i!=null&&i.hypd_link?this.selectedProduct=i:this.selectedProduct=null,this.copied||(this.linkMenu=!this.linkMenu)},async copyProductLink(){var e,a,u,t,s,d,p;var i;if((e=this.selectedProduct)!=null&&e.hypd_link?i=(a=this.selectedProduct)==null?void 0:a.hypd_link:i=N(`${this.$base}/${(u=this.$store.state.user.userObject)==null?void 0:u.influencer_info.username}/product/${(t=this.selectedProduct)==null?void 0:t.id}?title=${(p=(d=(s=this.selectedProduct)==null?void 0:s.name)==null?void 0:d.split(" "))==null?void 0:p.join("+")}`),navigator.clipboard&&!this.isCopied){try{await navigator.clipboard.writeText(encodeURI(i)),this.isCopied=!0}catch(y){console.log(y)}setTimeout(()=>{this.linkMenu=!1,this.isCopied=!1},250)}},deleteLinks(){this.deleteMode=!0,this.linkMenu=!1},showAdd(){this.showAddBtn=!0,this.linkMenu=!1},async deleteLink(){var a,u;if(confirm("Are you sure you want to delete this link?")){var e={ids:[]};e.ids.push((a=this.selectedProduct)==null?void 0:a.id);try{await this.axios({method:"DELETE",url:this.$catalogURL+"/api/app/influencer/deeplinks",data:e,withCredentials:!0,headers:{"Content-Type":"application/json"}})&&(this.$store.dispatch("creatorStore/deleteCreatorLink",(u=this.selectedProduct)==null?void 0:u.id),this.toggleLinkMenu())}catch(t){console.log(t)}}},searchAfflinks:x.debounce(async function(){this.page=0,this.linkPageNo=0,this.convertedLinks={},this.$store.dispatch("creatorStore/resetCreatorLinks"),this.reconnectObserver(),this.searchKeyword.length===0||!this.searchKeyword?await this.fetchInfluencerLinks(void 0,!0):await this.searchAfflinksProducts()},500),async searchAfflinksProducts(){var u,t,s;try{this.fetchingLinks=!0;var i=new URLSearchParams;Object.keys(this.selectedFilterBrands).forEach(d=>{i.append("brand_id",d)}),i.append("page",this.page),i.append("query",this.searchKeyword);var e=await this.axios({method:"GET",url:`${this.$catalogURL}/api/app/afflinks/search`,params:i,withCredentials:!0,headers:{"Content-Type":"application/json"}}),a=e.data.payload||[];if(a.length>0){let d=a.reduce((p,y)=>Object.assign(p,{[y.id]:y}),{});this.convertedLinks=this.page===0?{...d}:{...this.convertedLinks,...d},this.$store.dispatch("creatorStore/setCreatorLinks",this.convertedLinks),this.linksFetched=!0,this.page++}else this.observer&&this.target&&this.observer.unobserve(this.target)}catch(d){console.error("Error fetching searched afflinks",(s=(t=(u=d.data)==null?void 0:u.response)==null?void 0:t.error[0])==null?void 0:s.message),this.linksFetched=!0}finally{this.fetchingLinks=!1}},async clearSearch(){this.searchKeyword="",this.page=0,this.linkPageNo=0,this.convertedLinks={},this.$store.dispatch("creatorStore/resetCreatorLinks"),this.reconnectObserver(),await this.fetchInfluencerLinks(void 0,!0)}}},oe={class:"links-wrapper"},re={key:0},le={class:"links-listing-wrapper"},ae={key:1,class:"links-contianer"},ce={class:"links-head"},de={class:"links-length"},he={key:0,style:{gap:"16px",display:"flex"}},fe={key:1,class:"flex"},ue={class:"flex-space-between filter"},ke={key:0,class:"divider"},pe={key:0,class:"search-bar"},ye={key:1},ge={key:0,class:"search-loading"},me={key:1,class:"links-listing-wrapper"},Ce={key:2,class:"search-loading"},ve={key:3};function we(i,e,a,u,t,s){const d=f("StoreMenuPopup"),p=f("ListingStyleComponent"),y=f("FilterIcon"),m=f("ThreeDotsIcon"),C=f("MagnifyingGlass"),v=f("BackArrow"),w=f("CrossIcon"),c=f("StoreAnalyticsComponent"),F=f("SelectedAffiliateProduct"),g=f("EmptyComponent"),b=f("AfflinksFilterModal"),_=f("CopyToAffCollection"),D=f("CreateAffiliate
1Collection");return n(),l("div",oe,[M(d,{modelValue:t.linkMenu,"onUpdate:modelValue":e[0]||(e[0]=r=>t.linkMenu=r),items:s.menuItems},null,8,["modelValue","items"]),t.fetchingLinks&&s.noOfAfflinks===0&&t.searchKeyword.length===0?(n(),l("div",re,[e[10]||(e[10]=o("div",{class:"links-head"},[o("div",{class:"afflink-head-skeleton shimmer"})],-1)),o("div",le,[(n(),l(L,null,A(8,r=>o("div",{class:"afflink-skeleton",key:r},e[9]||(e[9]=[o("div",{class:"afflink-image-skeleton shimmer"},null,-1),o("div",{class:"afflink-brand-skeleton shimmer"},null,-1),o("div",{class:"afflink-name-skeleton shimmer"},null,-1),o("div",{class:"afflink-price-skeleton shimmer"},null,-1)]))),64))])])):h("",!0),t.afflinksCount>0?(n(),l("div",ae,[o("div",ce,[o("div",de,"Afflinks("+K(t.afflinksCount)+")",1),t.deleteMode||t.showAddBtn?(n(),l("div",he,[o("div",{onClick:e[1]||(e[1]=r=>s.cancelDeleteMode()),class:"cancel-collection"}," Cancel "),Object.keys(i.$store.state.creatorStore.collectionLinks).length>0?(n(),l("div",{key:0,class:"create-collection",onClick:e[2]||(e[2]=r=>s.copyToCollection())}," Copy to Collection ")):h("",!0)])):s.isAutoReply?h("",!0):(n(),l("div",fe,[s.isAutoReply?h("",!0):(n(),k(p,{class:"mr-3",onChangeMode:s.switchMode,mode:t.listingMode,key:t.listingMode},null,8,["onChangeMode","mode"])),o("div",ue,[M(y,{onClick:e[3]||(e[3]=r=>s.openAffFilter())}),o("span",{onClick:e[4]||(e[4]=r=>s.openAffFilter())},"Brand Filter"),t.listingMode==="grid"?(n(),l("div",ke)):h("",!0),t.listingMode==="grid"?(n(),k(m,{key:1,onClick:e[5]||(e[5]=r=>s.showMenu())})):h("",!0)])]))]),!s.isAutoReply&&t.afflinksCount>0?(n(),l("div",pe,[t.searchKeyword.length==0?(n(),k(C,{key:0,class:"light-color",width:"16",height:"16"})):(n(),k(v,{key:1,width:"16",height:"16",onClick:s.clearSearch},null,8,["onClick"])),S(o("input",{"onUpdate:modelValue":e[6]||(e[6]=r=>t.searchKeyword=r),onKeyup:e[7]||(e[7]=(...r)=>s.searchAfflinks&&s.searchAfflinks(...r)),type:"text",placeholder:"Search Afflinks"},null,544),[[I,t.searchKeyword]]),t.searchKeyword.length>0?(n(),k(w,{key:2,width:"16",height:"16",onClick:s.clearSearch},null,8,["onClick"])):h("",!0)])):h("",!0),s.noOfAfflinks>0?(n(),l("div",ye,[o("div",{class:R({"product-listing-wrapper-analytics":t.listingMode==="list","links-listing-wrapper":t.listingMode==="grid"})},[(n(!0),l(L,null,A(Object.values(i.$store.state.creatorStore.creatorLinks),r=>S((n(),k(c,{key:r.id,type:"afflink",product:r},null,8,["product"])),[[B,t.listingMode==="list"]])),128)),(n(!0),l(L,null,A(Object.values(i.$store.state.creatorStore.creatorLinks),r=>S((n(),k(F,{showAnalytics:!0,onShowLinkMenu:s.toggleLinkMenu,class:"converted-link",productInfo:r,key:r.id,isDeletable:!s.isAutoReply&&t.deleteMode,showCopy:!0,collectionProduct:!0,showAddBtn:t.showAddBtn||s.isAutoReply,isFrom:"store-links"},null,8,["onShowLinkMenu","productInfo","isDeletable","showAddBtn"])),[[B,t.listingMode==="grid"]])),128))],2),t.fetchingLinks&&t.searchKeyword.length>0?(n(),l("div",ge,e[11]||(e[11]=[o("div",{class:"grey-spinner"},null,-1)]))):t.fetchingLinks?(n(),l("div",me,[(n(),l(L,null,A(4,r=>o("div",{class:"afflink-skeleton",key:r},e[12]||(e[12]=[o("div",{class:"afflink-image-skeleton shimmer"},null,-1),o("div",{class:"afflink-name-skeleton shimmer"},null,-1)]))),64))])):h("",!0)])):t.fetchingLinks&&t.searchKeyword.length>0?(n(),l("div",Ce,e[13]||(e[13]=[o("div",{class:"grey-spinner"},null,-1)]))):s.noOfAfflinks==0&&!t.fetchingLinks?(n(),l("div",ve,[M(g,{class:"store-empty-screen",imageSrc:t.emptyPanda,titleText:"You dont have any links added",subtitleText:"You can add links to your store by tapping on the Create button"},null,8,["imageSrc"])])):h("",!0)])):h("",!0),t.showFilter?(n(),k(b,{key:2,onClose:s.closeAffFilter,onApplyFilters:s.applyBrandFilters,selectedbrands:t.selectedFilterBrands},null,8,["onClose","onApplyFilters","selectedbrands"])):h("",!0),t.is_copy_to_collection?(n(),k(_,{key:3,onClose:s.cancelCopyToCollection,onCreateCollection:s.createCollection},null,8,["onClose","onCreateCollection"])):h("",!0),t.createAffCollection?(n(),k(D,{key:4,onClosePopup:e[8]||(e[8]=r=>t.createAffCollection=!1),"is-route":!1})):h("",!0),e[14]||(e[14]=o("div",{class:"pagination-footer"},null,-1))])}const Ne=T(ne,[["render",we],["__scopeId","data-v-c9c0bad9"]]);export{Ne 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.