1function n(){return{downloadId:0,voteCount:0,voteLabel:"",anonVoted:!1,userVoted:!1,isLoggedIn:!1,loginUrl:"",loading:!1,message:"",nonceAnon:"",nonceReg:"",ajaxUrl:"",i18n:{},mount(){var e;const t=window.woodevComingSoon;t&&(this.downloadId=t.downloadId,this.voteCount=t.voteCount||0,this.anonVoted=!!t.isAnonVoted,this.userVoted=!!t.isUserVoted,this.isLoggedIn=!!t.isLoggedIn,this.loginUrl=t.loginUrl||"",this.nonceAnon=t.nonceAnon||"",this.nonceReg=t.nonceReg||"",this.ajaxUrl=t.ajaxUrl||(((e=window.woodevCartData)==null?void 0:e.ajaxUrl)??""),this.i18n=t.i18n||{},this.updateVoteLabel())},updateVoteLabel(){if(this.voteCount<=0){this.voteLabel=this.i18n.noVotes||"ÐÑдÑÑе пеÑвÑм, кÑо пÑоголоÑÑеÑ!";return}const t=this.voteCount,e=t%100,o=e>=11&&e<=19?2:t%10===1?0:t%10>=2&&t%10<=4?1:2,a=["Ñеловек Ñ
оÑÐµÑ ÑÑÐ¾Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½","Ñеловека Ñ
оÑÑÑ ÑÑÐ¾Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½","Ñеловек Ñ
оÑÑÑ ÑÑÐ¾Ñ Ð¿Ð»Ð°Ð³Ð¸Ð½"];this.voteLabel=t.toLocaleString("ru-RU")+" "+a[o]},async castAnonVote(){var t,e;if(!(this.anonVoted||this.loading)){this.loading=!0,this.message="";try{const o=new FormData;o.append("action","woodev_cast_anon_vote"),o.append("nonce",this.nonceAnon),o.append("download_id",this.downloadId);const s=await(await fetch(this.ajaxUrl,{method:"POST",body:o})).json();s.success?(this.voteCount=s.data.vote_count??this.voteCount,this.anonVoted=!0,this.message=this.i18n.voteSuccess||s.data.message||"",this.updateVoteLabel()):((t=s.data)!=null&&t.already_voted&&(this.anonVoted=!0),this.message=((e=s.data)==null?void 0:e.message)||this.i18n.voteError||"")}catch{this.message=this.i18n.voteError||"ÐÑибка. ÐопÑобÑйÑе Ñнова."}this.loading=!1,this._clearMessage()}},async castRegisteredVote(){var t,e;if(!(this.userVoted||this.loading)){this.loading=!0,this.message="";try{const o=new FormData;o.append("action","woodev_cast_registered_vote"),o.append("nonce",this.nonceReg),o.append("download_id",this.downloadId);const s=await(await fetch(this.ajaxUrl,{method:"POST",body:o})).json();s.success?(this.voteCount=s.data.vote_count??this.voteCount,this.userVoted=!0,this.message=this.i18n.subscribeSuccess||s.data.message||"",this.updateVoteLabel()):((t=s.data)!=null&&t.already_voted&&(this.userVoted=!0),this.message=((e=s.data)==null?void 0:e.message)||this.i18n.voteError||"")}catch{this.message=this.i18n.voteError||"ÐÑибка. ÐопÑобÑйÑе Ñнова."}this.loading=!1,this._clearMessage()}},_clearMessage(){setTimeout(()=>{this.message=""},5e3)}}}export{n as woodevVote};
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.