(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[269],{64919:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>n});vara=o(29655);o(67964);functioni(e){returnfunction(e){if(Array.isArray(e))returns(e)}(e)||function(e){if("undefined"!=typeofSymbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])returnArray.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeofe)returns(e,t);varo=Object.prototype.toString.call(e).slice(8,-1);"Object"===o&&e.constructor&&(o=e.constructor.name);if("Map"===o||"Set"===o)returnArray.from(e);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))returns(e,t)}(e)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}functions(e,t){(null==t||t>e.length)&&(t=e.length);for(varo=0,a=newArray(t);o<t;o++)a[o]=e[o];returna}constn={components:{Autocomplete:a.default},data:function(){return{brandName:"pixelfed",user:window._sharedData.user,profileLayoutModel:"grid",hasLocalTimeline:!0,hasNetworkTimeline:!1}},computed:{profileLayout:{get:function(){returnthis.$store.state.profileLayout},set:function(e){this.$store.commit("setProfileLayout",e)}},hideCounts:{get:function(){returnthis.$store.state.hideCounts},set:function(e){this.$store.commit("setHideCounts",e)}},autoloadComments:{get:function(){returnthis.$store.state.autoloadComments},set:function(e){this.$store.commit("setAutoloadComments",e)}},newReactions:{get:function(){returnthis.$store.state.newReactions},set:function(e){this.$store.commit("setNewReactions",e)}},fixedHeight:{get:function(){returnthis.$store.state.fixedHeight},set:function(e){this.$store.commit("setFixedHeight",e)}},uiColorScheme:{get:function(){returnthis.$store.state.colorScheme},set:function(e){this.$store.commit("setColorScheme",e)}}},mounted:function(){window.App.config.features.hasOwnProperty("timelines")&&(this.hasLocalTimeline=App.config.features.timelines.local,this.hasNetworkTimeline=App.config.features.timelines.network);vare=newURLSearchParams(window.location.search);e.has("q")&&e.get("q")&&e.has("src")&&"ac"===e.get("src")&&(this.$refs.autocomplete.setValue(e.get("q")),setTimeout((function(){document.querySelector(".autocomplete-input").focus()}),1e3)),this.brandName=window.App.config.site.name},methods:{autocompleteSearch:function(e){vart=this;if(!e||e.length<2)return[];varo=e.startsWith("https://")||e.startsWith("@");returnaxios.get("/api/v2/search",{params:{q:e,resolve:o,_pe:1}}).then((function(o){vara=[],s=o.data.accounts.map((function(e){vart=e;returnt.s_type="account",t})),n=o.data.hashtags.map((function(e){vart=e;returnt.s_type="hashtag",t}));if(a.push.apply(a,i(s.slice(0,5))),a.push.apply(a,i(n.slice(0,5))),o.data.statuses)if(Array.isArray(o.data.statuses)){varr=o.data.statuses.map((function(e){vart=e;returnt.s_type="status",t}));a.push.apply(a,i(r))}elsee===o.data.statuses.url&&(t.$refs.autocomplete.value="",t.$router.push({name:"post",path:"/i/web/post/".concat(o.data.statuses.id),params:{id:o.data.statuses.id,cachedStatus:o.data.statuses,cachedProfile:t.user}}));returna}))},getSearchResultValue:function(e){returne},onSearchSubmit:function(e){if(!(e.length<1))switch(this.$refs.autocomplete.value="",e.s_type){case"account":location.href="/i/web/profile/".concat(e.id);break;case"hashtag":location.href="/i/web/hashtag/".concat(e.name);break;case"status":location.href="/i/web/post/".concat(e.id)}},truncate:function(e){vart=arguments.length>1&&void0!==arguments[1]?arguments[1]:30;returne.length<=t?e:e.slice(0,t)+"..."},timeAgo:function(e){returnwindow.App.util.format.timeAgo(e)},formatCount:function(e){returne?newIntl.NumberFormat("en-CA",{notation:"compact",compactDisplay:"short"}).format(e):0},logout:function(){axios.post("/logout").then((function(e){location.href="/"})).catch((function(e){location.href="/"}))},openUserInterfaceSettings:function(){event.currentTarget.blur(),this.$refs.uis.show()},toggleUi:function(e){event.currentTarget.blur(),this.uiColorScheme=e},toggl