!function(){var t;t=jQuery,Craft.FeedWidget=Garnish.Base.extend({$widget:null,init:function(a,e,d){var i=this;this.$widget=t("#widget"+a),this.$widget.addClass("loading"),axios.get("https://feed-proxy.craftcms.com/",{params:{url:e}}).then((function(a){i.$widget.removeClass("loading"),i.$widget.find("table").attr("dir",a.data.direction);var d=i.$widget.find("td");a.data.items=(a.data.items||[]).filter((function(t){return t.permalink.match(/^https?:\/\//)})),a.data.items.forEach((function(a,e){var i=t(d[e]),r=t("<a/>",{href:a.permalink,target:"_blank",text:a.title}).get(0).outerHTML+" ";a.date&&(r+='<span class="light nowrap">'+Craft.formatDate(a.date)+"</span>"),i.html(r)})),Craft.sendActionRequest("POST","dashboard/cache-feed-data",{data:{url:e,data:a.data}})})).catch((function(){i.$widget.removeClass("loading"),Craft.cp.displayError(Craft.t("app","Could not load the feed"))}))}})}();
//# sourceMappingURL=FeedWidget.js.map