(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[3891],{75948:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>u});varo=a(77387),i=a(25100);functionn(e){returnn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},n(e)}functions(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){if("string"==typeofe)returnr(e,t);vara={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(e,t):void0}}(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(vara=0,o=Array(t);a<t;a++)o[a]=e[a];returno}functionl(e,t){vara=Object.keys(e);if(Object.getOwnPropertySymbols){varo=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){returnObject.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,o)}returna}functionc(e){for(vart=1;t<arguments.length;t++){vara=null!=arguments[t]?arguments[t]:{};t%2?l(Object(a),!0).forEach((function(t){d(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):l(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}returne}functiond(e,t,a){return(t=function(e){vart=function(e,t){if("object"!=n(e)||!e)returne;vara=e[Symbol.toPrimitive];if(void0!==a){varo=a.call(e,t||"default");if("object"!=n(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==n(t)?t:t+""}(t))ine?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}constu={components:{"user-card":o.default,intersect:i.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){vara;(a=t.feed).push.apply(a,s(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,a)=>{"use strict";a.r(t),a.d(t,{default:()=>o});consto={components:{"post-card":a(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.isFetching=!1,e.fetc