diff --git a/client/galaxy/scripts/apps/history-panel.js b/client/galaxy/scripts/apps/history-panel.js index c0b4611bb8c..7dcf94758d4 100644 --- a/client/galaxy/scripts/apps/history-panel.js +++ b/client/galaxy/scripts/apps/history-panel.js @@ -1,6 +1,6 @@ var RightPanel = require( 'layout/panel' ).RightPanel, Ui = require( 'mvc/ui/ui-misc' ), - historyOptionsMenu = require( 'mvc/history/options-menu' ); + historyOptionsMenu = require( 'mvc/history/options-menu' ), CurrentHistoryView = require( 'mvc/history/history-view-edit-current' ).CurrentHistoryView, _l = require( 'utils/localization' ); diff --git a/static/scripts/bundled/analysis.bundled.js b/static/scripts/bundled/analysis.bundled.js index 47956b385c5..6098c028a66 100644 --- a/static/scripts/bundled/analysis.bundled.js +++ b/static/scripts/bundled/analysis.bundled.js @@ -1,4 +1,4 @@ webpackJsonp([2,1],[,,,,,,function(e,t,i){"use strict";(function(n,s,o){var a,r;a=[i(4),i(41),i(94),i(40),i(90),i(17),i(8)],void 0!==(r=function(e,t,i,a,r,l,c){var d=n.View.extend({tagName:"label",initialize:function(e){this.model=e&&e.model||new n.Model(e),this.tagName=e.tagName||this.tagName,this.setElement(s("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},title:function(e){this.model.set("title",e)},value:function(){return this.model.get("title")},render:function(){return this.$el.removeClass().addClass("ui-label").addClass(this.model.get("cls")).html(this.model.get("title")),this}}),h=n.View.extend({initialize:function(e){this.model=e&&e.model||new n.Model({message:null,status:"info",cls:"",persistent:!1,fade:!0}).set(e),this.listenTo(this.model,"change",this.render,this),this.render()},update:function(e){this.model.set(e)},render:function(){this.$el.removeClass().addClass("ui-message").addClass(this.model.get("cls"));var e=this.model.get("status");if(this.model.get("large")?this.$el.addClass(("success"==e&&"done"||"danger"==e&&"error"||e)+"messagelarge"):this.$el.addClass("alert").addClass("alert-"+e),this.model.get("message")){if(this.$el.html(this.messageForDisplay()),this.$el[this.model.get("fade")?"fadeIn":"show"](),this.timeout&&window.clearTimeout(this.timeout),!this.model.get("persistent")){var t=this;this.timeout=window.setTimeout(function(){t.model.set("message","")},3e3)}}else this.$el.fadeOut();return this},messageForDisplay:function(){return o.escape(this.model.get("message"))}}),u=h.extend({messageForDisplay:function(){return this.model.get("message")}}),p=n.View.extend({initialize:function(e){this.model=e&&e.model||new n.Model({type:"text",placeholder:"",disabled:!1,readonly:!1,visible:!0,cls:"",area:!1,color:null,style:null}).set(e),this.tagName=this.model.get("area")?"textarea":"input",this.setElement(s("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},events:{input:"_onchange"},value:function(e){return void 0!==e&&this.model.set("value","string"==typeof e?e:""),this.model.get("value")},render:function(){var e=this;this.$el.removeClass().addClass("ui-"+this.tagName).addClass(this.model.get("cls")).addClass(this.model.get("style")).attr("id",this.model.id).attr("type",this.model.get("type")).attr("placeholder",this.model.get("placeholder")).css("color",this.model.get("color")||"").css("border-color",this.model.get("color")||"");var t=this.model.get("datalist");return s.isArray(t)&&t.length>0&&this.$el.autocomplete({source:function(t,i){i(e.model.get("datalist"))},change:function(){e._onchange()}}),this.model.get("value")!==this.$el.val()&&this.$el.val(this.model.get("value")),o.each(["readonly","disabled"],function(t){e.model.get(t)?e.$el.attr(t,!0):e.$el.removeAttr(t)}),this.$el[this.model.get("visible")?"show":"hide"](),this},_onchange:function(){this.value(this.$el.val()),this.model.get("onchange")&&this.model.get("onchange")(this.model.get("value"))}}),g=n.View.extend({initialize:function(e){this.model=e&&e.model||new n.Model(e),this.setElement(s("
").append(this.$info=s("
")).append(this.$hidden=s("
"))),this.listenTo(this.model,"change",this.render,this),this.render()},value:function(e){return void 0!==e&&this.model.set("value",e),this.model.get("value")},render:function(){return this.$el.attr("id",this.model.id),this.$hidden.val(this.model.get("value")),this.model.get("info")?this.$info.show().html(this.model.get("info")):this.$info.hide(),this}});return{Button:l.ButtonDefault,ButtonIcon:l.ButtonIcon,ButtonCheck:l.ButtonCheck,ButtonMenu:l.ButtonMenu,ButtonLink:l.ButtonLink,Input:p,Label:d,Message:h,UnescapedMessage:u,Modal:c,RadioButton:a.RadioButton,Checkbox:a.Checkbox,Radio:a.Radio,Select:t,Hidden:g,Slider:i,Drilldown:r}}.apply(t,a))&&(e.exports=r)}).call(t,i(2),i(0),i(1))},,,function(e,t,i){"use strict";var n,s;n=[],void 0!==(s=function(){var e={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};return e.READY_STATES=[e.OK,e.EMPTY,e.PAUSED,e.FAILED_METADATA,e.NOT_VIEWABLE,e.DISCARDED,e.ERROR],e.NOT_READY_STATES=[e.UPLOAD,e.QUEUED,e.RUNNING,e.SETTING_METADATA,e.NEW],e}.apply(t,n))&&(e.exports=s)},function(e,t,i){"use strict";(function(n,s,o){var a,r;a=[i(4)],void 0!==(r=function(e){return{View:n.View.extend({optionsDefault:{with_close:!0,title:null,placement:"top",container:"body",body:null},initialize:function(t){this.setElement(this._template()),this.uid=e.uid(),this.options=s.defaults(t||{},this.optionsDefault),this.options.container.parent().append(this.el),this.$title=this.$(".popover-title-label"),this.$close=this.$(".popover-close"),this.$body=this.$(".popover-content"),this.options.body&&this.append(this.options.body);var i=this;o("body").on("mousedown."+this.uid,function(e){i.visible&&!o(i.options.container).is(e.target)&&!o(i.el).is(e.target)&&0===o(i.el).has(e.target).length&&i.hide()})},render:function(){this.$title.html(this.options.title),this.$el.removeClass().addClass("ui-popover popover fade in").addClass(this.options.placement),this.$el.css(this._get_placement(this.options.placement));var e=this;this.options.with_close?this.$close.on("click",function(){e.hide()}).show():this.$close.off().hide()},title:function(e){void 0!==e&&(this.options.title=e,this.$title.html(e))},show:function(){this.render(),this.$el.show(),this.visible=!0},hide:function(){this.$el.hide(),this.visible=!1},append:function(e){this.$body.append(e)},empty:function(){this.$body.empty()},remove:function(){o("body").off("mousedown."+this.uid),this.$el.remove()},_get_placement:function(e){var t=this._get_width(this.$el),i=this.$el.height(),n=this.options.container,s=this._get_width(n),o=this._get_height(n),a=n.position(),r=left=0;if(-1!=["top","bottom"].indexOf(e))switch(left=a.left-t+(s+t)/2,e){case"top":r=a.top-i-5;break;case"bottom":r=a.top+o+5}else switch(r=a.top-i+(o+i)/2,e){case"right":left=a.left+s}return{top:r,left:left}},_get_width:function(e){return e.width()+parseInt(e.css("padding-left"))+parseInt(e.css("margin-left"))+parseInt(e.css("padding-right"))+parseInt(e.css("margin-right"))},_get_height:function(e){return e.height()+parseInt(e.css("padding-top"))+parseInt(e.css("padding-bottom"))},_template:function(e){return'
'}})}}.apply(t,a))&&(e.exports=r)}).call(t,i(2),i(1),i(0))},function(e,t,i){"use strict";(function(n,s){var o,a;o=[i(4)],void 0!==(a=function(e){return{View:n.View.extend({optionsDefault:{css:"",placeholder:"No data available",data:[],value:null,multiple:!1,minimumInputLength:0,initialData:""},initialize:function(t){if(this.options=e.merge(t,this.optionsDefault),this.setElement(this._template(this.options)),!this.options.container)return void console.log("ui-select::initialize() : container not specified.");if(this.options.container.append(this.$el),this.select_data=this.options.data,this._refresh(),!this.options.multiple){this.options.value&&this._setValue(this.options.value);var i=this;this.options.onchange&&this.$el.on("change",function(){i.options.onchange(i.value())})}},value:function(e){var t=this._getValue();void 0!==e&&this._setValue(e);var i=this._getValue();return i!=t&&this.options.onchange&&this.options.onchange(i),i},text:function(){return this.$el.select2("data").text},disabled:function(){return!this.$el.select2("enable")},enable:function(){this.$el.select2("enable",!0)},disable:function(){this.$el.select2("enable",!1)},add:function(e){this.select_data.push({id:e.id,text:e.text}),this._refresh()},del:function(e){var t=this._getIndex(e);-1!=t&&(this.select_data.splice(t,1),this._refresh())},remove:function(){this.$el.select2("destroy")},update:function(e){this.select_data=[];for(var t in e.data)this.select_data.push(e.data[t]);this._refresh()},_refresh:function(){if(this.options.multiple){var e={multiple:this.options.multiple,containerCssClass:this.options.css,placeholder:this.options.placeholder,minimumInputLength:this.options.minimumInputLength,ajax:this.options.ajax,dropdownCssClass:this.options.dropdownCssClass,escapeMarkup:this.options.escapeMarkup,formatResult:this.options.formatResult,formatSelection:this.options.formatSelection,initSelection:this.options.initSelection,initialData:this.options.initialData};this.$el.select2(e)}else{var t=this._getValue(),e={data:this.select_data,containerCssClass:this.options.css,placeholder:this.options.placeholder,dropdownAutoWidth:!0};this.$el.select2(e),this._setValue(t)}},_getIndex:function(e){s.findIndex(this.select_data,{id:e})},_getValue:function(){return this.$el.select2("val")},_setValue:function(e){-1==this._getIndex(e)&&this.select_data.length>0&&(e=this.select_data[0].id),this.$el.select2("val",e)},_template:function(e){return''}})}}.apply(t,o))&&(e.exports=a)}).call(t,i(2),i(1))},function(e,t,i){"use strict";(function(i){var n,s;n=[],void 0!==(s=function(){var e=i.Model.extend({defaults:{extension:"auto",genome:"?",url_paste:"",status:"init",info:null,file_name:"",file_mode:"",file_size:0,file_type:null,file_path:"",file_data:null,percentage:0,space_to_tab:!1,to_posix_lines:!0,enabled:!0},reset:function(e){this.clear().set(this.defaults).set(e)}});return{Model:e,Collection:i.Collection.extend({model:e})}}.apply(t,n))&&(e.exports=s)}).call(t,i(2))},function(e,t,i){"use strict";(function(i,n){var s,o,a;!function(i,n){o=[],s=n,void 0!==(a="function"==typeof s?s.apply(t,o):s)&&(e.exports=a)}(0,function(){return function(e){e=e||{},e.tooltipConfig=e.tooltipConfig||{placement:"bottom"},e.classes=["icon-btn"].concat(e.classes||[]),e.disabled&&e.classes.push("disabled");var t=['','',""].join(""),s=i(t).tooltip(e.tooltipConfig);return n.isFunction(e.onclick)&&s.click(e.onclick),s}})}).call(t,i(0),i(1))},function(e,t,i){"use strict";(function(n,s,o){var a,r;a=[i(4),i(6)],void 0!==(r=function(e,t){return{View:n.View.extend({visible:!1,initialize:function(i){var s=this;this.model=i&&i.model||new n.Model({id:e.uid(),cls:"ui-portlet",title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,collapsible:!1,collapsible_button:!1,collapsed:!1,onchange_title:null}).set(i),this.setElement(this._template()),this.$body=this.$(".portlet-body"),this.$title_text=this.$(".portlet-title-text"),this.$title_icon=this.$(".portlet-title-icon"),this.$header=this.$(".portlet-header"),this.$content=this.$(".portlet-content"),this.$backdrop=this.$(".portlet-backdrop"),this.$buttons=this.$(".portlet-buttons"),this.$operations=this.$(".portlet-operations"),this.model.get("body")&&this.append(this.model.get("body")),this.collapsible_button=new t.ButtonIcon({icon:"fa-eye",tooltip:"Collapse/Expand",cls:"ui-button-icon-plain",onclick:function(){s[s.collapsed?"expand":"collapse"]()}}),this.render()},render:function(){var e=this,t=this.model.attributes;return this.$el.removeClass().addClass(t.cls).attr("id",t.id),this.$header[t.title?"show":"hide"](),this.$title_text.html(t.title),s.each([this.$content,this.$body],function(e){e[t.nopadding?"addClass":"removeClass"]("no-padding")}),t.icon?this.$title_icon.removeClass().addClass("portlet-title-icon fa").addClass(t.icon).show():this.$title_icon.hide(),this.$title_text[t.collapsible?"addClass":"removeClass"]("no-highlight collapsible").off(),t.collapsible&&(this.$title_text.on("click",function(){e[e.collapsed?"expand":"collapse"]()}),t.collapsed?this.collapse():this.expand()),this.$title_text.prop("disabled",!t.onchange_title),t.onchange_title&&this.$title_text.make_text_editable({on_finish:function(e){t.onchange_title(e)}}),t.buttons?(this.$buttons.empty().show(),o.each(this.model.get("buttons"),function(t,i){i.$el.prop("id",t),e.$buttons.append(i.$el)})):this.$buttons.hide(),this.$operations.empty,t.collapsible_button&&this.$operations.append(this.collapsible_button.$el),t.operations&&o.each(t.operations,function(t,i){i.$el.prop("id",t),e.$operations.append(i.$el)}),this},append:function(e){this.$body.append(e)},empty:function(){this.$body.empty()},header:function(){return this.$header},body:function(){return this.$body},show:function(){this.visible=!0,this.$el.fadeIn("fast")},hide:function(){this.visible=!1,this.$el.hide()},enableButton:function(e){this.$buttons.find("#"+e).prop("disabled",!1)},disableButton:function(e){this.$buttons.find("#"+e).prop("disabled",!0)},hideOperation:function(e){this.$operations.find("#"+e).hide()},showOperation:function(e){this.$operations.find("#"+e).show()},setOperation:function(e,t){this.$operations.find("#"+e).off("click").on("click",t)},title:function(e){return e&&this.$title_text.html(e),this.$title_text.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.collapsible_button.setIcon("fa-eye-slash")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.collapsible_button.setIcon("fa-eye")},disable:function(){this.$backdrop.show()},enable:function(){this.$backdrop.hide()},_template:function(){return o("
").append(o("
").addClass("portlet-header").append(o("
").addClass("portlet-operations")).append(o("
").addClass("portlet-title").append(o("").addClass("portlet-title-icon")).append(o("").addClass("portlet-title-text")))).append(o("
").addClass("portlet-content").append(o("
").addClass("portlet-body")).append(o("
").addClass("portlet-buttons"))).append(o("
").addClass("portlet-backdrop"))}})}}.apply(t,a))&&(e.exports=r)}).call(t,i(2),i(1),i(0))},,,function(e,t,i){"use strict";(function(n,s){var o,a;o=[i(4)],void 0!==(a=function(e){var t=n.View.extend({initialize:function(t){this.model=t&&t.model||new n.Model({id:e.uid(),title:"",floating:"right",icon:"",cls:"btn btn-default",wait:!1,wait_text:"Sending...",wait_cls:"btn btn-info",disabled:!1,percentage:-1}).set(t),this.setElement(s(""].join(""))})},_renderPairedEmpty:function(){var e=a('
').text("("+l("no paired datasets yet")+")");return this.$(".paired-columns .column-datasets").empty().prepend(e),e},footerSettings:{".hide-originals":"hideOriginals",".remove-extensions":"removeExtensions"},_addPluginComponents:function(){this._chooseFiltersPopover(".choose-filters-link"),this.$(".help-content i").hoverhighlight(".collection-creator","rgba( 64, 255, 255, 1.0 )")},_chooseFiltersPopover:function(e){function t(e,t){return['"].join("")}var i=a(s.template(['
','
',l("Choose from the following filters to change which unpaired reads are shown in the display"),":
",s.values(this.commonFilters).map(function(e){return t(e[0],e[1])}).join(""),"
"].join(""))({}));return this.$(e).popover({container:".collection-creator",placement:"bottom",html:!0,content:i})},_validationWarning:function(e,t){"name"===e&&(e=this.$(".collection-name").add(this.$(".collection-name-prompt")),this.$(".collection-name").focus().select()),t?(e=e||this.$(".validation-warning"),e.removeClass("validation-warning")):e.addClass("validation-warning")},_setUpBehaviors:function(){return this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("pair:new",function(){this._renderUnpaired(),this._renderPaired(),this.$(".paired-columns").scrollTop(8e6)}),this.on("pair:unpair",function(e){this._renderUnpaired(),this._renderPaired(),this.splitView()}),this.on("filter-change",function(){this.filters=[this.$(".forward-unpaired-filter input").val(),this.$(".reverse-unpaired-filter input").val()],this.metric("filter-change",this.filters),this._renderFilters(),this._renderUnpaired()}),this.on("autopair",function(){this._renderUnpaired(),this._renderPaired();var e,t=null;this.paired.length?(t="alert-success",e=this.paired.length+" "+l("pairs created"),this.unpaired.length||(e+=": "+l("all datasets have been successfully paired"),this.hideUnpaired(),this.$(".collection-name").focus())):e=l(["Could not automatically create any pairs from the given dataset names.","You may want to choose or enter different filters and try auto-pairing again.","Close this message using the X on the right to view more help."].join(" ")),this._showAlert(e,t)}),this},events:{"click .more-help":"_clickMoreHelp","click .less-help":"_clickLessHelp","click .main-help":"_toggleHelp","click .header .alert button":"_hideAlert","click .forward-column .column-title":"_clickShowOnlyUnpaired","click .reverse-column .column-title":"_clickShowOnlyUnpaired","click .unpair-all-link":"_clickUnpairAll","change .forward-unpaired-filter input":function(e){this.trigger("filter-change")},"focus .forward-unpaired-filter input":function(e){a(e.currentTarget).select()},"click .autopair-link":"_clickAutopair","click .choose-filters .filter-choice":"_clickFilterChoice","click .clear-filters-link":"_clearFilters","change .reverse-unpaired-filter input":function(e){this.trigger("filter-change")},"focus .reverse-unpaired-filter input":function(e){a(e.currentTarget).select()},"click .forward-column .dataset.unpaired":"_clickUnpairedDataset","click .reverse-column .dataset.unpaired":"_clickUnpairedDataset","click .paired-column .dataset.unpaired":"_clickPairRow","click .unpaired-columns":"clearSelectedUnpaired","mousedown .unpaired-columns .dataset":"_mousedownUnpaired","click .paired-column-title":"_clickShowOnlyPaired","mousedown .flexible-partition-drag":"_startPartitionDrag","click .paired-columns .dataset.paired":"selectPair","click .paired-columns":"clearSelectedPaired","click .paired-columns .pair-name":"_clickPairName","click .unpair-btn":"_clickUnpair","dragover .paired-columns .column-datasets":"_dragoverPairedColumns","drop .paired-columns .column-datasets":"_dropPairedColumns","pair.dragstart .paired-columns .column-datasets":"_pairDragstart","pair.dragend .paired-columns .column-datasets":"_pairDragend","change .remove-extensions":function(e){this.toggleExtensions()},"change .collection-name":"_changeName","keydown .collection-name":"_nameCheckForEnter","change .hide-originals":"_changeHideOriginals","click .cancel-create":"_cancelCreate","click .create-collection":"_clickCreate"},_clickShowOnlyUnpaired:function(e){this.$(".paired-columns").is(":visible")?this.hidePaired():this.splitView()},_clickShowOnlyPaired:function(e){this.$(".unpaired-columns").is(":visible")?this.hideUnpaired():this.splitView()},hideUnpaired:function(e,t){this.unpairedPanelHidden=!0,this.pairedPanelHidden=!1,this._renderMiddle(e,t)},hidePaired:function(e,t){this.unpairedPanelHidden=!1,this.pairedPanelHidden=!0,this._renderMiddle(e,t)},splitView:function(e,t){return this.unpairedPanelHidden=this.pairedPanelHidden=!1,this._renderMiddle(e,t),this},_clickUnpairAll:function(e){this.metric("unpairAll"),this.unpairAll()},_clickAutopair:function(e){var t=this.autoPair();this.metric("autopair",t.length,this.unpaired.length),this.trigger("autopair")},_clickFilterChoice:function(e){var t=a(e.currentTarget);this.$(".forward-unpaired-filter input").val(t.data("forward")),this.$(".reverse-unpaired-filter input").val(t.data("reverse")),this._hideChooseFilters(),this.trigger("filter-change")},_hideChooseFilters:function(){this.$(".choose-filters-link").popover("hide"),this.$(".popover").css("display","none")},_clearFilters:function(e){this.$(".forward-unpaired-filter input").val(""),this.$(".reverse-unpaired-filter input").val(""),this.trigger("filter-change")},_clickUnpairedDataset:function(e){return e.stopPropagation(),this.toggleSelectUnpaired(a(e.currentTarget))},toggleSelectUnpaired:function(e,t){t=t||{};var i=e.data("dataset"),n=void 0!==t.force?t.force:!e.hasClass("selected");return e.length&&void 0!==i?(n?(e.addClass("selected"),t.waitToPair||this.pairAllSelected()):e.removeClass("selected"),e):e},pairAllSelected:function(e){e=e||{};var t=this,i=[],n=[],s=[];return t.$(".unpaired-columns .forward-column .dataset.selected").each(function(){i.push(a(this).data("dataset"))}),t.$(".unpaired-columns .reverse-column .dataset.selected").each(function(){n.push(a(this).data("dataset"))}),i.length=n.length=Math.min(i.length,n.length),i.forEach(function(e,i){try{s.push(t._pair(e,n[i],{silent:!0}))}catch(e){t.error(e)}}),s.length&&!e.silent&&this.trigger("pair:new",s),s},clearSelectedUnpaired:function(){this.$(".unpaired-columns .dataset.selected").removeClass("selected")},_mousedownUnpaired:function(e){if(e.shiftKey){var t=this,i=a(e.target).addClass("selected"),n=function(e){t.$(e.target).filter(".dataset").addClass("selected")};i.parent().on("mousemove",n),a(document).one("mouseup",function(e){i.parent().off("mousemove",n),t.pairAllSelected()})}},_clickPairRow:function(e){var t=a(e.currentTarget).index(),i=a(".unpaired-columns .forward-column .dataset").eq(t).data("dataset"),n=a(".unpaired-columns .reverse-column .dataset").eq(t).data("dataset");this._pair(i,n)},_startPartitionDrag:function(e){function t(e){n.$(".flexible-partition-drag").css("color",""),a("body").css("cursor","").unbind("mousemove",i)}function i(e){var t=e.pageY-s;n.adjPartition(t)||a("body").trigger("mouseup"),n._adjUnpairedOnScrollbar(),s+=t}var n=this,s=e.pageY;a("body").css("cursor","ns-resize"),n.$(".flexible-partition-drag").css("color","black"),a("body").mousemove(i),a("body").one("mouseup",t)},adjPartition:function(e){var t=this.$(".unpaired-columns"),i=this.$(".paired-columns"),n=parseInt(t.css("height"),10),s=parseInt(i.css("height"),10);n=Math.max(10,n+e),s-=e;var o=e<0;if(o){if(this.unpairedPanelHidden)return!1;if(n<=10)return this.hideUnpaired(),!1}else this.unpairedPanelHidden&&(t.show(),this.unpairedPanelHidden=!1);if(o)this.pairedPanelHidden&&(i.show(),this.pairedPanelHidden=!1);else{if(this.pairedPanelHidden)return!1;if(s<=15)return this.hidePaired(),!1}return t.css({height:n+"px",flex:"0 0 auto"}),!0},selectPair:function(e){e.stopPropagation(),a(e.currentTarget).toggleClass("selected")},clearSelectedPaired:function(e){this.$(".paired-columns .dataset.selected").removeClass("selected")},_clickPairName:function(e){e.stopPropagation();var t=a(e.currentTarget),i=t.parent().parent(),n=i.index(".dataset.paired"),s=this.paired[n],o=prompt("Enter a new name for the pair:",s.name);o&&(s.name=o,s.customizedName=!0,t.text(s.name))},_clickUnpair:function(e){var t=Math.floor(a(e.currentTarget).index(".unpair-btn"));this._unpair(this.paired[t])},_dragoverPairedColumns:function(e){e.preventDefault();var t=this.$(".paired-columns .column-datasets");this._checkForAutoscroll(t,e.originalEvent.clientY);var i=this._getNearestPairedDatasetLi(e.originalEvent.clientY);a(".element-drop-placeholder").remove();var n=a('
');i.length?i.before(n):t.append(n)},_checkForAutoscroll:function(e,t){var i=e.offset(),n=e.scrollTop(),s=t-i.top,o=i.top+e.outerHeight()-t;s>=0&&s=0&&oe&&s-o",e.name)},toString:function(){return"PairedCollectionCreator"},templates:s.extend({},i.CollectionCreatorMixin._creatorTemplates,{header:s.template(['",'
','','',"
",'
','
','
','
','',l("Unpaired forward"),"",'',"
",'
','',"
","
","
",'",'
','
','
','',l("Unpaired reverse"),"",'',"
",'
','',"
","
","
","
"].join("")),middle:s.template(['
','
','
    ',"
    ",'
    ','
      ',"
      ",'
      ','
        ',"
        ","
        ",'
        ','
        ','
        ','
        ','',"
        ",'',l("Unpair all"),"","
        ","
        ",'
        ','
          ',"
          "].join("")),footer:s.template(['
          ','
          ','",'","
          ",'
          ','','
          ',l("Name"),":
          ","
          ","
          ",'
          ','
          ','",'
          ','",'","
          ","
          ",'
          ','","
          ","
          "].join("")),helpContent:s.template(["

          ",l(["Collections of paired datasets are ordered lists of dataset pairs (often forward and reverse reads). ","These collections 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, choose which datasets are paired, ","and re-order the final collection."].join("")),"

          ","

          ",l(['Unpaired datasets are shown in the unpaired section ',"(hover over the underlined words to highlight below). ",'Paired datasets are shown in the paired section.',"

            To pair datasets, you can:","
          • Click a dataset in the ",'forward column ',"to select it then click a dataset in the ",'reverse column.',"
          • ",'
          • Click one of the "Pair these datasets" buttons in the ','middle column ',"to pair the datasets in a particular row.","
          • ",'
          • Click "Auto-pair" ',"to have your datasets automatically paired based on name.","
          • ","
          "].join("")),"

          ","

          ",l(["

            You can filter what is shown in the unpaired sections by:","
          • Entering partial dataset names in either the ",'forward filter or ','reverse filter.',"
          • ","
          • Choosing from a list of preset filters by clicking the ",'"Choose filters" link.',"
          • ","
          • Entering regular expressions to match dataset names. See: ",'MDN\'s JavaScript Regular Expression Tutorial. ',"Note: forward slashes (\\) are not needed.","
          • ","
          • Clearing the filters by clicking the ",'"Clear filters" link.',"
          • ","
          "].join("")),"

          ","

          ",l(["To unpair individual dataset pairs, click the ",'unpair buttons ( ). ','Click the "Unpair all" link to unpair all pairs.'].join("")),"

          ","

          ",l(['You can include or remove the file extensions (e.g. ".fastq") from your pair names by toggling the ','"Remove file extensions from pair names?" control.'].join("")),"

          ","

          ",l(['Once your collection is complete, enter a name and ','click "Create list". ',"(Note: you do not have to pair all unpaired datasets to finish.)"].join("")),"

          "].join(""))})}),p=function(e,t){var i,n=o.Deferred();if(t=s.defaults(t||{},{datasets:e,oncancel:function(){Galaxy.modal.hide(),n.reject("cancelled")},oncreate:function(e,t){Galaxy.modal.hide(),n.resolve(t)}}),!window.Galaxy||!Galaxy.modal)throw new Error("Galaxy or Galaxy.modal not found");return i=new u(t),Galaxy.modal.show({title:"Create a collection of paired datasets",body:i.$el,width:"80%",height:"800px",closing_events:!0}),i.render(),window.creator=i,n};return{PairedCollectionCreator:u,pairedCollectionCreatorModal:p,createListOfPairsCollection:d}}.apply(t,r))&&(e.exports=l)}).call(t,i(2),i(1),i(0),i(0))},function(e,t,i){"use strict";(function(n,s,o){var a,r;a=[i(23),i(25),i(5),i(3)],void 0!==(r=function(e,t,i,a){function r(e,t){var i=e.toJSON();return h(i,{defaultHideSourceItems:t,creationFn:function(t,i,n){return t=[{name:"forward",src:"hda",id:t[0].id},{name:"reverse",src:"hda",id:t[1].id}],e.createHDCA(t,"paired",i,n)}})}var l=n.View.extend(i.LoggableMixin).extend({_logNamespace:"collections",tagName:"li",className:"collection-element",initialize:function(e){this.element=e.element||{},this.identifier=e.identifier},render:function(){return this.$el.attr("data-element-id",this.element.id).html(this.template({identifier:this.identifier,element:this.element})),this},template:s.template(['<%- identifier %>','<%- element.name %>'].join("")),destroy:function(){this.off(),this.$el.remove()},toString:function(){return"DatasetCollectionElementView()"}}),c=e.ListCollectionCreator,d=c.extend({elementViewClass:l,collectionClass:t.HistoryPairDatasetCollection,className:"pair-collection-creator collection-creator flex-row-container",_mangleDuplicateNames:function(){},render:function(e,t){return 2===this.workingElements.length?c.prototype.render.call(this,e,t):this._renderInvalid(e,t)},_renderList:function(e,t){var i=this,n=o("
          "),a=i.$list();s.each(this.elementViews,function(e){e.destroy(),i.removeElementView(e)}),n.append(i._createForwardElementView().$el),n.append(i._createReverseElementView().$el),a.empty().append(n.children()),s.invoke(i.elementViews,"render")},_createForwardElementView:function(){return this._createElementView(this.workingElements[0],{identifier:"forward"})},_createReverseElementView:function(){return this._createElementView(this.workingElements[1],{identifier:"reverse"})},_createElementView:function(e,t){var i=new this.elementViewClass(s.extend(t,{element:e}));return this.elementViews.push(i),i},swap:function(){this.workingElements=[this.workingElements[1],this.workingElements[0]],this._renderList()},events:s.extend(s.clone(c.prototype.events),{"click .swap":"swap"}),templates:s.extend(s.clone(c.prototype.templates),{middle:s.template(['",'
          ',"
          "].join("")),helpContent:s.template(["

          ",a(["Pair collections are permanent collections containing two datasets: one forward and one reverse. ","Often these are forward and reverse reads. The pair collections can be passed to tools and ","workflows in order to have analyses done on both datasets. This interface allows ","you to create a pair, name it, and swap which is forward and which reverse."].join("")),"

          ","
            ","
          • ",a(['Click the "Swap" link to make your forward dataset the reverse ',"and the reverse dataset forward."].join("")),"
          • ","
          • ",a(['Click the "Cancel" button to exit the interface.'].join("")),"
          • ","

          ","

          ",a(['Once your collection is complete, enter a name and ','click "Create list".'].join("")),"

          "].join("")),invalidInitial:s.template(['
          ','
          ','',"<% if( _.size( problems ) ){ %>",a("The following selections could not be included due to problems"),"
            <% _.each( problems, function( problem ){ %>","
          • <%- problem.element.name %>: <%- problem.text %>
          • ","<% }); %>
          ","<% } else if( _.size( elements ) === 0 ){ %>",a("No datasets were selected"),".","<% } else if( _.size( elements ) === 1 ){ %>",a("Only one dataset was selected"),": <%- elements[0].name %>","<% } else if( _.size( elements ) > 2 ){ %>",a("Too many datasets were selected"),': <%- _.pluck( elements, "name" ).join( ", ") %>',"<% } %>","
          ",a("Two (and only two) elements are needed for the pair"),". ",a("You may need to "),'',a("cancel")," ",a("and reselect new elements"),".","
          ","
          ","
          ",'"].join(""))}),toString:function(){return"PairCollectionCreator"}}),h=function(t,i){return i=i||{},i.title=a("Create a collection from a pair of datasets"),e.collectionCreatorModal(t,i,d)};return{PairCollectionCreator:d,pairCollectionCreatorModal:h,createPairCollection:r}}.apply(t,a))&&(e.exports=r)}).call(t,i(2),i(1),i(0))},function(e,t,i){"use strict";(function(n,s,o){var a,r;a=[i(8),i(62),i(3)],void 0!==(r=function(e,t,i){var a={defaultName:n.template("Copy of '<%- name %>'"),title:n.template(i("Copying history")+' "<%- name %>"'),submitLabel:i("Copy"),errorMessage:i("History could not be copied."),progressive:i("Copying history"),activeLabel:i("Copy only the active, non-deleted datasets"),allLabel:i("Copy all datasets including deleted ones"),anonWarning:i("As an anonymous user, unless you login or register, you will lose your current history ")+i("after copying this history. "),_template:n.template(["<% if( isAnon ){ %>",'
          ',"<%- anonWarning %>",i("You can"),' ',i("login here")," ",i("or")," ",' ',i("register here"),".","
          ","<% } %>","
          ",'
          ",'','","<% if( allowAll ){ %>","
          ","

          ",i("Choose which datasets from the original history to include:"),"

          ",'/>','',"
          ",'/>','',"<% } %>","
          "].join("")),_showAjaxIndicator:function(){var e='

          '+this.progressive+"...

          ";this.modal.$(".modal-body").empty().append(e).css({"margin-top":"8px"})},dialog:function(e,a,r){function l(){var i=e.$("#copy-modal-title").val();if(!i)return void e.$(".invalid-title").show();var n="copy-all"===e.$('input[name="copy-what"]:checked').val();e.$("button").prop("disabled",!0),c._showAjaxIndicator(),a.copy(!0,i,n).done(function(e){d.resolve(e)}).fail(function(e,s,o){var r={name:i,copyAllDatasets:n};t.ajaxErrorModal(a,e,r,c.errorMessage),d.rejectWith(d,arguments)}).done(function(){f&&e.hide()})}r=r||{};var c=this,d=s.Deferred(),h=r.nameFn||this.defaultName,u=h({name:a.get("name")}),p=r.allDatasets?"copy-all":"copy-non-deleted",g=!!n.isUndefined(r.allowAll)||r.allowAll,f=!!n.isUndefined(r.autoClose)||r.autoClose;this.modal=e;var m=r.closing_callback;return e.show(n.extend(r,{title:this.title({name:a.get("name")}),body:o(c._template({name:u,isAnon:Galaxy.user.isAnonymous(),allowAll:g,copyWhat:p,activeLabel:this.activeLabel,allLabel:this.allLabel,anonWarning:this.anonWarning})),buttons:n.object([[i("Cancel"),function(){e.hide()}],[this.submitLabel,l]]),height:"auto",closing_events:!0,closing_callback:function(e){e&&d.reject({cancelled:!0}),m&&m(e)}})),e.$("#copy-modal-title").focus().select(),e.$("#copy-modal-title").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),l())}),d}},r=n.extend({},a,{defaultName:n.template("imported: <%- name %>"),title:n.template(i("Importing history")+' "<%- name %>"'),submitLabel:i("Import"),errorMessage:i("History could not be imported."),progressive:i("Importing history"),activeLabel:i("Import only the active, non-deleted datasets"),allLabel:i("Import all datasets including deleted ones"),anonWarning:i("As an anonymous user, unless you login or register, you will lose your current history ")+i("after importing this history. ")});return function(t,i){i=i||{};var n=window.parent.Galaxy.modal||new e.View({});return i.useImport?r.dialog(n,t,i):a.dialog(n,t,i)}}.apply(t,a))&&(e.exports=r)}).call(t,i(1),i(0),i(0))},function(e,t,i){"use strict";(function(n,s){var o,a;o=[i(53),i(55),i(5),i(3)],void 0!==(a=function(e,t,i,o){var a=e.DatasetListItemEdit,r=a.extend({className:a.prototype.className+" history-content",_fetchModelDetails:function(){var e=this;return e.model.inReadyState()&&!e.model.hasDetails()?e.model.fetch({silent:!0}):e.model.has("rerunnable")?n.when():e.model.fetch({silent:!0,data:{keys:["rerunnable","creating_job"].join(",")}})},events:s.extend(s.clone(a.prototype.events),{"click .unhide-link":function(e){return this.model.unhide(),!1}}),toString:function(){return"HDAListItemEdit("+(this.model?this.model+"":"(no model)")+")"}});return r.prototype.templates=function(){var e=s.extend({},a.prototype.templates.warnings,{hidden:i.wrapTemplate(["<% if( !dataset.visible ){ %>",'
          ',o("This dataset has been hidden"),'
          ',o("Unhide it"),"","
          ","<% } %>"],"dataset")});return s.extend({},a.prototype.templates,{titleBar:t.HDAListItemView.prototype.templates.titleBar,warnings:e})}(),{HDAListItemEdit:r}}.apply(t,o))&&(e.exports=a)}).call(t,i(0),i(1))},function(e,t,i){"use strict";var n,s;n=[i(57),i(105),i(13),i(3)],void 0!==(s=function(e,t,i,n){var s=e.HDCAListItemView;return{HDCAListItemEdit:s.extend({_getFoldoutPanelClass:function(){switch(this.model.get("collection_type")){case"list":return t.ListCollectionViewEdit;case"paired":return t.PairCollectionViewEdit;case"list:paired":return t.ListOfPairsCollectionViewEdit;case"list:list":return t.ListOfListsCollectionViewEdit}throw new TypeError("Uknown collection_type: "+this.model.get("collection_type"))},_renderPrimaryActions:function(){return this.log(this+"._renderPrimaryActions"),s.prototype._renderPrimaryActions.call(this).concat([this._renderDeleteButton()])},_renderDeleteButton:function(){var e=this,t=this.model.get("deleted");return i({title:n(t?"Dataset collection is already deleted":"Delete"),classes:"delete-btn",faIcon:"fa-times",disabled:t,onclick:function(){e.$el.find(".icon-btn.delete-btn").trigger("mouseout"),e.model.delete()}})},toString:function(){return"HDCAListItemEdit("+(this.model?this.model+"":"(no model)")+")"}})}}.apply(t,n))&&(e.exports=s)},function(e,t,i){"use strict";(function(n,s,o){var a,r;a=[i(59),i(112),i(5),i(3)],void 0!==(r=function(e,t,i,a){var r=i.SessionStorageModel.extend({defaults:{tagsEditorShown:!1,annotationEditorShown:!1,scrollPosition:0},toString:function(){return"HistoryViewPrefs("+JSON.stringify(this.toJSON())+")"}});r.storageKey=function(){return"history-panel"};var l=t.HistoryViewEdit,c=l.extend({className:l.prototype.className+" current-history-panel",HDCAViewClass:l.prototype.HDCAViewClass.extend({foldoutStyle:"drilldown"}),emptyMsg:[a("This history is empty"),". ",a("You can "),'',a("load your own data"),"",a(" or "),'',a("get data from an external source"),""].join(""),initialize:function(e){e=e||{},this.preferences=new r(n.extend({id:r.storageKey()},n.pick(e,n.keys(r.prototype.defaults)))),l.prototype.initialize.call(this,e),this.panelStack=[],this.currentContentId=e.currentContentId||null},_setUpListeners:function(){l.prototype._setUpListeners.call(this);var e=this;this.on("new-model",function(){e.preferences.set("scrollPosition",0)})},loadCurrentHistory:function(){return this.loadHistory(null,{url:Galaxy.root+"history/current_history_json"})},switchToHistory:function(e,t){return Galaxy.user.isAnonymous()?(this.trigger("error",a("You must be logged in to switch histories"),a("Anonymous user")),s.when()):this.loadHistory(e,{url:Galaxy.root+"history/set_as_current?id="+e})},createNewHistory:function(e){return Galaxy.user.isAnonymous()?(this.trigger("error",a("You must be logged in to create histories"),a("Anonymous user")),s.when()):this.loadHistory(null,{url:Galaxy.root+"history/create_new_current"})},setModel:function(e,t,i){return l.prototype.setModel.call(this,e,t,i),this.model&&this.model.id&&(this.log("checking for updates"),this.model.checkForUpdates()),this},_setUpModelListeners:function(){return l.prototype._setUpModelListeners.call(this),this.listenTo(this.model,{"change:nice_size change:size":function(){this.trigger("history-size-change",this,this.model,arguments)},"change:id":function(){this.once("loading-done",function(){this.model.checkForUpdates()})}})},_setUpCollectionListeners:function(){l.prototype._setUpCollectionListeners.call(this),this.listenTo(this.collection,"state:ready",function(e,t,i){e.get("visible")||this.collection.storage.includeHidden()||this.removeItemView(e)})},_setUpBehaviors:function(e){e=e||this.$el;var t=this;return l.prototype._setUpBehaviors.call(t,e),this._debouncedScrollCaptureHandler||(this._debouncedScrollCaptureHandler=n.debounce(function(){t.$el.is(":visible")&&t.preferences.set("scrollPosition",s(this).scrollTop())},40)),t.$scrollContainer(e).off("scroll",this._debouncedScrollCaptureHandler).on("scroll",this._debouncedScrollCaptureHandler),t},_buildNewRender:function(){if(!this.model)return s();var e=l.prototype._buildNewRender.call(this);return e.find(".search").prependTo(e.find("> .controls")),this._renderQuotaMessage(e),e},_renderQuotaMessage:function(e){return e=e||this.$el,s(this.templates.quotaMsg({},this)).prependTo(e.find(".messages"))},_renderTags:function(e){var t=this;l.prototype._renderTags.call(t,e),t.preferences.get("tagsEditorShown")&&t.tagsEditor.toggle(!0),t.listenTo(t.tagsEditor,"hiddenUntilActivated:shown hiddenUntilActivated:hidden",function(e){t.preferences.set("tagsEditorShown",e.hidden)})},_renderAnnotation:function(e){var t=this;l.prototype._renderAnnotation.call(t,e),t.preferences.get("annotationEditorShown")&&t.annotationEditor.toggle(!0),t.listenTo(t.annotationEditor,"hiddenUntilActivated:shown hiddenUntilActivated:hidden",function(e){t.preferences.set("annotationEditorShown",e.hidden)})},_swapNewRender:function(e){l.prototype._swapNewRender.call(this,e);var t=this;return n.delay(function(){var e=t.preferences.get("scrollPosition");e&&t.scrollTo(e,0)},10),this},_attachItems:function(e){l.prototype._attachItems.call(this,e);var t=this;return t.currentContentId&&t._setCurrentContentById(t.currentContentId),this},addItemView:function(e,t,i){var n=l.prototype.addItemView.call(this,e,t,i);return n&&this.panelStack.length?this._collapseDrilldownPanel():n},_setUpItemViewListeners:function(e){var t=this;return l.prototype._setUpItemViewListeners.call(t,e),t.listenTo(e,{"expanded:drilldown":function(e,t){this._expandDrilldownPanel(t)},"collapsed:drilldown":function(e,t){this._collapseDrilldownPanel(t)}})},setCurrentContent:function(e){this.$(".history-content.current-content").removeClass("current-content"),e?(e.$el.addClass("current-content"),this.currentContentId=e.model.id):this.currentContentId=null},_setCurrentContentById:function(e){var t=this.viewFromModelId(e)||null;this.setCurrentContent(t)},_expandDrilldownPanel:function(e){this.panelStack.push(e),this.$controls().add(this.$list()).hide(),e.parentName=this.model.get("name"),e.delegateEvents().render().$el.appendTo(this.$el)},_collapseDrilldownPanel:function(e){this.panelStack.pop(),this.$controls().add(this.$list()).show()},events:n.extend(n.clone(l.prototype.events),{"click .uploader-link":function(e){Galaxy.upload.show(e)},"click .get-data-link":function(e){var t=s(".toolMenuContainer");t.parent().scrollTop(0),t.find('span:contains("Get Data")').click()}}),listenToGalaxy:function(e){this.listenTo(e,{"galaxy_main:load":function(e){var t=e.fullpath,i=null,s={display:/datasets\/([a-f0-9]+)\/display/,edit:/datasets\/([a-f0-9]+)\/edit/,report_error:/dataset\/errors\?id=([a-f0-9]+)/,rerun:/tool_runner\/rerun\?id=([a-f0-9]+)/,show_params:/datasets\/([a-f0-9]+)\/show_params/};n.find(s,function(e,s){return i=n.result(t.match(e),1)}),this._setCurrentContentById(i?"dataset-"+i:null)},"center-panel:load":function(e){this._setCurrentContentById()}})},connectToQuotaMeter:function(e){return e?(this.listenTo(e,"quota:over",this.showQuotaMessage),this.listenTo(e,"quota:under",this.hideQuotaMessage),this.on("rendered rendered:initial",function(){e&&e.isOverQuota()&&this.showQuotaMessage()}),this):this},clearMessages:function(e){var t=n.isUndefined(e)?this.$messages().children('[class$="message"]'):s(e.currentTarget);return t=t.not(".quota-message"),t.fadeOut(this.fxSpeed,function(){s(this).remove()}),this},showQuotaMessage:function(){var e=this.$(".quota-message");e.is(":hidden")&&e.slideDown(this.fxSpeed)},hideQuotaMessage:function(){var e=this.$(".quota-message");e.is(":hidden")||e.slideUp(this.fxSpeed)},unhideHidden:function(){var e=this;return confirm(a("Really unhide all hidden datasets?"))?e.model.contents._filterAndUpdate({visible:!1,deleted:"",purged:""},{visible:!0}).done(function(){e.model.contents.includeHidden||e.renderItems()}):o.when()},deleteHidden:function(){var e=this;return confirm(a("Really delete all hidden datasets?"))?e.model.contents._filterAndUpdate({visible:!1,deleted:"",purged:""},{deleted:!0,visible:!0}):o.when()},toString:function(){return"CurrentHistoryView("+(this.model?this.model.get("name"):"")+")"}});return c.prototype.templates=function(){var e=i.wrapTemplate(['
          ',a("You are over your disk quota"),". ",a("Tool execution is on hold until your disk usage drops below your allocated quota"),".","
          "],"history");return n.extend(n.clone(l.prototype.templates),{quotaMsg:e})}(),{CurrentHistoryView:c}}.apply(t,a))&&(e.exports=r)}).call(t,i(1),i(0),i(0))},function(e,t,i){"use strict";(function(n,s,o){var a,r;a=[i(113),i(26),i(9),i(56),i(109),i(110),i(61),i(49),i(23),i(107),i(106),i(13),i(63),i(5),i(3),i(18)],void 0!==(r=function(e,t,i,a,r,l,c,d,h,u,p,g,f,m,v){var _=e.HistoryView,y=_.extend({HDAViewClass:r.HDAListItemEdit,HDCAViewClass:l.HDCAListItemEdit,initialize:function(e){e=e||{},_.prototype.initialize.call(this,e),this.tagsEditor=null,this.annotationEditor=null,this.purgeAllowed=e.purgeAllowed||!1,this.annotationEditorShown=e.annotationEditorShown||!1,this.tagsEditorShown=e.tagsEditorShown||!1},_setUpListeners:function(){return _.prototype._setUpListeners.call(this),this.on({"droptarget:drop":function(e,t){this.dataDropped(t),this.dropTargetOff()},"view:attached view:removed":function(){this._renderCounts()},"search:loading-progress":this._renderSearchProgress,"search:searching":this._renderSearchFindings})},_setUpModelListeners:function(){return _.prototype._setUpModelListeners.call(this),this.listenTo(this.model,"change:size",this.updateHistoryDiskSize),this},_setUpCollectionListeners:function(){return _.prototype._setUpCollectionListeners.call(this),this.listenTo(this.collection,{"change:deleted":this._handleItemDeletedChange,"change:visible":this._handleItemVisibleChange,"change:purged":function(e){this.model.fetch()},"fetching-deleted":function(e){this.$("> .controls .deleted-count").html(""+v("loading...")+"")},"fetching-hidden":function(e){this.$("> .controls .hidden-count").html(""+v("loading...")+"")},"fetching-deleted-done fetching-hidden-done":this._renderCounts}),this},_buildNewRender:function(){var e=_.prototype._buildNewRender.call(this);return this.model?(Galaxy&&Galaxy.user&&Galaxy.user.id&&Galaxy.user.id===this.model.get("user_id")&&(this._renderTags(e),this._renderAnnotation(e)),e):e},updateHistoryDiskSize:function(){this.$(".history-size").text(this.model.get("nice_size"))},renderItems:function(e){var t=_.prototype.renderItems.call(this,e);return this.searchFor||this._renderCounts(e),t},_renderCounts:function(e){e=e instanceof n?e:this.$el;var t=this.templates.counts(this.model.toJSON(),this);return e.find("> .controls .subtitle").html(t)},_renderTags:function(e){var t=this;this.tagsEditor=new c.TagsEditor({model:this.model,el:e.find(".controls .tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){t.toggleHDATagEditors(!0,t.fxSpeed)},onhide:function(){t.toggleHDATagEditors(!1,t.fxSpeed)},$activator:g({title:v("Edit history tags"),classes:"history-tag-btn",faIcon:"fa-tags"}).appendTo(e.find(".controls .actions"))})},_renderAnnotation:function(e){var t=this;this.annotationEditor=new d.AnnotationEditor({model:this.model,el:e.find(".controls .annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){t.toggleHDAAnnotationEditors(!0,t.fxSpeed)},onhide:function(){t.toggleHDAAnnotationEditors(!1,t.fxSpeed)},$activator:g({title:v("Edit history annotation"),classes:"history-annotate-btn",faIcon:"fa-comment"}).appendTo(e.find(".controls .actions"))})},_setUpBehaviors:function(e){if(e=e||this.$el,_.prototype._setUpBehaviors.call(this,e),this.model&&Galaxy.user&&!Galaxy.user.isAnonymous()&&Galaxy.user.id===this.model.get("user_id")){var t=this;e.find("> .controls .name").attr("title",v("Click to rename history")).tooltip({placement:"bottom"}).make_text_editable({on_finish:function(e){var i=t.model.get("name");e&&e!==i?(t.$el.find("> .controls .name").text(e),t.model.save({name:e}).fail(function(){t.$el.find("> .controls .name").text(t.model.previous("name"))})):t.$el.find("> .controls .name").text(i)}})}},multiselectActions:function(){var e=this,t=[{html:v("Hide datasets"),func:function(){var t=a.HistoryDatasetAssociation.prototype.hide;e.getSelectedModels().ajaxQueue(t)}},{html:v("Unhide datasets"),func:function(){var t=a.HistoryDatasetAssociation.prototype.unhide;e.getSelectedModels().ajaxQueue(t)}},{html:v("Delete datasets"),func:function(){var t=a.HistoryDatasetAssociation.prototype.delete;e.getSelectedModels().ajaxQueue(t)}},{html:v("Undelete datasets"),func:function(){var t=a.HistoryDatasetAssociation.prototype.undelete;e.getSelectedModels().ajaxQueue(t)}}];return e.purgeAllowed&&t.push({html:v("Permanently delete datasets"),func:function(){if(confirm(v("This will permanently remove the data in your datasets. Are you sure?"))){var t=a.HistoryDatasetAssociation.prototype.purge;e.getSelectedModels().ajaxQueue(t)}}}),t=t.concat(e._collectionActions())},_collectionActions:function(){var e=this;return[{html:v("Build Dataset List"),func:function(){e.buildCollection("list")}},{html:v("Build Dataset Pair"),func:function(){e.buildCollection("paired")}},{html:v("Build List of Dataset Pairs"),func:function(){e.buildCollection("list:paired")}}]},buildCollection:function(e,t,i){var n,s=this,t=t||s.getSelectedModels(),i=i||!1;"list"==e?n=h.createListCollection:"paired"==e?n=u.createPairCollection:"list:paired"==e?n=p.createListOfPairsCollection:console.warn("Unknown collectionType encountered "+e),n(t,i).done(function(){s.model.refresh()})},_getItemViewOptions:function(e){var t=_.prototype._getItemViewOptions.call(this,e);return s.extend(t,{purgeAllowed:this.purgeAllowed,tagsEditorShown:this.tagsEditor&&!this.tagsEditor.hidden,annotationEditorShown:this.annotationEditor&&!this.annotationEditor.hidden}),t},_handleItemDeletedChange:function(e){e.get("deleted")?this._handleItemDeletion(e):this._handleItemUndeletion(e),this._renderCounts()},_handleItemDeletion:function(e){var t=this.model.get("contents_active");t.deleted+=1,t.active-=1,this.model.contents.includeDeleted||this.removeItemView(e),this.model.set("contents_active",t)},_handleItemUndeletion:function(e){var t=this.model.get("contents_active");t.deleted-=1,this.model.contents.includeDeleted||(t.active-=1),this.model.set("contents_active",t)},_handleItemVisibleChange:function(e){e.hidden()?this._handleItemHidden(e):this._handleItemUnhidden(e),this._renderCounts()},_handleItemHidden:function(e){var t=this.model.get("contents_active");t.hidden+=1,t.active-=1,this.model.contents.includeHidden||this.removeItemView(e),this.model.set("contents_active",t)},_handleItemUnhidden:function(e){var t=this.model.get("contents_active");t.hidden-=1,this.model.contents.includeHidden||(t.active-=1),this.model.set("contents_active",t)},toggleHDATagEditors:function(e,t){s.each(this.views,function(i){i.tagsEditor&&i.tagsEditor.toggle(e,t)})},toggleHDAAnnotationEditors:function(e,t){s.each(this.views,function(i){i.annotationEditor&&i.annotationEditor.toggle(e,t)})},events:s.extend(s.clone(_.prototype.events),{"click .show-selectors-btn":"toggleSelectors","click .toggle-deleted-link":function(e){this.toggleShowDeleted()},"click .toggle-hidden-link":function(e){this.toggleShowHidden()}}),_renderSearchProgress:function(e,t){var i=e+t;return this.$("> .controls .subtitle").html(["",v("Searching "),i,"/",this.model.contentsShown(),""].join(""))},_renderSearchFindings:function(){return this.$("> .controls .subtitle").html([v("Found"),this.views.length].join(" ")),this},dropTargetOn:function(){if(this.dropTarget)return this;this.dropTarget=!0;var e={dragenter:s.bind(this.dragenter,this),dragover:s.bind(this.dragover,this),dragleave:s.bind(this.dragleave,this),drop:s.bind(this.drop,this)},t=this._renderDropTarget();this.$list().before([this._renderDropTargetHelp(),t]);for(var i in e)e.hasOwnProperty(i)&&t.on(i,e[i]);return this},_renderDropTarget:function(){return this.$(".history-drop-target").remove(),o("
          ").addClass("history-drop-target")},_renderDropTargetHelp:function(){return this.$(".history-drop-target-help").remove(),o("
          ").addClass("history-drop-target-help").text(v("Drag datasets here to copy them to the current history"))},dropTargetOff:function(){if(!this.dropTarget)return this;this.dropTarget=!1;var e=this.$(".history-drop-target").get(0);for(var t in this._dropHandlers)this._dropHandlers.hasOwnProperty(t)&&e.off(t,this._dropHandlers[t]);return this.$(".history-drop-target").remove(),this.$(".history-drop-target-help").remove(),this},dropTargetToggle:function(){return this.dropTarget?this.dropTargetOff():this.dropTargetOn(),this},dragenter:function(e){e.preventDefault(),e.stopPropagation(),this.$(".history-drop-target").css("border","2px solid black")},dragover:function(e){e.preventDefault(),e.stopPropagation()},dragleave:function(e){e.preventDefault(),e.stopPropagation(),this.$(".history-drop-target").css("border","1px dashed black")},drop:function(e){e.preventDefault();var t=this,i=e.originalEvent.dataTransfer,n=i.getData("text");i.dropEffect="move";try{n=JSON.parse(n)}catch(e){t.warn("error parsing JSON from drop:",n)}return t.trigger("droptarget:drop",e,n,t),!1},dataDropped:function(e){var t=this;return s.isObject(e)&&"HistoryDatasetAssociation"===e.model_class&&e.id?0!==t.contents.currentPage?t.contents.fetchPage(0).then(function(){return t.model.contents.copy(e.id)}):t.model.contents.copy(e.id):n.when()},toString:function(){return"HistoryViewEdit("+(this.model?this.model.get("name"):"")+")"}});return y.prototype.templates=function(){var e=m.wrapTemplate(["<% var shown = Math.max( view.views.length, history.contents_active.active ) %>","<% if( shown ){ %>",'',"<%- shown %> ",v("shown"),"","<% } %>","<% if( history.contents_active.deleted ){ %>",'',"<% if( view.model.contents.includeDeleted ){ %>",'',v("hide deleted"),"","<% } else { %>","<%- history.contents_active.deleted %> ",'',v("deleted"),"","<% } %>","","<% } %>","<% if( history.contents_active.hidden ){ %>",'',"<% if( view.model.contents.includeHidden ){ %>",'',v("hide hidden"),"","<% } else { %>","<%- history.contents_active.hidden %> ",'',v("hidden"),"","<% } %>","","<% } %>"],"history");return s.extend(s.clone(_.prototype.templates),{counts:e})}(),{HistoryViewEdit:y}}.apply(t,a))&&(e.exports=r)}).call(t,i(0),i(1),i(0))},function(e,t,i){"use strict";(function(n,s){var o,a;o=[i(60),i(59),i(26),i(27),i(55),i(57),i(64),i(62),i(13),i(5),i(3),i(66)],void 0!==(a=function(e,t,i,o,a,r,l,c,d,h,u){var p=e.ModelListPanel,g=p.extend({_logNamespace:"history",HDAViewClass:a.HDAListItemView,HDCAViewClass:r.HDCAListItemView,collectionClass:i.HistoryContents,modelCollectionKey:"contents",tagName:"div",className:p.prototype.className+" history-panel",emptyMsg:u("This history is empty"),noneFoundMsg:u("No matching datasets found"),searchPlaceholder:u("search datasets"),FETCH_COLLECTION_COUNTS_DELAY:2e3,initialize:function(e){p.prototype.initialize.call(this,e),this.linkTarget=e.linkTarget||"_blank"},_createDefaultCollection:function(){return new this.collectionClass([],{history:this.model})},freeModel:function(){return p.prototype.freeModel.call(this),this.model&&this.model.clearUpdateTimeout(),this},_setUpListeners:function(){p.prototype._setUpListeners.call(this),this.on({error:function(e,t,i,n,s){this.errorHandler(e,t,i,n,s)},"loading-done":function(){var e=this;n.delay(function(){e.model.contents.fetchCollectionCounts()},e.FETCH_COLLECTION_COUNTS_DELAY)},"views:ready view:attached view:removed":function(e){this._renderSelectButton()},"view:attached":function(e){this.scrollTo(0)}})},loadHistory:function(e,i,s){s=n.extend(s||{silent:!0}),this.info("loadHistory:",e,i,s);var o=this;return o.setModel(new t.History({id:e})),s.silent=!0,o.trigger("loading"),o.model.fetchWithContents(i,s).always(function(){o.render(),o.trigger("loading-done")})},refreshContents:function(e){return this.model?this.model.refresh(e):s.when()},_setUpCollectionListeners:function(){return p.prototype._setUpCollectionListeners.call(this),this.listenTo(this.collection,{"fetching-more":function(){this._toggleContentsLoadingIndicator(!0),this.$emptyMessage().hide()},"fetching-more-done":function(){this._toggleContentsLoadingIndicator(!1)}})},_showLoadingIndicator:function(e,t,i){var o=s('
          ');this.$el.html(o.text(e).slideDown(n.isUndefined(t)?this.fxSpeed:t))},_hideLoadingIndicator:function(e){this.$(".loading-indicator").slideUp(n.isUndefined(e)?this.fxSpeed+200:e,function(){s(this).remove()})},_buildNewRender:function(){var e=p.prototype._buildNewRender.call(this);return this._renderSelectButton(e),e},_renderSelectButton:function(e){if(e=e||this.$el,!this.multiselectActions().length)return null;if(!this.views.length)return this.hideSelectors(),e.find(".controls .actions .show-selectors-btn").remove(),null;var t=e.find(".controls .actions .show-selectors-btn");return t.length?t:d({title:u("Operations on multiple datasets"),classes:"show-selectors-btn",faIcon:"fa-check-square-o"}).prependTo(e.find(".controls .actions"))},_renderEmptyMessage:function(e){var t=this,i=t.$emptyMessage(e);return t.model.get("contents_active").active<=0?i.empty().append(t.emptyMsg).show():t.searchFor&&t.model.contents.haveSearchDetails()&&!t.views.length?i.empty().append(t.noneFoundMsg).show():(i.hide(),s())},$scrollContainer:function(e){return this.$list(e)},_toggleContentsLoadingIndicator:function(e){e?this.$list().html('
          '):this.$list().find(".contents-loading-indicator").remove()},renderItems:function(e){e=e||this.$el;var t=this,i=t.$list(e);s(".tooltip").remove(),i.empty(),t.views=[];var n=t._filterCollection();return n.length?(t._renderPagination(e),t.views=t._renderSomeItems(n,i)):e.find("> .controls .list-pagination").empty(),t._renderEmptyMessage(e).toggle(!n.length),t.trigger("views:ready",t.views),t.views},_renderPagination:function(e){var t=e.find("> .controls .list-pagination");return this.searchFor||!this.model.contents.shouldPaginate()?t.empty():(t.html(this.templates.pagination({current:this.model.contents.currentPage+1,last:this.model.contents.getLastPage()+1},this)),t.find("select.pages").tooltip(),t)},_renderSomeItems:function(e,t){var i=this,n=[];return t.append(e.map(function(e){var t=i._createItemView(e);return n.push(t),i._renderItemView$el(t)})),n},_filterItem:function(e){var t=this,i=t.model.contents;return(i.includeHidden||!e.hidden())&&(i.includeDeleted||!e.isDeletedOrPurged())&&p.prototype._filterItem.call(t,e)},_getItemViewClass:function(e){var t=e.get("history_content_type");switch(t){case"dataset":return this.HDAViewClass;case"dataset_collection":return this.HDCAViewClass}throw new TypeError("Unknown history_content_type: "+t)},_getItemViewOptions:function(e){var t=p.prototype._getItemViewOptions.call(this,e);return n.extend(t,{linkTarget:this.linkTarget,expanded:this.model.contents.storage.isExpanded(e.id),hasUser:this.model.ownedByCurrUser()})},_setUpItemViewListeners:function(e){var t=this;return p.prototype._setUpItemViewListeners.call(t,e),t.listenTo(e,{expanded:function(e){t.model.contents.storage.addExpanded(e.model)},collapsed:function(e){t.model.contents.storage.removeExpanded(e.model)}})},collapseAll:function(){this.model.contents.storage.clearExpanded(),p.prototype.collapseAll.call(this)},getSelectedModels:function(){var e=p.prototype.getSelectedModels.call(this);return e.historyId=this.collection.historyId,e},events:n.extend(n.clone(p.prototype.events),{"click .show-selectors-btn":"toggleSelectors","click > .controls .prev":"_clickPrevPage","click > .controls .next":"_clickNextPage","change > .controls .pages":"_changePageSelect","click .messages [class$=message]":"clearMessages"}),_clickPrevPage:function(e){this.model.clearUpdateTimeout(),this.model.contents.fetchPrevPage()},_clickNextPage:function(e){this.model.clearUpdateTimeout(),this.model.contents.fetchNextPage()},_changePageSelect:function(e){this.model.clearUpdateTimeout();var t=s(e.currentTarget).val();this.model.contents.fetchPage(t)},toggleShowDeleted:function(e,t){e=void 0!==e?e:!this.model.contents.includeDeleted;var i=this,n=i.model.contents;return n.setIncludeDeleted(e,t),i.trigger("show-deleted",e),n.fetchCurrentPage({renderAll:!0}),e},toggleShowHidden:function(e,t,i){e=void 0!==e?e:!this.model.contents.includeHidden;var n=this,s=n.model.contents;return s.setIncludeHidden(e,i),n.trigger("show-hidden",e),s.fetchCurrentPage({renderAll:!0}),e},_firstSearch:function(e){var t=this;if(this.log("onFirstSearch",e),t.model.contents.haveSearchDetails())return void t.searchItems(e);t.$("> .controls .search-input").searchInput("toggle-loading"),t.searchFor=e;t.model.contents.progressivelyFetchDetails({silent:!0}).progress(function(e,i,n){t.renderItems(),t.trigger("search:loading-progress",i,n)}).always(function(){t.$el.find("> .controls .search-input").searchInput("toggle-loading")}).done(function(){t.searchItems(e,"force")})},clearSearch:function(e){var t=this;return t.searchFor?(t.searchFor="",t.trigger("search:clear",t),t.$("> .controls .search-query").val(""),t.model.contents.fetchCurrentPage({silent:!0}).done(function(){t.renderItems()}),t):t},errorHandler:function(e,t,i){if(!t||0!==t.status||0!==t.readyState){if(this.error(e,t,i),n.isString(e)&&n.isString(t)){var s=e,o=t;return c.errorModal(s,o,i)}return t&&502===t.status?c.badGatewayErrorModal():c.ajaxErrorModal(e,t,i)}},clearMessages:function(e){return(n.isUndefined(e)?this.$messages().children('[class$="message"]'):s(e.currentTarget)).fadeOut(this.fxSpeed,function(){s(this).remove()}),this},scrollToHid:function(e){return this.scrollToItem(n.first(this.viewsWhereModel({hid:e})))},ordinalIndicator:function(e){var t=e+"";switch(t.charAt(t.length-1)){case"1":return t+"st";case"2":return t+"nd";case"3":return t+"rd";default:return t+"th"}},toString:function(){return"HistoryView("+(this.model?this.model.get("name"):"")+")"}});return g.prototype.templates=function(){var e=h.wrapTemplate(["
          ",'
          ','
            ','
            ',"
            "]),t=h.wrapTemplate(['
            ','
            ','
            <%- history.name %>
            ',"
            ",'
            ','
            <%- history.nice_size %>
            ','
            ','
            ',"<% if( history.deleted && history.purged ){ %>",'
            ',u("This history has been purged and deleted"),"
            ","<% } else if( history.deleted ){ %>",'
            ',u("This history has been deleted"),"
            ","<% } else if( history.purged ){ %>",'
            ',u("This history has been purged"),"
            ","<% } %>","<% if( history.message ){ %>",'
            messagesmall">',"<%= history.message.text %>","
            ","<% } %>","
            ",'
            ','
            ','",'
            ','
            ','",'","
            ",'
            ',"
            ","
            ",'
            ',"
            "],"history"),i=h.wrapTemplate(['','",''],"pages");return n.extend(n.clone(p.prototype.templates),{el:e,controls:t,pagination:i})}(),{HistoryView:g}}.apply(t,o))&&(e.exports=a)}).call(t,i(1),i(0))},function(e,t,i){"use strict";(function(n,s){var o,a;o=[i(63),i(108),i(5),i(3),i(20)],void 0!==(a=function(e,t,i,o,a){function r(e,t,i){return s.clone(l).filter(function(n){return!(e&&!n.anon)&&(!(!t&&n.purge)&&(n.href&&(n.href=i+n.href,n.target="galaxy_main"),n.confirm&&(n.func=function(){confirm(n.confirm)&&(galaxy_main.location=n.href)}),!0))})}var l=[{html:o("History Lists"),header:!0},{html:o("Saved Histories"),href:"history/list"},{html:o("Histories Shared with Me"),href:"history/list_shared"},{html:o("Current History"),header:!0,anon:!0},{html:o("Create New"),func:function(){Galaxy&&Galaxy.currHistoryPanel&&Galaxy.currHistoryPanel.createNewHistory()}},{html:o("Copy History"),func:function(){t(Galaxy.currHistoryPanel.model).done(function(){Galaxy.currHistoryPanel.loadCurrentHistory()})}},{html:o("Share or Publish"),href:"history/sharing"},{html:o("Show Structure"),href:"history/display_structured",anon:!0},{html:o("Extract Workflow"),href:"workflow/build_from_current_history"},{html:o("Delete"),anon:!0,func:function(){Galaxy&&Galaxy.currHistoryPanel&&confirm(o("Really delete the current history?"))&&(galaxy_main.window.location.href="history/delete?id="+Galaxy.currHistoryPanel.model.id)}},{html:o("Delete Permanently"),purge:!0,anon:!0,func:function(){Galaxy&&Galaxy.currHistoryPanel&&confirm(o("Really delete the current history permanently? This cannot be undone."))&&(galaxy_main.window.location.href="history/delete?purge=True&id="+Galaxy.currHistoryPanel.model.id)}},{html:o("Dataset Actions"),header:!0,anon:!0},{html:o("Copy Datasets"),href:"dataset/copy_datasets"},{html:o("Dataset Security"),href:"root/history_set_default_permissions"},{html:o("Resume Paused Jobs"),href:"history/resume_paused_jobs?current=True",anon:!0},{html:o("Collapse Expanded Datasets"),func:function(){Galaxy&&Galaxy.currHistoryPanel&&Galaxy.currHistoryPanel.collapseAll()}},{html:o("Unhide Hidden Datasets"),anon:!0,func:function(){Galaxy&&Galaxy.currHistoryPanel&&confirm(o("Really unhide all hidden datasets?"))&&n.post(Galaxy.root+"history/adjust_hidden",{user_action:"unhide"},function(){Galaxy.currHistoryPanel.loadCurrentHistory()})}},{html:o("Delete Hidden Datasets"),anon:!0,func:function(){Galaxy&&Galaxy.currHistoryPanel&&confirm(o("Really delete all hidden datasets?"))&&n.post(Galaxy.root+"history/adjust_hidden",{user_action:"delete"},function(){Galaxy.currHistoryPanel.loadCurrentHistory()})}},{html:o("Purge Deleted Datasets"),confirm:o("Really delete all deleted datasets permanently? This cannot be undone."),href:"history/purge_deleted_datasets",purge:!0,anon:!0},{html:o("Downloads"),header:!0},{html:o("Export Tool Citations"),href:"history/citations",anon:!0},{html:o("Export History to File"),href:"history/export_archive?preview=True",anon:!0},{html:o("Other Actions"),header:!0},{html:o("Import from File"),href:"history/import_archive"}];return a.add({url:"api/webhooks/history-menu/all",async:!1,callback:function(e){var t=[];n.each(e.models,function(e,i){var n=i.toJSON();n.activate&&t.push({html:o(n.config.title),anon:!0})}),t.length>0&&(t.unshift({html:o("Webhooks"),header:!0}),n.merge(l,t))}}),function(t,i){i=i||{};var n=void 0===i.anonymous||i.anonymous,s=i.purgeAllowed||!1,o=r(n,s,Galaxy.root);return new e(t,o)}}.apply(t,o))&&(e.exports=a)}).call(t,i(0),i(1))},function(e,t,i){"use strict";(function(n,s){var o,a;o=[i(4)],void 0!==(a=function(e){return{View:n.View.extend({initialize:function(e){this.collection=new n.Collection,this.model=e&&e.model||new n.Model({onchange:null,visible:!0}).set(e),this.setElement(s(this._template())),this.$nav=this.$(".tab-navigation"),this.$content=this.$(".tab-content"),this.$el.on("click",function(){s(".tooltip").hide()}),this.render(),this.listenTo(this.model,"change",this.render,this),this.listenTo(this.collection,"add",this._add,this),this.listenTo(this.collection,"remove",this._remove,this),this.listenTo(this.collection,"change",this._change,this),this.listenTo(this.collection,"reset",this._reset,this),this.listenTo(this.collection,"add remove reset",this.render,this)},render:function(){var e=this.model.get("current");e=this.$("#"+e).length>0?e:this.first(),e&&(this.$nav.children().removeClass("active"),this.$content.children().removeClass("active"),this.$("#tab-"+e).addClass("active"),this.$("#"+e).addClass("active")),this.$el[this.model.get("visible")?"fadeIn":"fadeOut"]("fast"),this.$nav[this.size()>1?"show":"hide"]()},current:function(){return this.model.get("current")},show:function(e){e&&(this.model.set({current:e,visible:!0}),this.model.get("onchange")&&this.model.get("onchange")(e))},hide:function(){this.model.set("visible",!1)},first:function(){var e=this.collection.first();return e&&e.id},size:function(){return this.collection.length},add:function(e){this.collection.add(e)},del:function(e){this.collection.remove(e)},delAll:function(){this.collection.reset()},showTab:function(e){this.collection.get(e).set("hidden",!1)},hideTab:function(e){this.collection.get(e).set("hidden",!0)},_add:function(e){var t=this,i=e.attributes;this.$content.append(s("
            ").attr("id",i.id).addClass("tab-pane").append(i.$el)),this.$nav.append(s(this._template_tab(i)).show().tooltip({title:i.tooltip,placement:"bottom",container:t.$el}).on("click",function(e){e.preventDefault(),t.show(i.id)})),1==this.size()&&this.show(i.id)},_remove:function(e){this.$("#tab-"+e.id).remove(),this.$("#"+e.id).remove()},_reset:function(){this.$nav.empty(),this.$content.empty()},_change:function(e){this.$("#tab-"+e.id)[e.get("hidden")?"hide":"show"]()},_template:function(){return s("
            ").addClass("ui-tabs tabbable tabs-left").append(s("