!function(e,t,n){var r=6048e5,i=-1,s="recommended_hidden_until",o="blocked_recommended_creatives";e.recommendedLink={_initialized:!1,init:function(){n("body").on("click",".hide-recommended",function(t){var i=n(t.target).data("creative-id").toString(),u=store.safeGet(o);n(t.target).thing().hide(),u?(u=u.split(","),u.indexOf(i)===-1&&u.push(i),u=u.join(",")):u=i,store.safeSet(o,u),store.safeSet(s,Date.now()+r),e.flatlistevent.sendFlatListEvent(t,"subreddit_recommendation_flatlist_click")}),n("body").on("click",".subscribe-recommended",function(t){e.flatlistevent.sendFlatListEvent(t,"subreddit_recommendation_flatlist_click")})},setup:function(e,t){if(this._initialized)return this;this.displayedThings=e,this.site=t,this._initialized=!0},requestRecommendedLink:function(t){t=t||{};var r=store.safeGet(s,i);if(r===i)return;if(r&&r>Date.now())return null;var u=e.utils.parseQueryString(location.search),a="/api/request_recommended_link";u.feature&&(a+="?"+n.param({feature:u.feature},!0));var f=store.safeGet(o);return n.ajax({type:"POST",url:a,timeout:e.config.ads_loading_timeout_ms,data:{site:this.site,dt:this.displayedThings,cur_listing:e.config.cur_listing,blocked_creatives:f}})}}}(r,_,jQuery),$(function(){r.recommendedLink.init()});