1import{I as A}from"./index-header-ea8304c4.js";import{I as U}from"./footer-92fecdb6.js";import{A as S}from"./main-b445314a.js";import{_ as L,r as u,o as l,d as n,k as y,e,t as r,w as h,j as d,L as c,n as p,g as m,f as g,F as w,i as I,a9 as D,h as N}from"./vendor-modules-31ed7038.js";import{_ as V}from"./trophy-d817bd31.js";import{a as C,b as T,_ as E}from"./social-other-4a029675.js";import"./selectLanguage-70b34bc3.js";import"./dashboardVariant-89a8f6e3.js";import"./logo-v2-37884ab1.js";import"./dollar-v2-edf9d56f.js";import"./coin-v2-b228253b.js";import"./senior-477ca941.js";import"./google_play-cfaff181.js";import"./social-facebook-hover-1a44f424.js";const F={name:"ApplyNow",components:{IndexHedaer:A,IndexFooter:U,alertD:S},data(){return{alertShow:!1,alertMsg:"",alertState:!0,focusStatus:!1,loginShow:!1,formData:{fullName:"",websiteUrl:"",socialMedia:"",telegram:"",discord:"",others:"",promotion:"",selectedActivities:[],suggestions:"",agreeTerms:!1},activities:[{id:"1",name:"Browsing websites",checked:!1},{id:"2",name:"Completing offers",checked:!1},{id:"3",name:"Taking surveys",checked:!1},{id:"4",name:"Performing tasks",checked:!1}],errors:{},isSubmitting:!1,showTermsModal:!1}},computed:{isNight(){return this.$store.getters.night},brandName(){return(this.$domain||"coinpayu.com").includes("rewardjoy")?"RewardJoy":"Coinpayu"},hasAnyInstantMessage(){return this.formData.telegram.trim()||this.formData.discord.trim()||this.formData.others.trim()}},created(){localStorage.getItem("coinPayU-cointoken")&&(this.loginShow=!0,this.post("/contest/applystatus",{}).then(i=>{i.code==200&&i.data.leaderboard_apply_status!=0&&this.$router.push("/affiliate-leaderboard/apply-result")}))},methods:{alertShowFn(i,s,f){this.alertShow=!0,this.alertMsg=i,this.alertState=s,this.focusStatus=f},toggleActivity(i){let s=this.activities.filter((f,_)=>f.checked&&_!==i).length;this.activities[i].checked&&s>=2&&(this.activities[i].checked=!1),this.clearError("activities")},clearError(i){this.errors[i]&&delete this.errors[i]},validateForm(){return this.errors={},this.formData.fullName.trim()||(this.errors.fullName="Full name is required"),this.formData.websiteUrl.trim()?this.isValidUrl(this.formData.websiteUrl)||(this.errors.websiteUrl="Please enter a valid URL"):this.errors.websiteUrl="Primary traffic/website URL is required",this.formData.socialMedia.trim()&&!this.isValidUrl(this.formData.socialMedia)&&(this.errors.socialMedia="Please enter a valid URL"),this.hasAnyInstantMessage||(this.errors.instantMessage="Please provide at least one instant message contact"),this.formData.promotion.trim()||(this.errors.promotion=`Please describe how you will promote ${this.brandName}`),this.activities.filter(s=>s.checked).length===0&&(this.errors.activities="Please select at least one activity"),this.formData.suggestions.trim()||(this.errors.suggestions="Please provide your suggestions"),this.formData.agreeTerms||(this.errors.terms="You must agree to the terms to continue"),Object.keys(this.errors).length===0},isValidUrl(i){try{return new URL(i),!0}catch{return!1}},async submitApplication(){if(!this.validateForm()||!this.formData.agreeTerms)return;this.isSubmitting=!0;let i={full_name:this.formData.fullName,traffic_url:this.formData.websiteUrl,profile_url:this.formData.socialMedia,telegram_id:this.formData.telegram,discord_id:this.formData.discord,other_id:this.formData.others,promote_text:this.formData.promotion,primary_activities:"",suggestions:this.formData.suggestions},s=[];this.activities.forEach(f=>{f.checked&&s.push(f.id)}),i.primary_activities=s.join(","),this.post("contest/leaderboardapply",i).then(f=>{this.isSubmitting=!1,f.code==200?(this.resetForm(),this.$router.push("/affiliate-leaderboard/apply-result")):this.alertShowFn(f.msg,!1,!1)}).catch(f=>{this.isSubmitting=!1,this.alertShowFn(res.msg,!1,!1)})},resetForm(){this.formData={fullName:"",websiteUrl:"",socialMedia:"",telegram:"",discord:"",others:"",promotion:"",selectedActivities:[],suggestions:"",agreeTerms:!1},this.errors={}}}},P={class:"hero-section"},B={class:"hero-content"},R={class:"hero-title"},j={class:"application-section"},H={class:"application-container"},q={class:"application-title"},O={class:"affiliate-form-group"},z={class:"affiliate-form-label"},J={class:"affiliate-form-input-box"},Y=["placeholder"],G={key:0,class:"affiliate-form-error"},K={class:"affiliate-form-group"},Q={class:"affiliate-form-label"},W={class:"affiliate-form-input-box"},X=["placeholder"],Z={key:0,class:"affiliate-form-error"},$={class:"affiliate-form-group"},ee={class:"affiliate-form-label"},se={class:"affiliate-form-input-box"},te=["placeholder"],ie={key:0,class:"affiliate-form-error"},ae={class:"affiliate-form-group"},re={class:"affiliate-form-label"},oe={class:"affiliate-instant-message-item"},le={class:"affiliate-message-header"},ne={class:"affiliate-message-label"},fe={class:"affiliate-form-input-box"},de=["placeholder"],me={class:"affiliate-instant-message-item"},pe={class:"affiliate-message-header"},ce={class:"affiliate-message-label"},ue={class:"affiliate-form-input-box"},he=["placeholder"],ge={class:"affiliate-instant-message-item",style:{"margin-bottom":"0"}},_e={class:"affiliate-message-header"},be={class:"affiliate-message-label"},ve={class:"affiliate-form-input-box"},ye=["placeholder"],we={key:0,class:"affiliate-form-error"},De={class:"affiliate-form-group"},ke={class:"affiliate-form-label"},xe={class:"affiliate-form-input-box"},Me=["placeholder"],Ae={key:0,class:"affiliate-form-error"},Ue={class:"affiliate-form-group"},Se={class:"affiliate-form-label"},Le={class:"affiliate-sub-label"},Ie={class:"affiliate-activities-container"},Ne={class:"affiliate-activity-checkbox"},Ve=["onUpdate:modelValue","onChange"],Ce={class:"affiliate-activity-label"},Te={key:0,class:"affiliate-form-error"},Ee={class:"affiliate-form-group"},Fe={class:"affiliate-form-label"},Pe={class:"affiliate-form-input-box"},Be=["placeholder"],Re={key:0,class:"affiliate-form-error"},je={class:"affiliate-form-group affiliate-terms-group"},He={class:"affiliate-terms-checkbox-container"},qe={for:"affiliate-terms-checkbox",class:"affiliate-terms-label"},Oe={key:0,class:"affiliate-form-error"},ze={class:"submit-container"},Je=["disabled"],Ye={class:"terms-modal-header"},Ge={class:"terms-modal-body"};
1function Ke(i,s,f,_,t,o){const k=u("IndexHedaer"),x=u("IndexFooter"),M=u("alertD");return l(),n(w,null,[y(k,{loginShow:t.loginShow},null,8,["loginShow"]),e("div",{class:p(["apply-now-page",{"night-type":o.isNight}])},[e("div",P,[e("div",B,[e("h1",R,r(i.$t("pages.index.affiliateLeaderboardApply.program_title")),1),s[24]||(s[24]=e("div",{class:"hero-trophy"},[e("img",{src:V,alt:"Trophy",class:"trophy-img"})],-1))])]),e("div",j,[e("div",H,[e("h2",q,r(i.$t("pages.index.affiliateLeaderboardApply.form_title")),1),e("form",{class:"application-form",onSubmit:s[19]||(s[19]=h((...a)=>o.submitApplication&&o.submitApplication(...a),["prevent"]))},[e("div",O,[e("label",z,r(i.$t("pages.index.affiliateLeaderboardApply.full_name")),1),e("div",J,[d(e("input",{type:"text",class:p(["affiliate-form-input",{"affiliate-form-input-error":t.errors.fullName}]),placeholder:"","onUpdate:modelValue":s[0]||(s[0]=a=>t.formData.fullName=a),onInput:s[1]||(s[1]=a=>o.clearError("fullName"))},null,42,Y),[[c,t.formData.fullName]])]),t.errors.fullName?(l(),n("div",G,[e("span",null,r(t.errors.fullName),1)])):m("",!0)]),e("div",K,[e("label",Q,r(i.$t("pages.index.affiliateLeaderboardApply.website_url")),1),e("div",W,[d(e("input",{type:"text",class:p(["affiliate-form-input",{"affiliate-form-input-error":t.errors.websiteUrl}]),placeholder:"","onUpdate:modelValue":s[2]||(s[2]=a=>t.formData.websiteUrl=a),onInput:s[3]||(s[3]=a=>o.clearError("websiteUrl"))},null,42,X),[[c,t.formData.websiteUrl]])]),t.errors.websiteUrl?(l(),n("div",Z,[e("span",null,r(t.errors.websiteUrl),1)])):m("",!0)]),e("div",$,[e("label",ee,r(i.$t("pages.index.affiliateLeaderboardApply.social_media")),1),e("div",se,[d(e("input",{type:"text",class:p(["affiliate-form-input",{"affiliate-form-input-error":t.errors.socialMedia}]),placeholder:"","onUpdate:modelValue":s[4]||(s[4]=a=>t.formData.socialMedia=a),onInput:s[5]||(s[5]=a=>o.clearError("socialMedia"))},null,42,te),[[c,t.formData.socialMedia]])]),t.errors.socialMedia?(l(),n("div",ie,[e("span",null,r(t.errors.socialMedia),1)])):m("",!0)]),e("div",ae,[e("label",re,r(i.$t("pages.index.affiliateLeaderboardApply.instant_message")),1),e("div",oe,[e("div",le,[s[25]||(s[25]=e("img",{src:C,alt:"Telegram",class:"affiliate-message-icon"},null,-1)),e("span",ne,r(i.$t("pages.index.affiliateLeaderboardApply.telegram")),1)]),e("div",fe,[d(e("input",{type:"text",class:p(["affiliate-form-input",{"affiliate-form-input-error":t.errors.instantMessage&&!o.hasAnyInstantMessage}]),placeholder:"","onUpdate:modelValue":s[6]||(s[6]=a=>t.formData.telegram=a),onInput:s[7]||(s[7]=a=>o.clearError("instantMessage"))},null,42,de),[[c,t.formData.telegram]])])]),e("div",me,[e("div",pe,[s[26]||(s[26]=e("img",{src:T,alt:"Discord",class:"affiliate-message-icon"},null,-1)),e("span",ce,r(i.$t("pages.index.affiliateLeaderboardApply.discord")),1)]),e("div",ue,[d(e("input",{type:"text",class:p(["affiliate-form-input",{"affiliate-form-input-error":t.errors.instantMessage&&!o.hasAnyInstantMessage}]),placeholder:"","onUpdate:modelValue":s[8]||(s[8]=a=>t.formData.discord=a),onInput:s[9]||(s[9]=a=>o.clearError("instantMessage"))},null,42,he),[[c,t.formData.discord]])])]),e("div",ge,[e("div",_e,[s[27]||(s[27]=e("img",{src:E,alt:"Others",class:"affiliate-message-icon"},null,-1)),e("span",be,r(i.$t("pages.index.affiliateLeaderboardApply.others")),1)]),e("div",ve,[d(e("input",{type:"text",class:p(["affiliate-form-input",{"affiliate-form-input-error":t.errors.instantMessage&&!o.hasAnyInstantMessage}]),placeholder:"","onUpdate:modelValue":s[10]||(s[10]=a=>t.formData.others=a),onInput:s[11]||(s[11]=a=>o.clearError("instantMessage"))},null,42,ye),[[c,t.formData.others]])])]),t.errors.instantMessage?(l(),n("div",we,[e("span",null,r(t.errors.instantMessage),1)])):m("",!0)]),e("div",De,[e("label",ke,r(i.$t("pages.index.affiliateLeaderboardApply.promote")),1),e("div",xe,[d(e("textarea",{class:p(["affiliate-form-textarea",{"affiliate-form-input-error":t.errors.promotion}]),placeholder:"","onUpdate:modelValue":s[12]||(s[12]=a=>t.formData.promotion=a),onInput:s[13]||(s[13]=a=>o.clearError("promotion")),rows:"4"},null,42,Me),[[c,t.formData.promotion]])]),t.errors.promotion?(l(),n("div",Ae,[e("span",null,r(t.errors.promotion),1)])):m("",!0)]),e("div",Ue,[e("label",Se,[g(r(i.$t("pages.index.affiliateLeaderboardApply.activities")),1),e("span",Le,r(i.$t("pages.index.affiliateLeaderboardApply.activities_sub")),1)]),e("div",Ie,[(l(!0),n(w,null,I(t.activities,(a,b)=>(l(),n("div",{class:"affiliate-activity-item",key:b},[e("div",Ne,[d(e("input",{type:"checkbox","onUpdate:modelValue":v=>a.checked=v,onChange:v=>o.toggleActivity(b)},null,40,Ve),[[D,a.checked]])]),e("span",Ce,r(a.name),1)]))),128))]),t.errors.activities?(l(),n("div",Te,[e("span",null,r(t.errors.activities),1)])):m("",!0)]),e("div",Ee,[e("label",Fe,r(i.$t("pages.index.affiliateLeaderboardApply.suggestions")),1),e("div",Pe,[d(e("textarea",{class:p(["affiliate-form-textarea",{"affiliate-form-input-error":t.errors.suggestions}]),placeholder:"","onUpdate:modelValue":s[14]||(s[14]=a=>t.formData.suggestions=a),onInput:s[15]||(s[15]=a=>o.clearError("suggestions")),rows:"4"},null,42,Be),[[c,t.formData.suggestions]])]),t.errors.suggestions?(l(),n("div",Re,[e("span",null,r(t.errors.suggestions),1)])):m("",!0)]),e("div",je,[e("div",He,[d(e("input",{type:"checkbox",class:"affiliate-terms-checkbox",id:"affiliate-terms-checkbox","onUpdate:modelValue":s[16]||(s[16]=a=>t.formData.agreeTerms=a),onChange:s[17]||(s[17]=a=>o.clearError("terms"))},null,544),[[D,t.formData.agreeTerms]]),e("label",qe,[g(r(i.$t("pages.index.affiliateLeaderboardApply.terms_agree"))+" ",1),e("a",{href:"#",class:"affiliate-terms-link",onClick:s[18]||(s[18]=h(a=>t.showTermsModal=!0,["prevent"]))},r(i.$t("pages.index.affiliateLeaderboardApply.terms_link")),1),s[28]||(s[28]=g(". ",-1))])]),t.errors.terms?(l(),n("div",Oe,[e("span",null,r(t.errors.terms),1)])):m("",!0)]),e("div",ze,[e("button",{type:"submit",class:"submit-btn",disabled:t.isSubmitting},r(t.isSubmitting?i.$t("pages.index.affiliateLeaderboardApply.submitting"):i.$t("pages.index.affiliateLeaderboardApply.apply_now")),9,Je)])],32)])]),t.showTermsModal?(l(),n("div",{key:0,class:"terms-modal",onClick:s[21]||(s[21]=a=>t.showTermsModal=!1)},[e("div",{class:"terms-modal-content",onClick:s[20]||(s[20]=h(()=>{},["stop"]))},[e("div",Ye,[e("h3",null,r(i.$t("pages.index.affiliateLeaderboardApply.terms_modal_title")),1)]),e("div",Ge,[e("p",null,r(i.$t("pages.index.affiliateLeaderboardApply.terms_p1")),1),e("p",null,r(i.$t("pages.index.affiliateLeaderboardApply.terms_p2")),1)])])])):m("",!0)],2),y(x),t.alertShow?(l(),N(M,{key:0,msg:t.alertMsg,onHideTc:s[22]||(s[22]=a=>t.alertShow=!1),onChangeStatus:s[23]||(s[23]=a=>t.focusStatus=!1),state:t.alertState,focusStatus:t.focusStatus},null,8,["msg","state","focusStatus"])):m("",!0)],64)}const fs=L(F,[["render",Ke],["__scopeId","data-v-5fff979d"]]);export{fs 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.