"}}),n=i.View.extend({options:{id:"",title:"",target:"_parent",content:"",type:"url",scratchbook:!1,onunload:null,visible:!0,disabled:!1,title_attribute:""},location:"navbar",$menu:null,events:{"click .head":"_head"},initialize:function(t){t&&(this.options=o.defaults(t,this.options)),void 0!==this.options.content&&-1===this.options.content.indexOf("//")&&(this.options.content=galaxy_config.root+this.options.content),this.setElement(s(this._template(this.options))),this.options.disabled&&(s(this.el).find(".root").addClass("disabled"),this._attachPopover()),this.options.visible||this.hide()},show:function(){s(this.el).css({visibility:"visible"})},hide:function(){s(this.el).css({visibility:"hidden"})},add:function(t){var e={title:"Title",content:"",type:"url",target:"_parent",scratchbook:!1,divider:!1};t&&(e=o.defaults(t,e)),e.content&&-1===e.content.indexOf("//")&&(e.content=galaxy_config.root+e.content),this.$menu||(s(this.el).find(".root").append(this._templateMenu()),s(this.el).find(".symbol").addClass("caret"),this.$menu=s(this.el).find(".popup"));var i=s(this._templateMenuItem(e));this.$menu.append(i);var n=this;i.on("click",function(e){return e.preventDefault(),"_blank"===n.options.target?!0:void Galaxy.frame.add(t)}),e.divider&&this.$menu.append(s(this._templateDivider()))},_head:function(t){t.preventDefault(),this.options.disabled||this.$menu||Galaxy.frame.add(this.options)},_attachPopover:function(){var t=s(this.el).find(".head");t.popover({html:!0,content:'Please log in or register to use this feature.',placement:"bottom"}).on("shown.bs.popover",function(){setTimeout(function(){t.popover("hide")},5e3)})},_templateMenuItem:function(t){return'
"],"element");return s.extend({},e.DatasetListItemView.prototype.templates,{titleBar:t})}();var u=c.extend({className:c.prototype.className+" dataset-collection-element",_swapNewRender:function(t){c.prototype._swapNewRender.call(this,t);var e=this.model.get("state")||"ok";return this.$el.addClass("state-"+e),this.$el},toString:function(){var t=this.model?this.model+"":"(no model)";return"NestedDCDCEListItemView("+t+")"}});return{DCListItemView:c,DCEListItemView:h,DatasetDCEListItemView:d,NestedDCDCEListItemView:u}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(3),i(1),i(1))},function(t,e,i){var n,a;(function(s,o,r){n=[i(45),i(6),i(5)],a=function(t,e,i){var n="collections",a={defaults:{model_class:"DatasetCollectionElement",element_identifier:null,element_index:null,element_type:null},_mergeObject:function(t){return s.extend(t,t.object,{element_id:t.id}),delete t.object,t},constructor:function(t,e){t=this._mergeObject(t),this.idAttribute="element_id",o.Model.apply(this,arguments)},parse:function(t,e){var i=t;return i=this._mergeObject(i)}},l=o.Model.extend(e.LoggableMixin).extend(a).extend({_logNamespace:n}),c=o.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,model:l,initialize:function(t,e){this.debug(this+"(DCECollection).initialize:",t,e),e=e||{}},toString:function(){return["DatasetCollectionElementCollection(",this.length,")"].join("")}}),h=t.DatasetAssociation.extend(e.mixin(a,{url:function(){var t=window.galaxy_config&&galaxy_config.root?galaxy_config.root:"/";return this.has("history_id")?t+"api/histories/"+this.get("history_id")+"/contents/"+this.get("id"):(console.warn("no endpoint for non-hdas within a collection yet"),t+"api/datasets")},defaults:s.extend({},t.DatasetAssociation.prototype.defaults,a.defaults),constructor:function(t,e){this.debug(" DatasetDCE.constructor:",t,e),a.constructor.call(this,t,e)},initialize:function(e,i){this.debug(this+"(DatasetDCE).initialize:",e,i),t.DatasetAssociation.prototype.initialize.call(this,e,i)},hasDetails:function(){return s.has(this.attributes,"annotation")},toString:function(){var t=this.get("element_identifier");return["DatasetDCE(",t,")"].join("")}})),d=c.extend({model:h,initialize:function(t,e){this.debug(this+"(DatasetDCECollection).initialize:",t,e),c.prototype.initialize.call(this,t,e)},toString:function(){return["DatasetDCECollection(",this.length,")"].join("")}}),u=o.Model.extend(e.LoggableMixin).extend(e.SearchableModelMixin).extend({_logNamespace:n,defaults:{collection_type:null,deleted:!1},collectionClass:c,initialize:function(t,e){this.debug(this+"(DatasetCollection).initialize:",t,e,this),this.elements=this._createElementsModel(),this.on("change:elements",function(){this.log("change:elements"),this.elements=this._createElementsModel()})},_createElementsModel:function(){this.debug(this+"._createElementsModel",this.collectionClass,this.get("elements"),this.elements);var t=this.get("elements")||[];return this.unset("elements",{silent:!0}),this.elements=new this.collectionClass(t),this.elements},toJSON:function(){var t=o.Model.prototype.toJSON.call(this);return this.elements&&(t.elements=this.elements.toJSON()),t},inReadyState:function(){var t=this.get("populated");return this.isDeletedOrPurged()||t},hasDetails:function(){return this.debug("hasDetails:",this.elements.length),0!==this.elements.length},getVisibleContents:function(t){return this.elements},"delete":function(t){return this.get("deleted")?r.when():this.save({deleted:!0},t)},undelete:function(t){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},t)},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},searchAttributes:["name"],toString:function(){var t=[this.get("id"),this.get("name")||this.get("element_identifier")];return"DatasetCollection("+t.join(",")+")"}}),p=u.extend({collectionClass:d,initialize:function(t,e){this.debug(this+"(ListDatasetCollection).initialize:",t,e),u.prototype.initialize.call(this,t,e)},toString:function(){return["ListDatasetCollection(",this.get("name"),")"].join("")}}),f=p.extend({initialize:function(t,e){this.debug(this+"(PairDatasetCollection).initialize:",t,e),p.prototype.initialize.call(this,t,e)},toString:function(){return["PairDatasetCollection(",this.get("name"),")"].join("")}}),g=u.extend(e.mixin(a,{constructor:function(t,e){this.debug(" NestedDCDCE.constructor:",t,e),a.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedDCDCE(",t,")"].join("")}})),m=c.extend({model:g,initialize:function(t,e){this.debug(this+"(NestedDCDCECollection).initialize:",t,e),c.prototype.initialize.call(this,t,e)},toString:function(){return["NestedDCDCECollection(",this.length,")"].join("")}}),v=f.extend(e.mixin(a,{constructor:function(t,e){this.debug(" NestedPairDCDCE.constructor:",t,e),a.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedPairDCDCE(",t,")"].join("")}})),_=m.extend({model:v,initialize:function(t,e){this.debug(this+"(NestedPairDCDCECollection).initialize:",t,e),m.prototype.initialize.call(this,t,e)},toString:function(){return["NestedPairDCDCECollection(",this.length,")"].join("")}}),y=u.extend({collectionClass:_,initialize:function(t,e){this.debug(this+"(ListPairedDatasetCollection).initialize:",t,e),u.prototype.initialize.call(this,t,e)},toString:function(){return["ListPairedDatasetCollection(",this.get("name"),")"].join("")}});return{ListDatasetCollection:p,PairDatasetCollection:f,ListPairedDatasetCollection:y}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,a;(function(s,o,r,l){n=[i(25),i(9),i(6),i(10),i(64),i(5),i(61)],a=function(t,e,i,n,a,c){function h(t){var e=t.toJSON(),i=g(e,{creationFn:function(e,i){return e=e.map(function(t){return{id:t.id,name:t.name,src:"dataset"===t.history_content_type?"hda":"hdca"}}),t.createHDCA(e,"list",i)}});return i}var d="collections",u=s.View.extend(i.LoggableMixin).extend({_logNamespace:d,tagName:"li",className:"collection-element",initialize:function(t){this.element=t.element||{},this.selected=t.selected||!1},render:function(){return this.$el.attr("data-element-id",this.element.id).attr("draggable",!0).html(this.template({element:this.element})),this.selected&&this.$el.addClass("selected"),this},template:o.template(['',"<%= element.name %>","",'"].join("")),select:function(t){this.$el.toggleClass("selected",t),this.trigger("select",{source:this,selected:this.$el.hasClass("selected")})},discard:function(){var t=this,e=this.$el.parent().width();this.$el.animate({"margin-right":e},"fast",function(){t.trigger("discard",{source:t}),t.destroy()})},destroy:function(){this.off(),this.$el.remove()},events:{click:"_click","click .name":"_clickName","click .discard":"_clickDiscard",dragstart:"_dragstart",dragend:"_dragend",dragover:"_sendToParent",drop:"_sendToParent"},_click:function(t){t.stopPropagation(),this.select(t)},_clickName:function(t){t.stopPropagation(),t.preventDefault();var e=([c("Enter a new name for the element"),":\n(",c("Note that changing the name here will not rename the dataset"),")"].join(""),prompt(c("Enter a new name for the element")+":",this.element.name));e&&(this.element.name=e,this.render())},_clickDiscard:function(t){t.stopPropagation(),this.discard()},_dragstart:function(t){t.originalEvent&&(t=t.originalEvent),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",JSON.stringify(this.element)),this.$el.addClass("dragging"),this.$el.parent().trigger("collection-element.dragstart",[this])},_dragend:function(t){this.$el.removeClass("dragging"),this.$el.parent().trigger("collection-element.dragend",[this])},_sendToParent:function(t){this.$el.parent().trigger(t)},toString:function(){return"DatasetCollectionElementView()"}}),p=s.View.extend(i.LoggableMixin).extend({_logNamespace:d,elementViewClass:u,collectionClass:t.HistoryListDatasetCollection,className:"list-collection-creator collection-creator flex-row-container",minElements:1,defaultAttributes:{creationFn:function(){throw new TypeError("no creation fn for creator")},oncreate:function(){},oncancel:function(){},autoscrollDist:24,highlightClr:"rgba( 64, 255, 255, 1.0 )"},initialize:function(t){this.metric("ListCollectionCreator.initialize",t);var e=this;o.each(this.defaultAttributes,function(i,n){i=t[n]||i,e[n]=i}),e.initialElements=t.elements||[],this._instanceSetUp(),this._elementsSetUp(),this._setUpBehaviors()},_instanceSetUp:function(){this.selectedIds={},this.$dragging=null,this.blocking=!1},_elementsSetUp:function(){this.invalidElements=[],this.workingElements=[],this.elementViews=[],this.workingElements=this.initialElements.slice(0),this._ensureElementIds(),this._validateElements(),this._mangleDuplicateNames(),this._sortElements()},_ensureElementIds:function(){return this.workingElements.forEach(function(t){t.hasOwnProperty("id")||(t.id=o.uniqueId())}),this.workingElements},_validateElements:function(){var t=this;return t.invalidElements=[],this.workingElements=this.workingElements.filter(function(e){var i=t._isElementInvalid(e);return i&&t.invalidElements.push({element:e,text:i}),!i}),this.workingElements},_isElementInvalid:function(t){return"dataset"!==t.history_content_type?c("is not a dataset"):t.state!==e.OK?c(o.contains(e.NOT_READY_STATES,t.state)?"hasn't finished running yet":"has errored, is paused, or is not accessible"):t.deleted||t.purged?c("has been deleted or purged"):null},_mangleDuplicateNames:function(){var t=900,e=1,i={};this.workingElements.forEach(function(n){for(var a=n.name;i.hasOwnProperty(a);)if(a=n.name+" ("+e+")",e+=1,e>=t)throw new Error("Safety hit in while loop - thats impressive");n.name=a,i[n.name]=!0})},_sortElements:function(t){},render:function(t,e){return this.workingElements.length .clear-selected").show():this.$(".collection-elements-controls > .clear-selected").hide()},_renderList:function(t,e){var i=this,n=l(""),a=i.$list();o.each(this.elementViews,function(t){t.destroy(),i.removeElementView(t)}),i.workingElements.forEach(function(t){var e=i._createElementView(t);n.append(e.$el)}),i._renderClearSelected(),a.empty().append(n.children()),o.invoke(i.elementViews,"render"),a.height()>a.css("max-height")?a.css("border-width","1px 0px 1px 0px"):a.css("border-width","0px")},_createElementView:function(t){var e=new this.elementViewClass({element:t,selected:o.has(this.selectedIds,t.id)});return this.elementViews.push(e),this._listenToElementView(e),e},_listenToElementView:function(t){var e=this;e.listenTo(t,{select:function(t){var i=t.source.element;t.selected?e.selectedIds[i.id]=!0:delete e.selectedIds[i.id],e.trigger("elements:select",t)},discard:function(t){e.trigger("elements:discard",t)}})},addElementView:function(t){},removeElementView:function(t){delete this.selectedIds[t.element.id],this._renderClearSelected(),this.elementViews=o.without(this.elementViews,t),this.stopListening(t)},_renderNoElementsLeft:function(){this._disableNameAndCreate(!0),this.$(".collection-elements").append(this.templates.noElementsLeft())},_elementToJSON:function(t){return t},createList:function(t){if(!this.workingElements.length){var e=c("No valid elements for final list")+". ";return e+=''+c("Cancel")+" ",e+=c("or"),e+=' '+c("start over")+".",void this._showAlert(e)}var i=this,n=this.workingElements.map(function(t){return i._elementToJSON(t)});return i.blocking=!0,i.creationFn(n,t).always(function(){i.blocking=!1}).fail(function(t,e,n){i.trigger("error",{xhr:t,status:e,message:c("An error occurred while creating this collection")})}).done(function(t,e,n){i.trigger("collection:created",t,e,n),i.metric("collection:created",t),"function"==typeof i.oncreate&&i.oncreate.call(this,t,e,n)})},_setUpBehaviors:function(){return this.on("error",this._errorHandler),this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("elements:select",function(t){this._renderClearSelected()}),this.on("elements:discard",function(t){var e=t.source.element;this.removeElementView(t.source),this.workingElements=o.without(this.workingElements,e),this.workingElements.length||this._renderNoElementsLeft()}),this},_errorHandler:function(t){this.error(t);var e=this;if(content=t.message||c("An error occurred"),t.xhr){var i=t.xhr,n=t.message;0===i.readyState&&0===i.status?content+=": "+c("Galaxy could not be reached and may be updating.")+c(" Try again in a few minutes."):i.responseJSON?content+=":
",c(["Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ","workflows in order to have analyses done on each member of the entire group. This interface allows ","you to create a collection and re-order the final collection."].join("")),"
","
","
",c(["Rename elements in the list by clicking on ",'the existing name.'].join("")),"
","
",c(["Discard elements from the final created list by clicking on the ",'"Discard" button.'].join("")),"
","
",c(["Reorder the list by clicking and dragging elements. Select multiple elements by clicking on ",'them and you can then move those selected by dragging the ',"entire group. Deselect them by clicking them again or by clicking the ",'the "Clear selected" link.'].join("")),"
","
",c(['Click the "Start over" link to begin again as if you had just opened ',"the interface."].join("")),"
","
",c(['Click the "Cancel" button to exit the interface.'].join("")),"
","
","
",c(['Once your collection is complete, enter a name and ','click "Create list".'].join("")),"
"].join("")),invalidElements:o.template([c("The following selections could not be included due to problems:"),"
','',"<% if( _.size( problems ) ){ %>",c("The following selections could not be included due to problems"),":","
<% _.each( problems, function( problem ){ %>","
<%= problem.element.name %>: <%= problem.text %>
","<% }); %>
","<% } else if( _.size( elements ) < 1 ){ %>",c("No datasets were selected"),".","<% } %>"," ",c("At least one element is needed for the collection"),". ",c("You may need to "),'',c("cancel")," ",c("and reselect new elements"),".","","
","
",'"].join(""))},toString:function(){return"ListCollectionCreator"}}),f=function(t,e,i){var a,s=l.Deferred(),r=Galaxy.modal||new n.View;return e=o.defaults(e||{},{elements:t,oncancel:function(){r.hide(),s.reject("cancelled")},oncreate:function(t,e){r.hide(),s.resolve(e)}}),a=new i(e),r.show({title:e.title||c("Create a collection"),body:a.$el,width:"80%",height:"min-content",closing_events:!0}),a.render(),window._collectionCreator=a,s},g=function(t,e){return e=e||{},e.title=c("Create a collection from a list of datasets"),f(t,e,p)};return{DatasetCollectionElementView:u,ListCollectionCreator:p,collectionCreatorModal:f,listCollectionCreatorModal:g,createListCollection:h}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(3),i(1),i(1))},function(t,e,i){
-var n,a;(function(s,o,r,l){n=[i(28),i(9),i(13),i(6),i(5)],a=function(t,e,i,n,a){var c="dataset",h=t.ListItemView,d=h.extend({_logNamespace:c,className:h.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(t){t.logger&&(this.logger=this.model.logger=t.logger),this.log(this+".initialize:",t),h.prototype.initialize.call(this,t),this.linkTarget=t.linkTarget||"_blank"},_setUpListeners:function(){h.prototype._setUpListeners.call(this),this.model.on("change",function(t,e){this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()?this.model.fetch():this.render()},this)},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):s.when()},remove:function(t,e){var i=this;t=t||this.fxSpeed,this.$el.fadeOut(t,function(){o.View.prototype.remove.call(i),e&&e.call(i)})},render:function(t){return h.prototype.render.call(this,t)},_swapNewRender:function(t){return h.prototype._swapNewRender.call(this,t),this.model.has("state")&&this.$el.addClass("state-"+this.model.get("state")),this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var t=this.model.get("state");if(t===e.NOT_VIEWABLE||t===e.DISCARDED||!this.model.get("accessible"))return null;var n={target:this.linkTarget,classes:"display-btn"};if(this.model.get("purged"))n.disabled=!0,n.title=a("Cannot display datasets removed from disk");else if(t===e.UPLOAD)n.disabled=!0,n.title=a("This dataset must finish uploading before it can be viewed");else if(t===e.NEW)n.disabled=!0,n.title=a("This dataset is not yet viewable");else{n.title=a("View data"),n.href=this.model.urls.display;var s=this;n.onclick=function(t){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add_dataset(s.model.get("id")),t.preventDefault())}}return n.faIcon="fa-eye",i(n)},_renderDetails:function(){if(this.model.get("state")===e.NOT_VIEWABLE)return r(this.templates.noAccess(this.model.toJSON(),this));var t=h.prototype._renderDetails.call(this);return t.find(".actions .left").empty().append(this._renderSecondaryActions()),t.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages()),t.find(".display-applications").html(this._renderDisplayApplications()),this._setUpBehaviors(t),t},_renderSummary:function(){var t=this.model.toJSON(),e=this.templates.summaries[t.state];return(e=e||this.templates.summaries.unknown)(t,this)},_renderDetailMessages:function(){var t=this,e=r(''),i=t.model.toJSON();return l.each(t.templates.detailMessages,function(n){e.append(r(n(i,t)))}),e},_renderDisplayApplications:function(){return this.model.isDeletedOrPurged()?"":[this.templates.displayApplications(this.model.get("display_apps"),this),this.templates.displayApplications(this.model.get("display_types"),this)].join("")},_renderSecondaryActions:function(){switch(this.debug("_renderSecondaryActions"),this.model.get("state")){case e.NOT_VIEWABLE:return[];case e.OK:case e.FAILED_METADATA:case e.ERROR:return[this._renderDownloadButton(),this._renderShowParamsButton()]}return[this._renderShowParamsButton()]},_renderShowParamsButton:function(){return i({title:a("View details"),classes:"params-btn",href:this.model.urls.show_params,target:this.linkTarget,faIcon:"fa-info-circle"})},_renderDownloadButton:function(){return this.model.get("purged")||!this.model.hasData()?null:l.isEmpty(this.model.get("meta_files"))?r(['','',""].join("")):this._renderMetaFileDownloadButton()},_renderMetaFileDownloadButton:function(){var t=this.model.urls;return r(['
"],"collection");return r.extend({},a.prototype.templates,{details:e})}(),{ExpandableView:n,ListItemView:a,FoldoutListItemView:c}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(1),i(3),i(1))},function(t,e,i){var n,a;n=[i(4),i(7),i(99),i(100)],a=function(t,e,i,n){var a=i.extend({initialize:function(a){var s=this;i.prototype.initialize.call(this,t.merge({customize:function(t){t.buttons={execute:execute_btn=new e.Button({icon:"fa-check",tooltip:"Execute: "+t.name+" ("+t.version+")",title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){execute_btn.wait(),s.form.portlet.disable(),n.submit(s.form,t,function(){execute_btn.unwait(),s.form.portlet.enable()})}})},t.job_id&&t.job_remap&&(t.inputs.rerun_remap_job_id={label:"Resume dependencies from this job",name:"rerun_remap_job_id",type:"select",display:"radio",ignore:"__ignore__",value:"__ignore__",options:[["Yes",t.job_id],["No","__ignore__"]],help:"The previous run of this tool failed and other tools were waiting for it to finish successfully. Use this option to resume those tools using the new output(s) of this tool run."})}},a))}});return{View:a}}.apply(e,n),!(void 0!==a&&(t.exports=a))},function(t,e,i){var n,a;(function(i){n=[],a=function(){return{help:function(t){var e=i('').append(i('').append(t.help));return e.find("a").attr("target","_blank"),e},success:function(t){if(!t.jobs||!t.jobs.length)return this.error(t);var e=t.jobs.length,i="";i=1==e?"1 job has":e+" jobs have";var n='
'+i+" been successfully added to the queue - resulting in the following datasets:
";for(var a in t.outputs)n+='
'+t.outputs[a].hid+": "+t.outputs[a].name+"
";return n+="
You can check the status of queued jobs and view the resulting data by refreshing the History pane. When the job has been run the status will change from 'running' to 'finished' if completed successfully or 'error' if problems were encountered.
"},error:function(t){return'
The server could not complete the request. Please contact the Galaxy Team if this error persists.
"},requirements:function(t){var e="This tool requires ";for(var i in t.requirements){var n=t.requirements[i];e+=n.name,n.version&&(e+=" (Version "+n.version+")"),ihere for more information.'}}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(1))},function(t,e,i){var n,a;(function(i,s,o,r){n=[],a=function(){var t=i.View.extend({initialize:function(t,e){this.$button=t,this.$button.size()||(this.$button=s("")),this.options=e||[];var i=this;this.$button.click(function(t){return s(".popmenu-wrapper").remove(),i._renderAndShow(t),!1})},_renderAndShow:function(t){this.render(),this.$el.appendTo("body").css(this._getShownPosition(t)).show(),this._setUpCloseBehavior()},render:function(){if(this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options)),this.options.length){var t=this;this.$el.find("li").each(function(e,i){var n=t.options[e];n.func&&s(this).children("a.popupmenu-option").click(function(e){n.func.call(t,e,n),e.preventDefault()})})}return this},template:function(t,e){return['
"}}),n=i.View.extend({options:{id:"",title:"",target:"_parent",content:"",type:"url",scratchbook:!1,onunload:null,visible:!0,disabled:!1,title_attribute:""},location:"navbar",$menu:null,events:{"click .head":"_head"},initialize:function(t){t&&(this.options=o.defaults(t,this.options)),void 0!==this.options.content&&-1===this.options.content.indexOf("//")&&(this.options.content=galaxy_config.root+this.options.content),this.setElement(s(this._template(this.options))),this.options.disabled&&(s(this.el).find(".root").addClass("disabled"),this._attachPopover()),this.options.visible||this.hide()},show:function(){s(this.el).css({visibility:"visible"})},hide:function(){s(this.el).css({visibility:"hidden"})},add:function(t){var e={title:"Title",content:"",type:"url",target:"_parent",scratchbook:!1,divider:!1};t&&(e=o.defaults(t,e)),e.content&&-1===e.content.indexOf("//")&&(e.content=galaxy_config.root+e.content),this.$menu||(s(this.el).find(".root").append(this._templateMenu()),s(this.el).find(".symbol").addClass("caret"),this.$menu=s(this.el).find(".popup"));var i=s(this._templateMenuItem(e));this.$menu.append(i);var n=this;i.on("click",function(e){return e.preventDefault(),"_blank"===n.options.target?!0:void Galaxy.frame.add(t)}),e.divider&&this.$menu.append(s(this._templateDivider()))},_head:function(t){t.preventDefault(),this.options.disabled||this.$menu||Galaxy.frame.add(this.options)},_attachPopover:function(){var t=s(this.el).find(".head");t.popover({html:!0,content:'Please log in or register to use this feature.',placement:"bottom"}).on("shown.bs.popover",function(){setTimeout(function(){t.popover("hide")},5e3)})},_templateMenuItem:function(t){return'
"],"element");return s.extend({},e.DatasetListItemView.prototype.templates,{titleBar:t})}();var u=c.extend({className:c.prototype.className+" dataset-collection-element",_swapNewRender:function(t){c.prototype._swapNewRender.call(this,t);var e=this.model.get("state")||"ok";return this.$el.addClass("state-"+e),this.$el},toString:function(){var t=this.model?this.model+"":"(no model)";return"NestedDCDCEListItemView("+t+")"}});return{DCListItemView:c,DCEListItemView:h,DatasetDCEListItemView:d,NestedDCDCEListItemView:u}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(3),i(1),i(1))},function(t,e,i){var n,a;(function(s,o,r){n=[i(45),i(6),i(5)],a=function(t,e,i){var n="collections",a={defaults:{model_class:"DatasetCollectionElement",element_identifier:null,element_index:null,element_type:null},_mergeObject:function(t){return s.extend(t,t.object,{element_id:t.id}),delete t.object,t},constructor:function(t,e){t=this._mergeObject(t),this.idAttribute="element_id",o.Model.apply(this,arguments)},parse:function(t,e){var i=t;return i=this._mergeObject(i)}},l=o.Model.extend(e.LoggableMixin).extend(a).extend({_logNamespace:n}),c=o.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,model:l,initialize:function(t,e){this.debug(this+"(DCECollection).initialize:",t,e),e=e||{}},toString:function(){return["DatasetCollectionElementCollection(",this.length,")"].join("")}}),h=t.DatasetAssociation.extend(e.mixin(a,{url:function(){var t=window.galaxy_config&&galaxy_config.root?galaxy_config.root:"/";return this.has("history_id")?t+"api/histories/"+this.get("history_id")+"/contents/"+this.get("id"):(console.warn("no endpoint for non-hdas within a collection yet"),t+"api/datasets")},defaults:s.extend({},t.DatasetAssociation.prototype.defaults,a.defaults),constructor:function(t,e){this.debug(" DatasetDCE.constructor:",t,e),a.constructor.call(this,t,e)},initialize:function(e,i){this.debug(this+"(DatasetDCE).initialize:",e,i),t.DatasetAssociation.prototype.initialize.call(this,e,i)},hasDetails:function(){return s.has(this.attributes,"annotation")},toString:function(){var t=this.get("element_identifier");return["DatasetDCE(",t,")"].join("")}})),d=c.extend({model:h,initialize:function(t,e){this.debug(this+"(DatasetDCECollection).initialize:",t,e),c.prototype.initialize.call(this,t,e)},toString:function(){return["DatasetDCECollection(",this.length,")"].join("")}}),u=o.Model.extend(e.LoggableMixin).extend(e.SearchableModelMixin).extend({_logNamespace:n,defaults:{collection_type:null,deleted:!1},collectionClass:c,initialize:function(t,e){this.debug(this+"(DatasetCollection).initialize:",t,e,this),this.elements=this._createElementsModel(),this.on("change:elements",function(){this.log("change:elements"),this.elements=this._createElementsModel()})},_createElementsModel:function(){this.debug(this+"._createElementsModel",this.collectionClass,this.get("elements"),this.elements);var t=this.get("elements")||[];return this.unset("elements",{silent:!0}),this.elements=new this.collectionClass(t),this.elements},toJSON:function(){var t=o.Model.prototype.toJSON.call(this);return this.elements&&(t.elements=this.elements.toJSON()),t},inReadyState:function(){var t=this.get("populated");return this.isDeletedOrPurged()||t},hasDetails:function(){return this.debug("hasDetails:",this.elements.length),0!==this.elements.length},getVisibleContents:function(t){return this.elements},"delete":function(t){return this.get("deleted")?r.when():this.save({deleted:!0},t)},undelete:function(t){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},t)},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},searchAttributes:["name"],toString:function(){var t=[this.get("id"),this.get("name")||this.get("element_identifier")];return"DatasetCollection("+t.join(",")+")"}}),p=u.extend({collectionClass:d,initialize:function(t,e){this.debug(this+"(ListDatasetCollection).initialize:",t,e),u.prototype.initialize.call(this,t,e)},toString:function(){return["ListDatasetCollection(",this.get("name"),")"].join("")}}),f=p.extend({initialize:function(t,e){this.debug(this+"(PairDatasetCollection).initialize:",t,e),p.prototype.initialize.call(this,t,e)},toString:function(){return["PairDatasetCollection(",this.get("name"),")"].join("")}}),g=u.extend(e.mixin(a,{constructor:function(t,e){this.debug(" NestedDCDCE.constructor:",t,e),a.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedDCDCE(",t,")"].join("")}})),m=c.extend({model:g,initialize:function(t,e){this.debug(this+"(NestedDCDCECollection).initialize:",t,e),c.prototype.initialize.call(this,t,e)},toString:function(){return["NestedDCDCECollection(",this.length,")"].join("")}}),v=f.extend(e.mixin(a,{constructor:function(t,e){this.debug(" NestedPairDCDCE.constructor:",t,e),a.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedPairDCDCE(",t,")"].join("")}})),_=m.extend({model:v,initialize:function(t,e){this.debug(this+"(NestedPairDCDCECollection).initialize:",t,e),m.prototype.initialize.call(this,t,e)},toString:function(){return["NestedPairDCDCECollection(",this.length,")"].join("")}}),y=u.extend({collectionClass:_,initialize:function(t,e){this.debug(this+"(ListPairedDatasetCollection).initialize:",t,e),u.prototype.initialize.call(this,t,e)},toString:function(){return["ListPairedDatasetCollection(",this.get("name"),")"].join("")}});return{ListDatasetCollection:p,PairDatasetCollection:f,ListPairedDatasetCollection:y}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,a;(function(s,o,r,l){n=[i(24),i(9),i(6),i(10),i(65),i(5),i(62)],a=function(t,e,i,n,a,c){function h(t){var e=t.toJSON(),i=g(e,{creationFn:function(e,i){return e=e.map(function(t){return{id:t.id,name:t.name,src:"dataset"===t.history_content_type?"hda":"hdca"}}),t.createHDCA(e,"list",i)}});return i}var d="collections",u=s.View.extend(i.LoggableMixin).extend({_logNamespace:d,tagName:"li",className:"collection-element",initialize:function(t){this.element=t.element||{},this.selected=t.selected||!1},render:function(){return this.$el.attr("data-element-id",this.element.id).attr("draggable",!0).html(this.template({element:this.element})),this.selected&&this.$el.addClass("selected"),this},template:o.template(['',"<%= element.name %>","",'"].join("")),select:function(t){this.$el.toggleClass("selected",t),this.trigger("select",{source:this,selected:this.$el.hasClass("selected")})},discard:function(){var t=this,e=this.$el.parent().width();this.$el.animate({"margin-right":e},"fast",function(){t.trigger("discard",{source:t}),t.destroy()})},destroy:function(){this.off(),this.$el.remove()},events:{click:"_click","click .name":"_clickName","click .discard":"_clickDiscard",dragstart:"_dragstart",dragend:"_dragend",dragover:"_sendToParent",drop:"_sendToParent"},_click:function(t){t.stopPropagation(),this.select(t)},_clickName:function(t){t.stopPropagation(),t.preventDefault();var e=([c("Enter a new name for the element"),":\n(",c("Note that changing the name here will not rename the dataset"),")"].join(""),prompt(c("Enter a new name for the element")+":",this.element.name));e&&(this.element.name=e,this.render())},_clickDiscard:function(t){t.stopPropagation(),this.discard()},_dragstart:function(t){t.originalEvent&&(t=t.originalEvent),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",JSON.stringify(this.element)),this.$el.addClass("dragging"),this.$el.parent().trigger("collection-element.dragstart",[this])},_dragend:function(t){this.$el.removeClass("dragging"),this.$el.parent().trigger("collection-element.dragend",[this])},_sendToParent:function(t){this.$el.parent().trigger(t)},toString:function(){return"DatasetCollectionElementView()"}}),p=s.View.extend(i.LoggableMixin).extend({_logNamespace:d,elementViewClass:u,collectionClass:t.HistoryListDatasetCollection,className:"list-collection-creator collection-creator flex-row-container",minElements:1,defaultAttributes:{creationFn:function(){throw new TypeError("no creation fn for creator")},oncreate:function(){},oncancel:function(){},autoscrollDist:24,highlightClr:"rgba( 64, 255, 255, 1.0 )"},initialize:function(t){this.metric("ListCollectionCreator.initialize",t);var e=this;o.each(this.defaultAttributes,function(i,n){i=t[n]||i,e[n]=i}),e.initialElements=t.elements||[],this._instanceSetUp(),this._elementsSetUp(),this._setUpBehaviors()},_instanceSetUp:function(){this.selectedIds={},this.$dragging=null,this.blocking=!1},_elementsSetUp:function(){this.invalidElements=[],this.workingElements=[],this.elementViews=[],this.workingElements=this.initialElements.slice(0),this._ensureElementIds(),this._validateElements(),this._mangleDuplicateNames(),this._sortElements()},_ensureElementIds:function(){return this.workingElements.forEach(function(t){t.hasOwnProperty("id")||(t.id=o.uniqueId())}),this.workingElements},_validateElements:function(){var t=this;return t.invalidElements=[],this.workingElements=this.workingElements.filter(function(e){var i=t._isElementInvalid(e);return i&&t.invalidElements.push({element:e,text:i}),!i}),this.workingElements},_isElementInvalid:function(t){return"dataset"!==t.history_content_type?c("is not a dataset"):t.state!==e.OK?c(o.contains(e.NOT_READY_STATES,t.state)?"hasn't finished running yet":"has errored, is paused, or is not accessible"):t.deleted||t.purged?c("has been deleted or purged"):null},_mangleDuplicateNames:function(){var t=900,e=1,i={};this.workingElements.forEach(function(n){for(var a=n.name;i.hasOwnProperty(a);)if(a=n.name+" ("+e+")",e+=1,e>=t)throw new Error("Safety hit in while loop - thats impressive");n.name=a,i[n.name]=!0})},_sortElements:function(t){},render:function(t,e){return this.workingElements.length .clear-selected").show():this.$(".collection-elements-controls > .clear-selected").hide()},_renderList:function(t,e){var i=this,n=l(""),a=i.$list();o.each(this.elementViews,function(t){t.destroy(),i.removeElementView(t)}),i.workingElements.forEach(function(t){var e=i._createElementView(t);n.append(e.$el)}),i._renderClearSelected(),a.empty().append(n.children()),o.invoke(i.elementViews,"render"),a.height()>a.css("max-height")?a.css("border-width","1px 0px 1px 0px"):a.css("border-width","0px")},_createElementView:function(t){var e=new this.elementViewClass({element:t,selected:o.has(this.selectedIds,t.id)});return this.elementViews.push(e),this._listenToElementView(e),e},_listenToElementView:function(t){var e=this;e.listenTo(t,{select:function(t){var i=t.source.element;t.selected?e.selectedIds[i.id]=!0:delete e.selectedIds[i.id],e.trigger("elements:select",t)},discard:function(t){e.trigger("elements:discard",t)}})},addElementView:function(t){},removeElementView:function(t){delete this.selectedIds[t.element.id],this._renderClearSelected(),this.elementViews=o.without(this.elementViews,t),this.stopListening(t)},_renderNoElementsLeft:function(){this._disableNameAndCreate(!0),this.$(".collection-elements").append(this.templates.noElementsLeft())},_elementToJSON:function(t){return t},createList:function(t){if(!this.workingElements.length){var e=c("No valid elements for final list")+". ";return e+=''+c("Cancel")+" ",e+=c("or"),e+=' '+c("start over")+".",void this._showAlert(e)}var i=this,n=this.workingElements.map(function(t){return i._elementToJSON(t)});return i.blocking=!0,i.creationFn(n,t).always(function(){i.blocking=!1}).fail(function(t,e,n){i.trigger("error",{xhr:t,status:e,message:c("An error occurred while creating this collection")})}).done(function(t,e,n){i.trigger("collection:created",t,e,n),i.metric("collection:created",t),"function"==typeof i.oncreate&&i.oncreate.call(this,t,e,n)})},_setUpBehaviors:function(){return this.on("error",this._errorHandler),this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("elements:select",function(t){this._renderClearSelected()}),this.on("elements:discard",function(t){var e=t.source.element;this.removeElementView(t.source),this.workingElements=o.without(this.workingElements,e),this.workingElements.length||this._renderNoElementsLeft()}),this},_errorHandler:function(t){this.error(t);var e=this;if(content=t.message||c("An error occurred"),t.xhr){var i=t.xhr,n=t.message;0===i.readyState&&0===i.status?content+=": "+c("Galaxy could not be reached and may be updating.")+c(" Try again in a few minutes."):i.responseJSON?content+=":
",c(["Collections of datasets are permanent, ordered lists of datasets that can be passed to tools and ","workflows in order to have analyses done on each member of the entire group. This interface allows ","you to create a collection and re-order the final collection."].join("")),"
","
","
",c(["Rename elements in the list by clicking on ",'the existing name.'].join("")),"
","
",c(["Discard elements from the final created list by clicking on the ",'"Discard" button.'].join("")),"
","
",c(["Reorder the list by clicking and dragging elements. Select multiple elements by clicking on ",'them and you can then move those selected by dragging the ',"entire group. Deselect them by clicking them again or by clicking the ",'the "Clear selected" link.'].join("")),"
","
",c(['Click the "Start over" link to begin again as if you had just opened ',"the interface."].join("")),"
","
",c(['Click the "Cancel" button to exit the interface.'].join("")),"
","
","
",c(['Once your collection is complete, enter a name and ','click "Create list".'].join("")),"
"].join("")),invalidElements:o.template([c("The following selections could not be included due to problems:"),"
','',"<% if( _.size( problems ) ){ %>",c("The following selections could not be included due to problems"),":","
<% _.each( problems, function( problem ){ %>","
<%= problem.element.name %>: <%= problem.text %>
","<% }); %>
","<% } else if( _.size( elements ) < 1 ){ %>",c("No datasets were selected"),".","<% } %>"," ",c("At least one element is needed for the collection"),". ",c("You may need to "),'',c("cancel")," ",c("and reselect new elements"),".","","
","
",'"].join(""))},toString:function(){return"ListCollectionCreator"}}),f=function(t,e,i){var a,s=l.Deferred(),r=Galaxy.modal||new n.View;return e=o.defaults(e||{},{elements:t,oncancel:function(){r.hide(),s.reject("cancelled")},oncreate:function(t,e){r.hide(),s.resolve(e)}}),a=new i(e),r.show({title:e.title||c("Create a collection"),body:a.$el,width:"80%",height:"min-content",closing_events:!0}),a.render(),window._collectionCreator=a,s},g=function(t,e){return e=e||{},e.title=c("Create a collection from a list of datasets"),f(t,e,p)};return{DatasetCollectionElementView:u,ListCollectionCreator:p,collectionCreatorModal:f,listCollectionCreatorModal:g,
+createListCollection:h}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(3),i(1),i(1))},function(t,e,i){var n,a;(function(s,o,r,l){n=[i(27),i(9),i(13),i(6),i(5)],a=function(t,e,i,n,a){var c="dataset",h=t.ListItemView,d=h.extend({_logNamespace:c,className:h.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(t){t.logger&&(this.logger=this.model.logger=t.logger),this.log(this+".initialize:",t),h.prototype.initialize.call(this,t),this.linkTarget=t.linkTarget||"_blank"},_setUpListeners:function(){h.prototype._setUpListeners.call(this),this.model.on("change",function(t,e){this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()?this.model.fetch():this.render()},this)},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):s.when()},remove:function(t,e){var i=this;t=t||this.fxSpeed,this.$el.fadeOut(t,function(){o.View.prototype.remove.call(i),e&&e.call(i)})},render:function(t){return h.prototype.render.call(this,t)},_swapNewRender:function(t){return h.prototype._swapNewRender.call(this,t),this.model.has("state")&&this.$el.addClass("state-"+this.model.get("state")),this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var t=this.model.get("state");if(t===e.NOT_VIEWABLE||t===e.DISCARDED||!this.model.get("accessible"))return null;var n={target:this.linkTarget,classes:"display-btn"};if(this.model.get("purged"))n.disabled=!0,n.title=a("Cannot display datasets removed from disk");else if(t===e.UPLOAD)n.disabled=!0,n.title=a("This dataset must finish uploading before it can be viewed");else if(t===e.NEW)n.disabled=!0,n.title=a("This dataset is not yet viewable");else{n.title=a("View data"),n.href=this.model.urls.display;var s=this;n.onclick=function(t){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add_dataset(s.model.get("id")),t.preventDefault())}}return n.faIcon="fa-eye",i(n)},_renderDetails:function(){if(this.model.get("state")===e.NOT_VIEWABLE)return r(this.templates.noAccess(this.model.toJSON(),this));var t=h.prototype._renderDetails.call(this);return t.find(".actions .left").empty().append(this._renderSecondaryActions()),t.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages()),t.find(".display-applications").html(this._renderDisplayApplications()),this._setUpBehaviors(t),t},_renderSummary:function(){var t=this.model.toJSON(),e=this.templates.summaries[t.state];return(e=e||this.templates.summaries.unknown)(t,this)},_renderDetailMessages:function(){var t=this,e=r(''),i=t.model.toJSON();return l.each(t.templates.detailMessages,function(n){e.append(r(n(i,t)))}),e},_renderDisplayApplications:function(){return this.model.isDeletedOrPurged()?"":[this.templates.displayApplications(this.model.get("display_apps"),this),this.templates.displayApplications(this.model.get("display_types"),this)].join("")},_renderSecondaryActions:function(){switch(this.debug("_renderSecondaryActions"),this.model.get("state")){case e.NOT_VIEWABLE:return[];case e.OK:case e.FAILED_METADATA:case e.ERROR:return[this._renderDownloadButton(),this._renderShowParamsButton()]}return[this._renderShowParamsButton()]},_renderShowParamsButton:function(){return i({title:a("View details"),classes:"params-btn",href:this.model.urls.show_params,target:this.linkTarget,faIcon:"fa-info-circle"})},_renderDownloadButton:function(){return this.model.get("purged")||!this.model.hasData()?null:l.isEmpty(this.model.get("meta_files"))?r(['','',""].join("")):this._renderMetaFileDownloadButton()},_renderMetaFileDownloadButton:function(){var t=this.model.urls;return r(['
"],"collection");return r.extend({},a.prototype.templates,{details:e})}(),{ExpandableView:n,ListItemView:a,FoldoutListItemView:c}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(1),i(3),i(1))},function(t,e,i){var n,a;n=[i(4),i(7),i(99),i(100)],a=function(t,e,i,n){var a=i.extend({initialize:function(a){var s=this;i.prototype.initialize.call(this,t.merge({customize:function(t){t.buttons={execute:execute_btn=new e.Button({icon:"fa-check",tooltip:"Execute: "+t.name+" ("+t.version+")",title:"Execute",cls:"btn btn-primary",floating:"clear",onclick:function(){execute_btn.wait(),s.form.portlet.disable(),n.submit(s.form,t,function(){execute_btn.unwait(),s.form.portlet.enable()})}})},t.job_id&&t.job_remap&&(t.inputs.rerun_remap_job_id={label:"Resume dependencies from this job",name:"rerun_remap_job_id",type:"select",display:"radio",ignore:"__ignore__",value:"__ignore__",options:[["Yes",t.job_id],["No","__ignore__"]],help:"The previous run of this tool failed and other tools were waiting for it to finish successfully. Use this option to resume those tools using the new output(s) of this tool run."})}},a))}});return{View:a}}.apply(e,n),!(void 0!==a&&(t.exports=a))},function(t,e,i){var n,a;(function(i){n=[],a=function(){return{help:function(t){var e=i('').append(i('').append(t.help));return e.find("a").attr("target","_blank"),e},success:function(t){if(!t.jobs||!t.jobs.length)return this.error(t);var e=t.jobs.length,i="";i=1==e?"1 job has":e+" jobs have";var n='
'+i+" been successfully added to the queue - resulting in the following datasets:
";for(var a in t.outputs)n+='
'+t.outputs[a].hid+": "+t.outputs[a].name+"
";return n+="
You can check the status of queued jobs and view the resulting data by refreshing the History pane. When the job has been run the status will change from 'running' to 'finished' if completed successfully or 'error' if problems were encountered.
"},error:function(t){return'
The server could not complete the request. Please contact the Galaxy Team if this error persists.
"},requirements:function(t){var e="This tool requires ";for(var i in t.requirements){var n=t.requirements[i];e+=n.name,n.version&&(e+=" (Version "+n.version+")"),ihere for more information.'}}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(1))},function(t,e,i){var n,a;(function(i,s,o,r){n=[],a=function(){var t=i.View.extend({initialize:function(t,e){this.$button=t,this.$button.size()||(this.$button=s("")),this.options=e||[];var i=this;this.$button.click(function(t){return s(".popmenu-wrapper").remove(),i._renderAndShow(t),!1})},_renderAndShow:function(t){this.render(),this.$el.appendTo("body").css(this._getShownPosition(t)).show(),this._setUpCloseBehavior()},render:function(){if(this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options)),this.options.length){var t=this;this.$el.find("li").each(function(e,i){var n=t.options[e];n.func&&s(this).children("a.popupmenu-option").click(function(e){n.func.call(t,e,n),e.preventDefault()})})}return this},template:function(t,e){return['
","<% } %>"],"visualizations");return s.extend({},h.prototype.templates,{warnings:t,visualizations:e})}(),{DatasetListItemEdit:d}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(3),i(1))},function(t,e,i){var n,a;(function(s,o,r){n=[i(9),i(6),i(5)],a=function(t,e,i){var n="dataset",a=e.SearchableModelMixin,l=s.Model.extend(e.LoggableMixin).extend(e.mixin(a,{_logNamespace:n,defaults:{state:t.NEW,deleted:!1,purged:!1,name:"(unnamed dataset)",accessible:!0,data_type:"",file_ext:"",file_size:0,meta_files:[],misc_blurb:"",misc_info:"",tags:[]},initialize:function(e,i){this.debug(this+"(Dataset).initialize",e,i),
//!! this state is not in trans.app.model.Dataset.states - set it here -
-this.get("accessible")||this.set("state",t.NOT_VIEWABLE),this.urls=this._generateUrls(),this._setUpListeners()},_generateUrls:function(){var t=this.get("id");if(!t)return{};var e={purge:"datasets/"+t+"/purge_async",display:"datasets/"+t+"/display/?preview=True",edit:"datasets/"+t+"/edit",download:"datasets/"+t+"/display?to_ext="+this.get("file_ext"),report_error:"dataset/errors?id="+t,rerun:"tool_runner/rerun?id="+t,show_params:"datasets/"+t+"/show_params",visualization:"visualization",meta_download:"dataset/get_metadata_file?hda_id="+t+"&metadata_name="},i=window.galaxy_config&&galaxy_config.root?galaxy_config.root:"/";return o.each(e,function(t,n){e[n]=i+t}),this.urls=e,e},_setUpListeners:function(){this.on("change:state",function(t,e){this.log(this+" has changed state:",t,e),this.inReadyState()&&this.trigger("state:ready",t,e,this.previous("state"))}),this.on("change:id change:file_ext",function(t){this._generateUrls()})},toJSON:function(){var t=s.Model.prototype.toJSON.call(this);return o.extend(t,{urls:this.urls})},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},inReadyState:function(){var e=o.contains(t.READY_STATES,this.get("state"));return this.isDeletedOrPurged()||e},hasDetails:function(){return o.has(this.attributes,"genome_build")},hasData:function(){return this.get("file_size")>0},fetch:function(t){var e=this;return s.Model.prototype.fetch.call(this,t).always(function(){e._generateUrls()})},"delete":function(t){return this.get("deleted")?r.when():this.save({deleted:!0},t)},undelete:function(t){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},t)},purge:function(t){if(this.get("purged"))return r.when();t=t||{},t.url=this.urls.purge;var e=this,n=r.ajax(t);return n.done(function(t,i,n){e.set({deleted:!0,purged:!0})}),n.fail(function(n,a,s){var o=i("Unable to purge dataset"),r="Removal of datasets by users is not allowed in this Galaxy instance";n.responseJSON&&n.responseJSON.error?o=n.responseJSON.error:-1!==n.responseText.indexOf(r)&&(o=r),n.responseText=o,e.trigger("error",e,n,t,i(o),{error:o})}),n},searchAttributes:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],searchAliases:{title:"name",format:"file_ext",database:"genome_build",blurb:"misc_blurb",description:"misc_blurb",info:"misc_info",tag:"tags"},toString:function(){var t=this.get("id")||"";return this.get("name")&&(t='"'+this.get("name")+'",'+t),"Dataset("+t+")"}})),c=s.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,model:l,urlRoot:(window.galaxy_config&&galaxy_config.root?galaxy_config.root:"/")+"api/datasets",url:function(){return this.urlRoot},ids:function(){return this.map(function(t){return t.get("id")})},notReady:function(){return this.filter(function(t){return!t.inReadyState()})},haveDetails:function(){return this.all(function(t){return t.hasDetails()})},ajaxQueue:function(t,e){var i=r.Deferred(),n=this.length,a=[];if(!n)return i.resolve([]),i;var s=this.chain().reverse().map(function(o,r){return function(){var l=t.call(o,e);l.done(function(t){i.notify({curr:r,total:n,response:t,model:o})}),l.always(function(t){a.push(t),s.length?s.shift()():i.resolve(a)})}}).value();return s.shift()(),i},matches:function(t){return this.filter(function(e){return e.matches(t)})},toString:function(){return["DatasetAssociationCollection(",this.length,")"].join("")}});return{DatasetAssociation:l,DatasetAssociationCollection:c}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(3),i(1))},function(t,e,i){var n,a;(function(s){n=[i(24),i(6),i(5)],a=function(t,e,i){var n=t.DatasetListItemView,a=n.extend({className:n.prototype.className+" history-content",initialize:function(t,e){n.prototype.initialize.call(this,t,e)},toString:function(){var t=this.model?this.model+"":"(no model)";return"HDAListItemView("+t+")"}});return a.prototype.templates=function(){var t=e.wrapTemplate(['
'},_templateFrameUrl:function(t,e,i){i+=-1==i.indexOf("?")?"?":"&",i+="widget=True";var n=o(this._templateFrame(t,e));return n.find(".f-content").append(''),n},_templateShadow:function(t){return''},_templateBackground:function(){return''},_templateMenu:function(){return''}});return{View:t}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(3),i(1))},function(t,e,i){var n,a;(function(s,o){n=[i(4),i(11),i(7)],a=function(t,e,i){var n=s.View.extend({initialize:function(t){var n=this;this.options=t,this.name=t.name||"element",this.multiple=t.multiple||!1,this.message=new i.Message({cls:"ui-margin-top"}),this.portlet=new e.View({cls:"ui-portlet-section"}),this.select=new i.Select.View({optional:t.optional}),this.button=new i.ButtonIcon({icon:"fa fa-sign-in",floating:"left",tooltip:"Insert new "+this.name,onclick:function(){n.add({id:n.select.value(),name:n.select.text()})}}),this.setElement(this._template(t)),this.$(".ui-list-message").append(this.message.$el),this.$(".ui-list-portlet").append(this.portlet.$el),this.$(".ui-list-button").append(this.button.$el),this.$(".ui-list-select").append(this.select.$el)},value:function(t){if(void 0!==t){if(this.portlet.empty(),o.isArray(t))for(var e in t){var i=t[e],n=null,a=null;"string"!=o.type(i)?(n=i.id,a=i.name):n=a=i,null!=n&&this.add({id:n,name:a})}this._refresh()}var s=[];return this.$(".ui-list-id").each(function(){s.push({id:o(this).prop("id"),name:o(this).find(".ui-list-name").html()})}),0==s.length?null:s},add:function(e){var i=this;if(0===this.$('[id="'+e.id+'"]').length)if(t.validate(e.id)){var n=o(this._templateRow({id:e.id,name:e.name}));n.on("click",function(){n.remove(),i._refresh()}),n.on("mouseover",function(){n.addClass("portlet-highlight")}),n.on("mouseout",function(){n.removeClass("portlet-highlight")}),this.portlet.append(n),this._refresh()}else this.message.update({message:"Please select a valid "+this.name+".",status:"danger"});else this.message.update({message:"This "+this.name+" is already in the list."})},update:function(t){this.select.update(t)},_refresh:function(){this.$(".ui-list-id").length>0?(!this.multiple&&this.button.disable(),this.$(".ui-list-portlet").show()):(this.button.enable(),this.$(".ui-list-portlet").hide()),this.options.onchange&&this.options.onchange()},_template:function(t){return'
'},_templateRow:function(t){return'
'+t.name+"
"}});return{View:n}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(1))},function(t,e,i){var n,a;(function(s,o){n=[i(4),i(32)],a=function(t,e){var i=s.View.extend({initialize:function(i){var n=this;this.options=t.merge(i,{visible:!0,data:[],id:t.uid(),error_text:"No options available.",wait_text:"Please wait...",multiple:!1}),this.setElement(''),this.$message=o(""),this.$options=o(this._template(i)),this.$menu=o(''),this.$el.append(this.$message),this.$el.append(this.$menu),this.$el.append(this.$options),this.options.multiple&&(this.all_button=new e.ButtonCheck({onclick:function(){n.$("input").prop("checked",0!==n.all_button.value()),n.trigger("change")}}),this.$menu.append(this.all_button.$el)),this.options.visible||this.$el.hide(),this.update(this.options.data),void 0!==this.options.value&&this.value(this.options.value),this.on("change",function(){this.options.onchange&&this.options.onchange(this.value())})},update:function(t){var e=this._getValue();if(this.$options.empty(),this._templateOptions)this.$options.append(this._templateOptions(t));else for(var i in t){var n=o(this._templateOption(t[i]));n.addClass("ui-option"),n.tooltip({title:t[i].tooltip,placement:"bottom"}),this.$options.append(n)}var a=this;this.$("input").on("change",function(){a.value(a._getValue()),a.trigger("change")}),this.value(e),this.unwait()},value:function(t){if(void 0!==t&&(this.$("input").prop("checked",!1),null!==t)){t instanceof Array||(t=[t]);for(var e in t)this.$('input[value="'+t[e]+'"]').first().prop("checked",!0)}var i=this._getValue();if(this.all_button){var n=i;n=n instanceof Array?n.length:0,this.all_button.value(n,this._size())}return i},exists:function(t){if(void 0!==t){t instanceof Array||(t=[t]);for(var e in t)if(this.$('input[value="'+t[e]+'"]').length>0)return!0}return!1},first:function(){var t=this.$("input").first();return t.length>0?t.val():null},wait:function(){0==this._size()&&(this._messageShow(this.options.wait_text,"info"),this.$options.hide(),this.$menu.hide())},unwait:function(){var t=this._size();0==t?(this._messageShow(this.options.error_text,"danger"),this.$options.hide(),this.$menu.hide()):(this._messageHide(),this.$options.css("display","inline-block"),this.$menu.show())},_getValue:function(){var e=[];return this.$(":checked").each(function(){e.push(o(this).val())}),t.validate(e)?this.options.multiple?e:e[0]:null},_size:function(){return this.$(".ui-option").length},_messageShow:function(t,e){this.$message.show(),this.$message.removeClass(),this.$message.addClass("ui-message alert alert-"+e),this.$message.html(t)},_messageHide:function(){this.$message.hide()},_template:function(){return''}}),n=i.extend({_templateOption:function(e){var i=t.uid();return'"}}),a={};a.View=n.extend({initialize:function(t){t.type="radio",n.prototype.initialize.call(this,t)}});var r={};r.View=n.extend({initialize:function(t){t.multiple=!0,t.type="checkbox",n.prototype.initialize.call(this,t)}});var l={};return l.View=i.extend({initialize:function(t){i.prototype.initialize.call(this,t)},value:function(t){return void 0!==t&&(this.$("input").prop("checked",!1),this.$("label").removeClass("active"),this.$('[value="'+t+'"]').prop("checked",!0).closest("label").addClass("active")),this._getValue()},_templateOption:function(t){var e="fa "+t.icon;t.label||(e+=" no-padding");var i='"},_template:function(){return''}}),{Base:i,BaseIcons:n,Radio:a,RadioButton:l,Checkbox:r}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(1))},function(t,e,i){var n,a;(function(s,o,r){n=[i(4)],a=function(t){var e=s.View.extend({optionsDefault:{title_new:"",operations:null,onnew:null,max:null,onchange:null},initialize:function(e){this.visible=!1,this.$nav=null,this.$content=null,this.first_tab=null,this.current_id=null,this.options=t.merge(e,this.optionsDefault);var i=o(this._template(this.options));this.$nav=i.find(".tab-navigation"),this.$content=i.find(".tab-content"),this.setElement(i),this.list={};var n=this;if(this.options.operations&&o.each(this.options.operations,function(t,e){e.$el.prop("id",t),n.$nav.find(".operations").append(e.$el)}),this.options.onnew){var a=o(this._template_tab_new(this.options));this.$nav.append(a),a.tooltip({title:"Add a new tab",placement:"bottom",container:n.$el}),a.on("click",function(t){a.tooltip("hide"),n.options.onnew()})}},size:function(){return r.size(this.list)},current:function(){return this.$el.find(".tab-pane.active").attr("id")},add:function(t){var e=this,i=t.id,n=o(this._template_tab(t)),a=o(this._template_tab_content(t));if(this.list[i]=t.ondel?!0:!1,this.options.onnew?this.$nav.find("#new-tab").before(n):this.$nav.append(n),a.append(t.$el),this.$content.append(a),1==this.size()&&(n.addClass("active"),a.addClass("active"),this.first_tab=i),this.options.max&&this.size()>=this.options.max&&this.$el.find("#new-tab").hide(),t.ondel){var s=n.find("#delete");s.tooltip({title:"Delete this tab",placement:"bottom",container:e.$el}),s.on("click",function(){return s.tooltip("destroy"),e.$el.find(".tooltip").remove(),t.ondel(),!1})}n.on("click",function(n){n.preventDefault(),t.onclick?t.onclick():e.show(i)}),this.current_id||(this.current_id=i)},del:function(t){this.$el.find("#tab-"+t).remove(),this.$el.find("#"+t).remove(),this.first_tab==t&&(this.first_tab=null),null!=this.first_tab&&this.show(this.first_tab),this.list[t]&&delete this.list[t],this.size()
This Galaxy server allows you to upload files via FTP. To upload some files, log in to the FTP server at '+this.options.ftp_upload_site+' using your Galaxy credentials (email address and password).
'}})}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(1))},function(t,e,i){var n,a;(function(s){n=[i(4)],a=function(t){return s.View.extend({options:{class_check:"upload-icon-button fa fa-check-square-o",class_uncheck:"upload-icon-button fa fa-square-o"},initialize:function(t){this.app=t;var e=this;this.setElement(this._template()),this.model=this.app.model,this.$("#upload-space-to-tab").on("click",function(){e._switchState("#upload-space-to-tab","space_to_tab")}),this.$("#upload-to-posix-lines").on("click",function(){e._switchState("#upload-to-posix-lines","to_posix_lines")}),this.render()},events:{mousedown:function(t){t.preventDefault()}},render:function(){this._renderState("#upload-space-to-tab",this.model.get("space_to_tab")),this._renderState("#upload-to-posix-lines",this.model.get("to_posix_lines"));var t=this.$("#upload-settings-cover");this.model.get("enabled")?t.hide():t.show()},_switchState:function(t,e){if(this.model.get("enabled")){var i=!this.model.get(e);this.model.set(e,i),this._renderState(t,i)}},_renderState:function(t,e){var i=this.$(t);i.removeClass(),e?i.addClass(this.options.class_check):i.addClass(this.options.class_uncheck)},_template:function(){return'
Convert spaces to tabs
Use POSIX standard
'}})}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2))},,function(t,e,i){var n,a,s;(function(i,o){!function(i){a=[],n=i,s="function"==typeof n?n.apply(e,a):n,!(void 0!==s&&(t.exports=s))}(function(){i.fn.extend({hoverhighlight:function(t,e){return t=t||"body",this.size()?(o(this).each(function(){var i=o(this),n=i.data("target");n&&i.mouseover(function(i){o(n,t).css({background:e})}).mouseout(function(t){o(n).css({background:""})})}),this):this}})})}).call(e,i(1),i(1))},function(t,e,i){var n,a,s;(function(i,o){!function(i){a=[],n=i,s="function"==typeof n?n.apply(e,a):n,!(void 0!==s&&(t.exports=s))}(function(){function t(t,n){function a(t){var e=i(this).parent().children("input");e.focus().val("").trigger("clear:searchInput"),n.onclear()}function s(t,e){i(this).trigger("search:searchInput",e),"function"==typeof n.onfirstsearch&&g?(g=!1,n.onfirstsearch(e)):n.onsearch(e)}function r(){return['"].join("")}function l(){return i(r()).focus(function(t){i(this).select()}).keyup(function(t){if(t.preventDefault(),t.stopPropagation(),i(this).val()||i(this).blur(),t.which===u&&n.escWillClear)a.call(this,t);else{var e=i(this).val();t.which===p||n.minSearchLen&&e.length>=n.minSearchLen?s.call(this,t,e):e.length||a.call(this,t)}}).on("change",function(t){s.call(this,t,i(this).val())}).val(n.initialVal)}function c(){return i([''].join("")).tooltip({placement:"bottom"}).click(function(t){a.call(this,t)})}function h(){return i([''].join("")).hide().tooltip({placement:"bottom"})}function d(){f.find(".search-loading").toggle(),f.find(".search-clear").toggle()}var u=27,p=13,f=i(t),g=!0,m={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onfirstsearch:null,onsearch:function(t){},minSearchLen:0,escWillClear:!0,oninit:function(){}};return"string"===o.type(n)?("toggle-loading"===n&&d(),f):("object"===o.type(n)&&(n=o.extend(!0,{},m,n)),f.addClass("search-input").prepend([l(),c(),h()]))}var e=window._l||function(t){return t};o.fn.extend({searchInput:function(e){return this.each(function(){return t(this,e)})}})})}).call(e,i(1),i(1))},,function(t,e,i){var n,a;n=[],a=function(){function t(t,e){var i=/(-?[0-9\.]+)/g,n=t.toString().toLowerCase()||"",a=e.toString().toLowerCase()||"",s=String.fromCharCode(0),o=n.replace(i,s+"$1"+s).split(s),r=a.replace(i,s+"$1"+s).split(s),l=new Date(n).getTime(),c=l?new Date(a).getTime():null;if(c){if(c>l)return-1;if(l>c)return 1}for(var h,d,u=0,p=Math.max(o.length,r.length);p>u;u++){if(h=parseFloat(o[u])||o[u],d=parseFloat(r[u])||r[u],d>h)return-1;if(h>d)return 1}return 0}return t}.apply(e,n),!(void 0!==a&&(t.exports=a))},function(t,e,i){(function(t){!function(e){t.event.props.push("dataTransfer"),e.uploadpost=function(i){var n=e.extend({},{data:{},success:function(){},error:function(){},progress:function(){},url:null,maxfilesize:2048,error_filesize:"File exceeds 2GB. Please use an FTP client.",error_default:"Please make sure the file is available.",error_server:"Upload request failed.",error_login:"Uploads require you to log in."},i),a=n.data;if(a.error_message)return void n.error(a.error_message);var s=new FormData;for(var o in a.payload)s.append(o,a.payload[o]);var r=0;for(var o in a.files){var l=a.files[o];s.append(l.name,l.file,l.file.name),r+=l.file.size}return r>1048576*n.maxfilesize?void n.error(n.error_filesize):(xhr=new XMLHttpRequest,xhr.open("POST",n.url,!0),xhr.setRequestHeader("Accept","application/json"),xhr.setRequestHeader("Cache-Control","no-cache"),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.onreadystatechange=function(){if(xhr.readyState==xhr.DONE){var e=null;if(xhr.responseText)try{e=t.parseJSON(xhr.responseText)}catch(i){e=xhr.responseText}if(xhr.status<200||xhr.status>299){var a=xhr.statusText;403==xhr.status?a=n.error_login:0==xhr.status?a=n.error_server:a||(a=n.error_default),n.error(a+" ("+xhr.status+")")}else n.success(e)}},xhr.upload.addEventListener("progress",function(t){t.lengthComputable&&n.progress(Math.round(100*t.loaded/t.total))},!1),console.debug("uploadbox::uploadpost() - Posting following data:"),console.debug(n),void xhr.send(s))},e.fn.uploadinput=function(t){var i=this,n=e.extend({},{ondragover:function(){},ondragleave:function(){},onchange:function(){},multiple:!1},t),a=e('");return i.append(a).change(function(t){n.onchange(t.target.files),e(this).val("")}),i.on("drop",function(t){n.ondragleave(t),t.dataTransfer&&(n.onchange(t.dataTransfer.files),t.preventDefault())}),i.on("dragover",function(t){t.preventDefault(),n.ondragover(t)}),i.on("dragleave",function(t){t.stopPropagation(),n.ondragleave(t)}),{dialog:function(){a.trigger("click")}}},e.fn.uploadbox=function(t){function i(t){if(t&&t.length&&!g){for(var e=p,i=0;i0?"You opened "+n.frames.length()+" frame(s) which will be lost.":void 0}}),Galaxy.masthead.append(this.button_active),this.button_load=new t.GalaxyMastheadIcon({icon:"fa-eye",tooltip:"Show/Hide Scratchbook",onclick:function(t){n.frames.visible?n.frames.hide():n.frames.show()},with_number:!0}),Galaxy.masthead.append(this.button_load),this.setElement(this.frames.$el),o(this.el_main).append(this.$el),this.frames.setOnChange(function(){n._refresh()}),this._refresh()},add_dataset:function(t){var e=this;!function(){(function(n,a){var s=[i(15)];(function(i){var s=new i.Dataset({id:t});n.when(s.fetch()).then(function(){var t={title:s.get("name")},n=a.find(["tabular","interval"],function(t){return-1!==s.get("data_type").indexOf(t)});if(n){var o=new i.TabularDataset(s.toJSON());a.extend(t,{type:"other",content:function(t){i.createTabularDatasetChunkedView({model:o,parent_elt:t,embedded:!0,height:"100%"})}})}else a.extend(t,{type:"url",content:galaxy_config.root+"datasets/"+s.id+"/display/?preview=True"});e.add(t)})}).apply(null,s)}).call(this,i(1),i(3))}()},add_trackster_viz:function(t){var e=this;i.e(1,function(i){(function(n,a){var s=[i(36),i(127)];(function(i,s){var o=new i.Visualization({id:t});n.when(o.fetch()).then(function(){var t=new s.TracksterUI(galaxy_config.root),i={title:o.get("name"),type:"other",content:function(e){var i={container:e,name:o.get("title"),id:o.id,dbkey:o.get("dbkey"),stand_alone:!1},n=o.get("latest_revision"),s=n.config.view.drawables;a.each(s,function(t){t.dataset={hda_ldda:t.hda_ldda,id:t.dataset_id}}),view=t.create_visualization(i,n.config.viewport,n.config.view.drawables,n.config.bookmarks,!1)}};e.add(i)})}).apply(null,s)}).call(this,i(1),i(3))})},add:function(t){if("_blank"==t.target)return void window.open(t.content);if("_top"==t.target||"_parent"==t.target||"_self"==t.target)return void(window.location=t.content);if(this.active)this.frames.add(t);else{var e=o(window.parent.document).find("#galaxy_main");if("galaxy_main"==t.target||"center"==t.target)if(0===e.length){var i=t.content;i+=-1==i.indexOf("?")?"?":"&",i+="use_panels=True",window.location=i}else e.attr("src",t.content);else window.location=t.content}},_activate:function(){this.active?(this.active=!1,this.button_active.untoggle(),this.frames.hide()):(this.active=!0,this.button_active.toggle())},_refresh:function(){this.button_load.number(this.frames.length()),0===this.frames.length()?this.button_load.hide():this.button_load.show(),this.frames.visible?this.button_load.toggle():this.button_load.untoggle()}});return{GalaxyFrame:n}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2),i(1))},function(t,e,i){var n,a;(function(s){n=[i(19)],a=function(t){var e=s.Model.extend({initialize:function(t){this.options=t.config,this.masthead=t.masthead,this.create()},create:function(){var e=new t.GalaxyMastheadTab({id:"analysis",title:"Analyze Data",content:"",title_attribute:"Analysis home view"});this.masthead.append(e);var i={id:"workflow",title:"Workflow",content:"workflow",title_attribute:"Chain tools into workflows"};Galaxy.user.id||(i.disabled=!0);var n=new t.GalaxyMastheadTab(i);this.masthead.append(n);var a=new t.GalaxyMastheadTab({id:"shared",title:"Shared Data",content:"library/index",title_attribute:"Access published resources"});if(a.add({title:"Data Libraries",content:"library/index"}),a.add({title:"Data Libraries Beta",content:"library/list",divider:!0}),a.add({title:"Published Histories",content:"history/list_published"}),a.add({title:"Published Workflows",content:"workflow/list_published"}),a.add({title:"Published Visualizations",content:"visualization/list_published"}),a.add({title:"Published Pages",content:"page/list_published"}),this.masthead.append(a),this.options.user_requests){var s=new t.GalaxyMastheadTab({id:"lab",title:"Lab"});s.add({title:"Sequencing Requests",content:"requests/index"}),s.add({title:"Find Samples",content:"requests/find_samples_index"}),s.add({title:"Help",content:this.options.lims_doc_url}),this.masthead.append(s)}var o={id:"visualization",title:"Visualization",content:"visualization/list",title_attribute:"Visualize datasets"};Galaxy.user.id||(o.disabled=!0);var r=new t.GalaxyMastheadTab(o);if(Galaxy.user.id&&(r.add({title:"New Track Browser",content:"visualization/trackster",target:"_frame"}),r.add({title:"Saved Visualizations",content:"visualization/list",target:"_frame"})),this.masthead.append(r),Galaxy.user.get("is_admin")){var l=new t.GalaxyMastheadTab({id:"admin",title:"Admin",content:"admin",extra_class:"admin-only",title_attribute:"Administer this Galaxy"});this.masthead.append(l)}var c=new t.GalaxyMastheadTab({id:"help",title:"Help",title_attribute:"Support, contact, and community hubs"});if(this.options.biostar_url&&(c.add({title:"Galaxy Biostar",content:this.options.biostar_url_redirect,target:"_blank"}),c.add({title:"Ask a question",content:"biostar/biostar_question_redirect",target:"_blank"})),c.add({title:"Support",content:this.options.support_url,target:"_blank"}),c.add({title:"Search",content:this.options.search_url,target:"_blank"}),c.add({title:"Mailing Lists",content:this.options.mailing_lists,target:"_blank"}),c.add({title:"Videos",content:this.options.screencasts_url,target:"_blank"}),c.add({title:"Wiki",content:this.options.wiki_url,target:"_blank"}),c.add({title:"How to Cite Galaxy",content:this.options.citation_url,target:"_blank"}),this.options.terms_url&&c.add({title:"Terms and Conditions",content:this.options.terms_url,target:"_blank"}),this.masthead.append(c),Galaxy.user.id){var h=new t.GalaxyMastheadTab({id:"user",title:"User",extra_class:"loggedin-only",title_attribute:"Account preferences and saved data"});h.add({title:"Logged in as "+Galaxy.user.get("email")}),h.add({title:"Preferences",content:"user?cntrller=user",target:"galaxy_main"}),h.add({title:"Custom Builds",content:"user/dbkeys",target:"galaxy_main"}),h.add({title:"Logout",content:"user/logout",target:"_top",divider:!0}),h.add({title:"Saved Histories",content:"history/list",target:"galaxy_main"}),h.add({title:"Saved Datasets",content:"dataset/list",target:"galaxy_main"}),h.add({title:"Saved Pages",content:"page/list",target:"_top"}),h.add({title:"API Keys",content:"user/api_keys?cntrller=user",target:"galaxy_main"}),this.options.use_remote_user&&h.add({title:"Public Name",content:"user/edit_username?cntrller=user",target:"galaxy_main"}),this.masthead.append(h)}else{var h=new t.GalaxyMastheadTab({id:"user",title:"User",extra_class:"loggedout-only",title_attribute:"Account registration or login"});h.add({title:"Login",content:"user/login",target:"galaxy_main"}),this.options.allow_user_creation&&h.add({title:"Register",content:"user/create",target:"galaxy_main"}),this.masthead.append(h)}this.options.active_view&&this.masthead.highlight(this.options.active_view)}});return{GalaxyMenu:e}}.apply(e,n),!(void 0!==a&&(t.exports=a))}).call(e,i(2))},,,,,,,,function(t,e,i){var n,a;(function(s,o){n=[i(4),i(52),i(112),i(7),i(98),i(95),i(29)],a=function(t,e,i,n,a,r,l){var c=s.View.extend({initialize:function(e){this.options=t.merge(e,{}),this.setElement(this._template());var i=this;this.$("#galaxy_main").on("load",function(){var t=this.contentWindow&&this.contentWindow.location;t&&t.host&&(o(this).show(),i.prev&&i.prev.remove(),i.$("#center-panel").hide(),Galaxy.trigger("galaxy_main:load",{fullpath:t.pathname+t.search+t.hash,pathname:t.pathname,search:t.search,hash:t.hash}))});var n=o.extend({},Galaxy.params);"upload1"!==n.tool_id&&(n.tool_id||n.job_id)?(n.tool_id&&(n.id=n.tool_id),this.display(new l.View(n))):this.$("#galaxy_main").prop("src",Galaxy.root+(n.workflow_id&&"workflow/run?id="+n.workflow_id||n.m_c&&n.m_c+"/"+n.m_a||"root/welcome"))},display:function(t){this.prev&&this.prev.remove(),this.prev=t,this.$("#galaxy_main").hide(),this.$("#center-panel").scrollTop(0).append(t.$el).show()},_template:function(){return'
'}}),h=s.View.extend({initialize:function(n){if(this.options=t.merge(n,{}),this.setElement(this._template()),Galaxy.user.id||!Galaxy.config.require_login){var a=new e.ToolSearch({spinner_url:n.spinner_url,search_url:n.search_url,hidden:!1}),s=new e.ToolCollection(n.toolbox),r=new e.ToolPanel({tool_search:a,tools:s,layout:n.toolbox_in_panel});tool_panel_view=new e.ToolPanelView({model:r}),Galaxy.toolPanel=r,r.get("layout").size()>0&&(tool_panel_view.render(),this.$(".toolMenu").show()),this.$el.prepend(tool_panel_view.$el),this.$("#internal-workflows").append(this._templateTool({title:"All workflows",href:"workflow/list_for_run"}));for(var l in n.stored_workflow_menu_entries){var c=n.stored_workflow_menu_entries[l];this.$("#internal-workflows").append(this._templateTool({title:c.stored_workflow.name,href:"workflow/run?id="+c.encoded_stored_workflow_id}))}this.$("a[minsizehint]").click(function(){parent.handle_minwidth_hint&&parent.handle_minwidth_hint(o(this).attr("minsizehint"))}),Galaxy.upload=new i(n),this.components={header:{title:"Tools",buttons:[Galaxy.upload]}}}},_templateTool:function(t){return'
',"Warning: This is a experimental feature. Most Galaxy tools will not annotate"," citations explicitly at this time. When writing up your analysis, please manually"," review your histories and find all references"," that should be cited in order to completely describe your work. Also, please remember to",' cite Galaxy.',"