diff --git a/client/galaxy/scripts/mvc/library/library-dataset-view.js b/client/galaxy/scripts/mvc/library/library-dataset-view.js index e7f51f1a499..dfa7dab4e7e 100644 --- a/client/galaxy/scripts/mvc/library/library-dataset-view.js +++ b/client/galaxy/scripts/mvc/library/library-dataset-view.js @@ -186,7 +186,7 @@ var LibraryDatasetView = Backbone.View.extend({ this.histories.fetch({ success: function (histories){ if (histories.length === 0){ - mod_toastr.warning('You have to create history first. Click this to do so.', '', {onclick: function() {window.location='/';}}); + mod_toastr.warning('You have to create history first. Click this to do so.', '', {onclick: function() {window.location=Galaxy.root;}}); } else { callback(self); } @@ -233,7 +233,7 @@ var LibraryDatasetView = Backbone.View.extend({ historyItem.save({ content : this.id, source : 'library' }, { success : function(){ Galaxy.modal.hide(); - mod_toastr.success('Dataset imported. Click this to start analyzing it.', '', {onclick: function() {window.location='/';}}); + mod_toastr.success('Dataset imported. Click this to start analyzing it.', '', {onclick: function() {window.location=Galaxy.root;}}); }, error : function(model, response){ if (typeof response.responseJSON !== "undefined"){ diff --git a/client/galaxy/scripts/mvc/library/library-folderrow-view.js b/client/galaxy/scripts/mvc/library/library-folderrow-view.js index 67f450ba308..ebb2d5e2822 100644 --- a/client/galaxy/scripts/mvc/library/library-folderrow-view.js +++ b/client/galaxy/scripts/mvc/library/library-folderrow-view.js @@ -112,7 +112,7 @@ var FolderRowView = Backbone.View.extend({ Galaxy.libraries.folderListView.collection.sortByNameAsc(); mod_toastr.success('Dataset undeleted. Click this to see it.', '', {onclick: function() { var folder_id = that.model.get('folder_id'); - window.location='#folders/' + folder_id + '/datasets/' + that.id; + window.location = Galaxy.root + 'library/list#folders/' + folder_id + '/datasets/' + that.id; }}); }, error : function(model, response){ diff --git a/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js b/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js index 5a34894251f..411bad9fcf5 100644 --- a/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js +++ b/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js @@ -764,11 +764,11 @@ var FolderToolbarView = Backbone.View.extend({ var popped_item = history_item_set.pop(); if ( typeof popped_item == "undefined" ) { if ( this.options.chain_call_control.failed_number === 0 ){ - mod_toastr.success( 'Selected datasets imported into history. Click this to start analyzing it.', '', { onclick: function() { window.location='/' } } ); + mod_toastr.success( 'Selected datasets imported into history. Click this to start analyzing it.', '', { onclick: function() { window.location=Galaxy.root } } ); } else if ( this.options.chain_call_control.failed_number === this.options.chain_call_control.total_number ){ mod_toastr.error( 'There was an error and no datasets were imported into history.' ); } else if ( this.options.chain_call_control.failed_number < this.options.chain_call_control.total_number ){ - mod_toastr.warning( 'Some of the datasets could not be imported into history. Click this to see what was imported.', '', { onclick: function() { window.location='/' } } ); + mod_toastr.warning( 'Some of the datasets could not be imported into history. Click this to see what was imported.', '', { onclick: function() { window.location=Galaxy.root } } ); } Galaxy.modal.hide(); return true; diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 5e03562087c..7362628d526 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -68,7 +68,7 @@ import galaxy.jobs log = logging.getLogger( __name__ ) HELP_UNINITIALIZED = threading.Lock() -MODEL_TOOLS_PATH = os.path.dirname(__file__) +MODEL_TOOLS_PATH = os.path.abspath(os.path.dirname(__file__)) class ToolErrorLog: diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py index 1bd68d79019..4de387e5aba 100644 --- a/lib/galaxy/tools/toolbox/base.py +++ b/lib/galaxy/tools/toolbox/base.py @@ -565,7 +565,7 @@ class AbstractToolBox( Dictifiable, ManagesIntegratedToolPanelMixin, object ): if labels is not None: tool.labels = labels except IOError: - log.error( "Error reading tool configuration file from path: %s." % path ) + log.error( "Error reading tool configuration file from path: %s" % path ) except Exception: log.exception( "Error reading tool from path: %s" % path ) diff --git a/static/maps/mvc/library/library-dataset-view.js.map b/static/maps/mvc/library/library-dataset-view.js.map index 308e5254b56..cecbc1ce870 100644 --- a/static/maps/mvc/library/library-dataset-view.js.map +++ b/static/maps/mvc/library/library-dataset-view.js.map @@ -1 +1 @@ -{"version":3,"file":"library-dataset-view.js","sources":["../../../src/mvc/library/library-dataset-view.js"],"names":["define","mod_toastr","mod_library_model","mod_utils","mod_select","LibraryDatasetView","Backbone","View","extend","el","model","options","events","click .toolbtn_modify_dataset","click .toolbtn_cancel_modifications","click .toolbtn-download-dataset","click .toolbtn-import-dataset","click .toolbtn-share-dataset","click .btn-copy-link-to-clipboard","click .btn-make-private","click .btn-remove-restrictions","click .toolbtn_save_permissions","click .toolbtn_save_modifications","select_genome","select_extension","list_extensions","auto","id","text","description","list_genomes","initialize","this","_","fetchExtAndGenomes","fetchDataset","Item","that","fetch","success","show_permissions","showPermissions","show_version","fetchVersion","render","error","response","responseJSON","err_msg","onclick","Galaxy","libraries","library_router","back","$","remove","template","templateDataset","$el","html","item","get","tooltip","ldda_id","ldda","Ldda","url","urlRoot","renderVersion","templateVersion","enableModification","templateModifyDataset","renderSelectBoxes","genome_build","file_ext","downloadDataset","root","data","ld_ids","processDownload","method","param","inputs","each","split","pair","appendTo","submit","info","importIntoHistory","refreshUserHistoriesList","self","templateBulkImportInModal","modal","show","closing_events","title","body","histories","models","buttons","Import","importCurrentIntoHistory","Close","hide","callback","GalaxyHistories","length","warning","window","location","disableButton","new_history_name","val","post","name","done","new_history","processImportToHistory","fail","always","enableButton","history_id","find","historyItem","HistoryItem","jQuery","getJSON","save","content","source","shareDataset","goBack","undefined","fetched_permissions","set","access_dataset_roles","is_unrestricted","is_admin","user","isAdmin","templateDatasetPermissions","prepareSelectBoxes","css","_serializeRoles","role_list","selected_roles","i","push","selected_access_dataset_roles","selected_modify_item_roles","selected_manage_dataset_roles","modify_item_roles","manage_dataset_roles","access_select_options","minimumInputLength","multiple","placeholder","container","ajax","dataType","quietMillis","term","page","q","page_limit","results","more","total","roles","formatResult","role","type","formatSelection","initSelection","element","initialData","join","dropdownCssClass","modify_select_options","manage_select_options","accessSelectObject","modifySelectObject","manageSelectObject","templateAccessSelect","select2","comingSoon","copyToClipboard","href","history","lastIndexOf","substr","prompt","makeDatasetPrivate","removeDatasetRestrictions","_extractIds","roles_list","ids_list","savePermissions","access_ids","manage_ids","modify_ids","access_ids[]","manage_ids[]","modify_ids[]","datatypes","key","extension","description_url","sort","a","b","unshift","genomes","current_genome","current_ext","value"],"mappings":"AAAAA,QACE,cACA,4BACA,cACA,oBAEF,SACQC,EACAC,EACAC,EACAC,GAGR,GAAIC,GAAqBC,SAASC,KAAKC,QACrCC,GAAI,UAEJC,MAAO,KAEPC,WAIAC,QACEC,gCAA0C,qBAC1CC,sCAA0C,SAC1CC,kCAA0C,kBAC1CC,gCAA0C,oBAC1CC,+BAA0C,eAC1CC,oCAA0C,kBAC1CC,0BAA0C,qBAC1CC,iCAA0C,4BAC1CC,kCAA0C,kBAC1CC,oCAA0C,cAK5CC,cAAgB,KAGhBC,iBAAmB,KAGnBC,mBAGAC,MACIC,GAAc,OACdC,KAAc,cACdC,YAAc,sZASlBC,gBAEAC,WAAY,SAASpB,GACnBqB,KAAKrB,QAAUsB,EAAEzB,OAAOwB,KAAKrB,QAASA,GACtCqB,KAAKE,qBACDF,KAAKrB,QAAQgB,IACfK,KAAKG,gBAITA,aAAc,SAASxB,GACrBqB,KAAKrB,QAAUsB,EAAEzB,OAAOwB,KAAKrB,QAASA,GACtCqB,KAAKtB,MAAQ,GAAIR,GAAkBkC,MAAMT,GAAIK,KAAKrB,QAAQgB,IAC1D,IAAIU,GAAOL,IACXA,MAAKtB,MAAM4B,OACTC,QAAS,WACHF,EAAK1B,QAAQ6B,iBACbH,EAAKI,kBACEJ,EAAK1B,QAAQ+B,aACpBL,EAAKM,eAELN,EAAKO,UAGXC,MAAO,SAASnC,EAAOoC,GACgB,mBAA1BA,GAASC,aAClB9C,EAAW4C,MAAMC,EAASC,aAAaC,QAAU,0BAA2B,IAAKC,QAAS,WAAYC,OAAOC,UAAUC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E,KAAMxC,EAAKZ,gBACXqI,UAAWzH,EAAKqB,IAAIiE,KAAM,6BAC1B6F,MAAOD,KAIX9J,gBAAkB,WAChB,MAAOxB,GAAEuB,UAET,wCACE,6BACE,0KACE,uCACA,iBACF,YACA,mLACE,mCACA,mBACF,YACA,2CACE,2KACE,qCACA,eACF,YACF,UACA,2CACE,uFACE,8KACE,oCACA,oBACF,YACF,OACF,UACF,SAGF,0BACE,6EACA,4DACE,uCACE,2GACF,iBACE,gFACF,UACF,YACF,QAEA,2CACE,iCACE,6FACA,gKACE,wCACA,qBACF,aACF,SACF,UAGA,8BACE,2DACE,OACE,oHACA,6CACF,QACA,oCACE,OACE,iCACA,iDACF,QACF,UACA,wCACE,OACE,oCACA,qDACF,QACF,UACA,qCACE,OACE,4BACA,kDACF,QACF,UACA,yCACE,OACE,2CACA,sDACF,QACF,UACA,uCACE,OACE,mCACA,oDACF,QACF,UACA,+CACE,OACE,kCACA,wEACF,QACF,UACA,kDACE,OACE,qCACA,2EACF,QACF,UACA,4CACE,OACE,yCACA,qEACF,QACF,UACA,iDACE,OACE,oCACA,0EACF,QACF,UACA,mCACE,OACE,+BACA,4DACF,QACF,UACA,sCACE,OACE,2CACA,+DACF,QACF,UACA,qCACE,OACE,iDACA,8DACF,QACF,UACF,WAEF,QACE,qBACA,SACF,SAEA,wCACE,QACE,6BACA,OACE,iEACE,wKACF,WACF,OACF,SACF,UAEA,SAEA,UACEyH,KAAK,MAGT5G,gBAAkB,WAChB,MAAOpC,GAAEuB,UAET,wCACE,6BACE,2EACE,qJACE,+CACA,uBACF,YACF,MACF,SAGA,0BACE,6EACA,4DACE,uCACE,2GACF,iBACE,gFACF,UACF,YACF,QAEA,8HAEA,8BACE,2DACE,OACE,2EACA,6CACF,QACA,oCACE,OACE,iCACA,iDACF,QACF,UACA,wCACE,OACE,oCACA,qDACF,QACF,UACA,qCACE,OACE,4BACA,kDACF,QACF,UACA,yCACE,OACE,2CACA,sDACF,QACF,UACA,uCACE,OACE,mCACA,oDACF,QACF,UACA,+CACE,OACE,kCACA,wEACF,QACF,UACA,kDACE,OACE,qCACA,2EACF,QACF,UACA,4CACE,OACE,yCACA,qEACF,QACF,UACA,iDACE,OACE,oCACA,0EACF,QACF,UACA,mCACE,OACE,+BACA,4DACF,QACF,UACA,sCACE,OACE,2CACA,+DACF,QACF,UACA,qCACE,OACE,iDACA,8DACF,QACF,UACF,WACA,QACE,qBACA,SACF,SAEF,SAEF,UACEyH,KAAK,MAGT1G,sBAAwB,WACtB,MAAOtC,GAAEuB,UAET,wCACE,6BACE,kLACE,oCACA,eACF,YACA,8KACE,uCACA,aACF,YACF,SAGA,0BACE,6EACA,4DACE,uCACE,2GACF,iBACE,gFACF,UACF,YACF,QAEA,8BACE,wGACA,2DACE,OACE,oHACA,oIACF,QACA,OACE,iCACA,OACE,0EACF,QACF,QACA,OACE,oCACA,OACE,oEACF,QACF,QACA,OACE,4BACA,kDACF,QACA,OACE,2CACA,sDACF,QACA,OACE,mCACA,oDACF,QACA,mBACE,kCACA,wEACF,QACE,qCACA,yDACE,2EACF,iBACE,+BACF,UACF,QACA,OACE,yCACA,qEACF,QACA,OACE,oCACA,0EACF,QACA,OACE,+BACA,4DACF,QACA,OACE,iDACA,8DACF,QACA,OACE,2CACA,+DACF,QACF,WACA,QACE,qBACA,SACF,SACF,SAEF,UACEyH,KAAK,MAGTpC,2BAA6B,WAC3B,MAAO5G,GAAEuB,UAET,wCACE,6BACE,mDACE,6JACE,4CACA,0BACF,YACF,OACA,2EACE,mJACE,qCACA,wBACF,YACF,MACF,SAGA,0BACE,6EACE,4DACE,uCACE,2GACF,iBACE,gFACF,UACJ,YACF,QAEA,sDACA,oCACE,wBACE,yKACF,iBACE,+IACF,UACF,SACA,8BACE,uCACA,kDACA,mEACA,8KACA,QACA,uCACA,+LACA,4CACE,8DACE,yLACE,oCACA,4BACF,YACF,OACF,iBACE,4FACA,gKACE,wCACA,qBACA,YACF,gDACE,iLACE,kCACA,qBACF,YACF,OACF,UACA,6CACA,mEACA,iDACE,qFACA,mGACA,mGACF,SACA,4DACA,mEACA,iDACE,uLACF,SACA,iLACE,uCACA,aACF,YACF,SAEF,UACEyH,KAAK,MAGTrF,0BAA2B,WACzB,MAAO3D,GAAEuB,UACT,QACE,mCACE,mBACA,qHACE,8CACE,mGACF,YACF,YACF,SACA,mCACE,kBACA,4GACA,WACF,SACF,UACEyH,KAAK,MAITO,qBAAsB,WACpB,MAAOvJ,GAAEuB,UACT,uCACE,2CACE,iEACF,YACF,aACEyH,KAAK,OAKX,QACI5K,mBAAoBA"} \ No newline at end of file +{"version":3,"file":"library-dataset-view.js","sources":["../../../src/mvc/library/library-dataset-view.js"],"names":["define","mod_toastr","mod_library_model","mod_utils","mod_select","LibraryDatasetView","Backbone","View","extend","el","model","options","events","click .toolbtn_modify_dataset","click .toolbtn_cancel_modifications","click .toolbtn-download-dataset","click .toolbtn-import-dataset","click .toolbtn-share-dataset","click .btn-copy-link-to-clipboard","click .btn-make-private","click .btn-remove-restrictions","click .toolbtn_save_permissions","click .toolbtn_save_modifications","select_genome","select_extension","list_extensions","auto","id","text","description","list_genomes","initialize","this","_","fetchExtAndGenomes","fetchDataset","Item","that","fetch","success","show_permissions","showPermissions","show_version","fetchVersion","render","error","response","responseJSON","err_msg","onclick","Galaxy","libraries","library_router","back","$","remove","template","templateDataset","$el","html","item","get","tooltip","ldda_id","ldda","Ldda","url","urlRoot","renderVersion","templateVersion","enableModification","templateModifyDataset","renderSelectBoxes","genome_build","file_ext","downloadDataset","root","data","ld_ids","processDownload","method","param","inputs","each","split","pair","appendTo","submit","info","importIntoHistory","refreshUserHistoriesList","self","templateBulkImportInModal","modal","show","closing_events","title","body","histories","models","buttons","Import","importCurrentIntoHistory","Close","hide","callback","GalaxyHistories","length","warning","window","location","disableButton","new_history_name","val","post","name","done","new_history","processImportToHistory","fail","always","enableButton","history_id","find","historyItem","HistoryItem","jQuery","getJSON","save","content","source","shareDataset","goBack","undefined","fetched_permissions","set","access_dataset_roles","is_unrestricted","is_admin","user","isAdmin","templateDatasetPermissions","prepareSelectBoxes","css","_serializeRoles","role_list","selected_roles","i","push","selected_access_dataset_roles","selected_modify_item_roles","selected_manage_dataset_roles","modify_item_roles","manage_dataset_roles","access_select_options","minimumInputLength","multiple","placeholder","container","ajax","dataType","quietMillis","term","page","q","page_limit","results","more","total","roles","formatResult","role","type","formatSelection","initSelection","element","initialData","join","dropdownCssClass","modify_select_options","manage_select_options","accessSelectObject","modifySelectObject","manageSelectObject","templateAccessSelect","select2","comingSoon","copyToClipboard","href","history","lastIndexOf","substr","prompt","makeDatasetPrivate","removeDatasetRestrictions","_extractIds","roles_list","ids_list","savePermissions","access_ids","manage_ids","modify_ids","access_ids[]","manage_ids[]","modify_ids[]","datatypes","key","extension","description_url","sort","a","b","unshift","genomes","current_genome","current_ext","value"],"mappings":"AAAAA,QACE,cACA,4BACA,cACA,oBAEF,SACQC,EACAC,EACAC,EACAC,GAGR,GAAIC,GAAqBC,SAASC,KAAKC,QACrCC,GAAI,UAEJC,MAAO,KAEPC,WAIAC,QACEC,gCAA0C,qBAC1CC,sCAA0C,SAC1CC,kCAA0C,kBAC1CC,gCAA0C,oBAC1CC,+BAA0C,eAC1CC,oCAA0C,kBAC1CC,0BAA0C,qBAC1CC,iCAA0C,4BAC1CC,kCAA0C,kBAC1CC,oCAA0C,cAK5CC,cAAgB,KAGhBC,iBAAmB,KAGnBC,mBAGAC,MACIC,GAAc,OACdC,KAAc,cACdC,YAAc,sZASlBC,gBAEAC,WAAY,SAASpB,GACnBqB,KAAKrB,QAAUsB,EAAEzB,OAAOwB,KAAKrB,QAASA,GACtCqB,KAAKE,qBACDF,KAAKrB,QAAQgB,IACfK,KAAKG,gBAITA,aAAc,SAASxB,GACrBqB,KAAKrB,QAAUsB,EAAEzB,OAAOwB,KAAKrB,QAASA,GACtCqB,KAAKtB,MAAQ,GAAIR,GAAkBkC,MAAMT,GAAIK,KAAKrB,QAAQgB,IAC1D,IAAIU,GAAOL,IAC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EAAiB3M,EAAQ8D,cAEK,mBAArB9D,GAAQ+D,WACjB6I,EAAc5M,EAAQ+D,UAG1B,IAAIrC,GAAOL,IACXA,MAAKT,cAAgB,GAAInB,GAAWG,MAChCwI,IAAK,wBACLlE,KAAMxC,EAAKP,aACXgI,UAAWzH,EAAKqB,IAAIiE,KAAM,0BAC1B6F,MAAOF,IAEXtL,KAAKR,iBAAmB,GAAIpB,GAAWG,MACrCwI,IAAK,2BACLlE,KAAMxC,EAAKZ,gBACXqI,UAAWzH,EAAKqB,IAAIiE,KAAM,6BAC1B6F,MAAOD,KAIX9J,gBAAkB,WAChB,MAAOxB,GAAEuB,UAET,wCACE,6BACE,0KACE,uCACA,iBACF,YACA,mLACE,mCACA,mBACF,YACA,2CACE,2KACE,qCACA,eACF,YACF,UACA,2CACE,uFACE,8KACE,oCACA,oBACF,YACF,OACF,UACF,SAGF,0BACE,6EACA,4DACE,uCACE,2GACF,iBACE,gFACF,UACF,YACF,QAEA,2CACE,iCACE,6FACA,gKACE,wCACA,qBACF,aACF,SACF,UAGA,8BACE,2DACE,OACE,oHACA,6CACF,QACA,oCACE,OACE,iCACA,iDACF,QACF,UACA,wCACE,OACE,oCACA,qDACF,QACF,UACA,qCACE,OACE,4BACA,kDACF,QACF,UACA,yCACE,OACE,2CACA,sDACF,QACF,UACA,uCACE,OACE,mCACA,oDACF,QACF,UACA,+CACE,OACE,kCACA,wEACF,QACF,UACA,kDACE,OACE,qCACA,2EACF,QACF,UACA,4CACE,OACE,yCACA,qEACF,QACF,UACA,iDACE,OACE,oCACA,0EACF,QACF,UACA,mCACE,OACE,+BACA,4DACF,QACF,UACA,sCACE,OACE,2CACA,+DACF,QACF,UACA,qCACE,OACE,iDACA,8DACF,QACF,UACF,WAEF,QACE,qBACA,SACF,SAEA,wCACE,QACE,6BACA,OACE,iEACE,wKACF,WACF,OACF,SACF,UAEA,SAEA,UACEyH,KAAK,MAGT5G,gBAAkB,WAChB,MAAOpC,GAAEuB,UAET,wCACE,6BACE,2EACE,qJACE,+CACA,uBACF,YACF,MACF,SAGA,0BACE,6EACA,4DACE,uCACE,2GACF,iBACE,gFACF,UACF,YACF,QAEA,8HAEA,8BACE,2DACE,OACE,2EACA,6CACF,QACA,oCACE,OACE,iCACA,iDACF,QACF,UACA,wCACE,OACE,oCACA,qDACF,QACF,UACA,qCACE,OACE,4BACA,kDACF,QACF,UACA,yCACE,OACE,2CACA,sDACF,QACF,UACA,uCACE,OACE,mCACA,oDACF,QACF,UACA,+CACE,OACE,kCACA,wEACF,QACF,UACA,kDACE,OACE,qCACA,2EACF,QACF,UACA,4CACE,OACE,yCACA,qEACF,QACF,UACA,iDACE,OACE,oCACA,0EACF,QACF,UACA,mCACE,OACE,+BACA,4DACF,QACF,UACA,sCACE,OACE,2CACA,+DACF,QACF,UACA,qCACE,OACE,iDACA,8DACF,QACF,UACF,WACA,QACE,qBACA,SACF,SAEF,SAEF,UACEyH,KAAK,MAGT1G,sBAAwB,WACtB,MAAOtC,GAAEuB,UAET,wCACE,6BACE,kLACE,oCACA,eACF,YACA,8KACE,uCACA,aACF,YACF,SAGA,0BACE,6EACA,4DACE,uCACE,2GACF,iBACE,gFACF,UACF,YACF,QAEA,8BACE,wGACA,2DACE,OACE,oHACA,oIACF,QACA,OACE,iCACA,OACE,0EACF,QACF,QACA,OACE,oCACA,OACE,oEACF,QACF,QACA,OACE,4BACA,kDACF,QACA,OACE,2CACA,sDACF,QACA,OACE,mCACA,oDACF,QACA,mBACE,kCACA,wEACF,QACE,qCACA,yDACE,2EACF,iBACE,+BACF,UACF,QACA,OACE,yCACA,qEACF,QACA,OACE,oCACA,0EACF,QACA,OACE,+BACA,4DACF,QACA,OACE,iDACA,8DACF,QACA,OACE,2CACA,+DACF,QACF,WACA,QACE,qBACA,SACF,SACF,SAEF,UACEyH,KAAK,MAGTpC,2BAA6B,WAC3B,MAAO5G,GAAEuB,UAET,wCACE,6BACE,mDACE,6JACE,4CACA,0BACF,YACF,OACA,2EACE,mJACE,qCACA,wBACF,YACF,MACF,SAGA,0BACE,6EACE,4DACE,uCACE,2GACF,iBACE,gFACF,UACJ,YACF,QAEA,sDACA,oCACE,wBACE,yKACF,iBACE,+IACF,UACF,SACA,8BACE,uCACA,kDACA,mEACA,8KACA,QACA,uCACA,+LACA,4CACE,8DACE,yLACE,oCACA,4BACF,YACF,OACF,iBACE,4FACA,gKACE,wCACA,qBACA,YACF,gDACE,iLACE,kCACA,qBACF,YACF,OACF,UACA,6CACA,mEACA,iDACE,qFACA,mGACA,mGACF,SACA,4DACA,mEACA,iDACE,uLACF,SACA,iLACE,uCACA,aACF,YACF,SAEF,UACEyH,KAAK,MAGTrF,0BAA2B,WACzB,MAAO3D,GAAEuB,UACT,QACE,mCACE,mBACA,qHACE,8CACE,mGACF,YACF,YACF,SACA,mCACE,kBACA,4GACA,WACF,SACF,UACEyH,KAAK,MAITO,qBAAsB,WACpB,MAAOvJ,GAAEuB,UACT,uCACE,2CACE,iEACF,YACF,aACEyH,KAAK,OAKX,QACI5K,mBAAoBA"} \ No newline at end of file diff --git a/static/maps/mvc/library/library-folderrow-view.js.map b/static/maps/mvc/library/library-folderrow-view.js.map index 76443ac4145..99525243e01 100644 --- a/static/maps/mvc/library/library-folderrow-view.js.map +++ b/static/maps/mvc/library/library-folderrow-view.js.map @@ -1 +1 @@ -{"version":3,"file":"library-folderrow-view.js","sources":["../../../src/mvc/library/library-folderrow-view.js"],"names":["define","mod_toastr","mod_library_model","mod_library_dataset_view","FolderRowView","Backbone","View","extend","events","click .undelete_dataset_btn","click .undelete_folder_btn","click .edit_folder_btn","click .cancel_folder_btn","click .save_folder_btn","defaults","type","visibility_config","edit_folder_btn","save_folder_btn","cancel_folder_btn","permission_folder_btn","edit_mode","initialize","options","this","_","render","folder_item","model","template","get","prepareButtons","templateRowDeletedFolder","templateRowFolder","templateRowDeletedFile","templateRowFile","Galaxy","emit","error","setElement","content_item","button_config","$el","show","folder","vis_config","showDatasetDetails","libraries","datasetView","LibraryDatasetView","id","undeleteDataset","event","$","hide","that","dataset_id","target","closest","data","dataset","folderListView","collection","url","urlRoot","destroy","success","response","remove","updated_dataset","Item","add","sortByNameAsc","onclick","folder_id","window","location","responseJSON","err_msg","undeleteFolder","updated_folder","FolderAsModel","startModifications","repaint","cancelModifications","saveModifications","is_changed","new_name","find","val","length","warning","set","new_description","row_view","save","patch","info","old_element","replaceWith","tooltip","join"],"mappings":"AAAAA,QACI,cACA,4BACA,oCACJ,SAASC,EACAC,EACAC,GAET,GAAIC,GAAgBC,SAASC,KAAKC,QAEhCC,QACEC,8BAAmC,kBACnCC,6BAAmC,iBACnCC,yBAAmC,qBACnCC,2BAAmC,sBACnCC,yBAAmC,qBAGrCC,UACEC,KAAM,KACNC,mBACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,mBAAmB,EACnBC,uBAAuB,GAEzBC,WAAW,GAGbC,WAAa,SAASC,GACpBC,KAAKD,QAAUE,EAAEX,SAAUS,MAAeC,KAAKV,UAC/CU,KAAKE,OAAOF,KAAKD,UAGnBG,OAAQ,SAASH,GACfC,KAAKD,QAAUE,EAAElB,OAAQiB,KAAKD,QAASA,EACvC,IAAII,GAAcH,KAAKD,QAAQK,MAC3BC,EAAW,IAuBf,OArBgC,WAA5BF,EAAYG,IAAI,SAA2D,kBAAnCH,EAAYG,IAAI,gBAC1DN,KAAKD,QAAQR,KAAO,SACpBS,KAAKO,eAAeJ,GAElBE,EADEF,EAAYG,IAAI,WACPN,KAAKQ,2BAELR,KAAKS,qBAEmB,SAA5BN,EAAYG,IAAI,SAAyD,qCAAnCH,EAAYG,IAAI,gBAA4F,mBAAnCH,EAAYG,IAAI,gBACxIN,KAAKD,QAAQR,KAAO,OAElBc,EADEF,EAAYG,IAAI,WACPN,KAAKU,yBAELV,KAAKW,oBAGlBC,OAAOC,KAAKC,MAAM,oCAClBF,OAAOC,KAAKC,MAAMX,EAAYG,IAAI,SAAWH,EAAYG,IAAI,iBAE/DN,KAAKe,WAAWV,GAAUW,aAAcb,EAAa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AAkBrE,KAAKkB,IAAI8C,KAAK,6BAA6BC,KAKjE,IAJ+B,mBAApBI,IAAmCA,IAAoBjD,EAAOd,IAAI,iBACzEc,EAAOgD,IAAI,cAAeC,GAC1BP,GAAa,GAEbA,EAAW,CACb,GAAIQ,GAAWtE,IACboB,GAAOmD,KAAK,MACVC,OAAO,EACP9B,QAAS,SAAStB,GAChBkD,EAASvE,QAAQF,WAAY,EAC7ByE,EAASX,QAAQvC,GACjB3C,EAAWiE,QAAQ,6BAErB5B,MAAO,SAASV,EAAOuC,GAEnBlE,EAAWqC,MADwB,mBAA1B6B,GAASU,aACDV,EAASU,aAAaC,QAEtB,kEAKzBtD,MAAKD,QAAQF,WAAY,EACzBG,KAAK2D,QAAQvC,GACb3C,EAAWgG,KAAK,yBAIpBd,QAAS,WAGP9B,EAAE,YAAYC,MAGd,IAAI4C,GAAc1E,KAAKkB,GAGvBlB,MAAKE,SACLwE,EAAYC,YAAY3E,KAAKkB,KAE7BlB,KAAKkB,IAAI8C,KAAK,iBAAiBY,WAGjCnE,kBAAmB,WACjB,MAAOR,GAAEI,UACP,6EACE,OACE,gDACF,QACA,mFACA,yBACE,OACE,gFACF,QACA,OACE,yCACF,QACF,8BACE,oIACA,yJACF,UACE,kBACA,YACA,OACE,mDACF,QACA,OACE,wBACE,4NACE,iCACA,aACF,YACA,mOACE,8BACA,eACF,YACF,+BACE,0PACE,+BACF,YACA,0DACE,wPACE,8BACF,YACF,OACF,UACF,QACJ,SACIwE,KAAK,MAGblE,gBAAiB,WACf,MAAOV,GAAEI,UACT,8EACE,OACE,+CACF,QACA,oCACE,6CACF,QACA,OACE,mHACE,kCACF,MACF,QACA,8CACA,yDACA,0DACA,4DACA,OACE,mDACE,gIACF,UACA,8CACE,yHACF,UACA,6GACE,+HACF,UACA,8CACE,uGACE,uIACE,8BACF,YACF,OACF,UACF,QACF,SACEwE,KAAK,MAGTnE,uBAAwB,WACtB,MAAOT,GAAEI,UACT,mFACE,OACE,+CACF,QACA,YACA,2BACE,kCACF,QACA,OACE,qCACF,QACA,OACE,gDACF,QACA,OACE,iDACF,QACA,OACE,mDACF,QACA,OACE,wHACA,iMACE,+BACA,iBACF,YACF,QACF,SACEwE,KAAK,MAGTrE,yBAA0B,WACxB,MAAOP,GAAEI,UACT,wFACE,OACE,gDACF,QACA,YACA,2BACE,kCACF,QACA,OACE,yCACF,QACA,OACE,SACF,QACA,YACA,OACE,mDACF,QACA,OACE,wHACA,gMACE,+BACA,iBACF,YACF,QACF,SACEwE,KAAK,OAKX,QACIjG,cAAeA"} \ No newline at end of file +{"version":3,"file":"library-folderrow-view.js","sources":["../../../src/mvc/library/library-folderrow-view.js"],"names":["define","mod_toastr","mod_library_model","mod_library_dataset_view","FolderRowView","Backbone","View","extend","events","click .undelete_dataset_btn","click .undelete_folder_btn","click .edit_folder_btn","click .cancel_folder_btn","click .save_folder_btn","defaults","type","visibility_config","edit_folder_btn","save_folder_btn","cancel_folder_btn","permission_folder_btn","edit_mode","initialize","options","this","_","render","folder_item","model","template","get","prepareButtons","templateRowDeletedFolder","templateRowFolder","templateRowDeletedFile","templateRowFile","Galaxy","emit","error","setElement","content_item","button_config","$el","show","folder","vis_config","showDatasetDetails","libraries","datasetView","LibraryDatasetView","id","undeleteDataset","event","$","hide","that","dataset_id","target","closest","data","dataset","folderListView","collection","url","urlRoot","destroy","success","response","remove","updated_dataset","Item","add","sortByNameAsc","onclick","folder_id","window","location","root","responseJSON","err_msg","undeleteFolder","updated_folder","FolderAsModel","startModifications","repaint","cancelModifications","saveModifications","is_changed","new_name","find","val","length","warning","set","new_description","row_view","save","patch","info","old_element","replaceWith","tooltip","join"],"mappings":"AAAAA,QACI,cACA,4BACA,oCACJ,SAASC,EACAC,EACAC,GAET,GAAIC,GAAgBC,SAASC,KAAKC,QAEhCC,QACEC,8BAAmC,kBACnCC,6BAAmC,iBACnCC,yBAAmC,qBACnCC,2BAAmC,sBACnCC,yBAAmC,qBAGrCC,UACEC,KAAM,KACNC,mBACEC,iB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,KAAK4D,QAAQxC,GACb3C,EAAWiG,KAAK,yBAIpBd,QAAS,WAGP/B,EAAE,YAAYC,MAGd,IAAI6C,GAAc3E,KAAKkB,GAGvBlB,MAAKE,SACLyE,EAAYC,YAAY5E,KAAKkB,KAE7BlB,KAAKkB,IAAI+C,KAAK,iBAAiBY,WAGjCpE,kBAAmB,WACjB,MAAOR,GAAEI,UACP,6EACE,OACE,gDACF,QACA,mFACA,yBACE,OACE,gFACF,QACA,OACE,yCACF,QACF,8BACE,oIACA,yJACF,UACE,kBACA,YACA,OACE,mDACF,QACA,OACE,wBACE,4NACE,iCACA,aACF,YACA,mOACE,8BACA,eACF,YACF,+BACE,0PACE,+BACF,YACA,0DACE,wPACE,8BACF,YACF,OACF,UACF,QACJ,SACIyE,KAAK,MAGbnE,gBAAiB,WACf,MAAOV,GAAEI,UACT,8EACE,OACE,+CACF,QACA,oCACE,6CACF,QACA,OACE,mHACE,kCACF,MACF,QACA,8CACA,yDACA,0DACA,4DACA,OACE,mDACE,gIACF,UACA,8CACE,yHACF,UACA,6GACE,+HACF,UACA,8CACE,uGACE,uIACE,8BACF,YACF,OACF,UACF,QACF,SACEyE,KAAK,MAGTpE,uBAAwB,WACtB,MAAOT,GAAEI,UACT,mFACE,OACE,+CACF,QACA,YACA,2BACE,kCACF,QACA,OACE,qCACF,QACA,OACE,gDACF,QACA,OACE,iDACF,QACA,OACE,mDACF,QACA,OACE,wHACA,iMACE,+BACA,iBACF,YACF,QACF,SACEyE,KAAK,MAGTtE,yBAA0B,WACxB,MAAOP,GAAEI,UACT,wFACE,OACE,gDACF,QACA,YACA,2BACE,kCACF,QACA,OACE,yCACF,QACA,OACE,SACF,QACA,YACA,OACE,mDACF,QACA,OACE,wHACA,gMACE,+BACA,iBACF,YACF,QACF,SACEyE,KAAK,OAKX,QACIlG,cAAeA"} \ No newline at end of file diff --git a/static/maps/mvc/library/library-foldertoolbar-view.js.map b/static/maps/mvc/library/library-foldertoolbar-view.js.map index 7c70f2d8706..3467916fe6f 100644 --- a/static/maps/mvc/library/library-foldertoolbar-view.js.map +++ b/static/maps/mvc/library/library-foldertoolbar-view.js.map @@ -1 +1 @@ -{"version":3,"file":"library-foldertoolbar-view.js","sources":["../../../src/mvc/library/library-foldertoolbar-view.js"],"names":["define","mod_masthead","mod_utils","mod_toastr","mod_library_model","mod_select","FolderToolbarView","Backbone","View","extend","el","events","click #toolbtn_create_folder","click #toolbtn_bulk_import","click #include_deleted_datasets_chk","click #toolbtn_bulk_delete","click .toolbtn-show-locinfo","click .page_size_prompt","defaults","can_add_library_item","contains_file_or_folder","chain_call_control","total_number","failed_number","disabled_jstree_element","modal","jstree","histories","select_genome","select_extension","list_extensions","auto","id","text","description","list_genomes","initialize","options","this","_","fetchExtAndGenomes","render","toolbar_template","templateToolBar","template_defaults","is_admin","is_anonym","mutiple_add_dataset_options","Galaxy","user","isAdmin","isAnonymous","config","user_library_import_dir","allow_library_path_paste","library_import_dir","$el","html","renderPaginator","paginator_template","templatePaginator","$","find","show_page","parseInt","page_count","total_items_count","items_shown","configureElements","show","hide","tooltip","createFolderFromModal","event","preventDefault","stopPropagation","self","template","templateNewFolderInModal","closing_events","title","body","buttons","Create","create_new_folder_event","Close","folderDetails","serialize_new_folder","validate_new_folder","folder","FolderAsModel","url_items","history","fragment","split","current_folder_id","length","url","urlRoot","save","success","set","type","libraries","folderListView","collection","add","error","model","response","responseJSON","err_msg","name","val","modalBulkImport","checkedValues","info","refreshUserHistoriesList","that","templateBulkImportInModal","models","Import","importAllIntoHistory","callback","GalaxyHistories","fetch","disableButton","new_history_name","post","root","done","new_history","last_used_history_id","processImportToHistory","fail","always","enableButton","history_id","history_name","dataset_ids","folder_ids","each","parentElement","data","classList","contains","push","datasets_to_import","i","library_dataset_id","historyItem","HistoryItem","content","source","library_folder_id","initChainCallControl","action","jQuery","getJSON","chainCallImportingIntoHistory","updateProgress","progress","progressStep","width","Math","round","txt_representation","download","folder_id","format","ld_ids","processDownload","method","param","inputs","pair","appendTo","submit","remove","addFilesFromHistoryModal","template_modal","templateAddFilesFromHistory","folder_name","full_path","Add","addAllDatasetsFromHistory","closing_callback","library_router","back","fetchAndDisplayHistoryContents","change","target","value","importFilesFromPathModal","templateImportPathModal","importFromPathsClicked","navigate","trigger","renderSelectBoxes","get","datatypes","key","extension","description_url","sort","a","b","unshift","cache","genomes","css","container","importFilesFromGalaxyFolderModal","templateBrowserModal","importFromJstreePath","bind","renderJstree","Jstree","require","core","plugins","types","icon","file","checkbox","three_state","err_code","warning","preserve_dirs","is","link_data","file_type","dbkey","paths","valid_paths","trimmed","trim","chainCallImportingFolders","templateAddingDatasetsProgressBar","templateDeletingItemsProgressBar","templateImportIntoHistoryProgressBar","emit","all_nodes","get_selected","selected_nodes","filter","node","state","disabled","selection_type","undefined","li_attr","full_source","chainCallImportingUserdirFiles","history_contents","HistoryContents","history_contents_template","templateHistoryContents","contents","reverse","checked_hdas","history_dataset_ids","hdas_to_add","hid","history_dataset_id","folder_item","Item","from_hda_id","chainCallAddingHdas","history_item_set","popped_item","pop","onclick","window","location","promise","when","hdas_set","added_hdas","Folder","chainCallDeletingItems","items_to_delete","deleted_items","destroy","item","include_deleted","updated_item","model_class","checkIncludeDeleted","fetchFolder","checked","deleteSelectedItems","substring","items_total","dataset","showLocInfo","library","libraryListView","parent_library_id","showLocInfoModal","Library","templateLocInfoInModal","showImportModal","showPageSizePrompt","folder_page_size","prompt","preferences","join"],"mappings":"AAAAA,QACI,kBACA,cACA,cACA,4BACA,oBAEJ,SAAUC,EACAC,EACAC,EACAC,EACAC,GAGV,GAAIC,GAAoBC,SAASC,KAAKC,QACpCC,GAAI,UAEJC,QACEC,+BAAwC,wBACxCC,6BAAwC,kBACxCC,sCAAwC,sBACxCC,6BAAwC,sBACxCC,8BAAwC,cACxCC,0BAAwC,sBAI1CC,UACEC,sBAA4B,EAC5BC,yBAA4B,EAC5BC,oBAC4BC,aAAkB,EAClBC,cAAkB,GAE9CC,wBAA4B,WAG9BC,MAAQ,KAGR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A,0FACE,kIACE,4EACF,YACA,yCACE,kEACA,kEACA,+DACF,QACF,SACE,+NACA,oDACA,8LACE,0CACA,gBACF,YACA,qGACE,gGACE,gDACE,8CACA,aACF,YACF,OACF,UACF,SACF,UAEF,kCACA,SAEA,wDAEF,UACEsO,KAAK,MAGTN,uBAAwB,WACtB,MAAOtQ,GAAEsC,UACP,QACE,6CACE,UACE,uCACA,YACF,WACA,UACE,OACE,gBACA,sCACF,QACA,gDACE,OACE,uBACA,6CACF,QACF,UACA,6CACE,OACE,oBACA,0CACF,QACF,UACA,uDACE,OACE,mBACA,2GACF,QACF,UACA,OACE,cACA,oCACF,QACF,WACF,WACA,6CACE,UACE,sCACA,YACF,WACA,UACE,OACE,gBACA,sCACF,QACA,gDACE,OACE,uBACA,6CACF,QACF,UACA,OACE,cACA,6BACF,QACA,WACJ,WACJ,UACEsO,KAAK,MAGTrO,yBAA0B,WACxB,MAAOvC,GAAEsC,UACT,8BACE,SACE,wEACA,4EACF,UACF,UACEsO,KAAK,MAIT5L,0BAA4B,WAC1B,MAAOhF,GAAEsC,UACT,QACE,mCACE,mBACA,iHACE,8CACE,mGACF,YACF,YACF,SACA,mCACE,kBACA,4GACA,WACF,SACF,UACEsO,KAAK,MAGTnE,qCAAuC,WACrC,MAAOzM,GAAEsC,UACT,4BACE,2EACF,SACA,yBACE,gJACE,mDACF,SACF,UACEsO,KAAK,MAGTrE,kCAAmC,WACjC,MAAOvM,GAAEsC,UACT,4BACE,iFACF,SACA,yBACE,gJACE,mDACF,SACF,UACEsO,KAAK,MAGTpE,iCAAkC,WAChC,MAAOxM,GAAEsC,UACT,4BACA,SACA,yBACE,gJACE,mDACF,SACF,UACEsO,KAAK,MAGT9F,qBAAsB,WACpB,MAAO9K,GAAEsC,UACT,gCACE,0JACA,wLACA,mCACE,oFACE,yGACF,WACA,sFACA,uFACA,WACF,SACA,mCACE,kFACE,yFACA,+BACF,WACA,0EACE,mEACA,gCACF,WACF,SACA,qGACE,aACF,YACA,qGACE,cACF,YACA,SAEA,4BACA,SACA,SACA,kFACA,QACE,gFACA,4EACA,SACJ,UACEsO,KAAK,MAGTjH,wBAAyB,WACvB,MAAO3J,GAAEsC,UACT,gCACE,+JACA,sCACE,4DACE,yFACA,+BACF,WACA,oDACE,mEACA,gCACF,WACF,SACA,uKACA,SACA,kFACA,QACE,gFACA,4EACF,SACF,UACEsO,KAAK,MAGT9H,4BAA6B,WAC3B,MAAO9I,GAAEsC,UACT,6BACE,QACE,oBACA,8EACE,8CACE,mGACF,YACF,YACF,SACA,QACA,sCACA,SACF,UACEsO,KAAK,MAGTlD,wBAAyB;AACvB,MAAO1N,GAAEsC,UACT,kDACA,OACE,0DACE,yDACE,iIACF,QACF,YACF,SACEsO,KAAK,MAGTvP,kBAAmB,WACjB,MAAOrB,GAAEsC,UACT,wCACE,uCACE,gDACE,iGACA,wHACF,iBACE,iGACA,2GACF,UACF,iBACE,kHACA,wHACF,UACA,sBACE,0FACF,QACA,4CACE,2GACA,0HACF,iBACE,yHACA,2IACF,UACF,QACA,SACE,sBACA,8HACE,qBACF,OACA,0CACF,WACEsO,KAAK,OAKX,QACI7S,kBAAmBA"} \ No newline at end of file +{"version":3,"file":"library-foldertoolbar-view.js","sources":["../../../src/mvc/library/library-foldertoolbar-view.js"],"names":["define","mod_masthead","mod_utils","mod_toastr","mod_library_model","mod_select","FolderToolbarView","Backbone","View","extend","el","events","click #toolbtn_create_folder","click #toolbtn_bulk_import","click #include_deleted_datasets_chk","click #toolbtn_bulk_delete","click .toolbtn-show-locinfo","click .page_size_prompt","defaults","can_add_library_item","contains_file_or_folder","chain_call_control","total_number","failed_number","disabled_jstree_element","modal","jstree","histories","select_genome","select_extension","list_extensions","auto","id","text","description","list_genomes","initialize","options","this","_","fetchExtAndGenomes","render","toolbar_template","templateToolBar","template_defaults","is_admin","is_anonym","mutiple_add_dataset_options","Galaxy","user","isAdmin","isAnonymous","config","user_library_import_dir","allow_library_path_paste","library_import_dir","$el","html","renderPaginator","paginator_template","templatePaginator","$","find","show_page","parseInt","page_count","total_items_count","items_shown","configureElements","show","hide","tooltip","createFolderFromModal","event","preventDefault","stopPropagation","self","template","templateNewFolderInModal","closing_events","title","body","buttons","Create","create_new_folder_event","Close","folderDetails","serialize_new_folder","validate_new_folder","folder","FolderAsModel","url_items","history","fragment","split","current_folder_id","length","url","urlRoot","save","success","set","type","libraries","folderListView","collection","add","error","model","response","responseJSON","err_msg","name","val","modalBulkImport","checkedValues","info","refreshUserHistoriesList","that","templateBulkImportInModal","models","Import","importAllIntoHistory","callback","GalaxyHistories","fetch","disableButton","new_history_name","post","root","done","new_history","last_used_history_id","processImportToHistory","fail","always","enableButton","history_id","history_name","dataset_ids","folder_ids","each","parentElement","data","classList","contains","push","datasets_to_import","i","library_dataset_id","historyItem","HistoryItem","content","source","library_folder_id","initChainCallControl","action","jQuery","getJSON","chainCallImportingIntoHistory","updateProgress","progress","progressStep","width","Math","round","txt_representation","download","folder_id","format","ld_ids","processDownload","method","param","inputs","pair","appendTo","submit","remove","addFilesFromHistoryModal","template_modal","templateAddFilesFromHistory","folder_name","full_path","Add","addAllDatasetsFromHistory","closing_callback","library_router","back","fetchAndDisplayHistoryContents","change","target","value","importFilesFromPathModal","templateImportPathModal","importFromPathsClicked","navigate","trigger","renderSelectBoxes","get","datatypes","key","extension","description_url","sort","a","b","unshift","cache","genomes","css","container","importFilesFromGalaxyFolderModal","templateBrowserModal","importFromJstreePath","bind","renderJstree","Jstree","require","core","plugins","types","icon","file","checkbox","three_state","err_code","warning","preserve_dirs","is","link_data","file_type","dbkey","paths","valid_paths","trimmed","trim","chainCallImportingFolders","templateAddingDatasetsProgressBar","templateDeletingItemsProgressBar","templateImportIntoHistoryProgressBar","emit","all_nodes","get_selected","selected_nodes","filter","node","state","disabled","selection_type","undefined","li_attr","full_source","chainCallImportingUserdirFiles","history_contents","HistoryContents","history_contents_template","templateHistoryContents","contents","reverse","checked_hdas","history_dataset_ids","hdas_to_add","hid","history_dataset_id","folder_item","Item","from_hda_id","chainCallAddingHdas","history_item_set","popped_item","pop","onclick","window","location","promise","when","hdas_set","added_hdas","Folder","chainCallDeletingItems","items_to_delete","deleted_items","destroy","item","include_deleted","updated_item","model_class","checkIncludeDeleted","fetchFolder","checked","deleteSelectedItems","substring","items_total","dataset","showLocInfo","library","libraryListView","parent_library_id","showLocInfoModal","Library","templateLocInfoInModal","showImportModal","showPageSizePrompt","folder_page_size","prompt","preferences","join"],"mappings":"AAAAA,QACI,kBACA,cACA,cACA,4BACA,oBAEJ,SAAUC,EACAC,EACAC,EACAC,EACAC,GAGV,GAAIC,GAAoBC,SAASC,KAAKC,QACpCC,GAAI,UAEJC,QACEC,+BAAwC,wBACxCC,6BAAwC,kBACxCC,sCAAwC,sBACxCC,6BAAwC,sBACxCC,8BAAwC,cACxCC,0BAAwC,sBAI1CC,UACEC,sBAA4B,EAC5BC,yBAA4B,EAC5BC,oBAC4BC,aAAkB,EAClBC,cAAkB,GAE9CC,wBAA4B,WAG9BC,MAAQ,KAGRC,OAAQ,KAGRC,UAAY,KAGZC,cAAgB,KAGhBC,iBAAmB,KAGnBC,mBAGAC,MACIC,GAAc,OACdC,KAAc,cACdC,YAAc,sZASlBC,gBAEAC,WAAY,SAASC,GACnBC,KAAKD,QAAUE,EAAErB,SAAUmB,MAAeC,KAAKpB,UAC/CoB,KAAKE,qBACLF,KAAKG,UAGPA,OAAQ,SAASJ,GACfC,KAAKD,QAAUE,EAAE9B,OAAQ6B,KAAKD,QAASA,EACvC,IAAIK,GAAmBJ,KAAKK,kBACxBC,GACAZ,GAAIM,KAAKD,QAAQL,GACjBa,UAAU,EACVC,WAAW,EACXC,6BAA6B,EAE7BC,QAAOC,OACTL,EAAkBC,SAAWG,OAAOC,KAAKC,UACzCN,EAAkBE,UAAYE,OAAOC,KAAKE,eACK,OAA1CH,OAAOI,OAAOC,yBAAoCL,OAAOI,OAAOE,4BAA6B,GAA8C,OAArCN,OAAOI,OAAOG,sBACvHX,EAAkBG,6BAA8B,IAG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AAoC3D,OAAQ,WACjD,MACF,SACEzG,OAAOuD,UAAUoF,eAAeC,OAChCzL,EAAWwG,MAAM,4BAQvBoM,mBAAoB,WAClB,GAAIC,GAAmBC,OAAQ,8CAA+CjQ,OAAOuD,UAAU2M,YAAY3G,IAAK,oBACrF,OAApByG,GAAgCA,GAAoBhP,SAAUgP,KACjEhQ,OAAOuD,UAAU2M,YAAY7M,KAAO2M,iBAAoBhP,SAAUgP,KAClEhQ,OAAOuD,UAAUC,eAAe/D,QAAUT,GAAIM,KAAKD,QAAQL,GAAI+B,UAAW,MAIhFpB,gBAAiB,WACf,MAAOJ,GAAEsC,UAET,wCAEE,6BACE,yCACE,+CAEA,2DACA,sGACE,UACE,mFACF,WACF,SACA,qNACE,qEACF,YACA,0CACA,kEACE,oIACE,8FACF,YACA,yCACE,yEACA,6DACE,gFACF,UACA,qDACE,4BACA,+CACA,wDACE,mFACF,UACA,qDACE,kEACF,UACF,UACF,QACF,SACA,iBACE,0LACE,mEACF,OACF,UACA,iOACE,mCACA,mBACF,YACA,0FACE,kIACE,4EACF,YACA,yCACE,kEACA,kEACA,+DACF,QACF,SACE,+NACA,oDACA,8LACE,0CACA,gBACF,YACA,qGACE,gGACE,gDACE,8CACA,aACF,YACF,OACF,UACF,SACF,UAEF,kCACA,SAEA,wDAEF,UACEsO,KAAK,MAGTN,uBAAwB,WACtB,MAAOtQ,GAAEsC,UACP,QACE,6CACE,UACE,uCACA,YACF,WACA,UACE,OACE,gBACA,sCACF,QACA,gDACE,OACE,uBACA,6CACF,QACF,UACA,6CACE,OACE,oBACA,0CACF,QACF,UACA,uDACE,OACE,mBACA,2GACF,QACF,UACA,OACE,cACA,oCACF,QACF,WACF,WACA,6CACE,UACE,sCACA,YACF,WACA,UACE,OACE,gBACA,sCACF,QACA,gDACE,OACE,uBACA,6CACF,QACF,UACA,OACE,cACA,6BACF,QACA,WACJ,WACJ,UACEsO,KAAK,MAGTrO,yBAA0B,WACxB,MAAOvC,GAAEsC,UACT,8BACE,SACE,wEACA,4EACF,UACF,UACEsO,KAAK,MAIT5L,0BAA4B,WAC1B,MAAOhF,GAAEsC,UACT,QACE,mCACE,mBACA,iHACE,8CACE,mGACF,YACF,YACF,SACA,mCACE,kBACA,4GACA,WACF,SACF,UACEsO,KAAK,MAGTnE,qCAAuC,WACrC,MAAOzM,GAAEsC,UACT,4BACE,2EACF,SACA,yBACE,gJACE,mDACF,SACF,UACEsO,KAAK,MAGTrE,kCAAmC,WACjC,MAAOvM,GAAEsC,UACT,4BACE,iFACF,SACA,yBACE,gJACE,mDACF,SACF,UACEsO,KAAK,MAGTpE,iCAAkC,WAChC,MAAOxM,GAAEsC,UACT,4BACA,SACA,yBACE,gJACE,mDACF,SACF,UACEsO,KAAK,MAGT9F,qBAAsB,WACpB,MAAO9K,GAAEsC,UACT,gCACE,0JACA,wLACA,mCACE,oFACE,yGACF,WACA,sFACA,uFACA,WACF,SACA,mCACE,kFACE,yFACA,+BACF,WACA,0EACE,mEACA,gCACF,WACF,SACA,qGACE,aACF,YACA,qGACE,cACF,YACA,SAEA,4BACA,SACA,SACA,kFACA,QACE,gFACA,4EACA,SACJ,UACEsO,KAAK,MAGTjH,wBAAyB,WACvB,MAAO3J,GAAEsC,UACT,gCACE,+JACA,sCACE,4DACE,yFACA,+BACF,WACA,oDACE,mEACA,gCACF,WACF,SACA,uKACA,SACA,kFACA,QACE,gFACA,4EACF,SACF,UACEsO,KAAK,MAGT9H,4BAA6B,WAC3B,MAAO9I,GAAEsC,UACT,6BACE,QACE,oBACA,8EACE,8CACE,mGACF,YACF,YACF,SACA,QACA,sCACA,SACF,UACEsO,KAAK,MAGTlD,wBAAyB;AACvB,MAAO1N,GAAEsC,UACT,kDACA,OACE,0DACE,yDACE,iIACF,QACF,YACF,SACEsO,KAAK,MAGTvP,kBAAmB,WACjB,MAAOrB,GAAEsC,UACT,wCACE,uCACE,gDACE,iGACA,wHACF,iBACE,iGACA,2GACF,UACF,iBACE,kHACA,wHACF,UACA,sBACE,0FACF,QACA,4CACE,2GACA,0HACF,iBACE,yHACA,2IACF,UACF,QACA,SACE,sBACA,8HACE,qBACF,OACA,0CACF,WACEsO,KAAK,OAKX,QACI7S,kBAAmBA"} \ No newline at end of file diff --git a/static/scripts/bundled/analysis.bundled.js b/static/scripts/bundled/analysis.bundled.js index d170214fd90..d7ff28ab70b 100644 --- a/static/scripts/bundled/analysis.bundled.js +++ b/static/scripts/bundled/analysis.bundled.js @@ -1,14 +1,14 @@ -webpackJsonp([3,1],[function(e,t,i){(function(e,t){var n=i(1),s=n,o=i(58).GalaxyApp,a=i(57),r=i(10),l=i(91),c=i(90),d=i(60),h=i(18),u=i(46);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(e.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(e,t){s(".select2-hidden-accessible").remove(),f.display(e)}};new(t.Router.extend({initialize:function(e){this.options=e},execute:function(e,t,i){Galaxy.debug("router execute:",e,t,i);var n=a.parse(t.pop());t.push(n),e&&e.apply(this,t)},routes:{"(/)":"home","(/)root*":"home","(/)tours(/)(:tour_id)":"show_tours"},show_tours:function(e){e?u.giveTour(e):f.display(new u.ToursView)},home:function(e){e.tool_id||e.job_id?"upload1"===e.tool_id?(Galaxy.upload.show(),this._loadCenterIframe("welcome")):this._loadToolForm(e):e.workflow_id?this._loadCenterIframe("workflow/run?id="+e.workflow_id):e.m_c?this._loadCenterIframe(e.m_c+"/"+e.m_a):this._loadCenterIframe("welcome")},_loadToolForm:function(e){e.id=e.tool_id,f.display(new h.View(e))},_loadCenterIframe:function(e,t){t=t||Galaxy.root,e=t+e,f.$("#galaxy_main").prop("src",e)}}))(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),t.history.start({root:Galaxy.root,pushState:!0})})}}).call(t,i(2),i(3))},,,,,,,function(e,t,i){var n,s;(function(o,a){n=[i(4),i(21),i(52),i(20),i(48),i(13),i(8)],s=function(e,t,i,n,s,r,l){var c=o.View.extend({tagName:"label",initialize:function(e){this.model=e&&e.model||new o.Model(e),this.tagName=e.tagName||this.tagName,this.setElement(a("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},title:function(e){this.model.set("title",e)},value:function(){return this.model.get("title")},render:function(){return this.$el.removeClass().addClass("ui-label").addClass(this.model.get("cls")).html(this.model.get("title")),this}}),d=o.View.extend({initialize:function(e){this.model=e&&e.model||new o.Model({message:null,status:"info",cls:"",persistent:!1,fade:!0}).set(e),this.listenTo(this.model,"change",this.render,this),this.render()},update:function(e){this.model.set(e)},render:function(){this.$el.removeClass().addClass("ui-message").addClass(this.model.get("cls"));var e=this.model.get("status");if(this.model.get("large")?this.$el.addClass(("success"==e&&"done"||"danger"==e&&"error"||e)+"messagelarge"):this.$el.addClass("alert").addClass("alert-"+e),this.model.get("message")){if(this.$el.html(this.model.get("message")),this.$el[this.model.get("fade")?"fadeIn":"show"](),this.timeout&&window.clearTimeout(this.timeout),!this.model.get("persistent")){var t=this;this.timeout=window.setTimeout(function(){t.model.set("message","")},3e3)}}else this.$el.fadeOut();return this}}),h=o.View.extend({initialize:function(e){this.model=e&&e.model||new o.Model({type:"text",placeholder:"",disabled:!1,visible:!0,cls:"",area:!1,color:null,style:null}).set(e),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(e){return void 0!==e&&this.model.set("value","string"==typeof e?e:""),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(e){this.model=e&&e.model||new o.Model(e),this.setElement(a("
").append(this.$info=a("
")).append(this.$hidden=a("
"))),this.listenTo(this.model,"change",this.render,this),this.render()},value:function(e){return void 0!==e&&this.model.set("value",e),this.model.get("value")},render:function(){return this.$el.attr("id",this.model.id),this.$hidden.val(this.model.get("value")),this.model.get("info")?this.$info.show().html(this.model.get("info")):this.$info.hide(),this}});return{Button: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:t,Hidden:u,Slider:i,Drilldown:s}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1))},,function(e,t,i){var n,s;(function(o,a,r){n=[i(4),i(7)],s=function(e,t){var i=o.View.extend({visible:!1,initialize:function(i){var n=this;this.model=i&&i.model||new o.Model({id:e.uid(),cls:"ui-portlet",title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,collapsible:!1,collapsible_button:!1,collapsed:!1}).set(i),this.setElement(this._template()),this.$body=this.$(".portlet-body"),this.$title_text=this.$(".portlet-title-text"),this.$title_icon=this.$(".portlet-title-icon"),this.$header=this.$(".portlet-header"),this.$content=this.$(".portlet-content"),this.$backdrop=this.$(".portlet-backdrop"),this.$buttons=this.$(".portlet-buttons"),this.$operations=this.$(".portlet-operations"),this.model.get("body")&&this.append(this.model.get("body")),this.collapsible_button=new t.ButtonIcon({icon:"fa-eye",tooltip:"Collapse/Expand",cls:"ui-button-icon-plain",onclick:function(){n[n.collapsed?"expand":"collapse"]()}}),this.render()},render:function(){var e=this,t=this.model.attributes;return this.$el.removeClass().addClass(t.cls).attr("id",t.id),this.$header[t.title?"show":"hide"](),this.$title_text.html(t.title),a.each([this.$content,this.$body],function(e){e[t.nopadding?"addClass":"removeClass"]("no-padding")}),t.icon?this.$title_icon.removeClass().addClass("portlet-title-icon fa").addClass(t.icon).show():this.$title_icon.hide(),this.$title_text[t.collapsible?"addClass":"removeClass"]("no-highlight collapsible").off(),t.collapsible&&(this.$title_text.on("click",function(){e[e.collapsed?"expand":"collapse"]()}),t.collapsed?this.collapse():this.expand()),t.buttons?(this.$buttons.empty().show(),r.each(this.model.get("buttons"),function(t,i){i.$el.prop("id",t),e.$buttons.append(i.$el)})):this.$buttons.hide(),this.$operations.empty,t.collapsible_button&&this.$operations.append(this.collapsible_button.$el),t.operations&&r.each(t.operations,function(t,i){i.$el.prop("id",t),e.$operations.append(i.$el)}),this},append:function(e){this.$body.append(e)},empty:function(){this.$body.empty()},header:function(){return this.$header},body:function(){return this.$body},show:function(){this.visible=!0,this.$el.fadeIn("fast")},hide:function(){this.visible=!1,this.$el.hide()},enableButton:function(e){this.$buttons.find("#"+e).prop("disabled",!1)},disableButton:function(e){this.$buttons.find("#"+e).prop("disabled",!0)},hideOperation:function(e){this.$operations.find("#"+e).hide()},showOperation:function(e){this.$operations.find("#"+e).show()},setOperation:function(e,t){this.$operations.find("#"+e).off("click").on("click",t)},title:function(e){return e&&this.$title_text.html(e),this.$title_text.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.collapsible_button.setIcon("fa-eye-slash")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.collapsible_button.setIcon("fa-eye")},disable:function(){this.$backdrop.show()},enable:function(){this.$backdrop.hide()},_template:function(){return 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-backdrop"))}});return{View:i}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2),i(1))},,function(e,t,i){var n,s;(function(o,a,r){n=[i(8),i(23),i(14)],s=function(e,t,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 e=new n;a.each(a.keys(this.attributes),function(t){if(0===t.indexOf("metadata_")){var i=t.split("metadata_")[1];e.set(i,this.attributes[t]),delete this.attributes[t]}},this),this.set("metadata",e,{silent:!0})},get_metadata:function(e){return this.attributes.metadata.get(e)},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(e){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 e=this,t=r.Deferred();return r.getJSON(this.attributes.chunk_url,{offset:e.attributes.offset}).success(function(i){var n;""!==i.ck_data?(n=i,e.attributes.offset=i.offset):(e.attributes.at_eof=!0,n=null),t.resolve(n)}),t}}),c=o.Collection.extend({model:s}),d=o.View.extend({initialize:function(e){this.row_count=0,this.loading_chunk=!1,new p({model:e.model,$el:this.$el})},expand_to_container:function(){this.$el.height()").attr("id","loading_indicator"),this.$el.append(this.loading_indicator);var e=r("").attr({id:"content_table",cellpadding:0});this.$el.append(e);var t=this.model.get_metadata("column_names"),i=r("").appendTo(e),n=r("").appendTo(i);if(t)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(e){o._renderChunk(e)}),this.scroll_elt.scroll(function(){o.attempt_to_fetch()})},scrolled_to_bottom:function(){return!1},_renderCell:function(e,t,i){var n=r("");t.append(e),this.row.append(t)},appendHeader:function(){this.$thead.append(this.row),this.row=a("")},add:function(e,t,i){var n=a("");t&&n.css("width",t),i&&n.css("text-align",i),n.append(e),this.row.append(n)},append:function(e,t){this._commit(e,t,!1)},prepend:function(e,t){this._commit(e,t,!0)},get:function(e){return this.$el.find("#"+e)},del:function(e){var t=this.$tbody.find("#"+e);t.length>0&&(t.remove(),this.row_count--,this._refresh())},delAll:function(){this.$tbody.empty(),this.row_count=0,this._refresh()},value:function(e){this.before=this.$tbody.find(".current").attr("id"),void 0!==e&&(this.$tbody.find("tr").removeClass("current"),e&&this.$tbody.find("#"+e).addClass("current"));var t=this.$tbody.find(".current").attr("id");return void 0===t?null:(t!=this.before&&this.options.onchange&&this.options.onchange(e),t)},size:function(){return this.$tbody.find("tr").length},_commit:function(e,t,i){this.del(e),this.row.attr("id",e),i?this.$tbody.prepend(this.row):this.$tbody.append(this.row),t&&(this.row.hide(),this.row.fadeIn()),this.row=this._row(),this.row_count++,this._refresh()},_row:function(){return a('')},_onclick:function(e){var t=this.value(),i=a(e.target).closest("tr").attr("id");""!=i&&i&&t!=i&&(this.options.onconfirm?this.options.onconfirm(i):this.value(i))},_ondblclick:function(e){var t=this.value();t&&this.options.ondblclick&&this.options.ondblclick(t)},_refresh:function(){0==this.row_count?this.$tmessage.show():this.$tmessage.hide()},_template:function(e){return'
"+t.join("")+""+s+"").text(e),s=this.model.get_metadata("column_types");return void 0!==i?n.attr("colspan",i).addClass("stringalign"):s&&t"),n=this.model.get_metadata("columns");return this.row_count%2!==0&&i.addClass("dark_row"),t.length===n?a.each(t,function(e,t){i.append(this._renderCell(e,t))},this):t.length>n?(a.each(t.slice(0,n-1),function(e,t){i.append(this._renderCell(e,t))},this),i.append(this._renderCell(t.slice(n-1).join("\t"),n-1))):1===t.length?i.append(this._renderCell(e,0,n)):(a.each(t,function(e,t){i.append(this._renderCell(e,t))},this),a.each(a.range(n-t.length),function(){i.append(r(""))})),this.row_count++,i},_renderChunk:function(e){var t=this.$el.find("table");a.each(e.ck_data.split("\n"),function(e,i){""!==e&&t.append(this._renderRow(e))},this)}}),h=d.extend({initialize:function(e){d.prototype.initialize.call(this,e),scroll_elt=a.find(this.$el.parents(),function(e){return"auto"===r(e).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(e){d.prototype.initialize.call(this,e),this.scroll_elt=this.$el.css({position:"relative",overflow:"scroll",height:e.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(e){function t(e,t){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 e=this,t=this.model.attributes;this.$el.removeClass().addClass("ui-button-default").addClass(t.disabled&&"disabled").attr("id",t.id).attr("disabled",t.disabled).css("float",t.floating).off("click").on("click",function(){a(".tooltip").hide(),t.onclick&&!e.disabled&&t.onclick()}).tooltip({title:t.tooltip,placement:"bottom"}),this.$progress.addClass("progress").css("display",t.percentage!==-1?"block":"none"),this.$progress_bar.addClass("progress-bar").css({width:t.percentage+"%"}),this.$icon.removeClass().addClass("icon fa"),this.$title.removeClass().addClass("title"),t.wait?(this.$el.addClass(t.wait_cls).prop("disabled",!0),this.$icon.addClass("fa-spinner fa-spin ui-margin-right"),this.$title.html(t.wait_text)):(this.$el.addClass(t.cls),this.$icon.addClass(t.icon),this.$title.html(t.title),t.icon&&t.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(e){this.model.set("icon",e)}}),i=t.extend({initialize:function(t){this.model=t&&t.model||new o.Model({id:e.uid(),title:"",icon:"",cls:""}).set(t),this.setElement(a("").append(this.$icon=a(""))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(){var e=this.model.attributes;this.$el.removeClass().addClass(e.cls).attr({id:e.id,href:e.href||"javascript:void(0)",title:e.title,target:e.target||"_top",disabled:e.disabled}).off("click").on("click",function(){e.onclick&&!e.disabled&&e.onclick()}),this.$icon.removeClass().addClass(e.icon)}}),n=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model({id:e.uid(),title:"Select/Unselect all",icons:["fa-square-o","fa-minus-square-o","fa-check-square-o"],value:0,onchange:function(){}}).set(t),this.setElement(a("
").append(this.$icon=a("")).append(this.$title=a(""))),this.listenTo(this.model,"change",this.render,this),this.render()},render:function(e){var t=this,e=this.model.attributes;this.$el.addClass("ui-button-check").off("click").on("click",function(){t.model.set("value",0===t.model.get("value")&&2||0),e.onclick&&e.onclick()}),this.$title.html(e.title),this.$icon.removeClass().addClass("icon fa ui-margin-right").addClass(e.icons[e.value])},value:function(e,t){return void 0!==e&&(t&&0!==e&&(e=e!==t&&1||2),this.model.set("value",e),this.model.get("onchange")(this.model.get("value"))),this.model.get("value")}}),s=t.extend({initialize:function(t){this.model=t&&t.model||new o.Model({id:e.uid(),title:"",floating:"right",icon:"",cls:"ui-button-icon",disabled:!1}).set(t),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(e){var e=this.model.attributes;this.$el.removeClass().addClass(e.cls).addClass(e.disabled&&"disabled").attr("disabled",e.disabled).attr("id",e.id).css("float",e.floating).off("click").on("click",function(){a(".tooltip").hide(),!e.disabled&&e.onclick&&e.onclick()}),this.$button.addClass("button").tooltip({title:e.tooltip,placement:"bottom"}),this.$icon.removeClass().addClass("icon fa").addClass(e.icon),this.$title.addClass("title").html(e.title),e.icon&&e.title&&this.$icon.addClass("ui-margin-right")}}),r=t.extend({$menu:null,initialize:function(e){this.model=e&&e.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(e),this.collection=new o.Collection,this.setElement(a("
").append(this.$root=a("
").append(this.$icon=a("")).append(this.$title=a("")))),this.listenTo(this.model,"change",this.render,this),this.listenTo(this.collection,"change add remove reset",this.render,this),this.render()},render:function(){var e=this,t=this.model.attributes;this.$el.removeClass().addClass("dropdown").addClass(t.cls).attr("id",t.id).css({"float":t.floating,display:t.visible&&this.collection.where({visible:!0}).length>0?"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"),this.$menu&&this.$menu.remove(),this.collection.length>0&&(this.$menu=a("
","
"].join("")}});return{CitationView:n,CitationListView:s}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3))},function(e,t,i){var n,s;(function(o,a,r){n=[i(43),i(33),i(6),i(5)],s=function(e,t,i,n){"use strict";var s=e.FoldoutListItemView,l=e.ListItemView,c=s.extend({className:s.prototype.className+" dataset-collection",id:function(){return["dataset_collection",this.model.get("id")].join("-")},initialize:function(e){this.linkTarget=e.linkTarget||"_blank",this.hasUser=e.hasUser,s.prototype.initialize.call(this,e)},_setUpListeners:function(){s.prototype._setUpListeners.call(this),this.listenTo(this.model,"change",function(e,t){o.has(e.changed,"deleted")?this.render():o.has(e.changed,"element_count")&&this.$("> .title-bar .subtitle").replaceWith(this._renderSubtitle())})},_renderSubtitle:function(){return a(this.templates.subtitle(this.model.toJSON(),this))},_getFoldoutPanelOptions:function(){var e=s.prototype._getFoldoutPanelOptions.call(this);return o.extend(e,{linkTarget:this.linkTarget,hasUser:this.hasUser})},$selector:function(){return this.$("> .selector")},toString:function(){var e=this.model?this.model+"":"(no model)";return"DCListItemView("+e+")"}});c.prototype.templates=function(){var e=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"),"
","<% } %>"])}),t=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:e,titleBar:t,subtitle:a})}();var d=l.extend({className:l.prototype.className+" dataset-collection-element",initialize:function(e){e.logger&&(this.logger=this.model.logger=e.logger),this.log("DCEListItemView.initialize:",e),l.prototype.initialize.call(this,e)},toString:function(){var e=this.model?this.model+"":"(no model)";return"DCEListItemView("+e+")"}});d.prototype.templates=function(){var e=i.wrapTemplate(['
','
','<%- element.element_identifier %>',"
",'
',"
"],"element");return o.extend({},l.prototype.templates,{titleBar:e})}();var h=t.DatasetListItemView.extend({className:t.DatasetListItemView.prototype.className+" dataset-collection-element",initialize:function(e){e.logger&&(this.logger=this.model.logger=e.logger),this.log("DatasetDCEListItemView.initialize:",e),t.DatasetListItemView.prototype.initialize.call(this,e)},_fetchModelDetails:function(){var e=this;return e.model.inReadyState()&&!e.model.hasDetails()?e.model.fetch({silent:!0}):r.when()},toString:function(){var e=this.model?this.model+"":"(no model)";return"DatasetDCEListItemView("+e+")"}});h.prototype.templates=function(){var e=i.wrapTemplate(['
','','
','<%- element.element_identifier %>',"
","
"],"element");return o.extend({},t.DatasetListItemView.prototype.templates,{titleBar:e})}();var u=c.extend({className:c.prototype.className+" dataset-collection-element",_swapNewRender:function(e){c.prototype._swapNewRender.call(this,e);var t=this.model.get("state")||"ok";return this.$el.addClass("state-"+t),this.$el},toString:function(){var e=this.model?this.model+"":"(no model)";return"NestedDCDCEListItemView("+e+")"}});return{DCListItemView:c,DCEListItemView:d,DatasetDCEListItemView:h,NestedDCDCEListItemView:u}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2),i(1),i(1))},function(e,t,i){var n,s;(function(o,a,r){n=[i(71),i(6),i(5)],s=function(e,t,i){"use strict";var n={defaults:{model_class:"DatasetCollectionElement",element_identifier:null,element_index:null,element_type:null},_mergeObject:function(e){return o.extend(e,e.object,{element_id:e.id}),delete e.object,e},constructor:function(e,t){e=this._mergeObject(e),this.idAttribute="element_id",a.Model.apply(this,arguments)},parse:function(e,t){var i=e;return i=this._mergeObject(i)}},s=a.Model.extend(t.LoggableMixin).extend(n).extend({_logNamespace:"collections"}),l=a.Collection.extend(t.LoggableMixin).extend({_logNamespace:"collections",model:s,toString:function(){return["DatasetCollectionElementCollection(",this.length,")"].join("")}}),c=e.DatasetAssociation.extend(t.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({},e.DatasetAssociation.prototype.defaults,n.defaults),constructor:function(e,t){this.debug("\t DatasetDCE.constructor:",e,t),n.constructor.call(this,e,t)},hasDetails:function(){return this.elements&&this.elements.length},toString:function(){var e=this.get("element_identifier");return["DatasetDCE(",e,")"].join("")}})),d=l.extend({model:c,toString:function(){return["DatasetDCECollection(",this.length,")"].join("")}}),h=a.Model.extend(t.LoggableMixin).extend(t.SearchableModelMixin).extend({_logNamespace:"collections",defaults:{collection_type:null,deleted:!1},collectionClass:l,initialize:function(e,t){this.debug(this+"(DatasetCollection).initialize:",e,t,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 e=this.get("elements")||[];return this.unset("elements",{silent:!0}),this.elements=new this.collectionClass(e),this.elements},toJSON:function(){var e=a.Model.prototype.toJSON.call(this);return this.elements&&(e.elements=this.elements.toJSON()),e},inReadyState:function(){var e=this.get("populated");return this.isDeletedOrPurged()||e},hasDetails:function(){return 0!==this.elements.length},getVisibleContents:function(e){return this.elements},parse:function(e,t){var i=a.Model.prototype.parse.call(this,e,t);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(e){return this.get("deleted")?r.when():this.save({deleted:!0},e)},undelete:function(e){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},e)},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},searchAttributes:["name"],toString:function(){var e=[this.get("id"),this.get("name")||this.get("element_identifier")];return"DatasetCollection("+e.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(t.mixin(n,{constructor:function(e,t){this.debug("\t NestedDCDCE.constructor:",e,t),n.constructor.call(this,e,t)},toString:function(){var e=this.object?""+this.object:this.get("element_identifier");return["NestedDCDCE(",e,")"].join("")}})),f=l.extend({model:g,toString:function(){return["NestedDCDCECollection(",this.length,")"].join("")}}),m=p.extend(t.mixin(n,{constructor:function(e,t){this.debug("\t NestedPairDCDCE.constructor:",e,t),n.constructor.call(this,e,t)},toString:function(){var e=this.object?""+this.object:this.get("element_identifier");return["NestedPairDCDCE(",e,")"].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(t.mixin(n,{constructor:function(e,t){this.debug("\t NestedListDCDCE.constructor:",e,t),n.constructor.call(this,e,t)},toString:function(){var e=this.object?""+this.object:this.get("element_identifier");return["NestedListDCDCE(",e,")"].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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2),i(3),i(1))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(40),i(12),i(6),i(8),i(88),i(5),i(85)],s=function(e,t,i,n,s,c){"use strict";function d(e){var t=e.toJSON(),i=f(t,{creationFn:function(t,i){return t=t.map(function(e){return{id:e.id,name:e.name,src:"dataset"===e.history_content_type?"hda":"hdca"}}),e.createHDCA(t,"list",i)}});return i}var h="collections",u=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,tagName:"li",className:"collection-element",initialize:function(e){this.element=e.element||{},this.selected=e.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(e){this.$el.toggleClass("selected",e),this.trigger("select",{source:this,selected:this.$el.hasClass("selected")})},discard:function(){var e=this,t=this.$el.parent().width();this.$el.animate({"margin-right":t},"fast",function(){e.trigger("discard",{source:e}),e.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(e){e.stopPropagation(),this.select(e)},_clickName:function(e){e.stopPropagation(),e.preventDefault();var t=([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));t&&(this.element.name=t,this.render())},_clickDiscard:function(e){e.stopPropagation(),this.discard()},_dragstart:function(e){e.originalEvent&&(e=e.originalEvent),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",JSON.stringify(this.element)),this.$el.addClass("dragging"),this.$el.parent().trigger("collection-element.dragstart",[this])},_dragend:function(e){this.$el.removeClass("dragging"),this.$el.parent().trigger("collection-element.dragend",[this])},_sendToParent:function(e){this.$el.parent().trigger(e)},toString:function(){return"DatasetCollectionElementView()"}}),p=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,elementViewClass:u,collectionClass:e.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(e){this.metric("ListCollectionCreator.initialize",e);var t=this;a.each(this.defaultAttributes,function(i,n){i=e[n]||i,t[n]=i}),t.initialElements=e.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(e){e.hasOwnProperty("id")||(e.id=a.uniqueId())}),this.workingElements},_validateElements:function(){var e=this;return e.invalidElements=[],this.workingElements=this.workingElements.filter(function(t){var i=e._isElementInvalid(t);return i&&e.invalidElements.push({element:t,text:i}),!i}),this.workingElements},_isElementInvalid:function(e){return"dataset"!==e.history_content_type?c("is not a dataset"):e.state!==t.OK?c(a.contains(t.NOT_READY_STATES,e.state)?"hasn't finished running yet":"has errored, is paused, or is not accessible"):e.deleted||e.purged?c("has been deleted or purged"):null},_mangleDuplicateNames:function(){var e=900,t=1,i={};this.workingElements.forEach(function(n){for(var s=n.name;i.hasOwnProperty(s);)if(s=n.name+" ("+t+")",t+=1,t>=e)throw new Error("Safety hit in while loop - thats impressive");n.name=s,i[n.name]=!0})},_sortElements:function(e){},render:function(e,t){return this.workingElements.length .clear-selected").show():this.$(".collection-elements-controls > .clear-selected").hide()},_renderList:function(e,t){var i=this,n=l("
"),s=i.$list();a.each(this.elementViews,function(e){e.destroy(),i.removeElementView(e)}),i.workingElements.forEach(function(e){var t=i._createElementView(e);n.append(t.$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(e){var t=new this.elementViewClass({element:e,selected:a.has(this.selectedIds,e.id)});return this.elementViews.push(t),this._listenToElementView(t),t},_listenToElementView:function(e){var t=this;t.listenTo(e,{select:function(e){var i=e.source.element;e.selected?t.selectedIds[i.id]=!0:delete t.selectedIds[i.id],t.trigger("elements:select",e)},discard:function(e){t.trigger("elements:discard",e)}})},addElementView:function(e){},removeElementView:function(e){delete this.selectedIds[e.element.id],this._renderClearSelected(),this.elementViews=a.without(this.elementViews,e),this.stopListening(e)},_renderNoElementsLeft:function(){this._disableNameAndCreate(!0),this.$(".collection-elements").append(this.templates.noElementsLeft())},_elementToJSON:function(e){return e},createList:function(e){if(!this.workingElements.length){var t=c("No valid elements for final list")+". ";return t+=''+c("Cancel")+" ",t+=c("or"),t+=' '+c("start over")+".",void this._showAlert(t)}var i=this,n=this.workingElements.map(function(e){return i._elementToJSON(e)});return i.blocking=!0,i.creationFn(n,e).always(function(){i.blocking=!1}).fail(function(e,t,n){i.trigger("error",{xhr:e,status:t,message:c("An error occurred while creating this collection")})}).done(function(e,t,n){i.trigger("collection:created",e,t,n),i.metric("collection:created",e),"function"==typeof i.oncreate&&i.oncreate.call(this,e,t,n)})},_setUpBehaviors:function(){return this.on("error",this._errorHandler),this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("elements:select",function(e){this._renderClearSelected()}),this.on("elements:discard",function(e){var t=e.source.element;this.removeElementView(e.source),this.workingElements=a.without(this.workingElements,t),this.workingElements.length||this._renderNoElementsLeft()}),this},_errorHandler:function(e){this.error(e);var t=this;if(content=e.message||c("An error occurred"),e.xhr){var i=e.xhr,n=e.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}t._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(e){"function"==typeof this.oncancel&&this.oncancel.call(this)},"click .create-collection":"_clickCreate"},_clickMoreHelp:function(e){e.stopPropagation(),this.$(".main-help").addClass("expanded"),this.$(".more-help").hide()},_clickLessHelp:function(e){e.stopPropagation(),this.$(".main-help").removeClass("expanded"),this.$(".more-help").show()},_toggleHelp:function(e){e.stopPropagation(),this.$(".main-help").toggleClass("expanded"),this.$(".more-help").toggle()},_showAlert:function(e,t){t=t||"alert-danger",this.$(".main-help").hide(),this.$(".header .alert").attr("class","alert alert-dismissable").addClass(t).show().find(".alert-message").html(e)},_hideAlert:function(e){this.$(".main-help").show(),this.$(".header .alert").hide()},reset:function(){this._instanceSetUp(),this._elementsSetUp(),this.render()},clearSelectedElements:function(e){this.$(".collection-elements .collection-element").removeClass("selected"),this.$(".collection-elements-controls > .clear-selected").hide()},_dragoverElements:function(e){e.preventDefault();var t=this.$list();this._checkForAutoscroll(t,e.originalEvent.clientY);var i=this._getNearestElement(e.originalEvent.clientY);this.$(".element-drop-placeholder").remove();var n=r('
');i.length?i.before(n):t.append(n)},_checkForAutoscroll:function(e,t){var i=2,n=e.offset(),s=e.scrollTop(),o=t-n.top,a=n.top+e.outerHeight()-t;o>=0&&o=0&&ae&&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(e,t,i){var s,o=l.Deferred(),r=Galaxy.modal||new n.View;return t=a.defaults(t||{},{elements:e,oncancel:function(){r.hide(),o.reject("cancelled")},oncreate:function(e,t){r.hide(),o.resolve(t)}}),s=new i(t),r.show({title:t.title||c("Create a collection"),body:s.$el,width:"80%",height:"100%",closing_events:!0}),s.render(),window._collectionCreator=s,o},f=function(e,t){return t=t||{},t.title=c("Create a collection from a list of datasets"),g(e,t,p)};return{DatasetCollectionElementView:u,ListCollectionCreator:p,collectionCreatorModal:g,listCollectionCreatorModal:f,createListCollection:d}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2),i(1),i(1))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(43),i(12),i(22),i(6),i(5)],s=function(e,t,i,n,s){"use strict";var c="dataset",d=e.ListItemView,h=d.extend({_logNamespace:c,className:d.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(e){e.logger&&(this.logger=this.model.logger=e.logger), -this.log(this+".initialize:",e),d.prototype.initialize.call(this,e),this.linkTarget=e.linkTarget||"_blank"},_setUpListeners:function(){d.prototype._setUpListeners.call(this);var e=this;return e.listenTo(e.model,{change:function(t,i){e.model.changedAttributes().state&&e.model.inReadyState()&&e.expanded&&!e.model.hasDetails()?e.model.fetch({silent:!0}).done(function(){e.render()}):e.render()}})},_fetchModelDetails:function(){var e=this;return e.model.inReadyState()&&!e.model.hasDetails()?e.model.fetch({silent:!0}):o.when()},remove:function(e,t){var i=this;e=e||this.fxSpeed,this.$el.fadeOut(e,function(){a.View.prototype.remove.call(i),t&&t.call(i)})},_swapNewRender:function(e){return d.prototype._swapNewRender.call(this,e),this.model.has("state")&&this.$el.addClass("state-"+this.model.get("state")),this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var e=this.model.get("state");if(e===t.NOT_VIEWABLE||e===t.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(e===t.UPLOAD)n.disabled=!0,n.title=s("This dataset must finish uploading before it can be viewed");else if(e===t.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(e){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.addDataset(o.model.get("id")),e.preventDefault())}}return n.faIcon="fa-eye",i(n)},_renderDetails:function(){if(this.model.get("state")===t.NOT_VIEWABLE)return r(this.templates.noAccess(this.model.toJSON(),this));var e=d.prototype._renderDetails.call(this);return e.find(".actions .left").empty().append(this._renderSecondaryActions()),e.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages()),e.find(".display-applications").html(this._renderDisplayApplications()),this._setUpBehaviors(e),e},_renderSummary:function(){var e=this.model.toJSON(),t=this.templates.summaries[e.state];return(t=t||this.templates.summaries.unknown)(e,this)},_renderDetailMessages:function(){var e=this,t=r('
    '),i=e.model.toJSON();return l.each(e.templates.detailMessages,function(n){t.append(r(n(i,e)))}),t},_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 t.NOT_VIEWABLE:return[];case t.OK:case t.FAILED_METADATA:case t.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",onclick:function(e){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add({title:"Dataset details",url:this.href}),e.preventDefault(),e.stopPropagation())}})},_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 e=this.model.urls;return r(['"].join("\n"))},events:l.extend(l.clone(d.prototype.events),{"click .display-btn":function(e){this.trigger("display",this,e)},"click .params-btn":function(e){this.trigger("params",this,e)},"click .download-btn":function(e){this.trigger("download",this,e)}}),toString:function(){var e=this.model?this.model+"":"(no model)";return"DatasetListItemView("+e+")"}});return h.prototype.templates=function(){var e=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[t.OK]=a[t.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[t.NEW]=n.wrapTemplate(["
    ",s("This is a new dataset and not all of its data are available yet"),"
    "],"dataset"),a[t.NOT_VIEWABLE]=n.wrapTemplate(["
    ",s("You do not have permission to view this dataset"),"
    "],"dataset"),a[t.DISCARDED]=n.wrapTemplate(["
    ",s("The job creating this dataset was cancelled before completion"),"
    "],"dataset"),a[t.QUEUED]=n.wrapTemplate(["
    ",s("This job is waiting to run"),"
    "],"dataset"),a[t.RUNNING]=n.wrapTemplate(["
    ",s("This job is currently running"),"
    "],"dataset"),a[t.UPLOAD]=n.wrapTemplate(["
    ",s("This dataset is currently uploading"),"
    "],"dataset"),a[t.SETTING_METADATA]=n.wrapTemplate(["
    ",s("Metadata is being auto-detected"),"
    "],"dataset"),a[t.PAUSED]=n.wrapTemplate(["
    ",s('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume'),"
    "],"dataset"),a[t.ERROR]=n.wrapTemplate(["<% if( !dataset.purged ){ %>","
    <%- dataset.misc_blurb %>
    ","<% } %>",'',s("An error occurred with this dataset"),":",'
    <%- dataset.misc_info %>
    '],"dataset"),a[t.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:e,details:i,noAccess:o,summaries:a,detailMessages:r,displayApplications:c})}(),{DatasetListItemView:h}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(1),i(3),i(1),i(2))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4)],s=function(e){var t=o.Model.extend({initialize:function(e){this.app=e},checksum:function(){var e="",t=this;return this.app.section.$el.find(".section-row").each(function(){var i=a(this).attr("id"),n=t.app.field_list[i];n&&(e+=i+":"+JSON.stringify(n.value&&n.value())+":"+n.collapsed+";")}),e},create:function(){function e(e,t,i){n.flat_dict[e]=t,o[e]=i,n.app.element_list[t]&&n.app.element_list[t].$el.attr("tour_id",e)}function t(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(e,t){return e-t});var a=0;for(var f in h)t(c+"_"+a++,r[u+h[f]]);break;case"conditional":var m=n.app.field_list[l.id].value();e(c+"|"+l.test_param.name,l.id,m);var v=i(l,m);v!=-1&&t(c,o[l.id+"-section-"+v]);break;case"section":t(!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),e(c,l.id,m),l.payload))for(var y in l.payload)e(y,l.id,l.payload[y])}}}}}var n=this,s={};this._iterate(this.app.section.$el,s);var o={};return this.flat_dict={},t("",s),o},match:function(e){return this.flat_dict&&this.flat_dict[e]},matchCase:function(e,t){return i(e,t)},matchModel:function(e,t){var i=this;n(e.inputs,function(e,n){i.flat_dict[n]&&t(e,i.flat_dict[n])})},matchResponse:function(e){function t(e,s){if("string"==typeof s){var o=n.flat_dict[e];o&&(i[o]=s)}else for(var a in s){var r=a;if(""!==e){var l="|";s instanceof Array&&(l="_"),r=e+l+r}t(r,s[a])}}var i={},n=this;return t("",e),i},_iterate:function(e,t){var i=this,n=a(e).children();n.each(function(){var e=this,n=a(e).attr("id");if(a(e).hasClass("section-row")){var s=i.app.input_list[n];t[n]=s&&{input:s}||{},i._iterate(e,t[n])}else i._iterate(e,t)})}}),i=function(e,t){"boolean"==e.test_param.type&&(t="true"==t?e.test_param.truevalue||"true":e.test_param.falsevalue||"false");for(var i in e.cases)if(e.cases[i].value==t)return i;return-1},n=function(e,t,s,o){o=a.extend(!0,{},o),r.each(e,function(e){e&&e.type&&e.name&&(o[e.name]=e)});for(var l in e){var c=e[l];c.name=c.name||l;var d=s?s+"|"+c.name:c.name;switch(c.type){case"repeat":r.each(c.cache,function(e,i){n(e,t,d+"_"+i,o)});break;case"conditional":if(c.test_param){t(c.test_param,d+"|"+c.test_param.name,o);var h=i(c,c.test_param.value);h!=-1?n(c.cases[h].inputs,t,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,t,d,o);break;default:t(c,d,o)}}};return{Manager:t,visitInputs:n}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2))},function(e,t,i){var n,s;(function(i,o,a){n=[],s=function(){return i.View.extend({initialize:function(e,t){this.app=e,this.app_options=e.options||{},this.field=t&&t.field||new i.View,this.model=t&&t.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(t),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,e.trigger&&e.trigger("change"),s.render()})},backdrop:function(){this.model.set("backdrop",!0)},error:function(e){this.model.set("error_text",e)},reset:function(){this.model.set("error_text",null)},render:function(){o(".tooltip").hide();var e=this.model.get("help",""),t=this.model.get("argument");t&&e.indexOf("("+t+")")==-1&&(e+=" ("+t+")"),this.$info.html(e),this.$el[this.model.get("hidden")?"hide":"show"](),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.show(),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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4),i(7),i(49),i(51),i(50),i(47)],s=function(e,t,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(e){var t=this.types[e.type],i="function"==typeof this[t]?this[t].call(this,e):null;return i||(i=e.options?this._fieldSelect(e):this._fieldText(e),Galaxy.emit.debug("form-parameters::_addRow()","Auto matched field type ("+e.type+").")),void 0===e.value&&(e.value=null),i.value(e.value),i},_fieldData:function(e){return new i.View({id:"field-"+e.id,extensions:e.extensions,optional:e.optional,multiple:e.multiple,type:e.type,flavor:e.flavor,data:e.options,onchange:e.onchange})},_fieldSelect:function(e){if(e.is_workflow)return this._fieldText(e);"data_column"==e.type&&(e.error_text="Missing columns in referenced dataset.");var i=e.data;i||(i=[],a.each(e.options,function(e){i.push({label:e[0],value:e[1]})}));var n=t.Select;switch(e.display){case"checkboxes":n=t.Checkbox;break;case"radio":n=t.Radio;break;case"radiobutton":n=t.RadioButton}return new n.View({id:"field-"+e.id,data:i,error_text:e.error_text||"No options available",multiple:e.multiple,optional:e.optional,onchange:e.onchange,searchable:"workflow"!==e.flavor})},_fieldDrilldown:function(e){return e.is_workflow?this._fieldText(e):new t.Drilldown.View({id:"field-"+e.id,data:e.options,display:e.display,optional:e.optional,onchange:e.onchange})},_fieldText:function(i){if(i.options&&i.data)if(i.area=i.multiple,e.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 t.Input({id:"field-"+i.id,area:i.area,placeholder:i.placeholder,onchange:i.onchange})},_fieldSlider:function(e){return new t.Slider.View({id:"field-"+e.id,precise:"float"==e.type,is_workflow:e.is_workflow,min:e.min,max:e.max,onchange:e.onchange})},_fieldHidden:function(e){return new t.Hidden({id:"field-"+e.id,info:e.info})},_fieldBoolean:function(e){return new t.RadioButton.View({id:"field-"+e.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:e.onchange})},_fieldColor:function(e){return new l({id:"field-"+e.id,onchange:e.onchange})},_fieldLibrary:function(e){return new n.View({id:"field-"+e.id,optional:e.optional,multiple:e.multiple,onchange:e.onchange})},_fieldFtp:function(e){return new s.View({id:"field-"+e.id,optional:e.optional,multiple:e.multiple,onchange:e.onchange})}})}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2),i(1))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4),i(9),i(7)],s=function(e,t,i){var n=o.View.extend({initialize:function(t){this.list={},this.options=e.merge(t,{title:"Repeat",empty_text:"Not available.",max:null,min:null}),this.button_new=new i.ButtonIcon({icon:"fa-plus",title:"Insert "+this.options.title,tooltip:"Add new "+this.options.title+" block",floating:"clear",cls:"ui-button-icon form-repeat-add",onclick:function(){t.onnew&&t.onnew()}}),this.setElement(a("
    ").append(this.$list=a("
    ")).append(a("
    ").append(this.button_new.$el)))},size:function(){return r.size(this.list)},add:function(e){if(!e.id||this.list[e.id])return void Galaxy.emit.debug("form-repeat::add()","Duplicate or invalid repeat block id.");var n=new i.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain form-repeat-delete",onclick:function(){e.ondel&&e.ondel()}}),s=new t.View({id:e.id,title:"placeholder",cls:e.cls||"ui-portlet-repeat",operations:{button_delete:n}});s.append(e.$el),s.$el.addClass("section-row").hide(),this.list[e.id]=s,this.$list.append(s.$el.fadeIn("fast")),this.options.max>0&&this.size()>=this.options.max&&this.button_new.disable(),this._refresh()},del:function(e){return this.list[e]?(this.$list.find("#"+e).remove(),delete this.list[e],this.button_new.enable(),void this._refresh()):void Galaxy.emit.debug("form-repeat::del()","Invalid repeat block id.")},delAll:function(){for(var e in this.list)this.del(e)},hideOptions:function(){this.button_new.$el.hide(),r.each(this.list,function(e){e.hideOperation("button_delete")}),r.isEmpty(this.list)&&this.$el.append(a("
    ").addClass("ui-form-info").html(this.options.empty_text))},_refresh:function(){var e=0;for(var t in this.list){var i=this.list[t];i.title(++e+": "+this.options.title),i[this.size()>this.options.min?"showOperation":"hideOperation"]("button_delete")}}});return{View:n}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(4),i(7),i(9),i(37),i(35),i(36)],s=function(e,t,i,n,s,c){var d=o.View.extend({initialize:function(e,t){this.app=e,this.inputs=t.inputs,this.parameters=new c,this.setElement(a("
    ")),this.render()},render:function(){var e=this;this.$el.empty(),r.each(this.inputs,function(t){e.add(t)})},add:function(t){var i=l.extend(!0,{},t);switch(i.id=t.id=e.uid(),this.app.input_list[i.id]=i,i.type){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(e){var t=this;e.test_param.id=e.id,this.app.options.sustain_conditionals&&(e.test_param.disabled=!0);var i=this._addRow(e.test_param);i.model&&i.model.set("onchange",function(i){var n=t.app.data.matchCase(e,i);for(var s in e.cases){var o=e.cases[s],a=t.$("#"+e.id+"-section-"+s),r=!1;for(var l in o.inputs)if(!o.inputs[l].hidden){r=!0;break}s==n&&r?a.fadeIn("fast"):a.hide()}t.app.trigger("change")});for(var n in e.cases){var s=new d(this.app,{inputs:e.cases[n].inputs});this._append(s.$el.addClass("ui-form-section"),e.id+"-section-"+n)}i.trigger("change")},_addRepeat:function(e){function t(t){var n=e.id+"-section-"+o++,s=new d(i.app,{inputs:t});a.add({id:n,$el:s.$el,ondel:function(){a.del(n),i.app.trigger("change")}})}for(var i=this,o=0,a=new n.View({title:e.title||"Repeat",min:e.min,max:e.max,onnew:function(){t(e.inputs),i.app.trigger("change")}}),l=r.size(e.cache),c=0;c").addClass("ui-form-info").html(e.help)),this.app.on("expand",function(e){t.$("#"+e).length>0&&t.expand()}),this._append(t.$el,e.id)},_addRow:function(e){var t=this,i=e.id;e.onchange=function(){t.app.trigger("change",i)};var n=this.parameters.create(e);this.app.field_list[i]=n;var o=new s(this.app,{name:e.name,label:e.label||e.name,value:e.value,text_value:e.text_value,collapsible_value:e.collapsible_value,collapsible_preview:e.collapsible_preview,help:e.help,argument:e.argument,disabled:e.disabled,color:e.color,style:e.style,backdrop:e.backdrop,hidden:e.hidden,field:n});return this.app.element_list[i]=o,this._append(o.$el,e.id),n},_append:function(e,t){this.$el.append(e.addClass("section-row").attr("id",t))}});return{View:d}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2),i(1))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4),i(9),i(7),i(38),i(34)],s=function(e,t,i,n,s){return o.View.extend({initialize:function(t){this.options=e.merge(t,{initial_errors:!1,cls:"ui-portlet-limited",icon:null,always_refresh:!0}),this.setElement("
    "),this.render()},update:function(e){var t=this;this.data.matchModel(e,function(e,i){var n=t.input_list[i];if(n&&n.options&&!a.isEqual(n.options,e.options)){n.options=e.options;var s=t.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 e.options){var l=e.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(e){for(var t in this.input_list){var i=this.field_list[t],n=this.input_list[t];n.is_dynamic&&i.wait&&i.unwait&&i[e?"wait":"unwait"]()}},highlight:function(e,t,i){var n=this.element_list[e];if(n&&(n.error(t||"Please verify this parameter."),this.portlet.expand(),this.trigger("expand",e),!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(e){if(this.trigger("reset"),e&&e.errors){var t=this.data.matchResponse(e.errors);for(var i in this.element_list){this.element_list[i];t[i]&&this.highlight(i,t[i],!0)}}},render:function(){var e=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 t=this.data.checksum();return this.on("change",function(i){var n=e.input_list[i];if(!n||n.refresh_on_change||e.options.always_refresh){var s=e.data.checksum();s!=t&&(t=s,e.options.onchange&&e.options.onchange())}}),this.on("reset",function(){a.each(e.element_list,function(e){e.reset()})}),this},_renderForm:function(){r(".tooltip").remove(),this.message=new i.Message,this.section=new n.View(this,{inputs:this.options.inputs}),this.portlet=new t.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.options.inputs&&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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2),i(1))},function(e,t,i){var n,s;(function(o){n=[i(31),i(75),i(5)],s=function(e,t,i){"use strict";function n(e){return function(t,i){return this.isNew()&&(i=i||{},i.url=this.urlRoot+this.get("history_id")+"/contents",t=t||{},t.type="dataset_collection"),e.call(this,t,i)}}var s=t.HistoryContentMixin,a=e.ListDatasetCollection,r=e.PairDatasetCollection,l=e.ListPairedDatasetCollection,c=e.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"}),save:n(c.prototype.save),toString:function(){return["HistoryListOfListsDatasetCollection(",this.get("name"),")"].join("")}});return{HistoryListDatasetCollection:d,HistoryPairDatasetCollection:h,HistoryListPairedDatasetCollection:u,HistoryListOfListsDatasetCollection:p}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2))},function(e,t,i){var n,s;(function(o,a,r){n=[i(68),i(73),i(40),i(42),i(6),i(130)],s=function(e,t,i,n,s,l){"use strict";var c=e.PaginatedCollection,d=c.extend(s.LoggableMixin).extend({_logNamespace:"history",model:function(e,n){if("dataset"===e.history_content_type)return new t.HistoryDatasetAssociation(e,n);if("dataset_collection"===e.history_content_type){switch(e.collection_type){case"list":return new i.HistoryListDatasetCollection(e,n);case"paired":return new i.HistoryPairDatasetCollection(e,n);case"list:paired":return new i.HistoryListPairedDatasetCollection(e,n);case"list:list":return new i.HistoryListOfListsDatasetCollection(e,n)}var s="Unknown collection_type: "+e.collection_type;return console.warn(s,e),{validationError:s}}return{validationError:"Unknown history_content_type: "+e.history_content_type}},limitPerPage:500,limitPerProgressiveFetch:500,order:"hid",urlRoot:Galaxy.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(e,t){t=t||{},c.prototype.initialize.call(this,e,t),this.history=t.history||null,this.setHistoryId(t.historyId||null),this.includeDeleted=t.includeDeleted||this.includeDeleted,this.includeHidden=t.includeHidden||this.includeHidden,this.model.prototype.idAttribute="type_id"},setHistoryId:function(e){this.historyId=e,this._setUpWebStorage()},_setUpWebStorage:function(e){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(e){this.storage.includeDeleted(e)},"include-hidden":function(e){this.storage.includeHidden(e)}}),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(e){return!e.inReadyState()})},runningAndActive:function(){return this.filter(function(e){return!e.inReadyState()&&e.get("visible")&&!e.get("deleted")})},getByHid:function(e){return this.findWhere({hid:e})},haveDetails:function(){return this.all(function(e){return e.hasDetails()})},hidden:function(){return this.filter(function(e){return e.hidden()})},deleted:function(){return this.filter(function(e){return e.get("deleted")})},visibleAndUndeleted:function(){return this.filter(function(e){return e.get("visible")&&!e.get("deleted")})},setIncludeDeleted:function(e,t){if(o.isBoolean(e)&&e!==this.includeDeleted){if(this.includeDeleted=e,o.result(t,"silent"))return;this.trigger("include-deleted",e,this)}},setIncludeHidden:function(e,t){if(o.isBoolean(e)&&e!==this.includeHidden){if(this.includeHidden=e,t=t||{},o.result(t,"silent"))return;this.trigger("include-hidden",e,this)}},fetch:function(e){if(e=e||{},this.historyId&&!e.details){var t=n.HistoryPrefs.get(this.historyId).toJSON();o.isEmpty(t.expandedIds)||(e.details=o.values(t.expandedIds).join(","))}return c.prototype.fetch.call(this,e)},_buildFetchData:function(e){return o.extend(c.prototype._buildFetchData.call(this,e),{v:"dev"})},_fetchParams:c.prototype._fetchParams.concat(["v","details"]),_buildFetchFilters:function(e){var t=c.prototype._buildFetchFilters.call(this,e)||{},i={};return this.includeDeleted||(i.deleted=!1,i.purged=!1),this.includeHidden||(i.visible=!0),o.defaults(t,i)},getTotalItemCount:function(){return this.history.contentsShown()},fetchUpdated:function(e,t){return e&&(t=t||{filters:{}},t.remove=!1,t.filters={"update_time-ge":e.toISOString(),visible:""}),this.fetch(t)},fetchDeleted:function(e){e=e||{};var t=this;return e.filters=o.extend(e.filters,{deleted:!0,purged:void 0}),e.remove=!1,t.trigger("fetching-deleted",t),t.fetch(e).always(function(){t.trigger("fetching-deleted-done",t)})},fetchHidden:function(e){e=e||{};var t=this;return e.filters=o.extend(e.filters,{visible:!1}),e.remove=!1,t.trigger("fetching-hidden",t),t.fetch(e).always(function(){t.trigger("fetching-hidden-done",t)})},fetchAllDetails:function(e){e=e||{};var t={details:"all"};return e.data=o.extend(e.data||{},t),this.fetch(e)},fetchCollectionCounts:function(e){return e=e||{},e.keys=["type_id","element_count"].join(","),e.filters=o.extend(e.filters||{},{history_content_type:"dataset_collection"}),e.remove=!1,this.fetch(e)},_filterAndUpdate:function(e,t){var i=this,n=i.model.prototype.idAttribute,s=[t];return i.fetch({filters:e,remove:!1}).then(function(e){return e=e.reduce(function(e,t,s){var o=i.get(t[n]);return o?e.concat(o):e},[]),i.ajaxQueue("save",s,e)})},ajaxQueue:function(e,t,i){ -return i=i||this.models,new l.AjaxQueue(i.slice().reverse().map(function(i,n){var s=o.isString(e)?i[e]:e;return function(){return s.apply(i,t)}})).deferred},progressivelyFetchDetails:function(e){function i(t){t=t||0;var a=o.extend(o.clone(e),{view:"summary",keys:c,limit:r,offset:t,reset:0===t,remove:!1});o.defer(function(){s.fetch.call(s,a).fail(n.reject).done(function(e){n.notify(e,r,t),e.length!==r?(s.allFetched=!0,n.resolve(e,r,t)):i(t+r)})})}e=e||{};var n=a.Deferred(),s=this,r=e.limitPerCall||s.limitPerProgressiveFetch,l=t.HistoryDatasetAssociation.prototype.searchAttributes,c=l.join(",");return i(),n},isCopyable:function(e){var t=["HistoryDatasetAssociation","HistoryDatasetCollectionAssociation"];return o.isObject(e)&&e.id&&o.contains(t,e.model_class)},copy:function(e){var t,i,n;o.isString(e)?(t=e,n="hda",i="dataset"):(t=e.id,n={HistoryDatasetAssociation:"hda",LibraryDatasetDatasetAssociation:"ldda",HistoryDatasetCollectionAssociation:"hdca"}[e.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:t,source:n,type:i})}).done(function(e){s.add([e],{parse:!0})}).fail(function(e,o,a){s.trigger("error",s,r,{},"Error copying contents",{type:i,id:t,source:n})});return r},createHDCA:function(e,t,i,n){var s=this.model({history_content_type:"dataset_collection",collection_type:t,history_id:this.historyId,name:i,element_identifiers:e});return s.save(n)},haveSearchDetails:function(){return this.allFetched&&this.all(function(e){return o.has(e.attributes,"annotation")})},matches:function(e){return this.filter(function(t){return t.matches(e)})},clone:function(){var e=r.Collection.prototype.clone.call(this);return e.historyId=this.historyId,e},toString:function(){return["HistoryContents(",[this.historyId,this.length].join(),")"].join("")}});return{HistoryContents:d}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2),i(1),i(3))},function(e,t,i){var n,s;(function(o){n=[i(6)],s=function(e){"use strict";var t=e.SessionStorageModel.extend({defaults:{expandedIds:{},show_deleted:!1,show_hidden:!1},addExpanded:function(e){var t=this.get("expandedIds");t[e.id]=e.get("id"),this.save("expandedIds",t)},removeExpanded:function(e){var t=this.get("expandedIds");delete t[e.id],this.save("expandedIds",t)},isExpanded:function(e){return o.result(this.get("expandedIds"),e,!1)},allExpanded:function(){return o.values(this.get("expandedIds"))},clearExpanded:function(){this.set("expandedIds",{})},includeDeleted:function(e){return o.isUndefined(e)||this.set("show_deleted",e),this.get("show_deleted")},includeHidden:function(e){return o.isUndefined(e)||this.set("show_hidden",e),this.get("show_hidden")},toString:function(){return"HistoryPrefs("+this.id+")"}},{storageKeyPrefix:"history:",historyStorageKey:function(e){if(!e)throw new Error("HistoryPrefs.historyStorageKey needs valid id: "+e);return t.storageKeyPrefix+e},get:function(e){return new t({id:t.historyStorageKey(e)})},clearAll:function(e){for(var i in sessionStorage)0===i.indexOf(t.storageKeyPrefix)&&sessionStorage.removeItem(i)}});return{HistoryPrefs:t}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(6),i(5)],s=function(e,t){"use strict";var i="list",n=o.View.extend(e.LoggableMixin).extend({_logNamespace:i,initialize:function(e){this.expanded=e.expanded||!1,this.log("\t expanded:",this.expanded),this.fxSpeed=void 0!==e.fxSpeed?e.fxSpeed:this.fxSpeed},fxSpeed:"fast",render:function(e){var t=this._buildNewRender();return this._setUpBehaviors(t),this._queueNewRender(t,e),this},_buildNewRender:function(){var e=a(this.templates.el(this.model.toJSON(),this));return this.expanded&&this.$details(e).replaceWith(this._renderDetails().show()),e},_queueNewRender:function(e,t){t=void 0===t?this.fxSpeed:t;var i=this;0===t?(i._swapNewRender(e),i.trigger("rendered",i)):a(i).queue("fx",[function(e){i.$el.fadeOut(t,e)},function(t){i._swapNewRender(e),t()},function(e){i.$el.fadeIn(t,e)},function(e){i.trigger("rendered",i),e()}])},_swapNewRender:function(e){return this.$el.empty().attr("class",r.isFunction(this.className)?this.className():this.className).append(e.children())},_setUpBehaviors:function(e){e=e||this.$el,e.find("[title]").tooltip({placement:"bottom"})},$details:function(e){return e=e||this.$el,e.find("> .details")},_renderDetails:function(){var e=a(this.templates.details(this.model.toJSON(),this));return this._setUpBehaviors(e),e},toggleExpanded:function(e){return e=void 0===e?!this.expanded:e,e?this.expand():this.collapse(),this},expand:function(){var e=this;return e._fetchModelDetails().always(function(){e._expand()})},_fetchModelDetails:function(){return this.model.hasDetails()?l.when():this.model.fetch()},_expand:function(){var e=this,t=e._renderDetails();e.$details().replaceWith(t),e.expanded=!0,e.$details().slideDown(e.fxSpeed,function(){e.trigger("expanded",e)})},collapse:function(){this.debug(this+"(ExpandableView).collapse");var e=this;e.expanded=!1,this.$details().slideUp(e.fxSpeed,function(){e.trigger("collapsed",e)})}}),s=n.extend(e.mixin(e.SelectableViewMixin,e.DraggableViewMixin,{tagName:"div",className:"list-item",initialize:function(t){n.prototype.initialize.call(this,t),e.SelectableViewMixin.initialize.call(this,t),e.DraggableViewMixin.initialize.call(this,t),this._setUpListeners()},_setUpListeners:function(){return this.on("selectable",function(e){e?this.$(".primary-actions").hide():this.$(".primary-actions").show()},this),this},_buildNewRender:function(){var e=n.prototype._buildNewRender.call(this);return e.children(".warnings").replaceWith(this._renderWarnings()),e.children(".title-bar").replaceWith(this._renderTitleBar()),e.children(".primary-actions").append(this._renderPrimaryActions()),e.find("> .title-bar .subtitle").replaceWith(this._renderSubtitle()),e},_swapNewRender:function(e){return n.prototype._swapNewRender.call(this,e),this.selectable&&this.showSelector(0),this.draggable&&this.draggableOn(),this.$el},_renderWarnings:function(){var e=this,t=a('
    '),i=e.model.toJSON();return r.each(e.templates.warnings,function(n){t.append(a(n(i,e)))}),t},_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(e){e.stopPropagation(),e.altKey?(this.toggleSelect(e),this.selectable||this.showSelector()):this.toggleExpanded()},_keyDownTitleBar:function(e){var t=32,i=13;return!e||"keydown"!==e.type||e.keyCode!==t&&e.keyCode!==i||(this.toggleExpanded(),e.stopPropagation(),!1)},toString:function(){var e=this.model?this.model+"":"(no model)";return"ListItemView("+e+")"}}));s.prototype.templates=function(){var t=e.wrapTemplate(['
    ','
    ','
    ','',"
    ",'
    ','
    ','
    ',"
    "]),i={},n=e.wrapTemplate(['
    ','','
    ','<%- element.name %>',"
    ",'
    ',"
    "],"element"),s=e.wrapTemplate(['
    ']),o=e.wrapTemplate(['
    ']);return{el:t,warnings:i,titleBar:n,subtitle:s,details:o}}();var c=s.extend({foldoutStyle:"foldout",foldoutPanelClass:null,initialize:function(e){"drilldown"===this.foldoutStyle&&(this.expanded=!1),this.foldoutStyle=e.foldoutStyle||this.foldoutStyle,this.foldoutPanelClass=e.foldoutPanelClass||this.foldoutPanelClass,s.prototype.initialize.call(this,e),this.foldout=this._createFoldoutPanel()},_renderDetails:function(){if("drilldown"===this.foldoutStyle)return a();var e=s.prototype._renderDetails.call(this);return this._attachFoldout(this.foldout,e)},_createFoldoutPanel:function(){var e=this.model,t=this._getFoldoutPanelClass(e),i=this._getFoldoutPanelOptions(e),n=new t(r.extend(i,{model:e}));return n},_getFoldoutPanelClass:function(){return this.foldoutPanelClass},_getFoldoutPanelOptions:function(){return{foldoutStyle:this.foldoutStyle,fxSpeed:this.fxSpeed}},_attachFoldout:function(e,t){return t=t||this.$("> .details"),this.foldout=e.render(0),e.$("> .controls").hide(),t.append(e.$el)},expand:function(){var e=this;return e._fetchModelDetails().always(function(){"foldout"===e.foldoutStyle?e._expand():"drilldown"===e.foldoutStyle&&e._expandByDrilldown()})},_expandByDrilldown:function(){var e=this;e.listenTo(e.foldout,"close",function(){e.trigger("collapsed:drilldown",e,e.foldout)}),e.trigger("expanded:drilldown",e,e.foldout)}});return c.prototype.templates=function(){var t=e.wrapTemplate(['
    ',"
    "],"collection");return r.extend({},s.prototype.templates,{details:t})}(),{ExpandableView:n,ListItemView:s,FoldoutListItemView:c}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2),i(1))},function(e,t,i){var n,s;(function(o,a){n=[i(4),i(56),i(7),i(39),i(17),i(29)],s=function(e,t,i,n,s,r){return n.extend({initialize:function(e){var i=this;n.prototype.initialize.call(this,e),this.deferred=new t,e.inputs?this._buildForm(e):this.deferred.execute(function(t){i._buildModel(t,e,!0)}),e.listen_to_history&&parent.Galaxy&&parent.Galaxy.currHistoryPanel&&this.listenTo(parent.Galaxy.currHistoryPanel.collection,"change",function(){this.refresh()}),this.$el.on("remove",function(){i.remove()})},refresh:function(){var e=this;e.deferred.reset(),this.deferred.execute(function(t){e._updateModel(t)})},remove:function(){var e=this;this.$el.hide(),this.deferred.execute(function(){n.prototype.remove.call(e),Galaxy.emit.debug("tool-form-base::remove()","Destroy view.")})},_buildForm:function(t){var i=this;this.options=e.merge(t,this.options),this.options=e.merge({icon:t.icon,title:""+t.name+" "+t.description+" (Galaxy Version "+t.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(t,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))),e.get({url:r,data:l,success:function(e){return e=e.tool_model||e,e.display?(a._buildForm(e),!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.",e),void t.resolve()):void(window.location=Galaxy.root)},error:function(e,n){var s=e&&e.err_msg||"Uncaught error.";401==n?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.",e),t.reject()}})},_updateModel:function(t){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),e.request({type:"POST",url:n,data:s,success:function(e){i.update(e.tool_model||e),i.options.update&&i.options.update(e),i.wait(!1),Galaxy.emit.debug("tool-form-base::_updateModel()","Received new model.",e),t.resolve()},error:function(e){Galaxy.emit.debug("tool-form-base::_updateModel()","Refresh request failed.",e),t.reject()}})},_operations:function(){var e=this,t=this.options,n=new i.ButtonMenu({icon:"fa-cubes",title:!t.narrow&&"Versions"||null,tooltip:"Select another tool version"});if(!t.sustain_version&&t.versions&&t.versions.length>1)for(var s in t.versions){var a=t.versions[s];a!=t.version&&n.addMenu({title:"Switch to "+a,version:a,icon:"fa-cube",onclick:function(){var i=t.id.replace(t.version,this.version),n=this.version;e.deferred.reset(),e.deferred.execute(function(t){e._buildModel(t,{id:i,version:n})})}})}else n.$el.hide();var r=new i.ButtonMenu({icon:"fa-caret-down",title:!t.narrow&&"Options"||null,tooltip:"View available options"});return t.biostar_url&&(r.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(t.biostar_url+"/p/new/post/")}}),r.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(t.biostar_url+"/local/search/page/?q="+t.name)}})),r.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="+t.id)}}),Galaxy.user&&Galaxy.user.get("is_admin")&&r.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=Galaxy.root+"api/tools/"+t.id+"/download"}}),Galaxy.user&&Galaxy.user.get("is_admin")&&r.addMenu({icon:"fa-refresh",title:"Reload Tool XML",tooltip:"Reload tool XML file",onclick:function(){var e=new i.Modal.View;o.ajax({url:"/api/tools/"+t.id+"/reload",type:"GET"}).done(function(t){e.show({title:t.done?"Tool XML Reload":"Tool XML Reload Error",body:t.done?t.done:t.error,buttons:{Close:function(){e.hide()}}}),window.setTimeout(function(){e.hide()},2e3)}).fail(function(i){e.show({title:"Tool XML Reload AJAX Error",body:t.id+" "+i,buttons:{Close:function(){e.hide()}}})})}}),t.requirements&&t.requirements.length>0&&r.addMenu({icon:"fa-info-circle",title:"Requirements",tooltip:"Display tool requirements",onclick:function(){!this.requirements_visible||e.portlet.collapsed?(this.requirements_visible=!0,e.portlet.expand(),e.message.update({persistent:!0,message:e._templateRequirements(t),status:"info"})):(this.requirements_visible=!1,e.message.update({message:""}))}}),t.sharable_url&&r.addMenu({icon:"fa-external-link",title:"See in Tool Shed",tooltip:"Access the repository",onclick:function(){window.open(t.sharable_url)}}),{menu:r,versions:n}},_footer:function(){var e=this.options,t=o("
    ").append(this._templateHelp(e));if(e.citations){var i=o("
    "),n=new s.ToolCitationCollection;n.tool_id=e.id;var a=new r.CitationListView({el:i,collection:n});a.render(),n.fetch(),t.append(i)}return t},_templateHelp:function(e){var t=o("
    ").addClass("ui-form-help").append(e.help);return t.find("a").attr("target","_blank"),t},_templateRequirements:function(e){var t=e.requirements.length;if(t>0){var i="This tool requires ";a.each(e.requirements,function(e,n){i+=e.name+(e.version?" (Version "+e.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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(1),i(2))},function(e,t,i){var n,s;(function(o,a){n=[i(2),i(16),i(11),i(18)],s=function(e,t,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(e){this.attributes.html=unescape(this.attributes.html)},copy:function(){return new r(this.toJSON())},set_value:function(e){this.set("value",e||"")}}),l=o.Collection.extend({model:r}),c=r.extend({}),d=r.extend({set_value:function(e){this.set("value",parseInt(e,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(e){this.set("value",parseFloat(e))}}),u=r.extend({get_samples:function(){return e.map(this.get("options"),function(e){return e[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(t){this.set("inputs",new l(e.map(t.inputs,function(e){var t=r.subModelTypes[e.type]||r;return new t(e)})))},toJSON:function(){var e=o.Model.prototype.toJSON.call(this);return e.inputs=this.get("inputs").map(function(e){return e.toJSON()}),e},remove_inputs:function(e){var t=this,i=t.get("inputs").filter(function(t){return e.indexOf(t.get("type"))!==-1});t.get("inputs").remove(i)},copy:function(e){var t=new p(this.toJSON());if(e){var i=new o.Collection;t.get("inputs").each(function(e){e.get_samples()&&i.push(e)}),t.set("inputs",i)}return t},apply_search_results:function(t){return e.indexOf(t,this.attributes.id)!==-1?this.show():this.hide(),this.is_visible()},set_input_value:function(e,t){this.get("inputs").find(function(t){return t.get("name")===e}).set("value",t)},set_input_values:function(t){var i=this;e.each(e.keys(t),function(e){i.set_input_value(e,t[e])})},run:function(){return this._run()},rerun:function(e,t){return this._run({action:"rerun",target_dataset_id:e.id,regions:t})},get_inputs_dict:function(){var e={};return this.get("inputs").each(function(t){e[t.get("name")]=t.get("value")}),e},_run:function(n){var s=e.extend({tool_id:this.id,inputs:this.get_inputs_dict()},n),o=a.Deferred(),r=new t.ServerStateDeferred({ajax_settings:{url:this.urlRoot,data:JSON.stringify(s),dataType:"json",contentType:"application/json",type:"POST"},interval:2e3,success_fn:function(e){return"pending"!==e}});return a.when(r.go()).then(function(e){o.resolve(new i.DatasetCollection(e))}),o}});e.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(){e.each(this.attributes.elems,function(e){e.show()}),this.show(),this.set("open",!1)},apply_search_results:function(t){var i,n=!0;e.each(this.attributes.elems,function(e){e instanceof f?(i=e,i.hide()):e instanceof p&&e.apply_search_results(t)&&(n=!1,i&&i.show())}),n?this.hide():(this.show(),this.set("open",!0))}});e.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 e=this.attributes.query;if(e.length");e.append(S.tool_link(this.model.toJSON()));var t=this.model.get("form_style",null);if("upload1"===this.model.id)e.find("a").on("click",function(e){e.preventDefault(),Galaxy.upload.show()});else if("regular"===t){var i=this;e.find("a").on("click",function(e){e.preventDefault();var t=new n.View({id:i.model.id,version:i.model.get("version")});t.deferred.execute(function(){Galaxy.app.display(t)})})}return this.$el.append(e),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 t=this.$el.find(".toolSectionBody");return e.each(this.model.attributes.elems,function(e){if(e instanceof p){var i=new w({model:e,className:"toolTitle"});i.render(),t.append(i.$el)}else if(e instanceof f){var n=new b({model:e});n.render(),t.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(),a("#messagebox").is(":visible")&&this.$el.css("top","95px"),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(e){return this.model.attributes.clear_key&&this.model.attributes.clear_key===e.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 e=this,t=new C({model:this.model.get("tool_search")});return t.render(),e.$el.append(t.$el),this.model.get("layout").each(function(t){if(t instanceof m){var i=new x({model:t});i.render(),e.$el.append(i.$el)}else if(t instanceof p){var n=new w({model:t,className:"toolTitleNoSection"});n.render(),e.$el.append(n.$el)}else if(t instanceof f){var s=new b({model:t});s.render(),e.$el.append(s.$el)}}),e.$el.find("a.tool-link").click(function(t){var i=a(this).attr("class").split(/\s+/)[0],n=e.model.get("tools").get(i);e.trigger("tool_link_click",t,n)}),this},handle_search_results:function(){var e=this.model.get("tool_search").get("results");e&&0===e.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 e=this;this.tool_panel_view.on("tool_link_click",function(t,i){t.preventDefault(),e.show_tool(i)})},show_tool:function(e){var t=this;e.fetch().done(function(){t.tool_form_view.model=e,t.tool_form_view.render(),t.tool_form_view.$el.show(),a("#left").width("650px")})}}),{tool_search:e.template(['',' ',''].join("")),panel_section:e.template(['",'
    '+e.content+"
    "}});return{View:t}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1))},function(e,t,i){var n,s;(function(i){n=[],s=function(){var e=i.Model.extend({defaults:{extension:"auto",genome:"?",url_paste:"",status:"init",info:null,file_name:"",file_mode:"",file_size:0,file_type:null,file_path:"",file_data:null,percentage:0,space_to_tab:!1,to_posix_lines:!0,enabled:!0},reset:function(e){this.clear().set(this.defaults).set(e)}}),t=i.Collection.extend({model:e});return{Model:e,Collection:t}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3))},,function(e,t,i){var n,s;(function(o,a){n=[i(4)],s=function(e){return o.Model.extend({initialize:function(){this.active={},this.last=null},execute:function(t){var i=this,n=e.uid(),s=t.length>0;this.active[n]=!0;var o=a.Deferred();o.promise().always(function(){delete i.active[n],s&&Galaxy.emit.debug("deferred::execute()",this.state().charAt(0).toUpperCase()+this.state().slice(1)+" "+n)}),a.when(this.last).always(function(){i.active[n]?(s&&Galaxy.emit.debug("deferred::execute()","Running "+n),t(o),!s&&o.resolve()):o.reject()}),this.last=o.promise()},reset:function(){Galaxy.emit.debug("deferred::execute()","Reset");for(var e in this.active)this.active[e]=!1},ready:function(){return a.isEmptyObject(this.active)}})}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1))},,,,,,,,,,,function(e,t,i){var n,s;(function(o,a){n=[i(6),i(5),i(15)],s=function(e,t){var i=o.View.extend(e.LoggableMixin).extend(e.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"annotation-display",initialize:function(e){e=e||{},this.tooltipConfig=e.tooltipConfig||{placement:"bottom"},this.listenTo(this.model,"change:annotation",function(){this.render()}),this.hiddenUntilActivated(e.$activator,e)},render:function(){var e=this;return this.$el.html(this._template()),this.$annotation().make_text_editable({use_textarea:!0,on_finish:function(t){e.$annotation().text(t),e.model.save({annotation:t},{silent:!0}).fail(function(){e.$annotation().text(e.model.previous("annotation"))})}}),this},_template:function(){var e=this.model.get("annotation");return['",'
    ',a.escape(e),"
    "].join("")},$annotation:function(){return this.$el.find(".annotation")},remove:function(){this.$annotation.off(),this.stopListening(this.model),o.View.prototype.remove.call(this)},toString:function(){return["AnnotationEditor(",this.model+"",")"].join("")}});return{AnnotationEditor:i}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2))},function(e,t,i){var n,s;(function(o){n=[i(2),i(3),i(6)],s=function(e,t,i){"use strict";var n=t.Collection.extend({initialize:function(e,i){t.Collection.prototype.initialize.call(this,e,i),this.setOrder(i.order||this.order,{silent:!0})},_setUpListeners:function(){return this.on({"changed-order":this.sort})},fetch:function(e){return e=this._buildFetchOptions(e),t.Collection.prototype.fetch.call(this,e)},_buildFetchOptions:function(t){t=e.clone(t)||{};var i=this;t.traditional=!0,t.data=t.data||i._buildFetchData(t);var n=this._buildFetchFilters(t);return e.isEmpty(n)||e.extend(t.data,this._fetchFiltersToAjaxData(n)),t},_buildFetchData:function(t){var i={};return this.order&&(i.order=this.order),e.defaults(e.pick(t,this._fetchParams),i)},_fetchParams:["order","limit","offset","view","keys"],_buildFetchFilters:function(t){return e.clone(t.filters||{})},_fetchFiltersToAjaxData:function(t){var i={q:[],qv:[]};return e.each(t,function(e,t){void 0!==e&&""!==e&&(e===!0&&(e="True"),e===!1&&(e="False"),null===e&&(e="None"),i.q.push(t),i.qv.push(e))}),i},reset:function(e,i){return this.allFetched=!1,t.Collection.prototype.reset.call(this,e,i)},order:null,comparators:{update_time:i.buildComparator("update_time",{ascending:!1}),"update_time-asc":i.buildComparator("update_time",{ascending:!0}),create_time:i.buildComparator("create_time",{ascending:!1}),"create_time-asc":i.buildComparator("create_time",{ascending:!0})},setOrder:function(t,i){i=i||{};var n=this,s=n.comparators[t];if(e.isUndefined(s))throw new Error("unknown order: "+t);if(s!==n.comparator){n.order;return n.order=t,n.comparator=s,i.silent||n.trigger("changed-order",i),n}}}),s=n.extend({limitPerPage:500,initialize:function(e,t){n.prototype.initialize.call(this,e,t),this.currentPage=t.currentPage||0},getTotalItemCount:function(){return this.length},shouldPaginate:function(){return this.getTotalItemCount()>=this.limitPerPage},getLastPage:function(){return Math.floor(this.getTotalItemCount()/this.limitPerPage)},getPageCount:function(){return this.getLastPage()+1},getPageLimitOffset:function(e){return e=this.constrainPageNum(e),{limit:this.limitPerPage,offset:e*this.limitPerPage}},constrainPageNum:function(e){return Math.max(0,Math.min(e,this.getLastPage()))},fetchPage:function(t,i){var n=this;return t=n.constrainPageNum(t),n.currentPage=t,i=e.defaults(i||{},n.getPageLimitOffset(t)),n.trigger("fetching-more"),n.fetch(i).always(function(){n.trigger("fetching-more-done")})},fetchCurrentPage:function(e){return this.fetchPage(this.currentPage,e)},fetchPrevPage:function(e){return this.fetchPage(this.currentPage-1,e)},fetchNextPage:function(e){return this.fetchPage(this.currentPage+1,e)}}),a=n.extend({limitOnFirstFetch:null,limitPerFetch:100,initialize:function(e,t){n.prototype.initialize.call(this,e,t),this.limitOnFirstFetch=t.limitOnFirstFetch||this.limitOnFirstFetch,this.limitPerFetch=t.limitPerFetch||this.limitPerFetch,this.allFetched=!1,this.lastFetched=t.lastFetched||0},_buildFetchOptions:function(e){return e.remove=e.remove||!1,n.prototype._buildFetchOptions.call(this,e)},fetchFirst:function(t){return t=t?e.clone(t):{},this.allFetched=!1,this.lastFetched=0,this.fetchMore(e.defaults(t,{reset:!0,limit:this.limitOnFirstFetch}))},fetchMore:function(t){t=e.clone(t||{});var i=this;if(!t.reset&&i.allFetched)return o.when();t.offset=t.reset?0:t.offset||i.lastFetched;var n=t.limit=t.limit||i.limitPerFetch||null;return i.trigger("fetching-more"),i.fetch(t).always(function(){i.trigger("fetching-more-done")}).done(function(t){var s=e.isArray(t)?t.length:0;i.lastFetched+=s,(!n||s .controls").add(this.$list()).hide(),e.parentName=this.model.get("name"),this.$el.append(e.render().$el)},_collapseDrilldownPanel:function(e){this.panelStack.pop(),this.render()},events:{"click .navigation .back":"close"},close:function(e){this.remove(),this.trigger("close")},toString:function(){return"CollectionView("+(this.model?this.model.get("name"):"")+")"}});l.prototype.templates=function(){var e=n.wrapTemplate(['
    ','",'
    ','
    <%- collection.name || collection.element_identifier %>
    ','
    ','<% if( collection.collection_type === "list" ){ %>',s("a list of datasets"),'<% } else if( collection.collection_type === "paired" ){ %>',s("a pair of datasets"),'<% } else if( collection.collection_type === "list:paired" ){ %>',s("a list of paired datasets"),'<% } else if( collection.collection_type === "list:list" ){ %>',s("a list of dataset lists"),"<% } %>","
    ","
    ","
    "],"collection");return o.extend(o.clone(r.prototype.templates),{controls:e})}();var c=l.extend({DatasetDCEViewClass:i.DatasetDCEListItemView,toString:function(){return"ListCollectionView("+(this.model?this.model.get("name"):"")+")"}}),d=c.extend({toString:function(){return"PairCollectionView("+(this.model?this.model.get("name"):"")+")"}}),h=l.extend({NestedDCDCEViewClass:i.NestedDCDCEListItemView.extend({foldoutPanelClass:d}),toString:function(){return"ListOfPairsCollectionView("+(this.model?this.model.get("name"):"")+")"}}),u=l.extend({NestedDCDCEViewClass:i.NestedDCDCEListItemView.extend({foldoutPanelClass:d}),toString:function(){return"ListOfListsCollectionView("+(this.model?this.model.get("name"):"")+")"}});return{CollectionView:l,ListCollectionView:c,PairCollectionView:d,ListOfPairsCollectionView:h,ListOfListsCollectionView:u}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2))},function(e,t,i){var n,s;(function(o,a){n=[i(12),i(33),i(78),i(67),i(22),i(6),i(5)],s=function(e,t,n,s,r,l,c){"use strict";var d=t.DatasetListItemView,h=d.extend({initialize:function(e){d.prototype.initialize.call(this,e),this.hasUser=e.hasUser,this.purgeAllowed=e.purgeAllowed||!1,this.tagsEditorShown=e.tagsEditorShown||!1,this.annotationEditorShown=e.annotationEditorShown||!1},_renderPrimaryActions:function(){var t=d.prototype._renderPrimaryActions.call(this);return this.model.get("state")===e.NOT_VIEWABLE?t:d.prototype._renderPrimaryActions.call(this).concat([this._renderEditButton(),this._renderDeleteButton()])},_renderEditButton:function(){if(this.model.get("state")===e.DISCARDED||!this.model.get("accessible"))return null;var t=this.model.get("purged"),i=this.model.get("deleted"),n={title:c("Edit attributes"),href:this.model.urls.edit,target:this.linkTarget,faIcon:"fa-pencil",classes:"edit-btn"};return i||t?(n.disabled=!0,t?n.title=c("Cannot edit attributes of datasets removed from disk"):i&&(n.title=c("Undelete dataset to edit attributes"))):o.contains([e.UPLOAD,e.NEW],this.model.get("state"))&&(n.disabled=!0,n.title=c("This dataset is not yet editable")),r(n)},_renderDeleteButton:function(){if(!this.model.get("accessible"))return null;var e=this,t=this.model.isDeletedOrPurged();return r({title:c(t?"Dataset is already deleted":"Delete"),disabled:t,faIcon:"fa-times",classes:"delete-btn",onclick:function(){e.$el.find(".icon-btn.delete-btn").trigger("mouseout"),e.model["delete"]()}})},_renderDetails:function(){var t=d.prototype._renderDetails.call(this),i=this.model.get("state");return!this.model.isDeletedOrPurged()&&o.contains([e.OK,e.FAILED_METADATA],i)&&(this._renderTags(t),this._renderAnnotation(t),this._makeDbkeyEditLink(t)),this._setUpBehaviors(t),t},_renderSecondaryActions:function(){var t=d.prototype._renderSecondaryActions.call(this);switch(this.model.get("state")){case e.UPLOAD:case e.NOT_VIEWABLE:return t;case e.ERROR:return t.unshift(this._renderErrButton()),t.concat([this._renderRerunButton()]);case e.OK:case e.FAILED_METADATA:return t.concat([this._renderRerunButton(),this._renderVisualizationsButton()])}return t.concat([this._renderRerunButton()])},_renderErrButton:function(){return r({title:c("View or report this error"),href:this.model.urls.report_error,classes:"report-error-btn",target:this.linkTarget,faIcon:"fa-bug"})},_renderRerunButton:function(){var e=this.model.get("creating_job");if(this.model.get("rerunnable"))return r({title:c("Run this job again"),href:this.model.urls.rerun,classes:"rerun-btn",target:this.linkTarget,faIcon:"fa-refresh",onclick:function(t){t.preventDefault(),!function(){var t=[i(18)];(function(t){var i=new t.View({job_id:e});i.deferred.execute(function(){Galaxy.app.display(i)})}).apply(null,t)}()}})},_renderVisualizationsButton:function(){var e=this.model.get("visualizations");if(this.model.isDeletedOrPurged()||!this.hasUser||!this.model.hasData()||o.isEmpty(e))return null;if(!o.isObject(e[0]))return this.warn("Visualizations have been switched off"),null;var t=a(this.templates.visualizations(e,this));return t.find('[target="galaxy_main"]').attr("target",this.linkTarget),this._addScratchBookFn(t.find(".visualization-link").addBack(".visualization-link")),t},_addScratchBookFn:function(e){e.click(function(e){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add({title:"Visualization",url:a(this).attr("href")}),e.preventDefault(),e.stopPropagation())})},_renderTags:function(e){if(this.hasUser){var t=this;this.tagsEditor=new n.TagsEditor({model:this.model,el:e.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){t.tagsEditorShown=!0},onhide:function(){t.tagsEditorShown=!1},$activator:r({title:c("Edit dataset tags"),classes:"tag-btn",faIcon:"fa-tags"}).appendTo(e.find(".actions .right"))}),this.tagsEditorShown&&this.tagsEditor.toggle(!0)}},_renderAnnotation:function(e){if(this.hasUser){var t=this;this.annotationEditor=new s.AnnotationEditor({model:this.model,el:e.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){t.annotationEditorShown=!0},onhide:function(){t.annotationEditorShown=!1},$activator:r({title:c("Edit dataset annotation"),classes:"annotate-btn",faIcon:"fa-comment"}).appendTo(e.find(".actions .right"))}),this.annotationEditorShown&&this.annotationEditor.toggle(!0)}},_makeDbkeyEditLink:function(e){if("?"===this.model.get("metadata_dbkey")&&!this.model.isDeletedOrPurged()){var t=a('?').attr("href",this.model.urls.edit).attr("target",this.linkTarget);e.find(".dbkey .value").replaceWith(t)}},events:o.extend(o.clone(d.prototype.events),{"click .undelete-link":"_clickUndeleteLink","click .purge-link":"_clickPurgeLink","click .edit-btn":function(e){this.trigger("edit",this,e)},"click .delete-btn":function(e){this.trigger("delete",this,e)},"click .rerun-btn":function(e){this.trigger("rerun",this,e)},"click .report-err-btn":function(e){this.trigger("report-err",this,e)},"click .visualization-btn":function(e){this.trigger("visualize",this,e)},"click .dbkey a":function(e){this.trigger("edit",this,e)}}),_clickUndeleteLink:function(e){return this.model.undelete(),!1},_clickPurgeLink:function(e){return confirm(c("This will permanently remove the data in your dataset. Are you sure?"))&&this.model.purge(),!1},toString:function(){var e=this.model?this.model+"":"(no model)";return"HDAEditView("+e+")"}});return h.prototype.templates=function(){var e=o.extend({},d.prototype.templates.warnings,{failed_metadata:l.wrapTemplate(['<% if( dataset.state === "failed_metadata" ){ %>','","<% } %>"],"dataset"),deleted:l.wrapTemplate(["<% if( dataset.deleted && !dataset.purged ){ %>",'
    ',c("This dataset has been deleted"),'
    ',c("Undelete it"),"","<% if( view.purgeAllowed ){ %>",'
    ',c("Permanently remove it from disk"),"","<% } %>","
    ","<% } %>"],"dataset")}),t=l.wrapTemplate(["<% if( visualizations.length === 1 ){ %>",'">','',"","<% } else { %>",'","<% } %>"],"visualizations");return o.extend({},d.prototype.templates,{warnings:e,visualizations:t})}(),{DatasetListItemEdit:h}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2),i(1))},function(e,t,i){var n,s;(function(o,a,r){n=[i(12),i(6),i(5)],s=function(e,t,i){"use strict";var n="dataset",s=t.SearchableModelMixin,l=o.Model.extend(t.LoggableMixin).extend(t.mixin(s,{_logNamespace:n,defaults:{state:e.NEW,deleted:!1,purged:!1,name:"(unnamed dataset)",accessible:!0,data_type:"",file_ext:"",file_size:0,meta_files:[],misc_blurb:"",misc_info:"",tags:[]},initialize:function(t,i){this.debug(this+"(Dataset).initialize",t,i), +this}"undefined"!=typeof e&&e.exports&&(e.exports=i)},function(e,t,i){var n,s;(function(o){n=[i(6),i(17),i(5)],s=function(e,t,i){var n=o.View.extend({tagName:"div",className:"citations",render:function(){return this.$el.append("

    "+this.formattedReference()+"

    "),this},formattedReference:function(){var e=this.model,t=e.entryType(),i=e.fields(),n="",s=this._asSentence((i.author?i.author:"")+(i.year?" ("+i.year+")":""))+" ",o=i.title||"",a=i.pages?"pp. "+i.pages:"",r=i.address;if("article"==t){var l=(i.volume?i.volume:"")+(i.number?" ("+i.number+")":"")+(a?", "+a:"");n=s+this._asSentence(o)+(i.journal?"In "+i.journal+", ":"")+this._asSentence(l)+this._asSentence(i.address)+""}else n="inproceedings"==t||"proceedings"==t?s+this._asSentence(o)+(i.booktitle?"In "+i.booktitle+", ":"")+(a?a:"")+(r?", "+r:"")+".":"mastersthesis"==t||"phdthesis"==t?s+this._asSentence(o)+(i.howpublished?i.howpublished+". ":"")+(i.note?i.note+".":""):"techreport"==t?s+this._asSentence(o)+this._asSentence(i.institution)+this._asSentence(i.number)+this._asSentence(i.type):"book"==t||"inbook"==t||"incollection"==t?s+" "+this._formatBookInfo(i):s+" "+this._asSentence(o)+this._asSentence(i.howpublished)+this._asSentence(i.note);var c="";i.doi&&(c="http://dx.doi.org/"+i.doi,n+='[doi:'+i.doi+"]");var d=i.url||c;return d&&(n+='[Link]'),n},_formatBookInfo:function(e){var t="";return e.chapter&&(t+=e.chapter+" in "),e.title&&(t+=""+e.title+""),e.editor&&(t+=", Edited by "+e.editor+", "),e.publisher&&(t+=", "+e.publisher),e.pages&&(t+=", pp. "+e.pages),e.series&&(t+=", "+e.series+""),e.volume&&(t+=", Vol."+e.volume),e.issn&&(t+=", ISBN: "+e.issn),t+"."},_asSentence:function(e){return e&&e.trim()?e+". ":""}}),s=o.View.extend({el:"#citations",initialize:function(){this.listenTo(this.collection,"add",this.renderCitation)},events:{"click .citations-to-bibtex":"showBibtex","click .citations-to-formatted":"showFormatted"},renderCitation:function(e){var t=new n({model:e});this.$(".citations-formatted").append(t.render().el);var i=this.$(".citations-bibtex-text");i.val(i.val()+"\n\r"+e.attributes.content)},render:function(){this.$el.html(this.citationsElement()),this.collection.each(function(e){this.renderCitation(e)},this),this.showFormatted()},showBibtex:function(){this.$(".citations-to-formatted").show(),this.$(".citations-to-bibtex").hide(),this.$(".citations-bibtex").show(),this.$(".citations-formatted").hide(),this.$(".citations-bibtex-text").select()},showFormatted:function(){this.$(".citations-to-formatted").hide(),this.$(".citations-to-bibtex").show(),this.$(".citations-bibtex").hide(),this.$(".citations-formatted").show()},partialWarningElement:function(){return this.collection.partial?['
    ',"Warning: This is a experimental feature. Most Galaxy tools will not annotate"," citations explicitly at this time. When writing up your analysis, please manually"," review your histories and find all references"," that should be cited in order to completely describe your work. Also, please remember to",' cite Galaxy.',"
    "].join(""):""},citationsElement:function(){return['
    ','
    ',i("Citations"),' ',' ',"
    ",'
    ',this.partialWarningElement(),'',"
    ",'
    ','',"
    ","
    "].join("")}});return{CitationView:n,CitationListView:s}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3))},function(e,t,i){var n,s;(function(o,a,r){n=[i(43),i(33),i(6),i(5)],s=function(e,t,i,n){"use strict";var s=e.FoldoutListItemView,l=e.ListItemView,c=s.extend({className:s.prototype.className+" dataset-collection",id:function(){return["dataset_collection",this.model.get("id")].join("-")},initialize:function(e){this.linkTarget=e.linkTarget||"_blank",this.hasUser=e.hasUser,s.prototype.initialize.call(this,e)},_setUpListeners:function(){s.prototype._setUpListeners.call(this),this.listenTo(this.model,"change",function(e,t){o.has(e.changed,"deleted")?this.render():o.has(e.changed,"element_count")&&this.$("> .title-bar .subtitle").replaceWith(this._renderSubtitle())})},_renderSubtitle:function(){return a(this.templates.subtitle(this.model.toJSON(),this))},_getFoldoutPanelOptions:function(){var e=s.prototype._getFoldoutPanelOptions.call(this);return o.extend(e,{linkTarget:this.linkTarget,hasUser:this.hasUser})},$selector:function(){return this.$("> .selector")},toString:function(){var e=this.model?this.model+"":"(no model)";return"DCListItemView("+e+")"}});c.prototype.templates=function(){var e=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"),"
    ","<% } %>"])}),t=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:e,titleBar:t,subtitle:a})}();var d=l.extend({className:l.prototype.className+" dataset-collection-element",initialize:function(e){e.logger&&(this.logger=this.model.logger=e.logger),this.log("DCEListItemView.initialize:",e),l.prototype.initialize.call(this,e)},toString:function(){var e=this.model?this.model+"":"(no model)";return"DCEListItemView("+e+")"}});d.prototype.templates=function(){var e=i.wrapTemplate(['
    ','
    ','<%- element.element_identifier %>',"
    ",'
    ',"
    "],"element");return o.extend({},l.prototype.templates,{titleBar:e})}();var h=t.DatasetListItemView.extend({className:t.DatasetListItemView.prototype.className+" dataset-collection-element",initialize:function(e){e.logger&&(this.logger=this.model.logger=e.logger),this.log("DatasetDCEListItemView.initialize:",e),t.DatasetListItemView.prototype.initialize.call(this,e)},_fetchModelDetails:function(){var e=this;return e.model.inReadyState()&&!e.model.hasDetails()?e.model.fetch({silent:!0}):r.when()},toString:function(){var e=this.model?this.model+"":"(no model)";return"DatasetDCEListItemView("+e+")"}});h.prototype.templates=function(){var e=i.wrapTemplate(['
    ','','
    ','<%- element.element_identifier %>',"
    ","
    "],"element");return o.extend({},t.DatasetListItemView.prototype.templates,{titleBar:e})}();var u=c.extend({className:c.prototype.className+" dataset-collection-element",_swapNewRender:function(e){c.prototype._swapNewRender.call(this,e);var t=this.model.get("state")||"ok";return this.$el.addClass("state-"+t),this.$el},toString:function(){var e=this.model?this.model+"":"(no model)";return"NestedDCDCEListItemView("+e+")"}});return{DCListItemView:c,DCEListItemView:d,DatasetDCEListItemView:h,NestedDCDCEListItemView:u}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2),i(1),i(1))},function(e,t,i){var n,s;(function(o,a,r){n=[i(71),i(6),i(5)],s=function(e,t,i){"use strict";var n={defaults:{model_class:"DatasetCollectionElement",element_identifier:null,element_index:null,element_type:null},_mergeObject:function(e){return o.extend(e,e.object,{element_id:e.id}),delete e.object,e},constructor:function(e,t){e=this._mergeObject(e),this.idAttribute="element_id",a.Model.apply(this,arguments)},parse:function(e,t){var i=e;return i=this._mergeObject(i)}},s=a.Model.extend(t.LoggableMixin).extend(n).extend({_logNamespace:"collections"}),l=a.Collection.extend(t.LoggableMixin).extend({_logNamespace:"collections",model:s,toString:function(){return["DatasetCollectionElementCollection(",this.length,")"].join("")}}),c=e.DatasetAssociation.extend(t.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({},e.DatasetAssociation.prototype.defaults,n.defaults),constructor:function(e,t){this.debug("\t DatasetDCE.constructor:",e,t),n.constructor.call(this,e,t)},hasDetails:function(){return this.elements&&this.elements.length},toString:function(){var e=this.get("element_identifier");return["DatasetDCE(",e,")"].join("")}})),d=l.extend({model:c,toString:function(){return["DatasetDCECollection(",this.length,")"].join("")}}),h=a.Model.extend(t.LoggableMixin).extend(t.SearchableModelMixin).extend({_logNamespace:"collections",defaults:{collection_type:null,deleted:!1},collectionClass:l,initialize:function(e,t){this.debug(this+"(DatasetCollection).initialize:",e,t,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 e=this.get("elements")||[];return this.unset("elements",{silent:!0}),this.elements=new this.collectionClass(e),this.elements},toJSON:function(){var e=a.Model.prototype.toJSON.call(this);return this.elements&&(e.elements=this.elements.toJSON()),e},inReadyState:function(){var e=this.get("populated");return this.isDeletedOrPurged()||e},hasDetails:function(){return 0!==this.elements.length},getVisibleContents:function(e){return this.elements},parse:function(e,t){var i=a.Model.prototype.parse.call(this,e,t);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(e){return this.get("deleted")?r.when():this.save({deleted:!0},e)},undelete:function(e){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},e)},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},searchAttributes:["name"],toString:function(){var e=[this.get("id"),this.get("name")||this.get("element_identifier")];return"DatasetCollection("+e.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(t.mixin(n,{constructor:function(e,t){this.debug("\t NestedDCDCE.constructor:",e,t),n.constructor.call(this,e,t)},toString:function(){var e=this.object?""+this.object:this.get("element_identifier");return["NestedDCDCE(",e,")"].join("")}})),f=l.extend({model:g,toString:function(){return["NestedDCDCECollection(",this.length,")"].join("")}}),m=p.extend(t.mixin(n,{constructor:function(e,t){this.debug("\t NestedPairDCDCE.constructor:",e,t),n.constructor.call(this,e,t)},toString:function(){var e=this.object?""+this.object:this.get("element_identifier");return["NestedPairDCDCE(",e,")"].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(t.mixin(n,{constructor:function(e,t){this.debug("\t NestedListDCDCE.constructor:",e,t),n.constructor.call(this,e,t)},toString:function(){var e=this.object?""+this.object:this.get("element_identifier");return["NestedListDCDCE(",e,")"].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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2),i(3),i(1))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(40),i(12),i(6),i(8),i(88),i(5),i(85)],s=function(e,t,i,n,s,c){"use strict";function d(e){var t=e.toJSON(),i=f(t,{creationFn:function(t,i){return t=t.map(function(e){return{id:e.id,name:e.name,src:"dataset"===e.history_content_type?"hda":"hdca"}}),e.createHDCA(t,"list",i)}});return i}var h="collections",u=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,tagName:"li",className:"collection-element",initialize:function(e){this.element=e.element||{},this.selected=e.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(e){this.$el.toggleClass("selected",e),this.trigger("select",{source:this,selected:this.$el.hasClass("selected")})},discard:function(){var e=this,t=this.$el.parent().width();this.$el.animate({"margin-right":t},"fast",function(){e.trigger("discard",{source:e}),e.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(e){e.stopPropagation(),this.select(e)},_clickName:function(e){e.stopPropagation(),e.preventDefault();var t=([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));t&&(this.element.name=t,this.render())},_clickDiscard:function(e){e.stopPropagation(),this.discard()},_dragstart:function(e){e.originalEvent&&(e=e.originalEvent),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",JSON.stringify(this.element)),this.$el.addClass("dragging"),this.$el.parent().trigger("collection-element.dragstart",[this])},_dragend:function(e){this.$el.removeClass("dragging"),this.$el.parent().trigger("collection-element.dragend",[this])},_sendToParent:function(e){this.$el.parent().trigger(e)},toString:function(){return"DatasetCollectionElementView()"}}),p=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,elementViewClass:u,collectionClass:e.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(e){this.metric("ListCollectionCreator.initialize",e);var t=this;a.each(this.defaultAttributes,function(i,n){i=e[n]||i,t[n]=i}),t.initialElements=e.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(e){e.hasOwnProperty("id")||(e.id=a.uniqueId())}),this.workingElements},_validateElements:function(){var e=this;return e.invalidElements=[],this.workingElements=this.workingElements.filter(function(t){var i=e._isElementInvalid(t);return i&&e.invalidElements.push({element:t,text:i}),!i}),this.workingElements},_isElementInvalid:function(e){return"dataset"!==e.history_content_type?c("is not a dataset"):e.state!==t.OK?c(a.contains(t.NOT_READY_STATES,e.state)?"hasn't finished running yet":"has errored, is paused, or is not accessible"):e.deleted||e.purged?c("has been deleted or purged"):null},_mangleDuplicateNames:function(){var e=900,t=1,i={};this.workingElements.forEach(function(n){for(var s=n.name;i.hasOwnProperty(s);)if(s=n.name+" ("+t+")",t+=1,t>=e)throw new Error("Safety hit in while loop - thats impressive");n.name=s,i[n.name]=!0})},_sortElements:function(e){},render:function(e,t){return this.workingElements.length .clear-selected").show():this.$(".collection-elements-controls > .clear-selected").hide()},_renderList:function(e,t){var i=this,n=l("
    "),s=i.$list();a.each(this.elementViews,function(e){e.destroy(),i.removeElementView(e)}),i.workingElements.forEach(function(e){var t=i._createElementView(e);n.append(t.$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(e){var t=new this.elementViewClass({element:e,selected:a.has(this.selectedIds,e.id)});return this.elementViews.push(t),this._listenToElementView(t),t},_listenToElementView:function(e){var t=this;t.listenTo(e,{select:function(e){var i=e.source.element;e.selected?t.selectedIds[i.id]=!0:delete t.selectedIds[i.id],t.trigger("elements:select",e)},discard:function(e){t.trigger("elements:discard",e)}})},addElementView:function(e){},removeElementView:function(e){delete this.selectedIds[e.element.id],this._renderClearSelected(),this.elementViews=a.without(this.elementViews,e),this.stopListening(e)},_renderNoElementsLeft:function(){this._disableNameAndCreate(!0),this.$(".collection-elements").append(this.templates.noElementsLeft())},_elementToJSON:function(e){return e},createList:function(e){if(!this.workingElements.length){var t=c("No valid elements for final list")+". ";return t+=''+c("Cancel")+" ",t+=c("or"),t+=' '+c("start over")+".",void this._showAlert(t)}var i=this,n=this.workingElements.map(function(e){return i._elementToJSON(e)});return i.blocking=!0,i.creationFn(n,e).always(function(){i.blocking=!1}).fail(function(e,t,n){i.trigger("error",{xhr:e,status:t,message:c("An error occurred while creating this collection")})}).done(function(e,t,n){i.trigger("collection:created",e,t,n),i.metric("collection:created",e),"function"==typeof i.oncreate&&i.oncreate.call(this,e,t,n)})},_setUpBehaviors:function(){return this.on("error",this._errorHandler),this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("elements:select",function(e){this._renderClearSelected()}),this.on("elements:discard",function(e){var t=e.source.element;this.removeElementView(e.source),this.workingElements=a.without(this.workingElements,t),this.workingElements.length||this._renderNoElementsLeft()}),this},_errorHandler:function(e){this.error(e);var t=this;if(content=e.message||c("An error occurred"),e.xhr){var i=e.xhr,n=e.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}t._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(e){"function"==typeof this.oncancel&&this.oncancel.call(this)},"click .create-collection":"_clickCreate"},_clickMoreHelp:function(e){e.stopPropagation(),this.$(".main-help").addClass("expanded"),this.$(".more-help").hide()},_clickLessHelp:function(e){e.stopPropagation(),this.$(".main-help").removeClass("expanded"),this.$(".more-help").show()},_toggleHelp:function(e){e.stopPropagation(),this.$(".main-help").toggleClass("expanded"),this.$(".more-help").toggle()},_showAlert:function(e,t){t=t||"alert-danger",this.$(".main-help").hide(),this.$(".header .alert").attr("class","alert alert-dismissable").addClass(t).show().find(".alert-message").html(e)},_hideAlert:function(e){this.$(".main-help").show(),this.$(".header .alert").hide()},reset:function(){this._instanceSetUp(),this._elementsSetUp(),this.render()},clearSelectedElements:function(e){this.$(".collection-elements .collection-element").removeClass("selected"),this.$(".collection-elements-controls > .clear-selected").hide()},_dragoverElements:function(e){e.preventDefault();var t=this.$list();this._checkForAutoscroll(t,e.originalEvent.clientY);var i=this._getNearestElement(e.originalEvent.clientY);this.$(".element-drop-placeholder").remove();var n=r('
    ');i.length?i.before(n):t.append(n)},_checkForAutoscroll:function(e,t){var i=2,n=e.offset(),s=e.scrollTop(),o=t-n.top,a=n.top+e.outerHeight()-t;o>=0&&o=0&&ae&&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(e,t,i){var s,o=l.Deferred(),r=Galaxy.modal||new n.View;return t=a.defaults(t||{},{elements:e,oncancel:function(){r.hide(),o.reject("cancelled")},oncreate:function(e,t){r.hide(),o.resolve(t)}}),s=new i(t),r.show({title:t.title||c("Create a collection"),body:s.$el,width:"80%",height:"100%",closing_events:!0}),s.render(),window._collectionCreator=s,o},f=function(e,t){return t=t||{},t.title=c("Create a collection from a list of datasets"),g(e,t,p)};return{DatasetCollectionElementView:u,ListCollectionCreator:p,collectionCreatorModal:g,listCollectionCreatorModal:f,createListCollection:d}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2),i(1),i(1))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(43),i(12),i(22),i(6),i(5)],s=function(e,t,i,n,s){"use strict";var c="dataset",d=e.ListItemView,h=d.extend({_logNamespace:c,className:d.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(e){e.logger&&(this.logger=this.model.logger=e.logger), +this.log(this+".initialize:",e),d.prototype.initialize.call(this,e),this.linkTarget=e.linkTarget||"_blank"},_setUpListeners:function(){d.prototype._setUpListeners.call(this);var e=this;return e.listenTo(e.model,{change:function(t,i){e.model.changedAttributes().state&&e.model.inReadyState()&&e.expanded&&!e.model.hasDetails()?e.model.fetch({silent:!0}).done(function(){e.render()}):e.render()}})},_fetchModelDetails:function(){var e=this;return e.model.inReadyState()&&!e.model.hasDetails()?e.model.fetch({silent:!0}):o.when()},remove:function(e,t){var i=this;e=e||this.fxSpeed,this.$el.fadeOut(e,function(){a.View.prototype.remove.call(i),t&&t.call(i)})},_swapNewRender:function(e){return d.prototype._swapNewRender.call(this,e),this.model.has("state")&&this.$el.addClass("state-"+this.model.get("state")),this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var e=this.model.get("state");if(e===t.NOT_VIEWABLE||e===t.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(e===t.UPLOAD)n.disabled=!0,n.title=s("This dataset must finish uploading before it can be viewed");else if(e===t.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(e){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.addDataset(o.model.get("id")),e.preventDefault())}}return n.faIcon="fa-eye",i(n)},_renderDetails:function(){if(this.model.get("state")===t.NOT_VIEWABLE)return r(this.templates.noAccess(this.model.toJSON(),this));var e=d.prototype._renderDetails.call(this);return e.find(".actions .left").empty().append(this._renderSecondaryActions()),e.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages()),e.find(".display-applications").html(this._renderDisplayApplications()),this._setUpBehaviors(e),e},_renderSummary:function(){var e=this.model.toJSON(),t=this.templates.summaries[e.state];return(t=t||this.templates.summaries.unknown)(e,this)},_renderDetailMessages:function(){var e=this,t=r('
    '),i=e.model.toJSON();return l.each(e.templates.detailMessages,function(n){t.append(r(n(i,e)))}),t},_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 t.NOT_VIEWABLE:return[];case t.OK:case t.FAILED_METADATA:case t.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",onclick:function(e){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add({title:"Dataset details",url:this.href}),e.preventDefault(),e.stopPropagation())}})},_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 e=this.model.urls;return r(['"].join("\n"))},events:l.extend(l.clone(d.prototype.events),{"click .display-btn":function(e){this.trigger("display",this,e)},"click .params-btn":function(e){this.trigger("params",this,e)},"click .download-btn":function(e){this.trigger("download",this,e)}}),toString:function(){var e=this.model?this.model+"":"(no model)";return"DatasetListItemView("+e+")"}});return h.prototype.templates=function(){var e=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[t.OK]=a[t.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[t.NEW]=n.wrapTemplate(["
    ",s("This is a new dataset and not all of its data are available yet"),"
    "],"dataset"),a[t.NOT_VIEWABLE]=n.wrapTemplate(["
    ",s("You do not have permission to view this dataset"),"
    "],"dataset"),a[t.DISCARDED]=n.wrapTemplate(["
    ",s("The job creating this dataset was cancelled before completion"),"
    "],"dataset"),a[t.QUEUED]=n.wrapTemplate(["
    ",s("This job is waiting to run"),"
    "],"dataset"),a[t.RUNNING]=n.wrapTemplate(["
    ",s("This job is currently running"),"
    "],"dataset"),a[t.UPLOAD]=n.wrapTemplate(["
    ",s("This dataset is currently uploading"),"
    "],"dataset"),a[t.SETTING_METADATA]=n.wrapTemplate(["
    ",s("Metadata is being auto-detected"),"
    "],"dataset"),a[t.PAUSED]=n.wrapTemplate(["
    ",s('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume'),"
    "],"dataset"),a[t.ERROR]=n.wrapTemplate(["<% if( !dataset.purged ){ %>","
    <%- dataset.misc_blurb %>
    ","<% } %>",'',s("An error occurred with this dataset"),":",'
    <%- dataset.misc_info %>
    '],"dataset"),a[t.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:e,details:i,noAccess:o,summaries:a,detailMessages:r,displayApplications:c})}(),{DatasetListItemView:h}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(1),i(3),i(1),i(2))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4)],s=function(e){var t=o.Model.extend({initialize:function(e){this.app=e},checksum:function(){var e="",t=this;return this.app.section.$el.find(".section-row").each(function(){var i=a(this).attr("id"),n=t.app.field_list[i];n&&(e+=i+":"+JSON.stringify(n.value&&n.value())+":"+n.collapsed+";")}),e},create:function(){function e(e,t,i){n.flat_dict[e]=t,o[e]=i,n.app.element_list[t]&&n.app.element_list[t].$el.attr("tour_id",e)}function t(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(e,t){return e-t});var a=0;for(var f in h)t(c+"_"+a++,r[u+h[f]]);break;case"conditional":var m=n.app.field_list[l.id].value();e(c+"|"+l.test_param.name,l.id,m);var v=i(l,m);v!=-1&&t(c,o[l.id+"-section-"+v]);break;case"section":t(!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),e(c,l.id,m),l.payload))for(var y in l.payload)e(y,l.id,l.payload[y])}}}}}var n=this,s={};this._iterate(this.app.section.$el,s);var o={};return this.flat_dict={},t("",s),o},match:function(e){return this.flat_dict&&this.flat_dict[e]},matchCase:function(e,t){return i(e,t)},matchModel:function(e,t){var i=this;n(e.inputs,function(e,n){i.flat_dict[n]&&t(e,i.flat_dict[n])})},matchResponse:function(e){function t(e,s){if("string"==typeof s){var o=n.flat_dict[e];o&&(i[o]=s)}else for(var a in s){var r=a;if(""!==e){var l="|";s instanceof Array&&(l="_"),r=e+l+r}t(r,s[a])}}var i={},n=this;return t("",e),i},_iterate:function(e,t){var i=this,n=a(e).children();n.each(function(){var e=this,n=a(e).attr("id");if(a(e).hasClass("section-row")){var s=i.app.input_list[n];t[n]=s&&{input:s}||{},i._iterate(e,t[n])}else i._iterate(e,t)})}}),i=function(e,t){"boolean"==e.test_param.type&&(t="true"==t?e.test_param.truevalue||"true":e.test_param.falsevalue||"false");for(var i in e.cases)if(e.cases[i].value==t)return i;return-1},n=function(e,t,s,o){o=a.extend(!0,{},o),r.each(e,function(e){e&&e.type&&e.name&&(o[e.name]=e)});for(var l in e){var c=e[l];c.name=c.name||l;var d=s?s+"|"+c.name:c.name;switch(c.type){case"repeat":r.each(c.cache,function(e,i){n(e,t,d+"_"+i,o)});break;case"conditional":if(c.test_param){t(c.test_param,d+"|"+c.test_param.name,o);var h=i(c,c.test_param.value);h!=-1?n(c.cases[h].inputs,t,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,t,d,o);break;default:t(c,d,o)}}};return{Manager:t,visitInputs:n}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2))},function(e,t,i){var n,s;(function(i,o,a){n=[],s=function(){return i.View.extend({initialize:function(e,t){this.app=e,this.app_options=e.options||{},this.field=t&&t.field||new i.View,this.model=t&&t.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(t),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,e.trigger&&e.trigger("change"),s.render()})},backdrop:function(){this.model.set("backdrop",!0)},error:function(e){this.model.set("error_text",e)},reset:function(){this.model.set("error_text",null)},render:function(){o(".tooltip").hide();var e=this.model.get("help",""),t=this.model.get("argument");t&&e.indexOf("("+t+")")==-1&&(e+=" ("+t+")"),this.$info.html(e),this.$el[this.model.get("hidden")?"hide":"show"](),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.show(),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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4),i(7),i(49),i(51),i(50),i(47)],s=function(e,t,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(e){var t=this.types[e.type],i="function"==typeof this[t]?this[t].call(this,e):null;return i||(i=e.options?this._fieldSelect(e):this._fieldText(e),Galaxy.emit.debug("form-parameters::_addRow()","Auto matched field type ("+e.type+").")),void 0===e.value&&(e.value=null),i.value(e.value),i},_fieldData:function(e){return new i.View({id:"field-"+e.id,extensions:e.extensions,optional:e.optional,multiple:e.multiple,type:e.type,flavor:e.flavor,data:e.options,onchange:e.onchange})},_fieldSelect:function(e){if(e.is_workflow)return this._fieldText(e);"data_column"==e.type&&(e.error_text="Missing columns in referenced dataset.");var i=e.data;i||(i=[],a.each(e.options,function(e){i.push({label:e[0],value:e[1]})}));var n=t.Select;switch(e.display){case"checkboxes":n=t.Checkbox;break;case"radio":n=t.Radio;break;case"radiobutton":n=t.RadioButton}return new n.View({id:"field-"+e.id,data:i,error_text:e.error_text||"No options available",multiple:e.multiple,optional:e.optional,onchange:e.onchange,searchable:"workflow"!==e.flavor})},_fieldDrilldown:function(e){return e.is_workflow?this._fieldText(e):new t.Drilldown.View({id:"field-"+e.id,data:e.options,display:e.display,optional:e.optional,onchange:e.onchange})},_fieldText:function(i){if(i.options&&i.data)if(i.area=i.multiple,e.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 t.Input({id:"field-"+i.id,area:i.area,placeholder:i.placeholder,onchange:i.onchange})},_fieldSlider:function(e){return new t.Slider.View({id:"field-"+e.id,precise:"float"==e.type,is_workflow:e.is_workflow,min:e.min,max:e.max,onchange:e.onchange})},_fieldHidden:function(e){return new t.Hidden({id:"field-"+e.id,info:e.info})},_fieldBoolean:function(e){return new t.RadioButton.View({id:"field-"+e.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:e.onchange})},_fieldColor:function(e){return new l({id:"field-"+e.id,onchange:e.onchange})},_fieldLibrary:function(e){return new n.View({id:"field-"+e.id,optional:e.optional,multiple:e.multiple,onchange:e.onchange})},_fieldFtp:function(e){return new s.View({id:"field-"+e.id,optional:e.optional,multiple:e.multiple,onchange:e.onchange})}})}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2),i(1))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4),i(9),i(7)],s=function(e,t,i){var n=o.View.extend({initialize:function(t){this.list={},this.options=e.merge(t,{title:"Repeat",empty_text:"Not available.",max:null,min:null}),this.button_new=new i.ButtonIcon({icon:"fa-plus",title:"Insert "+this.options.title,tooltip:"Add new "+this.options.title+" block",floating:"clear",cls:"ui-button-icon form-repeat-add",onclick:function(){t.onnew&&t.onnew()}}),this.setElement(a("
    ").append(this.$list=a("
    ")).append(a("
    ").append(this.button_new.$el)))},size:function(){return r.size(this.list)},add:function(e){if(!e.id||this.list[e.id])return void Galaxy.emit.debug("form-repeat::add()","Duplicate or invalid repeat block id.");var n=new i.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain form-repeat-delete",onclick:function(){e.ondel&&e.ondel()}}),s=new t.View({id:e.id,title:"placeholder",cls:e.cls||"ui-portlet-repeat",operations:{button_delete:n}});s.append(e.$el),s.$el.addClass("section-row").hide(),this.list[e.id]=s,this.$list.append(s.$el.fadeIn("fast")),this.options.max>0&&this.size()>=this.options.max&&this.button_new.disable(),this._refresh()},del:function(e){return this.list[e]?(this.$list.find("#"+e).remove(),delete this.list[e],this.button_new.enable(),void this._refresh()):void Galaxy.emit.debug("form-repeat::del()","Invalid repeat block id.")},delAll:function(){for(var e in this.list)this.del(e)},hideOptions:function(){this.button_new.$el.hide(),r.each(this.list,function(e){e.hideOperation("button_delete")}),r.isEmpty(this.list)&&this.$el.append(a("
    ").addClass("ui-form-info").html(this.options.empty_text))},_refresh:function(){var e=0;for(var t in this.list){var i=this.list[t];i.title(++e+": "+this.options.title),i[this.size()>this.options.min?"showOperation":"hideOperation"]("button_delete")}}});return{View:n}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(4),i(7),i(9),i(37),i(35),i(36)],s=function(e,t,i,n,s,c){var d=o.View.extend({initialize:function(e,t){this.app=e,this.inputs=t.inputs,this.parameters=new c,this.setElement(a("
    ")),this.render()},render:function(){var e=this;this.$el.empty(),r.each(this.inputs,function(t){e.add(t)})},add:function(t){var i=l.extend(!0,{},t);switch(i.id=t.id=e.uid(),this.app.input_list[i.id]=i,i.type){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(e){var t=this;e.test_param.id=e.id,this.app.options.sustain_conditionals&&(e.test_param.disabled=!0);var i=this._addRow(e.test_param);i.model&&i.model.set("onchange",function(i){var n=t.app.data.matchCase(e,i);for(var s in e.cases){var o=e.cases[s],a=t.$("#"+e.id+"-section-"+s),r=!1;for(var l in o.inputs)if(!o.inputs[l].hidden){r=!0;break}s==n&&r?a.fadeIn("fast"):a.hide()}t.app.trigger("change")});for(var n in e.cases){var s=new d(this.app,{inputs:e.cases[n].inputs});this._append(s.$el.addClass("ui-form-section"),e.id+"-section-"+n)}i.trigger("change")},_addRepeat:function(e){function t(t){var n=e.id+"-section-"+o++,s=new d(i.app,{inputs:t});a.add({id:n,$el:s.$el,ondel:function(){a.del(n),i.app.trigger("change")}})}for(var i=this,o=0,a=new n.View({title:e.title||"Repeat",min:e.min,max:e.max,onnew:function(){t(e.inputs),i.app.trigger("change")}}),l=r.size(e.cache),c=0;c").addClass("ui-form-info").html(e.help)),this.app.on("expand",function(e){t.$("#"+e).length>0&&t.expand()}),this._append(t.$el,e.id)},_addRow:function(e){var t=this,i=e.id;e.onchange=function(){t.app.trigger("change",i)};var n=this.parameters.create(e);this.app.field_list[i]=n;var o=new s(this.app,{name:e.name,label:e.label||e.name,value:e.value,text_value:e.text_value,collapsible_value:e.collapsible_value,collapsible_preview:e.collapsible_preview,help:e.help,argument:e.argument,disabled:e.disabled,color:e.color,style:e.style,backdrop:e.backdrop,hidden:e.hidden,field:n});return this.app.element_list[i]=o,this._append(o.$el,e.id),n},_append:function(e,t){this.$el.append(e.addClass("section-row").attr("id",t))}});return{View:d}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2),i(1))},function(e,t,i){var n,s;(function(o,a,r){n=[i(4),i(9),i(7),i(38),i(34)],s=function(e,t,i,n,s){return o.View.extend({initialize:function(t){this.options=e.merge(t,{initial_errors:!1,cls:"ui-portlet-limited",icon:null,always_refresh:!0}),this.setElement("
    "),this.render()},update:function(e){var t=this;this.data.matchModel(e,function(e,i){var n=t.input_list[i];if(n&&n.options&&!a.isEqual(n.options,e.options)){n.options=e.options;var s=t.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 e.options){var l=e.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(e){for(var t in this.input_list){var i=this.field_list[t],n=this.input_list[t];n.is_dynamic&&i.wait&&i.unwait&&i[e?"wait":"unwait"]()}},highlight:function(e,t,i){var n=this.element_list[e];if(n&&(n.error(t||"Please verify this parameter."),this.portlet.expand(),this.trigger("expand",e),!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(e){if(this.trigger("reset"),e&&e.errors){var t=this.data.matchResponse(e.errors);for(var i in this.element_list){this.element_list[i];t[i]&&this.highlight(i,t[i],!0)}}},render:function(){var e=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 t=this.data.checksum();return this.on("change",function(i){var n=e.input_list[i];if(!n||n.refresh_on_change||e.options.always_refresh){var s=e.data.checksum();s!=t&&(t=s,e.options.onchange&&e.options.onchange())}}),this.on("reset",function(){a.each(e.element_list,function(e){e.reset()})}),this},_renderForm:function(){r(".tooltip").remove(),this.message=new i.Message,this.section=new n.View(this,{inputs:this.options.inputs}),this.portlet=new t.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.options.inputs&&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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(2),i(1))},function(e,t,i){var n,s;(function(o){n=[i(31),i(75),i(5)],s=function(e,t,i){"use strict";function n(e){return function(t,i){return this.isNew()&&(i=i||{},i.url=this.urlRoot+this.get("history_id")+"/contents",t=t||{},t.type="dataset_collection"),e.call(this,t,i)}}var s=t.HistoryContentMixin,a=e.ListDatasetCollection,r=e.PairDatasetCollection,l=e.ListPairedDatasetCollection,c=e.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"}),save:n(c.prototype.save),toString:function(){return["HistoryListOfListsDatasetCollection(",this.get("name"),")"].join("")}});return{HistoryListDatasetCollection:d,HistoryPairDatasetCollection:h,HistoryListPairedDatasetCollection:u,HistoryListOfListsDatasetCollection:p}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2))},function(e,t,i){var n,s;(function(o,a,r){n=[i(68),i(73),i(40),i(42),i(6),i(130)],s=function(e,t,i,n,s,l){"use strict";var c=e.PaginatedCollection,d=c.extend(s.LoggableMixin).extend({_logNamespace:"history",model:function(e,n){if("dataset"===e.history_content_type)return new t.HistoryDatasetAssociation(e,n);if("dataset_collection"===e.history_content_type){switch(e.collection_type){case"list":return new i.HistoryListDatasetCollection(e,n);case"paired":return new i.HistoryPairDatasetCollection(e,n);case"list:paired":return new i.HistoryListPairedDatasetCollection(e,n);case"list:list":return new i.HistoryListOfListsDatasetCollection(e,n)}var s="Unknown collection_type: "+e.collection_type;return console.warn(s,e),{validationError:s}}return{validationError:"Unknown history_content_type: "+e.history_content_type}},limitPerPage:500,limitPerProgressiveFetch:500,order:"hid",urlRoot:Galaxy.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},initialize:function(e,t){t=t||{},c.prototype.initialize.call(this,e,t),this.history=t.history||null,this.setHistoryId(t.historyId||null),this.includeDeleted=t.includeDeleted||this.includeDeleted,this.includeHidden=t.includeHidden||this.includeHidden,this.model.prototype.idAttribute="type_id"},setHistoryId:function(e){this.historyId=e,this._setUpWebStorage()},_setUpWebStorage:function(e){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(e){this.storage.includeDeleted(e)},"include-hidden":function(e){this.storage.includeHidden(e)}}),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(e){return!e.inReadyState()})},runningAndActive:function(){return this.filter(function(e){return!e.inReadyState()&&e.get("visible")&&!e.get("deleted")})},getByHid:function(e){return this.findWhere({hid:e})},haveDetails:function(){return this.all(function(e){return e.hasDetails()})},hidden:function(){return this.filter(function(e){return e.hidden()})},deleted:function(){return this.filter(function(e){return e.get("deleted")})},visibleAndUndeleted:function(){return this.filter(function(e){return e.get("visible")&&!e.get("deleted")})},setIncludeDeleted:function(e,t){if(o.isBoolean(e)&&e!==this.includeDeleted){if(this.includeDeleted=e,o.result(t,"silent"))return;this.trigger("include-deleted",e,this)}},setIncludeHidden:function(e,t){if(o.isBoolean(e)&&e!==this.includeHidden){if(this.includeHidden=e,t=t||{},o.result(t,"silent"))return;this.trigger("include-hidden",e,this)}},fetch:function(e){if(e=e||{},this.historyId&&!e.details){var t=n.HistoryPrefs.get(this.historyId).toJSON();o.isEmpty(t.expandedIds)||(e.details=o.values(t.expandedIds).join(","))}return c.prototype.fetch.call(this,e)},_buildFetchData:function(e){return o.extend(c.prototype._buildFetchData.call(this,e),{v:"dev"})},_fetchParams:c.prototype._fetchParams.concat(["v","details"]),_buildFetchFilters:function(e){var t=c.prototype._buildFetchFilters.call(this,e)||{},i={};return this.includeDeleted||(i.deleted=!1,i.purged=!1),this.includeHidden||(i.visible=!0),o.defaults(t,i)},getTotalItemCount:function(){return this.history.contentsShown()},fetchUpdated:function(e,t){return e&&(t=t||{filters:{}},t.remove=!1,t.filters={"update_time-ge":e.toISOString(),visible:""}),this.fetch(t)},fetchDeleted:function(e){e=e||{};var t=this;return e.filters=o.extend(e.filters,{deleted:!0,purged:void 0}),e.remove=!1,t.trigger("fetching-deleted",t),t.fetch(e).always(function(){t.trigger("fetching-deleted-done",t)})},fetchHidden:function(e){e=e||{};var t=this;return e.filters=o.extend(e.filters,{visible:!1}),e.remove=!1,t.trigger("fetching-hidden",t),t.fetch(e).always(function(){t.trigger("fetching-hidden-done",t)})},fetchAllDetails:function(e){e=e||{};var t={details:"all"};return e.data=o.extend(e.data||{},t),this.fetch(e)},fetchCollectionCounts:function(e){return e=e||{},e.keys=["type_id","element_count"].join(","),e.filters=o.extend(e.filters||{},{history_content_type:"dataset_collection"}),e.remove=!1,this.fetch(e)},_filterAndUpdate:function(e,t){var i=this,n=i.model.prototype.idAttribute,s=[t];return i.fetch({filters:e,remove:!1}).then(function(e){return e=e.reduce(function(e,t,s){var o=i.get(t[n]);return o?e.concat(o):e},[]),i.ajaxQueue("save",s,e)})},ajaxQueue:function(e,t,i){ +return i=i||this.models,new l.AjaxQueue(i.slice().reverse().map(function(i,n){var s=o.isString(e)?i[e]:e;return function(){return s.apply(i,t)}})).deferred},progressivelyFetchDetails:function(e){function i(t){t=t||0;var a=o.extend(o.clone(e),{view:"summary",keys:c,limit:r,offset:t,reset:0===t,remove:!1});o.defer(function(){s.fetch.call(s,a).fail(n.reject).done(function(e){n.notify(e,r,t),e.length!==r?(s.allFetched=!0,n.resolve(e,r,t)):i(t+r)})})}e=e||{};var n=a.Deferred(),s=this,r=e.limitPerCall||s.limitPerProgressiveFetch,l=t.HistoryDatasetAssociation.prototype.searchAttributes,c=l.join(",");return i(),n},isCopyable:function(e){var t=["HistoryDatasetAssociation","HistoryDatasetCollectionAssociation"];return o.isObject(e)&&e.id&&o.contains(t,e.model_class)},copy:function(e){var t,i,n;o.isString(e)?(t=e,n="hda",i="dataset"):(t=e.id,n={HistoryDatasetAssociation:"hda",LibraryDatasetDatasetAssociation:"ldda",HistoryDatasetCollectionAssociation:"hdca"}[e.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:t,source:n,type:i})}).done(function(e){s.add([e],{parse:!0})}).fail(function(e,o,a){s.trigger("error",s,r,{},"Error copying contents",{type:i,id:t,source:n})});return r},createHDCA:function(e,t,i,n){var s=this.model({history_content_type:"dataset_collection",collection_type:t,history_id:this.historyId,name:i,element_identifiers:e});return s.save(n)},haveSearchDetails:function(){return this.allFetched&&this.all(function(e){return o.has(e.attributes,"annotation")})},matches:function(e){return this.filter(function(t){return t.matches(e)})},clone:function(){var e=r.Collection.prototype.clone.call(this);return e.historyId=this.historyId,e},toString:function(){return["HistoryContents(",[this.historyId,this.length].join(),")"].join("")}});return{HistoryContents:d}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2),i(1),i(3))},function(e,t,i){var n,s;(function(o){n=[i(6)],s=function(e){"use strict";var t=e.SessionStorageModel.extend({defaults:{expandedIds:{},show_deleted:!1,show_hidden:!1},addExpanded:function(e){var t=this.get("expandedIds");t[e.id]=e.get("id"),this.save("expandedIds",t)},removeExpanded:function(e){var t=this.get("expandedIds");delete t[e.id],this.save("expandedIds",t)},isExpanded:function(e){return o.result(this.get("expandedIds"),e,!1)},allExpanded:function(){return o.values(this.get("expandedIds"))},clearExpanded:function(){this.set("expandedIds",{})},includeDeleted:function(e){return o.isUndefined(e)||this.set("show_deleted",e),this.get("show_deleted")},includeHidden:function(e){return o.isUndefined(e)||this.set("show_hidden",e),this.get("show_hidden")},toString:function(){return"HistoryPrefs("+this.id+")"}},{storageKeyPrefix:"history:",historyStorageKey:function(e){if(!e)throw new Error("HistoryPrefs.historyStorageKey needs valid id: "+e);return t.storageKeyPrefix+e},get:function(e){return new t({id:t.historyStorageKey(e)})},clearAll:function(e){for(var i in sessionStorage)0===i.indexOf(t.storageKeyPrefix)&&sessionStorage.removeItem(i)}});return{HistoryPrefs:t}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(2))},function(e,t,i){var n,s;(function(o,a,r,l){n=[i(6),i(5)],s=function(e,t){"use strict";var i="list",n=o.View.extend(e.LoggableMixin).extend({_logNamespace:i,initialize:function(e){this.expanded=e.expanded||!1,this.log("\t expanded:",this.expanded),this.fxSpeed=void 0!==e.fxSpeed?e.fxSpeed:this.fxSpeed},fxSpeed:"fast",render:function(e){var t=this._buildNewRender();return this._setUpBehaviors(t),this._queueNewRender(t,e),this},_buildNewRender:function(){var e=a(this.templates.el(this.model.toJSON(),this));return this.expanded&&this.$details(e).replaceWith(this._renderDetails().show()),e},_queueNewRender:function(e,t){t=void 0===t?this.fxSpeed:t;var i=this;0===t?(i._swapNewRender(e),i.trigger("rendered",i)):a(i).queue("fx",[function(e){i.$el.fadeOut(t,e)},function(t){i._swapNewRender(e),t()},function(e){i.$el.fadeIn(t,e)},function(e){i.trigger("rendered",i),e()}])},_swapNewRender:function(e){return this.$el.empty().attr("class",r.isFunction(this.className)?this.className():this.className).append(e.children())},_setUpBehaviors:function(e){e=e||this.$el,e.find("[title]").tooltip({placement:"bottom"})},$details:function(e){return e=e||this.$el,e.find("> .details")},_renderDetails:function(){var e=a(this.templates.details(this.model.toJSON(),this));return this._setUpBehaviors(e),e},toggleExpanded:function(e){return e=void 0===e?!this.expanded:e,e?this.expand():this.collapse(),this},expand:function(){var e=this;return e._fetchModelDetails().always(function(){e._expand()})},_fetchModelDetails:function(){return this.model.hasDetails()?l.when():this.model.fetch()},_expand:function(){var e=this,t=e._renderDetails();e.$details().replaceWith(t),e.expanded=!0,e.$details().slideDown(e.fxSpeed,function(){e.trigger("expanded",e)})},collapse:function(){this.debug(this+"(ExpandableView).collapse");var e=this;e.expanded=!1,this.$details().slideUp(e.fxSpeed,function(){e.trigger("collapsed",e)})}}),s=n.extend(e.mixin(e.SelectableViewMixin,e.DraggableViewMixin,{tagName:"div",className:"list-item",initialize:function(t){n.prototype.initialize.call(this,t),e.SelectableViewMixin.initialize.call(this,t),e.DraggableViewMixin.initialize.call(this,t),this._setUpListeners()},_setUpListeners:function(){return this.on("selectable",function(e){e?this.$(".primary-actions").hide():this.$(".primary-actions").show()},this),this},_buildNewRender:function(){var e=n.prototype._buildNewRender.call(this);return e.children(".warnings").replaceWith(this._renderWarnings()),e.children(".title-bar").replaceWith(this._renderTitleBar()),e.children(".primary-actions").append(this._renderPrimaryActions()),e.find("> .title-bar .subtitle").replaceWith(this._renderSubtitle()),e},_swapNewRender:function(e){return n.prototype._swapNewRender.call(this,e),this.selectable&&this.showSelector(0),this.draggable&&this.draggableOn(),this.$el},_renderWarnings:function(){var e=this,t=a('
    '),i=e.model.toJSON();return r.each(e.templates.warnings,function(n){t.append(a(n(i,e)))}),t},_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(e){e.stopPropagation(),e.altKey?(this.toggleSelect(e),this.selectable||this.showSelector()):this.toggleExpanded()},_keyDownTitleBar:function(e){var t=32,i=13;return!e||"keydown"!==e.type||e.keyCode!==t&&e.keyCode!==i||(this.toggleExpanded(),e.stopPropagation(),!1)},toString:function(){var e=this.model?this.model+"":"(no model)";return"ListItemView("+e+")"}}));s.prototype.templates=function(){var t=e.wrapTemplate(['
    ','
    ','
    ','',"
    ",'
    ','
    ','
    ',"
    "]),i={},n=e.wrapTemplate(['
    ','','
    ','<%- element.name %>',"
    ",'
    ',"
    "],"element"),s=e.wrapTemplate(['
    ']),o=e.wrapTemplate(['
    ']);return{el:t,warnings:i,titleBar:n,subtitle:s,details:o}}();var c=s.extend({foldoutStyle:"foldout",foldoutPanelClass:null,initialize:function(e){"drilldown"===this.foldoutStyle&&(this.expanded=!1),this.foldoutStyle=e.foldoutStyle||this.foldoutStyle,this.foldoutPanelClass=e.foldoutPanelClass||this.foldoutPanelClass,s.prototype.initialize.call(this,e),this.foldout=this._createFoldoutPanel()},_renderDetails:function(){if("drilldown"===this.foldoutStyle)return a();var e=s.prototype._renderDetails.call(this);return this._attachFoldout(this.foldout,e)},_createFoldoutPanel:function(){var e=this.model,t=this._getFoldoutPanelClass(e),i=this._getFoldoutPanelOptions(e),n=new t(r.extend(i,{model:e}));return n},_getFoldoutPanelClass:function(){return this.foldoutPanelClass},_getFoldoutPanelOptions:function(){return{foldoutStyle:this.foldoutStyle,fxSpeed:this.fxSpeed}},_attachFoldout:function(e,t){return t=t||this.$("> .details"),this.foldout=e.render(0),e.$("> .controls").hide(),t.append(e.$el)},expand:function(){var e=this;return e._fetchModelDetails().always(function(){"foldout"===e.foldoutStyle?e._expand():"drilldown"===e.foldoutStyle&&e._expandByDrilldown()})},_expandByDrilldown:function(){var e=this;e.listenTo(e.foldout,"close",function(){e.trigger("collapsed:drilldown",e,e.foldout)}),e.trigger("expanded:drilldown",e,e.foldout)}});return c.prototype.templates=function(){var t=e.wrapTemplate(['
    ',"
    "],"collection");return r.extend({},s.prototype.templates,{details:t})}(),{ExpandableView:n,ListItemView:s,FoldoutListItemView:c}}.apply(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(3),i(1),i(2),i(1))},function(e,t,i){var n,s;(function(o,a){n=[i(4),i(56),i(7),i(39),i(17),i(29)],s=function(e,t,i,n,s,r){return n.extend({initialize:function(e){var i=this;n.prototype.initialize.call(this,e),this.deferred=new t,e.inputs?this._buildForm(e):this.deferred.execute(function(t){i._buildModel(t,e,!0)}),e.listen_to_history&&parent.Galaxy&&parent.Galaxy.currHistoryPanel&&this.listenTo(parent.Galaxy.currHistoryPanel.collection,"change",function(){this.refresh()}),this.$el.on("remove",function(){i.remove()})},refresh:function(){var e=this;e.deferred.reset(),this.deferred.execute(function(t){e._updateModel(t)})},remove:function(){var e=this;this.$el.hide(),this.deferred.execute(function(){n.prototype.remove.call(e),Galaxy.emit.debug("tool-form-base::remove()","Destroy view.")})},_buildForm:function(t){var i=this;this.options=e.merge(t,this.options),this.options=e.merge({icon:t.icon,title:""+t.name+" "+t.description+" (Galaxy Version "+t.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(t,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))),e.get({url:r,data:l,success:function(e){return e=e.tool_model||e,e.display?(a._buildForm(e),!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.",e),void t.resolve()):void(window.location=Galaxy.root)},error:function(e,n){var s=e&&e.err_msg||"Uncaught error.";401==n?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.",e),t.reject()}})},_updateModel:function(t){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),e.request({type:"POST",url:n,data:s,success:function(e){i.update(e.tool_model||e),i.options.update&&i.options.update(e),i.wait(!1),Galaxy.emit.debug("tool-form-base::_updateModel()","Received new model.",e),t.resolve()},error:function(e){Galaxy.emit.debug("tool-form-base::_updateModel()","Refresh request failed.",e),t.reject()}})},_operations:function(){var e=this,t=this.options,n=new i.ButtonMenu({icon:"fa-cubes",title:!t.narrow&&"Versions"||null,tooltip:"Select another tool version"});if(!t.sustain_version&&t.versions&&t.versions.length>1)for(var s in t.versions){var a=t.versions[s];a!=t.version&&n.addMenu({title:"Switch to "+a,version:a,icon:"fa-cube",onclick:function(){var i=t.id.replace(t.version,this.version),n=this.version;e.deferred.reset(),e.deferred.execute(function(t){e._buildModel(t,{id:i,version:n})})}})}else n.$el.hide();var r=new i.ButtonMenu({icon:"fa-caret-down",title:!t.narrow&&"Options"||null,tooltip:"View available options"});return t.biostar_url&&(r.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(t.biostar_url+"/p/new/post/")}}),r.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(t.biostar_url+"/local/search/page/?q="+t.name)}})),r.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="+t.id)}}),Galaxy.user&&Galaxy.user.get("is_admin")&&r.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=Galaxy.root+"api/tools/"+t.id+"/download"}}),Galaxy.user&&Galaxy.user.get("is_admin")&&r.addMenu({icon:"fa-refresh",title:"Reload Tool XML",tooltip:"Reload tool XML file",onclick:function(){var e=new i.Modal.View;o.ajax({url:"/api/tools/"+t.id+"/reload",type:"GET"}).done(function(t){e.show({title:t.done?"Tool XML Reload":"Tool XML Reload Error",body:t.done?t.done:t.error,buttons:{Close:function(){e.hide()}}}),window.setTimeout(function(){e.hide()},2e3)}).fail(function(i){e.show({title:"Tool XML Reload AJAX Error",body:t.id+" "+i,buttons:{Close:function(){e.hide()}}})})}}),t.requirements&&t.requirements.length>0&&r.addMenu({icon:"fa-info-circle",title:"Requirements",tooltip:"Display tool requirements",onclick:function(){!this.requirements_visible||e.portlet.collapsed?(this.requirements_visible=!0,e.portlet.expand(),e.message.update({persistent:!0,message:e._templateRequirements(t),status:"info"})):(this.requirements_visible=!1,e.message.update({message:""}))}}),t.sharable_url&&r.addMenu({icon:"fa-external-link",title:"See in Tool Shed",tooltip:"Access the repository",onclick:function(){window.open(t.sharable_url)}}),{menu:r,versions:n}},_footer:function(){var e=this.options,t=o("
    ").append(this._templateHelp(e));if(e.citations){var i=o("
    "),n=new s.ToolCitationCollection;n.tool_id=e.id;var a=new r.CitationListView({el:i,collection:n});a.render(),n.fetch(),t.append(i)}return t},_templateHelp:function(e){var t=o("
    ").addClass("ui-form-help").append(e.help);return t.find("a").attr("target","_blank"),t},_templateRequirements:function(e){var t=e.requirements.length;if(t>0){var i="This tool requires ";a.each(e.requirements,function(e,n){i+=e.name+(e.version?" (Version "+e.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(t,n),!(void 0!==s&&(e.exports=s))}).call(t,i(1),i(2))},function(e,t,i){var n,s;(function(o,a){n=[i(2),i(16),i(11),i(18)],s=function(e,t,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(e){this.attributes.html=unescape(this.attributes.html)},copy:function(){return new r(this.toJSON())},set_value:function(e){this.set("value",e||"")}}),l=o.Collection.extend({model:r}),c=r.extend({}),d=r.extend({set_value:function(e){this.set("value",parseInt(e,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(e){this.set("value",parseFloat(e))}}),u=r.extend({get_samples:function(){return e.map(this.get("options"),function(e){return e[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(t){this.set("inputs",new l(e.map(t.inputs,function(e){var t=r.subModelTypes[e.type]||r;return new t(e)})))},toJSON:function(){var e=o.Model.prototype.toJSON.call(this);return e.inputs=this.get("inputs").map(function(e){return e.toJSON()}),e},remove_inputs:function(e){var t=this,i=t.get("inputs").filter(function(t){return e.indexOf(t.get("type"))!==-1});t.get("inputs").remove(i)},copy:function(e){var t=new p(this.toJSON());if(e){var i=new o.Collection;t.get("inputs").each(function(e){e.get_samples()&&i.push(e)}),t.set("inputs",i)}return t},apply_search_results:function(t){return e.indexOf(t,this.attributes.id)!==-1?this.show():this.hide(),this.is_visible()},set_input_value:function(e,t){this.get("inputs").find(function(t){return t.get("name")===e}).set("value",t)},set_input_values:function(t){var i=this;e.each(e.keys(t),function(e){i.set_input_value(e,t[e])})},run:function(){return this._run()},rerun:function(e,t){return this._run({action:"rerun",target_dataset_id:e.id,regions:t})},get_inputs_dict:function(){var e={};return this.get("inputs").each(function(t){e[t.get("name")]=t.get("value")}),e},_run:function(n){var s=e.extend({tool_id:this.id,inputs:this.get_inputs_dict()},n),o=a.Deferred(),r=new t.ServerStateDeferred({ajax_settings:{url:this.urlRoot,data:JSON.stringify(s),dataType:"json",contentType:"application/json",type:"POST"},interval:2e3,success_fn:function(e){return"pending"!==e}});return a.when(r.go()).then(function(e){o.resolve(new i.DatasetCollection(e))}),o}});e.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(){e.each(this.attributes.elems,function(e){e.show()}),this.show(),this.set("open",!1)},apply_search_results:function(t){var i,n=!0;e.each(this.attributes.elems,function(e){e instanceof f?(i=e,i.hide()):e instanceof p&&e.apply_search_results(t)&&(n=!1,i&&i.show())}),n?this.hide():(this.show(),this.set("open",!0))}});e.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 e=this.attributes.query;if(e.length");e.append(S.tool_link(this.model.toJSON()));var t=this.model.get("form_style",null);if("upload1"===this.model.id)e.find("a").on("click",function(e){e.preventDefault(),Galaxy.upload.show()});else if("regular"===t){var i=this;e.find("a").on("click",function(e){e.preventDefault();var t=new n.View({id:i.model.id,version:i.model.get("version")});t.deferred.execute(function(){Galaxy.app.display(t)})})}return this.$el.append(e),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 t=this.$el.find(".toolSectionBody");return e.each(this.model.attributes.elems,function(e){if(e instanceof p){var i=new w({model:e,className:"toolTitle"});i.render(),t.append(i.$el)}else if(e instanceof f){var n=new b({model:e});n.render(),t.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(),a("#messagebox").is(":visible")&&this.$el.css("top","95px"),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(e){return this.model.attributes.clear_key&&this.model.attributes.clear_key===e.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 e=this,t=new C({model:this.model.get("tool_search")});return t.render(),e.$el.append(t.$el),this.model.get("layout").each(function(t){if(t instanceof m){var i=new x({model:t});i.render(),e.$el.append(i.$el)}else if(t instanceof p){var n=new w({model:t,className:"toolTitleNoSection"});n.render(),e.$el.append(n.$el)}else if(t instanceof f){var s=new b({model:t});s.render(),e.$el.append(s.$el)}}),e.$el.find("a.tool-link").click(function(t){var i=a(this).attr("class").split(/\s+/)[0],n=e.model.get("tools").get(i);e.trigger("tool_link_click",t,n)}),this},handle_search_results:function(){var e=this.model.get("tool_search").get("results");e&&0===e.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 e=this;this.tool_panel_view.on("tool_link_click",function(t,i){t.preventDefault(),e.show_tool(i)})},show_tool:function(e){var t=this;e.fetch().done(function(){t.tool_form_view.model=e,t.tool_form_view.render(),t.tool_form_view.$el.show(),a("#left").width("650px")})}}),{tool_search:e.template(['',' ',''].join("")),panel_section:e.template(['",'