"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[387],{71618:(t,e,s)=>{s.r(e),s.d(e,{default:()=>l});vari=s(42755),o=s(89965),n=s(85748),a=s(32303),r=s(24721);constl={props:{id:{type:String},profileId:{type:String},username:{type:String},cachedProfile:{type:Object},cachedUser:{type:Object}},components:{drawer:i.default,"profile-feed":o.default,"profile-sidebar":n.default,"profile-followers":a.default,"profile-following":r.default},data:function(){return{isLoaded:!1,curUser:void0,tab:"index",profile:void0,relationship:void0}},mounted:function(){this.init()},watch:{$route:"init"},methods:{init:function(){this.tab="index",this.isLoaded=!1,this.relationship=void0,this.owner=!1,this.cachedProfile&&this.cachedUser?(this.curUser=this.cachedUser,this.profile=this.cachedProfile,this.fetchRelationship()):(this.curUser=window._sharedData.user,this.fetchProfile())},getTabComponentName:function(){return"index"===this.tab?"profile-feed":"profile-".concat(this.tab)},fetchProfile:function(){vart=this,e=this.profileId?this.profileId:this.id;axios.get("/api/pixelfed/v1/accounts/"+e).then((function(e){t.profile=e.data,e.data.id==t.curUser.id?(t.owner=!0,t.fetchRelationship()):(t.owner=!1,t.fetchRelationship())})).catch((function(e){t.$router.push("/i/web/404")}))},fetchRelationship:function(){vart=this;if(this.owner)returnthis.relationship={},void(this.isLoaded=!0);axios.get("/api/v1/accounts/relationships",{params:{"id[]":this.profile.id}}).then((function(e){t.relationship=e.data[0],t.isLoaded=!0}))},toggleTab:function(t){this.tab=t},goBack:function(){this.$router.go(-1)},unfollow:function(){vart=this;axios.post("/api/v1/accounts/"+this.profile.id+"/unfollow").then((function(e){t.$store.commit("updateRelationship",[e.data]),t.relationship.following=!1,t.relationship.requested=!1,t.profile.locked&&location.reload(),t.profile.followers_count--})).catch((function(e){swal("Oops!","An error occured when attempting to unfollow this account.","error"),t.relationship.following=!0}))},follow:function(){vart=this;axios.post("/api/v1/accounts/"+this.profile.id+"/follow").then((function(e){t.$store.commit("updateRelationship",[e.data]),t.relationship.following=!0,t.profile.locked&&(t.relationship.requested=!0),t.profile.followers_count++})).catch((function(e){swal("Oops!","An error occured when attempting to follow this account.","error"),t.relationship.following=!1}))}}}},52291:(t,e,s)=>{s.r(e),s.d(e,{default:()=>o});vari=s(43985);consto={props:{hash:{type:String,required:!0},width:{type:[Number,String],default:32},height:{type:[Number,String],default:32},punch:{type:Number,default:1}},mounted:function(){this.draw()},updated:function(){console.log("updated")},beforeDestroy:function(){console.log("beforeDestroy")},methods:{parseNumber:function(t){return"number"==typeoft?t:parseInt(t,10)},draw:function(){vart=this.parseNumber(this.width),e=this.parseNumber(this.height),s=this.parseNumber(this.punch),o=(0,i.decode)(this.hash,t,e,s),n=this.$refs.canvas.getContext("2d"),a=n.createImageData(t,e);a.data.set(o),n.putImageData(a,0,0)}}}},95217:(t,e,s)=>{s.r(e),s.d(e,{default:()=>r});vari=s(26535),o=s(74338),n=s(37846),a=s(81104);constr={props:{status:{type:Object},profile:{type:Object},reactionBar:{type:Boolean,default:!0},useDropdownMenu:{type:Boolean,default:!1}},components:{"comment-drawer":i.default,"post-content":n.default,"post-header":o.default,"post-reactions":a.default},data:function(){return{key:1,menuLoading:!0,sensitive:!1,showCommentDrawer:!1,isReblogging:!1,isBookmarking:!1,owner:!1,admin:!1,license:!1}},mounted:function(){vart=this;this.license=!(!this.status.media_attachments||!this.status.media_attachments.length)&&this.status.media_attachments.filter((function(t){returnt.hasOwnProperty("license")&&t.license&&t.license.hasOwnProperty("id")})).map((function(t){returnt.license}))[0],this.admin=window._sharedData.user.is_admin,this.owner=this.status.account.id==window._sharedData.user.id,this.status.reply_count&&this.autoloadComments&&!1===this.status.comments_disabled&&setTimeout((function(){t.