1"use strict";(self["webpackChunkcabinet_updated"]=self["webpackChunkcabinet_updated"]||[]).push([[992],{6992:function(t,a,e){e.r(a),e.d(a,{default:function(){return p}});var s=function(){var t=this,a=t._self._c;return a("div",{staticClass:"profile-page"},[a("div",{staticClass:"user-block simple-block"},[a("div",{staticClass:"user-block__user"},[a("img",{attrs:{src:e(5155),alt:"ÐÐ°Ñ Ð°Ð²Ð°ÑаÑ"}}),a("p",[t._v(t._s(t.fullName))])]),a("div",{staticClass:"user-block__rest"},[a("p",{staticClass:"user-block__balance"},[t._v(" ÐаланÑ: "),a("span",[t._v(t._s(t.balance)+" "+t._s(t.declOfNum(t.balance,["балл","балла","баллов"])))])]),a("router-link",{staticClass:"user-block__additional-btn",attrs:{to:{name:"UserData"}}},[t._v("ÐодÑобнее")])],1)]),a("div",{staticClass:"subscribe-block simple-block"},[a("p",{staticClass:"simple-block__title"},[t._v("ÐовоÑÑÐ½Ð°Ñ ÑаÑÑÑлка и ÑведомлениÑ")]),a("SwitchComponent",{attrs:{value:t.notifyData.email,"checkbox-label":"ÐÐ°Ñ ÑоглаÑие на полÑÑение Ñведомлений на ÑлекÑÑоннÑÑ Ð¿Ð¾ÑÑÑ","checkbox-id":"user-subscribe-notifications","switch-right":"",disabled:t.isNotifyLoading},on:{input:function(a){return t.changeNotify("email",a?1:0)}}}),a("SwitchComponent",{attrs:{value:t.notifyData.mailing,"checkbox-label":"ÐÐ°Ñ ÑоглаÑие на полÑÑение новоÑÑей и ÑекламнÑÑ
акÑий","checkbox-id":"user-subscribe-notifications","switch-right":"",disabled:t.isNotifyLoading},on:{input:function(a){return t.changeNotify("mailing",a?1:0)}}})],1),a("div",{staticClass:"apple-block simple-block"},[a("p",{staticClass:"simple-block__title"},[t._v("Apple Wallet")]),a("div",{staticClass:"apple-block__content"},[a("button",{attrs:{disabled:t.isWalletLoading},on:{click:t.onAppleWalletClick}},[t._v("ÐобавиÑÑ Ð² Apple Wallet")]),a("p",[t._v("ÐобавÑÑе ваÑÑ Ð±Ð¾Ð½ÑÑнÑÑ ÐºÐ°ÑÑÑ Ð² Apple wallet, ÑÑÐ¾Ð±Ñ Ð±ÑÑÑÑее и Ñдобнее оплаÑиваÑÑ Ñвои ÑÑÑаÑ
овки")])])]),a("button",{staticClass:"profile-page__logout-btn",attrs:{type:"button"},on:{click:t.logout}},[t._v("ÐÑйÑи из аккаÑнÑа")])])},i=[],o=(e(7658),e(3181)),r=e(1178),l=e(8428),n=e.n(l),c={name:"ProfilePage",components:{SwitchComponent:r.Z},mixins:[o.Z],data(){return{isSocialLoading:!1,isNotifyLoading:!1,isWalletLoading:!1}},computed:{userId(){return this.$store.state.userData},fullName(){return this.$store.state.userData.name?`${this.$store.state.userData.surname?this.$store.state.userData.surname:""} ${this.$store.state.userData.name} ${this.$store.state.userData.middleName}`:this.$store.state.userData.base.phone},balance(){return this.$store.state.userData.balance},socialConnectUrl(){return this.$store.state.userData.social_connect_url},connectedSocial(){return this.$store.state.userData.connected_social_networks},notifyData(){return this.$store.state.userData.notify_data}},async mounted(){if(this.$route.params?.action&&this.$route.query.code){if("saveVkInfo"===this.$route.params.action){this.isSocialLoading=!0;try{const t=await this.$store.dispatch("userData/saveVkInfo",this.$route.query.code);await this.$store.dispatch("userData/getProfileData"),this.$alert("",t,"success")}catch(t){this.$alert(t,"ÐÑибка","error")}finally{this.isSocialLoading=!1,await this.$router.push({name:"Profile"})}}if("saveYandexInfo"===this.$route.params.action&&this.$route.query.state){this.isSocialLoading=!0;try{const t=await this.$store.dispatch("userData/saveYandexInfo",{code:this.$route.query.code,state:this.$route.query.state});await this.$store.dispatch("userData/getProfileData"),this.$alert("",t,"success")}catch(t){this.$alert(t,"ÐÑибка","error")}finally{this.isSocialLoading=!1,await this.$router.push({name:"Profile"})}}}},methods:{logout(){this.$store.dispatch("auth/logout")},async changeNotify(t,a){this.isNotifyLoading=!0;try{await this.$store.dispatch("userData/changeNotify",{type:t,val:a}),await this.$store.dispatch("userData/getProfileData")}catch(e){this.$alert(e,"ÐÑибка","error")}finally{this.isNotifyLoading=!1}},async deleteSocialInfo(t){this.isSocialLoading=!0;try{const a=await this.$store.dispatch("userData/deleteSocialInfo",t);await this.$store.dispatch("userData/getProfileData"),this.$alert("",a,"success")}catch(a){this.$alert(a,"ÐÑибка","error")}finally{this.isSocialLoading=!1}},onAppleWalletClick(){this.isWalletLoading=!0,n()({url:"/api/wallet/download",method:"GET",responseType:"blob"}).then((t=>{const a=window.URL.createObjectURL(new Blob([t.data])),e=document.createElement("a");e.href=a,e.setAttribute("download","wallet.bin"),document.body.appendChild(e),e.click(),window.URL.revokeObjectURL(a),this.$alert("","Файл ÑÑпеÑно загÑÑжен","success")})).catch((()=>{this.$alert("ÐÑоизоÑла оÑибка. ÐопÑобÑйÑе позже","ÐÑибка","error")})).finally((()=>{this.isWalletLoading=!1}))}}},u=c,h=e(1001),d=(0,h.Z)(u,s,i,!1,null,"39a00272",null),p=d.exports},5155:function(t,a,e){t.exports=e.p+"img/default-avatar.df30695c.svg"}}]);
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.