diff --git a/client/galaxy/scripts/mvc/tool/tool-form-composite.js b/client/galaxy/scripts/mvc/tool/tool-form-composite.js index 42989b861d7..f094425b24f 100644 --- a/client/galaxy/scripts/mvc/tool/tool-form-composite.js +++ b/client/galaxy/scripts/mvc/tool/tool-form-composite.js @@ -23,7 +23,7 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view' _refresh: function() { var margin = _.reduce( this.$el.children(), function( memo, child ) { return memo + $( child ).outerHeight(); - }, 0 ) - this.$steps.height() + 30; + }, 0 ) - this.$steps.height() + 25; this.$steps.css( 'height', $( window ).height() - margin ); }, @@ -56,7 +56,9 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view' errors : step.messages, initial_errors : true, cls : 'ui-portlet-narrow', - hide_operations : true + hide_operations : true, + needs_refresh : false, + always_refresh : step.step_type != 'tool' }, step ); self.steps[ i ] = step; self.links[ i ] = []; @@ -167,7 +169,7 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view' this._renderHistory(); _.each ( this.steps, function( step, i ) { self._renderStep( step, i ) } ); this.deferred.execute( function() { self.execute_btn.unwait(); - self.execute_btn.model.set( { wait_text: 'Sending...', percentage: -1 } ) } ); + self.execute_btn.model.set( { wait_text: 'Sending...', percentage: -1 } ); } ); }, /** Render header */ @@ -193,7 +195,8 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view' this.$message.append( new Ui.Message( { message : 'Some tools in this workflow may have changed since it was last saved or some errors were found. The workflow may still run, but any new options will have default values. Please review the messages below to make a decision about whether the changes will affect your analysis.', status : 'warning', - persistent : true + persistent : true, + fade : false } ).$el ); } }, @@ -205,9 +208,7 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view' if ( !_.isEmpty( this.wp_inputs ) ) { this.wp_form = new Form({ title: 'Workflow Parameters', inputs: this.wp_inputs, cls: 'ui-portlet-narrow', onchange: function() { _.each( self.wp_form.input_list, function( input_def, i ) { - _.each( input_def.links, function( step ) { - self._refreshStep( step ); - }); + _.each( input_def.links, function( step ) { self._refreshStep( step ) } ); }); } }); @@ -266,17 +267,16 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view' }, '' ) ) ) ); } - self._append( self.$steps, form.$el ); } else { _.each( step.inputs, function( input ) { input.flavor = 'module' } ); form = new Form( Utils.merge({ title : '' + step.name + '', onchange : function() { _.each( self.links[ i ], function( link ) { self._refreshStep( link ) } ) } }, step ) ); - self._append( self.$steps, form.$el ); } self.forms[ i ] = form; - self._refreshStep( step ); + self._append( self.$steps, form.$el ); + step.needs_refresh && self._refreshStep( step ); self._resolve( form.deferred, promise ); self.execute_btn.model.set( 'percentage', ( i + 1 ) * 100.0 / self.steps.length ); Galaxy.emit.debug( 'tool-form-composite::initialize()', i + ' : Workflow step state ready.', step ); @@ -327,6 +327,8 @@ define([ 'utils/utils', 'utils/deferred', 'mvc/ui/ui-misc', 'mvc/form/form-view' } }); form.trigger( 'change' ); + } else { + step.needs_refresh = true; } }, diff --git a/client/galaxy/scripts/mvc/ui/ui-misc.js b/client/galaxy/scripts/mvc/ui/ui-misc.js index 4ecc4308e65..5fb397def4a 100644 --- a/client/galaxy/scripts/mvc/ui/ui-misc.js +++ b/client/galaxy/scripts/mvc/ui/ui-misc.js @@ -42,7 +42,8 @@ define(['utils/utils', message : null, status : 'info', cls : '', - persistent : false + persistent : false, + fade : true }).set( options ); this.listenTo( this.model, 'change', this.render, this ); this.render(); @@ -62,7 +63,7 @@ define(['utils/utils', } if ( this.model.get( 'message' ) ) { this.$el.html( this.model.get( 'message' ) ); - this.$el.fadeIn(); + this.$el[ this.model.get( 'fade' ) ? 'fadeIn' : 'show' ](); this.timeout && window.clearTimeout( this.timeout ); if ( !this.model.get( 'persistent' ) ) { var self = this; diff --git a/lib/galaxy/model/__init__.py b/lib/galaxy/model/__init__.py index 1f997843a0d..efae3382977 100644 --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -3309,6 +3309,15 @@ class HistoryDatasetCollectionAssociation( DatasetCollectionInstance, UsesAnnota return (( type_coerce( cls.content_type, types.Unicode ) + u'-' + type_coerce( cls.id, types.Unicode ) ).label( 'type_id' )) + def to_hda_representative( self, multiple=False ): + rval = [] + for dataset in self.collection.dataset_elements: + rval.append( dataset.dataset_instance ) + if multiple is False: + break + if len( rval ) > 0: + return rval if multiple else rval[ 0 ] + def to_dict( self, view='collection' ): dict_value = dict( hid=self.hid, diff --git a/lib/galaxy/tools/parameters/basic.py b/lib/galaxy/tools/parameters/basic.py index db15dc640e7..ef88eceee8f 100644 --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -114,16 +114,6 @@ class ToolParameter( object, Dictifiable ): """ return None - def get_initial_value_from_history_prevent_repeats( self, trans, other_values, already_used ): - """ - Get the starting value for the parameter, but if fetching from the history, try - to find a value that has not yet been used. already_used is a list of objects that - tools must manipulate (by adding to it) to store a memento that they can use to detect - if a value has already been chosen from the history. This is to support the capability to - choose each dataset once - """ - return self.get_initial_value( trans, other_values ) - def get_required_enctype( self ): """ If this parameter needs the form to have a specific encoding @@ -1202,10 +1192,12 @@ class ColumnListParameter( SelectToolParameter ): return [] column_list = None for dataset in util.listify( dataset ): + # Use representative dataset if a dataset collection is parsed + if isinstance( dataset, trans.app.model.HistoryDatasetCollectionAssociation ): + dataset = dataset.to_hda_representative() # Columns can only be identified if metadata is available if not hasattr( dataset, 'metadata' ) or not hasattr( dataset.metadata, 'columns' ) or not dataset.metadata.columns: return [] - # Build up possible columns for this dataset this_column_list = [] if self.numerical: @@ -1216,7 +1208,6 @@ class ColumnListParameter( SelectToolParameter ): else: for i in range( 0, dataset.metadata.columns ): this_column_list.append( str( i + 1 ) ) - # Take the intersection of these columns with the other columns. if column_list is None: column_list = this_column_list @@ -1668,6 +1659,25 @@ class BaseDataToolParameter( ToolParameter ): self.options_filter_attribute = options_elem.get( 'options_filter_attribute', None ) self.is_dynamic = self.options is not None + def get_initial_value( self, trans, other_values ): + if trans.workflow_building_mode is workflow_building_modes.ENABLED or trans.app.name == 'tool_shed': + return RuntimeValue() + if self.optional: + return None + history = trans.history + if history is not None: + dataset_matcher = DatasetMatcher( trans, self, None, other_values ) + if isinstance( self, DataToolParameter ): + for hda in reversed( history.active_datasets_children_and_roles ): + match = dataset_matcher.hda_match( hda ) + if match: + return match.hda + else: + dataset_collection_matcher = DatasetCollectionMatcher( dataset_matcher ) + for hdca in reversed( history.active_dataset_collections ): + if dataset_collection_matcher.hdca_match( hdca, reduction=self.multiple ): + return hdca + def to_json( self, value, app ): def single_to_json( value ): src = None @@ -1681,7 +1691,6 @@ class BaseDataToolParameter( ToolParameter ): src = 'hda' if src is not None: return { 'id' : app.security.encode_id( value.id ), 'src' : src } - if value not in [ None, '', 'None' ]: if isinstance( value, list ) and len( value ) > 0: values = [ single_to_json( v ) for v in value ] @@ -1830,44 +1839,6 @@ class DataToolParameter( BaseDataToolParameter ): for item in dataset_collector( history.active_datasets_children_and_roles, None ): yield item - def get_initial_value( self, trans, other_values ): - return self.get_initial_value_from_history_prevent_repeats(trans, other_values, None ) - - def get_initial_value_from_history_prevent_repeats( self, trans, other_values, already_used ): - """ - NOTE: This is wasteful since dynamic options and dataset collection - happens twice (here and when generating HTML). - """ - # Can't look at history in workflow mode. Tool shed has no histories. - if trans.workflow_building_mode is workflow_building_modes.ENABLED or trans.app.name == 'tool_shed': - return RuntimeValue() - history = self._get_history( trans ) - dataset_matcher = DatasetMatcher( trans, self, None, other_values ) - if self.optional: - return None - most_recent_dataset = [] - - def dataset_collector( datasets ): - for data in datasets: - if data.visible and dataset_matcher.hda_accessible( data, check_security=False ): - match = dataset_matcher.valid_hda_match( data, check_security=False ) - if not match or dataset_matcher.filter( match.hda ): - continue - data = match.hda - most_recent_dataset.append(data) - # Also collect children via association object - dataset_collector( data.children ) - dataset_collector( history.active_datasets_children_and_roles ) - most_recent_dataset.reverse() - if already_used is not None: - for val in most_recent_dataset: - if val is not None and val not in already_used: - already_used.append(val) - return val - if len(most_recent_dataset) > 0: - return most_recent_dataset[0] - return '' - def from_json( self, value, trans, other_values={} ): if trans.workflow_building_mode is workflow_building_modes.ENABLED: return None diff --git a/lib/galaxy/tools/parameters/dynamic_options.py b/lib/galaxy/tools/parameters/dynamic_options.py index 2f754950492..248301781d2 100644 --- a/lib/galaxy/tools/parameters/dynamic_options.py +++ b/lib/galaxy/tools/parameters/dynamic_options.py @@ -7,7 +7,7 @@ import logging import os import validation from galaxy.util import string_as_bool -from galaxy.model import User +from galaxy.model import User, HistoryDatasetAssociation, HistoryDatasetCollectionAssociation import galaxy.tools log = logging.getLogger(__name__) @@ -125,10 +125,12 @@ class DataMetaFilter( Filter ): return dataset_value in file_value.split( self.separator ) return file_value == dataset_value ref = other_values.get( self.ref_name, None ) + if isinstance( ref, HistoryDatasetCollectionAssociation ): + ref = ref.to_hda_representative( self.multiple ) is_data = isinstance( ref, galaxy.tools.wrappers.DatasetFilenameWrapper ) is_data_list = isinstance( ref, galaxy.tools.wrappers.DatasetListWrapper ) or isinstance( ref, list ) is_data_or_data_list = is_data or is_data_list - if not isinstance( ref, self.dynamic_option.tool_param.tool.app.model.HistoryDatasetAssociation ) and not is_data_or_data_list: + if not isinstance( ref, HistoryDatasetAssociation ) and not is_data_or_data_list: return [] # not a valid dataset if is_data_list: @@ -398,7 +400,9 @@ class RemoveValueFilter( Filter ): value = other_values.get( self.ref_name ) else: data_ref = other_values.get( self.meta_ref ) - if not isinstance( data_ref, self.dynamic_option.tool_param.tool.app.model.HistoryDatasetAssociation ) and not isinstance( data_ref, galaxy.tools.wrappers.DatasetFilenameWrapper ): + if isinstance( data_ref, HistoryDatasetCollectionAssociation ): + data_ref = data_ref.to_hda_representative() + if not isinstance( data_ref, HistoryDatasetAssociation ) and not isinstance( data_ref, galaxy.tools.wrappers.DatasetFilenameWrapper ): return options # cannot modify options value = data_ref.metadata.get( self.metadata_key, None ) return [ ( disp_name, optval, selected ) for disp_name, optval, selected in options if not compare_value( optval, value ) ] diff --git a/lib/galaxy/webapps/galaxy/controllers/workflow.py b/lib/galaxy/webapps/galaxy/controllers/workflow.py index 63f5399297f..3381b569654 100644 --- a/lib/galaxy/webapps/galaxy/controllers/workflow.py +++ b/lib/galaxy/webapps/galaxy/controllers/workflow.py @@ -1135,7 +1135,7 @@ class WorkflowController( BaseUIController, SharableMixin, UsesStoredWorkflowMix trans.workflow_building_mode = workflow_building_modes.USE_HISTORY for step in workflow.steps: try: - module_injector.inject( step ) + module_injector.inject( step, steps=workflow.steps ) except MissingToolException: if step.tool_id not in missing_tools: missing_tools.append(step.tool_id) diff --git a/lib/galaxy/workflow/modules.py b/lib/galaxy/workflow/modules.py index 0769cea9182..2dc98a6469d 100644 --- a/lib/galaxy/workflow/modules.py +++ b/lib/galaxy/workflow/modules.py @@ -21,7 +21,7 @@ from galaxy.tools.parameters.basic import ( from galaxy.tools.parameters.wrapped import make_dict_copy from galaxy.tools import DefaultToolState from galaxy.tools import ToolInputsNotReadyException -from galaxy.util import odict +from galaxy.util import odict, listify from galaxy.util.bunch import Bunch from galaxy.web.framework import formbuilder from tool_shed.util import common_util @@ -132,7 +132,7 @@ class WorkflowModule( object ): """ pass - def add_dummy_datasets( self, connections=None): + def add_dummy_datasets( self, connections=None, steps=None ): # Replaced connected inputs with DummyDataset values. pass @@ -417,7 +417,7 @@ class SubWorkflowModule( WorkflowModule ): """ return None - def add_dummy_datasets( self, connections=None): + def add_dummy_datasets( self, connections=None, steps=None ): # Replaced connected inputs with DummyDataset values. return None @@ -1139,11 +1139,10 @@ class ToolModule( WorkflowModule ): if flush_required: self.trans.sa_session.flush() - def add_dummy_datasets( self, connections=None): + def add_dummy_datasets( self, connections=None, steps=None ): if connections: # Store onnections by input name - input_connections_by_name = \ - dict( ( conn.input_name, conn ) for conn in connections ) + input_connections_by_name = dict( ( conn.input_name, conn ) for conn in connections ) else: input_connections_by_name = {} @@ -1151,10 +1150,24 @@ class ToolModule( WorkflowModule ): # are not persisted so we need to do it every time) def callback( input, prefixed_name, context, **kwargs ): if isinstance( input, DataToolParameter ) or isinstance( input, DataCollectionToolParameter ): - if connections is None or prefixed_name in input_connections_by_name: + if self.trans.workflow_building_mode is workflow_building_modes.USE_HISTORY: + if connections is None or prefixed_name in input_connections_by_name: + if steps: + connection = input_connections_by_name[ prefixed_name ] + output_step = next( output_step for output_step in steps if connection.output_step_id == output_step.id ) + if output_step.type.startswith( 'data' ): + output_inputs = output_step.module.get_runtime_inputs() + output_value = output_inputs[ 'input' ].get_initial_value( self.trans, context ) + if isinstance( input, DataToolParameter ): + for v in listify( output_value ): + if isinstance( v, self.trans.app.model.HistoryDatasetCollectionAssociation ): + return v.to_hda_representative() + return output_value + return RuntimeValue() + else: + return input.get_initial_value( self.trans, context ) + elif connections is None or prefixed_name in input_connections_by_name: return RuntimeValue() - elif self.trans.workflow_building_mode is workflow_building_modes.USE_HISTORY: - return input.get_initial_value( self.trans, context ) visit_input_values( self.tool.inputs, self.state.inputs, callback ) @@ -1289,7 +1302,7 @@ class WorkflowModuleInjector(object): self.trans = trans self.allow_tool_state_corrections = allow_tool_state_corrections - def inject( self, step, step_args=None ): + def inject( self, step, step_args=None, steps=None ): """ Pre-condition: `step` is an ORM object coming from the database, if supplied `step_args` is the representation of the inputs for that step supplied via web form. @@ -1319,7 +1332,7 @@ class WorkflowModuleInjector(object): # Any connected input needs to have value DummyDataset (these # are not persisted so we need to do it every time) - module.add_dummy_datasets( connections=step.input_connections ) + module.add_dummy_datasets( connections=step.input_connections, steps=steps ) state, step_errors = module.compute_runtime_state( self.trans, step_args ) step.state = state if step.type == "subworkflow": diff --git a/static/maps/mvc/tool/tool-form-composite.js.map b/static/maps/mvc/tool/tool-form-composite.js.map index cc24d64df76..724ef2e3576 100644 --- a/static/maps/mvc/tool/tool-form-composite.js.map +++ b/static/maps/mvc/tool/tool-form-composite.js.map @@ -1 +1 @@ -{"version":3,"file":"tool-form-composite.js","sources":["../../../src/mvc/tool/tool-form-composite.js"],"names":["define","Utils","Deferred","Ui","Form","FormData","ToolFormBase","Modal","View","Backbone","extend","initialize","options","self","this","modal","parent","Galaxy","model","Model","deferred","setElement","$","addClass","append","$message","$header","$steps","$el","_configure","render","_refresh","on","window","resize","margin","_","reduce","children","memo","child","outerHeight","height","css","_handleWorkflowParameter","value","callback","wp_name","_isWorkflowParameter","wp_inputs","label","name","type","color","wp_count","style","links","forms","steps","parms","each","get","step","i","emit","debug","merge","index","parseInt","icon","help","description","annotation","citations","collapsible","collapsed","_isDataStep","sustain_version","sustain_repeats","sustain_conditionals","narrow","text_enable","text_disable","cls_enable","cls_disable","errors","messages","initial_errors","cls","hide_operations","visitInputs","inputs","input","output_connections","output_connection","sub_step","step_id","input_step_id","push","j","connections_by_name","connection","input_name","step_linked","output_name","wp_input","wp_linked","backdrop","post_job_actions","pja","action_arguments","arg","step_type","data_resolved","context","is_data_input","indexOf","data_ref","length","is_workflow","__class__","flavor","optional","isEmpty","collapsible_value","collapsible_preview","reset","_renderHeader","_renderMessage","_renderParameters","_renderHistory","_renderStep","execute","execute_btn","unwait","set","wait_text","percentage","Button","title","wait","onclick","_execute","empty","Label","Message","message","status","persistent","wp_form","onchange","input_list","input_def","_refreshStep","_append","history_form","test_param","cases","form","current","promise","portlet","html","short_str","link","_resolve","setTimeout","ready","resolve","field","field_list","data","match","new_value","undefined","values","source_step","create","v","multiple","wp_field","trigger","_enabled","job_def","new_history_name","replacement_params","validated","job_inputs","job_input_id","input_value","input_id","highlight","request","url","root","id","success","response","_templateSuccess","currHistoryPanel","refreshContents","error","err_data","step_related_errors","error_messages","matchResponse","show","body","_templateError","err_msg","buttons","Close","hide","complete","$container","enabled","enable","disable","String","substring","sanitize","lst","isArray","startsWith","text","invocation","$invocation","history","attr","outputs","output","hid","JSON","stringify"],"mappings":"AACAA,QAAS,cAAe,iBAAkB,iBAAkB,qBAA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J,EAAY1M,OAAQF,EAAG,UAAWC,SAAU,cAAe2I,KAAM,MAAQoE,EAAOC,IAAM,SAAWD,EAAOnL,SAE5G1B,EAASD,OAAQ0M,GAErB,MAAOzM,GAEP,MAAOX,MAAKkM,eAAgBX,IAIpCW,eAAgB,SAAUX,GACtB,MAAQ/K,GAAG,UAAWC,SAAU,qBAC3BC,OAAQF,EAAG,QAAS0M,KAAM,sGAC1BxM,OAAQF,EAAG,UAAW0M,KAAMQ,KAAKC,UAAWpC,EAAU,KAAM,OAGzE,QACI7L,KAAMA"} \ No newline at end of file +{"version":3,"file":"tool-form-composite.js","sources":["../../../src/mvc/tool/tool-form-composite.js"],"names":["define","Utils","Deferred","Ui","Form","FormData","ToolFormBase","Modal","View","Backbone","extend","initialize","options","self","this","modal","parent","Galaxy","model","Model","deferred","setElement","$","addClass","append","$message","$header","$steps","$el","_configure","render","_refresh","on","window","resize","margin","_","reduce","children","memo","child","outerHeight","height","css","_handleWorkflowParameter","value","callback","wp_name","_isWorkflowParameter","wp_inputs","label","name","type","color","wp_count","style","links","forms","steps","parms","each","get","step","i","emit","debug","merge","index","parseInt","icon","help","description","annotation","citations","collapsible","collapsed","_isDataStep","sustain_version","sustain_repeats","sustain_conditionals","narrow","text_enable","text_disable","cls_enable","cls_disable","errors","messages","initial_errors","cls","hide_operations","needs_refresh","always_refresh","step_type","visitInputs","inputs","input","output_connections","output_connection","sub_step","step_id","input_step_id","push","j","connections_by_name","connection","input_name","step_linked","output_name","wp_input","wp_linked","backdrop","post_job_actions","pja","action_arguments","arg","data_resolved","context","is_data_input","indexOf","data_ref","length","is_workflow","__class__","flavor","optional","isEmpty","collapsible_value","collapsible_preview","reset","_renderHeader","_renderMessage","_renderParameters","_renderHistory","_renderStep","execute","execute_btn","unwait","set","wait_text","percentage","Button","title","wait","onclick","_execute","empty","Label","Message","message","status","persistent","fade","wp_form","onchange","input_list","input_def","_refreshStep","_append","history_form","test_param","cases","form","current","promise","portlet","html","short_str","link","_resolve","setTimeout","ready","resolve","field","field_list","data","match","new_value","undefined","values","source_step","create","v","multiple","wp_field","trigger","_enabled","job_def","new_history_name","replacement_params","validated","job_inputs","job_input_id","input_value","input_id","highlight","request","url","root","id","success","response","_templateSuccess","currHistoryPanel","refreshContents","error","err_data","step_related_errors","error_messages","matchResponse","show","body","_templateError","err_msg","buttons","Close","hide","complete","$container","enabled","enable","disable","String","substring","sanitize","lst","isArray","startsWith","text","invocation","$invocation","history","attr","outputs","output","hid","JSON","stringify"],"mappings":"AACAA,QAAS,cAAe,iBAAkB,iBAAkB,qBAAsB,qBAAsB,0BAA2B,mBAC/H,SAAUC,EAAOC,EAAUC,EAAIC,EAAMC,EAAUC,EAAcC,GAC7D,GAAIC,GAAOC,SAASD,KAAKE,QACrBC,WAAY,SAAUC,GAClB,GAAIC,GAAOC,IACXA,MAAKC,MAAQC,OAAOC,OAAOF,OAAS,GAAIR,GAAMC,KAC9CM,KAAKI,MAAQN,GAAWA,EAAQM,OAAS,GAAIT,UAASU,MAAOP,GAC7DE,KAAKM,SAAW,GAAIlB,GACpBY,KAAKO,WAAYC,EAAG,UAAWC,SAAU,qBACVC,OAAQV,KAAKW,SAAgBH,EAAG,WAChCE,OAAQV,KAAKY,QAAgBJ,EAAG,WAChCE,OAAQV,KAAKa,OAAgBL,EAAG,YAC/DA,EAAG,QAASE,OAAQV,KAAKc,KACzBd,KAAKe,aACLf,KAAKgB,SACLhB,KAAKiB,WACLjB,KAAKc,IAAII,GAAI,QAAS,WAAanB,EAAKkB,aACxCT,EAAGW,QAASC,OAAQ,WAAarB,EAAKkB,cAI1CA,SAAU,WACN,GAAII,GAASC,EAAEC,OAAQvB,KAAKc,IAAIU,WAAY,SAAUC,EAAMC,GACxD,MAAOD,GAAOjB,EAAGkB,GAAQC,eAC1B,GAAM3B,KAAKa,OAAOe,SAAW,EAChC5B,MAAKa,OAAOgB,IAAK,SAAUrB,EAAGW,QAASS,SAAWP,IAItDN,WAAY,WA6ER,QAASe,GAA0BC,EA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KAAKI,MAAM2C,IAAK,QAAW,6GACvG,KAAM,GAAIE,KAAKyI,GAAW,CACtB,GAAI4B,GAAa5B,EAAUzI,GACvBsK,EAAc/M,EAAG,UAAWC,SAAU,+BAC1C6M,GAAWE,SAAWD,EAAY7M,OAAQF,EAAG,QAAS6M,KAAM,iDAC1B3M,OAAQF,EAAG,QAASC,SAAU,oBACVgN,KAAM,kBAAmBH,EAAWE,QAAQhC,IAC5CiC,KAAM,SAAU,QAChBA,KAAM,OAAQ,sCAAwCH,EAAWE,QAAQhC,IACzE6B,KAAMC,EAAWE,QAAQnL,QAC/Ef,EAAEwB,KAAMwK,EAAWI,QAAS,SAAUC,GAClCJ,EAAY7M,OAAQF,EAAG,UAAWC,SAAU,cAAe8I,KAAM,MAAQoE,EAAOC,IAAM,SAAWD,EAAOtL,SAE5G1B,EAASD,OAAQ6M,GAErB,MAAO5M,GAEP,MAAOX,MAAKqM,eAAgBX,IAIpCW,eAAgB,SAAUX,GACtB,MAAQlL,GAAG,UAAWC,SAAU,qBAC3BC,OAAQF,EAAG,QAAS6M,KAAM,sGAC1B3M,OAAQF,EAAG,UAAW6M,KAAMQ,KAAKC,UAAWpC,EAAU,KAAM,OAGzE,QACIhM,KAAMA"} \ No newline at end of file diff --git a/static/maps/mvc/ui/ui-misc.js.map b/static/maps/mvc/ui/ui-misc.js.map index 5d86247a550..e7195dc8152 100644 --- a/static/maps/mvc/ui/ui-misc.js.map +++ b/static/maps/mvc/ui/ui-misc.js.map @@ -1 +1 @@ -{"version":3,"file":"ui-misc.js","sources":["../../../src/mvc/ui/ui-misc.js"],"names":["define","Utils","Select","Slider","Options","Drilldown","Buttons","Modal","Label","Backbone","View","extend","tagName","initialize","options","this","model","Model","setElement","$","listenTo","render","title","new_title","set","value","get","$el","removeClass","addClass","html","Message","message","status","cls","persistent","update","fadeIn","timeout","window","clearTimeout","self","setTimeout","fadeOut","Input","type","placeholder","disabled","visible","area","color","style","events","input","new_val","undefined","attr","id","css","val","removeAttr","_onchange","Hidden","append","$info","$hidden","show","hide","Button","ButtonDefault","ButtonIcon","ButtonCheck","ButtonMenu","ButtonLink","RadioButton","Checkbox","Radio"],"mappings":"AAGAA,QAAQ,cACJ,2BACA,mBACA,oBACA,sBACA,oBACA,mBACA,SAAUC,EAAOC,EAAQC,EAAQC,EAASC,EAAWC,EAASC,GAG9D,GAAIC,GAAQC,SAASC,KAAKC,QACtBC,QAAS,QACTC,WAAY,SAAUC,GAClBC,KAAKC,MAAQF,GAAWA,EAAQE,OAAS,GAAIP,UAASQ,MAAOH,GAC7DC,KAAKH,QAAUE,EAAQF,SAAWG,KAAKH,QACvCG,KAAKG,WAAYC,EAAG,IAAMJ,KAAKH,QAAU,OACzCG,KAAKK,SAAUL,KAAKC,MAAO,SAAUD,KAAKM,OAAQN,MAClDA,KAAKM,UAETC,MAAO,SAAUC,GACbR,KAAKC,MAAMQ,IAAK,QAASD,IAE7BE,MAAO,WACH,MAAOV,MAAKC,MAAMU,IAAK,UAE3BL,OAAQ,WAKJ,MAJAN,MAAKY,IAAIC,cACAC,SAAU,YACVA,SAAUd,KAAKC,MAAMU,IAAK,QAC1BI,KAAMf,KAAKC,MAAMU,IAAK,UACxBX,QAKXgB,EAAUtB,SAASC,KAAKC,QACxBE,WAAY,SAAUC,GAClBC,KAAKC,MAAQF,GAAWA,EAAQE,OAAS,GAAIP,UAASQ,OAClDe,QAAc,KACdC,OAAc,OACdC,IAAc,GACdC,YAAc,IACfX,IAAKV,GACRC,KAAKK,SAAUL,KAAKC,MAAO,SAAUD,KAAKM,OAAQN,MAClDA,KAAKM,UAETe,OAAQ,SAAUtB,GACdC,KAAKC,MAAMQ,IAAKV,IAEpBO,OAAQ,WACJN,KAAKY,IAAIC,cAAcC,SAAU,cAAeA,SAAUd,KAAKC,MAAMU,IAAK,OAC1E,IAAIO,GAASlB,KAAKC,MAAMU,IAAK,SAQ7B,IAPKX,KAAKC,MAAMU,IAAK,SACjBX,KAAKY,IAAIE,UAAsB,WAAVI,GA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,YAAcjE,EAAQiE,YACtBC,WAAclE,EAAQkE,WACtBC,WAAcnE,EAAQmE,WACtB7B,MAAcA,EACdpC,MAAcA,EACduB,QAAcA,EACdxB,MAAcA,EACdmE,YAActE,EAAQsE,YACtBC,SAAcvE,EAAQuE,SACtBC,MAAcxE,EAAQwE,MACtB1E,OAAcA,EACd4D,OAAcA,EACd3D,OAAcA,EACdE,UAAcA"} \ No newline at end of file +{"version":3,"file":"ui-misc.js","sources":["../../../src/mvc/ui/ui-misc.js"],"names":["define","Utils","Select","Slider","Options","Drilldown","Buttons","Modal","Label","Backbone","View","extend","tagName","initialize","options","this","model","Model","setElement","$","listenTo","render","title","new_title","set","value","get","$el","removeClass","addClass","html","Message","message","status","cls","persistent","fade","update","timeout","window","clearTimeout","self","setTimeout","fadeOut","Input","type","placeholder","disabled","visible","area","color","style","events","input","new_val","undefined","attr","id","css","val","removeAttr","_onchange","Hidden","append","$info","$hidden","show","hide","Button","ButtonDefault","ButtonIcon","ButtonCheck","ButtonMenu","ButtonLink","RadioButton","Checkbox","Radio"],"mappings":"AAGAA,QAAQ,cACJ,2BACA,mBACA,oBACA,sBACA,oBACA,mBACA,SAAUC,EAAOC,EAAQC,EAAQC,EAASC,EAAWC,EAASC,GAG9D,GAAIC,GAAQC,SAASC,KAAKC,QACtBC,QAAS,QACTC,WAAY,SAAUC,GAClBC,KAAKC,MAAQF,GAAWA,EAAQE,OAAS,GAAIP,UAASQ,MAAOH,GAC7DC,KAAKH,QAAUE,EAAQF,SAAWG,KAAKH,QACvCG,KAAKG,WAAYC,EAAG,IAAMJ,KAAKH,QAAU,OACzCG,KAAKK,SAAUL,KAAKC,MAAO,SAAUD,KAAKM,OAAQN,MAClDA,KAAKM,UAETC,MAAO,SAAUC,GACbR,KAAKC,MAAMQ,IAAK,QAASD,IAE7BE,MAAO,WACH,MAAOV,MAAKC,MAAMU,IAAK,UAE3BL,OAAQ,WAKJ,MAJAN,MAAKY,IAAIC,cACAC,SAAU,YACVA,SAAU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MAAOH,GAC7DC,KAAKG,WAAYC,EAAI,UAAW4C,OAAQhD,KAAKiD,MAAQ7C,EAAG,WACxB4C,OAAQhD,KAAKkD,QAAU9C,EAAG,YAC1DJ,KAAKK,SAAUL,KAAKC,MAAO,SAAUD,KAAKM,OAAQN,MAClDA,KAAKM,UAETI,MAAO,SAAU6B,GAEb,MADYC,UAAZD,GAAyBvC,KAAKC,MAAMQ,IAAK,QAAS8B,GAC3CvC,KAAKC,MAAMU,IAAK,UAE3BL,OAAQ,WAIJ,MAHAN,MAAKY,IAAI6B,KAAM,KAAMzC,KAAKC,MAAMyC,IAChC1C,KAAKkD,QAAQN,IAAK5C,KAAKC,MAAMU,IAAK,UAClCX,KAAKC,MAAMU,IAAK,QAAWX,KAAKiD,MAAME,OAAOpC,KAAMf,KAAKC,MAAMU,IAAK,SAAaX,KAAKiD,MAAMG,OACpFpD,OAIf,QACIqD,OAAc9D,EAAQ+D,cACtBC,WAAchE,EAAQgE,WACtBC,YAAcjE,EAAQiE,YACtBC,WAAclE,EAAQkE,WACtBC,WAAcnE,EAAQmE,WACtB7B,MAAcA,EACdpC,MAAcA,EACduB,QAAcA,EACdxB,MAAcA,EACdmE,YAActE,EAAQsE,YACtBC,SAAcvE,EAAQuE,SACtBC,MAAcxE,EAAQwE,MACtB1E,OAAcA,EACd4D,OAAcA,EACd3D,OAAcA,EACdE,UAAcA"} \ No newline at end of file diff --git a/static/scripts/bundled/analysis.bundled.js b/static/scripts/bundled/analysis.bundled.js index 50a569ff76b..090b94f92f8 100644 --- a/static/scripts/bundled/analysis.bundled.js +++ b/static/scripts/bundled/analysis.bundled.js @@ -1,5 +1,5 @@ -webpackJsonp([3,1],[function(t,e,i){(function(t,e){var n=i(1),s=n,o=i(57).GalaxyApp,a=i(55),r=i(10),l=i(90),c=i(89),d=i(59),h=i(19),u=i(45);window.app=function(i,n){window.Galaxy=new o(i,n),Galaxy.debug("analysis app");var p=i.config,g=new l({el:"#left",userIsAnonymous:Galaxy.user.isAnonymous(),search_url:p.search_url,toolbox:p.toolbox,toolbox_in_panel:p.toolbox_in_panel,stored_workflow_menu_entries:p.stored_workflow_menu_entries,nginx_upload_path:p.nginx_upload_path,ftp_upload_site:p.ftp_upload_site,default_genome:p.default_genome,default_extension:p.default_extension}),f=new r.CenterPanel({el:"#center"}),m=new c({el:"#right",galaxyRoot:Galaxy.root,userIsAnonymous:Galaxy.user.isAnonymous(),allow_user_dataset_purge:p.allow_user_dataset_purge}),v=new d.PageLayoutView(t.extend(i,{el:"body",left:g,center:f,right:m}));Galaxy.page=v,Galaxy.params=Galaxy.config.params,Galaxy.toolPanel=g.tool_panel,Galaxy.upload=g.uploadButton,Galaxy.currHistoryPanel=m.historyView,Galaxy.currHistoryPanel.listenToGalaxy(Galaxy),Galaxy.app={display:function(t,e){s(".select2-hidden-accessible").remove(),f.display(t)}};new(e.Router.extend({initialize:function(t){this.options=t},execute:function(t,e,i){Galaxy.debug("router execute:",t,e,i);var n=a.parse(e.pop());e.push(n),t&&t.apply(this,e)},routes:{"(/)":"home","(/)root*":"home","(/)tours(/)(:tour_id)":"show_tours"},show_tours:function(t){t?u.giveTour(t):f.display(new u.ToursView)},home:function(t){t.tool_id||t.job_id?"upload1"===t.tool_id?(Galaxy.upload.show(),this._loadCenterIframe("welcome")):this._loadToolForm(t):t.workflow_id?this._loadCenterIframe("workflow/run?id="+t.workflow_id):t.m_c?this._loadCenterIframe(t.m_c+"/"+t.m_a):this._loadCenterIframe("welcome")},_loadToolForm:function(t){t.id=t.tool_id,f.display(new h.View(t))},_loadCenterIframe:function(t,e){e=e||Galaxy.root,t=e+t,f.$("#galaxy_main").prop("src",t)}}))(i);s(function(){v.render(),v.right.historyView.loadCurrentHistory(),Galaxy.listenTo(v.right.historyView,"history-size-change",function(){Galaxy.user.fetch({url:Galaxy.user.urlRoot()+"/"+(Galaxy.user.id||"current")})}),v.right.historyView.connectToQuotaMeter(v.masthead.quotaMeter),e.history.start({root:Galaxy.root,pushState:!0})})}}).call(e,i(2),i(3))},,,,,,,function(t,e,i){var n,s;(function(o,a){n=[i(4),i(22),i(51),i(21),i(47),i(13),i(8)],s=function(t,e,i,n,s,r,l){var c=o.View.extend({tagName:"label",initialize:function(t){this.model=t&&t.model||new o.Model(t),this.tagName=t.tagName||this.tagName,this.setElement(a("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},title:function(t){this.model.set("title",t)},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}}),d=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model({message:null,status:"info",cls:"",persistent:!1}).set(t),this.listenTo(this.model,"change",this.render,this),this.render()},update:function(t){this.model.set(t)},render:function(){this.$el.removeClass().addClass("ui-message").addClass(this.model.get("cls"));var t=this.model.get("status");if(this.model.get("large")?this.$el.addClass(("success"==t&&"done"||"danger"==t&&"error"||t)+"messagelarge"):this.$el.addClass("alert").addClass("alert-"+t),this.model.get("message")){if(this.$el.html(this.model.get("message")),this.$el.fadeIn(),this.timeout&&window.clearTimeout(this.timeout),!this.model.get("persistent")){var e=this;this.timeout=window.setTimeout(function(){e.model.set("message","")},3e3)}}else this.$el.fadeOut();return this}}),h=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model({type:"text",placeholder:"",disabled:!1,visible:!0,cls:"",area:!1,color:null,style:null}).set(t),this.tagName=this.model.get("area")?"textarea":"input",this.setElement(a("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},events:{input:"_onchange"},value:function(t){return void 0!==t&&this.model.set("value","string"==typeof t?t:""),this.model.get("value")},render:function(){return 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")||""),this.model.get("value")!==this.$el.val()&&this.$el.val(this.model.get("value")),this.model.get("disabled")?this.$el.attr("disabled",!0):this.$el.removeAttr("disabled"),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"))}}),u=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model(t),this.setElement(a("
").append(this.$info=a("
")).append(this.$hidden=a("
"))),this.listenTo(this.model,"change",this.render,this),this.render()},value:function(t){return void 0!==t&&this.model.set("value",t),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:r.ButtonDefault,ButtonIcon:r.ButtonIcon,ButtonCheck:r.ButtonCheck,ButtonMenu:r.ButtonMenu,ButtonLink:r.ButtonLink,Input:h,Label:c,Message:d,Modal:l,RadioButton:n.RadioButton,Checkbox:n.Checkbox,Radio:n.Radio,Select:e,Hidden:u,Slider:i,Drilldown:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},,function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(7)],s=function(t,e){var i=o.View.extend({visible:!1,initialize:function(i){var n=this;this.model=i&&i.model||new o.Model({id:t.uid(),cls:"ui-portlet",title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,collapsible:!1,collapsible_button:!1,collapsed:!1}).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.$footer=this.$(".portlet-footer"),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 e.ButtonIcon({icon:"fa-eye",tooltip:"Collapse/Expand",cls:"ui-button-icon-plain",onclick:function(){n[n.collapsed?"expand":"collapse"]()}}),this.render()},render:function(){var t=this,e=this.model.attributes;return this.$el.removeClass().addClass(e.cls).attr("id",e.id),this.$header[e.title?"show":"hide"](),this.$title_text.html(e.title),a.each([this.$content,this.$body],function(t){t[e.nopadding?"addClass":"removeClass"]("no-padding")}),e.icon?this.$title_icon.removeClass().addClass("portlet-title-icon fa").addClass(e.icon).show():this.$title_icon.hide(),this.$title_text[e.collapsible?"addClass":"removeClass"]("no-highlight collapsible").off(),e.collapsible&&(this.$title_text.on("click",function(){t[t.collapsed?"expand":"collapse"]()}),e.collapsed?this.collapse():this.expand()),e.buttons?(this.$buttons.empty().show(),r.each(this.model.get("buttons"),function(e,i){i.$el.prop("id",e),t.$buttons.append(i.$el)})):this.$buttons.hide(),this.$operations.empty,e.collapsible_button&&this.$operations.append(this.collapsible_button.$el),e.operations&&r.each(e.operations,function(e,i){i.$el.prop("id",e),t.$operations.append(i.$el)}),this},append:function(t){this.$body.append(t)},empty:function(){this.$body.empty()},header:function(){return this.$header},body:function(){return this.$body},footer:function(){return this.$footer},show:function(){this.visible=!0,this.$el.fadeIn("fast")},hide:function(){this.visible=!1,this.$el.fadeOut("fast")},enableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!1)},disableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!0)},hideOperation:function(t){this.$operations.find("#"+t).hide()},showOperation:function(t){this.$operations.find("#"+t).show()},setOperation:function(t,e){this.$operations.find("#"+t).off("click").on("click",e)},title:function(t){return t&&this.$title_text.html(t),this.$title_text.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.$footer.hide(),this.collapsible_button.setIcon("fa-eye-slash")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.$footer.fadeIn("fast"),this.collapsible_button.setIcon("fa-eye")},disable:function(){this.$backdrop.show()},enable:function(){this.$backdrop.hide()},_template:function(){return r("
").append(r("
").addClass("portlet-header").append(r("
").addClass("portlet-operations")).append(r("
").addClass("portlet-title").append(r("").addClass("portlet-title-icon")).append(r("").addClass("portlet-title-text")))).append(r("
").addClass("portlet-content").append(r("
").addClass("portlet-body")).append(r("
").addClass("portlet-buttons"))).append(r("
").addClass("portlet-footer")).append(r("
").addClass("portlet-backdrop"))}});return{View:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},,function(t,e,i){var n,s;(function(o,a,r){n=[i(8),i(24),i(15)],s=function(t,e,i){var n=o.Model.extend({}),s=o.Model.extend({defaults:{id:"",type:"",name:"",hda_ldda:"hda",metadata:null},initialize:function(){this.get("metadata")||this._set_metadata(),this.on("change",this._set_metadata,this)},_set_metadata:function(){var t=new n;a.each(a.keys(this.attributes),function(e){if(0===e.indexOf("metadata_")){var i=e.split("metadata_")[1];t.set(i,this.attributes[e]),delete this.attributes[e]}},this),this.set("metadata",t,{silent:!0})},get_metadata:function(t){return this.attributes.metadata.get(t)},urlRoot:Galaxy.root+"api/datasets"}),l=s.extend({defaults:a.extend({},s.prototype.defaults,{chunk_url:null,first_data_chunk:null,offset:0,at_eof:!1}),initialize:function(t){s.prototype.initialize.call(this),this.attributes.first_data_chunk&&(this.attributes.offset=this.attributes.first_data_chunk.offset),this.attributes.chunk_url=Galaxy.root+"dataset/display?dataset_id="+this.id,this.attributes.url_viz=Galaxy.root+"visualization"},get_next_chunk:function(){if(this.attributes.at_eof)return null;var t=this,e=r.Deferred();return r.getJSON(this.attributes.chunk_url,{offset:t.attributes.offset}).success(function(i){var n;""!==i.ck_data?(n=i,t.attributes.offset=i.offset):(t.attributes.at_eof=!0,n=null),e.resolve(n)}),e}}),c=o.Collection.extend({model:s}),d=o.View.extend({initialize:function(t){this.row_count=0,this.loading_chunk=!1,new p({model:t.model,$el:this.$el})},expand_to_container:function(){this.$el.height()").attr("id","loading_indicator"),this.$el.append(this.loading_indicator);var t=r("").attr({id:"content_table",cellpadding:0});this.$el.append(t);var e=this.model.get_metadata("column_names"),i=r("").appendTo(t),n=r("").appendTo(i);if(e)n.append("");else for(var s=1;s<=this.model.get_metadata("columns");s++)n.append("");var o=this,a=this.model.get("first_data_chunk");a?this._renderChunk(a):r.when(o.model.get_next_chunk()).then(function(t){o._renderChunk(t)}),this.scroll_elt.scroll(function(){o.attempt_to_fetch()})},scrolled_to_bottom:function(){return!1},_renderCell:function(t,e,i){var n=r("");e.append(t),this.row.append(e)},appendHeader:function(){this.$thead.append(this.row),this.row=a("")},add:function(t,e,i){var n=a("");e&&n.css("width",e),i&&n.css("text-align",i),n.append(t),this.row.append(n)},append:function(t,e){this._commit(t,e,!1)},prepend:function(t,e){this._commit(t,e,!0)},get:function(t){return this.$el.find("#"+t)},del:function(t){var e=this.$tbody.find("#"+t);e.length>0&&(e.remove(),this.row_count--,this._refresh())},delAll:function(){this.$tbody.empty(),this.row_count=0,this._refresh()},value:function(t){this.before=this.$tbody.find(".current").attr("id"),void 0!==t&&(this.$tbody.find("tr").removeClass("current"),t&&this.$tbody.find("#"+t).addClass("current"));var e=this.$tbody.find(".current").attr("id");return void 0===e?null:(e!=this.before&&this.options.onchange&&this.options.onchange(t),e)},size:function(){return this.$tbody.find("tr").length},_commit:function(t,e,i){this.del(t),this.row.attr("id",t),i?this.$tbody.prepend(this.row):this.$tbody.append(this.row),e&&(this.row.hide(),this.row.fadeIn()),this.row=this._row(),this.row_count++,this._refresh()},_row:function(){return a('')},_onclick:function(t){var e=this.value(),i=a(t.target).closest("tr").attr("id");""!=i&&i&&e!=i&&(this.options.onconfirm?this.options.onconfirm(i):this.value(i))},_ondblclick:function(t){var e=this.value();e&&this.options.ondblclick&&this.options.ondblclick(e)},_refresh:function(){0==this.row_count?this.$tmessage.show():this.$tmessage.hide()},_template:function(t){return'
"+e.join("")+""+s+"").text(t),s=this.model.get_metadata("column_types");return void 0!==i?n.attr("colspan",i).addClass("stringalign"):s&&e"),n=this.model.get_metadata("columns");return this.row_count%2!==0&&i.addClass("dark_row"),e.length===n?a.each(e,function(t,e){i.append(this._renderCell(t,e))},this):e.length>n?(a.each(e.slice(0,n-1),function(t,e){i.append(this._renderCell(t,e))},this),i.append(this._renderCell(e.slice(n-1).join("\t"),n-1))):n>5&&e.length===n-1?(a.each(e,function(t,e){i.append(this._renderCell(t,e))},this),i.append(r(""))):i.append(this._renderCell(t,0,n)),this.row_count++,i},_renderChunk:function(t){var e=this.$el.find("table");a.each(t.ck_data.split("\n"),function(t,i){""!==t&&e.append(this._renderRow(t))},this)}}),h=d.extend({initialize:function(t){d.prototype.initialize.call(this,t),scroll_elt=a.find(this.$el.parents(),function(t){return"auto"===r(t).css("overflow")}),scroll_elt||(scroll_elt=window),this.scroll_elt=r(scroll_elt)},scrolled_to_bottom:function(){return this.$el.height()-this.scroll_elt.scrollTop()-this.scroll_elt.height()<=0}}),u=d.extend({initialize:function(t){d.prototype.initialize.call(this,t),this.scroll_elt=this.$el.css({position:"relative",overflow:"scroll",height:t.height||"500px"})},scrolled_to_bottom:function(){return this.$el.scrollTop()+this.$el.innerHeight()>=this.el.scrollHeight}}),p=o.View.extend({col:{chrom:null,start:null,end:null},url_viz:null,dataset_id:null,genome_build:null,file_ext:null,initialize:function(t){function e(t,e){for(var i=0;i").attr("type","button").append(this.$icon=a("")).append(this.$title=a("")).append(this.$progress=a("
").append(this.$progress_bar=a("
")))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var t=this,e=this.model.attributes;this.$el.removeClass().addClass("ui-button-default").addClass(e.disabled&&"disabled").attr("id",e.id).attr("disabled",e.disabled).css("float",e.floating).off("click").on("click",function(){a(".tooltip").hide(),e.onclick&&!t.disabled&&e.onclick()}).tooltip({title:e.tooltip,placement:"bottom"}),this.$progress.addClass("progress").css("display",e.percentage!==-1?"block":"none"),this.$progress_bar.addClass("progress-bar").css({width:e.percentage+"%"}),this.$icon.removeClass().addClass("icon fa"),this.$title.removeClass().addClass("title"),e.wait?(this.$el.addClass(e.wait_cls).prop("disabled",!0),this.$icon.addClass("fa-spinner fa-spin ui-margin-right"),this.$title.html(e.wait_text)):(this.$el.addClass(e.cls),this.$icon.addClass(e.icon),this.$title.html(e.title),e.icon&&e.title&&this.$icon.addClass("ui-margin-right"))},show:function(){this.$el.show()},hide:function(){this.$el.hide()},disable:function(){this.model.set("disabled",!0)},enable:function(){this.model.set("disabled",!1)},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},setIcon:function(t){this.model.set("icon",t)}}),i=e.extend({initialize:function(e){this.model=e&&e.model||new o.Model({id:t.uid(),title:"",icon:"",cls:""}).set(e),this.setElement(a("").append(this.$icon=a(""))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var t=this.model.attributes;this.$el.removeClass().addClass(t.cls).attr({id:t.id,href:t.href||"javascript:void(0)",title:t.title,target:t.target||"_top",disabled:t.disabled}),this.$icon.removeClass().addClass(t.icon)}}),n=o.View.extend({initialize:function(e){this.model=e&&e.model||new o.Model({id:t.uid(),title:"Select/Unselect all",icons:["fa-square-o","fa-minus-square-o","fa-check-square-o"],value:0,onchange:function(){}}).set(e),this.setElement(a("
").append(this.$icon=a("")).append(this.$title=a(""))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(t){var e=this,t=this.model.attributes;this.$el.addClass("ui-button-check").off("click").on("click",function(){e.model.set("value",0===e.model.get("value")&&2||0),t.onclick&&t.onclick()}),this.$title.html(t.title),this.$icon.removeClass().addClass("icon fa ui-margin-right").addClass(t.icons[t.value])},value:function(t,e){return void 0!==t&&(e&&0!==t&&(t=t!==e&&1||2),this.model.set("value",t),this.model.get("onchange")(this.model.get("value"))),this.model.get("value")}}),s=e.extend({initialize:function(e){this.model=e&&e.model||new o.Model({id:t.uid(),title:"",floating:"right",icon:"",cls:"ui-button-icon",disabled:!1}).set(e),this.setElement(a("
").append(this.$button=a("
").append(this.$icon=a("")).append(this.$title=a("")))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(t){var t=this.model.attributes;this.$el.removeClass().addClass(t.cls).addClass(t.disabled&&"disabled").attr("disabled",t.disabled).attr("id",t.id).css("float",t.floating).off("click").on("click",function(){a(".tooltip").hide(),!t.disabled&&t.onclick&&t.onclick()}),this.$button.addClass("button").tooltip({title:t.tooltip,placement:"bottom"}),this.$icon.removeClass().addClass("icon fa").addClass(t.icon),this.$title.addClass("title").html(t.title),t.icon&&t.title&&this.$icon.addClass("ui-margin-right")}}),r=e.extend({$menu:null,initialize:function(t){this.model=t&&t.model||new o.Model({id:"",title:"",floating:"right",pull:"right",icon:null,onclick:null,cls:"ui-button-icon ui-button-menu",tooltip:"",target:"",href:"",onunload:null,visible:!0,tag:""}).set(t),this.setElement(a("
").append(this.$root=a("
").append(this.$icon=a("")).append(this.$title=a("")))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var t=this.model.attributes;this.$el.removeClass().addClass("dropdown").addClass(t.cls).attr("id",t.id).css({"float":t.floating,display:t.visible?"block":"none"}),this.$root.addClass("root button dropdown-toggle").attr("data-toggle","dropdown").tooltip({title:t.tooltip,placement:"bottom"}).off("click").on("click",function(e){a(".tooltip").hide(),e.preventDefault(),t.onclick&&t.onclick()}),this.$icon.removeClass().addClass("icon fa").addClass(t.icon),this.$title.removeClass().addClass("title").html(t.title),t.icon&&t.title&&this.$icon.addClass("ui-margin-right")},addMenu:function(e){var e=t.merge(e,{title:"",target:"",href:"",onclick:null,divider:!1,icon:null,cls:"button-menu btn-group"});this.$menu||(this.$menu=a("
'+t.content+"
"}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(i,o,a){n=[],s=function(){var t=i.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:!0,id:null,href:null,target:null,enabled:!0,visible:!0,tooltip_config:{}}}),e=i.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"},this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var t=this.template(this.model.toJSON());return t.tooltip(this.model.get("tooltip_config")),this.$el.replaceWith(t),this.setElement(t),this},events:{click:"click"},click:function(t){return!o.isFunction(this.model.get("on_click"))||(this.model.get("on_click")(t),!1)},template:function(t){var e='title="'+t.title+'" class="icon-button';return t.is_menu_button&&(e+=" menu-button"),e+=" "+t.icon_class,t.enabled||(e+="_disabled"),e+='"',t.id&&(e+=' id="'+t.id+'"'),e+=' href="'+t.href+'"',t.target&&(e+=' target="'+t.target+'"'),t.visible||(e+=' style="display: none;"'),e=t.enabled?"":"",a(e)}}),n=i.Collection.extend({model:t}),s=i.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var t=this;return this.collection.each(function(e){var i=a("").attr("href","javascript:void(0)").attr("title",e.attributes.title).addClass("icon-button menu-button").addClass(e.attributes.icon_class).appendTo(t.$el).click(e.attributes.on_click);e.attributes.tooltip_config&&i.tooltip(e.attributes.tooltip_config);var n=e.get("options");n&&make_popupmenu(i,n)}),this}}),r=function(e,i){i||(i={});var a=new n(o.map(e,function(e){return new t(o.extend(e,i))}));return new s({collection:a})};return{IconButton:t,IconButtonView:e,IconButtonCollection:n,IconButtonMenuView:s,create_icon_buttons_menu:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s,o;!function(a){s=[i(1)],n=a,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(t){"use_strict";var e=t;e.fn.make_text_editable=function(t){var i="num_cols"in t?t.num_cols:30,n="num_rows"in t?t.num_rows:4,s="use_textarea"in t&&t.use_textarea,o="on_finish"in t?t.on_finish:null,a="help_text"in t?t.help_text:null,r=e(this);return r.addClass("editable-text").click(function(a){if(!(e(this).children(":input").length>0)){r.removeClass("editable-text");var l,c,d=function(t){r.find(":input").remove(),""!==t?r.text(t):r.html("
"),r.addClass("editable-text"),o&&o(t)},h="cur_text"in t?t.cur_text:r.text();s?(l=e("',"
","
"].join("")}});return{CitationView:n,CitationListView:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o,a,r){n=[i(42),i(32),i(6),i(5)],s=function(t,e,i,n){"use strict";var s=t.FoldoutListItemView,l=t.ListItemView,c=s.extend({className:s.prototype.className+" dataset-collection",id:function(){return["dataset_collection",this.model.get("id")].join("-")},initialize:function(t){this.linkTarget=t.linkTarget||"_blank",this.hasUser=t.hasUser,s.prototype.initialize.call(this,t)},_setUpListeners:function(){s.prototype._setUpListeners.call(this),this.listenTo(this.model,"change",function(t,e){o.has(t.changed,"deleted")?this.render():o.has(t.changed,"element_count")&&this.$("> .title-bar .subtitle").replaceWith(this._renderSubtitle())})},_renderSubtitle:function(){return a(this.templates.subtitle(this.model.toJSON(),this))},_getFoldoutPanelOptions:function(){var t=s.prototype._getFoldoutPanelOptions.call(this);return o.extend(t,{linkTarget:this.linkTarget,hasUser:this.hasUser})},$selector:function(){return this.$("> .selector")},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCListItemView("+t+")"}});c.prototype.templates=function(){var t=o.extend({},s.prototype.templates.warnings,{error:i.wrapTemplate(["<% if( model.error ){ %>",'
',n("There was an error getting the data for this collection"),": <%- model.error %>","
","<% } %>"]),purged:i.wrapTemplate(["<% if( model.purged ){ %>",'
',n("This collection has been deleted and removed from disk"),"
","<% } %>"]),deleted:i.wrapTemplate(["<% if( model.deleted && !model.purged ){ %>",'
',n("This collection has been deleted"),"
","<% } %>"])}),e=i.wrapTemplate(['
','
','<%- collection.element_identifier || collection.name %>',"
",'
',"
"],"collection"),a=i.wrapTemplate(['
','<% var countText = collection.element_count? ( collection.element_count + " " ) : ""; %>','<% if( collection.collection_type === "list" ){ %>',n("a list of <%- countText %>datasets"),'<% } else if( collection.collection_type === "paired" ){ %>',n("a pair of datasets"),'<% } else if( collection.collection_type === "list:paired" ){ %>',n("a list of <%- countText %>dataset pairs"),'<% } else if( collection.collection_type === "list:list" ){ %>',n("a list of <%- countText %>dataset lists"),"<% } %>","
"],"collection");return o.extend({},s.prototype.templates,{warnings:t,titleBar:e,subtitle:a})}();var d=l.extend({className:l.prototype.className+" dataset-collection-element",initialize:function(t){t.logger&&(this.logger=this.model.logger=t.logger),this.log("DCEListItemView.initialize:",t),l.prototype.initialize.call(this,t)},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCEListItemView("+t+")"}});d.prototype.templates=function(){var t=i.wrapTemplate(['
','
','<%- element.element_identifier %>',"
",'
',"
"],"element");return o.extend({},l.prototype.templates,{titleBar:t})}();var h=e.DatasetListItemView.extend({className:e.DatasetListItemView.prototype.className+" dataset-collection-element",initialize:function(t){t.logger&&(this.logger=this.model.logger=t.logger),this.log("DatasetDCEListItemView.initialize:",t),e.DatasetListItemView.prototype.initialize.call(this,t)},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):r.when()},toString:function(){var t=this.model?this.model+"":"(no model)";return"DatasetDCEListItemView("+t+")"}});h.prototype.templates=function(){var t=i.wrapTemplate(['
','','
','<%- element.element_identifier %>',"
","
"],"element");return o.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:d,DatasetDCEListItemView:h,NestedDCDCEListItemView:u}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(70),i(6),i(5)],s=function(t,e,i){"use strict";var n={defaults:{model_class:"DatasetCollectionElement",element_identifier:null,element_index:null,element_type:null},_mergeObject:function(t){return o.extend(t,t.object,{element_id:t.id}),delete t.object,t},constructor:function(t,e){t=this._mergeObject(t),this.idAttribute="element_id",a.Model.apply(this,arguments)},parse:function(t,e){var i=t;return i=this._mergeObject(i)}},s=a.Model.extend(e.LoggableMixin).extend(n).extend({_logNamespace:"collections"}),l=a.Collection.extend(e.LoggableMixin).extend({_logNamespace:"collections",model:s,toString:function(){return["DatasetCollectionElementCollection(",this.length,")"].join("")}}),c=t.DatasetAssociation.extend(e.mixin(n,{url:function(){return this.has("history_id")?Galaxy.root+"api/histories/"+this.get("history_id")+"/contents/"+this.get("id"):(console.warn("no endpoint for non-hdas within a collection yet"),Galaxy.root+"api/datasets")},defaults:o.extend({},t.DatasetAssociation.prototype.defaults,n.defaults),constructor:function(t,e){this.debug("\t DatasetDCE.constructor:",t,e),n.constructor.call(this,t,e)},hasDetails:function(){return this.elements&&this.elements.length},toString:function(){var t=this.get("element_identifier");return["DatasetDCE(",t,")"].join("")}})),d=l.extend({model:c,toString:function(){return["DatasetDCECollection(",this.length,")"].join("")}}),h=a.Model.extend(e.LoggableMixin).extend(e.SearchableModelMixin).extend({_logNamespace:"collections",defaults:{collection_type:null,deleted:!1},collectionClass:l,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=a.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 0!==this.elements.length},getVisibleContents:function(t){return this.elements},parse:function(t,e){var i=a.Model.prototype.parse.call(this,t,e);return i.create_time&&(i.create_time=new Date(i.create_time)),i.update_time&&(i.update_time=new Date(i.update_time)),i},"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(",")+")"}}),u=h.extend({collectionClass:d,toString:function(){return"List"+h.prototype.toString.call(this)}}),p=u.extend({toString:function(){return"Pair"+h.prototype.toString.call(this)}}),g=h.extend(e.mixin(n,{constructor:function(t,e){this.debug("\t NestedDCDCE.constructor:",t,e),n.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedDCDCE(",t,")"].join("")}})),f=l.extend({model:g,toString:function(){return["NestedDCDCECollection(",this.length,")"].join("")}}),m=p.extend(e.mixin(n,{constructor:function(t,e){this.debug("\t NestedPairDCDCE.constructor:",t,e),n.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedPairDCDCE(",t,")"].join("")}})),v=f.extend({model:m,toString:function(){return["NestedPairDCDCECollection(",this.length,")"].join("")}}),_=h.extend({collectionClass:v,toString:function(){return["ListPairedDatasetCollection(",this.get("name"),")"].join("")}}),y=u.extend(e.mixin(n,{constructor:function(t,e){this.debug("\t NestedListDCDCE.constructor:",t,e),n.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedListDCDCE(",t,")"].join("")}})),w=f.extend({model:y,toString:function(){return["NestedListDCDCECollection(",this.length,")"].join("")}}),b=h.extend({collectionClass:w,toString:function(){return["ListOfListsDatasetCollection(",this.get("name"),")"].join("")}});return{ListDatasetCollection:u,PairDatasetCollection:p,ListPairedDatasetCollection:_,ListOfListsDatasetCollection:b}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(3),i(1))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(39),i(12),i(6),i(8),i(87),i(5),i(84)],s=function(t,e,i,n,s,c){"use strict";function d(t){var e=t.toJSON(),i=f(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 h="collections",u=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,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:a.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=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,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;a.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=a.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(a.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 s=n.name;i.hasOwnProperty(s);)if(s=n.name+" ("+e+")",e+=1,e>=t)throw new Error("Safety hit in while loop - thats impressive");n.name=s,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("
"),s=i.$list();a.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(),s.empty().append(n.children()),a.invoke(i.elementViews,"render"),s.height()>s.css("max-height")?s.css("border-width","1px 0px 1px 0px"):s.css("border-width","0px")},_createElementView:function(t){var e=new this.elementViewClass({element:t,selected:a.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=a.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=a.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+=":
"+JSON.stringify(i.responseJSON)+"
":content+=": "+n}e._showAlert(content,"alert-danger")},events:{"click .more-help":"_clickMoreHelp","click .less-help":"_clickLessHelp","click .main-help":"_toggleHelp","click .header .alert button":"_hideAlert","click .reset":"reset","click .clear-selected":"clearSelectedElements","click .collection-elements":"clearSelectedElements","dragover .collection-elements":"_dragoverElements","drop .collection-elements":"_dropElements","collection-element.dragstart .collection-elements":"_elementDragstart","collection-element.dragend .collection-elements":"_elementDragend","change .collection-name":"_changeName","keydown .collection-name":"_nameCheckForEnter","click .cancel-create":function(t){"function"==typeof this.oncancel&&this.oncancel.call(this)},"click .create-collection":"_clickCreate"},_clickMoreHelp:function(t){t.stopPropagation(),this.$(".main-help").addClass("expanded"),this.$(".more-help").hide()},_clickLessHelp:function(t){t.stopPropagation(),this.$(".main-help").removeClass("expanded"),this.$(".more-help").show()},_toggleHelp:function(t){t.stopPropagation(),this.$(".main-help").toggleClass("expanded"),this.$(".more-help").toggle()},_showAlert:function(t,e){e=e||"alert-danger",this.$(".main-help").hide(),this.$(".header .alert").attr("class","alert alert-dismissable").addClass(e).show().find(".alert-message").html(t)},_hideAlert:function(t){this.$(".main-help").show(),this.$(".header .alert").hide()},reset:function(){this._instanceSetUp(),this._elementsSetUp(),this.render()},clearSelectedElements:function(t){this.$(".collection-elements .collection-element").removeClass("selected"),this.$(".collection-elements-controls > .clear-selected").hide()},_dragoverElements:function(t){t.preventDefault();var e=this.$list();this._checkForAutoscroll(e,t.originalEvent.clientY);var i=this._getNearestElement(t.originalEvent.clientY);this.$(".element-drop-placeholder").remove();var n=r('
');i.length?i.before(n):e.append(n)},_checkForAutoscroll:function(t,e){var i=2,n=t.offset(),s=t.scrollTop(),o=e-n.top,a=n.top+t.outerHeight()-e;o>=0&&o=0&&at&&o-a
','
',''].join("")),header:a.template(['",'
','','',"
"].join("")),middle:a.template(['",'
',"
"].join("")),footer:a.template(['
','
','','
',c("Name"),":
","
","
",'
','
','",'
','",'","
","
",'
','","
","
"].join("")),helpContent:a.template(["

",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:a.template([c("The following selections could not be included due to problems:"),"
    <% _.each( problems, function( problem ){ %>","
  • <%- problem.element.name %>: <%- problem.text %>
  • ","<% }); %>
"].join("")),noElementsLeft:a.template(['
  • ',c("No elements left! "),c("Would you like to "),'',c("start over"),"?","
  • "].join("")),invalidInitial:a.template(['
    ','
    ','',"<% 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"}}),g=function(t,e,i){var s,o=l.Deferred(),r=Galaxy.modal||new n.View;return e=a.defaults(e||{},{elements:t,oncancel:function(){r.hide(),o.reject("cancelled")},oncreate:function(t,e){r.hide(),o.resolve(e)}}),s=new i(e),r.show({title:e.title||c("Create a collection"),body:s.$el,width:"80%",height:"100%",closing_events:!0}),s.render(),window._collectionCreator=s,o},f=function(t,e){return e=e||{},e.title=c("Create a collection from a list of datasets"),g(t,e,p)};return{DatasetCollectionElementView:u,ListCollectionCreator:p,collectionCreatorModal:g,listCollectionCreatorModal:f,createListCollection:d}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1),i(1))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(42),i(12),i(23),i(6),i(5)],s=function(t,e,i,n,s){"use strict";var c="dataset",d=t.ListItemView,h=d.extend({_logNamespace:c,className:d.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),d.prototype.initialize.call(this,t),this.linkTarget=t.linkTarget||"_blank"},_setUpListeners:function(){d.prototype._setUpListeners.call(this);var t=this;return t.listenTo(t.model,{change:function(e,i){t.model.changedAttributes().state&&t.model.inReadyState()&&t.expanded&&!t.model.hasDetails()?t.model.fetch({silent:!0}).done(function(){t.render()}):t.render()}})},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):o.when()},remove:function(t,e){var i=this;t=t||this.fxSpeed,this.$el.fadeOut(t,function(){a.View.prototype.remove.call(i),e&&e.call(i)})},_swapNewRender:function(t){return d.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=s("Cannot display datasets removed from disk");else if(t===e.UPLOAD)n.disabled=!0,n.title=s("This dataset must finish uploading before it can be viewed");else if(t===e.NEW)n.disabled=!0,n.title=s("This dataset is not yet viewable");else{n.title=s("View data"),n.href=this.model.urls.display;var o=this;n.onclick=function(t){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.addDataset(o.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=d.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:s("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(['"].join("\n"))},events:l.extend(l.clone(d.prototype.events),{"click .display-btn":function(t){this.trigger("display",this,t)},"click .params-btn":function(t){this.trigger("params",this,t)},"click .download-btn":function(t){this.trigger("download",this,t)}}),toString:function(){var t=this.model?this.model+"":"(no model)";return"DatasetListItemView("+t+")"}});return h.prototype.templates=function(){var t=l.extend({},d.prototype.templates.warnings,{failed_metadata:n.wrapTemplate(['<% if( model.state === "failed_metadata" ){ %>','
    ',s("An error occurred setting the metadata for this dataset"),"
    ","<% } %>"]),error:n.wrapTemplate(["<% if( model.error ){ %>",'
    ',s("There was an error getting the data for this dataset"),": <%- model.error %>","
    ","<% } %>"]),purged:n.wrapTemplate(["<% if( model.purged ){ %>",'
    ',s("This dataset has been deleted and removed from disk"),"
    ","<% } %>"]),deleted:n.wrapTemplate(["<% if( model.deleted && !model.purged ){ %>",'
    ',s("This dataset has been deleted"),"
    ","<% } %>"])}),i=n.wrapTemplate(['
    ','
    ','
    ','
    ','
    ',"
    ","<% if( !dataset.deleted && !dataset.purged ){ %>",'
    ','
    ','
    ',"<% if( dataset.peek ){ %>",'
    <%= dataset.peek %>
    ',"<% } %>","<% } %>","
    "],"dataset"),o=n.wrapTemplate(['
    ','
    ',s("You do not have permission to view this dataset"),"
    ","
    "],"dataset"),a={};a[e.OK]=a[e.FAILED_METADATA]=n.wrapTemplate(["<% if( dataset.misc_blurb ){ %>",'
    ','<%- dataset.misc_blurb %>',"
    ","<% } %>","<% if( dataset.file_ext ){ %>",'
    ','",'<%- dataset.file_ext %>',"
    ","<% } %>","<% if( dataset.metadata_dbkey ){ %>",'
    ','",'',"<%- dataset.metadata_dbkey %>","","
    ","<% } %>","<% if( dataset.misc_info ){ %>",'
    ','<%- dataset.misc_info %>',"
    ","<% } %>"],"dataset"),a[e.NEW]=n.wrapTemplate(["
    ",s("This is a new dataset and not all of its data are available yet"),"
    "],"dataset"),a[e.NOT_VIEWABLE]=n.wrapTemplate(["
    ",s("You do not have permission to view this dataset"),"
    "],"dataset"),a[e.DISCARDED]=n.wrapTemplate(["
    ",s("The job creating this dataset was cancelled before completion"),"
    "],"dataset"),a[e.QUEUED]=n.wrapTemplate(["
    ",s("This job is waiting to run"),"
    "],"dataset"),a[e.RUNNING]=n.wrapTemplate(["
    ",s("This job is currently running"),"
    "],"dataset"),a[e.UPLOAD]=n.wrapTemplate(["
    ",s("This dataset is currently uploading"),"
    "],"dataset"),a[e.SETTING_METADATA]=n.wrapTemplate(["
    ",s("Metadata is being auto-detected"),"
    "],"dataset"),a[e.PAUSED]=n.wrapTemplate(["
    ",s('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume'),"
    "],"dataset"),a[e.ERROR]=n.wrapTemplate(["<% if( !dataset.purged ){ %>","
    <%- dataset.misc_blurb %>
    ","<% } %>",'',s("An error occurred with this dataset"),":",'
    <%- dataset.misc_info %>
    '],"dataset"),a[e.EMPTY]=n.wrapTemplate(["
    ",s("No data"),": <%- dataset.misc_blurb %>
    "],"dataset"),a.unknown=n.wrapTemplate(['
    Error: unknown dataset state: "<%- dataset.state %>"
    '],"dataset");var r={resubmitted:n.wrapTemplate(["<% if( model.resubmitted ){ %>",'
    ',s("The job creating this dataset has been resubmitted"),"
    ","<% } %>"])},c=n.wrapTemplate(["<% _.each( apps, function( app ){ %>",'
    ','<%- app.label %> ','',"<% _.each( app.links, function( link ){ %>",'',"<% print( _l( link.text ) ); %>"," ","<% }); %>","","
    ","<% }); %>"],"apps");return l.extend({},d.prototype.templates,{warnings:t,details:i,noAccess:o,summaries:a,detailMessages:r,displayApplications:c})}(),{DatasetListItemView:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4)],s=function(t){var e=o.Model.extend({initialize:function(t){this.app=t},checksum:function(){var t="",e=this;return this.app.section.$el.find(".section-row").each(function(){var i=a(this).attr("id"),n=e.app.field_list[i];n&&(t+=i+":"+JSON.stringify(n.value&&n.value())+":"+n.collapsed+";")}),t},set:function(t){for(var e in t.attributes){var i=this.match(e);i&&this.app.field_list[i].value(t.get(e))}},create:function(){function t(t,e,i){n.flat_dict[t]=e,o[t]=i,n.app.element_list[e]&&n.app.element_list[e].$el.attr("tour_id",t)}function e(s,o){for(var a in o){var r=o[a];if(r.input){var l=r.input,c=s;switch(""!=s&&(c+="|"),c+=l.name,l.type){case"repeat":var d="section-",h=[],u=null;for(var p in r){var g=p.indexOf(d);g!=-1&&(g+=d.length,h.push(parseInt(p.substr(g))),u||(u=p.substr(0,g)))}h.sort(function(t,e){return t-e});var a=0;for(var f in h)e(c+"_"+a++,r[u+h[f]]);break;case"conditional":var m=n.app.field_list[l.id].value();t(c+"|"+l.test_param.name,l.id,m);var v=i(l,m);v!=-1&&e(c,o[l.id+"-section-"+v]);break;case"section":e(!l.flat&&c||"",r);break;default:var _=n.app.field_list[l.id];if(_&&_.value){var m=_.value();if((void 0===l.ignore||l.ignore!=m)&&(_.collapsed&&l.collapsible_value&&(m=l.collapsible_value),t(c,l.id,m),l.payload))for(var y in l.payload)t(y,l.id,l.payload[y])}}}}}var n=this,s={};this._iterate(this.app.section.$el,s);var o={};return this.flat_dict={},e("",s),o},match:function(t){return this.flat_dict&&this.flat_dict[t]},matchCase:function(t,e){return i(t,e)},matchModel:function(t,e){var i=this;n(t.inputs,function(t,n){i.flat_dict[n]&&e(t,i.flat_dict[n])})},matchResponse:function(t){function e(t,s){if("string"==typeof s){var o=n.flat_dict[t];o&&(i[o]=s)}else for(var a in s){var r=a;if(""!==t){var l="|";s instanceof Array&&(l="_"),r=t+l+r}e(r,s[a])}}var i={},n=this;return e("",t),i},_iterate:function(t,e){var i=this,n=a(t).children();n.each(function(){var t=this,n=a(t).attr("id");if(a(t).hasClass("section-row")){var s=i.app.input_list[n];e[n]=s&&{input:s}||{},i._iterate(t,e[n])}else i._iterate(t,e)})}}),i=function(t,e){"boolean"==t.test_param.type&&(e="true"==e?t.test_param.truevalue||"true":t.test_param.falsevalue||"false");for(var i in t.cases)if(t.cases[i].value==e)return i;return-1},n=function(t,e,s,o){o=a.extend(!0,{},o),r.each(t,function(t){t&&t.type&&t.name&&(o[t.name]=t)});for(var l in t){var c=t[l],d=s?s+"|"+c.name:c.name;switch(c.type){case"repeat":r.each(c.cache,function(t,i){n(t,e,d+"_"+i,o)});break;case"conditional":if(c.test_param){e(c.test_param,d+"|"+c.test_param.name,o);var h=i(c,c.test_param.value);h!=-1?n(c.cases[h].inputs,e,d,o):Galaxy.emit.debug("form-data::visitInputs() - Invalid case for "+d+".")}else Galaxy.emit.debug("form-data::visitInputs() - Conditional test parameter missing for "+d+".");break;case"section":n(c.inputs,e,d,o);break;default:e(c,d,o)}}};return{Manager:e,visitInputs:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(i,o,a){n=[],s=function(){return i.View.extend({initialize:function(t,e){this.app=t,this.app_options=t.options||{},this.field=e&&e.field||new i.View,this.model=e&&e.model||new i.Model({text_enable:this.app_options.text_enable||"Enable",text_disable:this.app_options.text_disable||"Disable",cls_enable:this.app_options.cls_enable||"fa fa-caret-square-o-down",cls_disable:this.app_options.cls_disable||"fa fa-caret-square-o-up"}).set(e),this.setElement(this._template()),this.$field=this.$(".ui-form-field"),this.$info=this.$(".ui-form-info"),this.$preview=this.$(".ui-form-preview"),this.$collapsible=this.$(".ui-form-collapsible"),this.$collapsible_text=this.$(".ui-form-collapsible-text"),this.$collapsible_icon=this.$(".ui-form-collapsible-icon"),this.$title=this.$(".ui-form-title"),this.$title_text=this.$(".ui-form-title-text"),this.$error_text=this.$(".ui-form-error-text"),this.$error=this.$(".ui-form-error"),this.$backdrop=this.$(".ui-form-backdrop"),this.$field.prepend(this.field.$el);var n=this.model.get("collapsible_value");this.field.collapsed=void 0!==n&&JSON.stringify(this.model.get("value"))==JSON.stringify(n),this.listenTo(this.model,"change",this.render,this),this.render();var s=this;this.$collapsible.on("click",function(){s.field.collapsed=!s.field.collapsed,t.trigger&&t.trigger("change"),s.render()})},backdrop:function(){this.model.set("backdrop",!0)},error:function(t){this.model.set("error_text",t)},reset:function(){this.model.set("error_text",null)},render:function(){o(".tooltip").hide();var t=this.model.get("help",""),e=this.model.get("argument");e&&t.indexOf("("+e+")")==-1&&(t+=" ("+e+")"),this.$info.html(t),this.$preview[this.field.collapsed&&this.model.get("collapsible_preview")||this.model.get("disabled")?"show":"hide"]().html(a.escape(this.model.get("text_value")));var i=this.model.get("error_text");if(this.$error[i?"show":"hide"](),this.$el[i?"addClass":"removeClass"]("ui-error"),this.$error_text.html(i),this.$backdrop[this.model.get("backdrop")?"show":"hide"](),this.field.collapsed||this.model.get("disabled")?this.$field.hide():this.$field.fadeIn("fast"),this.field.model&&this.field.model.set({color:this.model.get("color"),style:this.model.get("style")}),this.model.get("disabled")||void 0===this.model.get("collapsible_value"))this.$title_text.show().text(this.model.get("label")),this.$collapsible.hide();else{var n=this.field.collapsed?"enable":"disable";this.$title_text.hide(),this.$collapsible.show(),this.$collapsible_text.text(this.model.get("label")),this.$collapsible_icon.removeClass().addClass("icon").addClass(this.model.get("cls_"+n)).attr("data-original-title",this.model.get("text_"+n)).tooltip({placement:"bottom"})}},_template:function(){return o("
    ").addClass("ui-form-element").append(o("
    ").addClass("ui-form-error ui-error").append(o("").addClass("fa fa-arrow-down")).append(o("").addClass("ui-form-error-text"))).append(o("
    ").addClass("ui-form-title").append(o("
    ").addClass("ui-form-collapsible").append(o("").addClass("ui-form-collapsible-icon")).append(o("").addClass("ui-form-collapsible-text"))).append(o("").addClass("ui-form-title-text"))).append(o("
    ").addClass("ui-form-field").append(o("").addClass("ui-form-info")).append(o("
    ").addClass("ui-form-backdrop"))).append(o("
    ").addClass("ui-form-preview"))}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(7),i(48),i(50),i(49),i(46)],s=function(t,e,i,n,s,l){return o.Model.extend({types:{text:"_fieldText",select:"_fieldSelect",data_column:"_fieldSelect",genomebuild:"_fieldSelect",data:"_fieldData",data_collection:"_fieldData",integer:"_fieldSlider","float":"_fieldSlider","boolean":"_fieldBoolean",drill_down:"_fieldDrilldown",color:"_fieldColor",hidden:"_fieldHidden",hidden_data:"_fieldHidden",baseurl:"_fieldHidden",library_data:"_fieldLibrary",ftpfile:"_fieldFtp"},create:function(t){var e=this.types[t.type],i="function"==typeof this[e]?this[e].call(this,t):null;return i||(i=t.options?this._fieldSelect(t):this._fieldText(t),Galaxy.emit.debug("form-parameters::_addRow()","Auto matched field type ("+t.type+").")),void 0===t.value&&(t.value=null),i.value(t.value),i},_fieldData:function(t){return new i.View({id:"field-"+t.id,extensions:t.extensions,optional:t.optional,multiple:t.multiple,type:t.type,flavor:t.flavor,data:t.options,onchange:t.onchange})},_fieldSelect:function(t){if(t.is_workflow)return this._fieldText(t);"data_column"==t.type&&(t.error_text="Missing columns in referenced dataset.");var i=t.data;i||(i=[],a.each(t.options,function(t){i.push({label:t[0],value:t[1]})}));var n=e.Select;switch(t.display){case"checkboxes":n=e.Checkbox;break;case"radio":n=e.Radio;break;case"radiobutton":n=e.RadioButton}return new n.View({id:"field-"+t.id,data:i,error_text:t.error_text||"No options available",multiple:t.multiple,optional:t.optional,onchange:t.onchange})},_fieldDrilldown:function(t){return t.is_workflow?this._fieldText(t):new e.Drilldown.View({id:"field-"+t.id,data:t.options,display:t.display,optional:t.optional,onchange:t.onchange})},_fieldText:function(i){if(i.options&&i.data)if(i.area=i.multiple,t.isEmpty(i.value))i.value=null;else if(r.isArray(i.value)){var n="";for(var s in i.value){if(n+=String(i.value[s]),!i.multiple)break;n+="\n"}i.value=n}return new e.Input({id:"field-"+i.id,area:i.area,placeholder:i.placeholder,onchange:i.onchange})},_fieldSlider:function(t){return new e.Slider.View({id:"field-"+t.id,precise:"float"==t.type,is_workflow:t.is_workflow,min:t.min,max:t.max,onchange:t.onchange})},_fieldHidden:function(t){return new e.Hidden({id:"field-"+t.id,info:t.info})},_fieldBoolean:function(t){return new e.RadioButton.View({id:"field-"+t.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:t.onchange})},_fieldColor:function(t){return new l({id:"field-"+t.id,onchange:t.onchange})},_fieldLibrary:function(t){return new n.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:t.onchange})},_fieldFtp:function(t){return new s.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:t.onchange})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(14),i(9),i(7)],s=function(t,e,i,n){var s=o.View.extend({initialize:function(i){this.options=t.merge(i,{title:"Section",empty_text:"Not available.",max:null,min:null}),this.setElement("
    "),this.button_new=new n.ButtonIcon({icon:"fa-plus",title:"Insert "+this.options.title_new,tooltip:"Add new "+this.options.title_new+" block",floating:"clear",onclick:function(){i.onnew&&i.onnew()}}),this.table=new e.View({cls:"ui-table-plain",content:""}),this.$el.append(this.table.$el),this.$el.append(a("
    ").append(this.button_new.$el)),this.list={},this.n=0},size:function(){return this.n},add:function(t){if(!t.id||this.list[t.id])return void Galaxy.emit.debug("form-repeat::add()","Duplicate repeat block id.");this.n++;var e=new n.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain",onclick:function(){t.ondel&&t.ondel()}}),s=new i.View({id:t.id,title:"placeholder",cls:t.cls||"ui-portlet-repeat",operations:{button_delete:e}});s.append(t.$el),s.$el.addClass("section-row"),this.list[t.id]=s,this.table.add(s.$el),this.table.append("row_"+t.id,!0),this.options.max>0&&this.n>=this.options.max&&this.button_new.disable(),this._refresh()},del:function(t){if(!this.list[t])return void Galaxy.emit.debug("form-repeat::del()","Invalid repeat block id.");this.n--;var e=this.table.get("row_"+t);e.remove(),delete this.list[t],this.button_new.enable(),this._refresh()},delAll:function(){for(var t in this.list)this.del(t)},hideOptions:function(){this.button_new.$el.hide(),r.each(this.list,function(t){t.hideOperation("button_delete")}),r.isEmpty(this.list)&&this.$el.append(a("
    ").addClass("ui-form-info").html(this.options.empty_text))},_refresh:function(){var t=0;for(var e in this.list){var i=this.list[e];i.title(++t+": "+this.options.title),this.n>this.options.min?i.showOperation("button_delete"):i.hideOperation("button_delete")}}});return{View:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(4),i(14),i(7),i(9),i(36),i(34),i(35)],s=function(t,e,i,n,s,c,d){var h=o.View.extend({initialize:function(t,i){this.app=t,this.inputs=i.inputs,i.cls="ui-table-plain",i.cls_tr="section-row",this.table=new e.View(i),this.parameters=new d,this.setElement(this.table.$el),this.render()},render:function(){this.table.delAll();for(var t in this.inputs)this.add(this.inputs[t])},add:function(e){var i=a.extend(!0,{},e);i.id=e.id=t.uid(),this.app.input_list[i.id]=i;var n=i.type;switch(n){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(t){var e=this;t.test_param.id=t.id,this.app.options.sustain_conditionals&&(t.test_param.disabled=!0);var i=this._addRow(t.test_param);i.model&&i.model.set("onchange",function(i){var n=e.app.data.matchCase(t,i);for(var s in t.cases){var o=t.cases[s],a=t.id+"-section-"+s,r=e.table.get(a),l=!1;for(var c in o.inputs)if(!o.inputs[c].hidden){l=!0;break}s==n&&l?r.fadeIn("fast"):r.hide()}e.app.trigger("change")});for(var n in t.cases){var s=t.id+"-section-"+n,o=new h(this.app,{inputs:t.cases[n].inputs});o.$el.addClass("ui-table-section"),this.table.add(o.$el),this.table.append(s)}i.trigger("change")},_addRepeat:function(t){function e(e){var s=t.id+"-section-"+n++,a=new h(i.app,{inputs:e});o.add({id:s,$el:a.$el,ondel:function(){o.del(s),i.app.trigger("change")}})}for(var i=this,n=0,o=new s.View({title:t.title||"Repeat",title_new:t.title||"",min:t.min,max:t.max,onnew:function(){e(t.inputs),i.app.trigger("change")}}),a=r.size(t.cache),l=0;l").addClass("ui-form-info").html(t.help)),this.app.on("expand",function(t){e.$("#"+t).length>0&&e.expand()}),this.table.add(e.$el),this.table.append(t.id)},_addRow:function(t){var e=this,i=t.id;t.onchange=function(){e.app.trigger("change",i)};var n=this.parameters.create(t);this.app.field_list[i]=n;var s=new c(this.app,{name:t.name,label:t.label||t.name,value:t.value,text_value:t.text_value,collapsible_value:t.collapsible_value,collapsible_preview:t.collapsible_preview,help:t.help,argument:t.argument,disabled:t.disabled,color:t.color,style:t.style,backdrop:t.backdrop,field:n});return this.app.element_list[i]=s,this.table.add(s.$el),this.table.append(i),t.hidden&&this.table.get(i).hide(),n}});return{View:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(9),i(7),i(37),i(33)],s=function(t,e,i,n,s){return o.View.extend({initialize:function(e){this.options=t.merge(e,{initial_errors:!1,cls:"ui-portlet-limited",icon:null,always_refresh:!0}),this.setElement("
    "),this.render()},update:function(t){var e=this;this.data.matchModel(t,function(t,i){var n=e.input_list[i];if(n&&n.options&&!a.isEqual(n.options,t.options)){n.options=t.options;var s=e.field_list[i];if(s.update){var o=[];if(["data","data_collection","drill_down"].indexOf(n.type)!=-1)o=n.options;else for(var r in t.options){var l=t.options[r];l.length>2&&o.push({label:l[0],value:l[1]})}s.update(o),s.trigger("change"),Galaxy.emit.debug("form-view::update()","Updating options for "+i)}}})},wait:function(t){for(var e in this.input_list){var i=this.field_list[e],n=this.input_list[e];n.is_dynamic&&i.wait&&i.unwait&&(t?i.wait():i.unwait())}},highlight:function(t,e,i){var n=this.element_list[t];if(n&&(n.error(e||"Please verify this parameter."),this.portlet.expand(),this.trigger("expand",t),!i)){var s=this.$el.parents().filter(function(){return["auto","scroll"].indexOf(r(this).css("overflow"))!=-1}).first();s.animate({scrollTop:s.scrollTop()+n.$el.offset().top-120},500)}},errors:function(t){if(this.trigger("reset"),t&&t.errors){var e=this.data.matchResponse(t.errors);for(var i in this.element_list){this.element_list[i];e[i]&&this.highlight(i,e[i],!0)}}},setOnChange:function(t){this.options.onchange=t},render:function(){var t=this;this.off("change"),this.off("reset"),this.field_list={},this.input_list={},this.element_list={},this.data=new s.Manager(this),this._renderForm(),this.data.create(),this.options.initial_errors&&this.errors(this.options);var e=this.data.checksum();return this.on("change",function(i){var n=t.input_list[i];if(!n||n.refresh_on_change||t.options.always_refresh){var s=t.data.checksum();s!=e&&(e=s,t.options.onchange&&t.options.onchange())}}),this.on("reset",function(){for(var t in this.element_list)this.element_list[t].reset()}),this},_renderForm:function(){this.message=new i.Message,this.section=new n.View(this,{inputs:this.options.inputs}),r(".tooltip").remove(),this.portlet=new e.View({icon:this.options.icon,title:this.options.title,cls:this.options.cls,operations:this.options.operations,buttons:this.options.buttons,collapsible:this.options.collapsible,collapsed:this.options.collapsed}),this.portlet.append(this.message.$el),this.portlet.append(this.section.$el),this.$el.empty(),this.$el.append(this.portlet.$el),this.options.message&&this.message.update({persistent:!0,status:"warning",message:this.options.message}),Galaxy.emit.debug("form-view::initialize()","Completed")}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o){n=[i(30),i(74),i(5)],s=function(t,e,i){"use strict";function n(t){return function(e,i){return this.isNew()&&(i=i||{},i.url=this.urlRoot+this.get("history_id")+"/contents",e=e||{},e.type="dataset_collection"),t.call(this,e,i)}}var s=e.HistoryContentMixin,a=t.ListDatasetCollection,r=t.PairDatasetCollection,l=t.ListPairedDatasetCollection,c=t.ListOfListsDatasetCollection,d=a.extend(s).extend({defaults:o.extend(o.clone(a.prototype.defaults),{history_content_type:"dataset_collection",collection_type:"list",model_class:"HistoryDatasetCollectionAssociation"}),save:n(a.prototype.save),toString:function(){return"History"+a.prototype.toString.call(this)}}),h=r.extend(s).extend({defaults:o.extend(o.clone(r.prototype.defaults),{history_content_type:"dataset_collection",collection_type:"paired",model_class:"HistoryDatasetCollectionAssociation"}),save:n(r.prototype.save),toString:function(){return"History"+r.prototype.toString.call(this)}}),u=l.extend(s).extend({defaults:o.extend(o.clone(l.prototype.defaults),{history_content_type:"dataset_collection",collection_type:"list:paired",model_class:"HistoryDatasetCollectionAssociation"}),save:n(l.prototype.save),toString:function(){return"History"+l.prototype.toString.call(this)}}),p=c.extend(s).extend({defaults:o.extend(o.clone(c.prototype.defaults),{history_content_type:"dataset_collection",collection_type:"list:list",model_class:"HistoryDatasetCollectionAssociation"}),initialize:function(t,e){c.prototype.initialize.call(this,t,e),s.initialize.call(this,t,e)},save:n(c.prototype.save),toString:function(){return["HistoryListOfListsDatasetCollection(",this.get("name"),")"].join("")}});return{HistoryListDatasetCollection:d,HistoryPairDatasetCollection:h,HistoryListPairedDatasetCollection:u,HistoryListOfListsDatasetCollection:p}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(67),i(72),i(39),i(41),i(6),i(125)],s=function(t,e,i,n,s,l){"use strict";var c=t.PaginatedCollection,d=c.extend(s.LoggableMixin).extend({_logNamespace:"history",model:function(t,n){if("dataset"===t.history_content_type)return new e.HistoryDatasetAssociation(t,n);if("dataset_collection"===t.history_content_type){switch(t.collection_type){case"list":return new i.HistoryListDatasetCollection(t,n);case"paired":return new i.HistoryPairDatasetCollection(t,n);case"list:paired":return new i.HistoryListPairedDatasetCollection(t,n);case"list:list":return new i.HistoryListOfListsDatasetCollection(t,n)}var s="Unknown collection_type: "+t.collection_type;return console.warn(s,t),{validationError:s}}return{validationError:"Unknown history_content_type: "+t.history_content_type}},limitPerPage:500,limitPerProgressiveFetch:500,order:"hid",urlRoot:Galaxy.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(t,e){e=e||{},c.prototype.initialize.call(this,t,e),this.history=e.history||null,this.setHistoryId(e.historyId||null),this.includeDeleted=e.includeDeleted||this.includeDeleted,this.includeHidden=e.includeHidden||this.includeHidden,this.model.prototype.idAttribute="type_id"},setHistoryId:function(t){this.historyId=t,this._setUpWebStorage()},_setUpWebStorage:function(t){if(this.historyId)return this.storage=new n.HistoryPrefs({id:n.HistoryPrefs.historyStorageKey(this.historyId)}),this.trigger("new-storage",this.storage,this),this.on({"include-deleted":function(t){this.storage.includeDeleted(t)},"include-hidden":function(t){this.storage.includeHidden(t)}}),this.includeDeleted=this.storage.includeDeleted()||!1,this.includeHidden=this.storage.includeHidden()||!1,this},comparators:o.extend(o.clone(c.prototype.comparators),{name:s.buildComparator("name",{ascending:!0}),"name-dsc":s.buildComparator("name",{ascending:!1}),hid:s.buildComparator("hid",{ascending:!1}),"hid-asc":s.buildComparator("hid",{ascending:!0})}),running:function(){return this.filter(function(t){return!t.inReadyState()})},runningAndActive:function(){return this.filter(function(t){return!t.inReadyState()&&t.get("visible")&&!t.get("deleted")})},getByHid:function(t){return this.findWhere({hid:t})},haveDetails:function(){return this.all(function(t){return t.hasDetails()})},hidden:function(){return this.filter(function(t){return t.hidden()})},deleted:function(){return this.filter(function(t){return t.get("deleted")})},visibleAndUndeleted:function(){return this.filter(function(t){return t.get("visible")&&!t.get("deleted")})},setIncludeDeleted:function(t,e){if(o.isBoolean(t)&&t!==this.includeDeleted){if(this.includeDeleted=t,o.result(e,"silent"))return;this.trigger("include-deleted",t,this)}},setIncludeHidden:function(t,e){if(o.isBoolean(t)&&t!==this.includeHidden){if(this.includeHidden=t,e=e||{},o.result(e,"silent"))return;this.trigger("include-hidden",t,this)}},fetch:function(t){if(t=t||{},this.historyId&&!t.details){var e=n.HistoryPrefs.get(this.historyId).toJSON();o.isEmpty(e.expandedIds)||(t.details=o.values(e.expandedIds).join(","))}return c.prototype.fetch.call(this,t)},_buildFetchData:function(t){return o.extend(c.prototype._buildFetchData.call(this,t),{v:"dev"})},_fetchParams:c.prototype._fetchParams.concat(["v","details"]),_buildFetchFilters:function(t){var e=c.prototype._buildFetchFilters.call(this,t)||{},i={};return this.includeDeleted||(i.deleted=!1,i.purged=!1),this.includeHidden||(i.visible=!0),o.defaults(e,i)},getTotalItemCount:function(){return this.history.contentsShown()},fetchUpdated:function(t,e){return t&&(e=e||{filters:{}},e.remove=!1,e.filters={"update_time-ge":t.toISOString(),visible:""}),this.fetch(e)},fetchDeleted:function(t){t=t||{};var e=this;return t.filters=o.extend(t.filters,{deleted:!0,purged:void 0}),t.remove=!1,e.trigger("fetching-deleted",e),e.fetch(t).always(function(){e.trigger("fetching-deleted-done",e)})},fetchHidden:function(t){t=t||{};var e=this;return t.filters=o.extend(t.filters,{visible:!1}),t.remove=!1,e.trigger("fetching-hidden",e),e.fetch(t).always(function(){e.trigger("fetching-hidden-done",e)})},fetchAllDetails:function(t){t=t||{};var e={details:"all"};return t.data=o.extend(t.data||{},e),this.fetch(t)},fetchCollectionCounts:function(t){return t=t||{},t.keys=["type_id","element_count"].join(","),t.filters=o.extend(t.filters||{},{history_content_type:"dataset_collection"}),t.remove=!1,this.fetch(t)},_filterAndUpdate:function(t,e){var i=this,n=i.model.prototype.idAttribute,s=[e]; return i.fetch({filters:t,remove:!1}).then(function(t){return t=t.reduce(function(t,e,s){var o=i.get(e[n]);return o?t.concat(o):t},[]),i.ajaxQueue("save",s,t)})},ajaxQueue:function(t,e,i){return i=i||this.models,new l.AjaxQueue(i.slice().reverse().map(function(i,n){var s=o.isString(t)?i[t]:t;return function(){return s.apply(i,e)}})).deferred},progressivelyFetchDetails:function(t){function i(e){e=e||0;var a=o.extend(o.clone(t),{view:"summary",keys:c,limit:r,offset:e,reset:0===e,remove:!1});o.defer(function(){s.fetch.call(s,a).fail(n.reject).done(function(t){n.notify(t,r,e),t.length!==r?(s.allFetched=!0,n.resolve(t,r,e)):i(e+r)})})}t=t||{};var n=a.Deferred(),s=this,r=t.limitPerCall||s.limitPerProgressiveFetch,l=e.HistoryDatasetAssociation.prototype.searchAttributes,c=l.join(",");return i(),n},isCopyable:function(t){var e=["HistoryDatasetAssociation","HistoryDatasetCollectionAssociation"];return o.isObject(t)&&t.id&&o.contains(e,t.model_class)},copy:function(t){var e,i,n;o.isString(t)?(e=t,n="hda",i="dataset"):(e=t.id,n={HistoryDatasetAssociation:"hda",LibraryDatasetDatasetAssociation:"ldda",HistoryDatasetCollectionAssociation:"hdca"}[t.model_class]||"hda",i="hdca"===n?"dataset_collection":"dataset");var s=this,r=a.ajax(this.url(),{method:"POST",contentType:"application/json",data:JSON.stringify({content:e,source:n,type:i})}).done(function(t){s.add([t],{parse:!0})}).fail(function(t,o,a){s.trigger("error",s,r,{},"Error copying contents",{type:i,id:e,source:n})});return r},createHDCA:function(t,e,i,n){var s=this.model({history_content_type:"dataset_collection",collection_type:e,history_id:this.historyId,name:i,element_identifiers:t});return s.save(n)},haveSearchDetails:function(){return this.allFetched&&this.all(function(t){return o.has(t.attributes,"annotation")})},matches:function(t){return this.filter(function(e){return e.matches(t)})},clone:function(){var t=r.Collection.prototype.clone.call(this);return t.historyId=this.historyId,t},toString:function(){return["HistoryContents(",[this.historyId,this.length].join(),")"].join("")}});return{HistoryContents:d}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1),i(3))},function(t,e,i){var n,s;(function(o){n=[i(6)],s=function(t){"use strict";var e=t.SessionStorageModel.extend({defaults:{expandedIds:{},show_deleted:!1,show_hidden:!1},addExpanded:function(t){var e=this.get("expandedIds");e[t.id]=t.get("id"),this.save("expandedIds",e)},removeExpanded:function(t){var e=this.get("expandedIds");delete e[t.id],this.save("expandedIds",e)},isExpanded:function(t){return o.result(this.get("expandedIds"),t,!1)},allExpanded:function(){return o.values(this.get("expandedIds"))},clearExpanded:function(){this.set("expandedIds",{})},includeDeleted:function(t){return o.isUndefined(t)||this.set("show_deleted",t),this.get("show_deleted")},includeHidden:function(t){return o.isUndefined(t)||this.set("show_hidden",t),this.get("show_hidden")},toString:function(){return"HistoryPrefs("+this.id+")"}},{storageKeyPrefix:"history:",historyStorageKey:function(t){if(!t)throw new Error("HistoryPrefs.historyStorageKey needs valid id: "+t);return e.storageKeyPrefix+t},get:function(t){return new e({id:e.historyStorageKey(t)})},clearAll:function(t){for(var i in sessionStorage)0===i.indexOf(e.storageKeyPrefix)&&sessionStorage.removeItem(i)}});return{HistoryPrefs:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(6),i(5)],s=function(t,e){"use strict";var i="list",n=o.View.extend(t.LoggableMixin).extend({_logNamespace:i,initialize:function(t){this.expanded=t.expanded||!1,this.log("\t expanded:",this.expanded),this.fxSpeed=void 0!==t.fxSpeed?t.fxSpeed:this.fxSpeed},fxSpeed:"fast",render:function(t){var e=this._buildNewRender();return this._setUpBehaviors(e),this._queueNewRender(e,t),this},_buildNewRender:function(){var t=a(this.templates.el(this.model.toJSON(),this));return this.expanded&&this.$details(t).replaceWith(this._renderDetails().show()),t},_queueNewRender:function(t,e){e=void 0===e?this.fxSpeed:e;var i=this;0===e?(i._swapNewRender(t),i.trigger("rendered",i)):a(i).queue("fx",[function(t){i.$el.fadeOut(e,t)},function(e){i._swapNewRender(t),e()},function(t){i.$el.fadeIn(e,t)},function(t){i.trigger("rendered",i),t()}])},_swapNewRender:function(t){return this.$el.empty().attr("class",r.isFunction(this.className)?this.className():this.className).append(t.children())},_setUpBehaviors:function(t){t=t||this.$el,t.find("[title]").tooltip({placement:"bottom"})},$details:function(t){return t=t||this.$el,t.find("> .details")},_renderDetails:function(){var t=a(this.templates.details(this.model.toJSON(),this));return this._setUpBehaviors(t),t},toggleExpanded:function(t){return t=void 0===t?!this.expanded:t,t?this.expand():this.collapse(),this},expand:function(){var t=this;return t._fetchModelDetails().always(function(){t._expand()})},_fetchModelDetails:function(){return this.model.hasDetails()?l.when():this.model.fetch()},_expand:function(){var t=this,e=t._renderDetails();t.$details().replaceWith(e),t.expanded=!0,t.$details().slideDown(t.fxSpeed,function(){t.trigger("expanded",t)})},collapse:function(){this.debug(this+"(ExpandableView).collapse");var t=this;t.expanded=!1,this.$details().slideUp(t.fxSpeed,function(){t.trigger("collapsed",t)})}}),s=n.extend(t.mixin(t.SelectableViewMixin,t.DraggableViewMixin,{tagName:"div",className:"list-item",initialize:function(e){n.prototype.initialize.call(this,e),t.SelectableViewMixin.initialize.call(this,e),t.DraggableViewMixin.initialize.call(this,e),this._setUpListeners()},_setUpListeners:function(){return this.on("selectable",function(t){t?this.$(".primary-actions").hide():this.$(".primary-actions").show()},this),this},_buildNewRender:function(){var t=n.prototype._buildNewRender.call(this);return t.children(".warnings").replaceWith(this._renderWarnings()),t.children(".title-bar").replaceWith(this._renderTitleBar()),t.children(".primary-actions").append(this._renderPrimaryActions()),t.find("> .title-bar .subtitle").replaceWith(this._renderSubtitle()),t},_swapNewRender:function(t){return n.prototype._swapNewRender.call(this,t),this.selectable&&this.showSelector(0),this.draggable&&this.draggableOn(),this.$el},_renderWarnings:function(){var t=this,e=a('
    '),i=t.model.toJSON();return r.each(t.templates.warnings,function(n){e.append(a(n(i,t)))}),e},_renderTitleBar:function(){return a(this.templates.titleBar(this.model.toJSON(),this))},_renderPrimaryActions:function(){return[]},_renderSubtitle:function(){return a(this.templates.subtitle(this.model.toJSON(),this))},events:{"click .title-bar":"_clickTitleBar","keydown .title-bar":"_keyDownTitleBar","click .selector":"toggleSelect"},_clickTitleBar:function(t){t.stopPropagation(),t.altKey?(this.toggleSelect(t),this.selectable||this.showSelector()):this.toggleExpanded()},_keyDownTitleBar:function(t){var e=32,i=13;return!t||"keydown"!==t.type||t.keyCode!==e&&t.keyCode!==i||(this.toggleExpanded(),t.stopPropagation(),!1)},toString:function(){var t=this.model?this.model+"":"(no model)";return"ListItemView("+t+")"}}));s.prototype.templates=function(){var e=t.wrapTemplate(['
    ','
    ','
    ','',"
    ",'
    ','
    ','
    ',"
    "]),i={},n=t.wrapTemplate(['
    ','','
    ','<%- element.name %>',"
    ",'
    ',"
    "],"element"),s=t.wrapTemplate(['
    ']),o=t.wrapTemplate(['
    ']);return{el:e,warnings:i,titleBar:n,subtitle:s,details:o}}();var c=s.extend({foldoutStyle:"foldout",foldoutPanelClass:null,initialize:function(t){"drilldown"===this.foldoutStyle&&(this.expanded=!1),this.foldoutStyle=t.foldoutStyle||this.foldoutStyle,this.foldoutPanelClass=t.foldoutPanelClass||this.foldoutPanelClass,s.prototype.initialize.call(this,t),this.foldout=this._createFoldoutPanel()},_renderDetails:function(){if("drilldown"===this.foldoutStyle)return a();var t=s.prototype._renderDetails.call(this);return this._attachFoldout(this.foldout,t)},_createFoldoutPanel:function(){var t=this.model,e=this._getFoldoutPanelClass(t),i=this._getFoldoutPanelOptions(t),n=new e(r.extend(i,{model:t}));return n},_getFoldoutPanelClass:function(){return this.foldoutPanelClass},_getFoldoutPanelOptions:function(){return{foldoutStyle:this.foldoutStyle,fxSpeed:this.fxSpeed}},_attachFoldout:function(t,e){return e=e||this.$("> .details"),this.foldout=t.render(0),t.$("> .controls").hide(),e.append(t.$el)},expand:function(){var t=this;return t._fetchModelDetails().always(function(){"foldout"===t.foldoutStyle?t._expand():"drilldown"===t.foldoutStyle&&t._expandByDrilldown()})},_expandByDrilldown:function(){var t=this;t.listenTo(t.foldout,"close",function(){t.trigger("collapsed:drilldown",t,t.foldout)}),t.trigger("expanded:drilldown",t,t.foldout)}});return c.prototype.templates=function(){var e=t.wrapTemplate(['
    ',"
    "],"collection");return r.extend({},s.prototype.templates,{details:e})}(),{ExpandableView:n,ListItemView:s,FoldoutListItemView:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(4),i(54),i(7),i(38),i(18),i(28)],s=function(t,e,i,n,s,r){return n.extend({initialize:function(t){var i=this;n.prototype.initialize.call(this,t),this.deferred=new e,t.inputs?this._buildForm(t):this.deferred.execute(function(e){i._buildModel(e,t,!0)}),t.listen_to_history&&parent.Galaxy&&parent.Galaxy.currHistoryPanel&&this.listenTo(parent.Galaxy.currHistoryPanel.collection,"change",function(){this.refresh()})},refresh:function(){var t=this;t.deferred.reset(),this.deferred.execute(function(e){t._updateModel(e)})},remove:function(){var t=this;this.$el.hide(),this.deferred.execute(function(){n.prototype.remove.call(t),Galaxy.emit.debug("tool-form-base::remove()","Destroy view.")})},_buildForm:function(e){var i=this;this.options=t.merge(e,this.options),this.options=t.merge({icon:e.icon,title:""+e.name+" "+e.description+" (Galaxy Version "+e.version+")",operations:!this.options.hide_operations&&this._operations(),onchange:function(){i.refresh()}},this.options),this.options.customize&&this.options.customize(this.options),this.render(),this.options.collapsible||this.$el.append(o("
    ").addClass("ui-margin-top-large").append(this._footer()))},_buildModel:function(e,n,s){var a=this;this.options.id=n.id,this.options.version=n.version;var r="",l={};n.job_id?r=Galaxy.root+"api/jobs/"+n.job_id+"/build_for_rerun":(r=Galaxy.root+"api/tools/"+n.id+"/build",Galaxy.params&&Galaxy.params.tool_id==n.id&&(l=o.extend({},Galaxy.params),n.version&&(l.tool_version=n.version))),t.get({url:r,data:l,success:function(t){return t=t.tool_model||t,t.display?(a._buildForm(t),!s&&a.message.update({status:"success",message:"Now you are using '"+a.options.name+"' version "+a.options.version+", id '"+a.options.id+"'.",persistent:!1}),Galaxy.emit.debug("tool-form-base::initialize()","Initial tool model ready.",t),void e.resolve()):void(window.location=Galaxy.root)},error:function(t,n){var s=t&&t.err_msg||"Uncaught error.";401==n.status?window.location=Galaxy.root+"user/login?"+o.param({redirect:Galaxy.root+"?tool_id="+a.options.id}):a.$el.is(":empty")?a.$el.prepend(new i.Message({message:s,status:"danger",persistent:!0,large:!0}).$el):Galaxy.modal&&Galaxy.modal.show({title:"Tool request failed",body:s,buttons:{Close:function(){Galaxy.modal.hide()}}}),Galaxy.emit.debug("tool-form::initialize()","Initial tool model request failed.",t),e.reject()}})},_updateModel:function(e){var i=this,n=this.options.update_url||Galaxy.root+"api/tools/"+this.options.id+"/build",s={tool_id:this.options.id,tool_version:this.options.version,inputs:o.extend(!0,{},i.data.create())};this.wait(!0),Galaxy.emit.debug("tool-form-base::_updateModel()","Sending current state.",s),t.request({type:"POST",url:n,data:s,success:function(t){i.update(t.tool_model||t),i.options.update&&i.options.update(t),i.wait(!1),Galaxy.emit.debug("tool-form-base::_updateModel()","Received new model.",t),e.resolve()},error:function(t){Galaxy.emit.debug("tool-form-base::_updateModel()","Refresh request failed.",t),e.reject()}})},_operations:function(){var t=this,e=this.options,n=new i.ButtonMenu({icon:"fa-cubes",title:!e.narrow&&"Versions"||null,tooltip:"Select another tool version"});if(!e.sustain_version&&e.versions&&e.versions.length>1)for(var s in e.versions){var o=e.versions[s];o!=e.version&&n.addMenu({title:"Switch to "+o,version:o,icon:"fa-cube",onclick:function(){var i=e.id.replace(e.version,this.version),n=this.version;t.deferred.reset(),t.deferred.execute(function(e){t._buildModel(e,{id:i,version:n})})}})}else n.$el.hide();var a=new i.ButtonMenu({icon:"fa-caret-down",title:!e.narrow&&"Options"||null,tooltip:"View available options"});return e.biostar_url&&(a.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(e.biostar_url+"/p/new/post/")}}),a.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(e.biostar_url+"/local/search/page/?q="+e.name)}})),a.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+Galaxy.root+"root?tool_id="+e.id)}}),Galaxy.user&&Galaxy.user.get("is_admin")&&a.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=Galaxy.root+"api/tools/"+e.id+"/download"}}),e.requirements&&e.requirements.length>0&&a.addMenu({icon:"fa-info-circle",title:"Requirements",tooltip:"Display tool requirements",onclick:function(){!this.visible||t.portlet.collapsed?(this.visible=!0,t.portlet.expand(),t.message.update({persistent:!0,message:t._templateRequirements(e),status:"info"})):(this.visible=!1,t.message.update({message:""}))}}),e.sharable_url&&a.addMenu({icon:"fa-external-link",title:"See in Tool Shed",tooltip:"Access the repository",onclick:function(){window.open(e.sharable_url)}}),{menu:a,versions:n}},_footer:function(){var t=this.options,e=o("
    ").append(this._templateHelp(t));if(t.citations){var i=o("
    "),n=new s.ToolCitationCollection;n.tool_id=t.id;var a=new r.CitationListView({el:i,collection:n});a.render(),n.fetch(),e.append(i)}return e},_templateHelp:function(t){var e=o("
    ").addClass("ui-form-help").append(t.help);return e.find("a").attr("target","_blank"),e},_templateRequirements:function(t){var e=t.requirements.length;if(e>0){var i="This tool requires ";a.each(t.requirements,function(t,n){i+=t.name+(t.version?" (Version "+t.version+")":"")+(n").attr("target","_blank").attr("href","https://wiki.galaxyproject.org/Tools/Requirements").text("here");return o("").append(i+". Click ").append(n).append(" for more information.")}return"No requirements found."}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(2),i(17),i(11),i(19)],s=function(t,e,i,n){"use strict";var s={hidden:!1,show:function(){this.set("hidden",!1)},hide:function(){this.set("hidden",!0)},toggle:function(){this.set("hidden",!this.get("hidden"))},is_visible:function(){return!this.attributes.hidden}},r=o.Model.extend({defaults:{name:null,label:null,type:null,value:null,html:null,num_samples:5},initialize:function(t){this.attributes.html=unescape(this.attributes.html)},copy:function(){return new r(this.toJSON())},set_value:function(t){this.set("value",t||"")}}),l=o.Collection.extend({model:r}),c=r.extend({}),d=r.extend({set_value:function(t){this.set("value",parseInt(t,10))},get_samples:function(){return d3.scale.linear().domain([this.get("min"),this.get("max")]).ticks(this.get("num_samples"))}}),h=d.extend({set_value:function(t){this.set("value",parseFloat(t))}}),u=r.extend({get_samples:function(){return t.map(this.get("options"),function(t){return t[0]})}});r.subModelTypes={integer:d,"float":h,data:c,select:u};var p=o.Model.extend({defaults:{id:null,name:null,description:null,target:null,inputs:[],outputs:[]},urlRoot:Galaxy.root+"api/tools",initialize:function(e){this.set("inputs",new l(t.map(e.inputs,function(t){var e=r.subModelTypes[t.type]||r;return new e(t)})))},toJSON:function(){var t=o.Model.prototype.toJSON.call(this);return t.inputs=this.get("inputs").map(function(t){return t.toJSON()}),t},remove_inputs:function(t){var e=this,i=e.get("inputs").filter(function(e){return t.indexOf(e.get("type"))!==-1});e.get("inputs").remove(i)},copy:function(t){var e=new p(this.toJSON());if(t){var i=new o.Collection;e.get("inputs").each(function(t){t.get_samples()&&i.push(t)}),e.set("inputs",i)}return e},apply_search_results:function(e){return t.indexOf(e,this.attributes.id)!==-1?this.show():this.hide(),this.is_visible()},set_input_value:function(t,e){this.get("inputs").find(function(e){return e.get("name")===t}).set("value",e)},set_input_values:function(e){var i=this;t.each(t.keys(e),function(t){i.set_input_value(t,e[t])})},run:function(){return this._run()},rerun:function(t,e){return this._run({action:"rerun",target_dataset_id:t.id,regions:e})},get_inputs_dict:function(){var t={};return this.get("inputs").each(function(e){t[e.get("name")]=e.get("value")}),t},_run:function(n){var s=t.extend({tool_id:this.id,inputs:this.get_inputs_dict()},n),o=a.Deferred(),r=new e.ServerStateDeferred({ajax_settings:{url:this.urlRoot,data:JSON.stringify(s),dataType:"json",contentType:"application/json",type:"POST"},interval:2e3,success_fn:function(t){return"pending"!==t}});return a.when(r.go()).then(function(t){o.resolve(new i.DatasetCollection(t))}),o}});t.extend(p.prototype,s);var g=(o.View.extend({}),o.Collection.extend({model:p})),f=o.Model.extend(s),m=o.Model.extend({defaults:{elems:[],open:!1},clear_search_results:function(){t.each(this.attributes.elems,function(t){t.show()}),this.show(),this.set("open",!1)},apply_search_results:function(e){var i,n=!0;t.each(this.attributes.elems,function(t){t instanceof f?(i=t,i.hide()):t instanceof p&&t.apply_search_results(e)&&(n=!1,i&&i.show())}),n?this.hide():(this.show(),this.set("open",!0))}});t.extend(m.prototype,s);var v=o.Model.extend({defaults:{search_hint_string:"search tools",min_chars_for_search:3,clear_btn_url:"",search_url:"",visible:!0,query:"",results:null,clear_key:27},urlRoot:Galaxy.root+"api/tools",initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var t=this.attributes.query;if(t.length");t.append(S.tool_link(this.model.toJSON()));var e=this.model.get("form_style",null);if("upload1"===this.model.id)t.find("a").on("click",function(t){t.preventDefault(),Galaxy.upload.show()});else if("regular"===e){var i=this;t.find("a").on("click",function(t){t.preventDefault();var e=new n.View({id:i.model.id,version:i.model.get("version")});e.deferred.execute(function(){Galaxy.app.display(e)})})}return this.$el.append(t),this}}),b=y.extend({tagName:"div",className:"toolPanelLabel",render:function(){return this.$el.append(a("").text(this.model.attributes.text)),this}}),x=y.extend({tagName:"div",className:"toolSectionWrapper",initialize:function(){y.prototype.initialize.call(this),this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(S.panel_section(this.model.toJSON()));var e=this.$el.find(".toolSectionBody");return t.each(this.model.attributes.elems,function(t){if(t instanceof p){var i=new w({model:t,className:"toolTitle"});i.render(),e.append(i.$el)}else if(t instanceof f){var n=new b({model:t});n.render(),e.append(n.$el)}}),this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.model.set("open",!this.model.attributes.open)},update_open:function(){this.model.attributes.open?this.$el.children(".toolSectionBody").slideDown("fast"):this.$el.children(".toolSectionBody").slideUp("fast")}}),C=o.View.extend({tagName:"div",id:"tool-search",className:"bar",events:{click:"focus_and_select","keyup :input":"query_changed","click #search-clear-btn":"clear"},render:function(){return this.$el.append(S.tool_search(this.model.toJSON())),this.model.is_visible()||this.$el.hide(),this.$el.find("[title]").tooltip(),this},focus_and_select:function(){this.$el.find(":input").focus().select()},clear:function(){return this.model.clear_search(),this.$el.find(":input").val(""),this.focus_and_select(),!1},query_changed:function(t){return this.model.attributes.clear_key&&this.model.attributes.clear_key===t.which?(this.clear(),!1):void this.model.set("query",this.$el.find(":input").val())}}),$=o.View.extend({tagName:"div",className:"toolMenu",initialize:function(){this.model.get("tool_search").on("change:results",this.handle_search_results,this)},render:function(){var t=this,e=new C({model:this.model.get("tool_search")});return e.render(),t.$el.append(e.$el),this.model.get("layout").each(function(e){if(e instanceof m){var i=new x({model:e});i.render(),t.$el.append(i.$el)}else if(e instanceof p){var n=new w({model:e,className:"toolTitleNoSection"});n.render(),t.$el.append(n.$el)}else if(e instanceof f){var s=new b({model:e});s.render(),t.$el.append(s.$el)}}),t.$el.find("a.tool-link").click(function(e){var i=a(this).attr("class").split(/\s+/)[0],n=t.model.get("tools").get(i);t.trigger("tool_link_click",e,n)}),this},handle_search_results:function(){var t=this.model.get("tool_search").get("results");t&&0===t.length?a("#search-no-results").show():a("#search-no-results").hide()}}),E=o.View.extend({className:"toolForm",render:function(){this.$el.children().remove(),this.$el.append(S.tool_form(this.model.toJSON()))}}),S=(o.View.extend({className:"toolMenuAndView",initialize:function(){this.tool_panel_view=new $({collection:this.collection}),this.tool_form_view=new E},render:function(){this.tool_panel_view.render(),this.tool_panel_view.$el.css("float","left"),this.$el.append(this.tool_panel_view.$el),this.tool_form_view.$el.hide(),this.$el.append(this.tool_form_view.$el);var t=this;this.tool_panel_view.on("tool_link_click",function(e,i){e.preventDefault(),t.show_tool(i)})},show_tool:function(t){var e=this;t.fetch().done(function(){e.tool_form_view.model=t,e.tool_form_view.render(),e.tool_form_view.$el.show(),a("#left").width("650px")})}}),{tool_search:t.template(['',' ',''].join("")),panel_section:t.template(['",'