(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[3891],{75948:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>u});vara=o(77387),s=o(25100);functioni(e){returni="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},i(e)}functionn(e){returnfunction(e){if(Array.isArray(e))returnr(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)returnr(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))returnr(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.")}()}functionr(e,t){(null==t||t>e.length)&&(t=e.length);for(varo=0,a=newArray(t);o<t;o++)a[o]=e[o];returna}functionl(e,t){varo=Object.keys(e);if(Object.getOwnPropertySymbols){vara=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,a)}returno}functionc(e){for(vart=1;t<arguments.length;t++){varo=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){d(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}returne}functiond(e,t,o){vara;returna=function(e,t){if("object"!=i(e)||!e)returne;varo=e[Symbol.toPrimitive];if(void0!==o){vara=o.call(e,t||"default");if("object"!=i(a))returna;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==i(a)?a:String(a))ine?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}constu={components:{"user-card":a.default,intersect:s.default},data:function(){return{loading:!0,config:window.pfl,pagination:void0,feed:[],isEmpty:!1,canLoadMore:!1,isIntersecting:!1,isLoadingMore:!1}},beforeMount:function(){0==this.config.show_directory&&this.$router.push("/")},mounted:function(){this.init()},methods:{init:function(){vare=this;axios.get("/api/landing/v1/directory").then((function(t){t.data.data.length||(e.isEmpty=!0),e.feed=t.data.data,e.pagination=c(c({},t.data.links),t.data.meta)})).finally((function(){e.canLoadMore=!0,e.$nextTick((function(){e.loading=!1}))}))},enterIntersect:function(e){vart=this;!this.isIntersecting&&this.pagination.next_cursor&&(this.isIntersecting=!0,this.isLoadingMore=!0,axios.get("/api/landing/v1/directory",{params:{cursor:this.pagination.next_cursor}}).then((function(e){varo;(o=t.feed).push.apply(o,n(e.data.data)),t.pagination=c(c({},e.data.links),e.data.meta)})).finally((function(){t.pagination.next_cursor?t.canLoadMore=!0:t.canLoadMore=!1,t.isLoadingMore=!1,t.isIntersecting=!1})),console.log(e))}}}},22912:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>a});consta={components:{"post-card":o(42060).default},data:function(){return{loading:!0,config:window.pfl,isFetching:!1,range:"daily",ranges:["daily","monthly","yearly"],rangeIndex:0,feed:[]}},beforeMount:function(){0==this.config.show_explore_feed&&this.$router.push("/")},mounted:function(){this.init()},methods:{init:function(){vare=this;axios.get("/api/pixelfed/v2/discover/posts/trending?range=daily").then((function(t){t&&t.data.length>3?(e.feed=t.data,e.loading=!1):(e.rangeIndex++,e.fetchTrending())}))},fetchTrending:function(){vare=this;this.isFetching||this.rangeIndex>=3||(this.isFetching=!0,axios.get("/api/pixelfed/v2/discover/posts/trending",{params:{range:this.ranges[this.rangeIndex]}}).then((function(t){t&&t.data.length&&2==e.rangeIndex&&t.data.length>3?(e.feed=t.data,e.loading=!1):(e.rangeIndex++,e.isF