Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jquery-eclipsefdn-api

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-eclipsefdn-api - npm Package Compare versions

Comparing version 0.0.37 to 0.0.38

4

dist/jquery.eclipsefdn-api.min.js
/*
* jquery-eclipsefdn-api - v0.0.37
* jquery-eclipsefdn-api - v0.0.38
* Fetch and display data from various Eclipse Foundation APIs.

@@ -11,2 +11,2 @@ * https://github.com/EclipseFdn/jquery-eclipsefdn-api

*/
!function(e,t,a,n){"use strict";var r="eclipseFdnApi",s={apiUrl:"https://api.eclipse.org",gerritUrl:"https://git.eclipse.org/r",eventUrl:"https://newsroom.eclipse.org/api/events",forumsUrl:"https://www.eclipse.org/forums",marketplaceUrl:"https://marketplace.eclipse.org",username:"cguindon",currentUser:"",contentPlaceholder:null,errorMsg:'<i class="fa red fa-exclamation-triangle" aria-hidden="true"></i> An unexpected error has occurred.',gerritUserNotFoundMsg:'<h2 class="h3">Outgoing Reviews</h2>There are no outgoing reviews for this user.<h2 class="h3">Incoming Reviews</h2>There are no incoming reviews for this account.',type:"",itemsPerPage:10,accountsUrl:"https://accounts.eclipse.org",newsroomUrl:"https://newsroom.eclipse.org/api",featuredContent:{},featuredContentType:""};function i(t,a){this.element=t,this.settings=e.extend({},s,a),this._defaults=s,this._name=r,this.init()}e.extend(i.prototype,{init:function(){"string"===e.type(this.settings.type)&&-1!==e.inArray(this.settings.type,["mpFavorites","gerritReviews","recentEvents","forumsMsg","gerritReviewCount","projectsList","errorReports","mailingListSubscription","newsItems","filteredEvents","featuredStory","featuredFooter","customFeaturedContent"])&&this[this.settings.type]()},errorReports:function(){var t,n=this,r=n.element,s=!1,i="Unable to retrieve account information required to process this request.",o="Authorization to retrieve error reports was denied.",l=n.settings.apiUrl+"/account/profile/"+n.settings.username,p={clientName:"aeriReports",apiUrl:"https://dev.eclipse.org",completeOnAuthorization:!1,username:n.settings.username,encodeStorage:!0},c="/recommenders/community/aeri/v2/api/v1/reporters/",d="/problems",u={path:"",method:"GET",cid:"aeri_reports",scope:"eclipse_aeri_view_own_report email openid",successCallback:"",errorCallback:function(e){switch(e.status){case 404:g("No submissions found.");break;default:g()}}};function g(t,a){"boolean"!=typeof a&&(a=!1),void 0===t&&(t=n.settings.errorMsg),a&&(t=n.settings.errorMsg+t);var r=e("<p></p>").append(t);e(n.element).append(r)}function h(r,s,i){!function(r,s){void 0===r&&(r=1);void 0===s&&(s=n.settings.itemsPerPage);u.path=c+t+d+"?page="+r+"&size="+s,u.successCallback=function(e){addReportRows(e)},e(a).eclipseFdnIgc.makeRequest(u)}(s,i)}e(a).on("igcAuthFailed",function(e,t){t.clientName===p.clientName&&(g(o),s=!0)}),e(r).eclipseFdnIgc(p),s||e.ajax({url:l,context:n.element}).done(function(l){void 0!==l.mail?(t=l.mail,s?g(o):(u.path=c+t+d+"?page=1&size="+n.settings.itemsPerPage,u.successCallback=function(t,a,s){!function(t){var a=e("<table></table>").attr({width:"100%",class:"table",id:"aeri-reports"}),n=e("<tr></tr>"),s=e("<th></th>");n.append(s.clone().text("Title").attr("width","50%")),n.append(s.clone().text("Status").attr({width:"10%",class:"text-center"})),n.append(s.clone().text("Resolution").attr({width:"10%",class:"text-center"})),n.append(s.clone().text("Reporters").attr({width:"10%",class:"text-center"})),n.append(s.clone().text("Your First Report").attr({width:"20%",class:"text-center"})),a.append(n);var i=e("<div></div>").attr({class:"table-responsive"});i.append(a),e(r).append(i),e.each(t,function(t,n){var r,s=e("<tr></tr>"),i=e("<td></td>"),o=e("<a></a>"),l=e("<ul></ul>"),p=e("<li></li>");o.attr("target","_blank"),e.each(n.links,function(e,t){"problem"===t.rel&&(r=o.clone().attr({href:t.href}).text(t.title)),"submission"===t.rel&&(t.title||(t.title="(No error message)"),l.append(p.clone().append(o.clone().attr({href:t.href}).html("<small>"+t.title+"</small>"))))}),s.append(i.clone().append(r).append(l).attr({class:"ellipsis white-space-normal",style:"max-width:200px;"})),s.append(i.clone().text(n.status).attr("class","text-center")),s.append(i.clone().text(n.resolution).attr("class","text-center"));var c=e("<span></span>").attr("class","badge");c.text(n.numberOfReporters),s.append(i.clone().append(c).attr("class","text-center"));var d=new Date(n.firstReported),u=d.getMonth()<10?"0"+d.getMonth():d.getMonth(),g=d.getDate()<10?"0"+d.getDate():d.getDate(),h=d.getFullYear()+"-"+u+"-"+g;s.append(i.clone().text(h).attr("class","text-center")),a.append(s)})}(t);var i=new n.linkHeaderParser(s.getResponseHeader("Link")),o=i.getLastPageNum();i.getPageSize()!==n.settings.itemsPerPage&&(n.settings.itemsPerPage=i.getPageSize()),e("#aeri-reports").on("fetchPageItemsEvent",h),e("#aeri-reports").data("postsPerPage",n.settings.itemsPerPage),e(r).append(n.getPaginationBar(o*n.settings.itemsPerPage,"aeri-reports"))},e(a).eclipseFdnIgc.makeRequest(u))):g(i,!0)}).fail(function(){g(i,!0)})},projectsList:function(){var t=this,a=this.settings.username,r=this.settings.apiUrl;if(!a&&!api_url)return!1;var s=r+"/account/profile/"+a+"/projects";e.ajax(s,{context:this.element,success:function(a){var r=Object.keys(a).length;if(r===n&&(r=0),e(this).children("strong").text(r+t.plurialString(" project",r)),!(t.settings.contentPlaceholder instanceof jQuery))return!1;var s=e(t.settings.contentPlaceholder),i=e("<a></a>");s.append(e("<h2></h2>").addClass("h3").text("Eclipse Projects")),s.append('<p>Projects are the organizational unit for open source development work at the Eclipse Foundation. Projects have developers (committers), source code repositories, build servers, downloads, and other resources. The Eclipse Foundation\'s open source projects are governed by the <a href="https://eclipse.org/projects/dev_process/">Eclipse Development Process</a>.</p>');var o="This user is";if(t.settings.currentUser===t.settings.username&&(o="You are"),0===r)return s.append('<div class="alert alert-warning" role="alert">'+o+" not involved in any Eclipse Projects.</div>"),!1;var l=e("<table></table>").attr({width:"100%",class:"table"}),p=e("<tr></tr>"),c=e("<th></th>"),d=e("<td></td>");p.append(c.clone().text("Project").attr("width","85%")),p.append(c.clone().text("Relation").attr({width:"15%",class:"text-center"})),l.append(p),e.each(a,function(a,n){var r=[],s="",o="";e.each(n,function(e,t){r.push(t.Relation.Description),s=t.ProjectName,o=t.ActiveDate,""!==t.url&&(s=i.clone().attr({href:t.url}).text(s))}),(p=e("<tr></tr>")).append(d.clone().html(s).append("<br/><small>Since: "+t.dateFormat(new Date(o))+"</small>")),p.append(d.clone().text(r.join(", ")).attr("class","text-center")),l.append(p)});var u=e("<div></div>").attr({class:"table-responsive"});u.append(l),s.append(u)},error:function(){e(this).html(t.settings.errorMsg)}})},forumsMsg:function(){var t=this,a=this.settings.username,r=this.settings.apiUrl;if(!a&&!api_url)return!1;var s=r+"/account/profile/"+a+"/forum?page=1&pagesize="+t.settings.itemsPerPage;function i(a){var n=e("#forum-posts");e.each(a.posts,function(r,s){var i={forum_id:s.thread_forum_id,forum_name:s.forum_name,forum_cat_id:s.forum_name,forum_cat_name:s.cat_name,root_subject:s.root_msg_subject,current_user_last_post_timestamp:s.msg_group_post_stamp,current_user_last_post_subject:s.last_user_msg_subject,thread_id:s.msg_thread_id,thread_reply_count:s.thread_replies,thread_views_count:s.thread_views,thread_last_post_date:s.thread_last_post_date,last_message_timestamp:s.last_msg_post_stamp,last_message_poster_id:s.last_msg_poster_id,last_message_poster_alias:s.last_poster_alias,last_message_last_view:s.read_last_view,current_user_id:a.id},o=e("<tr></tr>"),l=e("<td></td>"),p=e("<a></a>"),c=p.clone().attr({href:t.settings.forumsUrl+"/index.php/f/"+i.forum_id+"/"}).text(i.forum_name),d=p.clone().attr({href:t.settings.forumsUrl+"/index.php/i/"+i.forum_cat_id+"/"}).text(i.forum_cat_name),u=e("<small></small>").append("<br/>").append(d).append(" &gt; ").append(c).append(" &gt; ").append(i.root_subject).append("<br>Posted on "+t.dateFormat(new Date(parseInt(1e3*i.current_user_last_post_timestamp)))),g="fa fa-envelope-open-o";t.settings.currentUser===t.settings.username&&i.last_message_last_view<i.thread_last_post_date&&i.last_message_poster_id!==i.current_user_id&&(o.addClass("warning"),g="fa fa-envelope-o"),t.settings.currentUser===t.settings.username&&o.append(l.clone().html('<i class="'+g+'" aria-hidden="true"></i>').attr("class","text-center")),o.append(l.clone().html(p.clone().attr({href:t.settings.forumsUrl+"/index.php/t/"+i.thread_id+"/"}).text(i.current_user_last_post_subject)).append(u)),o.append(l.clone().text(i.thread_reply_count).attr("class","text-center")),o.append(l.clone().text(i.thread_views_count).attr("class","text-center"));var h=e("<small></small>").append(t.dateFormat(new Date(parseInt(1e3*i.last_message_timestamp)))).append("<br/> By: ").append(p.clone().attr({href:t.settings.forumsUrl+"/index.php/sp/"+i.last_message_poster_id+"/"}).text(i.last_message_poster_alias));o.append(l.clone().html(h).attr("class","text-center")),n.append(o)})}function o(n,s,o){!function(n,s){void 0===n&&(n=1);void 0===s&&(s=t.settings.itemsPerPage);var o=r+"/account/profile/"+a+"/forum?page="+n+"&pagesize="+s;e.ajax(o,{context:t.element,success:function(e){i(e)},error:function(){e(this).html(t.settings.errorMsg)}})}(s,o)}e.ajax(s,{context:this.element,success:function(a,r,s){var l=0;if(a.posted_msg_count!==n&&a.id!==n&&(l=a.posted_msg_count,e(this).attr({href:t.settings.forumsUrl+"/index.php/sp/"+a.id+"/"})),e(this).children("strong").text(l+t.plurialString(" topic",l)),!(t.settings.contentPlaceholder instanceof jQuery))return!1;var p=e(t.settings.contentPlaceholder),c=e("<a></a>");p.append(e("<h2></h2>").addClass("h3").text("Eclipse Forums")),p.append(e("<p></p>").append("The Eclipse forums are your way of communicating with the community of people developing and using Eclipse-based tools hosted at Eclipse.org. Please stick to technical issues - and remember, no confidential information - these are public forums!"));var d=c.clone().attr({href:t.settings.forumsUrl,class:"btn btn-primary btn-sm",style:"display:block"}).html('<i class="fa fa-angle-double-right" aria-hidden="true"></i> More');if(0===a.posts.length)return p.append('<div class="alert alert-warning" role="alert">This user does not have any activities on Eclipse Forums.</div>'),p.append(d),!1;var u=e("<table></table>").attr({width:"100%",class:"table",id:"forum-posts"}),g=e("<tr></tr>"),h=e("<th></th>");t.settings.currentUser===t.settings.username&&g.append(h.clone().attr("width","8%")),g.append(h.clone().text("Topics").attr("width","50%")),g.append(h.clone().text("Replies").attr({width:"8%",class:"text-center"})),g.append(h.clone().text("Views").attr({width:"8%",class:"text-center"})),g.append(h.clone().text("Last message").attr({class:"text-center"})),u.append(g);var f=e("<div></div>").attr({class:"table-responsive"});f.append(u),p.append(f),i(a);var m=new t.linkHeaderParser(s.getResponseHeader("Link")),v=m.getLastPageNum();m.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=m.getPageSize()),u.on("fetchPageItemsEvent",o),u.data("postsPerPage",t.settings.itemsPerPage),p.append(t.getPaginationBar(v*t.settings.itemsPerPage,"forum-posts"));var w=a.id;d.attr({href:t.settings.forumsUrl+"/index.php/sp/"+w+"/"}),p.append(d)},error:function(){e(this).html(t.settings.errorMsg)}})},mpFavorites:function(){var t=this,a=this.settings.username,n=this.settings.apiUrl;if(!a&&!api_url)return!1;if(t.settings.contentPlaceholder instanceof jQuery){var r=e(t.settings.contentPlaceholder),s=e("<a></a>").attr({href:t.settings.marketplaceUrl+"/user/"+a+"/favorites",class:"btn btn-primary btn-sm",style:"display:block"}).html('<i class="fa fa-angle-double-right" aria-hidden="true"></i> More');r.append(e("<h2></h2>").addClass("h3").text("Eclipse Marketplace Favorites")),r.append(e("<p></p>").append("Eclipse Marketplace is the source for Eclipse-based solutions, products and add-on features. Thousands of developers visit Marketplace on a monthly basis to find new and innovative solutions. Solution providers are encouraged to list their products on Marketplace to gain exposure to the Eclipse developer community."))}var i=n+"/marketplace/favorites?name="+a+"&page=1&pagesize="+t.settings.itemsPerPage;function o(a){var n=t.settings.marketplaceUrl+"/node/"+a+"/api/p";e.ajax(n,{context:t.element,success:function(a){var n=e("#mpfavorites-list");e("node",a).each(function(a,r){var s=e(r),i=s.find("shortdescription").text(),o=r.getAttribute("name"),l=s.find("changed").text(),p=s.find("owner").text(),c="Last Updated on "+t.dateFormat(new Date(parseInt(1e3*l)))+" by "+p,d=r.getAttribute("id"),u=e("#mp-listing-template").clone().removeClass("hidden").removeAttr("id"),g=e("<a></a>"),h=e("category",r),f=t.settings.marketplaceUrl+"/node/"+d,m=s.find("image").text(),v=g.clone().attr({href:f});h.each(function(e,t){var a=g.clone().attr({href:t.getAttribute("url")}).text(t.getAttribute("name"));h.length!==e+1&&a.append(", "),u.find(".content-categories").append(a)}),u.find(".listing-image").attr({href:f,style:"background:url('"+m+"') no-repeat center;"}),u.find(".drag").attr({href:t.settings.marketplaceUrl+"/marketplace-client-intro?mpc_install="+d}),u.find(".listing-title").html(v.clone().text(o)),u.find(".content-teaser").html(i),u.find(".content-last-updated").html(c),n.append(u)})},error:function(){e(this).html(t.settings.errorMsg)}})}function l(r,s,i){!function(r,s){void 0===r&&(r=1);void 0===s&&(s=t.settings.itemsPerPage);var i=n+"/marketplace/favorites?name="+a+"&page="+r+"&pagesize="+s;e.ajax(i,{context:t.element,success:function(t){var a=[];e.each(t.mpc_favorites,function(e,t){a.push(t.content_id)}),o(a.join())},error:function(){e(this).html(t.settings.errorMsg)}})}(s,i)}e.ajax(i,{context:this.element,success:function(a,n,i){if(e(this).children("strong").text(a.result.count+t.plurialString(" favorite",a.result.count)),void 0===r)return!1;var p=[];if(e.each(a.mpc_favorites,function(e,t){p.push(t.content_id)}),0===p.length)return r.append('<div class="alert alert-warning" role="alert">There are no marketplace favorites for this user.</div>'),r.append(s),!1;var c=new t.linkHeaderParser(i.getResponseHeader("Link")),d=c.getLastPageNum();c.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=c.getPageSize()),r.on("fetchPageItemsEvent",l),r.append('<h3 id="mpc_list_name">'+a.mpc_list_name+"</h3>"),r.append('<div class="row"><div class="col-md-17"><div class="form-item form-type-textfield form-disabled"><label>Favorites URL <a href="#" class="install-user-favorites" data-container="body" data-toggle="popover" data-placement="top" title="" data-original-title="How to install?"><i class="fa fa-question-circle" aria-hidden="true"></i></a> </label><input disabled="true" class="form-control form-text" type="text" value="http://marketplace.eclipse.org/user/'+t.settings.username+'/favorites" size="60" maxlength="128"></div></div><div class="col-md-7 margin-top-25 text-right"><div class="drag_installbutton drag_installbutton_v2 drag-install-favorites"><a href="http://marketplace.eclipse.org/user/'+t.settings.username+'/favorites" class="drag" title="How to install?"><span class="btn btn-default"><i class="fa fa-download orange"></i> Install Favorites</span><div class="tooltip tooltip-below-right"><h3>Drag to Install!</h3>Drag to your running Eclipse<sup>*</sup> workspace to install this favorite list. <br><sup>*</sup>Requires Eclipse Marketplace Client.</div></a></div></div></div>'),r.append('<div id="mpfavorites-list"></div>'),r.find("#mpfavorites-list").data("postsPerPage",t.settings.itemsPerPage),o(p.join()),r.append(t.getPaginationBar(d*t.settings.itemsPerPage,"mpfavorites-list")),r.append(s),e("a.install-user-favorites").on("click",function(e){e.preventDefault()}),e("a.install-user-favorites").popover({html:!0,content:function(){return e("<ol></ol>").addClass("padding-left-20").append("<li>Copy <strong>URL</strong> from textfield.</li>").append("<li>Open Eclipse Marketplace Client (MPC).</li>").append("<li>Open <strong>Favorites</strong> tab.</li>").append("<li>Click on <strong>Import Favorites list</strong>.</li>").append("<li>Paste <strong>URL</strong> in the textfield.</li>")}})},error:function(){e(this).html(t.settings.errorMsg)}})},gerritReviewCount:function(){var t=this,a=this.settings.username,n=this.settings.apiUrl+"/account/profile/"+a+"/gerrit";e.ajax(n,{context:this.element,success:function(a){var n=a.merged_changes_count;e(this).children("strong").text(n+t.plurialString(" review",n)),n>0&&e(this).attr({href:t.settings.gerritUrl+"/#/q/owner:"+t.settings.username})},error:function(){e(this).html(t.settings.errorMsg)}})},mailingListSubscription:function(){var t=this,a=t.settings.username,n=t.settings.currentUser,r=t.settings.currentUserUid,s=t.settings.userCanEditOwnMailingList,i=this.settings.apiUrl;if(!a&&!api_url)return!1;var o=t.element,l=i+"/account/profile/"+a+"/mailing-list";e.ajax(l,{context:this.element,success:function(t){var i=t.mailing_list_subscriptions,l=e("<p></p>"),p=e("<h2></h2>"),c=e("<a></a>"),d=e("<strong></strong>"),u="This user is";n===a&&(u="You are");var g=c.clone().attr({href:"/user/"+r+"/mailing-list",class:"fa fa-pencil","aria-hidden":"true"});if(e(o).append(p.text("Eclipse Mailing Lists ").append(g)),jQuery.isEmptyObject(i))e(o).append(l.clone().text(u+" not subscribed to any Eclipse mailing list."));else{e(o).append(l.clone().text("The Eclipse Mailing lists are another way for you to interact with your favorite Eclipse project.")),e(o).append(l.clone().text("Below is a list of the public mailing lists that "+u.toLowerCase()+" currently subscribed to at Eclipse.org. When posting emails to our mailing lists, please remember that these lists are public, avoid posting ").append(d.clone().text("personal")).append(" or ").append(d.clone().text("private information")).append(".")),e(o).append(l.clone().text("If you are having trouble using our mailing lists, please contact ").append(c.clone().attr("href","mailto:mailman@eclipse.org").text("mailman@eclipse.org")).append("."));var h=e("<table></table>").attr({width:"100%",class:"table",id:"aeri-reports"}),f=e("<tr></tr>"),m=e("<th></th>");f.append(m.clone().text("Mailing List").attr("width","30%")),f.append(m.clone().text("Description").attr("width","70%")),h.append(f);var v=e("<div></div>").attr({class:"table-responsive"});v.append(h),e(o).append(v),e(o).append(l),e.each(i,function(t,a){var n=e("<tr></tr>"),r=e("<td></td>");n.append(r.clone().append(c.clone().attr("href","/mailing-list/"+a.list_name).text(a.list_name))),n.append(r.clone().append(a.list_description)),h.append(n)})}n===a&&s&&e(o).append(l.clone().append(c.clone().attr({href:"/user/"+r+"/mailing-list",class:"btn btn-primary btn-xs"}).text("Manage your Mailing Lists")))},error:function(){e(this).html(t.settings.errorMsg)}})},gerritReviews:function(){var t=this,a=this.settings.gerritUrl+"/changes/?q=owner:"+this.settings.username+"+status:open&q=reviewer:"+this.settings.username+"+status:open+-owner:"+this.settings.username+"&pp=0";e(this.element).append(e("<h2>Eclipse Gerrit</h2>").addClass("h3")),e(this.element).append("<p>Gerrit is a web based code review system, facilitating online code reviews for projects using the Git version control system.</p>"),function(a){var n=[["gerrit-outgoing",[]],["gerrit-incoming",[]]];e(t.element).on("drawTableEvent",function(){e.each(n,function(a,n){var r="";switch(n[0]){case"gerrit-outgoing":r="Outgoing Reviews";break;case"gerrit-incoming":r="Incoming Reviews"}var s=e("<h4></h4>").addClass("h4").text(r);e(t.element).append(s),0!==n[1].length?(e(t.element).append(function(a,n){var r=e("<table></table>").attr({width:"100%",class:"table",id:a}),s=e("<tr></tr>"),i=e("<th></th>"),o=e("<td></td>");s.append(i.clone().text("Subject").attr("width","70%")),s.append(i.clone().text("Status").attr({width:"18%",class:"text-center"})),s.append(i.clone().text("Updated").attr({width:"12%",class:"text-center"})),r.append(s);var l=e("<a></a>");e.each(n,function(a,n){s=e("<tr></tr>");var i="";!1===n.mergeable&&(i="Merge Conflict",s.addClass("warning"));var p=n.updated.substring(0,n.updated.indexOf(" "));s.append(o.clone().html(l.clone().attr({href:t.settings.gerritUrl+"/"+n._number}).text(n.subject)).append("<br/>"+n.project)),s.append(o.clone().text(i).attr("class","text-center")),s.append(o.clone().text(p).attr("class","text-center")),r.append(s)});var p=e("<div></div>").attr({class:"table-responsive"});return p.append(r),p}(n[0],n[1])),e(t.element).append(t.getPaginationBar(n[1].length,n[0]))):e(t.element).append('<div class="alert alert-warning" role="alert">There are no '+r.toLowerCase()+" for this user.</div>")});var a=e("<a></a>").attr({href:t.settings.gerritUrl+"/#/q/owner:"+t.settings.username,class:"btn btn-primary btn-sm",style:"display:block"}).html('<i class="fa fa-angle-double-right" aria-hidden="true"></i> More');e(t.element).append(a)}),function a(r,s,i){s=void 0!==s?s:100;i=void 0!==i?i:0;r+="&start="+i+"&n="+s;return e.ajax(r,{dataType:"gerrit_XSSI",context:t.element,converters:{"text gerrit_XSSI":function(e){var t=e.substring(e.indexOf("\n")+1);return jQuery.parseJSON(t)}},success:function(o){var l=Object,p=Object;0!==o[0].length&&(e.merge(n[0][1],o[0]),l=o[0][o[0].length-1]),0!==o[1].length&&(e.merge(n[1][1],o[1]),p=o[1][o[1].length-1]),"_more_changes"in l&&!0===l._more_changes||"_more_changes"in p&&!0===p._more_changes?a(r,s,i+s):e(t.element).trigger("drawTableEvent")},error:function(a){400===a.status?e(this).html(t.settings.gerritUserNotFoundMsg):e(this).html(t.settings.errorMsg),!0}})}(a,100,0)}(a)},recentEvents:function(){var t=this;function a(e,t){return e.dateTime-t.dateTime}e.ajax(this.settings.eventUrl,{context:this.element,success:function(n){var r=new Date,s=[];for(var i in n.events)n.events[i].dateTime=new Date(n.events[i].date),n.events[i].dateTime>=r&&s.push(n.events[i]);s.sort(a);var o=e("<ul></ul>").attr({class:"nav",style:"margin:0"});for(var l in s.slice(0,5)){var p=s[l].dateTime,c=t.dateFormat(p),d=e("<a>").attr({href:s[l].infoLink}).html(s[l].title+"<br/><small>"+c+"</small>"),u=e("<li></li>").append(d);o.append(u)}e(this).children(".loading").remove(),e(this).append(o);var g=e("<a>").attr({href:"http://events.eclipse.org",class:"btn btn-simple btn-sm"}).text("more");e(this).append(g)},error:function(){e(this).html(t.settings.errorMsg)}})},plurialString:function(e,t){return t>1&&(e+="s"),e},dateFormat:function(e){var t=e.getFullYear(),a=["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()];return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+", "+a+" "+e.getDate()+", "+t+" - "+("0"+e.getHours()).slice(-2)+":"+("0"+e.getMinutes()).slice(-2)},linkHeaderParser:function(e){var t=this;if(this.links=0,this.getLastPageNum=function(){return void 0===t.links.last?0:o(t.links.last,"page")},this.getPageSize=function(){if(void 0===t.links.first)return 0;var e=o(t.links.first,"pagesize");return 0===e?o(t.links.first,"size"):e},null!=e){for(var a=e.split(","),n={},r=0;r<a.length;r++){a[r]=a[r].replace("&amp;","&");var s=a[r].split(";");if(!(s.length<2)){var i=s[0].replace(/<(.*)>/,"$1").trim();n[s[1].replace(/rel="(.*)"/,"$1").trim()]=i}}this.links=n}function o(e,t){if(void 0===t||void 0===e)return 0;for(var a=e.substr(e.lastIndexOf("?")+1).split("&"),n=0;n<a.length;n++){var r=a[n].split("=");if(decodeURIComponent(r[0])===t)return decodeURIComponent(r[1])}return 0}},getPaginationBar:function(t,a){var n=this;if(void 0===t&&(t=1),!(t<=0||t<=n.settings.itemsPerPage)){var r=e("<nav></nav>").attr({"arial-label":"Page navigation",id:a+"-pager"}).addClass("text-center"),s=Math.ceil(t/n.settings.itemsPerPage),i=o(s,1,a);return r.append(i),void 0===e("#"+a).data("pageCache")&&function(){var t,r=e("#"+a),i=[];switch(a){case"gerrit-incoming":case"gerrit-outgoing":t="gerrit",i=o(r.find("tr"));break;case"mpfavorites-list":t="mpfav";break;case"forum-posts":case"aeri-reports":t="table",i=o(r.find("tr"));break;case"news-container":t="news";break;case"events-container":t="events";break;default:t="generic"}switch(r.data("pageCache",i),r.data("pageCacheType",t),r.data("pageCacheTotalPages",s),r.on("changePageEvent",p),t){case"gerrit":r.trigger("changePageEvent",[1])}function o(a){var r=0,s=0,i=[],o=[];switch(t){case"gerrit":case"table":o[0]=a[0]}return e.each(a,function(t,a){if(e(a).children().first().is("th"))return!0;r===n.settings.itemsPerPage&&(r=0,o[++s]=i,i=[]),i[r++]=a}),i.length>0&&(o[++s]=i),o}}(),r}function o(t,a,n){var r=e("<li></li>"),s=e("<ul></ul>").addClass("pagination");void 0!==n&&s.attr({"data-eclipseFdnApi-elementID":n});var i,o=!1,p="",c=1,d=t,u=function(){var t=e(this),a=t.attr("data-goto-page"),n=t.parents(".pagination").eq(0).data("eclipsefdnapiElementid");e("#"+n).trigger("changePageEvent",[a])};if(t>9){c=t-8,a<=5?(d=9,c=1):a<=t-4&&(c=a-4,d=a+4),o=!0;var g=e("<span></span>");p=r.clone().append(g.clone().html("...").attr({"aria-hidden":"true"})).addClass("pager-ellipses disabled")}for(1!==a&&(s.append(r.clone().addClass("pager-first").html(l("First","first page",1,"<< first").on("click",u))),s.append(r.clone().html(l("Previous","previous page",a-1,"< previous").on("click",u))),!0===o&&c>1&&s.append(p.clone())),i=c;i<=d;i++){var h=r.clone(),f=l("Page "+parseInt(i),"page "+parseInt(i),i).on("click",u);a===i&&h.addClass("active"),h.html(f),s.append(h)}return a<t&&(!0===o&&d<t&&s.append(p.clone()),s.append(r.clone().html(l("Next","next page",a+1,"next >").on("click",u))),s.append(r.clone().addClass("pager-last").html(l("Last","last page",t,"last >>").on("click",u)))),s}function l(t,a,n,r){return void 0===r&&(r=parseInt(n)),e("<a></a>").attr({"aria-label":t,href:"#",onclick:"return false;",title:"Go to "+a,"data-goto-page":parseInt(n)}).text(r)}function p(t,a){var n=e(t.currentTarget),r=n.data("pageCacheType"),s=n.data("pageCache"),i=n.attr("id"),l=e("#"+i+"-pager"),p=l.data("currentPage");switch(null==p&&(p=1),void 0===a&&(a=1),a=parseInt(a),r){case"gerrit":d();break;default:!function(){if(void 0===s[p]){var t=[];s[p]=[],n.is("table")?t=n.find("tr"):n.is("div")&&(t=n.find(".node,.item")),e.each(t,function(t,a){if(e(a).children().first().is("th"))return!0;s[p].push(a)}),n.data("pageCache",s)}}(),d()}if(p!==a){var c=o(n.data("pageCacheTotalPages"),a,i);l.find("ul").replaceWith(c),l.data("currentPage",a)}function d(){if(n.empty(),void 0===s[a]){var t=[];switch(r){case"mpfav":case"table":case"news":case"events":t.push(a),t.push(n.data("postsPerPage"))}return n.is("table")&&n.append(s[0]),void n.trigger("fetchPageItemsEvent",t)}n.is("table")&&n.append(s[0]),e.each(s[a],function(e,t){n.append(t)})}}},newsItems:function(){var t=this,a=e(e(this)[0].element),r=a.find("> div.news-container");function s(r,s,i){var o=e(r),l=o.parent(),c=l.data("news-count")||i||5,d="?page="+s;d+="&pagesize="+c,d+=p(l,"publish-target","publish_to","eclipse_org"),d+=p(l,"news-type","news_type","");var u=t.settings.newsroomUrl+"/news"+d;e.ajax(u,{success:function(a,r,s){var i=a.news;i.length>c&&(i=i.slice(0,c));for(var p=0;p<i.length;p++)i[p].date=t.dateFormat(new Date(i[p].date));var d=function(t){var a=e("#"+t);if(a!==n&&0!==a.length)return a[0].innerHTML;return'{{#news}}<div class="item block-summary-item match-height-item"><p>{{ date }}</p><h4><a href="{{ link }}">{{ title }}</a></h4><p>{{ body }}</p></div>{{/news}}'}(l.data("template-id")||"template-news-items"),u=Mustache.render(d,{news:i});if(o.html(u),!0===l.data("pagination")&&0===l.find("nav").length){var g=new t.linkHeaderParser(s.getResponseHeader("Link")),h=g.getLastPageNum();g.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=g.getPageSize()),l.append(t.getPaginationBar(h*t.settings.itemsPerPage,o.attr("id")))}l.trigger("shown.ef.news")},error:function(){a.empty();var t=e("<div></div>");t.attr("class","alert alert-warning"),t.text("Unable to load news content currently."),a.append(t)}})}0===r.length&&((r=e("<div></div>")).attr({class:"news-container",id:"news-container"}),a.append(r)),!0===a.data("pagination")&&r.on("fetchPageItemsEvent",function(e,t,a){s(e.target,t,a)}),s(r,1,5)},filteredEvents:function(){var t=this,a=e(e(this)[0].element),r=a.find("> div.events-container");function s(r,s,i){var o=e(r),l=o.parent(),c=l.data("count")||i||5,d="?page="+s;d+="&pagesize="+c,d+=p(l,"publish-target","publish_to",n),d+=p(l,"type","type",n),d+=p(l,"upcoming","upcoming_only",n);var u=1===l.data("upcoming"),g=l.data("sort-order")||(u?"ASC":n),h=l.data("sort-field")||(u?"field_event_date":n);g&&h&&(d+="&options%5Borderby%5D%5B"+h+"%5D="+g);var f=t.settings.newsroomUrl+"/events"+d;e.ajax(f,{success:function(a,r,s){var i=a.events;i.length>c&&(i=i.slice(0,c));for(var p=0;p<i.length;p++)(Date.now()>new Date(i[p]["end-date"])||!i[p].registration)&&delete i[p].registration,i[p].infoLink||delete i[p].infoLink,i[p].date=t.dateFormat(new Date(i[p].date)),i[p]["end-date"]=t.dateFormat(new Date(i[p]["end-date"]));var d=function(t,a){var r=e("#"+t);if(r!==n&&0!==r.length)return r[0].innerHTML;if(a)return'{{#events}}<div class="item block-summary-item match-height-item"><h3 class="h4">{{ title }}</h3><p>{{ locationName }}</p><p>{{ date }} - {{ end-date }}</p><p class="margin-bottom-0">{{#registration}}<a class="btn btn-secondary" href="{{ registration }}">Register Now</a>{{/registration}}{{#infoLink}}<a class="btn btn-secondary" href="{{ infoLink }}">More information</a>{{/infoLink}}</p></div>{{/events}}';return'{{#events}}<div class="col-sm-12 col-md-6 event item match-height-item-by-row flex-column"><h3 class="h4 flex-grow">{{ title }}</h3><p>{{ locationName }}</p><p class="flex-grow">{{ date }} - {{ end-date }}</p><p class="margin-bottom-0">{{#infoLink}}<a class="btn btn-secondary" href="{{ infoLink }}">More information</a>{{/infoLink}}{{^infoLink}}{{#registration}}<a class="btn btn-secondary" href="{{ registration }}">Register Now</a>{{/registration}}{{/infoLink}}</p></div>{{/events}}'}(l.data("template-id")||"template-event-items",l.data("archive")||!1),u=Mustache.render(d,{events:i});if(o.html(u),!0===l.data("pagination")&&0===l.find("nav").length){var g=new t.linkHeaderParser(s.getResponseHeader("Link")),h=g.getLastPageNum();g.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=g.getPageSize()),l.append(t.getPaginationBar(h*t.settings.itemsPerPage,o.attr("id")))}l.trigger("shown.ef.events")},error:function(){a.empty();var t=e("<div></div>");t.attr("class","alert alert-warning"),t.text("Unable to load events content currently."),a.append(t)}})}0===r.length&&((r=e("<div></div>")).attr({class:"events-container",id:"events-container"}),a.append(r)),!0===a.data("pagination")&&r.on("fetchPageItemsEvent",function(e,t,a){s(e.target,t,a)}),s(r,1,5)},featuredStory:function(){var t=e(e(this)[0].element);o(t,"story",this.settings)},featuredFooter:function(){var t=e(e(this)[0].element);o(t,"footer",this.settings)},customFeaturedContent:function(){var t=e(e(this)[0].element);l(this.settings.featuredContent,t,this.settings.featuredContentType)}}),e.fn[r]=function(t){return this.each(function(){e.data(this,"plugin_"+r)||e.data(this,"plugin_"+r,new i(this,t))})};var o=function(t,a,r){var s=e(t),i=r.newsroomUrl+"/featured_story",o=s.data("id");o!==n&&(i+="/"+o),i+=p(s,"publish-target","publish_to",n,!0),e.ajax(i,{success:function(e){e.featured_story===n&&console.log("Could not load featured content, bad content recieved");var t=e.featured_story.filter(function(e){return new Date(e["end-date"])>new Date&&(e["start-date"]===n||new Date(e["start-date"])<new Date)});t.length>1&&d(t),t.length>0&&l(t[0],s,a)},error:function(){console.log("Could not load featured content!")}})},l=function(e,t,a){var n=t.find(".featured-container");t.addClass("featured-story-nid-"+e.id),t.addClass("featured-story-"+e.layout);var r=t.data("template-id")||"template-featured-"+a,s=c(r,'{{#content}}<h2 class="margin-top-30">{{ title }}</h2><p>{{ body }}</p><ul class="list-inline">{{#links}}<li><a class="btn btn-primary" href="{{ url }}">{{ title }}</a></li>{{/links}}</ul>{{/content}}'),i=Mustache.render(s,{content:e});n.html(i)},p=function(e,t,a,r,s){var i=e.data(t)||r,o="";if(Array.isArray(i))for(var l=0;l<i.length;l++)o+=s&&0===l?"?":"&",o+="parameters%5B"+a+"%5D%5B%5D="+i[l];else i!==n&&(o+=s?"?":"&",o+="parameters%5B"+a+"%5D="+i);return o},c=function(t,a){var r=e("#"+t);return r!==n&&0!==r.length?r[0].innerHTML:a},d=function(e){for(var t=e.length-1;t>0;t--){var a=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[a],e[a]=n}}}(jQuery,window,document),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Mustache=t()}(this,function(){"use strict";var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function a(e){return"function"==typeof e}function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(e,t){return null!=e&&"object"==typeof e&&t in e}var s=RegExp.prototype.test;var i=/\S/;function o(e){return!function(e,t){return s.call(e,t)}(i,e)}var l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};var p=/\s*/,c=/\s+/,d=/\s*=/,u=/\s*\}/,g=/#|\^|\/|>|\{|&|=|!/;function h(e){this.string=e,this.tail=e,this.pos=0}function f(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function m(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}h.prototype.eos=function(){return""===this.tail},h.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var a=t[0];return this.tail=this.tail.substring(a.length),this.pos+=a.length,a},h.prototype.scanUntil=function(e){var t,a=this.tail.search(e);switch(a){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,a),this.tail=this.tail.substring(a)}return this.pos+=t.length,t},f.prototype.push=function(e){return new f(e,this)},f.prototype.lookup=function(e){var t,n,s,i=this.cache;if(i.hasOwnProperty(e))t=i[e];else{for(var o,l,p,c=this,d=!1;c;){if(e.indexOf(".")>0)for(o=c.view,l=e.split("."),p=0;null!=o&&p<l.length;)p===l.length-1&&(d=r(o,l[p])||(n=o,s=l[p],null!=n&&"object"!=typeof n&&n.hasOwnProperty&&n.hasOwnProperty(s))),o=o[l[p++]];else o=c.view[e],d=r(c.view,e);if(d){t=o;break}c=c.parent}i[e]=t}return a(t)&&(t=t.call(this.view)),t},m.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},m.prototype.parse=function(e,a){var r=this.templateCache,s=e+":"+(a||v.tags).join(":"),i=void 0!==r,l=i?r.get(s):void 0;return null==l&&(l=function(e,a){if(!e)return[];var r,s,i,l=!1,f=[],m=[],w=[],b=!1,_=!1,x="",y=0;function P(){if(b&&!_)for(;w.length;)delete m[w.pop()];else w=[];b=!1,_=!1}function k(e){if("string"==typeof e&&(e=e.split(c,2)),!t(e)||2!==e.length)throw new Error("Invalid tags: "+e);r=new RegExp(n(e[0])+"\\s*"),s=new RegExp("\\s*"+n(e[1])),i=new RegExp("\\s*"+n("}"+e[1]))}k(a||v.tags);for(var C,U,j,M,E,T,S=new h(e);!S.eos();){if(C=S.pos,j=S.scanUntil(r))for(var L=0,R=j.length;L<R;++L)o(M=j.charAt(L))?(w.push(m.length),x+=M):(_=!0,l=!0,x+=" "),m.push(["text",M,C,C+1]),C+=1,"\n"===M&&(P(),x="",y=0,l=!1);if(!S.scan(r))break;if(b=!0,U=S.scan(g)||"name",S.scan(p),"="===U?(j=S.scanUntil(d),S.scan(d),S.scanUntil(s)):"{"===U?(j=S.scanUntil(i),S.scan(u),S.scanUntil(s),U="&"):j=S.scanUntil(s),!S.scan(s))throw new Error("Unclosed tag at "+S.pos);if(E=">"==U?[U,j,C,S.pos,x,y,l]:[U,j,C,S.pos],y++,m.push(E),"#"===U||"^"===U)f.push(E);else if("/"===U){if(!(T=f.pop()))throw new Error('Unopened section "'+j+'" at '+C);if(T[1]!==j)throw new Error('Unclosed section "'+T[1]+'" at '+C)}else"name"===U||"{"===U||"&"===U?_=!0:"="===U&&k(j)}if(P(),T=f.pop())throw new Error('Unclosed section "'+T[1]+'" at '+S.pos);return function(e){for(var t,a=[],n=a,r=[],s=0,i=e.length;s<i;++s)switch((t=e[s])[0]){case"#":case"^":n.push(t),r.push(t),n=t[4]=[];break;case"/":r.pop()[5]=t[2],n=r.length>0?r[r.length-1][4]:a;break;default:n.push(t)}return a}(function(e){for(var t,a,n=[],r=0,s=e.length;r<s;++r)(t=e[r])&&("text"===t[0]&&a&&"text"===a[0]?(a[1]+=t[1],a[3]=t[3]):(n.push(t),a=t));return n}(m))}(e,a),i&&r.set(s,l)),l},m.prototype.render=function(e,t,a,n){var r=this.parse(e,n),s=t instanceof f?t:new f(t,void 0);return this.renderTokens(r,s,a,e,n)},m.prototype.renderTokens=function(e,t,a,n,r){for(var s,i,o,l="",p=0,c=e.length;p<c;++p)o=void 0,"#"===(i=(s=e[p])[0])?o=this.renderSection(s,t,a,n):"^"===i?o=this.renderInverted(s,t,a,n):">"===i?o=this.renderPartial(s,t,a,r):"&"===i?o=this.unescapedValue(s,t):"name"===i?o=this.escapedValue(s,t):"text"===i&&(o=this.rawValue(s)),void 0!==o&&(l+=o);return l},m.prototype.renderSection=function(e,n,r,s){var i=this,o="",l=n.lookup(e[1]);if(l){if(t(l))for(var p=0,c=l.length;p<c;++p)o+=this.renderTokens(e[4],n.push(l[p]),r,s);else if("object"==typeof l||"string"==typeof l||"number"==typeof l)o+=this.renderTokens(e[4],n.push(l),r,s);else if(a(l)){if("string"!=typeof s)throw new Error("Cannot use higher-order sections without the original template");null!=(l=l.call(n.view,s.slice(e[3],e[5]),function(e){return i.render(e,n,r)}))&&(o+=l)}else o+=this.renderTokens(e[4],n,r,s);return o}},m.prototype.renderInverted=function(e,a,n,r){var s=a.lookup(e[1]);if(!s||t(s)&&0===s.length)return this.renderTokens(e[4],a,n,r)},m.prototype.indentPartial=function(e,t,a){for(var n=t.replace(/[^ \t]/g,""),r=e.split("\n"),s=0;s<r.length;s++)r[s].length&&(s>0||!a)&&(r[s]=n+r[s]);return r.join("\n")},m.prototype.renderPartial=function(e,t,n,r){if(n){var s=a(n)?n(e[1]):n[e[1]];if(null!=s){var i=e[6],o=e[5],l=e[4],p=s;return 0==o&&l&&(p=this.indentPartial(s,l,i)),this.renderTokens(this.parse(p,r),t,n,p,r)}}},m.prototype.unescapedValue=function(e,t){var a=t.lookup(e[1]);if(null!=a)return a},m.prototype.escapedValue=function(e,t){var a=t.lookup(e[1]);if(null!=a)return v.escape(a)},m.prototype.rawValue=function(e){return e[1]};var v={name:"mustache.js",version:"4.0.1",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){w.templateCache=e},get templateCache(){return w.templateCache}},w=new m;return v.clearCache=function(){return w.clearCache()},v.parse=function(e,t){return w.parse(e,t)},v.render=function(e,a,n,r){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+(t(s=e)?"array":typeof s)+'" was given as the first argument for mustache#render(template, view, partials)');var s;return w.render(e,a,n,r)},v.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return l[e]})},v.Scanner=h,v.Context=f,v.Writer=m,v});
!function(e,t,a,n){"use strict";var r="eclipseFdnApi",s={apiUrl:"https://api.eclipse.org",gerritUrl:"https://git.eclipse.org/r",eventUrl:"https://newsroom.eclipse.org/api/events",forumsUrl:"https://www.eclipse.org/forums",marketplaceUrl:"https://marketplace.eclipse.org",username:"cguindon",currentUser:"",contentPlaceholder:null,errorMsg:'<i class="fa red fa-exclamation-triangle" aria-hidden="true"></i> An unexpected error has occurred.',gerritUserNotFoundMsg:'<h2 class="h3">Outgoing Reviews</h2>There are no outgoing reviews for this user.<h2 class="h3">Incoming Reviews</h2>There are no incoming reviews for this account.',type:"",itemsPerPage:10,accountsUrl:"https://accounts.eclipse.org",newsroomUrl:"https://newsroom.eclipse.org/api",featuredContent:{},featuredContentType:""};function i(t,a){this.element=t,this.settings=e.extend({},s,a),this._defaults=s,this._name=r,this.init()}e.extend(i.prototype,{init:function(){"string"===e.type(this.settings.type)&&-1!==e.inArray(this.settings.type,["mpFavorites","gerritReviews","recentEvents","forumsMsg","gerritReviewCount","projectsList","errorReports","mailingListSubscription","newsItems","filteredEvents","featuredStory","featuredFooter","customFeaturedContent"])&&this[this.settings.type]()},errorReports:function(){var t,n=this,r=n.element,s=!1,i="Unable to retrieve account information required to process this request.",o="Authorization to retrieve error reports was denied.",l=n.settings.apiUrl+"/account/profile/"+n.settings.username,p={clientName:"aeriReports",apiUrl:"https://dev.eclipse.org",completeOnAuthorization:!1,username:n.settings.username,encodeStorage:!0},c="/recommenders/community/aeri/v2/api/v1/reporters/",d="/problems",u={path:"",method:"GET",cid:"aeri_reports",scope:"eclipse_aeri_view_own_report email openid",successCallback:"",errorCallback:function(e){switch(e.status){case 404:g("No submissions found.");break;default:g()}}};function g(t,a){"boolean"!=typeof a&&(a=!1),void 0===t&&(t=n.settings.errorMsg),a&&(t=n.settings.errorMsg+t);var r=e("<p></p>").append(t);e(n.element).append(r)}function h(r,s,i){!function(r,s){void 0===r&&(r=1);void 0===s&&(s=n.settings.itemsPerPage);u.path=c+t+d+"?page="+r+"&size="+s,u.successCallback=function(e){addReportRows(e)},e(a).eclipseFdnIgc.makeRequest(u)}(s,i)}e(a).on("igcAuthFailed",function(e,t){t.clientName===p.clientName&&(g(o),s=!0)}),e(r).eclipseFdnIgc(p),s||e.ajax({url:l,context:n.element}).done(function(l){void 0!==l.mail?(t=l.mail,s?g(o):(u.path=c+t+d+"?page=1&size="+n.settings.itemsPerPage,u.successCallback=function(t,a,s){!function(t){var a=e("<table></table>").attr({width:"100%",class:"table",id:"aeri-reports"}),n=e("<tr></tr>"),s=e("<th></th>");n.append(s.clone().text("Title").attr("width","50%")),n.append(s.clone().text("Status").attr({width:"10%",class:"text-center"})),n.append(s.clone().text("Resolution").attr({width:"10%",class:"text-center"})),n.append(s.clone().text("Reporters").attr({width:"10%",class:"text-center"})),n.append(s.clone().text("Your First Report").attr({width:"20%",class:"text-center"})),a.append(n);var i=e("<div></div>").attr({class:"table-responsive"});i.append(a),e(r).append(i),e.each(t,function(t,n){var r,s=e("<tr></tr>"),i=e("<td></td>"),o=e("<a></a>"),l=e("<ul></ul>"),p=e("<li></li>");o.attr("target","_blank"),e.each(n.links,function(e,t){"problem"===t.rel&&(r=o.clone().attr({href:t.href}).text(t.title)),"submission"===t.rel&&(t.title||(t.title="(No error message)"),l.append(p.clone().append(o.clone().attr({href:t.href}).html("<small>"+t.title+"</small>"))))}),s.append(i.clone().append(r).append(l).attr({class:"ellipsis white-space-normal",style:"max-width:200px;"})),s.append(i.clone().text(n.status).attr("class","text-center")),s.append(i.clone().text(n.resolution).attr("class","text-center"));var c=e("<span></span>").attr("class","badge");c.text(n.numberOfReporters),s.append(i.clone().append(c).attr("class","text-center"));var d=new Date(n.firstReported),u=d.getMonth()<10?"0"+d.getMonth():d.getMonth(),g=d.getDate()<10?"0"+d.getDate():d.getDate(),h=d.getFullYear()+"-"+u+"-"+g;s.append(i.clone().text(h).attr("class","text-center")),a.append(s)})}(t);var i=new n.linkHeaderParser(s.getResponseHeader("Link")),o=i.getLastPageNum();i.getPageSize()!==n.settings.itemsPerPage&&(n.settings.itemsPerPage=i.getPageSize()),e("#aeri-reports").on("fetchPageItemsEvent",h),e("#aeri-reports").data("postsPerPage",n.settings.itemsPerPage),e(r).append(n.getPaginationBar(o*n.settings.itemsPerPage,"aeri-reports"))},e(a).eclipseFdnIgc.makeRequest(u))):g(i,!0)}).fail(function(){g(i,!0)})},projectsList:function(){var t=this,a=this.settings.username,r=this.settings.apiUrl;if(!a&&!api_url)return!1;var s=r+"/account/profile/"+a+"/projects";e.ajax(s,{context:this.element,success:function(a){var r=Object.keys(a).length;if(r===n&&(r=0),e(this).children("strong").text(r+t.plurialString(" project",r)),!(t.settings.contentPlaceholder instanceof jQuery))return!1;var s=e(t.settings.contentPlaceholder),i=e("<a></a>");s.append(e("<h2></h2>").addClass("h3").text("Eclipse Projects")),s.append('<p>Projects are the organizational unit for open source development work at the Eclipse Foundation. Projects have developers (committers), source code repositories, build servers, downloads, and other resources. The Eclipse Foundation\'s open source projects are governed by the <a href="https://eclipse.org/projects/dev_process/">Eclipse Development Process</a>.</p>');var o="This user is";if(t.settings.currentUser===t.settings.username&&(o="You are"),0===r)return s.append('<div class="alert alert-warning" role="alert">'+o+" not involved in any Eclipse Projects.</div>"),!1;var l=e("<table></table>").attr({width:"100%",class:"table"}),p=e("<tr></tr>"),c=e("<th></th>"),d=e("<td></td>");p.append(c.clone().text("Project").attr("width","85%")),p.append(c.clone().text("Relation").attr({width:"15%",class:"text-center"})),l.append(p),e.each(a,function(a,n){var r=[],s="",o="";e.each(n,function(e,t){r.push(t.Relation.Description),s=t.ProjectName,o=t.ActiveDate,""!==t.url&&(s=i.clone().attr({href:t.url}).text(s))}),(p=e("<tr></tr>")).append(d.clone().html(s).append("<br/><small>Since: "+t.dateFormat(new Date(o))+"</small>")),p.append(d.clone().text(r.join(", ")).attr("class","text-center")),l.append(p)});var u=e("<div></div>").attr({class:"table-responsive"});u.append(l),s.append(u)},error:function(){e(this).html(t.settings.errorMsg)}})},forumsMsg:function(){var t=this,a=this.settings.username,r=this.settings.apiUrl;if(!a&&!api_url)return!1;var s=r+"/account/profile/"+a+"/forum?page=1&pagesize="+t.settings.itemsPerPage;function i(a){var n=e("#forum-posts");e.each(a.posts,function(r,s){var i={forum_id:s.thread_forum_id,forum_name:s.forum_name,forum_cat_id:s.forum_name,forum_cat_name:s.cat_name,root_subject:s.root_msg_subject,current_user_last_post_timestamp:s.msg_group_post_stamp,current_user_last_post_subject:s.last_user_msg_subject,thread_id:s.msg_thread_id,thread_reply_count:s.thread_replies,thread_views_count:s.thread_views,thread_last_post_date:s.thread_last_post_date,last_message_timestamp:s.last_msg_post_stamp,last_message_poster_id:s.last_msg_poster_id,last_message_poster_alias:s.last_poster_alias,last_message_last_view:s.read_last_view,current_user_id:a.id},o=e("<tr></tr>"),l=e("<td></td>"),p=e("<a></a>"),c=p.clone().attr({href:t.settings.forumsUrl+"/index.php/f/"+i.forum_id+"/"}).text(i.forum_name),d=p.clone().attr({href:t.settings.forumsUrl+"/index.php/i/"+i.forum_cat_id+"/"}).text(i.forum_cat_name),u=e("<small></small>").append("<br/>").append(d).append(" &gt; ").append(c).append(" &gt; ").append(i.root_subject).append("<br>Posted on "+t.dateFormat(new Date(parseInt(1e3*i.current_user_last_post_timestamp)))),g="fa fa-envelope-open-o";t.settings.currentUser===t.settings.username&&i.last_message_last_view<i.thread_last_post_date&&i.last_message_poster_id!==i.current_user_id&&(o.addClass("warning"),g="fa fa-envelope-o"),t.settings.currentUser===t.settings.username&&o.append(l.clone().html('<i class="'+g+'" aria-hidden="true"></i>').attr("class","text-center")),o.append(l.clone().html(p.clone().attr({href:t.settings.forumsUrl+"/index.php/t/"+i.thread_id+"/"}).text(i.current_user_last_post_subject)).append(u)),o.append(l.clone().text(i.thread_reply_count).attr("class","text-center")),o.append(l.clone().text(i.thread_views_count).attr("class","text-center"));var h=e("<small></small>").append(t.dateFormat(new Date(parseInt(1e3*i.last_message_timestamp)))).append("<br/> By: ").append(p.clone().attr({href:t.settings.forumsUrl+"/index.php/sp/"+i.last_message_poster_id+"/"}).text(i.last_message_poster_alias));o.append(l.clone().html(h).attr("class","text-center")),n.append(o)})}function o(n,s,o){!function(n,s){void 0===n&&(n=1);void 0===s&&(s=t.settings.itemsPerPage);var o=r+"/account/profile/"+a+"/forum?page="+n+"&pagesize="+s;e.ajax(o,{context:t.element,success:function(e){i(e)},error:function(){e(this).html(t.settings.errorMsg)}})}(s,o)}e.ajax(s,{context:this.element,success:function(a,r,s){var l=0;if(a.posted_msg_count!==n&&a.id!==n&&(l=a.posted_msg_count,e(this).attr({href:t.settings.forumsUrl+"/index.php/sp/"+a.id+"/"})),e(this).children("strong").text(l+t.plurialString(" topic",l)),!(t.settings.contentPlaceholder instanceof jQuery))return!1;var p=e(t.settings.contentPlaceholder),c=e("<a></a>");p.append(e("<h2></h2>").addClass("h3").text("Eclipse Forums")),p.append(e("<p></p>").append("The Eclipse forums are your way of communicating with the community of people developing and using Eclipse-based tools hosted at Eclipse.org. Please stick to technical issues - and remember, no confidential information - these are public forums!"));var d=c.clone().attr({href:t.settings.forumsUrl,class:"btn btn-primary btn-sm",style:"display:block"}).html('<i class="fa fa-angle-double-right" aria-hidden="true"></i> More');if(0===a.posts.length)return p.append('<div class="alert alert-warning" role="alert">This user does not have any activities on Eclipse Forums.</div>'),p.append(d),!1;var u=e("<table></table>").attr({width:"100%",class:"table",id:"forum-posts"}),g=e("<tr></tr>"),h=e("<th></th>");t.settings.currentUser===t.settings.username&&g.append(h.clone().attr("width","8%")),g.append(h.clone().text("Topics").attr("width","50%")),g.append(h.clone().text("Replies").attr({width:"8%",class:"text-center"})),g.append(h.clone().text("Views").attr({width:"8%",class:"text-center"})),g.append(h.clone().text("Last message").attr({class:"text-center"})),u.append(g);var f=e("<div></div>").attr({class:"table-responsive"});f.append(u),p.append(f),i(a);var m=new t.linkHeaderParser(s.getResponseHeader("Link")),v=m.getLastPageNum();m.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=m.getPageSize()),u.on("fetchPageItemsEvent",o),u.data("postsPerPage",t.settings.itemsPerPage),p.append(t.getPaginationBar(v*t.settings.itemsPerPage,"forum-posts"));var b=a.id;d.attr({href:t.settings.forumsUrl+"/index.php/sp/"+b+"/"}),p.append(d)},error:function(){e(this).html(t.settings.errorMsg)}})},mpFavorites:function(){var t=this,a=this.settings.username,n=this.settings.apiUrl;if(!a&&!api_url)return!1;if(t.settings.contentPlaceholder instanceof jQuery){var r=e(t.settings.contentPlaceholder),s=e("<a></a>").attr({href:t.settings.marketplaceUrl+"/user/"+a+"/favorites",class:"btn btn-primary btn-sm",style:"display:block"}).html('<i class="fa fa-angle-double-right" aria-hidden="true"></i> More');r.append(e("<h2></h2>").addClass("h3").text("Eclipse Marketplace Favorites")),r.append(e("<p></p>").append("Eclipse Marketplace is the source for Eclipse-based solutions, products and add-on features. Thousands of developers visit Marketplace on a monthly basis to find new and innovative solutions. Solution providers are encouraged to list their products on Marketplace to gain exposure to the Eclipse developer community."))}var i=n+"/marketplace/favorites?name="+a+"&page=1&pagesize="+t.settings.itemsPerPage;function o(a){var n=t.settings.marketplaceUrl+"/node/"+a+"/api/p";e.ajax(n,{context:t.element,success:function(a){var n=e("#mpfavorites-list");e("node",a).each(function(a,r){var s=e(r),i=s.find("shortdescription").text(),o=r.getAttribute("name"),l=s.find("changed").text(),p=s.find("owner").text(),c="Last Updated on "+t.dateFormat(new Date(parseInt(1e3*l)))+" by "+p,d=r.getAttribute("id"),u=e("#mp-listing-template").clone().removeClass("hidden").removeAttr("id"),g=e("<a></a>"),h=e("category",r),f=t.settings.marketplaceUrl+"/node/"+d,m=s.find("image").text(),v=g.clone().attr({href:f});h.each(function(e,t){var a=g.clone().attr({href:t.getAttribute("url")}).text(t.getAttribute("name"));h.length!==e+1&&a.append(", "),u.find(".content-categories").append(a)}),u.find(".listing-image").attr({href:f,style:"background:url('"+m+"') no-repeat center;"}),u.find(".drag").attr({href:t.settings.marketplaceUrl+"/marketplace-client-intro?mpc_install="+d}),u.find(".listing-title").html(v.clone().text(o)),u.find(".content-teaser").html(i),u.find(".content-last-updated").html(c),n.append(u)})},error:function(){e(this).html(t.settings.errorMsg)}})}function l(r,s,i){!function(r,s){void 0===r&&(r=1);void 0===s&&(s=t.settings.itemsPerPage);var i=n+"/marketplace/favorites?name="+a+"&page="+r+"&pagesize="+s;e.ajax(i,{context:t.element,success:function(t){var a=[];e.each(t.mpc_favorites,function(e,t){a.push(t.content_id)}),o(a.join())},error:function(){e(this).html(t.settings.errorMsg)}})}(s,i)}e.ajax(i,{context:this.element,success:function(a,n,i){if(e(this).children("strong").text(a.result.count+t.plurialString(" favorite",a.result.count)),void 0===r)return!1;var p=[];if(e.each(a.mpc_favorites,function(e,t){p.push(t.content_id)}),0===p.length)return r.append('<div class="alert alert-warning" role="alert">There are no marketplace favorites for this user.</div>'),r.append(s),!1;var c=new t.linkHeaderParser(i.getResponseHeader("Link")),d=c.getLastPageNum();c.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=c.getPageSize()),r.on("fetchPageItemsEvent",l),r.append('<h3 id="mpc_list_name">'+a.mpc_list_name+"</h3>"),r.append('<div class="row"><div class="col-md-17"><div class="form-item form-type-textfield form-disabled"><label>Favorites URL <a href="#" class="install-user-favorites" data-container="body" data-toggle="popover" data-placement="top" title="" data-original-title="How to install?"><i class="fa fa-question-circle" aria-hidden="true"></i></a> </label><input disabled="true" class="form-control form-text" type="text" value="http://marketplace.eclipse.org/user/'+t.settings.username+'/favorites" size="60" maxlength="128"></div></div><div class="col-md-7 margin-top-25 text-right"><div class="drag_installbutton drag_installbutton_v2 drag-install-favorites"><a href="http://marketplace.eclipse.org/user/'+t.settings.username+'/favorites" class="drag" title="How to install?"><span class="btn btn-default"><i class="fa fa-download orange"></i> Install Favorites</span><div class="tooltip tooltip-below-right"><h3>Drag to Install!</h3>Drag to your running Eclipse<sup>*</sup> workspace to install this favorite list. <br><sup>*</sup>Requires Eclipse Marketplace Client.</div></a></div></div></div>'),r.append('<div id="mpfavorites-list"></div>'),r.find("#mpfavorites-list").data("postsPerPage",t.settings.itemsPerPage),o(p.join()),r.append(t.getPaginationBar(d*t.settings.itemsPerPage,"mpfavorites-list")),r.append(s),e("a.install-user-favorites").on("click",function(e){e.preventDefault()}),e("a.install-user-favorites").popover({html:!0,content:function(){return e("<ol></ol>").addClass("padding-left-20").append("<li>Copy <strong>URL</strong> from textfield.</li>").append("<li>Open Eclipse Marketplace Client (MPC).</li>").append("<li>Open <strong>Favorites</strong> tab.</li>").append("<li>Click on <strong>Import Favorites list</strong>.</li>").append("<li>Paste <strong>URL</strong> in the textfield.</li>")}})},error:function(){e(this).html(t.settings.errorMsg)}})},gerritReviewCount:function(){var t=this,a=this.settings.username,n=this.settings.apiUrl+"/account/profile/"+a+"/gerrit";e.ajax(n,{context:this.element,success:function(a){var n=a.merged_changes_count;e(this).children("strong").text(n+t.plurialString(" review",n)),n>0&&e(this).attr({href:t.settings.gerritUrl+"/#/q/owner:"+t.settings.username})},error:function(){e(this).html(t.settings.errorMsg)}})},mailingListSubscription:function(){var t=this,a=t.settings.username,n=t.settings.currentUser,r=t.settings.currentUserUid,s=t.settings.userCanEditOwnMailingList,i=this.settings.apiUrl;if(!a&&!api_url)return!1;var o=t.element,l=i+"/account/profile/"+a+"/mailing-list";e.ajax(l,{context:this.element,success:function(t){var i=t.mailing_list_subscriptions,l=e("<p></p>"),p=e("<h2></h2>"),c=e("<a></a>"),d=e("<strong></strong>"),u="This user is";n===a&&(u="You are");var g=c.clone().attr({href:"/user/"+r+"/mailing-list",class:"fa fa-pencil","aria-hidden":"true"});if(e(o).append(p.text("Eclipse Mailing Lists ").append(g)),jQuery.isEmptyObject(i))e(o).append(l.clone().text(u+" not subscribed to any Eclipse mailing list."));else{e(o).append(l.clone().text("The Eclipse Mailing lists are another way for you to interact with your favorite Eclipse project.")),e(o).append(l.clone().text("Below is a list of the public mailing lists that "+u.toLowerCase()+" currently subscribed to at Eclipse.org. When posting emails to our mailing lists, please remember that these lists are public, avoid posting ").append(d.clone().text("personal")).append(" or ").append(d.clone().text("private information")).append(".")),e(o).append(l.clone().text("If you are having trouble using our mailing lists, please contact ").append(c.clone().attr("href","mailto:mailman@eclipse.org").text("mailman@eclipse.org")).append("."));var h=e("<table></table>").attr({width:"100%",class:"table",id:"aeri-reports"}),f=e("<tr></tr>"),m=e("<th></th>");f.append(m.clone().text("Mailing List").attr("width","30%")),f.append(m.clone().text("Description").attr("width","70%")),h.append(f);var v=e("<div></div>").attr({class:"table-responsive"});v.append(h),e(o).append(v),e(o).append(l),e.each(i,function(t,a){var n=e("<tr></tr>"),r=e("<td></td>");n.append(r.clone().append(c.clone().attr("href","/mailing-list/"+a.list_name).text(a.list_name))),n.append(r.clone().append(a.list_description)),h.append(n)})}n===a&&s&&e(o).append(l.clone().append(c.clone().attr({href:"/user/"+r+"/mailing-list",class:"btn btn-primary btn-xs"}).text("Manage your Mailing Lists")))},error:function(){e(this).html(t.settings.errorMsg)}})},gerritReviews:function(){var t=this,a=this.settings.gerritUrl+"/changes/?q=owner:"+this.settings.username+"+status:open&q=reviewer:"+this.settings.username+"+status:open+-owner:"+this.settings.username+"&pp=0";e(this.element).append(e("<h2>Eclipse Gerrit</h2>").addClass("h3")),e(this.element).append("<p>Gerrit is a web based code review system, facilitating online code reviews for projects using the Git version control system.</p>"),function(a){var n=[["gerrit-outgoing",[]],["gerrit-incoming",[]]];e(t.element).on("drawTableEvent",function(){e.each(n,function(a,n){var r="";switch(n[0]){case"gerrit-outgoing":r="Outgoing Reviews";break;case"gerrit-incoming":r="Incoming Reviews"}var s=e("<h4></h4>").addClass("h4").text(r);e(t.element).append(s),0!==n[1].length?(e(t.element).append(function(a,n){var r=e("<table></table>").attr({width:"100%",class:"table",id:a}),s=e("<tr></tr>"),i=e("<th></th>"),o=e("<td></td>");s.append(i.clone().text("Subject").attr("width","70%")),s.append(i.clone().text("Status").attr({width:"18%",class:"text-center"})),s.append(i.clone().text("Updated").attr({width:"12%",class:"text-center"})),r.append(s);var l=e("<a></a>");e.each(n,function(a,n){s=e("<tr></tr>");var i="";!1===n.mergeable&&(i="Merge Conflict",s.addClass("warning"));var p=n.updated.substring(0,n.updated.indexOf(" "));s.append(o.clone().html(l.clone().attr({href:t.settings.gerritUrl+"/"+n._number}).text(n.subject)).append("<br/>"+n.project)),s.append(o.clone().text(i).attr("class","text-center")),s.append(o.clone().text(p).attr("class","text-center")),r.append(s)});var p=e("<div></div>").attr({class:"table-responsive"});return p.append(r),p}(n[0],n[1])),e(t.element).append(t.getPaginationBar(n[1].length,n[0]))):e(t.element).append('<div class="alert alert-warning" role="alert">There are no '+r.toLowerCase()+" for this user.</div>")});var a=e("<a></a>").attr({href:t.settings.gerritUrl+"/#/q/owner:"+t.settings.username,class:"btn btn-primary btn-sm",style:"display:block"}).html('<i class="fa fa-angle-double-right" aria-hidden="true"></i> More');e(t.element).append(a)}),function a(r,s,i){s=void 0!==s?s:100;i=void 0!==i?i:0;r+="&start="+i+"&n="+s;return e.ajax(r,{dataType:"gerrit_XSSI",context:t.element,converters:{"text gerrit_XSSI":function(e){var t=e.substring(e.indexOf("\n")+1);return jQuery.parseJSON(t)}},success:function(o){var l=Object,p=Object;0!==o[0].length&&(e.merge(n[0][1],o[0]),l=o[0][o[0].length-1]),0!==o[1].length&&(e.merge(n[1][1],o[1]),p=o[1][o[1].length-1]),"_more_changes"in l&&!0===l._more_changes||"_more_changes"in p&&!0===p._more_changes?a(r,s,i+s):e(t.element).trigger("drawTableEvent")},error:function(a){400===a.status?e(this).html(t.settings.gerritUserNotFoundMsg):e(this).html(t.settings.errorMsg),!0}})}(a,100,0)}(a)},recentEvents:function(){var t=this;function a(e,t){return e.dateTime-t.dateTime}e.ajax(this.settings.eventUrl,{context:this.element,success:function(n){var r=new Date,s=[];for(var i in n.events)n.events[i].dateTime=new Date(n.events[i].date),n.events[i].dateTime>=r&&s.push(n.events[i]);s.sort(a);var o=e("<ul></ul>").attr({class:"nav",style:"margin:0"});for(var l in s.slice(0,5)){var p=s[l].dateTime,c=t.dateFormat(p),d=e("<a>").attr({href:s[l].infoLink}).html(s[l].title+"<br/><small>"+c+"</small>"),u=e("<li></li>").append(d);o.append(u)}e(this).children(".loading").remove(),e(this).append(o);var g=e("<a>").attr({href:"http://events.eclipse.org",class:"btn btn-simple btn-sm"}).text("more");e(this).append(g)},error:function(){e(this).html(t.settings.errorMsg)}})},plurialString:function(e,t){return t>1&&(e+="s"),e},dateFormat:function(e){var t=e.getFullYear(),a=["January","February","March","April","May","June","July","August","September","October","November","December"][e.getMonth()];return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][e.getDay()]+", "+a+" "+e.getDate()+", "+t+" - "+("0"+e.getHours()).slice(-2)+":"+("0"+e.getMinutes()).slice(-2)},linkHeaderParser:function(e){var t=this;if(this.links=0,this.getLastPageNum=function(){return void 0===t.links.last?0:o(t.links.last,"page")},this.getPageSize=function(){if(void 0===t.links.first)return 0;var e=o(t.links.first,"pagesize");return 0===e?o(t.links.first,"size"):e},null!=e){for(var a=e.split(","),n={},r=0;r<a.length;r++){a[r]=a[r].replace("&amp;","&");var s=a[r].split(";");if(!(s.length<2)){var i=s[0].replace(/<(.*)>/,"$1").trim();n[s[1].replace(/rel="(.*)"/,"$1").trim()]=i}}this.links=n}function o(e,t){if(void 0===t||void 0===e)return 0;for(var a=e.substr(e.lastIndexOf("?")+1).split("&"),n=0;n<a.length;n++){var r=a[n].split("=");if(decodeURIComponent(r[0])===t)return decodeURIComponent(r[1])}return 0}},getPaginationBar:function(t,a){var n=this;if(void 0===t&&(t=1),!(t<=0||t<=n.settings.itemsPerPage)){var r=e("<nav></nav>").attr({"arial-label":"Page navigation",id:a+"-pager"}).addClass("text-center"),s=Math.ceil(t/n.settings.itemsPerPage),i=o(s,1,a);return r.append(i),void 0===e("#"+a).data("pageCache")&&function(){var t,r=e("#"+a),i=[];switch(a){case"gerrit-incoming":case"gerrit-outgoing":t="gerrit",i=o(r.find("tr"));break;case"mpfavorites-list":t="mpfav";break;case"forum-posts":case"aeri-reports":t="table",i=o(r.find("tr"));break;case"news-container":t="news";break;case"events-container":t="events";break;default:t="generic"}switch(r.data("pageCache",i),r.data("pageCacheType",t),r.data("pageCacheTotalPages",s),r.on("changePageEvent",p),t){case"gerrit":r.trigger("changePageEvent",[1])}function o(a){var r=0,s=0,i=[],o=[];switch(t){case"gerrit":case"table":o[0]=a[0]}return e.each(a,function(t,a){if(e(a).children().first().is("th"))return!0;r===n.settings.itemsPerPage&&(r=0,o[++s]=i,i=[]),i[r++]=a}),i.length>0&&(o[++s]=i),o}}(),r}function o(t,a,n){var r=e("<li></li>"),s=e("<ul></ul>").addClass("pagination");void 0!==n&&s.attr({"data-eclipseFdnApi-elementID":n});var i,o=!1,p="",c=1,d=t,u=function(){var t=e(this),a=t.attr("data-goto-page"),n=t.parents(".pagination").eq(0).data("eclipsefdnapiElementid");e("#"+n).trigger("changePageEvent",[a])};if(t>9){c=t-8,a<=5?(d=9,c=1):a<=t-4&&(c=a-4,d=a+4),o=!0;var g=e("<span></span>");p=r.clone().append(g.clone().html("...").attr({"aria-hidden":"true"})).addClass("pager-ellipses disabled")}for(1!==a&&(s.append(r.clone().addClass("pager-first").html(l("First","first page",1,"<< first").on("click",u))),s.append(r.clone().html(l("Previous","previous page",a-1,"< previous").on("click",u))),!0===o&&c>1&&s.append(p.clone())),i=c;i<=d;i++){var h=r.clone(),f=l("Page "+parseInt(i),"page "+parseInt(i),i).on("click",u);a===i&&h.addClass("active"),h.html(f),s.append(h)}return a<t&&(!0===o&&d<t&&s.append(p.clone()),s.append(r.clone().html(l("Next","next page",a+1,"next >").on("click",u))),s.append(r.clone().addClass("pager-last").html(l("Last","last page",t,"last >>").on("click",u)))),s}function l(t,a,n,r){return void 0===r&&(r=parseInt(n)),e("<a></a>").attr({"aria-label":t,href:"#",onclick:"return false;",title:"Go to "+a,"data-goto-page":parseInt(n)}).text(r)}function p(t,a){var n=e(t.currentTarget),r=n.data("pageCacheType"),s=n.data("pageCache"),i=n.attr("id"),l=e("#"+i+"-pager"),p=l.data("currentPage");switch(null==p&&(p=1),void 0===a&&(a=1),a=parseInt(a),r){case"gerrit":d();break;default:!function(){if(void 0===s[p]){var t=[];s[p]=[],n.is("table")?t=n.find("tr"):n.is("div")&&(t=n.find(".node,.item")),e.each(t,function(t,a){if(e(a).children().first().is("th"))return!0;s[p].push(a)}),n.data("pageCache",s)}}(),d()}if(p!==a){var c=o(n.data("pageCacheTotalPages"),a,i);l.find("ul").replaceWith(c),l.data("currentPage",a)}function d(){if(n.empty(),void 0===s[a]){var t=[];switch(r){case"mpfav":case"table":case"news":case"events":t.push(a),t.push(n.data("postsPerPage"))}return n.is("table")&&n.append(s[0]),void n.trigger("fetchPageItemsEvent",t)}n.is("table")&&n.append(s[0]),e.each(s[a],function(e,t){n.append(t)})}}},newsItems:function(){var t=this,a=e(e(this)[0].element),r=a.find("> div.news-container");function s(r,s,i){var o=e(r),l=o.parent(),c=l.data("news-count")||i||5,d="?page="+s;d+="&pagesize="+c,d+=p(l,"publish-target","publish_to","eclipse_org"),d+=p(l,"news-type","news_type","");var u=t.settings.newsroomUrl+"/news"+d;e.ajax(u,{success:function(a,r,s){var i=a.news;i.length>c&&(i=i.slice(0,c));for(var p=0;p<i.length;p++)i[p].date=t.dateFormat(new Date(i[p].date));var d=function(t){var a=e("#"+t);if(a!==n&&0!==a.length)return a[0].innerHTML;return'{{#news}}<div class="item block-summary-item match-height-item"><p>{{ date }}</p><h4><a href="{{ link }}">{{ title }}</a></h4><p>{{ body }}</p></div>{{/news}}'}(l.data("template-id")||"template-news-items"),u=Mustache.render(d,{news:i});if(o.html(u),!0===l.data("pagination")&&0===l.find("nav").length){var g=new t.linkHeaderParser(s.getResponseHeader("Link")),h=g.getLastPageNum();g.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=g.getPageSize()),l.append(t.getPaginationBar(h*t.settings.itemsPerPage,o.attr("id")))}l.trigger("shown.ef.news")},error:function(){a.empty();var t=e("<div></div>");t.attr("class","alert alert-warning"),t.text("Unable to load news content currently."),a.append(t)}})}0===r.length&&((r=e("<div></div>")).attr({class:"news-container",id:"news-container"}),a.append(r)),!0===a.data("pagination")&&r.on("fetchPageItemsEvent",function(e,t,a){s(e.target,t,a)}),s(r,1,5)},filteredEvents:function(){var t=this,a=e(e(this)[0].element),r=a.find("> div.events-container");function s(r,s,i){var o=e(r),l=o.parent(),c=l.data("count")||i||5,d="?page="+s;d+="&pagesize="+c,d+=p(l,"publish-target","publish_to",n),d+=p(l,"type","type",n),d+=p(l,"upcoming","upcoming_only",n);var u=1===l.data("upcoming"),g=l.data("sort-order")||(u?"ASC":n),h=l.data("sort-field")||(u?"field_event_date":n);g&&h&&(d+="&options%5Borderby%5D%5B"+h+"%5D="+g);var f=t.settings.newsroomUrl+"/events"+d;e.ajax(f,{success:function(a,r,s){var i=a.events;i.length>c&&(i=i.slice(0,c));for(var p=0;p<i.length;p++)(Date.now()>new Date(i[p]["end-date"])||!i[p].registration)&&delete i[p].registration,i[p].infoLink||delete i[p].infoLink,i[p].date=t.dateFormat(new Date(i[p].date)),i[p]["end-date"]=t.dateFormat(new Date(i[p]["end-date"]));var d=function(t,a){var r=e("#"+t);if(r!==n&&0!==r.length)return r[0].innerHTML;if(a)return'{{#events}}<div class="item block-summary-item match-height-item"><h3 class="h4">{{ title }}</h3><p>{{ locationName }}</p><p>{{ date }} - {{ end-date }}</p><p class="margin-bottom-0">{{#registration}}<a class="btn btn-secondary" href="{{ registration }}">Register Now</a>{{/registration}}{{#infoLink}}<a class="btn btn-secondary" href="{{ infoLink }}">More information</a>{{/infoLink}}</p></div>{{/events}}';return'{{#events}}<div class="col-sm-12 col-md-6 event item match-height-item-by-row flex-column"><h3 class="h4 flex-grow">{{ title }}</h3><p>{{ locationName }}</p><p class="flex-grow">{{ date }} - {{ end-date }}</p><p class="margin-bottom-0">{{#infoLink}}<a class="btn btn-secondary" href="{{ infoLink }}">More information</a>{{/infoLink}}{{^infoLink}}{{#registration}}<a class="btn btn-secondary" href="{{ registration }}">Register Now</a>{{/registration}}{{/infoLink}}</p></div>{{/events}}'}(l.data("template-id")||"template-event-items",l.data("archive")||!1),u=Mustache.render(d,{events:i});if(o.html(u),!0===l.data("pagination")&&0===l.find("nav").length){var g=new t.linkHeaderParser(s.getResponseHeader("Link")),h=g.getLastPageNum();g.getPageSize()!==t.settings.itemsPerPage&&(t.settings.itemsPerPage=g.getPageSize()),l.append(t.getPaginationBar(h*t.settings.itemsPerPage,o.attr("id")))}l.trigger("shown.ef.events")},error:function(){a.empty();var t=e("<div></div>");t.attr("class","alert alert-warning"),t.text("Unable to load events content currently."),a.append(t)}})}0===r.length&&((r=e("<div></div>")).attr({class:"events-container",id:"events-container"}),a.append(r)),!0===a.data("pagination")&&r.on("fetchPageItemsEvent",function(e,t,a){s(e.target,t,a)}),s(r,1,5)},featuredStory:function(){var t=e(e(this)[0].element);o(t,"story",this.settings)},featuredFooter:function(){var t=e(e(this)[0].element);o(t,"footer",this.settings)},customFeaturedContent:function(){var t=e(e(this)[0].element);l(this.settings.featuredContent,t,this.settings.featuredContentType)}}),e.fn[r]=function(t){return this.each(function(){e.data(this,"plugin_"+r)||e.data(this,"plugin_"+r,new i(this,t))})};var o=function(t,a,r){var s=e(t),i=r.newsroomUrl+"/featured_story",o=s.data("id");o!==n&&(i+="/"+o),i+=p(s,"publish-target","publish_to",n,!0),e.ajax(i,{success:function(e){e.featured_story===n&&console.log("Could not load featured content, bad content recieved");var t=e.featured_story.filter(function(e){return new Date(e["end-date"])>new Date&&(e["start-date"]===n||new Date(e["start-date"])<new Date)}).filter(function(e){return e.type===a||"both"===e.type});t.length>1&&d(t),t.length>0&&l(t[0],s,a)},error:function(){console.log("Could not load featured content!")}})},l=function(e,t,a){var n=t.find(".featured-container");t.addClass("featured-story-nid-"+e.id),t.addClass("featured-story-"+e.layout);var r=t.data("template-id")||"template-featured-"+a,s=c(r,'{{#content}}<h2 class="margin-top-30">{{ title }}</h2><p>{{ body }}</p><ul class="list-inline">{{#links}}<li><a class="btn btn-primary" href="{{ url }}">{{ title }}</a></li>{{/links}}</ul>{{/content}}'),i=Mustache.render(s,{content:e});n.html(i)},p=function(e,t,a,r,s){var i=e.data(t)||r,o="";if(Array.isArray(i))for(var l=0;l<i.length;l++)o+=s&&0===l?"?":"&",o+="parameters%5B"+a+"%5D%5B%5D="+i[l];else i!==n&&(o+=s?"?":"&",o+="parameters%5B"+a+"%5D="+i);return o},c=function(t,a){var r=e("#"+t);return r!==n&&0!==r.length?r[0].innerHTML:a},d=function(e){for(var t=e.length-1;t>0;t--){var a=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[a],e[a]=n}}}(jQuery,window,document),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Mustache=t()}(this,function(){"use strict";var e=Object.prototype.toString,t=Array.isArray||function(t){return"[object Array]"===e.call(t)};function a(e){return"function"==typeof e}function n(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(e,t){return null!=e&&"object"==typeof e&&t in e}var s=RegExp.prototype.test;var i=/\S/;function o(e){return!function(e,t){return s.call(e,t)}(i,e)}var l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};var p=/\s*/,c=/\s+/,d=/\s*=/,u=/\s*\}/,g=/#|\^|\/|>|\{|&|=|!/;function h(e){this.string=e,this.tail=e,this.pos=0}function f(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function m(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}h.prototype.eos=function(){return""===this.tail},h.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var a=t[0];return this.tail=this.tail.substring(a.length),this.pos+=a.length,a},h.prototype.scanUntil=function(e){var t,a=this.tail.search(e);switch(a){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,a),this.tail=this.tail.substring(a)}return this.pos+=t.length,t},f.prototype.push=function(e){return new f(e,this)},f.prototype.lookup=function(e){var t,n,s,i=this.cache;if(i.hasOwnProperty(e))t=i[e];else{for(var o,l,p,c=this,d=!1;c;){if(e.indexOf(".")>0)for(o=c.view,l=e.split("."),p=0;null!=o&&p<l.length;)p===l.length-1&&(d=r(o,l[p])||(n=o,s=l[p],null!=n&&"object"!=typeof n&&n.hasOwnProperty&&n.hasOwnProperty(s))),o=o[l[p++]];else o=c.view[e],d=r(c.view,e);if(d){t=o;break}c=c.parent}i[e]=t}return a(t)&&(t=t.call(this.view)),t},m.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},m.prototype.parse=function(e,a){var r=this.templateCache,s=e+":"+(a||v.tags).join(":"),i=void 0!==r,l=i?r.get(s):void 0;return null==l&&(l=function(e,a){if(!e)return[];var r,s,i,l=!1,f=[],m=[],b=[],w=!1,_=!1,x="",y=0;function P(){if(w&&!_)for(;b.length;)delete m[b.pop()];else b=[];w=!1,_=!1}function k(e){if("string"==typeof e&&(e=e.split(c,2)),!t(e)||2!==e.length)throw new Error("Invalid tags: "+e);r=new RegExp(n(e[0])+"\\s*"),s=new RegExp("\\s*"+n(e[1])),i=new RegExp("\\s*"+n("}"+e[1]))}k(a||v.tags);for(var C,U,j,M,E,T,S=new h(e);!S.eos();){if(C=S.pos,j=S.scanUntil(r))for(var L=0,R=j.length;L<R;++L)o(M=j.charAt(L))?(b.push(m.length),x+=M):(_=!0,l=!0,x+=" "),m.push(["text",M,C,C+1]),C+=1,"\n"===M&&(P(),x="",y=0,l=!1);if(!S.scan(r))break;if(w=!0,U=S.scan(g)||"name",S.scan(p),"="===U?(j=S.scanUntil(d),S.scan(d),S.scanUntil(s)):"{"===U?(j=S.scanUntil(i),S.scan(u),S.scanUntil(s),U="&"):j=S.scanUntil(s),!S.scan(s))throw new Error("Unclosed tag at "+S.pos);if(E=">"==U?[U,j,C,S.pos,x,y,l]:[U,j,C,S.pos],y++,m.push(E),"#"===U||"^"===U)f.push(E);else if("/"===U){if(!(T=f.pop()))throw new Error('Unopened section "'+j+'" at '+C);if(T[1]!==j)throw new Error('Unclosed section "'+T[1]+'" at '+C)}else"name"===U||"{"===U||"&"===U?_=!0:"="===U&&k(j)}if(P(),T=f.pop())throw new Error('Unclosed section "'+T[1]+'" at '+S.pos);return function(e){for(var t,a=[],n=a,r=[],s=0,i=e.length;s<i;++s)switch((t=e[s])[0]){case"#":case"^":n.push(t),r.push(t),n=t[4]=[];break;case"/":r.pop()[5]=t[2],n=r.length>0?r[r.length-1][4]:a;break;default:n.push(t)}return a}(function(e){for(var t,a,n=[],r=0,s=e.length;r<s;++r)(t=e[r])&&("text"===t[0]&&a&&"text"===a[0]?(a[1]+=t[1],a[3]=t[3]):(n.push(t),a=t));return n}(m))}(e,a),i&&r.set(s,l)),l},m.prototype.render=function(e,t,a,n){var r=this.parse(e,n),s=t instanceof f?t:new f(t,void 0);return this.renderTokens(r,s,a,e,n)},m.prototype.renderTokens=function(e,t,a,n,r){for(var s,i,o,l="",p=0,c=e.length;p<c;++p)o=void 0,"#"===(i=(s=e[p])[0])?o=this.renderSection(s,t,a,n):"^"===i?o=this.renderInverted(s,t,a,n):">"===i?o=this.renderPartial(s,t,a,r):"&"===i?o=this.unescapedValue(s,t):"name"===i?o=this.escapedValue(s,t):"text"===i&&(o=this.rawValue(s)),void 0!==o&&(l+=o);return l},m.prototype.renderSection=function(e,n,r,s){var i=this,o="",l=n.lookup(e[1]);if(l){if(t(l))for(var p=0,c=l.length;p<c;++p)o+=this.renderTokens(e[4],n.push(l[p]),r,s);else if("object"==typeof l||"string"==typeof l||"number"==typeof l)o+=this.renderTokens(e[4],n.push(l),r,s);else if(a(l)){if("string"!=typeof s)throw new Error("Cannot use higher-order sections without the original template");null!=(l=l.call(n.view,s.slice(e[3],e[5]),function(e){return i.render(e,n,r)}))&&(o+=l)}else o+=this.renderTokens(e[4],n,r,s);return o}},m.prototype.renderInverted=function(e,a,n,r){var s=a.lookup(e[1]);if(!s||t(s)&&0===s.length)return this.renderTokens(e[4],a,n,r)},m.prototype.indentPartial=function(e,t,a){for(var n=t.replace(/[^ \t]/g,""),r=e.split("\n"),s=0;s<r.length;s++)r[s].length&&(s>0||!a)&&(r[s]=n+r[s]);return r.join("\n")},m.prototype.renderPartial=function(e,t,n,r){if(n){var s=a(n)?n(e[1]):n[e[1]];if(null!=s){var i=e[6],o=e[5],l=e[4],p=s;return 0==o&&l&&(p=this.indentPartial(s,l,i)),this.renderTokens(this.parse(p,r),t,n,p,r)}}},m.prototype.unescapedValue=function(e,t){var a=t.lookup(e[1]);if(null!=a)return a},m.prototype.escapedValue=function(e,t){var a=t.lookup(e[1]);if(null!=a)return v.escape(a)},m.prototype.rawValue=function(e){return e[1]};var v={name:"mustache.js",version:"4.0.1",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(e){b.templateCache=e},get templateCache(){return b.templateCache}},b=new m;return v.clearCache=function(){return b.clearCache()},v.parse=function(e,t){return b.parse(e,t)},v.render=function(e,a,n,r){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+(t(s=e)?"array":typeof s)+'" was given as the first argument for mustache#render(template, view, partials)');var s;return b.render(e,a,n,r)},v.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return l[e]})},v.Scanner=h,v.Context=f,v.Writer=m,v});
/*
* jquery-eclipsefdn-api - v0.0.37
* jquery-eclipsefdn-api - v0.0.38
* Fetch and display data from various Eclipse Foundation APIs.

@@ -4,0 +4,0 @@ * https://github.com/EclipseFdn/jquery-eclipsefdn-api

/*
* jquery-eclipsefdn-api - v0.0.37
* jquery-eclipsefdn-api - v0.0.38
* Fetch and display data from various Eclipse Foundation APIs.

@@ -4,0 +4,0 @@ * https://github.com/EclipseFdn/jquery-eclipsefdn-api

{
"name": "jquery-eclipsefdn-api",
"version": "0.0.37",
"version": "0.0.38",
"description": "Fetch and display data from various Eclipse Foundation APIs.",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc