(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e1ee24d"],{"4d4b":function(e,t,s){e.exports=s.p+"img/regiter-logo.1aac15ef.png"},"6e88":function(e,t,s){"use strict";s("e516")},"7a21":function(e,t,s){"use strict";s.r(t);s("a15b"),s("277d"),s("99af"),s("fb6a");var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"register"},[t("div",{staticClass:"main"},[t("div",{staticClass:"head-bg"},[e._m(0),t("div",{staticClass:"title"},[t("h2",[e._v(e._s(e.$language.welcomeKaya))])]),t("span",{staticClass:"close",on:{click:function(t){return e.playClose()}}},[t("i",{staticClass:"iconfont icon-close"})])]),t("div",{staticClass:"login-warp"},[t("div",{staticClass:"login-box"},[t("div",{staticClass:"head-title"},[t("h2",[e._v(e._s(e.$language.join))])]),t("div",{staticClass:"phoneInput"},[t("span",{staticClass:"after"},[e._v("+"+e._s(e.countryData.areaCode))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.user.phone,expression:"user.phone"}],attrs:{type:"text",placeholder:e.$language.mobile},domProps:{value:e.user.phone},on:{input:function(t){t.target.composing||e.$set(e.user,"phone",t.target.value)}}})]),e.phoneError?t("div",{staticClass:"tips"},[e._v(" Please enter the correct phone number ")]):e._e(),t("div",{staticClass:"passwordInput"},["checkbox"===e.passwordType?t("input",{directives:[{name:"model",rawName:"v-model",value:e.user.password,expression:"user.password"}],attrs:{placeholder:e.$language.password,type:"checkbox"},domProps:{checked:Array.isArray(e.user.password)?e._i(e.user.password,null)>-1:e.user.password},on:{change:function(t){var s=e.user.password,a=t.target,r=!!a.checked;if(Array.isArray(s)){var i=null,o=e._i(s,i);a.checked?o<0&&e.$set(e.user,"password",s.concat([i])):o>-1&&e.$set(e.user,"password",s.slice(0,o).concat(s.slice(o+1)))}else e.$set(e.user,"password",r)}}}):"radio"===e.passwordType?t("input",{directives:[{name:"model",rawName:"v-model",value:e.user.password,expression:"user.password"}],attrs:{placeholder:e.$language.password,type:"radio"},domProps:{checked:e._q(e.user.password,null)},on:{change:function(t){return e.$set(e.user,"password",null)}}}):t("input",{directives:[{name:"model",rawName:"v-model",value:e.user.password,expression:"user.password"}],attrs:{placeholder:e.$language.password,type:e.passwordType},domProps:{value:e.user.password},on:{input:function(t){t.target.composing||e.$set(e.user,"password",t.target.value)}}}),t("span",{class:["iconfont","text"===e.passwordType?"icon-eyes":"icon-noeyes"],on:{click:e.passwordTypeToggle}})]),e.passwordError?t("div",{staticClass:"tips"},[e._v(" Please enter the correct password ")]):e._e(),t("div",{staticClass:"cpf"},[t("span",[e._v(e._s(e.$language.cpf))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.user.documentId,expression:"user.documentId"}],attrs:{type:"text",placeholder:"000.000.000-00"},domProps:{value:e.user.documentId},on:{input:function(t){t.target.composing||e.$set(e.user,"documentId",t.target.value)}}})]),t("div",{staticClass:"email"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.user.email,expression:"user.email"}],attrs:{type:"email",placeholder:e.$language.email},domProps:{value:e.user.email},on:{input:function(t){t.target.composing||e.$set(e.user,"email",t.target.value)}}})]),t("div",{staticClass:"birthday"},[t("h1",[e._v("Data de nascimento")]),t("div",{staticClass:"time",on:{click:function(t){e.birthdayShow=!0}}},[t("span",{staticClass:"dateTime"},[e._v(e._s(e.date?e.date:""))]),t("div",[t("span",{staticClass:"iconfont icon-date"}),t("span",{staticClass:"iconfont icon-close",on:{click:function(t){return t.stopPropagation(),e.clearDate.apply(null,arguments)}}})])])]),t("div",{staticClass:"argument-check"},[e._m(1),e._m(2)]),t("div",{staticClass:"btnContent"},[e.serverError?t("div",{staticClass:"tips"},[e._v(" "+e._s(e.serverErrorText||"error")+" ")]):e._e(),t("button",{directives:[{name:"preventReClick",rawName:"v-preventReClick"}],class:["button",{active:e.verify}],on:{click:e.create}},[e._v(" "+e._s(e.freeBet?e.$language.claim:e.$language.createAccount)+" ")])]),e.freeBet?e._e():t("router-link",{staticClass:"registerText",attrs:{tag:"span",to:{name:"Login"}}},[e._v(e._s(e.$language.haveAccount)+" "),t("span",{staticClass:"goto"},[e._v(" Criar conta")])]),t("other-login",{attrs:{type:"register",freeBet:e.freeBet,bet:e.bet}})],1)])]),e.birthdayShow?t("van-datetime-picker",{attrs:{type:"date",title:"Selecione a data de nascimento","cancel-button-text":"Cancelar","confirm-button-text":"Confirmar","min-date":e.minDate,"max-date":e.maxDate,"columns-order":["day","month","year"],formatter:e.formatter},on:{confirm:e.onConfirm,cancel:function(t){e.birthdayShow=!1}},model:{value:e.currentDate,callback:function(t){e.currentDate=t},expression:"currentDate"}}):e._e()],1)},r=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"logo"},[t("img",{attrs:{src:s("4d4b"),alt:""}})])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"ui-checkbox"},[t("div",{staticStyle:{transform:"scale(0.7)"}},[t("i",{staticClass:"iconfont icon-Selected"})])])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"label"},[t("span",[e._v("Eu concordo com os ")]),t("a",{staticClass:"argument",attrs:{href:"/terms"}},[e._v("acordo do usuário")]),t("span",[e._v(" e confirmo que tenho pelo menos 18 anos")])])}],i=(s("0d03"),s("ac1f"),s("00b4"),s("b0c0"),s("e25e"),s("a9e3"),s("5319"),s("caad"),s("14d9"),s("e9c4"),s("4795"),s("5530")),o=(s("d1cf"),s("ee83")),n=s("a669"),c=s("772d"),u=s("831d"),l=s("8456"),d=s("cf45"),p={name:"KYCRegister",components:{"other-login":n["a"],"van-datetime-picker":o["a"]},data:function(){return{user:{phone:"",password:"",name:"",documentId:"",email:"",birthday:""},appPageMoney:"",serverError:!1,serverErrorText:"",passwordType:"password",freeBet:!1,bet:{},submited:!1,submitting:!1,birthdayShow:!1,minDate:new Date(1900,0,1),maxDate:new Date,currentDate:new Date(1995,0,1),date:null}},computed:Object(i["a"])(Object(i["a"])({},Vuex.mapGetters(["countryData","country","currency"])),{},{verify:function(){var e=!0;return e=!(!u["e"][this.country].test(this.user.phone)||!u["b"].test(this.user.password)||this.submitting),this.user.documentId&&14==this.user.documentId.length||(e=!1),this.user.email&&u["a"].test(this.user.email)||(e=!1),this.date||(e=!1),e},phoneError:function(){return!(!this.submited||u["e"][this.country].test(this.user.phone))},passwordError:function(){return!(!this.submited||u["b"].test(this.user.password))}}),beforeDestroy:function(){clearTimeout(this.submitTimer)},created:function(){this.freeBet="Freebet"===this.$route.name,this.$store.commit("SET_USER",{}),this.appPageMoney=l["f"][this.country],localStorage.removeItem("freeData");var e=this.maxDate.getFullYear()-18;this.maxDate.setFullYear(e)},watch:{"user.phone":function(e){isNaN(parseInt(e))?this.user.phone=null:isNaN(Number(e))&&(this.user.phone=parseInt(e))},"user.documentId":function(e,t){if(e)if(/[^0-9.-]/.test(e))this.user.documentId=t;else{var s=e.replace(/\s/g,"").replace(/[^\d]/g,"");s.length>11?this.user.documentId=t:(s=s.replace(/(\d{3})/g,"$1."),s.length>11&&(s=s.replace(/.(?=[^.]*$)/,"-")),[".","-"].includes(s.slice(-1))&&(s=s.slice(0,-1)),this.user.documentId=s)}}},methods:{formatDate:d["i"],onConfirm:function(e){this.birthdayShow=!1,this.date=Object(d["i"])(+new Date(e),"YYYY-MM-DD"),this.user.birthday=this.date},clearDate:function(){this.date=null,this.user.birthday="",this.currentDate=new Date(1995,0,1),this.birthdayShow=!1},formatter:function(e,t){return"year"===e?t+" ano":"month"===e?t+" mês":"day"===e?t+" dia":t},playClose:function(){var e=window.sessionStorage,t=e.getItem("count");1==t?this.$router.push({name:"Home"}):this.$router.go(-1)},passwordTypeToggle:function(){"text"===this.passwordType?this.passwordType="password":this.passwordType="text"},freeBetChange:function(e){var t=e.betData;this.bet=t,localStorage.setItem("freeData",JSON.stringify(t))},create:function(){var e=this;if(Object(d["c"])(this.user.documentId,!0)==this.user.documentId.replace(/[.-]/g,"")){if(this.submited=!0,this.verify){var t=Object.assign({},this.user);t.password=Object(c["a"])(t.password),t.phone=this.countryData.areaCode+t.phone.replace(u["d"],""),t.username=t.phone.replace(u["d"],"");var s="checkUserKyc";this.$store.dispatch("clearToken"),Object(d["g"])({eventName:"register_click"}),this.submitting=!0,this.$post({uri:s,data:t,noPrompt:!0}).then((function(s){e.submitting=!1,e.$store.commit("SET_USER",t),e.register(t,s.data)}))["catch"]((function(s){e.submitting=!1,197005===s.result?(e.$store.commit("SET_USER",t),e.register(t,res.data)):(e.serverErrorText=s.info,e.serverError=!0)}))}}else this.$toast("CPF Inválido")},register:function(e,t){var s=this,a=Object(i["a"])(Object(i["a"])({otp:"",cc:this.country,platform:Object(d["p"])(),origin:Object(d["o"])(),deepEvent:Object(d["w"])({key:"deepEvent"}),deepEventType:Object(d["w"])({key:"deepEventType"}),afUid:Vue.prototype.$bridge.getAppsFlyerId(),shareCode:Object(d["w"])({key:"shareCode",timer:864e7})},e),{},{kycRef:t}),r="centerMiniRegister",o={name:"RegisterSuccess"},n=0;this.submitting=!0,this.$post({uri:r,data:a,noPrompt:!0}).then((function(e){clearTimeout(s.submitTimer),s.submitTimer=setTimeout((function(){s.submitting=!1}),1e4);var t=e.data.sid.slice(0,32),a=e.data.sid.slice(32,e.data.sid.length);localStorage.setItem("kkphone",s.user.phone),s.$store.commit("SET_USER",e.data),s.$store.commit("SET_TOKEN",t),localStorage.setItem("token",t),localStorage.setItem("secretKey",a),Object(d["g"])({eventName:"register_success"}),localStorage.removeItem("deepEvent"),localStorage.removeItem("deepEventType"),localStorage.removeItem("shareCode"),localStorage.setItem("registerActivityExt",+new Date+72e5),setTimeout((function(){s.$store.dispatch("GetUserInfo",{router:o})}),n)}))["catch"]((function(e){s.submitting=!1,s.serverErrorText=e.info,s.serverError=!0}))}}},m=p,h=(s("b216"),s("2877")),g=Object(h["a"])(m,a,r,!1,null,"75d83262",null);t["default"]=g.exports},"831d":function(e,t,s){"use strict";s.d(t,"e",(function(){return a})),s.d(t,"d",(function(){return r})),s.d(t,"b",(function(){return i})),s.d(t,"c",(function(){return o})),s.d(t,"a",(function(){return n}));var a={ke:/^0?[1237]\d{8}$/,ng:/(^0?[789]\d{9}$)|(^00\d{8}$)/,br:/^\d{2}[9][1-9]\d{7}$/},r=/^0?/,i=/^.{5,}$/,o=/^\d{4,6}$/,n=/.+@.+/},a669:function(e,t,s){"use strict";var a=function(){var e=this,t=e._self._c;return e.isShowOther?t("div",{staticClass:"otherAccount"},[t("div",{staticClass:"or"},[t("div",{staticClass:"line-text"},[t("div",{staticClass:"l"}),t("span",[e._v(e._s(e.$language.or))]),t("div",{staticClass:"l"})])]),t("div",{staticClass:"ggAfb"},[e.thirdLogins.gg?t("span",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:1e3,expression:"1000"}],staticClass:"gg",on:{click:function(t){return e.getAuth("googleLogin")}}},[t("i",{staticClass:"iconfont icon-google"})]):e._e(),e.thirdLogins.fb?t("span",{directives:[{name:"preventReClick",rawName:"v-preventReClick",value:1e3,expression:"1000"}],staticClass:"fb",on:{click:function(t){return e.getAuth("facebookLogin")}}},[t("i",{staticClass:"iconfont icon-facebook"})]):e._e()])]):e._e()},r=[],i=(s("b64b"),s("5530")),o={name:"OtherAccount",props:{type:{type:String,default:""},freeBet:{type:Boolean,default:!1},bet:{type:Object,default:function(){return{}}}},data:function(){return{}},created:function(){var e=this;Vue.prototype.$bridge.getDeviceInfo("getThirdLogins").then((function(t){try{var s=JSON.parse(t);s&&e.$store.commit("SET_THIRD_LOGINS",s)}catch(a){}}))},computed:Object(i["a"])(Object(i["a"])({},Vuex.mapGetters(["thirdLogins"])),{},{typeText:function(){var e={facebook:"",google:""};switch(this.type){case"login":e={facebook:this.$language.facebookLogin,google:this.$language.googleLogin};break;case"register":e={facebook:this.$language.facebookRegister,google:this.$language.googleRegister}}return e},isShowOther:function(){return!(!this.thirdLogins.fb&&!this.thirdLogins.gg)}}),methods:{getAuth:function(e){!this.freeBet||this.bet.bet?this.$bridge[e]({router:{name:this.$route.query.redirect||"Home"}}):this.$toast.fail("Please place your bet")}}},n=o,c=(s("6e88"),s("2877")),u=Object(c["a"])(n,a,r,!1,null,"6a350d29",null);t["a"]=u.exports},b216:function(e,t,s){"use strict";s("b9ab")},b9ab:function(e,t,s){},e516:function(e,t,s){}}]);