(function(a){function b(a){return a.replace(/[&<>"'`=\/]/g,function(a){return f[a]})}function c(a,b){return"undefined"!=typeof a.node.edge_media_to_caption.edges[0]&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node&&"undefined"!=typeof a.node.edge_media_to_caption.edges[0].node.text&&null!==a.node.edge_media_to_caption.edges[0].node.text?a.node.edge_media_to_caption.edges[0].node.text:"undefined"!=typeof a.node.title&&null!==a.node.title&&0!=a.node.title.length?a.node.title:"undefined"!=typeof a.node.accessibility_caption&&null!==a.node.accessibility_caption&&0!=a.node.accessibility_caption.length?a.node.accessibility_caption:(this.is_tag?b.name:b.username)+" image "}var d={host:"https://www.instagram.com/",username:"",tag:"",container:"",display_profile:!0,display_biography:!0,display_gallery:!0,display_captions:!1,display_igtv:!1,callback:null,styling:!0,items:8,items_per_row:4,margin:.5,image_size:640,lazy_load:!1,cache_time:120,on_error:console.error},e={150:0,240:1,320:2,480:3,640:4},f={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};a.instagramfeed=function(f){function g(d){if("string"==typeof d){try{d=d.split("window._shareddata = ")[1].split("")[0]}catch(a){return void h.on_error("instagram feed: it looks like the profile you are trying to fetch is age restricted. see https://github.com/jsanahuja/instagramfeed/issues/26",3)}d=json.parse(d.substr(0,d.length-1)),d=d.entry_data.profilepage||d.entry_data.tagpage;var f=!1;if("undefined"==typeof d){var g=localstorage.getitem(m);if(null!==g&&(d=json.parse(g),f=!0),h.on_error("instagram feed: it looks like your network has been temporary banned because of too many requests. see https://github.com/jsanahuja/jquery.instagramfeed/issues/25",4),!d)return}!f&&0",l+="\""+(j?d.name+"",l+=j?"

#"+h.tag+"

":"

@"+d.full_name+" (@"+h.username+")

",!j&&h.display_biography&&(l+="

"+d.biography+"

"),l+="");var p="undefined"==typeof e[h.image_size]?e[640]:e[h.image_size];if(h.display_gallery)if("undefined"!=typeof d.is_private&&!0===d.is_private)l+="

this profile is private

";else{var q=(d.edge_owner_to_timeline_media||d.edge_hashtag_to_media).edges;x=q.length>h.items?h.items:q.length,l+=""}if(h.display_igtv&&"undefined"!=typeof d.edge_felix_video_timeline){var w=d.edge_felix_video_timeline.edges,x=w.length>h.items?h.items:w.length;if(0";for(var r=0;r",l+="",l+=""}l+=""}}a(h.container).html(l)}null!=h.callback&&h.callback(d)}var h=a.fn.extend({},d,f);if(""==h.username&&""==h.tag)return h.on_error("instagram feed: error, no username nor tag defined.",1),!1;if("undefined"!=typeof h.get_data&&console.warn("instagram feed: options.get_data is deprecated, options.callback is always called if defined"),null==h.callback&&""==h.container)return h.on_error("instagram feed: error, neither container found nor callback defined.",2),!1;var j=""==h.username,k=j?h.host+"explore/tags/"+h.tag+"/":h.host+h.username+"/",l=null,m="instagramfeed_"+(j?"t_"+h.tag:"u_"+h.username),n=m+"_cached";if(0new date().gettime()){var p=localstorage.getitem(m);null!==p&&(l=json.parse(p))}}return null===l?a.get(k,g).fail(function(a){h.on_error("instagram feed: unable to fetch the given user/tag. instagram responded with the status code: "+a.status,5)}):g(l),!0}})(jquery);